@akiojin/gwt 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. package/dist/claude-history.d.ts +60 -0
  2. package/dist/claude-history.d.ts.map +1 -0
  3. package/dist/claude-history.js +606 -0
  4. package/dist/claude-history.js.map +1 -0
  5. package/dist/claude.d.ts +12 -0
  6. package/dist/claude.d.ts.map +1 -0
  7. package/dist/claude.js +222 -0
  8. package/dist/claude.js.map +1 -0
  9. package/dist/cli/ui/components/App.d.ts +22 -0
  10. package/dist/cli/ui/components/App.d.ts.map +1 -0
  11. package/dist/cli/ui/components/App.js +557 -0
  12. package/dist/cli/ui/components/App.js.map +1 -0
  13. package/dist/cli/ui/components/common/Confirm.d.ts +13 -0
  14. package/dist/cli/ui/components/common/Confirm.d.ts.map +1 -0
  15. package/dist/cli/ui/components/common/Confirm.js +20 -0
  16. package/dist/cli/ui/components/common/Confirm.js.map +1 -0
  17. package/dist/cli/ui/components/common/ErrorBoundary.d.ts +23 -0
  18. package/dist/cli/ui/components/common/ErrorBoundary.d.ts.map +1 -0
  19. package/dist/cli/ui/components/common/ErrorBoundary.js +37 -0
  20. package/dist/cli/ui/components/common/ErrorBoundary.js.map +1 -0
  21. package/dist/cli/ui/components/common/Input.d.ts +14 -0
  22. package/dist/cli/ui/components/common/Input.d.ts.map +1 -0
  23. package/dist/cli/ui/components/common/Input.js +14 -0
  24. package/dist/cli/ui/components/common/Input.js.map +1 -0
  25. package/dist/cli/ui/components/common/LoadingIndicator.d.ts +19 -0
  26. package/dist/cli/ui/components/common/LoadingIndicator.d.ts.map +1 -0
  27. package/dist/cli/ui/components/common/LoadingIndicator.js +61 -0
  28. package/dist/cli/ui/components/common/LoadingIndicator.js.map +1 -0
  29. package/dist/cli/ui/components/common/Select.d.ts +30 -0
  30. package/dist/cli/ui/components/common/Select.d.ts.map +1 -0
  31. package/dist/cli/ui/components/common/Select.js +140 -0
  32. package/dist/cli/ui/components/common/Select.js.map +1 -0
  33. package/dist/cli/ui/components/parts/Footer.d.ts +15 -0
  34. package/dist/cli/ui/components/parts/Footer.d.ts.map +1 -0
  35. package/dist/cli/ui/components/parts/Footer.js +20 -0
  36. package/dist/cli/ui/components/parts/Footer.js.map +1 -0
  37. package/dist/cli/ui/components/parts/Header.d.ts +29 -0
  38. package/dist/cli/ui/components/parts/Header.d.ts.map +1 -0
  39. package/dist/cli/ui/components/parts/Header.js +19 -0
  40. package/dist/cli/ui/components/parts/Header.js.map +1 -0
  41. package/dist/cli/ui/components/parts/MergeStatusList.d.ts +13 -0
  42. package/dist/cli/ui/components/parts/MergeStatusList.d.ts.map +1 -0
  43. package/dist/cli/ui/components/parts/MergeStatusList.js +52 -0
  44. package/dist/cli/ui/components/parts/MergeStatusList.js.map +1 -0
  45. package/dist/cli/ui/components/parts/ProgressBar.d.ts +13 -0
  46. package/dist/cli/ui/components/parts/ProgressBar.d.ts.map +1 -0
  47. package/dist/cli/ui/components/parts/ProgressBar.js +53 -0
  48. package/dist/cli/ui/components/parts/ProgressBar.js.map +1 -0
  49. package/dist/cli/ui/components/parts/ScrollableList.d.ts +12 -0
  50. package/dist/cli/ui/components/parts/ScrollableList.d.ts.map +1 -0
  51. package/dist/cli/ui/components/parts/ScrollableList.js +11 -0
  52. package/dist/cli/ui/components/parts/ScrollableList.js.map +1 -0
  53. package/dist/cli/ui/components/parts/Stats.d.ts +13 -0
  54. package/dist/cli/ui/components/parts/Stats.d.ts.map +1 -0
  55. package/dist/cli/ui/components/parts/Stats.js +42 -0
  56. package/dist/cli/ui/components/parts/Stats.js.map +1 -0
  57. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts +20 -0
  58. package/dist/cli/ui/components/screens/AIToolSelectorScreen.d.ts.map +1 -0
  59. package/dist/cli/ui/components/screens/AIToolSelectorScreen.js +77 -0
  60. package/dist/cli/ui/components/screens/AIToolSelectorScreen.js.map +1 -0
  61. package/dist/cli/ui/components/screens/BatchMergeProgressScreen.d.ts +14 -0
  62. package/dist/cli/ui/components/screens/BatchMergeProgressScreen.d.ts.map +1 -0
  63. package/dist/cli/ui/components/screens/BatchMergeProgressScreen.js +41 -0
  64. package/dist/cli/ui/components/screens/BatchMergeProgressScreen.js.map +1 -0
  65. package/dist/cli/ui/components/screens/BatchMergeResultScreen.d.ts +14 -0
  66. package/dist/cli/ui/components/screens/BatchMergeResultScreen.d.ts.map +1 -0
  67. package/dist/cli/ui/components/screens/BatchMergeResultScreen.js +71 -0
  68. package/dist/cli/ui/components/screens/BatchMergeResultScreen.js.map +1 -0
  69. package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts +15 -0
  70. package/dist/cli/ui/components/screens/BranchCreatorScreen.d.ts.map +1 -0
  71. package/dist/cli/ui/components/screens/BranchCreatorScreen.js +142 -0
  72. package/dist/cli/ui/components/screens/BranchCreatorScreen.js.map +1 -0
  73. package/dist/cli/ui/components/screens/BranchListScreen.d.ts +39 -0
  74. package/dist/cli/ui/components/screens/BranchListScreen.d.ts.map +1 -0
  75. package/dist/cli/ui/components/screens/BranchListScreen.js +172 -0
  76. package/dist/cli/ui/components/screens/BranchListScreen.js.map +1 -0
  77. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts +29 -0
  78. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.d.ts.map +1 -0
  79. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js +92 -0
  80. package/dist/cli/ui/components/screens/ExecutionModeSelectorScreen.js.map +1 -0
  81. package/dist/cli/ui/components/screens/PRCleanupScreen.d.ts +23 -0
  82. package/dist/cli/ui/components/screens/PRCleanupScreen.d.ts.map +1 -0
  83. package/dist/cli/ui/components/screens/PRCleanupScreen.js +94 -0
  84. package/dist/cli/ui/components/screens/PRCleanupScreen.js.map +1 -0
  85. package/dist/cli/ui/components/screens/SessionSelectorScreen.d.ts +17 -0
  86. package/dist/cli/ui/components/screens/SessionSelectorScreen.d.ts.map +1 -0
  87. package/dist/cli/ui/components/screens/SessionSelectorScreen.js +55 -0
  88. package/dist/cli/ui/components/screens/SessionSelectorScreen.js.map +1 -0
  89. package/dist/cli/ui/components/screens/WorktreeManagerScreen.d.ts +20 -0
  90. package/dist/cli/ui/components/screens/WorktreeManagerScreen.d.ts.map +1 -0
  91. package/dist/cli/ui/components/screens/WorktreeManagerScreen.js +65 -0
  92. package/dist/cli/ui/components/screens/WorktreeManagerScreen.js.map +1 -0
  93. package/dist/cli/ui/hooks/useBatchMerge.d.ts +17 -0
  94. package/dist/cli/ui/hooks/useBatchMerge.d.ts.map +1 -0
  95. package/dist/cli/ui/hooks/useBatchMerge.js +77 -0
  96. package/dist/cli/ui/hooks/useBatchMerge.js.map +1 -0
  97. package/dist/cli/ui/hooks/useGitData.d.ts +20 -0
  98. package/dist/cli/ui/hooks/useGitData.d.ts.map +1 -0
  99. package/dist/cli/ui/hooks/useGitData.js +116 -0
  100. package/dist/cli/ui/hooks/useGitData.js.map +1 -0
  101. package/dist/cli/ui/hooks/useScreenState.d.ts +12 -0
  102. package/dist/cli/ui/hooks/useScreenState.d.ts.map +1 -0
  103. package/dist/cli/ui/hooks/useScreenState.js +30 -0
  104. package/dist/cli/ui/hooks/useScreenState.js.map +1 -0
  105. package/dist/cli/ui/hooks/useTerminalSize.d.ts +9 -0
  106. package/dist/cli/ui/hooks/useTerminalSize.d.ts.map +1 -0
  107. package/dist/cli/ui/hooks/useTerminalSize.js +24 -0
  108. package/dist/cli/ui/hooks/useTerminalSize.js.map +1 -0
  109. package/dist/cli/ui/screens/BranchActionSelectorScreen.d.ts +21 -0
  110. package/dist/cli/ui/screens/BranchActionSelectorScreen.d.ts.map +1 -0
  111. package/dist/cli/ui/screens/BranchActionSelectorScreen.js +61 -0
  112. package/dist/cli/ui/screens/BranchActionSelectorScreen.js.map +1 -0
  113. package/dist/cli/ui/types.d.ts +245 -0
  114. package/dist/cli/ui/types.d.ts.map +1 -0
  115. package/dist/cli/ui/types.js +2 -0
  116. package/dist/cli/ui/types.js.map +1 -0
  117. package/dist/cli/ui/utils/baseBranch.d.ts +4 -0
  118. package/dist/cli/ui/utils/baseBranch.d.ts.map +1 -0
  119. package/dist/cli/ui/utils/baseBranch.js +17 -0
  120. package/dist/cli/ui/utils/baseBranch.js.map +1 -0
  121. package/dist/cli/ui/utils/branchFormatter.d.ts +13 -0
  122. package/dist/cli/ui/utils/branchFormatter.d.ts.map +1 -0
  123. package/dist/cli/ui/utils/branchFormatter.js +202 -0
  124. package/dist/cli/ui/utils/branchFormatter.js.map +1 -0
  125. package/dist/cli/ui/utils/statisticsCalculator.d.ts +9 -0
  126. package/dist/cli/ui/utils/statisticsCalculator.d.ts.map +1 -0
  127. package/dist/cli/ui/utils/statisticsCalculator.js +37 -0
  128. package/dist/cli/ui/utils/statisticsCalculator.js.map +1 -0
  129. package/dist/client/assets/index-CqaYsI0z.js +81 -0
  130. package/dist/client/assets/index-Dy3OxWpP.css +32 -0
  131. package/dist/client/index.html +13 -0
  132. package/dist/codex.d.ts +12 -0
  133. package/dist/codex.d.ts.map +1 -0
  134. package/dist/codex.js +106 -0
  135. package/dist/codex.js.map +1 -0
  136. package/dist/config/builtin-tools.d.ts +19 -0
  137. package/dist/config/builtin-tools.d.ts.map +1 -0
  138. package/dist/config/builtin-tools.js +40 -0
  139. package/dist/config/builtin-tools.js.map +1 -0
  140. package/dist/config/constants.d.ts +74 -0
  141. package/dist/config/constants.d.ts.map +1 -0
  142. package/dist/config/constants.js +90 -0
  143. package/dist/config/constants.js.map +1 -0
  144. package/dist/config/env-history.d.ts +4 -0
  145. package/dist/config/env-history.d.ts.map +1 -0
  146. package/dist/config/env-history.js +34 -0
  147. package/dist/config/env-history.js.map +1 -0
  148. package/dist/config/index.d.ts +24 -0
  149. package/dist/config/index.d.ts.map +1 -0
  150. package/dist/config/index.js +144 -0
  151. package/dist/config/index.js.map +1 -0
  152. package/dist/config/tools.d.ts +40 -0
  153. package/dist/config/tools.d.ts.map +1 -0
  154. package/dist/config/tools.js +238 -0
  155. package/dist/config/tools.js.map +1 -0
  156. package/dist/git.d.ts +145 -0
  157. package/dist/git.d.ts.map +1 -0
  158. package/dist/git.js +871 -0
  159. package/dist/git.js.map +1 -0
  160. package/dist/github.d.ts +14 -0
  161. package/dist/github.d.ts.map +1 -0
  162. package/dist/github.js +123 -0
  163. package/dist/github.js.map +1 -0
  164. package/dist/index.d.ts +15 -0
  165. package/dist/index.d.ts.map +1 -0
  166. package/dist/index.js +510 -0
  167. package/dist/index.js.map +1 -0
  168. package/dist/launcher.d.ts +30 -0
  169. package/dist/launcher.d.ts.map +1 -0
  170. package/dist/launcher.js +116 -0
  171. package/dist/launcher.js.map +1 -0
  172. package/dist/repositories/git.repository.d.ts +38 -0
  173. package/dist/repositories/git.repository.d.ts.map +1 -0
  174. package/dist/repositories/git.repository.js +117 -0
  175. package/dist/repositories/git.repository.js.map +1 -0
  176. package/dist/repositories/github.repository.d.ts +16 -0
  177. package/dist/repositories/github.repository.d.ts.map +1 -0
  178. package/dist/repositories/github.repository.js +61 -0
  179. package/dist/repositories/github.repository.js.map +1 -0
  180. package/dist/repositories/worktree.repository.d.ts +18 -0
  181. package/dist/repositories/worktree.repository.d.ts.map +1 -0
  182. package/dist/repositories/worktree.repository.js +57 -0
  183. package/dist/repositories/worktree.repository.js.map +1 -0
  184. package/dist/services/BatchMergeService.d.ts +45 -0
  185. package/dist/services/BatchMergeService.d.ts.map +1 -0
  186. package/dist/services/BatchMergeService.js +197 -0
  187. package/dist/services/BatchMergeService.js.map +1 -0
  188. package/dist/services/WorktreeOrchestrator.d.ts +37 -0
  189. package/dist/services/WorktreeOrchestrator.d.ts.map +1 -0
  190. package/dist/services/WorktreeOrchestrator.js +74 -0
  191. package/dist/services/WorktreeOrchestrator.js.map +1 -0
  192. package/dist/services/dependency-installer.d.ts +26 -0
  193. package/dist/services/dependency-installer.d.ts.map +1 -0
  194. package/dist/services/dependency-installer.js +139 -0
  195. package/dist/services/dependency-installer.js.map +1 -0
  196. package/dist/services/git.service.d.ts +27 -0
  197. package/dist/services/git.service.d.ts.map +1 -0
  198. package/dist/services/git.service.js +95 -0
  199. package/dist/services/git.service.js.map +1 -0
  200. package/dist/services/github.service.d.ts +14 -0
  201. package/dist/services/github.service.d.ts.map +1 -0
  202. package/dist/services/github.service.js +52 -0
  203. package/dist/services/github.service.js.map +1 -0
  204. package/dist/services/worktree.service.d.ts +20 -0
  205. package/dist/services/worktree.service.d.ts.map +1 -0
  206. package/dist/services/worktree.service.js +52 -0
  207. package/dist/services/worktree.service.js.map +1 -0
  208. package/dist/types/api.d.ts +211 -0
  209. package/dist/types/api.d.ts.map +1 -0
  210. package/dist/types/api.js +8 -0
  211. package/dist/types/api.js.map +1 -0
  212. package/dist/types/tools.d.ts +201 -0
  213. package/dist/types/tools.d.ts.map +1 -0
  214. package/dist/types/tools.js +8 -0
  215. package/dist/types/tools.js.map +1 -0
  216. package/dist/utils/spinner.d.ts +6 -0
  217. package/dist/utils/spinner.d.ts.map +1 -0
  218. package/dist/utils/spinner.js +47 -0
  219. package/dist/utils/spinner.js.map +1 -0
  220. package/dist/utils/terminal.d.ts +20 -0
  221. package/dist/utils/terminal.d.ts.map +1 -0
  222. package/dist/utils/terminal.js +232 -0
  223. package/dist/utils/terminal.js.map +1 -0
  224. package/dist/utils.d.ts +9 -0
  225. package/dist/utils.d.ts.map +1 -0
  226. package/dist/utils.js +48 -0
  227. package/dist/utils.js.map +1 -0
  228. package/dist/web/client/src/components/BranchGraph.d.ts +8 -0
  229. package/dist/web/client/src/components/BranchGraph.d.ts.map +1 -0
  230. package/dist/web/client/src/components/BranchGraph.js +125 -0
  231. package/dist/web/client/src/components/BranchGraph.js.map +1 -0
  232. package/dist/web/client/src/components/EnvEditor.d.ts +20 -0
  233. package/dist/web/client/src/components/EnvEditor.d.ts.map +1 -0
  234. package/dist/web/client/src/components/EnvEditor.js +65 -0
  235. package/dist/web/client/src/components/EnvEditor.js.map +1 -0
  236. package/dist/web/client/src/components/Terminal.d.ts +15 -0
  237. package/dist/web/client/src/components/Terminal.d.ts.map +1 -0
  238. package/dist/web/client/src/components/Terminal.js +112 -0
  239. package/dist/web/client/src/components/Terminal.js.map +1 -0
  240. package/dist/web/client/src/hooks/useBranches.d.ts +16 -0
  241. package/dist/web/client/src/hooks/useBranches.d.ts.map +1 -0
  242. package/dist/web/client/src/hooks/useBranches.js +35 -0
  243. package/dist/web/client/src/hooks/useBranches.js.map +1 -0
  244. package/dist/web/client/src/hooks/useConfig.d.ts +13 -0
  245. package/dist/web/client/src/hooks/useConfig.d.ts.map +1 -0
  246. package/dist/web/client/src/hooks/useConfig.js +27 -0
  247. package/dist/web/client/src/hooks/useConfig.js.map +1 -0
  248. package/dist/web/client/src/hooks/useSessions.d.ts +21 -0
  249. package/dist/web/client/src/hooks/useSessions.d.ts.map +1 -0
  250. package/dist/web/client/src/hooks/useSessions.js +49 -0
  251. package/dist/web/client/src/hooks/useSessions.js.map +1 -0
  252. package/dist/web/client/src/hooks/useWorktrees.d.ts +17 -0
  253. package/dist/web/client/src/hooks/useWorktrees.d.ts.map +1 -0
  254. package/dist/web/client/src/hooks/useWorktrees.js +41 -0
  255. package/dist/web/client/src/hooks/useWorktrees.js.map +1 -0
  256. package/dist/web/client/src/lib/api.d.ts +82 -0
  257. package/dist/web/client/src/lib/api.d.ts.map +1 -0
  258. package/dist/web/client/src/lib/api.js +147 -0
  259. package/dist/web/client/src/lib/api.js.map +1 -0
  260. package/dist/web/client/src/lib/websocket.d.ts +52 -0
  261. package/dist/web/client/src/lib/websocket.d.ts.map +1 -0
  262. package/dist/web/client/src/lib/websocket.js +137 -0
  263. package/dist/web/client/src/lib/websocket.js.map +1 -0
  264. package/dist/web/client/src/main.d.ts +2 -0
  265. package/dist/web/client/src/main.d.ts.map +1 -0
  266. package/dist/web/client/src/main.js +23 -0
  267. package/dist/web/client/src/main.js.map +1 -0
  268. package/dist/web/client/src/pages/BranchDetailPage.d.ts +3 -0
  269. package/dist/web/client/src/pages/BranchDetailPage.d.ts.map +1 -0
  270. package/dist/web/client/src/pages/BranchDetailPage.js +519 -0
  271. package/dist/web/client/src/pages/BranchDetailPage.js.map +1 -0
  272. package/dist/web/client/src/pages/BranchListPage.d.ts +3 -0
  273. package/dist/web/client/src/pages/BranchListPage.d.ts.map +1 -0
  274. package/dist/web/client/src/pages/BranchListPage.js +150 -0
  275. package/dist/web/client/src/pages/BranchListPage.js.map +1 -0
  276. package/dist/web/client/src/pages/ConfigManagementPage.d.ts +3 -0
  277. package/dist/web/client/src/pages/ConfigManagementPage.d.ts.map +1 -0
  278. package/dist/web/client/src/pages/ConfigManagementPage.js +125 -0
  279. package/dist/web/client/src/pages/ConfigManagementPage.js.map +1 -0
  280. package/dist/web/client/src/router.d.ts +9 -0
  281. package/dist/web/client/src/router.d.ts.map +1 -0
  282. package/dist/web/client/src/router.js +27 -0
  283. package/dist/web/client/src/router.js.map +1 -0
  284. package/dist/web/client/vite.config.d.ts +3 -0
  285. package/dist/web/client/vite.config.d.ts.map +1 -0
  286. package/dist/web/client/vite.config.js +21 -0
  287. package/dist/web/client/vite.config.js.map +1 -0
  288. package/dist/web/server/env/importer.d.ts +3 -0
  289. package/dist/web/server/env/importer.d.ts.map +1 -0
  290. package/dist/web/server/env/importer.js +47 -0
  291. package/dist/web/server/env/importer.js.map +1 -0
  292. package/dist/web/server/index.d.ts +11 -0
  293. package/dist/web/server/index.d.ts.map +1 -0
  294. package/dist/web/server/index.js +62 -0
  295. package/dist/web/server/index.js.map +1 -0
  296. package/dist/web/server/pty/manager.d.ts +50 -0
  297. package/dist/web/server/pty/manager.d.ts.map +1 -0
  298. package/dist/web/server/pty/manager.js +143 -0
  299. package/dist/web/server/pty/manager.js.map +1 -0
  300. package/dist/web/server/routes/branches.d.ts +11 -0
  301. package/dist/web/server/routes/branches.d.ts.map +1 -0
  302. package/dist/web/server/routes/branches.js +97 -0
  303. package/dist/web/server/routes/branches.js.map +1 -0
  304. package/dist/web/server/routes/config.d.ts +6 -0
  305. package/dist/web/server/routes/config.d.ts.map +1 -0
  306. package/dist/web/server/routes/config.js +162 -0
  307. package/dist/web/server/routes/config.js.map +1 -0
  308. package/dist/web/server/routes/index.d.ts +13 -0
  309. package/dist/web/server/routes/index.d.ts.map +1 -0
  310. package/dist/web/server/routes/index.js +29 -0
  311. package/dist/web/server/routes/index.js.map +1 -0
  312. package/dist/web/server/routes/sessions.d.ts +12 -0
  313. package/dist/web/server/routes/sessions.d.ts.map +1 -0
  314. package/dist/web/server/routes/sessions.js +95 -0
  315. package/dist/web/server/routes/sessions.js.map +1 -0
  316. package/dist/web/server/routes/worktrees.d.ts +11 -0
  317. package/dist/web/server/routes/worktrees.d.ts.map +1 -0
  318. package/dist/web/server/routes/worktrees.js +80 -0
  319. package/dist/web/server/routes/worktrees.js.map +1 -0
  320. package/dist/web/server/services/branches.d.ts +17 -0
  321. package/dist/web/server/services/branches.d.ts.map +1 -0
  322. package/dist/web/server/services/branches.js +262 -0
  323. package/dist/web/server/services/branches.js.map +1 -0
  324. package/dist/web/server/services/worktrees.d.ts +24 -0
  325. package/dist/web/server/services/worktrees.d.ts.map +1 -0
  326. package/dist/web/server/services/worktrees.js +60 -0
  327. package/dist/web/server/services/worktrees.js.map +1 -0
  328. package/dist/web/server/websocket/handler.d.ts +41 -0
  329. package/dist/web/server/websocket/handler.d.ts.map +1 -0
  330. package/dist/web/server/websocket/handler.js +143 -0
  331. package/dist/web/server/websocket/handler.js.map +1 -0
  332. package/dist/worktree.d.ts +53 -0
  333. package/dist/worktree.d.ts.map +1 -0
  334. package/dist/worktree.js +489 -0
  335. package/dist/worktree.js.map +1 -0
  336. package/package.json +1 -1
@@ -0,0 +1,81 @@
1
+ var Jy=Object.defineProperty;var qv=s=>{throw TypeError(s)};var e0=(s,n,c)=>n in s?Jy(s,n,{enumerable:!0,configurable:!0,writable:!0,value:c}):s[n]=c;var Mo=(s,n,c)=>e0(s,typeof n!="symbol"?n+"":n,c),ah=(s,n,c)=>n.has(s)||qv("Cannot "+c);var G=(s,n,c)=>(ah(s,n,"read from private field"),c?c.call(s):n.get(s)),Me=(s,n,c)=>n.has(s)?qv("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,c),Ce=(s,n,c,g)=>(ah(s,n,"write to private field"),g?g.call(s,c):n.set(s,c),c),Fe=(s,n,c)=>(ah(s,n,"access private method"),c);var Lo=(s,n,c,g)=>({set _(w){Ce(s,n,w,c)},get _(){return G(s,n,g)}});(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const w of document.querySelectorAll('link[rel="modulepreload"]'))g(w);new MutationObserver(w=>{for(const T of w)if(T.type==="childList")for(const M of T.addedNodes)M.tagName==="LINK"&&M.rel==="modulepreload"&&g(M)}).observe(document,{childList:!0,subtree:!0});function c(w){const T={};return w.integrity&&(T.integrity=w.integrity),w.referrerPolicy&&(T.referrerPolicy=w.referrerPolicy),w.crossOrigin==="use-credentials"?T.credentials="include":w.crossOrigin==="anonymous"?T.credentials="omit":T.credentials="same-origin",T}function g(w){if(w.ep)return;w.ep=!0;const T=c(w);fetch(w.href,T)}})();function tg(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var lh={exports:{}},Va={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Kv;function t0(){if(Kv)return Va;Kv=1;var s=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function c(g,w,T){var M=null;if(T!==void 0&&(M=""+T),w.key!==void 0&&(M=""+w.key),"key"in w){T={};for(var o in w)o!=="key"&&(T[o]=w[o])}else T=w;return w=T.ref,{$$typeof:s,type:g,key:M,ref:w!==void 0?w:null,props:T}}return Va.Fragment=n,Va.jsx=c,Va.jsxs=c,Va}var Wv;function i0(){return Wv||(Wv=1,lh.exports=t0()),lh.exports}var N=i0(),oh={exports:{}},ze={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Yv;function r0(){if(Yv)return ze;Yv=1;var s=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),M=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),y=Symbol.iterator;function S(O){return O===null||typeof O!="object"?null:(O=y&&O[y]||O["@@iterator"],typeof O=="function"?O:null)}var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,l={};function h(O,j,X){this.props=O,this.context=j,this.refs=l,this.updater=X||A}h.prototype.isReactComponent={},h.prototype.setState=function(O,j){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,j,"setState")},h.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function u(){}u.prototype=h.prototype;function f(O,j,X){this.props=O,this.context=j,this.refs=l,this.updater=X||A}var E=f.prototype=new u;E.constructor=f,b(E,h.prototype),E.isPureReactComponent=!0;var R=Array.isArray;function L(){}var x={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function B(O,j,X){var te=X.ref;return{$$typeof:s,type:O,key:j,ref:te!==void 0?te:null,props:X}}function z(O,j){return B(O.type,j,O.props)}function I(O){return typeof O=="object"&&O!==null&&O.$$typeof===s}function F(O){var j={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(X){return j[X]})}var Q=/\/+/g;function ce(O,j){return typeof O=="object"&&O!==null&&O.key!=null?F(""+O.key):j.toString(36)}function ae(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(L,L):(O.status="pending",O.then(function(j){O.status==="pending"&&(O.status="fulfilled",O.value=j)},function(j){O.status==="pending"&&(O.status="rejected",O.reason=j)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function q(O,j,X,te,ve){var Y=typeof O;(Y==="undefined"||Y==="boolean")&&(O=null);var ie=!1;if(O===null)ie=!0;else switch(Y){case"bigint":case"string":case"number":ie=!0;break;case"object":switch(O.$$typeof){case s:case n:ie=!0;break;case p:return ie=O._init,q(ie(O._payload),j,X,te,ve)}}if(ie)return ve=ve(O),ie=te===""?"."+ce(O,0):te,R(ve)?(X="",ie!=null&&(X=ie.replace(Q,"$&/")+"/"),q(ve,j,X,"",function(Se){return Se})):ve!=null&&(I(ve)&&(ve=z(ve,X+(ve.key==null||O&&O.key===ve.key?"":(""+ve.key).replace(Q,"$&/")+"/")+ie)),j.push(ve)),1;ie=0;var P=te===""?".":te+":";if(R(O))for(var le=0;le<O.length;le++)te=O[le],Y=P+ce(te,le),ie+=q(te,j,X,Y,ve);else if(le=S(O),typeof le=="function")for(O=le.call(O),le=0;!(te=O.next()).done;)te=te.value,Y=P+ce(te,le++),ie+=q(te,j,X,Y,ve);else if(Y==="object"){if(typeof O.then=="function")return q(ae(O),j,X,te,ve);throw j=String(O),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.")}return ie}function J(O,j,X){if(O==null)return O;var te=[],ve=0;return q(O,te,"","",function(Y){return j.call(X,Y,ve++)}),te}function he(O){if(O._status===-1){var j=O._result;j=j(),j.then(function(X){(O._status===0||O._status===-1)&&(O._status=1,O._result=X)},function(X){(O._status===0||O._status===-1)&&(O._status=2,O._result=X)}),O._status===-1&&(O._status=0,O._result=j)}if(O._status===1)return O._result.default;throw O._result}var k=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var j=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(j))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},U={map:J,forEach:function(O,j,X){J(O,function(){j.apply(this,arguments)},X)},count:function(O){var j=0;return J(O,function(){j++}),j},toArray:function(O){return J(O,function(j){return j})||[]},only:function(O){if(!I(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return ze.Activity=m,ze.Children=U,ze.Component=h,ze.Fragment=c,ze.Profiler=w,ze.PureComponent=f,ze.StrictMode=g,ze.Suspense=_,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,ze.__COMPILER_RUNTIME={__proto__:null,c:function(O){return x.H.useMemoCache(O)}},ze.cache=function(O){return function(){return O.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(O,j,X){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var te=b({},O.props),ve=O.key;if(j!=null)for(Y in j.key!==void 0&&(ve=""+j.key),j)!C.call(j,Y)||Y==="key"||Y==="__self"||Y==="__source"||Y==="ref"&&j.ref===void 0||(te[Y]=j[Y]);var Y=arguments.length-2;if(Y===1)te.children=X;else if(1<Y){for(var ie=Array(Y),P=0;P<Y;P++)ie[P]=arguments[P+2];te.children=ie}return B(O.type,ve,te)},ze.createContext=function(O){return O={$$typeof:M,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:T,_context:O},O},ze.createElement=function(O,j,X){var te,ve={},Y=null;if(j!=null)for(te in j.key!==void 0&&(Y=""+j.key),j)C.call(j,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ve[te]=j[te]);var ie=arguments.length-2;if(ie===1)ve.children=X;else if(1<ie){for(var P=Array(ie),le=0;le<ie;le++)P[le]=arguments[le+2];ve.children=P}if(O&&O.defaultProps)for(te in ie=O.defaultProps,ie)ve[te]===void 0&&(ve[te]=ie[te]);return B(O,Y,ve)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(O){return{$$typeof:o,render:O}},ze.isValidElement=I,ze.lazy=function(O){return{$$typeof:p,_payload:{_status:-1,_result:O},_init:he}},ze.memo=function(O,j){return{$$typeof:d,type:O,compare:j===void 0?null:j}},ze.startTransition=function(O){var j=x.T,X={};x.T=X;try{var te=O(),ve=x.S;ve!==null&&ve(X,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(L,k)}catch(Y){k(Y)}finally{j!==null&&X.types!==null&&(j.types=X.types),x.T=j}},ze.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},ze.use=function(O){return x.H.use(O)},ze.useActionState=function(O,j,X){return x.H.useActionState(O,j,X)},ze.useCallback=function(O,j){return x.H.useCallback(O,j)},ze.useContext=function(O){return x.H.useContext(O)},ze.useDebugValue=function(){},ze.useDeferredValue=function(O,j){return x.H.useDeferredValue(O,j)},ze.useEffect=function(O,j){return x.H.useEffect(O,j)},ze.useEffectEvent=function(O){return x.H.useEffectEvent(O)},ze.useId=function(){return x.H.useId()},ze.useImperativeHandle=function(O,j,X){return x.H.useImperativeHandle(O,j,X)},ze.useInsertionEffect=function(O,j){return x.H.useInsertionEffect(O,j)},ze.useLayoutEffect=function(O,j){return x.H.useLayoutEffect(O,j)},ze.useMemo=function(O,j){return x.H.useMemo(O,j)},ze.useOptimistic=function(O,j){return x.H.useOptimistic(O,j)},ze.useReducer=function(O,j,X){return x.H.useReducer(O,j,X)},ze.useRef=function(O){return x.H.useRef(O)},ze.useState=function(O){return x.H.useState(O)},ze.useSyncExternalStore=function(O,j,X){return x.H.useSyncExternalStore(O,j,X)},ze.useTransition=function(){return x.H.useTransition()},ze.version="19.2.0",ze}var Gv;function Ph(){return Gv||(Gv=1,oh.exports=r0()),oh.exports}var $=Ph();const s0=tg($);var ch={exports:{}},Xa={},uh={exports:{}},hh={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Qv;function n0(){return Qv||(Qv=1,(function(s){function n(q,J){var he=q.length;q.push(J);e:for(;0<he;){var k=he-1>>>1,U=q[k];if(0<w(U,J))q[k]=J,q[he]=U,he=k;else break e}}function c(q){return q.length===0?null:q[0]}function g(q){if(q.length===0)return null;var J=q[0],he=q.pop();if(he!==J){q[0]=he;e:for(var k=0,U=q.length,O=U>>>1;k<O;){var j=2*(k+1)-1,X=q[j],te=j+1,ve=q[te];if(0>w(X,he))te<U&&0>w(ve,X)?(q[k]=ve,q[te]=he,k=te):(q[k]=X,q[j]=he,k=j);else if(te<U&&0>w(ve,he))q[k]=ve,q[te]=he,k=te;else break e}}return J}function w(q,J){var he=q.sortIndex-J.sortIndex;return he!==0?he:q.id-J.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var T=performance;s.unstable_now=function(){return T.now()}}else{var M=Date,o=M.now();s.unstable_now=function(){return M.now()-o}}var _=[],d=[],p=1,m=null,y=3,S=!1,A=!1,b=!1,l=!1,h=typeof setTimeout=="function"?setTimeout:null,u=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;function E(q){for(var J=c(d);J!==null;){if(J.callback===null)g(d);else if(J.startTime<=q)g(d),J.sortIndex=J.expirationTime,n(_,J);else break;J=c(d)}}function R(q){if(b=!1,E(q),!A)if(c(_)!==null)A=!0,L||(L=!0,F());else{var J=c(d);J!==null&&ae(R,J.startTime-q)}}var L=!1,x=-1,C=5,B=-1;function z(){return l?!0:!(s.unstable_now()-B<C)}function I(){if(l=!1,L){var q=s.unstable_now();B=q;var J=!0;try{e:{A=!1,b&&(b=!1,u(x),x=-1),S=!0;var he=y;try{t:{for(E(q),m=c(_);m!==null&&!(m.expirationTime>q&&z());){var k=m.callback;if(typeof k=="function"){m.callback=null,y=m.priorityLevel;var U=k(m.expirationTime<=q);if(q=s.unstable_now(),typeof U=="function"){m.callback=U,E(q),J=!0;break t}m===c(_)&&g(_),E(q)}else g(_);m=c(_)}if(m!==null)J=!0;else{var O=c(d);O!==null&&ae(R,O.startTime-q),J=!1}}break e}finally{m=null,y=he,S=!1}J=void 0}}finally{J?F():L=!1}}}var F;if(typeof f=="function")F=function(){f(I)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,ce=Q.port2;Q.port1.onmessage=I,F=function(){ce.postMessage(null)}}else F=function(){h(I,0)};function ae(q,J){x=h(function(){q(s.unstable_now())},J)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(q){q.callback=null},s.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<q?Math.floor(1e3/q):5},s.unstable_getCurrentPriorityLevel=function(){return y},s.unstable_next=function(q){switch(y){case 1:case 2:case 3:var J=3;break;default:J=y}var he=y;y=J;try{return q()}finally{y=he}},s.unstable_requestPaint=function(){l=!0},s.unstable_runWithPriority=function(q,J){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var he=y;y=q;try{return J()}finally{y=he}},s.unstable_scheduleCallback=function(q,J,he){var k=s.unstable_now();switch(typeof he=="object"&&he!==null?(he=he.delay,he=typeof he=="number"&&0<he?k+he:k):he=k,q){case 1:var U=-1;break;case 2:U=250;break;case 5:U=1073741823;break;case 4:U=1e4;break;default:U=5e3}return U=he+U,q={id:p++,callback:J,priorityLevel:q,startTime:he,expirationTime:U,sortIndex:-1},he>k?(q.sortIndex=he,n(d,q),c(_)===null&&q===c(d)&&(b?(u(x),x=-1):b=!0,ae(R,he-k))):(q.sortIndex=U,n(_,q),A||S||(A=!0,L||(L=!0,F()))),q},s.unstable_shouldYield=z,s.unstable_wrapCallback=function(q){var J=y;return function(){var he=y;y=J;try{return q.apply(this,arguments)}finally{y=he}}}})(hh)),hh}var Vv;function a0(){return Vv||(Vv=1,uh.exports=n0()),uh.exports}var fh={exports:{}},Wt={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Xv;function l0(){if(Xv)return Wt;Xv=1;var s=Ph();function n(_){var d="https://react.dev/errors/"+_;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)d+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+_+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(){}var g={d:{f:c,r:function(){throw Error(n(522))},D:c,C:c,L:c,m:c,X:c,S:c,M:c},p:0,findDOMNode:null},w=Symbol.for("react.portal");function T(_,d,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:w,key:m==null?null:""+m,children:_,containerInfo:d,implementation:p}}var M=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(_,d){if(_==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Wt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=g,Wt.createPortal=function(_,d){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(n(299));return T(_,d,null,p)},Wt.flushSync=function(_){var d=M.T,p=g.p;try{if(M.T=null,g.p=2,_)return _()}finally{M.T=d,g.p=p,g.d.f()}},Wt.preconnect=function(_,d){typeof _=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,g.d.C(_,d))},Wt.prefetchDNS=function(_){typeof _=="string"&&g.d.D(_)},Wt.preinit=function(_,d){if(typeof _=="string"&&d&&typeof d.as=="string"){var p=d.as,m=o(p,d.crossOrigin),y=typeof d.integrity=="string"?d.integrity:void 0,S=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;p==="style"?g.d.S(_,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:y,fetchPriority:S}):p==="script"&&g.d.X(_,{crossOrigin:m,integrity:y,fetchPriority:S,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Wt.preinitModule=function(_,d){if(typeof _=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var p=o(d.as,d.crossOrigin);g.d.M(_,{crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&g.d.M(_)},Wt.preload=function(_,d){if(typeof _=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var p=d.as,m=o(p,d.crossOrigin);g.d.L(_,p,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},Wt.preloadModule=function(_,d){if(typeof _=="string")if(d){var p=o(d.as,d.crossOrigin);g.d.m(_,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:p,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else g.d.m(_)},Wt.requestFormReset=function(_){g.d.r(_)},Wt.unstable_batchedUpdates=function(_,d){return _(d)},Wt.useFormState=function(_,d,p){return M.H.useFormState(_,d,p)},Wt.useFormStatus=function(){return M.H.useHostTransitionStatus()},Wt.version="19.2.0",Wt}var $v;function ig(){if($v)return fh.exports;$v=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(n){console.error(n)}}return s(),fh.exports=l0(),fh.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Zv;function o0(){if(Zv)return Xa;Zv=1;var s=a0(),n=Ph(),c=ig();function g(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function w(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function T(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function M(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function o(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function _(e){if(T(e)!==e)throw Error(g(188))}function d(e){var t=e.alternate;if(!t){if(t=T(e),t===null)throw Error(g(188));return t!==e?null:e}for(var i=e,r=t;;){var a=i.return;if(a===null)break;var v=a.alternate;if(v===null){if(r=a.return,r!==null){i=r;continue}break}if(a.child===v.child){for(v=a.child;v;){if(v===i)return _(a),e;if(v===r)return _(a),t;v=v.sibling}throw Error(g(188))}if(i.return!==r.return)i=a,r=v;else{for(var D=!1,H=a.child;H;){if(H===i){D=!0,i=a,r=v;break}if(H===r){D=!0,r=a,i=v;break}H=H.sibling}if(!D){for(H=v.child;H;){if(H===i){D=!0,i=v,r=a;break}if(H===r){D=!0,r=v,i=a;break}H=H.sibling}if(!D)throw Error(g(189))}}if(i.alternate!==r)throw Error(g(190))}if(i.tag!==3)throw Error(g(188));return i.stateNode.current===i?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),A=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),f=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function F(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Symbol.for("react.client.reference");function ce(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case b:return"Fragment";case h:return"Profiler";case l:return"StrictMode";case R:return"Suspense";case L:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case A:return"Portal";case f:return e.displayName||"Context";case u:return(e._context.displayName||"Context")+".Consumer";case E:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case x:return t=e.displayName||null,t!==null?t:ce(e.type)||"Memo";case C:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var ae=Array.isArray,q=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=c.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},k=[],U=-1;function O(e){return{current:e}}function j(e){0>U||(e.current=k[U],k[U]=null,U--)}function X(e,t){U++,k[U]=e.current,e.current=t}var te=O(null),ve=O(null),Y=O(null),ie=O(null);function P(e,t){switch(X(Y,t),X(ve,e),X(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fv(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fv(t),e=dv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(te),X(te,e)}function le(){j(te),j(ve),j(Y)}function Se(e){e.memoizedState!==null&&X(ie,e);var t=te.current,i=dv(t,e.type);t!==i&&(X(ve,e),X(te,i))}function ue(e){ve.current===e&&(j(te),j(ve)),ie.current===e&&(j(ie),Wa._currentValue=he)}var Xe,He;function ge(e){if(Xe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Xe=t&&t[1]||"",He=-1<i.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+Xe+e+He}var Ne=!1;function mt(e,t){if(!e||Ne)return"";Ne=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(fe){var ne=fe}Reflect.construct(e,[],me)}else{try{me.call()}catch(fe){ne=fe}e.call(me.prototype)}}else{try{throw Error()}catch(fe){ne=fe}(me=e())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(fe){if(fe&&ne&&typeof fe.stack=="string")return[fe.stack,ne.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=r.DetermineComponentFrameRoot(),D=v[0],H=v[1];if(D&&H){var K=D.split(`
44
+ `),se=H.split(`
45
+ `);for(a=r=0;r<K.length&&!K[r].includes("DetermineComponentFrameRoot");)r++;for(;a<se.length&&!se[a].includes("DetermineComponentFrameRoot");)a++;if(r===K.length||a===se.length)for(r=K.length-1,a=se.length-1;1<=r&&0<=a&&K[r]!==se[a];)a--;for(;1<=r&&0<=a;r--,a--)if(K[r]!==se[a]){if(r!==1||a!==1)do if(r--,a--,0>a||K[r]!==se[a]){var de=`
46
+ `+K[r].replace(" at new "," at ");return e.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",e.displayName)),de}while(1<=r&&0<=a);break}}}finally{Ne=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ge(i):""}function Be(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge("Lazy");case 13:return e.child!==t&&t!==null?ge("Suspense Fallback"):ge("Suspense");case 19:return ge("SuspenseList");case 0:case 15:return mt(e.type,!1);case 11:return mt(e.type.render,!1);case 1:return mt(e.type,!0);case 31:return ge("Activity");default:return""}}function ti(e){try{var t="",i=null;do t+=Be(e,i),i=e,e=e.return;while(e);return t}catch(r){return`
47
+ Error generating stack: `+r.message+`
48
+ `+r.stack}}var bi=Object.prototype.hasOwnProperty,lr=s.unstable_scheduleCallback,or=s.unstable_cancelCallback,kr=s.unstable_shouldYield,St=s.unstable_requestPaint,dt=s.unstable_now,Yt=s.unstable_getCurrentPriorityLevel,Ci=s.unstable_ImmediatePriority,It=s.unstable_UserBlockingPriority,yt=s.unstable_NormalPriority,cr=s.unstable_LowPriority,fi=s.unstable_IdlePriority,Pi=s.log,ut=s.unstable_setDisableYieldValue,jt=null,qt=null;function Fi(e){if(typeof Pi=="function"&&ut(e),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(jt,e)}catch{}}var Kt=Math.clz32?Math.clz32:nn,$o=Math.log,gl=Math.LN2;function nn(e){return e>>>=0,e===0?32:31-($o(e)/gl|0)|0}var Es=256,Hr=262144,an=4194304;function Vi(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ln(e,t,i){var r=e.pendingLanes;if(r===0)return 0;var a=0,v=e.suspendedLanes,D=e.pingedLanes;e=e.warmLanes;var H=r&134217727;return H!==0?(r=H&~v,r!==0?a=Vi(r):(D&=H,D!==0?a=Vi(D):i||(i=H&~e,i!==0&&(a=Vi(i))))):(H=r&~v,H!==0?a=Vi(H):D!==0?a=Vi(D):i||(i=r&~e,i!==0&&(a=Vi(i)))),a===0?0:t!==0&&t!==a&&(t&v)===0&&(v=a&-a,i=t&-t,v>=i||v===32&&(i&4194048)!==0)?t:a}function Nr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function on(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ws(){var e=an;return an<<=1,(an&62914560)===0&&(an=4194304),e}function cn(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function xs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Zo(e,t,i,r,a,v){var D=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var H=e.entanglements,K=e.expirationTimes,se=e.hiddenUpdates;for(i=D&~i;0<i;){var de=31-Kt(i),me=1<<de;H[de]=0,K[de]=-1;var ne=se[de];if(ne!==null)for(se[de]=null,de=0;de<ne.length;de++){var fe=ne[de];fe!==null&&(fe.lane&=-536870913)}i&=~me}r!==0&&W(e,r,0),v!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=v&~(D&~t))}function W(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Kt(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function Z(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var r=31-Kt(i),a=1<<r;a&t|e[r]&t&&(e[r]|=t),i&=~a}}function oe(e,t){var i=t&-t;return i=(i&42)!==0?1:pe(i),(i&(e.suspendedLanes|t))!==0?0:i}function pe(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 ye(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function De(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Nv(e.type))}function Ae(e,t){var i=J.p;try{return J.p=e,t()}finally{J.p=i}}var Ee=Math.random().toString(36).slice(2),be="__reactFiber$"+Ee,we="__reactProps$"+Ee,Le="__reactContainer$"+Ee,Te="__reactEvents$"+Ee,je="__reactListeners$"+Ee,at="__reactHandles$"+Ee,bt="__reactResources$"+Ee,gt="__reactMarker$"+Ee;function it(e){delete e[be],delete e[we],delete e[Te],delete e[je],delete e[at]}function $e(e){var t=e[be];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Le]||i[be]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Sv(e);e!==null;){if(i=e[be])return i;e=Sv(e)}return t}e=i,i=e.parentNode}return null}function ii(e){if(e=e[be]||e[Le]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ii(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(g(33))}function Gt(e){var t=e[bt];return t||(t=e[bt]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function rt(e){e[gt]=!0}var un=new Set,jr={};function Qt(e,t){qi(e,t),qi(e+"Capture",t)}function qi(e,t){for(jr[e]=t,e=0;e<t.length;e++)un.add(t[e])}var hn=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]*$"),We={},Ot={};function zr(e){return bi.call(Ot,e)?!0:bi.call(We,e)?!1:hn.test(e)?Ot[e]=!0:(We[e]=!0,!1)}function Ei(e,t,i){if(zr(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function ht(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function ri(e,t,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+r)}}function Vt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pl(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yg(e,t,i){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,v=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(D){i=""+D,v.call(this,D)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(D){i=""+D},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jo(e){if(!e._valueTracker){var t=pl(e)?"checked":"value";e._valueTracker=Yg(e,t,""+e[t])}}function nf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),r="";return e&&(r=pl(e)?e.checked?"true":"false":e.value),e=r,e!==i?(t.setValue(e),!0):!1}function yl(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 Gg=/[\n"\\]/g;function wi(e){return e.replace(Gg,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ec(e,t,i,r,a,v,D,H){e.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?e.type=D:e.removeAttribute("type"),t!=null?D==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Vt(t)):e.value!==""+Vt(t)&&(e.value=""+Vt(t)):D!=="submit"&&D!=="reset"||e.removeAttribute("value"),t!=null?tc(e,D,Vt(t)):i!=null?tc(e,D,Vt(i)):r!=null&&e.removeAttribute("value"),a==null&&v!=null&&(e.defaultChecked=!!v),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?e.name=""+Vt(H):e.removeAttribute("name")}function af(e,t,i,r,a,v,D,H){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.type=v),t!=null||i!=null){if(!(v!=="submit"&&v!=="reset"||t!=null)){Jo(e);return}i=i!=null?""+Vt(i):"",t=t!=null?""+Vt(t):i,H||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=H?e.checked:!!r,e.defaultChecked=!!r,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(e.name=D),Jo(e)}function tc(e,t,i){t==="number"&&yl(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function fn(e,t,i,r){if(e=e.options,t){t={};for(var a=0;a<i.length;a++)t["$"+i[a]]=!0;for(i=0;i<e.length;i++)a=t.hasOwnProperty("$"+e[i].value),e[i].selected!==a&&(e[i].selected=a),a&&r&&(e[i].defaultSelected=!0)}else{for(i=""+Vt(i),t=null,a=0;a<e.length;a++){if(e[a].value===i){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function lf(e,t,i){if(t!=null&&(t=""+Vt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Vt(i):""}function of(e,t,i,r){if(t==null){if(r!=null){if(i!=null)throw Error(g(92));if(ae(r)){if(1<r.length)throw Error(g(93));r=r[0]}i=r}i==null&&(i=""),t=i}i=Vt(t),e.defaultValue=i,r=e.textContent,r===i&&r!==""&&r!==null&&(e.value=r),Jo(e)}function dn(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Qg=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 cf(e,t,i){var r=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,i):typeof i!="number"||i===0||Qg.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function uf(e,t,i){if(t!=null&&typeof t!="object")throw Error(g(62));if(e=e.style,i!=null){for(var r in i)!i.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var a in t)r=t[a],t.hasOwnProperty(a)&&i[a]!==r&&cf(e,a,r)}else for(var v in t)t.hasOwnProperty(v)&&cf(e,v,t[v])}function ic(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 Vg=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"]]),Xg=/^[\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 Sl(e){return Xg.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ur(){}var rc=null;function sc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _n=null,vn=null;function hf(e){var t=ii(e);if(t&&(e=t.stateNode)){var i=e[we]||null;e:switch(e=t.stateNode,t.type){case"input":if(ec(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+wi(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var r=i[t];if(r!==e&&r.form===e.form){var a=r[we]||null;if(!a)throw Error(g(90));ec(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<i.length;t++)r=i[t],r.form===e.form&&nf(r)}break e;case"textarea":lf(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&fn(e,!!i.multiple,t,!1)}}}var nc=!1;function ff(e,t,i){if(nc)return e(t,i);nc=!0;try{var r=e(t);return r}finally{if(nc=!1,(_n!==null||vn!==null)&&(lo(),_n&&(t=_n,e=vn,vn=_n=null,hf(t),e)))for(t=0;t<e.length;t++)hf(e[t])}}function oa(e,t){var i=e.stateNode;if(i===null)return null;var r=i[we]||null;if(r===null)return null;i=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(g(231,t,typeof i));return i}var hr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ac=!1;if(hr)try{var ca={};Object.defineProperty(ca,"passive",{get:function(){ac=!0}}),window.addEventListener("test",ca,ca),window.removeEventListener("test",ca,ca)}catch{ac=!1}var Ur=null,lc=null,bl=null;function df(){if(bl)return bl;var e,t=lc,i=t.length,r,a="value"in Ur?Ur.value:Ur.textContent,v=a.length;for(e=0;e<i&&t[e]===a[e];e++);var D=i-e;for(r=1;r<=D&&t[i-r]===a[v-r];r++);return bl=a.slice(e,1<r?1-r:void 0)}function Cl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function El(){return!0}function _f(){return!1}function si(e){function t(i,r,a,v,D){this._reactName=i,this._targetInst=a,this.type=r,this.nativeEvent=v,this.target=D,this.currentTarget=null;for(var H in e)e.hasOwnProperty(H)&&(i=e[H],this[H]=i?i(v):v[H]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?El:_f,this.isPropagationStopped=_f,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=El)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=El)},persist:function(){},isPersistent:El}),t}var Rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wl=si(Rs),ua=m({},Rs,{view:0,detail:0}),$g=si(ua),oc,cc,ha,xl=m({},ua,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hc,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!==ha&&(ha&&e.type==="mousemove"?(oc=e.screenX-ha.screenX,cc=e.screenY-ha.screenY):cc=oc=0,ha=e),oc)},movementY:function(e){return"movementY"in e?e.movementY:cc}}),vf=si(xl),Zg=m({},xl,{dataTransfer:0}),Jg=si(Zg),ep=m({},ua,{relatedTarget:0}),uc=si(ep),tp=m({},Rs,{animationName:0,elapsedTime:0,pseudoElement:0}),ip=si(tp),rp=m({},Rs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sp=si(rp),np=m({},Rs,{data:0}),mf=si(np),ap={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lp={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"},op={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=op[e])?!!t[e]:!1}function hc(){return cp}var up=m({},ua,{key:function(e){if(e.key){var t=ap[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Cl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?lp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hc,charCode:function(e){return e.type==="keypress"?Cl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Cl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hp=si(up),fp=m({},xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gf=si(fp),dp=m({},ua,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hc}),_p=si(dp),vp=m({},Rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),mp=si(vp),gp=m({},xl,{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}),pp=si(gp),yp=m({},Rs,{newState:0,oldState:0}),Sp=si(yp),bp=[9,13,27,32],fc=hr&&"CompositionEvent"in window,fa=null;hr&&"documentMode"in document&&(fa=document.documentMode);var Cp=hr&&"TextEvent"in window&&!fa,pf=hr&&(!fc||fa&&8<fa&&11>=fa),yf=" ",Sf=!1;function bf(e,t){switch(e){case"keyup":return bp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mn=!1;function Ep(e,t){switch(e){case"compositionend":return Cf(t);case"keypress":return t.which!==32?null:(Sf=!0,yf);case"textInput":return e=t.data,e===yf&&Sf?null:e;default:return null}}function wp(e,t){if(mn)return e==="compositionend"||!fc&&bf(e,t)?(e=df(),bl=lc=Ur=null,mn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return pf&&t.locale!=="ko"?null:t.data;default:return null}}var xp={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 Ef(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xp[e.type]:t==="textarea"}function wf(e,t,i,r){_n?vn?vn.push(r):vn=[r]:_n=r,t=vo(t,"onChange"),0<t.length&&(i=new wl("onChange","change",null,i,r),e.push({event:i,listeners:t}))}var da=null,_a=null;function Rp(e){av(e,0)}function Rl(e){var t=Ii(e);if(nf(t))return e}function xf(e,t){if(e==="change")return t}var Rf=!1;if(hr){var dc;if(hr){var _c="oninput"in document;if(!_c){var Df=document.createElement("div");Df.setAttribute("oninput","return;"),_c=typeof Df.oninput=="function"}dc=_c}else dc=!1;Rf=dc&&(!document.documentMode||9<document.documentMode)}function Af(){da&&(da.detachEvent("onpropertychange",Tf),_a=da=null)}function Tf(e){if(e.propertyName==="value"&&Rl(_a)){var t=[];wf(t,_a,e,sc(e)),ff(Rp,t)}}function Dp(e,t,i){e==="focusin"?(Af(),da=t,_a=i,da.attachEvent("onpropertychange",Tf)):e==="focusout"&&Af()}function Ap(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Rl(_a)}function Tp(e,t){if(e==="click")return Rl(t)}function Mp(e,t){if(e==="input"||e==="change")return Rl(t)}function Lp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var di=typeof Object.is=="function"?Object.is:Lp;function va(e,t){if(di(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(r=0;r<i.length;r++){var a=i[r];if(!bi.call(t,a)||!di(e[a],t[a]))return!1}return!0}function Mf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lf(e,t){var i=Mf(e);e=0;for(var r;i;){if(i.nodeType===3){if(r=e+i.textContent.length,e<=t&&r>=t)return{node:i,offset:t-e};e=r}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Mf(i)}}function Of(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Of(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=yl(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=yl(e.document)}return t}function vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Op=hr&&"documentMode"in document&&11>=document.documentMode,gn=null,mc=null,ma=null,gc=!1;function kf(e,t,i){var r=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;gc||gn==null||gn!==yl(r)||(r=gn,"selectionStart"in r&&vc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ma&&va(ma,r)||(ma=r,r=vo(mc,"onSelect"),0<r.length&&(t=new wl("onSelect","select",null,t,i),e.push({event:t,listeners:r}),t.target=gn)))}function Ds(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var pn={animationend:Ds("Animation","AnimationEnd"),animationiteration:Ds("Animation","AnimationIteration"),animationstart:Ds("Animation","AnimationStart"),transitionrun:Ds("Transition","TransitionRun"),transitionstart:Ds("Transition","TransitionStart"),transitioncancel:Ds("Transition","TransitionCancel"),transitionend:Ds("Transition","TransitionEnd")},pc={},Hf={};hr&&(Hf=document.createElement("div").style,"AnimationEvent"in window||(delete pn.animationend.animation,delete pn.animationiteration.animation,delete pn.animationstart.animation),"TransitionEvent"in window||delete pn.transitionend.transition);function As(e){if(pc[e])return pc[e];if(!pn[e])return e;var t=pn[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Hf)return pc[e]=t[i];return e}var Nf=As("animationend"),jf=As("animationiteration"),zf=As("animationstart"),Bp=As("transitionrun"),kp=As("transitionstart"),Hp=As("transitioncancel"),Uf=As("transitionend"),Pf=new Map,yc="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(" ");yc.push("scrollEnd");function Ki(e,t){Pf.set(e,t),Qt(t,[e])}var Dl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},xi=[],yn=0,Sc=0;function Al(){for(var e=yn,t=Sc=yn=0;t<e;){var i=xi[t];xi[t++]=null;var r=xi[t];xi[t++]=null;var a=xi[t];xi[t++]=null;var v=xi[t];if(xi[t++]=null,r!==null&&a!==null){var D=r.pending;D===null?a.next=a:(a.next=D.next,D.next=a),r.pending=a}v!==0&&Ff(i,a,v)}}function Tl(e,t,i,r){xi[yn++]=e,xi[yn++]=t,xi[yn++]=i,xi[yn++]=r,Sc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function bc(e,t,i,r){return Tl(e,t,i,r),Ml(e)}function Ts(e,t){return Tl(e,null,null,t),Ml(e)}function Ff(e,t,i){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i);for(var a=!1,v=e.return;v!==null;)v.childLanes|=i,r=v.alternate,r!==null&&(r.childLanes|=i),v.tag===22&&(e=v.stateNode,e===null||e._visibility&1||(a=!0)),e=v,v=v.return;return e.tag===3?(v=e.stateNode,a&&t!==null&&(a=31-Kt(i),e=v.hiddenUpdates,r=e[a],r===null?e[a]=[t]:r.push(t),t.lane=i|536870912),v):null}function Ml(e){if(50<za)throw za=0,Mu=null,Error(g(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Sn={};function Np(e,t,i,r){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _i(e,t,i,r){return new Np(e,t,i,r)}function Cc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fr(e,t){var i=e.alternate;return i===null?(i=_i(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function If(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ll(e,t,i,r,a,v){var D=0;if(r=e,typeof e=="function")Cc(e)&&(D=1);else if(typeof e=="string")D=Fy(e,i,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=_i(31,i,t,a),e.elementType=B,e.lanes=v,e;case b:return Ms(i.children,a,v,t);case l:D=8,a|=24;break;case h:return e=_i(12,i,t,a|2),e.elementType=h,e.lanes=v,e;case R:return e=_i(13,i,t,a),e.elementType=R,e.lanes=v,e;case L:return e=_i(19,i,t,a),e.elementType=L,e.lanes=v,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case f:D=10;break e;case u:D=9;break e;case E:D=11;break e;case x:D=14;break e;case C:D=16,r=null;break e}D=29,i=Error(g(130,e===null?"null":typeof e,"")),r=null}return t=_i(D,i,t,a),t.elementType=e,t.type=r,t.lanes=v,t}function Ms(e,t,i,r){return e=_i(7,e,r,t),e.lanes=i,e}function Ec(e,t,i){return e=_i(6,e,null,t),e.lanes=i,e}function qf(e){var t=_i(18,null,null,0);return t.stateNode=e,t}function wc(e,t,i){return t=_i(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Kf=new WeakMap;function Ri(e,t){if(typeof e=="object"&&e!==null){var i=Kf.get(e);return i!==void 0?i:(t={value:e,source:t,stack:ti(t)},Kf.set(e,t),t)}return{value:e,source:t,stack:ti(t)}}var bn=[],Cn=0,Ol=null,ga=0,Di=[],Ai=0,Pr=null,Xi=1,$i="";function dr(e,t){bn[Cn++]=ga,bn[Cn++]=Ol,Ol=e,ga=t}function Wf(e,t,i){Di[Ai++]=Xi,Di[Ai++]=$i,Di[Ai++]=Pr,Pr=e;var r=Xi;e=$i;var a=32-Kt(r)-1;r&=~(1<<a),i+=1;var v=32-Kt(t)+a;if(30<v){var D=a-a%5;v=(r&(1<<D)-1).toString(32),r>>=D,a-=D,Xi=1<<32-Kt(t)+a|i<<a|r,$i=v+e}else Xi=1<<v|i<<a|r,$i=e}function xc(e){e.return!==null&&(dr(e,1),Wf(e,1,0))}function Rc(e){for(;e===Ol;)Ol=bn[--Cn],bn[Cn]=null,ga=bn[--Cn],bn[Cn]=null;for(;e===Pr;)Pr=Di[--Ai],Di[Ai]=null,$i=Di[--Ai],Di[Ai]=null,Xi=Di[--Ai],Di[Ai]=null}function Yf(e,t){Di[Ai++]=Xi,Di[Ai++]=$i,Di[Ai++]=Pr,Xi=t.id,$i=t.overflow,Pr=e}var zt=null,_t=null,Qe=!1,Fr=null,Ti=!1,Dc=Error(g(519));function Ir(e){var t=Error(g(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pa(Ri(t,e)),Dc}function Gf(e){var t=e.stateNode,i=e.type,r=e.memoizedProps;switch(t[be]=e,t[we]=r,i){case"dialog":Ke("cancel",t),Ke("close",t);break;case"iframe":case"object":case"embed":Ke("load",t);break;case"video":case"audio":for(i=0;i<Pa.length;i++)Ke(Pa[i],t);break;case"source":Ke("error",t);break;case"img":case"image":case"link":Ke("error",t),Ke("load",t);break;case"details":Ke("toggle",t);break;case"input":Ke("invalid",t),af(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ke("invalid",t);break;case"textarea":Ke("invalid",t),of(t,r.value,r.defaultValue,r.children)}i=r.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||r.suppressHydrationWarning===!0||uv(t.textContent,i)?(r.popover!=null&&(Ke("beforetoggle",t),Ke("toggle",t)),r.onScroll!=null&&Ke("scroll",t),r.onScrollEnd!=null&&Ke("scrollend",t),r.onClick!=null&&(t.onclick=ur),t=!0):t=!1,t||Ir(e,!0)}function Qf(e){for(zt=e.return;zt;)switch(zt.tag){case 5:case 31:case 13:Ti=!1;return;case 27:case 3:Ti=!0;return;default:zt=zt.return}}function En(e){if(e!==zt)return!1;if(!Qe)return Qf(e),Qe=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Wu(e.type,e.memoizedProps)),i=!i),i&&_t&&Ir(e),Qf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(g(317));_t=yv(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(g(317));_t=yv(e)}else t===27?(t=_t,is(e.type)?(e=Xu,Xu=null,_t=e):_t=t):_t=zt?Li(e.stateNode.nextSibling):null;return!0}function Ls(){_t=zt=null,Qe=!1}function Ac(){var e=Fr;return e!==null&&(oi===null?oi=e:oi.push.apply(oi,e),Fr=null),e}function pa(e){Fr===null?Fr=[e]:Fr.push(e)}var Tc=O(null),Os=null,_r=null;function qr(e,t,i){X(Tc,t._currentValue),t._currentValue=i}function vr(e){e._currentValue=Tc.current,j(Tc)}function Mc(e,t,i){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===i)break;e=e.return}}function Lc(e,t,i,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var v=a.dependencies;if(v!==null){var D=a.child;v=v.firstContext;e:for(;v!==null;){var H=v;v=a;for(var K=0;K<t.length;K++)if(H.context===t[K]){v.lanes|=i,H=v.alternate,H!==null&&(H.lanes|=i),Mc(v.return,i,e),r||(D=null);break e}v=H.next}}else if(a.tag===18){if(D=a.return,D===null)throw Error(g(341));D.lanes|=i,v=D.alternate,v!==null&&(v.lanes|=i),Mc(D,i,e),D=null}else D=a.child;if(D!==null)D.return=a;else for(D=a;D!==null;){if(D===e){D=null;break}if(a=D.sibling,a!==null){a.return=D.return,D=a;break}D=D.return}a=D}}function wn(e,t,i,r){e=null;for(var a=t,v=!1;a!==null;){if(!v){if((a.flags&524288)!==0)v=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var D=a.alternate;if(D===null)throw Error(g(387));if(D=D.memoizedProps,D!==null){var H=a.type;di(a.pendingProps.value,D.value)||(e!==null?e.push(H):e=[H])}}else if(a===ie.current){if(D=a.alternate,D===null)throw Error(g(387));D.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Wa):e=[Wa])}a=a.return}e!==null&&Lc(t,e,i,r),t.flags|=262144}function Bl(e){for(e=e.firstContext;e!==null;){if(!di(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Bs(e){Os=e,_r=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ut(e){return Vf(Os,e)}function kl(e,t){return Os===null&&Bs(e),Vf(e,t)}function Vf(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},_r===null){if(e===null)throw Error(g(308));_r=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else _r=_r.next=t;return i}var jp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},zp=s.unstable_scheduleCallback,Up=s.unstable_NormalPriority,At={$$typeof:f,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Oc(){return{controller:new jp,data:new Map,refCount:0}}function ya(e){e.refCount--,e.refCount===0&&zp(Up,function(){e.controller.abort()})}var Sa=null,Bc=0,xn=0,Rn=null;function Pp(e,t){if(Sa===null){var i=Sa=[];Bc=0,xn=Nu(),Rn={status:"pending",value:void 0,then:function(r){i.push(r)}}}return Bc++,t.then(Xf,Xf),t}function Xf(){if(--Bc===0&&Sa!==null){Rn!==null&&(Rn.status="fulfilled");var e=Sa;Sa=null,xn=0,Rn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Fp(e,t){var i=[],r={status:"pending",value:null,reason:null,then:function(a){i.push(a)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var a=0;a<i.length;a++)(0,i[a])(t)},function(a){for(r.status="rejected",r.reason=a,a=0;a<i.length;a++)(0,i[a])(void 0)}),r}var $f=q.S;q.S=function(e,t){k_=dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Pp(e,t),$f!==null&&$f(e,t)};var ks=O(null);function kc(){var e=ks.current;return e!==null?e:ft.pooledCache}function Hl(e,t){t===null?X(ks,ks.current):X(ks,t.pool)}function Zf(){var e=kc();return e===null?null:{parent:At._currentValue,pool:e}}var Dn=Error(g(460)),Hc=Error(g(474)),Nl=Error(g(542)),jl={then:function(){}};function Jf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ed(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ur,ur),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,id(e),e;default:if(typeof t.status=="string")t.then(ur,ur);else{if(e=ft,e!==null&&100<e.shellSuspendCounter)throw Error(g(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=r}},function(r){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,id(e),e}throw Ns=t,Dn}}function Hs(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ns=i,Dn):i}}var Ns=null;function td(){if(Ns===null)throw Error(g(459));var e=Ns;return Ns=null,e}function id(e){if(e===Dn||e===Nl)throw Error(g(483))}var An=null,ba=0;function zl(e){var t=ba;return ba+=1,An===null&&(An=[]),ed(An,e,t)}function Ca(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ul(e,t){throw t.$$typeof===y?Error(g(525)):(e=Object.prototype.toString.call(t),Error(g(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function rd(e){function t(ee,V){if(e){var re=ee.deletions;re===null?(ee.deletions=[V],ee.flags|=16):re.push(V)}}function i(ee,V){if(!e)return null;for(;V!==null;)t(ee,V),V=V.sibling;return null}function r(ee){for(var V=new Map;ee!==null;)ee.key!==null?V.set(ee.key,ee):V.set(ee.index,ee),ee=ee.sibling;return V}function a(ee,V){return ee=fr(ee,V),ee.index=0,ee.sibling=null,ee}function v(ee,V,re){return ee.index=re,e?(re=ee.alternate,re!==null?(re=re.index,re<V?(ee.flags|=67108866,V):re):(ee.flags|=67108866,V)):(ee.flags|=1048576,V)}function D(ee){return e&&ee.alternate===null&&(ee.flags|=67108866),ee}function H(ee,V,re,_e){return V===null||V.tag!==6?(V=Ec(re,ee.mode,_e),V.return=ee,V):(V=a(V,re),V.return=ee,V)}function K(ee,V,re,_e){var Oe=re.type;return Oe===b?de(ee,V,re.props.children,_e,re.key):V!==null&&(V.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===C&&Hs(Oe)===V.type)?(V=a(V,re.props),Ca(V,re),V.return=ee,V):(V=Ll(re.type,re.key,re.props,null,ee.mode,_e),Ca(V,re),V.return=ee,V)}function se(ee,V,re,_e){return V===null||V.tag!==4||V.stateNode.containerInfo!==re.containerInfo||V.stateNode.implementation!==re.implementation?(V=wc(re,ee.mode,_e),V.return=ee,V):(V=a(V,re.children||[]),V.return=ee,V)}function de(ee,V,re,_e,Oe){return V===null||V.tag!==7?(V=Ms(re,ee.mode,_e,Oe),V.return=ee,V):(V=a(V,re),V.return=ee,V)}function me(ee,V,re){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=Ec(""+V,ee.mode,re),V.return=ee,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case S:return re=Ll(V.type,V.key,V.props,null,ee.mode,re),Ca(re,V),re.return=ee,re;case A:return V=wc(V,ee.mode,re),V.return=ee,V;case C:return V=Hs(V),me(ee,V,re)}if(ae(V)||F(V))return V=Ms(V,ee.mode,re,null),V.return=ee,V;if(typeof V.then=="function")return me(ee,zl(V),re);if(V.$$typeof===f)return me(ee,kl(ee,V),re);Ul(ee,V)}return null}function ne(ee,V,re,_e){var Oe=V!==null?V.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Oe!==null?null:H(ee,V,""+re,_e);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case S:return re.key===Oe?K(ee,V,re,_e):null;case A:return re.key===Oe?se(ee,V,re,_e):null;case C:return re=Hs(re),ne(ee,V,re,_e)}if(ae(re)||F(re))return Oe!==null?null:de(ee,V,re,_e,null);if(typeof re.then=="function")return ne(ee,V,zl(re),_e);if(re.$$typeof===f)return ne(ee,V,kl(ee,re),_e);Ul(ee,re)}return null}function fe(ee,V,re,_e,Oe){if(typeof _e=="string"&&_e!==""||typeof _e=="number"||typeof _e=="bigint")return ee=ee.get(re)||null,H(V,ee,""+_e,Oe);if(typeof _e=="object"&&_e!==null){switch(_e.$$typeof){case S:return ee=ee.get(_e.key===null?re:_e.key)||null,K(V,ee,_e,Oe);case A:return ee=ee.get(_e.key===null?re:_e.key)||null,se(V,ee,_e,Oe);case C:return _e=Hs(_e),fe(ee,V,re,_e,Oe)}if(ae(_e)||F(_e))return ee=ee.get(re)||null,de(V,ee,_e,Oe,null);if(typeof _e.then=="function")return fe(ee,V,re,zl(_e),Oe);if(_e.$$typeof===f)return fe(ee,V,re,kl(V,_e),Oe);Ul(V,_e)}return null}function xe(ee,V,re,_e){for(var Oe=null,Ze=null,Re=V,Pe=V=0,Ge=null;Re!==null&&Pe<re.length;Pe++){Re.index>Pe?(Ge=Re,Re=null):Ge=Re.sibling;var Je=ne(ee,Re,re[Pe],_e);if(Je===null){Re===null&&(Re=Ge);break}e&&Re&&Je.alternate===null&&t(ee,Re),V=v(Je,V,Pe),Ze===null?Oe=Je:Ze.sibling=Je,Ze=Je,Re=Ge}if(Pe===re.length)return i(ee,Re),Qe&&dr(ee,Pe),Oe;if(Re===null){for(;Pe<re.length;Pe++)Re=me(ee,re[Pe],_e),Re!==null&&(V=v(Re,V,Pe),Ze===null?Oe=Re:Ze.sibling=Re,Ze=Re);return Qe&&dr(ee,Pe),Oe}for(Re=r(Re);Pe<re.length;Pe++)Ge=fe(Re,ee,Pe,re[Pe],_e),Ge!==null&&(e&&Ge.alternate!==null&&Re.delete(Ge.key===null?Pe:Ge.key),V=v(Ge,V,Pe),Ze===null?Oe=Ge:Ze.sibling=Ge,Ze=Ge);return e&&Re.forEach(function(ls){return t(ee,ls)}),Qe&&dr(ee,Pe),Oe}function ke(ee,V,re,_e){if(re==null)throw Error(g(151));for(var Oe=null,Ze=null,Re=V,Pe=V=0,Ge=null,Je=re.next();Re!==null&&!Je.done;Pe++,Je=re.next()){Re.index>Pe?(Ge=Re,Re=null):Ge=Re.sibling;var ls=ne(ee,Re,Je.value,_e);if(ls===null){Re===null&&(Re=Ge);break}e&&Re&&ls.alternate===null&&t(ee,Re),V=v(ls,V,Pe),Ze===null?Oe=ls:Ze.sibling=ls,Ze=ls,Re=Ge}if(Je.done)return i(ee,Re),Qe&&dr(ee,Pe),Oe;if(Re===null){for(;!Je.done;Pe++,Je=re.next())Je=me(ee,Je.value,_e),Je!==null&&(V=v(Je,V,Pe),Ze===null?Oe=Je:Ze.sibling=Je,Ze=Je);return Qe&&dr(ee,Pe),Oe}for(Re=r(Re);!Je.done;Pe++,Je=re.next())Je=fe(Re,ee,Pe,Je.value,_e),Je!==null&&(e&&Je.alternate!==null&&Re.delete(Je.key===null?Pe:Je.key),V=v(Je,V,Pe),Ze===null?Oe=Je:Ze.sibling=Je,Ze=Je);return e&&Re.forEach(function(Zy){return t(ee,Zy)}),Qe&&dr(ee,Pe),Oe}function ct(ee,V,re,_e){if(typeof re=="object"&&re!==null&&re.type===b&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case S:e:{for(var Oe=re.key;V!==null;){if(V.key===Oe){if(Oe=re.type,Oe===b){if(V.tag===7){i(ee,V.sibling),_e=a(V,re.props.children),_e.return=ee,ee=_e;break e}}else if(V.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===C&&Hs(Oe)===V.type){i(ee,V.sibling),_e=a(V,re.props),Ca(_e,re),_e.return=ee,ee=_e;break e}i(ee,V);break}else t(ee,V);V=V.sibling}re.type===b?(_e=Ms(re.props.children,ee.mode,_e,re.key),_e.return=ee,ee=_e):(_e=Ll(re.type,re.key,re.props,null,ee.mode,_e),Ca(_e,re),_e.return=ee,ee=_e)}return D(ee);case A:e:{for(Oe=re.key;V!==null;){if(V.key===Oe)if(V.tag===4&&V.stateNode.containerInfo===re.containerInfo&&V.stateNode.implementation===re.implementation){i(ee,V.sibling),_e=a(V,re.children||[]),_e.return=ee,ee=_e;break e}else{i(ee,V);break}else t(ee,V);V=V.sibling}_e=wc(re,ee.mode,_e),_e.return=ee,ee=_e}return D(ee);case C:return re=Hs(re),ct(ee,V,re,_e)}if(ae(re))return xe(ee,V,re,_e);if(F(re)){if(Oe=F(re),typeof Oe!="function")throw Error(g(150));return re=Oe.call(re),ke(ee,V,re,_e)}if(typeof re.then=="function")return ct(ee,V,zl(re),_e);if(re.$$typeof===f)return ct(ee,V,kl(ee,re),_e);Ul(ee,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,V!==null&&V.tag===6?(i(ee,V.sibling),_e=a(V,re),_e.return=ee,ee=_e):(i(ee,V),_e=Ec(re,ee.mode,_e),_e.return=ee,ee=_e),D(ee)):i(ee,V)}return function(ee,V,re,_e){try{ba=0;var Oe=ct(ee,V,re,_e);return An=null,Oe}catch(Re){if(Re===Dn||Re===Nl)throw Re;var Ze=_i(29,Re,null,ee.mode);return Ze.lanes=_e,Ze.return=ee,Ze}finally{}}}var js=rd(!0),sd=rd(!1),Kr=!1;function Nc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function jc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Yr(e,t,i){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(et&2)!==0){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Ml(e),Ff(e,null,i),t}return Tl(e,r,t,i),Ml(e)}function Ea(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Z(e,i)}}function zc(e,t){var i=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,i===r)){var a=null,v=null;if(i=i.firstBaseUpdate,i!==null){do{var D={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};v===null?a=v=D:v=v.next=D,i=i.next}while(i!==null);v===null?a=v=t:v=v.next=t}else a=v=t;i={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:v,shared:r.shared,callbacks:r.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Uc=!1;function wa(){if(Uc){var e=Rn;if(e!==null)throw e}}function xa(e,t,i,r){Uc=!1;var a=e.updateQueue;Kr=!1;var v=a.firstBaseUpdate,D=a.lastBaseUpdate,H=a.shared.pending;if(H!==null){a.shared.pending=null;var K=H,se=K.next;K.next=null,D===null?v=se:D.next=se,D=K;var de=e.alternate;de!==null&&(de=de.updateQueue,H=de.lastBaseUpdate,H!==D&&(H===null?de.firstBaseUpdate=se:H.next=se,de.lastBaseUpdate=K))}if(v!==null){var me=a.baseState;D=0,de=se=K=null,H=v;do{var ne=H.lane&-536870913,fe=ne!==H.lane;if(fe?(Ye&ne)===ne:(r&ne)===ne){ne!==0&&ne===xn&&(Uc=!0),de!==null&&(de=de.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var xe=e,ke=H;ne=t;var ct=i;switch(ke.tag){case 1:if(xe=ke.payload,typeof xe=="function"){me=xe.call(ct,me,ne);break e}me=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ke.payload,ne=typeof xe=="function"?xe.call(ct,me,ne):xe,ne==null)break e;me=m({},me,ne);break e;case 2:Kr=!0}}ne=H.callback,ne!==null&&(e.flags|=64,fe&&(e.flags|=8192),fe=a.callbacks,fe===null?a.callbacks=[ne]:fe.push(ne))}else fe={lane:ne,tag:H.tag,payload:H.payload,callback:H.callback,next:null},de===null?(se=de=fe,K=me):de=de.next=fe,D|=ne;if(H=H.next,H===null){if(H=a.shared.pending,H===null)break;fe=H,H=fe.next,fe.next=null,a.lastBaseUpdate=fe,a.shared.pending=null}}while(!0);de===null&&(K=me),a.baseState=K,a.firstBaseUpdate=se,a.lastBaseUpdate=de,v===null&&(a.shared.lanes=0),$r|=D,e.lanes=D,e.memoizedState=me}}function nd(e,t){if(typeof e!="function")throw Error(g(191,e));e.call(t)}function ad(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)nd(i[e],t)}var Tn=O(null),Pl=O(0);function ld(e,t){e=wr,X(Pl,e),X(Tn,t),wr=e|t.baseLanes}function Pc(){X(Pl,wr),X(Tn,Tn.current)}function Fc(){wr=Pl.current,j(Tn),j(Pl)}var vi=O(null),Mi=null;function Gr(e){var t=e.alternate;X(xt,xt.current&1),X(vi,e),Mi===null&&(t===null||Tn.current!==null||t.memoizedState!==null)&&(Mi=e)}function Ic(e){X(xt,xt.current),X(vi,e),Mi===null&&(Mi=e)}function od(e){e.tag===22?(X(xt,xt.current),X(vi,e),Mi===null&&(Mi=e)):Qr()}function Qr(){X(xt,xt.current),X(vi,vi.current)}function mi(e){j(vi),Mi===e&&(Mi=null),j(xt)}var xt=O(0);function Fl(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Qu(i)||Vu(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mr=0,Ue=null,lt=null,Tt=null,Il=!1,Mn=!1,zs=!1,ql=0,Ra=0,Ln=null,Ip=0;function Ct(){throw Error(g(321))}function qc(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!di(e[i],t[i]))return!1;return!0}function Kc(e,t,i,r,a,v){return mr=v,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,q.H=e===null||e.memoizedState===null?Wd:nu,zs=!1,v=i(r,a),zs=!1,Mn&&(v=ud(t,i,r,a)),cd(e),v}function cd(e){q.H=Ta;var t=lt!==null&&lt.next!==null;if(mr=0,Tt=lt=Ue=null,Il=!1,Ra=0,Ln=null,t)throw Error(g(300));e===null||Mt||(e=e.dependencies,e!==null&&Bl(e)&&(Mt=!0))}function ud(e,t,i,r){Ue=e;var a=0;do{if(Mn&&(Ln=null),Ra=0,Mn=!1,25<=a)throw Error(g(301));if(a+=1,Tt=lt=null,e.updateQueue!=null){var v=e.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}q.H=Yd,v=t(i,r)}while(Mn);return v}function qp(){var e=q.H,t=e.useState()[0];return t=typeof t.then=="function"?Da(t):t,e=e.useState()[0],(lt!==null?lt.memoizedState:null)!==e&&(Ue.flags|=1024),t}function Wc(){var e=ql!==0;return ql=0,e}function Yc(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Gc(e){if(Il){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Il=!1}mr=0,Tt=lt=Ue=null,Mn=!1,Ra=ql=0,Ln=null}function Xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Ue.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function Rt(){if(lt===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=Tt===null?Ue.memoizedState:Tt.next;if(t!==null)Tt=t,lt=e;else{if(e===null)throw Ue.alternate===null?Error(g(467)):Error(g(310));lt=e,e={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},Tt===null?Ue.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function Kl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Da(e){var t=Ra;return Ra+=1,Ln===null&&(Ln=[]),e=ed(Ln,e,t),t=Ue,(Tt===null?t.memoizedState:Tt.next)===null&&(t=t.alternate,q.H=t===null||t.memoizedState===null?Wd:nu),e}function Wl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Da(e);if(e.$$typeof===f)return Ut(e)}throw Error(g(438,String(e)))}function Qc(e){var t=null,i=Ue.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var r=Ue.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Kl(),Ue.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),r=0;r<e;r++)i[r]=z;return t.index++,i}function gr(e,t){return typeof t=="function"?t(e):t}function Yl(e){var t=Rt();return Vc(t,lt,e)}function Vc(e,t,i){var r=e.queue;if(r===null)throw Error(g(311));r.lastRenderedReducer=i;var a=e.baseQueue,v=r.pending;if(v!==null){if(a!==null){var D=a.next;a.next=v.next,v.next=D}t.baseQueue=a=v,r.pending=null}if(v=e.baseState,a===null)e.memoizedState=v;else{t=a.next;var H=D=null,K=null,se=t,de=!1;do{var me=se.lane&-536870913;if(me!==se.lane?(Ye&me)===me:(mr&me)===me){var ne=se.revertLane;if(ne===0)K!==null&&(K=K.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),me===xn&&(de=!0);else if((mr&ne)===ne){se=se.next,ne===xn&&(de=!0);continue}else me={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},K===null?(H=K=me,D=v):K=K.next=me,Ue.lanes|=ne,$r|=ne;me=se.action,zs&&i(v,me),v=se.hasEagerState?se.eagerState:i(v,me)}else ne={lane:me,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},K===null?(H=K=ne,D=v):K=K.next=ne,Ue.lanes|=me,$r|=me;se=se.next}while(se!==null&&se!==t);if(K===null?D=v:K.next=H,!di(v,e.memoizedState)&&(Mt=!0,de&&(i=Rn,i!==null)))throw i;e.memoizedState=v,e.baseState=D,e.baseQueue=K,r.lastRenderedState=v}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Xc(e){var t=Rt(),i=t.queue;if(i===null)throw Error(g(311));i.lastRenderedReducer=e;var r=i.dispatch,a=i.pending,v=t.memoizedState;if(a!==null){i.pending=null;var D=a=a.next;do v=e(v,D.action),D=D.next;while(D!==a);di(v,t.memoizedState)||(Mt=!0),t.memoizedState=v,t.baseQueue===null&&(t.baseState=v),i.lastRenderedState=v}return[v,r]}function hd(e,t,i){var r=Ue,a=Rt(),v=Qe;if(v){if(i===void 0)throw Error(g(407));i=i()}else i=t();var D=!di((lt||a).memoizedState,i);if(D&&(a.memoizedState=i,Mt=!0),a=a.queue,Jc(_d.bind(null,r,a,e),[e]),a.getSnapshot!==t||D||Tt!==null&&Tt.memoizedState.tag&1){if(r.flags|=2048,On(9,{destroy:void 0},dd.bind(null,r,a,i,t),null),ft===null)throw Error(g(349));v||(mr&127)!==0||fd(r,t,i)}return i}function fd(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ue.updateQueue,t===null?(t=Kl(),Ue.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function dd(e,t,i,r){t.value=i,t.getSnapshot=r,vd(t)&&md(e)}function _d(e,t,i){return i(function(){vd(t)&&md(e)})}function vd(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!di(e,i)}catch{return!0}}function md(e){var t=Ts(e,2);t!==null&&ci(t,e,2)}function $c(e){var t=Xt();if(typeof e=="function"){var i=e;if(e=i(),zs){Fi(!0);try{i()}finally{Fi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gr,lastRenderedState:e},t}function gd(e,t,i,r){return e.baseState=i,Vc(e,lt,typeof r=="function"?r:gr)}function Kp(e,t,i,r,a){if(Vl(e))throw Error(g(485));if(e=t.action,e!==null){var v={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){v.listeners.push(D)}};q.T!==null?i(!0):v.isTransition=!1,r(v),i=t.pending,i===null?(v.next=t.pending=v,pd(t,v)):(v.next=i.next,t.pending=i.next=v)}}function pd(e,t){var i=t.action,r=t.payload,a=e.state;if(t.isTransition){var v=q.T,D={};q.T=D;try{var H=i(a,r),K=q.S;K!==null&&K(D,H),yd(e,t,H)}catch(se){Zc(e,t,se)}finally{v!==null&&D.types!==null&&(v.types=D.types),q.T=v}}else try{v=i(a,r),yd(e,t,v)}catch(se){Zc(e,t,se)}}function yd(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){Sd(e,t,r)},function(r){return Zc(e,t,r)}):Sd(e,t,i)}function Sd(e,t,i){t.status="fulfilled",t.value=i,bd(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,pd(e,i)))}function Zc(e,t,i){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=i,bd(t),t=t.next;while(t!==r)}e.action=null}function bd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Cd(e,t){return t}function Ed(e,t){if(Qe){var i=ft.formState;if(i!==null){e:{var r=Ue;if(Qe){if(_t){t:{for(var a=_t,v=Ti;a.nodeType!==8;){if(!v){a=null;break t}if(a=Li(a.nextSibling),a===null){a=null;break t}}v=a.data,a=v==="F!"||v==="F"?a:null}if(a){_t=Li(a.nextSibling),r=a.data==="F!";break e}}Ir(r)}r=!1}r&&(t=i[0])}}return i=Xt(),i.memoizedState=i.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cd,lastRenderedState:t},i.queue=r,i=Id.bind(null,Ue,r),r.dispatch=i,r=$c(!1),v=su.bind(null,Ue,!1,r.queue),r=Xt(),a={state:t,dispatch:null,action:e,pending:null},r.queue=a,i=Kp.bind(null,Ue,a,v,i),a.dispatch=i,r.memoizedState=e,[t,i,!1]}function wd(e){var t=Rt();return xd(t,lt,e)}function xd(e,t,i){if(t=Vc(e,t,Cd)[0],e=Yl(gr)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Da(t)}catch(D){throw D===Dn?Nl:D}else r=t;t=Rt();var a=t.queue,v=a.dispatch;return i!==t.memoizedState&&(Ue.flags|=2048,On(9,{destroy:void 0},Wp.bind(null,a,i),null)),[r,v,e]}function Wp(e,t){e.action=t}function Rd(e){var t=Rt(),i=lt;if(i!==null)return xd(t,i,e);Rt(),t=t.memoizedState,i=Rt();var r=i.queue.dispatch;return i.memoizedState=e,[t,r,!1]}function On(e,t,i,r){return e={tag:e,create:i,deps:r,inst:t,next:null},t=Ue.updateQueue,t===null&&(t=Kl(),Ue.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(r=i.next,i.next=e,e.next=r,t.lastEffect=e),e}function Dd(){return Rt().memoizedState}function Gl(e,t,i,r){var a=Xt();Ue.flags|=e,a.memoizedState=On(1|t,{destroy:void 0},i,r===void 0?null:r)}function Ql(e,t,i,r){var a=Rt();r=r===void 0?null:r;var v=a.memoizedState.inst;lt!==null&&r!==null&&qc(r,lt.memoizedState.deps)?a.memoizedState=On(t,v,i,r):(Ue.flags|=e,a.memoizedState=On(1|t,v,i,r))}function Ad(e,t){Gl(8390656,8,e,t)}function Jc(e,t){Ql(2048,8,e,t)}function Yp(e){Ue.flags|=4;var t=Ue.updateQueue;if(t===null)t=Kl(),Ue.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Td(e){var t=Rt().memoizedState;return Yp({ref:t,nextImpl:e}),function(){if((et&2)!==0)throw Error(g(440));return t.impl.apply(void 0,arguments)}}function Md(e,t){return Ql(4,2,e,t)}function Ld(e,t){return Ql(4,4,e,t)}function Od(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Bd(e,t,i){i=i!=null?i.concat([e]):null,Ql(4,4,Od.bind(null,t,e),i)}function eu(){}function kd(e,t){var i=Rt();t=t===void 0?null:t;var r=i.memoizedState;return t!==null&&qc(t,r[1])?r[0]:(i.memoizedState=[e,t],e)}function Hd(e,t){var i=Rt();t=t===void 0?null:t;var r=i.memoizedState;if(t!==null&&qc(t,r[1]))return r[0];if(r=e(),zs){Fi(!0);try{e()}finally{Fi(!1)}}return i.memoizedState=[r,t],r}function tu(e,t,i){return i===void 0||(mr&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=N_(),Ue.lanes|=e,$r|=e,i)}function Nd(e,t,i,r){return di(i,t)?i:Tn.current!==null?(e=tu(e,i,r),di(e,t)||(Mt=!0),e):(mr&42)===0||(mr&1073741824)!==0&&(Ye&261930)===0?(Mt=!0,e.memoizedState=i):(e=N_(),Ue.lanes|=e,$r|=e,t)}function jd(e,t,i,r,a){var v=J.p;J.p=v!==0&&8>v?v:8;var D=q.T,H={};q.T=H,su(e,!1,t,i);try{var K=a(),se=q.S;if(se!==null&&se(H,K),K!==null&&typeof K=="object"&&typeof K.then=="function"){var de=Fp(K,r);Aa(e,t,de,yi(e))}else Aa(e,t,r,yi(e))}catch(me){Aa(e,t,{then:function(){},status:"rejected",reason:me},yi())}finally{J.p=v,D!==null&&H.types!==null&&(D.types=H.types),q.T=D}}function Gp(){}function iu(e,t,i,r){if(e.tag!==5)throw Error(g(476));var a=zd(e).queue;jd(e,a,t,he,i===null?Gp:function(){return Ud(e),i(r)})}function zd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gr,lastRenderedState:he},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gr,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ud(e){var t=zd(e);t.next===null&&(t=e.alternate.memoizedState),Aa(e,t.next.queue,{},yi())}function ru(){return Ut(Wa)}function Pd(){return Rt().memoizedState}function Fd(){return Rt().memoizedState}function Qp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=yi();e=Wr(i);var r=Yr(t,e,i);r!==null&&(ci(r,t,i),Ea(r,t,i)),t={cache:Oc()},e.payload=t;return}t=t.return}}function Vp(e,t,i){var r=yi();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Vl(e)?qd(t,i):(i=bc(e,t,i,r),i!==null&&(ci(i,e,r),Kd(i,t,r)))}function Id(e,t,i){var r=yi();Aa(e,t,i,r)}function Aa(e,t,i,r){var a={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Vl(e))qd(t,a);else{var v=e.alternate;if(e.lanes===0&&(v===null||v.lanes===0)&&(v=t.lastRenderedReducer,v!==null))try{var D=t.lastRenderedState,H=v(D,i);if(a.hasEagerState=!0,a.eagerState=H,di(H,D))return Tl(e,t,a,0),ft===null&&Al(),!1}catch{}finally{}if(i=bc(e,t,a,r),i!==null)return ci(i,e,r),Kd(i,t,r),!0}return!1}function su(e,t,i,r){if(r={lane:2,revertLane:Nu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vl(e)){if(t)throw Error(g(479))}else t=bc(e,i,r,2),t!==null&&ci(t,e,2)}function Vl(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function qd(e,t){Mn=Il=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Kd(e,t,i){if((i&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,i|=r,t.lanes=i,Z(e,i)}}var Ta={readContext:Ut,use:Wl,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct};Ta.useEffectEvent=Ct;var Wd={readContext:Ut,use:Wl,useCallback:function(e,t){return Xt().memoizedState=[e,t===void 0?null:t],e},useContext:Ut,useEffect:Ad,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Gl(4194308,4,Od.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Gl(4194308,4,e,t)},useInsertionEffect:function(e,t){Gl(4,2,e,t)},useMemo:function(e,t){var i=Xt();t=t===void 0?null:t;var r=e();if(zs){Fi(!0);try{e()}finally{Fi(!1)}}return i.memoizedState=[r,t],r},useReducer:function(e,t,i){var r=Xt();if(i!==void 0){var a=i(t);if(zs){Fi(!0);try{i(t)}finally{Fi(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=Vp.bind(null,Ue,e),[r.memoizedState,e]},useRef:function(e){var t=Xt();return e={current:e},t.memoizedState=e},useState:function(e){e=$c(e);var t=e.queue,i=Id.bind(null,Ue,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:eu,useDeferredValue:function(e,t){var i=Xt();return tu(i,e,t)},useTransition:function(){var e=$c(!1);return e=jd.bind(null,Ue,e.queue,!0,!1),Xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var r=Ue,a=Xt();if(Qe){if(i===void 0)throw Error(g(407));i=i()}else{if(i=t(),ft===null)throw Error(g(349));(Ye&127)!==0||fd(r,t,i)}a.memoizedState=i;var v={value:i,getSnapshot:t};return a.queue=v,Ad(_d.bind(null,r,v,e),[e]),r.flags|=2048,On(9,{destroy:void 0},dd.bind(null,r,v,i,t),null),i},useId:function(){var e=Xt(),t=ft.identifierPrefix;if(Qe){var i=$i,r=Xi;i=(r&~(1<<32-Kt(r)-1)).toString(32)+i,t="_"+t+"R_"+i,i=ql++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Ip++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ru,useFormState:Ed,useActionState:Ed,useOptimistic:function(e){var t=Xt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=su.bind(null,Ue,!0,i),i.dispatch=t,[e,t]},useMemoCache:Qc,useCacheRefresh:function(){return Xt().memoizedState=Qp.bind(null,Ue)},useEffectEvent:function(e){var t=Xt(),i={impl:e};return t.memoizedState=i,function(){if((et&2)!==0)throw Error(g(440));return i.impl.apply(void 0,arguments)}}},nu={readContext:Ut,use:Wl,useCallback:kd,useContext:Ut,useEffect:Jc,useImperativeHandle:Bd,useInsertionEffect:Md,useLayoutEffect:Ld,useMemo:Hd,useReducer:Yl,useRef:Dd,useState:function(){return Yl(gr)},useDebugValue:eu,useDeferredValue:function(e,t){var i=Rt();return Nd(i,lt.memoizedState,e,t)},useTransition:function(){var e=Yl(gr)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:Da(e),t]},useSyncExternalStore:hd,useId:Pd,useHostTransitionStatus:ru,useFormState:wd,useActionState:wd,useOptimistic:function(e,t){var i=Rt();return gd(i,lt,e,t)},useMemoCache:Qc,useCacheRefresh:Fd};nu.useEffectEvent=Td;var Yd={readContext:Ut,use:Wl,useCallback:kd,useContext:Ut,useEffect:Jc,useImperativeHandle:Bd,useInsertionEffect:Md,useLayoutEffect:Ld,useMemo:Hd,useReducer:Xc,useRef:Dd,useState:function(){return Xc(gr)},useDebugValue:eu,useDeferredValue:function(e,t){var i=Rt();return lt===null?tu(i,e,t):Nd(i,lt.memoizedState,e,t)},useTransition:function(){var e=Xc(gr)[0],t=Rt().memoizedState;return[typeof e=="boolean"?e:Da(e),t]},useSyncExternalStore:hd,useId:Pd,useHostTransitionStatus:ru,useFormState:Rd,useActionState:Rd,useOptimistic:function(e,t){var i=Rt();return lt!==null?gd(i,lt,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Qc,useCacheRefresh:Fd};Yd.useEffectEvent=Td;function au(e,t,i,r){t=e.memoizedState,i=i(r,t),i=i==null?t:m({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var lu={enqueueSetState:function(e,t,i){e=e._reactInternals;var r=yi(),a=Wr(r);a.payload=t,i!=null&&(a.callback=i),t=Yr(e,a,r),t!==null&&(ci(t,e,r),Ea(t,e,r))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var r=yi(),a=Wr(r);a.tag=1,a.payload=t,i!=null&&(a.callback=i),t=Yr(e,a,r),t!==null&&(ci(t,e,r),Ea(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=yi(),r=Wr(i);r.tag=2,t!=null&&(r.callback=t),t=Yr(e,r,i),t!==null&&(ci(t,e,i),Ea(t,e,i))}};function Gd(e,t,i,r,a,v,D){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,v,D):t.prototype&&t.prototype.isPureReactComponent?!va(i,r)||!va(a,v):!0}function Qd(e,t,i,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,r),t.state!==e&&lu.enqueueReplaceState(t,t.state,null)}function Us(e,t){var i=t;if("ref"in t){i={};for(var r in t)r!=="ref"&&(i[r]=t[r])}if(e=e.defaultProps){i===t&&(i=m({},i));for(var a in e)i[a]===void 0&&(i[a]=e[a])}return i}function Vd(e){Dl(e)}function Xd(e){console.error(e)}function $d(e){Dl(e)}function Xl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Zd(e,t,i){try{var r=e.onCaughtError;r(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function ou(e,t,i){return i=Wr(i),i.tag=3,i.payload={element:null},i.callback=function(){Xl(e,t)},i}function Jd(e){return e=Wr(e),e.tag=3,e}function e_(e,t,i,r){var a=i.type.getDerivedStateFromError;if(typeof a=="function"){var v=r.value;e.payload=function(){return a(v)},e.callback=function(){Zd(t,i,r)}}var D=i.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(e.callback=function(){Zd(t,i,r),typeof a!="function"&&(Zr===null?Zr=new Set([this]):Zr.add(this));var H=r.stack;this.componentDidCatch(r.value,{componentStack:H!==null?H:""})})}function Xp(e,t,i,r,a){if(i.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=i.alternate,t!==null&&wn(t,i,a,!0),i=vi.current,i!==null){switch(i.tag){case 31:case 13:return Mi===null?oo():i.alternate===null&&Et===0&&(Et=3),i.flags&=-257,i.flags|=65536,i.lanes=a,r===jl?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([r]):t.add(r),Bu(e,r,a)),!1;case 22:return i.flags|=65536,r===jl?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([r]):i.add(r)),Bu(e,r,a)),!1}throw Error(g(435,i.tag))}return Bu(e,r,a),oo(),!1}if(Qe)return t=vi.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Dc&&(e=Error(g(422),{cause:r}),pa(Ri(e,i)))):(r!==Dc&&(t=Error(g(423),{cause:r}),pa(Ri(t,i))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ri(r,i),a=ou(e.stateNode,r,a),zc(e,a),Et!==4&&(Et=2)),!1;var v=Error(g(520),{cause:r});if(v=Ri(v,i),ja===null?ja=[v]:ja.push(v),Et!==4&&(Et=2),t===null)return!0;r=Ri(r,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=a&-a,i.lanes|=e,e=ou(i.stateNode,r,e),zc(i,e),!1;case 1:if(t=i.type,v=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(Zr===null||!Zr.has(v))))return i.flags|=65536,a&=-a,i.lanes|=a,a=Jd(a),e_(a,e,i,r),zc(i,a),!1}i=i.return}while(i!==null);return!1}var cu=Error(g(461)),Mt=!1;function Pt(e,t,i,r){t.child=e===null?sd(t,null,i,r):js(t,e.child,i,r)}function t_(e,t,i,r,a){i=i.render;var v=t.ref;if("ref"in r){var D={};for(var H in r)H!=="ref"&&(D[H]=r[H])}else D=r;return Bs(t),r=Kc(e,t,i,D,v,a),H=Wc(),e!==null&&!Mt?(Yc(e,t,a),pr(e,t,a)):(Qe&&H&&xc(t),t.flags|=1,Pt(e,t,r,a),t.child)}function i_(e,t,i,r,a){if(e===null){var v=i.type;return typeof v=="function"&&!Cc(v)&&v.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=v,r_(e,t,v,r,a)):(e=Ll(i.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(v=e.child,!gu(e,a)){var D=v.memoizedProps;if(i=i.compare,i=i!==null?i:va,i(D,r)&&e.ref===t.ref)return pr(e,t,a)}return t.flags|=1,e=fr(v,r),e.ref=t.ref,e.return=t,t.child=e}function r_(e,t,i,r,a){if(e!==null){var v=e.memoizedProps;if(va(v,r)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=r=v,gu(e,a))(e.flags&131072)!==0&&(Mt=!0);else return t.lanes=e.lanes,pr(e,t,a)}return uu(e,t,i,r,a)}function s_(e,t,i,r){var a=r.children,v=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(v=v!==null?v.baseLanes|i:i,e!==null){for(r=t.child=e.child,a=0;r!==null;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~v}else r=0,t.child=null;return n_(e,t,v,i,r)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Hl(t,v!==null?v.cachePool:null),v!==null?ld(t,v):Pc(),od(t);else return r=t.lanes=536870912,n_(e,t,v!==null?v.baseLanes|i:i,i,r)}else v!==null?(Hl(t,v.cachePool),ld(t,v),Qr(),t.memoizedState=null):(e!==null&&Hl(t,null),Pc(),Qr());return Pt(e,t,a,i),t.child}function Ma(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function n_(e,t,i,r,a){var v=kc();return v=v===null?null:{parent:At._currentValue,pool:v},t.memoizedState={baseLanes:i,cachePool:v},e!==null&&Hl(t,null),Pc(),od(t),e!==null&&wn(e,t,r,!0),t.childLanes=a,null}function $l(e,t){return t=Jl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function a_(e,t,i){return js(t,e.child,null,i),e=$l(t,t.pendingProps),e.flags|=2,mi(t),t.memoizedState=null,e}function $p(e,t,i){var r=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Qe){if(r.mode==="hidden")return e=$l(t,r),t.lanes=536870912,Ma(null,e);if(Ic(t),(e=_t)?(e=pv(e,Ti),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pr!==null?{id:Xi,overflow:$i}:null,retryLane:536870912,hydrationErrors:null},i=qf(e),i.return=t,t.child=i,zt=t,_t=null)):e=null,e===null)throw Ir(t);return t.lanes=536870912,null}return $l(t,r)}var v=e.memoizedState;if(v!==null){var D=v.dehydrated;if(Ic(t),a)if(t.flags&256)t.flags&=-257,t=a_(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(g(558));else if(Mt||wn(e,t,i,!1),a=(i&e.childLanes)!==0,Mt||a){if(r=ft,r!==null&&(D=oe(r,i),D!==0&&D!==v.retryLane))throw v.retryLane=D,Ts(e,D),ci(r,e,D),cu;oo(),t=a_(e,t,i)}else e=v.treeContext,_t=Li(D.nextSibling),zt=t,Qe=!0,Fr=null,Ti=!1,e!==null&&Yf(t,e),t=$l(t,r),t.flags|=4096;return t}return e=fr(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Zl(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(g(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function uu(e,t,i,r,a){return Bs(t),i=Kc(e,t,i,r,void 0,a),r=Wc(),e!==null&&!Mt?(Yc(e,t,a),pr(e,t,a)):(Qe&&r&&xc(t),t.flags|=1,Pt(e,t,i,a),t.child)}function l_(e,t,i,r,a,v){return Bs(t),t.updateQueue=null,i=ud(t,r,i,a),cd(e),r=Wc(),e!==null&&!Mt?(Yc(e,t,v),pr(e,t,v)):(Qe&&r&&xc(t),t.flags|=1,Pt(e,t,i,v),t.child)}function o_(e,t,i,r,a){if(Bs(t),t.stateNode===null){var v=Sn,D=i.contextType;typeof D=="object"&&D!==null&&(v=Ut(D)),v=new i(r,v),t.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=lu,t.stateNode=v,v._reactInternals=t,v=t.stateNode,v.props=r,v.state=t.memoizedState,v.refs={},Nc(t),D=i.contextType,v.context=typeof D=="object"&&D!==null?Ut(D):Sn,v.state=t.memoizedState,D=i.getDerivedStateFromProps,typeof D=="function"&&(au(t,i,D,r),v.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(D=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),D!==v.state&&lu.enqueueReplaceState(v,v.state,null),xa(t,r,v,a),wa(),v.state=t.memoizedState),typeof v.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){v=t.stateNode;var H=t.memoizedProps,K=Us(i,H);v.props=K;var se=v.context,de=i.contextType;D=Sn,typeof de=="object"&&de!==null&&(D=Ut(de));var me=i.getDerivedStateFromProps;de=typeof me=="function"||typeof v.getSnapshotBeforeUpdate=="function",H=t.pendingProps!==H,de||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(H||se!==D)&&Qd(t,v,r,D),Kr=!1;var ne=t.memoizedState;v.state=ne,xa(t,r,v,a),wa(),se=t.memoizedState,H||ne!==se||Kr?(typeof me=="function"&&(au(t,i,me,r),se=t.memoizedState),(K=Kr||Gd(t,i,K,r,ne,se,D))?(de||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(t.flags|=4194308)):(typeof v.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=se),v.props=r,v.state=se,v.context=D,r=K):(typeof v.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{v=t.stateNode,jc(e,t),D=t.memoizedProps,de=Us(i,D),v.props=de,me=t.pendingProps,ne=v.context,se=i.contextType,K=Sn,typeof se=="object"&&se!==null&&(K=Ut(se)),H=i.getDerivedStateFromProps,(se=typeof H=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(D!==me||ne!==K)&&Qd(t,v,r,K),Kr=!1,ne=t.memoizedState,v.state=ne,xa(t,r,v,a),wa();var fe=t.memoizedState;D!==me||ne!==fe||Kr||e!==null&&e.dependencies!==null&&Bl(e.dependencies)?(typeof H=="function"&&(au(t,i,H,r),fe=t.memoizedState),(de=Kr||Gd(t,i,de,r,ne,fe,K)||e!==null&&e.dependencies!==null&&Bl(e.dependencies))?(se||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(r,fe,K),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(r,fe,K)),typeof v.componentDidUpdate=="function"&&(t.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof v.componentDidUpdate!="function"||D===e.memoizedProps&&ne===e.memoizedState||(t.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&ne===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=fe),v.props=r,v.state=fe,v.context=K,r=de):(typeof v.componentDidUpdate!="function"||D===e.memoizedProps&&ne===e.memoizedState||(t.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||D===e.memoizedProps&&ne===e.memoizedState||(t.flags|=1024),r=!1)}return v=r,Zl(e,t),r=(t.flags&128)!==0,v||r?(v=t.stateNode,i=r&&typeof i.getDerivedStateFromError!="function"?null:v.render(),t.flags|=1,e!==null&&r?(t.child=js(t,e.child,null,a),t.child=js(t,null,i,a)):Pt(e,t,i,a),t.memoizedState=v.state,e=t.child):e=pr(e,t,a),e}function c_(e,t,i,r){return Ls(),t.flags|=256,Pt(e,t,i,r),t.child}var hu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fu(e){return{baseLanes:e,cachePool:Zf()}}function du(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=pi),e}function u_(e,t,i){var r=t.pendingProps,a=!1,v=(t.flags&128)!==0,D;if((D=v)||(D=e!==null&&e.memoizedState===null?!1:(xt.current&2)!==0),D&&(a=!0,t.flags&=-129),D=(t.flags&32)!==0,t.flags&=-33,e===null){if(Qe){if(a?Gr(t):Qr(),(e=_t)?(e=pv(e,Ti),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pr!==null?{id:Xi,overflow:$i}:null,retryLane:536870912,hydrationErrors:null},i=qf(e),i.return=t,t.child=i,zt=t,_t=null)):e=null,e===null)throw Ir(t);return Vu(e)?t.lanes=32:t.lanes=536870912,null}var H=r.children;return r=r.fallback,a?(Qr(),a=t.mode,H=Jl({mode:"hidden",children:H},a),r=Ms(r,a,i,null),H.return=t,r.return=t,H.sibling=r,t.child=H,r=t.child,r.memoizedState=fu(i),r.childLanes=du(e,D,i),t.memoizedState=hu,Ma(null,r)):(Gr(t),_u(t,H))}var K=e.memoizedState;if(K!==null&&(H=K.dehydrated,H!==null)){if(v)t.flags&256?(Gr(t),t.flags&=-257,t=vu(e,t,i)):t.memoizedState!==null?(Qr(),t.child=e.child,t.flags|=128,t=null):(Qr(),H=r.fallback,a=t.mode,r=Jl({mode:"visible",children:r.children},a),H=Ms(H,a,i,null),H.flags|=2,r.return=t,H.return=t,r.sibling=H,t.child=r,js(t,e.child,null,i),r=t.child,r.memoizedState=fu(i),r.childLanes=du(e,D,i),t.memoizedState=hu,t=Ma(null,r));else if(Gr(t),Vu(H)){if(D=H.nextSibling&&H.nextSibling.dataset,D)var se=D.dgst;D=se,r=Error(g(419)),r.stack="",r.digest=D,pa({value:r,source:null,stack:null}),t=vu(e,t,i)}else if(Mt||wn(e,t,i,!1),D=(i&e.childLanes)!==0,Mt||D){if(D=ft,D!==null&&(r=oe(D,i),r!==0&&r!==K.retryLane))throw K.retryLane=r,Ts(e,r),ci(D,e,r),cu;Qu(H)||oo(),t=vu(e,t,i)}else Qu(H)?(t.flags|=192,t.child=e.child,t=null):(e=K.treeContext,_t=Li(H.nextSibling),zt=t,Qe=!0,Fr=null,Ti=!1,e!==null&&Yf(t,e),t=_u(t,r.children),t.flags|=4096);return t}return a?(Qr(),H=r.fallback,a=t.mode,K=e.child,se=K.sibling,r=fr(K,{mode:"hidden",children:r.children}),r.subtreeFlags=K.subtreeFlags&65011712,se!==null?H=fr(se,H):(H=Ms(H,a,i,null),H.flags|=2),H.return=t,r.return=t,r.sibling=H,t.child=r,Ma(null,r),r=t.child,H=e.child.memoizedState,H===null?H=fu(i):(a=H.cachePool,a!==null?(K=At._currentValue,a=a.parent!==K?{parent:K,pool:K}:a):a=Zf(),H={baseLanes:H.baseLanes|i,cachePool:a}),r.memoizedState=H,r.childLanes=du(e,D,i),t.memoizedState=hu,Ma(e.child,r)):(Gr(t),i=e.child,e=i.sibling,i=fr(i,{mode:"visible",children:r.children}),i.return=t,i.sibling=null,e!==null&&(D=t.deletions,D===null?(t.deletions=[e],t.flags|=16):D.push(e)),t.child=i,t.memoizedState=null,i)}function _u(e,t){return t=Jl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Jl(e,t){return e=_i(22,e,null,t),e.lanes=0,e}function vu(e,t,i){return js(t,e.child,null,i),e=_u(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function h_(e,t,i){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Mc(e.return,t,i)}function mu(e,t,i,r,a,v){var D=e.memoizedState;D===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:i,tailMode:a,treeForkCount:v}:(D.isBackwards=t,D.rendering=null,D.renderingStartTime=0,D.last=r,D.tail=i,D.tailMode=a,D.treeForkCount=v)}function f_(e,t,i){var r=t.pendingProps,a=r.revealOrder,v=r.tail;r=r.children;var D=xt.current,H=(D&2)!==0;if(H?(D=D&1|2,t.flags|=128):D&=1,X(xt,D),Pt(e,t,r,i),r=Qe?ga:0,!H&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&h_(e,i,t);else if(e.tag===19)h_(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(i=t.child,a=null;i!==null;)e=i.alternate,e!==null&&Fl(e)===null&&(a=i),i=i.sibling;i=a,i===null?(a=t.child,t.child=null):(a=i.sibling,i.sibling=null),mu(t,!1,a,i,v,r);break;case"backwards":case"unstable_legacy-backwards":for(i=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Fl(e)===null){t.child=a;break}e=a.sibling,a.sibling=i,i=a,a=e}mu(t,!0,i,null,v,r);break;case"together":mu(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function pr(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),$r|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(wn(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(g(153));if(t.child!==null){for(e=t.child,i=fr(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=fr(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function gu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Bl(e)))}function Zp(e,t,i){switch(t.tag){case 3:P(t,t.stateNode.containerInfo),qr(t,At,e.memoizedState.cache),Ls();break;case 27:case 5:Se(t);break;case 4:P(t,t.stateNode.containerInfo);break;case 10:qr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ic(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Gr(t),t.flags|=128,null):(i&t.child.childLanes)!==0?u_(e,t,i):(Gr(t),e=pr(e,t,i),e!==null?e.sibling:null);Gr(t);break;case 19:var a=(e.flags&128)!==0;if(r=(i&t.childLanes)!==0,r||(wn(e,t,i,!1),r=(i&t.childLanes)!==0),a){if(r)return f_(e,t,i);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),X(xt,xt.current),r)break;return null;case 22:return t.lanes=0,s_(e,t,i,t.pendingProps);case 24:qr(t,At,e.memoizedState.cache)}return pr(e,t,i)}function d_(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Mt=!0;else{if(!gu(e,i)&&(t.flags&128)===0)return Mt=!1,Zp(e,t,i);Mt=(e.flags&131072)!==0}else Mt=!1,Qe&&(t.flags&1048576)!==0&&Wf(t,ga,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Hs(t.elementType),t.type=e,typeof e=="function")Cc(e)?(r=Us(e,r),t.tag=1,t=o_(null,t,e,r,i)):(t.tag=0,t=uu(null,t,e,r,i));else{if(e!=null){var a=e.$$typeof;if(a===E){t.tag=11,t=t_(null,t,e,r,i);break e}else if(a===x){t.tag=14,t=i_(null,t,e,r,i);break e}}throw t=ce(e)||e,Error(g(306,t,""))}}return t;case 0:return uu(e,t,t.type,t.pendingProps,i);case 1:return r=t.type,a=Us(r,t.pendingProps),o_(e,t,r,a,i);case 3:e:{if(P(t,t.stateNode.containerInfo),e===null)throw Error(g(387));r=t.pendingProps;var v=t.memoizedState;a=v.element,jc(e,t),xa(t,r,null,i);var D=t.memoizedState;if(r=D.cache,qr(t,At,r),r!==v.cache&&Lc(t,[At],i,!0),wa(),r=D.element,v.isDehydrated)if(v={element:r,isDehydrated:!1,cache:D.cache},t.updateQueue.baseState=v,t.memoizedState=v,t.flags&256){t=c_(e,t,r,i);break e}else if(r!==a){a=Ri(Error(g(424)),t),pa(a),t=c_(e,t,r,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(_t=Li(e.firstChild),zt=t,Qe=!0,Fr=null,Ti=!0,i=sd(t,null,r,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Ls(),r===a){t=pr(e,t,i);break e}Pt(e,t,r,i)}t=t.child}return t;case 26:return Zl(e,t),e===null?(i=wv(t.type,null,t.pendingProps,null))?t.memoizedState=i:Qe||(i=t.type,e=t.pendingProps,r=mo(Y.current).createElement(i),r[be]=t,r[we]=e,Ft(r,i,e),rt(r),t.stateNode=r):t.memoizedState=wv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Se(t),e===null&&Qe&&(r=t.stateNode=bv(t.type,t.pendingProps,Y.current),zt=t,Ti=!0,a=_t,is(t.type)?(Xu=a,_t=Li(r.firstChild)):_t=a),Pt(e,t,t.pendingProps.children,i),Zl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Qe&&((a=r=_t)&&(r=Ay(r,t.type,t.pendingProps,Ti),r!==null?(t.stateNode=r,zt=t,_t=Li(r.firstChild),Ti=!1,a=!0):a=!1),a||Ir(t)),Se(t),a=t.type,v=t.pendingProps,D=e!==null?e.memoizedProps:null,r=v.children,Wu(a,v)?r=null:D!==null&&Wu(a,D)&&(t.flags|=32),t.memoizedState!==null&&(a=Kc(e,t,qp,null,null,i),Wa._currentValue=a),Zl(e,t),Pt(e,t,r,i),t.child;case 6:return e===null&&Qe&&((e=i=_t)&&(i=Ty(i,t.pendingProps,Ti),i!==null?(t.stateNode=i,zt=t,_t=null,e=!0):e=!1),e||Ir(t)),null;case 13:return u_(e,t,i);case 4:return P(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=js(t,null,r,i):Pt(e,t,r,i),t.child;case 11:return t_(e,t,t.type,t.pendingProps,i);case 7:return Pt(e,t,t.pendingProps,i),t.child;case 8:return Pt(e,t,t.pendingProps.children,i),t.child;case 12:return Pt(e,t,t.pendingProps.children,i),t.child;case 10:return r=t.pendingProps,qr(t,t.type,r.value),Pt(e,t,r.children,i),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Bs(t),a=Ut(a),r=r(a),t.flags|=1,Pt(e,t,r,i),t.child;case 14:return i_(e,t,t.type,t.pendingProps,i);case 15:return r_(e,t,t.type,t.pendingProps,i);case 19:return f_(e,t,i);case 31:return $p(e,t,i);case 22:return s_(e,t,i,t.pendingProps);case 24:return Bs(t),r=Ut(At),e===null?(a=kc(),a===null&&(a=ft,v=Oc(),a.pooledCache=v,v.refCount++,v!==null&&(a.pooledCacheLanes|=i),a=v),t.memoizedState={parent:r,cache:a},Nc(t),qr(t,At,a)):((e.lanes&i)!==0&&(jc(e,t),xa(t,null,null,i),wa()),a=e.memoizedState,v=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),qr(t,At,r)):(r=v.cache,qr(t,At,r),r!==a.cache&&Lc(t,[At],i,!0))),Pt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(g(156,t.tag))}function yr(e){e.flags|=4}function pu(e,t,i,r,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(P_())e.flags|=8192;else throw Ns=jl,Hc}else e.flags&=-16777217}function __(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Tv(t))if(P_())e.flags|=8192;else throw Ns=jl,Hc}function eo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ws():536870912,e.lanes|=t,Nn|=t)}function La(e,t){if(!Qe)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function vt(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,r=0;if(t)for(var a=e.child;a!==null;)i|=a.lanes|a.childLanes,r|=a.subtreeFlags&65011712,r|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)i|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=i,t}function Jp(e,t,i){var r=t.pendingProps;switch(Rc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(t),null;case 1:return vt(t),null;case 3:return i=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),vr(At),le(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(En(t)?yr(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ac())),vt(t),null;case 26:var a=t.type,v=t.memoizedState;return e===null?(yr(t),v!==null?(vt(t),__(t,v)):(vt(t),pu(t,a,null,r,i))):v?v!==e.memoizedState?(yr(t),vt(t),__(t,v)):(vt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&yr(t),vt(t),pu(t,a,e,r,i)),null;case 27:if(ue(t),i=Y.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&yr(t);else{if(!r){if(t.stateNode===null)throw Error(g(166));return vt(t),null}e=te.current,En(t)?Gf(t):(e=bv(a,r,i),t.stateNode=e,yr(t))}return vt(t),null;case 5:if(ue(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&yr(t);else{if(!r){if(t.stateNode===null)throw Error(g(166));return vt(t),null}if(v=te.current,En(t))Gf(t);else{var D=mo(Y.current);switch(v){case 1:v=D.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:v=D.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":v=D.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":v=D.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":v=D.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof r.is=="string"?D.createElement("select",{is:r.is}):D.createElement("select"),r.multiple?v.multiple=!0:r.size&&(v.size=r.size);break;default:v=typeof r.is=="string"?D.createElement(a,{is:r.is}):D.createElement(a)}}v[be]=t,v[we]=r;e:for(D=t.child;D!==null;){if(D.tag===5||D.tag===6)v.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===t)break e;for(;D.sibling===null;){if(D.return===null||D.return===t)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}t.stateNode=v;e:switch(Ft(v,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&yr(t)}}return vt(t),pu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&yr(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(g(166));if(e=Y.current,En(t)){if(e=t.stateNode,i=t.memoizedProps,r=null,a=zt,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[be]=t,e=!!(e.nodeValue===i||r!==null&&r.suppressHydrationWarning===!0||uv(e.nodeValue,i)),e||Ir(t,!0)}else e=mo(e).createTextNode(r),e[be]=t,t.stateNode=e}return vt(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(r=En(t),i!==null){if(e===null){if(!r)throw Error(g(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(g(557));e[be]=t}else Ls(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),e=!1}else i=Ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(mi(t),t):(mi(t),null);if((t.flags&128)!==0)throw Error(g(558))}return vt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=En(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(g(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(g(317));a[be]=t}else Ls(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vt(t),a=!1}else a=Ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(mi(t),t):(mi(t),null)}return mi(t),(t.flags&128)!==0?(t.lanes=i,t):(i=r!==null,e=e!==null&&e.memoizedState!==null,i&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),v=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(v=r.memoizedState.cachePool.pool),v!==a&&(r.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),eo(t,t.updateQueue),vt(t),null);case 4:return le(),e===null&&Pu(t.stateNode.containerInfo),vt(t),null;case 10:return vr(t.type),vt(t),null;case 19:if(j(xt),r=t.memoizedState,r===null)return vt(t),null;if(a=(t.flags&128)!==0,v=r.rendering,v===null)if(a)La(r,!1);else{if(Et!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(v=Fl(e),v!==null){for(t.flags|=128,La(r,!1),e=v.updateQueue,t.updateQueue=e,eo(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)If(i,e),i=i.sibling;return X(xt,xt.current&1|2),Qe&&dr(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&dt()>no&&(t.flags|=128,a=!0,La(r,!1),t.lanes=4194304)}else{if(!a)if(e=Fl(v),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,eo(t,e),La(r,!0),r.tail===null&&r.tailMode==="hidden"&&!v.alternate&&!Qe)return vt(t),null}else 2*dt()-r.renderingStartTime>no&&i!==536870912&&(t.flags|=128,a=!0,La(r,!1),t.lanes=4194304);r.isBackwards?(v.sibling=t.child,t.child=v):(e=r.last,e!==null?e.sibling=v:t.child=v,r.last=v)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=dt(),e.sibling=null,i=xt.current,X(xt,a?i&1|2:i&1),Qe&&dr(t,r.treeForkCount),e):(vt(t),null);case 22:case 23:return mi(t),Fc(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(i&536870912)!==0&&(t.flags&128)===0&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),i=t.updateQueue,i!==null&&eo(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==i&&(t.flags|=2048),e!==null&&j(ks),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),vr(At),vt(t),null;case 25:return null;case 30:return null}throw Error(g(156,t.tag))}function ey(e,t){switch(Rc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return vr(At),le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ue(t),null;case 31:if(t.memoizedState!==null){if(mi(t),t.alternate===null)throw Error(g(340));Ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mi(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(g(340));Ls()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(xt),null;case 4:return le(),null;case 10:return vr(t.type),null;case 22:case 23:return mi(t),Fc(),e!==null&&j(ks),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return vr(At),null;case 25:return null;default:return null}}function v_(e,t){switch(Rc(t),t.tag){case 3:vr(At),le();break;case 26:case 27:case 5:ue(t);break;case 4:le();break;case 31:t.memoizedState!==null&&mi(t);break;case 13:mi(t);break;case 19:j(xt);break;case 10:vr(t.type);break;case 22:case 23:mi(t),Fc(),e!==null&&j(ks);break;case 24:vr(At)}}function Oa(e,t){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var a=r.next;i=a;do{if((i.tag&e)===e){r=void 0;var v=i.create,D=i.inst;r=v(),D.destroy=r}i=i.next}while(i!==a)}}catch(H){nt(t,t.return,H)}}function Vr(e,t,i){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var v=a.next;r=v;do{if((r.tag&e)===e){var D=r.inst,H=D.destroy;if(H!==void 0){D.destroy=void 0,a=t;var K=i,se=H;try{se()}catch(de){nt(a,K,de)}}}r=r.next}while(r!==v)}}catch(de){nt(t,t.return,de)}}function m_(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{ad(t,i)}catch(r){nt(e,e.return,r)}}}function g_(e,t,i){i.props=Us(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){nt(e,t,r)}}function Ba(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof i=="function"?e.refCleanup=i(r):i.current=r}}catch(a){nt(e,t,a)}}function Zi(e,t){var i=e.ref,r=e.refCleanup;if(i!==null)if(typeof r=="function")try{r()}catch(a){nt(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(a){nt(e,t,a)}else i.current=null}function p_(e){var t=e.type,i=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&r.focus();break e;case"img":i.src?r.src=i.src:i.srcSet&&(r.srcset=i.srcSet)}}catch(a){nt(e,e.return,a)}}function yu(e,t,i){try{var r=e.stateNode;Cy(r,e.type,i,t),r[we]=t}catch(a){nt(e,e.return,a)}}function y_(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&is(e.type)||e.tag===4}function Su(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||y_(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&&is(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,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=ur));else if(r!==4&&(r===27&&is(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(bu(e,t,i),e=e.sibling;e!==null;)bu(e,t,i),e=e.sibling}function to(e,t,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(r!==4&&(r===27&&is(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(to(e,t,i),e=e.sibling;e!==null;)to(e,t,i),e=e.sibling}function S_(e){var t=e.stateNode,i=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Ft(t,r,i),t[be]=e,t[we]=i}catch(v){nt(e,e.return,v)}}var Sr=!1,Lt=!1,Cu=!1,b_=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function ty(e,t){if(e=e.containerInfo,qu=Eo,e=Bf(e),vc(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var r=i.getSelection&&i.getSelection();if(r&&r.rangeCount!==0){i=r.anchorNode;var a=r.anchorOffset,v=r.focusNode;r=r.focusOffset;try{i.nodeType,v.nodeType}catch{i=null;break e}var D=0,H=-1,K=-1,se=0,de=0,me=e,ne=null;t:for(;;){for(var fe;me!==i||a!==0&&me.nodeType!==3||(H=D+a),me!==v||r!==0&&me.nodeType!==3||(K=D+r),me.nodeType===3&&(D+=me.nodeValue.length),(fe=me.firstChild)!==null;)ne=me,me=fe;for(;;){if(me===e)break t;if(ne===i&&++se===a&&(H=D),ne===v&&++de===r&&(K=D),(fe=me.nextSibling)!==null)break;me=ne,ne=me.parentNode}me=fe}i=H===-1||K===-1?null:{start:H,end:K}}else i=null}i=i||{start:0,end:0}}else i=null;for(Ku={focusedElem:e,selectionRange:i},Eo=!1,Ht=t;Ht!==null;)if(t=Ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ht=e;else for(;Ht!==null;){switch(t=Ht,v=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)a=e[i],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&v!==null){e=void 0,i=t,a=v.memoizedProps,v=v.memoizedState,r=i.stateNode;try{var xe=Us(i.type,a);e=r.getSnapshotBeforeUpdate(xe,v),r.__reactInternalSnapshotBeforeUpdate=e}catch(ke){nt(i,i.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Gu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Gu(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(g(163))}if(e=t.sibling,e!==null){e.return=t.return,Ht=e;break}Ht=t.return}}function C_(e,t,i){var r=i.flags;switch(i.tag){case 0:case 11:case 15:Cr(e,i),r&4&&Oa(5,i);break;case 1:if(Cr(e,i),r&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(D){nt(i,i.return,D)}else{var a=Us(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(D){nt(i,i.return,D)}}r&64&&m_(i),r&512&&Ba(i,i.return);break;case 3:if(Cr(e,i),r&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{ad(e,t)}catch(D){nt(i,i.return,D)}}break;case 27:t===null&&r&4&&S_(i);case 26:case 5:Cr(e,i),t===null&&r&4&&p_(i),r&512&&Ba(i,i.return);break;case 12:Cr(e,i);break;case 31:Cr(e,i),r&4&&x_(e,i);break;case 13:Cr(e,i),r&4&&R_(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=uy.bind(null,i),My(e,i))));break;case 22:if(r=i.memoizedState!==null||Sr,!r){t=t!==null&&t.memoizedState!==null||Lt,a=Sr;var v=Lt;Sr=r,(Lt=t)&&!v?Er(e,i,(i.subtreeFlags&8772)!==0):Cr(e,i),Sr=a,Lt=v}break;case 30:break;default:Cr(e,i)}}function E_(e){var t=e.alternate;t!==null&&(e.alternate=null,E_(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&it(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pt=null,ni=!1;function br(e,t,i){for(i=i.child;i!==null;)w_(e,t,i),i=i.sibling}function w_(e,t,i){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(jt,i)}catch{}switch(i.tag){case 26:Lt||Zi(i,t),br(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Lt||Zi(i,t);var r=pt,a=ni;is(i.type)&&(pt=i.stateNode,ni=!1),br(e,t,i),Ia(i.stateNode),pt=r,ni=a;break;case 5:Lt||Zi(i,t);case 6:if(r=pt,a=ni,pt=null,br(e,t,i),pt=r,ni=a,pt!==null)if(ni)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(i.stateNode)}catch(v){nt(i,t,v)}else try{pt.removeChild(i.stateNode)}catch(v){nt(i,t,v)}break;case 18:pt!==null&&(ni?(e=pt,mv(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Kn(e)):mv(pt,i.stateNode));break;case 4:r=pt,a=ni,pt=i.stateNode.containerInfo,ni=!0,br(e,t,i),pt=r,ni=a;break;case 0:case 11:case 14:case 15:Vr(2,i,t),Lt||Vr(4,i,t),br(e,t,i);break;case 1:Lt||(Zi(i,t),r=i.stateNode,typeof r.componentWillUnmount=="function"&&g_(i,t,r)),br(e,t,i);break;case 21:br(e,t,i);break;case 22:Lt=(r=Lt)||i.memoizedState!==null,br(e,t,i),Lt=r;break;default:br(e,t,i)}}function x_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kn(e)}catch(i){nt(t,t.return,i)}}}function R_(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kn(e)}catch(i){nt(t,t.return,i)}}function iy(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new b_),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new b_),t;default:throw Error(g(435,e.tag))}}function io(e,t){var i=iy(e);t.forEach(function(r){if(!i.has(r)){i.add(r);var a=hy.bind(null,e,r);r.then(a,a)}})}function ai(e,t){var i=t.deletions;if(i!==null)for(var r=0;r<i.length;r++){var a=i[r],v=e,D=t,H=D;e:for(;H!==null;){switch(H.tag){case 27:if(is(H.type)){pt=H.stateNode,ni=!1;break e}break;case 5:pt=H.stateNode,ni=!1;break e;case 3:case 4:pt=H.stateNode.containerInfo,ni=!0;break e}H=H.return}if(pt===null)throw Error(g(160));w_(v,D,a),pt=null,ni=!1,v=a.alternate,v!==null&&(v.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)D_(t,e),t=t.sibling}var Wi=null;function D_(e,t){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ai(t,e),li(e),r&4&&(Vr(3,e,e.return),Oa(3,e),Vr(5,e,e.return));break;case 1:ai(t,e),li(e),r&512&&(Lt||i===null||Zi(i,i.return)),r&64&&Sr&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:var a=Wi;if(ai(t,e),li(e),r&512&&(Lt||i===null||Zi(i,i.return)),r&4){var v=i!==null?i.memoizedState:null;if(r=e.memoizedState,i===null)if(r===null)if(e.stateNode===null){e:{r=e.type,i=e.memoizedProps,a=a.ownerDocument||a;t:switch(r){case"title":v=a.getElementsByTagName("title")[0],(!v||v[gt]||v[be]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=a.createElement(r),a.head.insertBefore(v,a.querySelector("head > title"))),Ft(v,r,i),v[be]=e,rt(v),r=v;break e;case"link":var D=Dv("link","href",a).get(r+(i.href||""));if(D){for(var H=0;H<D.length;H++)if(v=D[H],v.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&v.getAttribute("rel")===(i.rel==null?null:i.rel)&&v.getAttribute("title")===(i.title==null?null:i.title)&&v.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){D.splice(H,1);break t}}v=a.createElement(r),Ft(v,r,i),a.head.appendChild(v);break;case"meta":if(D=Dv("meta","content",a).get(r+(i.content||""))){for(H=0;H<D.length;H++)if(v=D[H],v.getAttribute("content")===(i.content==null?null:""+i.content)&&v.getAttribute("name")===(i.name==null?null:i.name)&&v.getAttribute("property")===(i.property==null?null:i.property)&&v.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&v.getAttribute("charset")===(i.charSet==null?null:i.charSet)){D.splice(H,1);break t}}v=a.createElement(r),Ft(v,r,i),a.head.appendChild(v);break;default:throw Error(g(468,r))}v[be]=e,rt(v),r=v}e.stateNode=r}else Av(a,e.type,e.stateNode);else e.stateNode=Rv(a,r,e.memoizedProps);else v!==r?(v===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):v.count--,r===null?Av(a,e.type,e.stateNode):Rv(a,r,e.memoizedProps)):r===null&&e.stateNode!==null&&yu(e,e.memoizedProps,i.memoizedProps)}break;case 27:ai(t,e),li(e),r&512&&(Lt||i===null||Zi(i,i.return)),i!==null&&r&4&&yu(e,e.memoizedProps,i.memoizedProps);break;case 5:if(ai(t,e),li(e),r&512&&(Lt||i===null||Zi(i,i.return)),e.flags&32){a=e.stateNode;try{dn(a,"")}catch(xe){nt(e,e.return,xe)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,yu(e,a,i!==null?i.memoizedProps:a)),r&1024&&(Cu=!0);break;case 6:if(ai(t,e),li(e),r&4){if(e.stateNode===null)throw Error(g(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(xe){nt(e,e.return,xe)}}break;case 3:if(yo=null,a=Wi,Wi=go(t.containerInfo),ai(t,e),Wi=a,li(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{Kn(t.containerInfo)}catch(xe){nt(e,e.return,xe)}Cu&&(Cu=!1,A_(e));break;case 4:r=Wi,Wi=go(e.stateNode.containerInfo),ai(t,e),li(e),Wi=r;break;case 12:ai(t,e),li(e);break;case 31:ai(t,e),li(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,io(e,r)));break;case 13:ai(t,e),li(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(so=dt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,io(e,r)));break;case 22:a=e.memoizedState!==null;var K=i!==null&&i.memoizedState!==null,se=Sr,de=Lt;if(Sr=se||a,Lt=de||K,ai(t,e),Lt=de,Sr=se,li(e),r&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(i===null||K||Sr||Lt||Ps(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){K=i=t;try{if(v=K.stateNode,a)D=v.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{H=K.stateNode;var me=K.memoizedProps.style,ne=me!=null&&me.hasOwnProperty("display")?me.display:null;H.style.display=ne==null||typeof ne=="boolean"?"":(""+ne).trim()}}catch(xe){nt(K,K.return,xe)}}}else if(t.tag===6){if(i===null){K=t;try{K.stateNode.nodeValue=a?"":K.memoizedProps}catch(xe){nt(K,K.return,xe)}}}else if(t.tag===18){if(i===null){K=t;try{var fe=K.stateNode;a?gv(fe,!0):gv(K.stateNode,!1)}catch(xe){nt(K,K.return,xe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,io(e,i))));break;case 19:ai(t,e),li(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,io(e,r)));break;case 30:break;case 21:break;default:ai(t,e),li(e)}}function li(e){var t=e.flags;if(t&2){try{for(var i,r=e.return;r!==null;){if(y_(r)){i=r;break}r=r.return}if(i==null)throw Error(g(160));switch(i.tag){case 27:var a=i.stateNode,v=Su(e);to(e,v,a);break;case 5:var D=i.stateNode;i.flags&32&&(dn(D,""),i.flags&=-33);var H=Su(e);to(e,H,D);break;case 3:case 4:var K=i.stateNode.containerInfo,se=Su(e);bu(e,se,K);break;default:throw Error(g(161))}}catch(de){nt(e,e.return,de)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function A_(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;A_(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Cr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)C_(e,t.alternate,t),t=t.sibling}function Ps(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vr(4,t,t.return),Ps(t);break;case 1:Zi(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&g_(t,t.return,i),Ps(t);break;case 27:Ia(t.stateNode);case 26:case 5:Zi(t,t.return),Ps(t);break;case 22:t.memoizedState===null&&Ps(t);break;case 30:Ps(t);break;default:Ps(t)}e=e.sibling}}function Er(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,a=e,v=t,D=v.flags;switch(v.tag){case 0:case 11:case 15:Er(a,v,i),Oa(4,v);break;case 1:if(Er(a,v,i),r=v,a=r.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(se){nt(r,r.return,se)}if(r=v,a=r.updateQueue,a!==null){var H=r.stateNode;try{var K=a.shared.hiddenCallbacks;if(K!==null)for(a.shared.hiddenCallbacks=null,a=0;a<K.length;a++)nd(K[a],H)}catch(se){nt(r,r.return,se)}}i&&D&64&&m_(v),Ba(v,v.return);break;case 27:S_(v);case 26:case 5:Er(a,v,i),i&&r===null&&D&4&&p_(v),Ba(v,v.return);break;case 12:Er(a,v,i);break;case 31:Er(a,v,i),i&&D&4&&x_(a,v);break;case 13:Er(a,v,i),i&&D&4&&R_(a,v);break;case 22:v.memoizedState===null&&Er(a,v,i),Ba(v,v.return);break;case 30:break;default:Er(a,v,i)}t=t.sibling}}function Eu(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&ya(i))}function wu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ya(e))}function Yi(e,t,i,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)T_(e,t,i,r),t=t.sibling}function T_(e,t,i,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Yi(e,t,i,r),a&2048&&Oa(9,t);break;case 1:Yi(e,t,i,r);break;case 3:Yi(e,t,i,r),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ya(e)));break;case 12:if(a&2048){Yi(e,t,i,r),e=t.stateNode;try{var v=t.memoizedProps,D=v.id,H=v.onPostCommit;typeof H=="function"&&H(D,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(K){nt(t,t.return,K)}}else Yi(e,t,i,r);break;case 31:Yi(e,t,i,r);break;case 13:Yi(e,t,i,r);break;case 23:break;case 22:v=t.stateNode,D=t.alternate,t.memoizedState!==null?v._visibility&2?Yi(e,t,i,r):ka(e,t):v._visibility&2?Yi(e,t,i,r):(v._visibility|=2,Bn(e,t,i,r,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Eu(D,t);break;case 24:Yi(e,t,i,r),a&2048&&wu(t.alternate,t);break;default:Yi(e,t,i,r)}}function Bn(e,t,i,r,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var v=e,D=t,H=i,K=r,se=D.flags;switch(D.tag){case 0:case 11:case 15:Bn(v,D,H,K,a),Oa(8,D);break;case 23:break;case 22:var de=D.stateNode;D.memoizedState!==null?de._visibility&2?Bn(v,D,H,K,a):ka(v,D):(de._visibility|=2,Bn(v,D,H,K,a)),a&&se&2048&&Eu(D.alternate,D);break;case 24:Bn(v,D,H,K,a),a&&se&2048&&wu(D.alternate,D);break;default:Bn(v,D,H,K,a)}t=t.sibling}}function ka(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,r=t,a=r.flags;switch(r.tag){case 22:ka(i,r),a&2048&&Eu(r.alternate,r);break;case 24:ka(i,r),a&2048&&wu(r.alternate,r);break;default:ka(i,r)}t=t.sibling}}var Ha=8192;function kn(e,t,i){if(e.subtreeFlags&Ha)for(e=e.child;e!==null;)M_(e,t,i),e=e.sibling}function M_(e,t,i){switch(e.tag){case 26:kn(e,t,i),e.flags&Ha&&e.memoizedState!==null&&Iy(i,Wi,e.memoizedState,e.memoizedProps);break;case 5:kn(e,t,i);break;case 3:case 4:var r=Wi;Wi=go(e.stateNode.containerInfo),kn(e,t,i),Wi=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Ha,Ha=16777216,kn(e,t,i),Ha=r):kn(e,t,i));break;default:kn(e,t,i)}}function L_(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Na(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];Ht=r,B_(r,e)}L_(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)O_(e),e=e.sibling}function O_(e){switch(e.tag){case 0:case 11:case 15:Na(e),e.flags&2048&&Vr(9,e,e.return);break;case 3:Na(e);break;case 12:Na(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ro(e)):Na(e);break;default:Na(e)}}function ro(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var r=t[i];Ht=r,B_(r,e)}L_(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vr(8,t,t.return),ro(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,ro(t));break;default:ro(t)}e=e.sibling}}function B_(e,t){for(;Ht!==null;){var i=Ht;switch(i.tag){case 0:case 11:case 15:Vr(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var r=i.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ya(i.memoizedState.cache)}if(r=i.child,r!==null)r.return=i,Ht=r;else e:for(i=e;Ht!==null;){r=Ht;var a=r.sibling,v=r.return;if(E_(r),r===i){Ht=null;break e}if(a!==null){a.return=v,Ht=a;break e}Ht=v}}}var ry={getCacheForType:function(e){var t=Ut(At),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return Ut(At).controller.signal}},sy=typeof WeakMap=="function"?WeakMap:Map,et=0,ft=null,qe=null,Ye=0,st=0,gi=null,Xr=!1,Hn=!1,xu=!1,wr=0,Et=0,$r=0,Fs=0,Ru=0,pi=0,Nn=0,ja=null,oi=null,Du=!1,so=0,k_=0,no=1/0,ao=null,Zr=null,Bt=0,Jr=null,jn=null,xr=0,Au=0,Tu=null,H_=null,za=0,Mu=null;function yi(){return(et&2)!==0&&Ye!==0?Ye&-Ye:q.T!==null?Nu():De()}function N_(){if(pi===0)if((Ye&536870912)===0||Qe){var e=Hr;Hr<<=1,(Hr&3932160)===0&&(Hr=262144),pi=e}else pi=536870912;return e=vi.current,e!==null&&(e.flags|=32),pi}function ci(e,t,i){(e===ft&&(st===2||st===9)||e.cancelPendingCommit!==null)&&(zn(e,0),es(e,Ye,pi,!1)),xs(e,i),((et&2)===0||e!==ft)&&(e===ft&&((et&2)===0&&(Fs|=i),Et===4&&es(e,Ye,pi,!1)),Ji(e))}function j_(e,t,i){if((et&6)!==0)throw Error(g(327));var r=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Nr(e,t),a=r?ly(e,t):Ou(e,t,!0),v=r;do{if(a===0){Hn&&!r&&es(e,t,0,!1);break}else{if(i=e.current.alternate,v&&!ny(i)){a=Ou(e,t,!1),v=!1;continue}if(a===2){if(v=t,e.errorRecoveryDisabledLanes&v)var D=0;else D=e.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){t=D;e:{var H=e;a=ja;var K=H.current.memoizedState.isDehydrated;if(K&&(zn(H,D).flags|=256),D=Ou(H,D,!1),D!==2){if(xu&&!K){H.errorRecoveryDisabledLanes|=v,Fs|=v,a=4;break e}v=oi,oi=a,v!==null&&(oi===null?oi=v:oi.push.apply(oi,v))}a=D}if(v=!1,a!==2)continue}}if(a===1){zn(e,0),es(e,t,0,!0);break}e:{switch(r=e,v=a,v){case 0:case 1:throw Error(g(345));case 4:if((t&4194048)!==t)break;case 6:es(r,t,pi,!Xr);break e;case 2:oi=null;break;case 3:case 5:break;default:throw Error(g(329))}if((t&62914560)===t&&(a=so+300-dt(),10<a)){if(es(r,t,pi,!Xr),ln(r,0,!0)!==0)break e;xr=t,r.timeoutHandle=_v(z_.bind(null,r,i,oi,ao,Du,t,pi,Fs,Nn,Xr,v,"Throttled",-0,0),a);break e}z_(r,i,oi,ao,Du,t,pi,Fs,Nn,Xr,v,null,-0,0)}}break}while(!0);Ji(e)}function z_(e,t,i,r,a,v,D,H,K,se,de,me,ne,fe){if(e.timeoutHandle=-1,me=t.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ur},M_(t,v,me);var xe=(v&62914560)===v?so-dt():(v&4194048)===v?k_-dt():0;if(xe=qy(me,xe),xe!==null){xr=v,e.cancelPendingCommit=xe(Y_.bind(null,e,t,v,i,r,a,D,H,K,de,me,null,ne,fe)),es(e,v,D,!se);return}}Y_(e,t,v,i,r,a,D,H,K)}function ny(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var r=0;r<i.length;r++){var a=i[r],v=a.getSnapshot;a=a.value;try{if(!di(v(),a))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function es(e,t,i,r){t&=~Ru,t&=~Fs,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var v=31-Kt(a),D=1<<v;r[v]=-1,a&=~D}i!==0&&W(e,i,t)}function lo(){return(et&6)===0?(Ua(0),!1):!0}function Lu(){if(qe!==null){if(st===0)var e=qe.return;else e=qe,_r=Os=null,Gc(e),An=null,ba=0,e=qe;for(;e!==null;)v_(e.alternate,e),e=e.return;qe=null}}function zn(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,xy(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),xr=0,Lu(),ft=e,qe=i=fr(e.current,null),Ye=t,st=0,gi=null,Xr=!1,Hn=Nr(e,t),xu=!1,Nn=pi=Ru=Fs=$r=Et=0,oi=ja=null,Du=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var a=31-Kt(r),v=1<<a;t|=e[a],r&=~v}return wr=t,Al(),i}function U_(e,t){Ue=null,q.H=Ta,t===Dn||t===Nl?(t=td(),st=3):t===Hc?(t=td(),st=4):st=t===cu?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,gi=t,qe===null&&(Et=1,Xl(e,Ri(t,e.current)))}function P_(){var e=vi.current;return e===null?!0:(Ye&4194048)===Ye?Mi===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===Mi:!1}function F_(){var e=q.H;return q.H=Ta,e===null?Ta:e}function I_(){var e=q.A;return q.A=ry,e}function oo(){Et=4,Xr||(Ye&4194048)!==Ye&&vi.current!==null||(Hn=!0),($r&134217727)===0&&(Fs&134217727)===0||ft===null||es(ft,Ye,pi,!1)}function Ou(e,t,i){var r=et;et|=2;var a=F_(),v=I_();(ft!==e||Ye!==t)&&(ao=null,zn(e,t)),t=!1;var D=Et;e:do try{if(st!==0&&qe!==null){var H=qe,K=gi;switch(st){case 8:Lu(),D=6;break e;case 3:case 2:case 9:case 6:vi.current===null&&(t=!0);var se=st;if(st=0,gi=null,Un(e,H,K,se),i&&Hn){D=0;break e}break;default:se=st,st=0,gi=null,Un(e,H,K,se)}}ay(),D=Et;break}catch(de){U_(e,de)}while(!0);return t&&e.shellSuspendCounter++,_r=Os=null,et=r,q.H=a,q.A=v,qe===null&&(ft=null,Ye=0,Al()),D}function ay(){for(;qe!==null;)q_(qe)}function ly(e,t){var i=et;et|=2;var r=F_(),a=I_();ft!==e||Ye!==t?(ao=null,no=dt()+500,zn(e,t)):Hn=Nr(e,t);e:do try{if(st!==0&&qe!==null){t=qe;var v=gi;t:switch(st){case 1:st=0,gi=null,Un(e,t,v,1);break;case 2:case 9:if(Jf(v)){st=0,gi=null,K_(t);break}t=function(){st!==2&&st!==9||ft!==e||(st=7),Ji(e)},v.then(t,t);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:Jf(v)?(st=0,gi=null,K_(t)):(st=0,gi=null,Un(e,t,v,7));break;case 5:var D=null;switch(qe.tag){case 26:D=qe.memoizedState;case 5:case 27:var H=qe;if(D?Tv(D):H.stateNode.complete){st=0,gi=null;var K=H.sibling;if(K!==null)qe=K;else{var se=H.return;se!==null?(qe=se,co(se)):qe=null}break t}}st=0,gi=null,Un(e,t,v,5);break;case 6:st=0,gi=null,Un(e,t,v,6);break;case 8:Lu(),Et=6;break e;default:throw Error(g(462))}}oy();break}catch(de){U_(e,de)}while(!0);return _r=Os=null,q.H=r,q.A=a,et=i,qe!==null?0:(ft=null,Ye=0,Al(),Et)}function oy(){for(;qe!==null&&!kr();)q_(qe)}function q_(e){var t=d_(e.alternate,e,wr);e.memoizedProps=e.pendingProps,t===null?co(e):qe=t}function K_(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=l_(i,t,t.pendingProps,t.type,void 0,Ye);break;case 11:t=l_(i,t,t.pendingProps,t.type.render,t.ref,Ye);break;case 5:Gc(t);default:v_(i,t),t=qe=If(t,wr),t=d_(i,t,wr)}e.memoizedProps=e.pendingProps,t===null?co(e):qe=t}function Un(e,t,i,r){_r=Os=null,Gc(t),An=null,ba=0;var a=t.return;try{if(Xp(e,a,t,i,Ye)){Et=1,Xl(e,Ri(i,e.current)),qe=null;return}}catch(v){if(a!==null)throw qe=a,v;Et=1,Xl(e,Ri(i,e.current)),qe=null;return}t.flags&32768?(Qe||r===1?e=!0:Hn||(Ye&536870912)!==0?e=!1:(Xr=e=!0,(r===2||r===9||r===3||r===6)&&(r=vi.current,r!==null&&r.tag===13&&(r.flags|=16384))),W_(t,e)):co(t)}function co(e){var t=e;do{if((t.flags&32768)!==0){W_(t,Xr);return}e=t.return;var i=Jp(t.alternate,t,wr);if(i!==null){qe=i;return}if(t=t.sibling,t!==null){qe=t;return}qe=t=e}while(t!==null);Et===0&&(Et=5)}function W_(e,t){do{var i=ey(e.alternate,e);if(i!==null){i.flags&=32767,qe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){qe=e;return}qe=e=i}while(e!==null);Et=6,qe=null}function Y_(e,t,i,r,a,v,D,H,K){e.cancelPendingCommit=null;do uo();while(Bt!==0);if((et&6)!==0)throw Error(g(327));if(t!==null){if(t===e.current)throw Error(g(177));if(v=t.lanes|t.childLanes,v|=Sc,Zo(e,i,v,D,H,K),e===ft&&(qe=ft=null,Ye=0),jn=t,Jr=e,xr=i,Au=v,Tu=a,H_=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,fy(yt,function(){return $_(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=q.T,q.T=null,a=J.p,J.p=2,D=et,et|=4;try{ty(e,t,i)}finally{et=D,J.p=a,q.T=r}}Bt=1,G_(),Q_(),V_()}}function G_(){if(Bt===1){Bt=0;var e=Jr,t=jn,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=q.T,q.T=null;var r=J.p;J.p=2;var a=et;et|=4;try{D_(t,e);var v=Ku,D=Bf(e.containerInfo),H=v.focusedElem,K=v.selectionRange;if(D!==H&&H&&H.ownerDocument&&Of(H.ownerDocument.documentElement,H)){if(K!==null&&vc(H)){var se=K.start,de=K.end;if(de===void 0&&(de=se),"selectionStart"in H)H.selectionStart=se,H.selectionEnd=Math.min(de,H.value.length);else{var me=H.ownerDocument||document,ne=me&&me.defaultView||window;if(ne.getSelection){var fe=ne.getSelection(),xe=H.textContent.length,ke=Math.min(K.start,xe),ct=K.end===void 0?ke:Math.min(K.end,xe);!fe.extend&&ke>ct&&(D=ct,ct=ke,ke=D);var ee=Lf(H,ke),V=Lf(H,ct);if(ee&&V&&(fe.rangeCount!==1||fe.anchorNode!==ee.node||fe.anchorOffset!==ee.offset||fe.focusNode!==V.node||fe.focusOffset!==V.offset)){var re=me.createRange();re.setStart(ee.node,ee.offset),fe.removeAllRanges(),ke>ct?(fe.addRange(re),fe.extend(V.node,V.offset)):(re.setEnd(V.node,V.offset),fe.addRange(re))}}}}for(me=[],fe=H;fe=fe.parentNode;)fe.nodeType===1&&me.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<me.length;H++){var _e=me[H];_e.element.scrollLeft=_e.left,_e.element.scrollTop=_e.top}}Eo=!!qu,Ku=qu=null}finally{et=a,J.p=r,q.T=i}}e.current=t,Bt=2}}function Q_(){if(Bt===2){Bt=0;var e=Jr,t=jn,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=q.T,q.T=null;var r=J.p;J.p=2;var a=et;et|=4;try{C_(e,t.alternate,t)}finally{et=a,J.p=r,q.T=i}}Bt=3}}function V_(){if(Bt===4||Bt===3){Bt=0,St();var e=Jr,t=jn,i=xr,r=H_;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Bt=5:(Bt=0,jn=Jr=null,X_(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Zr=null),ye(i),t=t.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(jt,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=q.T,a=J.p,J.p=2,q.T=null;try{for(var v=e.onRecoverableError,D=0;D<r.length;D++){var H=r[D];v(H.value,{componentStack:H.stack})}}finally{q.T=t,J.p=a}}(xr&3)!==0&&uo(),Ji(e),a=e.pendingLanes,(i&261930)!==0&&(a&42)!==0?e===Mu?za++:(za=0,Mu=e):za=0,Ua(0)}}function X_(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ya(t)))}function uo(){return G_(),Q_(),V_(),$_()}function $_(){if(Bt!==5)return!1;var e=Jr,t=Au;Au=0;var i=ye(xr),r=q.T,a=J.p;try{J.p=32>i?32:i,q.T=null,i=Tu,Tu=null;var v=Jr,D=xr;if(Bt=0,jn=Jr=null,xr=0,(et&6)!==0)throw Error(g(331));var H=et;if(et|=4,O_(v.current),T_(v,v.current,D,i),et=H,Ua(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(jt,v)}catch{}return!0}finally{J.p=a,q.T=r,X_(e,t)}}function Z_(e,t,i){t=Ri(i,t),t=ou(e.stateNode,t,2),e=Yr(e,t,2),e!==null&&(xs(e,2),Ji(e))}function nt(e,t,i){if(e.tag===3)Z_(e,e,i);else for(;t!==null;){if(t.tag===3){Z_(t,e,i);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Zr===null||!Zr.has(r))){e=Ri(i,e),i=Jd(2),r=Yr(t,i,2),r!==null&&(e_(i,r,t,e),xs(r,2),Ji(r));break}}t=t.return}}function Bu(e,t,i){var r=e.pingCache;if(r===null){r=e.pingCache=new sy;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(i)||(xu=!0,a.add(i),e=cy.bind(null,e,t,i),t.then(e,e))}function cy(e,t,i){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,ft===e&&(Ye&i)===i&&(Et===4||Et===3&&(Ye&62914560)===Ye&&300>dt()-so?(et&2)===0&&zn(e,0):Ru|=i,Nn===Ye&&(Nn=0)),Ji(e)}function J_(e,t){t===0&&(t=ws()),e=Ts(e,t),e!==null&&(xs(e,t),Ji(e))}function uy(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),J_(e,i)}function hy(e,t){var i=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(i=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(g(314))}r!==null&&r.delete(t),J_(e,i)}function fy(e,t){return lr(e,t)}var ho=null,Pn=null,ku=!1,fo=!1,Hu=!1,ts=0;function Ji(e){e!==Pn&&e.next===null&&(Pn===null?ho=Pn=e:Pn=Pn.next=e),fo=!0,ku||(ku=!0,_y())}function Ua(e,t){if(!Hu&&fo){Hu=!0;do for(var i=!1,r=ho;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var v=0;else{var D=r.suspendedLanes,H=r.pingedLanes;v=(1<<31-Kt(42|e)+1)-1,v&=a&~(D&~H),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(i=!0,rv(r,v))}else v=Ye,v=ln(r,r===ft?v:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(v&3)===0||Nr(r,v)||(i=!0,rv(r,v));r=r.next}while(i);Hu=!1}}function dy(){ev()}function ev(){fo=ku=!1;var e=0;ts!==0&&wy()&&(e=ts);for(var t=dt(),i=null,r=ho;r!==null;){var a=r.next,v=tv(r,t);v===0?(r.next=null,i===null?ho=a:i.next=a,a===null&&(Pn=i)):(i=r,(e!==0||(v&3)!==0)&&(fo=!0)),r=a}Bt!==0&&Bt!==5||Ua(e),ts!==0&&(ts=0)}function tv(e,t){for(var i=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,v=e.pendingLanes&-62914561;0<v;){var D=31-Kt(v),H=1<<D,K=a[D];K===-1?((H&i)===0||(H&r)!==0)&&(a[D]=on(H,t)):K<=t&&(e.expiredLanes|=H),v&=~H}if(t=ft,i=Ye,i=ln(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===t&&(st===2||st===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&or(r),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Nr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(r!==null&&or(r),ye(i)){case 2:case 8:i=It;break;case 32:i=yt;break;case 268435456:i=fi;break;default:i=yt}return r=iv.bind(null,e),i=lr(i,r),e.callbackPriority=t,e.callbackNode=i,t}return r!==null&&r!==null&&or(r),e.callbackPriority=2,e.callbackNode=null,2}function iv(e,t){if(Bt!==0&&Bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(uo()&&e.callbackNode!==i)return null;var r=Ye;return r=ln(e,e===ft?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(j_(e,r,t),tv(e,dt()),e.callbackNode!=null&&e.callbackNode===i?iv.bind(null,e):null)}function rv(e,t){if(uo())return null;j_(e,t,!0)}function _y(){Ry(function(){(et&6)!==0?lr(Ci,dy):ev()})}function Nu(){if(ts===0){var e=xn;e===0&&(e=Es,Es<<=1,(Es&261888)===0&&(Es=256)),ts=e}return ts}function sv(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Sl(""+e)}function nv(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function vy(e,t,i,r,a){if(t==="submit"&&i&&i.stateNode===a){var v=sv((a[we]||null).action),D=r.submitter;D&&(t=(t=D[we]||null)?sv(t.formAction):D.getAttribute("formAction"),t!==null&&(v=t,D=null));var H=new wl("action","action",null,r,a);e.push({event:H,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(ts!==0){var K=D?nv(a,D):new FormData(a);iu(i,{pending:!0,data:K,method:a.method,action:v},null,K)}}else typeof v=="function"&&(H.preventDefault(),K=D?nv(a,D):new FormData(a),iu(i,{pending:!0,data:K,method:a.method,action:v},v,K))},currentTarget:a}]})}}for(var ju=0;ju<yc.length;ju++){var zu=yc[ju],my=zu.toLowerCase(),gy=zu[0].toUpperCase()+zu.slice(1);Ki(my,"on"+gy)}Ki(Nf,"onAnimationEnd"),Ki(jf,"onAnimationIteration"),Ki(zf,"onAnimationStart"),Ki("dblclick","onDoubleClick"),Ki("focusin","onFocus"),Ki("focusout","onBlur"),Ki(Bp,"onTransitionRun"),Ki(kp,"onTransitionStart"),Ki(Hp,"onTransitionCancel"),Ki(Uf,"onTransitionEnd"),qi("onMouseEnter",["mouseout","mouseover"]),qi("onMouseLeave",["mouseout","mouseover"]),qi("onPointerEnter",["pointerout","pointerover"]),qi("onPointerLeave",["pointerout","pointerover"]),Qt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qt("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pa="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(" "),py=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pa));function av(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var r=e[i],a=r.event;r=r.listeners;e:{var v=void 0;if(t)for(var D=r.length-1;0<=D;D--){var H=r[D],K=H.instance,se=H.currentTarget;if(H=H.listener,K!==v&&a.isPropagationStopped())break e;v=H,a.currentTarget=se;try{v(a)}catch(de){Dl(de)}a.currentTarget=null,v=K}else for(D=0;D<r.length;D++){if(H=r[D],K=H.instance,se=H.currentTarget,H=H.listener,K!==v&&a.isPropagationStopped())break e;v=H,a.currentTarget=se;try{v(a)}catch(de){Dl(de)}a.currentTarget=null,v=K}}}}function Ke(e,t){var i=t[Te];i===void 0&&(i=t[Te]=new Set);var r=e+"__bubble";i.has(r)||(lv(t,e,2,!1),i.add(r))}function Uu(e,t,i){var r=0;t&&(r|=4),lv(i,e,r,t)}var _o="_reactListening"+Math.random().toString(36).slice(2);function Pu(e){if(!e[_o]){e[_o]=!0,un.forEach(function(i){i!=="selectionchange"&&(py.has(i)||Uu(i,!1,e),Uu(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_o]||(t[_o]=!0,Uu("selectionchange",!1,t))}}function lv(e,t,i,r){switch(Nv(t)){case 2:var a=Yy;break;case 8:a=Gy;break;default:a=th}i=a.bind(null,t,i,e),a=void 0,!ac||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,i,{capture:!0,passive:a}):e.addEventListener(t,i,!0):a!==void 0?e.addEventListener(t,i,{passive:a}):e.addEventListener(t,i,!1)}function Fu(e,t,i,r,a){var v=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var D=r.tag;if(D===3||D===4){var H=r.stateNode.containerInfo;if(H===a)break;if(D===4)for(D=r.return;D!==null;){var K=D.tag;if((K===3||K===4)&&D.stateNode.containerInfo===a)return;D=D.return}for(;H!==null;){if(D=$e(H),D===null)return;if(K=D.tag,K===5||K===6||K===26||K===27){r=v=D;continue e}H=H.parentNode}}r=r.return}ff(function(){var se=v,de=sc(i),me=[];e:{var ne=Pf.get(e);if(ne!==void 0){var fe=wl,xe=e;switch(e){case"keypress":if(Cl(i)===0)break e;case"keydown":case"keyup":fe=hp;break;case"focusin":xe="focus",fe=uc;break;case"focusout":xe="blur",fe=uc;break;case"beforeblur":case"afterblur":fe=uc;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=vf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=Jg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=_p;break;case Nf:case jf:case zf:fe=ip;break;case Uf:fe=mp;break;case"scroll":case"scrollend":fe=$g;break;case"wheel":fe=pp;break;case"copy":case"cut":case"paste":fe=sp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=gf;break;case"toggle":case"beforetoggle":fe=Sp}var ke=(t&4)!==0,ct=!ke&&(e==="scroll"||e==="scrollend"),ee=ke?ne!==null?ne+"Capture":null:ne;ke=[];for(var V=se,re;V!==null;){var _e=V;if(re=_e.stateNode,_e=_e.tag,_e!==5&&_e!==26&&_e!==27||re===null||ee===null||(_e=oa(V,ee),_e!=null&&ke.push(Fa(V,_e,re))),ct)break;V=V.return}0<ke.length&&(ne=new fe(ne,xe,null,i,de),me.push({event:ne,listeners:ke}))}}if((t&7)===0){e:{if(ne=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",ne&&i!==rc&&(xe=i.relatedTarget||i.fromElement)&&($e(xe)||xe[Le]))break e;if((fe||ne)&&(ne=de.window===de?de:(ne=de.ownerDocument)?ne.defaultView||ne.parentWindow:window,fe?(xe=i.relatedTarget||i.toElement,fe=se,xe=xe?$e(xe):null,xe!==null&&(ct=T(xe),ke=xe.tag,xe!==ct||ke!==5&&ke!==27&&ke!==6)&&(xe=null)):(fe=null,xe=se),fe!==xe)){if(ke=vf,_e="onMouseLeave",ee="onMouseEnter",V="mouse",(e==="pointerout"||e==="pointerover")&&(ke=gf,_e="onPointerLeave",ee="onPointerEnter",V="pointer"),ct=fe==null?ne:Ii(fe),re=xe==null?ne:Ii(xe),ne=new ke(_e,V+"leave",fe,i,de),ne.target=ct,ne.relatedTarget=re,_e=null,$e(de)===se&&(ke=new ke(ee,V+"enter",xe,i,de),ke.target=re,ke.relatedTarget=ct,_e=ke),ct=_e,fe&&xe)t:{for(ke=yy,ee=fe,V=xe,re=0,_e=ee;_e;_e=ke(_e))re++;_e=0;for(var Oe=V;Oe;Oe=ke(Oe))_e++;for(;0<re-_e;)ee=ke(ee),re--;for(;0<_e-re;)V=ke(V),_e--;for(;re--;){if(ee===V||V!==null&&ee===V.alternate){ke=ee;break t}ee=ke(ee),V=ke(V)}ke=null}else ke=null;fe!==null&&ov(me,ne,fe,ke,!1),xe!==null&&ct!==null&&ov(me,ct,xe,ke,!0)}}e:{if(ne=se?Ii(se):window,fe=ne.nodeName&&ne.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ne.type==="file")var Ze=xf;else if(Ef(ne))if(Rf)Ze=Mp;else{Ze=Ap;var Re=Dp}else fe=ne.nodeName,!fe||fe.toLowerCase()!=="input"||ne.type!=="checkbox"&&ne.type!=="radio"?se&&ic(se.elementType)&&(Ze=xf):Ze=Tp;if(Ze&&(Ze=Ze(e,se))){wf(me,Ze,i,de);break e}Re&&Re(e,ne,se),e==="focusout"&&se&&ne.type==="number"&&se.memoizedProps.value!=null&&tc(ne,"number",ne.value)}switch(Re=se?Ii(se):window,e){case"focusin":(Ef(Re)||Re.contentEditable==="true")&&(gn=Re,mc=se,ma=null);break;case"focusout":ma=mc=gn=null;break;case"mousedown":gc=!0;break;case"contextmenu":case"mouseup":case"dragend":gc=!1,kf(me,i,de);break;case"selectionchange":if(Op)break;case"keydown":case"keyup":kf(me,i,de)}var Pe;if(fc)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 mn?bf(e,i)&&(Ge="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ge="onCompositionStart");Ge&&(pf&&i.locale!=="ko"&&(mn||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&mn&&(Pe=df()):(Ur=de,lc="value"in Ur?Ur.value:Ur.textContent,mn=!0)),Re=vo(se,Ge),0<Re.length&&(Ge=new mf(Ge,e,null,i,de),me.push({event:Ge,listeners:Re}),Pe?Ge.data=Pe:(Pe=Cf(i),Pe!==null&&(Ge.data=Pe)))),(Pe=Cp?Ep(e,i):wp(e,i))&&(Ge=vo(se,"onBeforeInput"),0<Ge.length&&(Re=new mf("onBeforeInput","beforeinput",null,i,de),me.push({event:Re,listeners:Ge}),Re.data=Pe)),vy(me,e,se,i,de)}av(me,t)})}function Fa(e,t,i){return{instance:e,listener:t,currentTarget:i}}function vo(e,t){for(var i=t+"Capture",r=[];e!==null;){var a=e,v=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||v===null||(a=oa(e,i),a!=null&&r.unshift(Fa(e,a,v)),a=oa(e,t),a!=null&&r.push(Fa(e,a,v))),e.tag===3)return r;e=e.return}return[]}function yy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ov(e,t,i,r,a){for(var v=t._reactName,D=[];i!==null&&i!==r;){var H=i,K=H.alternate,se=H.stateNode;if(H=H.tag,K!==null&&K===r)break;H!==5&&H!==26&&H!==27||se===null||(K=se,a?(se=oa(i,v),se!=null&&D.unshift(Fa(i,se,K))):a||(se=oa(i,v),se!=null&&D.push(Fa(i,se,K)))),i=i.return}D.length!==0&&e.push({event:t,listeners:D})}var Sy=/\r\n?/g,by=/\u0000|\uFFFD/g;function cv(e){return(typeof e=="string"?e:""+e).replace(Sy,`
49
+ `).replace(by,"")}function uv(e,t){return t=cv(t),cv(e)===t}function ot(e,t,i,r,a,v){switch(i){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||dn(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&dn(e,""+r);break;case"className":ht(e,"class",r);break;case"tabIndex":ht(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ht(e,i,r);break;case"style":uf(e,r,v);break;case"data":if(t!=="object"){ht(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Sl(""+r),e.setAttribute(i,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(i==="formAction"?(t!=="input"&&ot(e,t,"name",a.name,a,null),ot(e,t,"formEncType",a.formEncType,a,null),ot(e,t,"formMethod",a.formMethod,a,null),ot(e,t,"formTarget",a.formTarget,a,null)):(ot(e,t,"encType",a.encType,a,null),ot(e,t,"method",a.method,a,null),ot(e,t,"target",a.target,a,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=Sl(""+r),e.setAttribute(i,r);break;case"onClick":r!=null&&(e.onclick=ur);break;case"onScroll":r!=null&&Ke("scroll",e);break;case"onScrollEnd":r!=null&&Ke("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(g(61));if(i=r.__html,i!=null){if(a.children!=null)throw Error(g(60));e.innerHTML=i}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}i=Sl(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""+r):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":r===!0?e.setAttribute(i,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,r):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(i,r):e.removeAttribute(i);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(i):e.setAttribute(i,r);break;case"popover":Ke("beforetoggle",e),Ke("toggle",e),Ei(e,"popover",r);break;case"xlinkActuate":ri(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ri(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ri(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ri(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ri(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ri(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ri(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ri(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ri(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ei(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Vg.get(i)||i,Ei(e,i,r))}}function Iu(e,t,i,r,a,v){switch(i){case"style":uf(e,r,v);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(g(61));if(i=r.__html,i!=null){if(a.children!=null)throw Error(g(60));e.innerHTML=i}}break;case"children":typeof r=="string"?dn(e,r):(typeof r=="number"||typeof r=="bigint")&&dn(e,""+r);break;case"onScroll":r!=null&&Ke("scroll",e);break;case"onScrollEnd":r!=null&&Ke("scrollend",e);break;case"onClick":r!=null&&(e.onclick=ur);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jr.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(a=i.endsWith("Capture"),t=i.slice(2,a?i.length-7:void 0),v=e[we]||null,v=v!=null?v[i]:null,typeof v=="function"&&e.removeEventListener(t,v,a),typeof r=="function")){typeof v!="function"&&v!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,r,a);break e}i in e?e[i]=r:r===!0?e.setAttribute(i,""):Ei(e,i,r)}}}function Ft(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ke("error",e),Ke("load",e);var r=!1,a=!1,v;for(v in i)if(i.hasOwnProperty(v)){var D=i[v];if(D!=null)switch(v){case"src":r=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(g(137,t));default:ot(e,t,v,D,i,null)}}a&&ot(e,t,"srcSet",i.srcSet,i,null),r&&ot(e,t,"src",i.src,i,null);return;case"input":Ke("invalid",e);var H=v=D=a=null,K=null,se=null;for(r in i)if(i.hasOwnProperty(r)){var de=i[r];if(de!=null)switch(r){case"name":a=de;break;case"type":D=de;break;case"checked":K=de;break;case"defaultChecked":se=de;break;case"value":v=de;break;case"defaultValue":H=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(g(137,t));break;default:ot(e,t,r,de,i,null)}}af(e,v,H,K,se,D,a,!1);return;case"select":Ke("invalid",e),r=D=v=null;for(a in i)if(i.hasOwnProperty(a)&&(H=i[a],H!=null))switch(a){case"value":v=H;break;case"defaultValue":D=H;break;case"multiple":r=H;default:ot(e,t,a,H,i,null)}t=v,i=D,e.multiple=!!r,t!=null?fn(e,!!r,t,!1):i!=null&&fn(e,!!r,i,!0);return;case"textarea":Ke("invalid",e),v=a=r=null;for(D in i)if(i.hasOwnProperty(D)&&(H=i[D],H!=null))switch(D){case"value":r=H;break;case"defaultValue":a=H;break;case"children":v=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(g(91));break;default:ot(e,t,D,H,i,null)}of(e,r,a,v);return;case"option":for(K in i)if(i.hasOwnProperty(K)&&(r=i[K],r!=null))switch(K){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:ot(e,t,K,r,i,null)}return;case"dialog":Ke("beforetoggle",e),Ke("toggle",e),Ke("cancel",e),Ke("close",e);break;case"iframe":case"object":Ke("load",e);break;case"video":case"audio":for(r=0;r<Pa.length;r++)Ke(Pa[r],e);break;case"image":Ke("error",e),Ke("load",e);break;case"details":Ke("toggle",e);break;case"embed":case"source":case"link":Ke("error",e),Ke("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(se in i)if(i.hasOwnProperty(se)&&(r=i[se],r!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(g(137,t));default:ot(e,t,se,r,i,null)}return;default:if(ic(t)){for(de in i)i.hasOwnProperty(de)&&(r=i[de],r!==void 0&&Iu(e,t,de,r,i,void 0));return}}for(H in i)i.hasOwnProperty(H)&&(r=i[H],r!=null&&ot(e,t,H,r,i,null))}function Cy(e,t,i,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,v=null,D=null,H=null,K=null,se=null,de=null;for(fe in i){var me=i[fe];if(i.hasOwnProperty(fe)&&me!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":K=me;default:r.hasOwnProperty(fe)||ot(e,t,fe,null,r,me)}}for(var ne in r){var fe=r[ne];if(me=i[ne],r.hasOwnProperty(ne)&&(fe!=null||me!=null))switch(ne){case"type":v=fe;break;case"name":a=fe;break;case"checked":se=fe;break;case"defaultChecked":de=fe;break;case"value":D=fe;break;case"defaultValue":H=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(g(137,t));break;default:fe!==me&&ot(e,t,ne,fe,r,me)}}ec(e,D,H,K,se,de,v,a);return;case"select":fe=D=H=ne=null;for(v in i)if(K=i[v],i.hasOwnProperty(v)&&K!=null)switch(v){case"value":break;case"multiple":fe=K;default:r.hasOwnProperty(v)||ot(e,t,v,null,r,K)}for(a in r)if(v=r[a],K=i[a],r.hasOwnProperty(a)&&(v!=null||K!=null))switch(a){case"value":ne=v;break;case"defaultValue":H=v;break;case"multiple":D=v;default:v!==K&&ot(e,t,a,v,r,K)}t=H,i=D,r=fe,ne!=null?fn(e,!!i,ne,!1):!!r!=!!i&&(t!=null?fn(e,!!i,t,!0):fn(e,!!i,i?[]:"",!1));return;case"textarea":fe=ne=null;for(H in i)if(a=i[H],i.hasOwnProperty(H)&&a!=null&&!r.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:ot(e,t,H,null,r,a)}for(D in r)if(a=r[D],v=i[D],r.hasOwnProperty(D)&&(a!=null||v!=null))switch(D){case"value":ne=a;break;case"defaultValue":fe=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(g(91));break;default:a!==v&&ot(e,t,D,a,r,v)}lf(e,ne,fe);return;case"option":for(var xe in i)if(ne=i[xe],i.hasOwnProperty(xe)&&ne!=null&&!r.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:ot(e,t,xe,null,r,ne)}for(K in r)if(ne=r[K],fe=i[K],r.hasOwnProperty(K)&&ne!==fe&&(ne!=null||fe!=null))switch(K){case"selected":e.selected=ne&&typeof ne!="function"&&typeof ne!="symbol";break;default:ot(e,t,K,ne,r,fe)}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 i)ne=i[ke],i.hasOwnProperty(ke)&&ne!=null&&!r.hasOwnProperty(ke)&&ot(e,t,ke,null,r,ne);for(se in r)if(ne=r[se],fe=i[se],r.hasOwnProperty(se)&&ne!==fe&&(ne!=null||fe!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(g(137,t));break;default:ot(e,t,se,ne,r,fe)}return;default:if(ic(t)){for(var ct in i)ne=i[ct],i.hasOwnProperty(ct)&&ne!==void 0&&!r.hasOwnProperty(ct)&&Iu(e,t,ct,void 0,r,ne);for(de in r)ne=r[de],fe=i[de],!r.hasOwnProperty(de)||ne===fe||ne===void 0&&fe===void 0||Iu(e,t,de,ne,r,fe);return}}for(var ee in i)ne=i[ee],i.hasOwnProperty(ee)&&ne!=null&&!r.hasOwnProperty(ee)&&ot(e,t,ee,null,r,ne);for(me in r)ne=r[me],fe=i[me],!r.hasOwnProperty(me)||ne===fe||ne==null&&fe==null||ot(e,t,me,ne,r,fe)}function hv(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ey(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),r=0;r<i.length;r++){var a=i[r],v=a.transferSize,D=a.initiatorType,H=a.duration;if(v&&H&&hv(D)){for(D=0,H=a.responseEnd,r+=1;r<i.length;r++){var K=i[r],se=K.startTime;if(se>H)break;var de=K.transferSize,me=K.initiatorType;de&&hv(me)&&(K=K.responseEnd,D+=de*(K<H?1:(H-se)/(K-se)))}if(--r,t+=8*(v+D)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var qu=null,Ku=null;function mo(e){return e.nodeType===9?e:e.ownerDocument}function fv(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 dv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Wu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yu=null;function wy(){var e=window.event;return e&&e.type==="popstate"?e===Yu?!1:(Yu=e,!0):(Yu=null,!1)}var _v=typeof setTimeout=="function"?setTimeout:void 0,xy=typeof clearTimeout=="function"?clearTimeout:void 0,vv=typeof Promise=="function"?Promise:void 0,Ry=typeof queueMicrotask=="function"?queueMicrotask:typeof vv<"u"?function(e){return vv.resolve(null).then(e).catch(Dy)}:_v;function Dy(e){setTimeout(function(){throw e})}function is(e){return e==="head"}function mv(e,t){var i=t,r=0;do{var a=i.nextSibling;if(e.removeChild(i),a&&a.nodeType===8)if(i=a.data,i==="/$"||i==="/&"){if(r===0){e.removeChild(a),Kn(t);return}r--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")r++;else if(i==="html")Ia(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Ia(i);for(var v=i.firstChild;v;){var D=v.nextSibling,H=v.nodeName;v[gt]||H==="SCRIPT"||H==="STYLE"||H==="LINK"&&v.rel.toLowerCase()==="stylesheet"||i.removeChild(v),v=D}}else i==="body"&&Ia(e.ownerDocument.body);i=a}while(i);Kn(t)}function gv(e,t){var i=e;e=0;do{var r=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),r&&r.nodeType===8)if(i=r.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=r}while(i)}function Gu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Gu(i),it(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function Ay(e,t,i,r){for(;e.nodeType===1;){var a=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[gt])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(v=e.getAttribute("rel"),v==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(v!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(v=e.getAttribute("src"),(v!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&v&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var v=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===v)return e}else return e;if(e=Li(e.nextSibling),e===null)break}return null}function Ty(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Li(e.nextSibling),e===null))return null;return e}function pv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Li(e.nextSibling),e===null))return null;return e}function Qu(e){return e.data==="$?"||e.data==="$~"}function Vu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function My(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var r=function(){t(),i.removeEventListener("DOMContentLoaded",r)};i.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Li(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Xu=null;function yv(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Li(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Sv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function bv(e,t,i){switch(t=mo(i),e){case"html":if(e=t.documentElement,!e)throw Error(g(452));return e;case"head":if(e=t.head,!e)throw Error(g(453));return e;case"body":if(e=t.body,!e)throw Error(g(454));return e;default:throw Error(g(451))}}function Ia(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);it(e)}var Oi=new Map,Cv=new Set;function go(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Rr=J.d;J.d={f:Ly,r:Oy,D:By,C:ky,L:Hy,m:Ny,X:zy,S:jy,M:Uy};function Ly(){var e=Rr.f(),t=lo();return e||t}function Oy(e){var t=ii(e);t!==null&&t.tag===5&&t.type==="form"?Ud(t):Rr.r(e)}var Fn=typeof document>"u"?null:document;function Ev(e,t,i){var r=Fn;if(r&&typeof t=="string"&&t){var a=wi(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof i=="string"&&(a+='[crossorigin="'+i+'"]'),Cv.has(a)||(Cv.add(a),e={rel:e,crossOrigin:i,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),Ft(t,"link",e),rt(t),r.head.appendChild(t)))}}function By(e){Rr.D(e),Ev("dns-prefetch",e,null)}function ky(e,t){Rr.C(e,t),Ev("preconnect",e,t)}function Hy(e,t,i){Rr.L(e,t,i);var r=Fn;if(r&&e&&t){var a='link[rel="preload"][as="'+wi(t)+'"]';t==="image"&&i&&i.imageSrcSet?(a+='[imagesrcset="'+wi(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(a+='[imagesizes="'+wi(i.imageSizes)+'"]')):a+='[href="'+wi(e)+'"]';var v=a;switch(t){case"style":v=In(e);break;case"script":v=qn(e)}Oi.has(v)||(e=m({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Oi.set(v,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(qa(v))||t==="script"&&r.querySelector(Ka(v))||(t=r.createElement("link"),Ft(t,"link",e),rt(t),r.head.appendChild(t)))}}function Ny(e,t){Rr.m(e,t);var i=Fn;if(i&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+wi(r)+'"][href="'+wi(e)+'"]',v=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=qn(e)}if(!Oi.has(v)&&(e=m({rel:"modulepreload",href:e},t),Oi.set(v,e),i.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ka(v)))return}r=i.createElement("link"),Ft(r,"link",e),rt(r),i.head.appendChild(r)}}}function jy(e,t,i){Rr.S(e,t,i);var r=Fn;if(r&&e){var a=Gt(r).hoistableStyles,v=In(e);t=t||"default";var D=a.get(v);if(!D){var H={loading:0,preload:null};if(D=r.querySelector(qa(v)))H.loading=5;else{e=m({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Oi.get(v))&&$u(e,i);var K=D=r.createElement("link");rt(K),Ft(K,"link",e),K._p=new Promise(function(se,de){K.onload=se,K.onerror=de}),K.addEventListener("load",function(){H.loading|=1}),K.addEventListener("error",function(){H.loading|=2}),H.loading|=4,po(D,t,r)}D={type:"stylesheet",instance:D,count:1,state:H},a.set(v,D)}}}function zy(e,t){Rr.X(e,t);var i=Fn;if(i&&e){var r=Gt(i).hoistableScripts,a=qn(e),v=r.get(a);v||(v=i.querySelector(Ka(a)),v||(e=m({src:e,async:!0},t),(t=Oi.get(a))&&Zu(e,t),v=i.createElement("script"),rt(v),Ft(v,"link",e),i.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},r.set(a,v))}}function Uy(e,t){Rr.M(e,t);var i=Fn;if(i&&e){var r=Gt(i).hoistableScripts,a=qn(e),v=r.get(a);v||(v=i.querySelector(Ka(a)),v||(e=m({src:e,async:!0,type:"module"},t),(t=Oi.get(a))&&Zu(e,t),v=i.createElement("script"),rt(v),Ft(v,"link",e),i.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},r.set(a,v))}}function wv(e,t,i,r){var a=(a=Y.current)?go(a):null;if(!a)throw Error(g(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=In(i.href),i=Gt(a).hoistableStyles,r=i.get(t),r||(r={type:"style",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=In(i.href);var v=Gt(a).hoistableStyles,D=v.get(e);if(D||(a=a.ownerDocument||a,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(e,D),(v=a.querySelector(qa(e)))&&!v._p&&(D.instance=v,D.state.loading=5),Oi.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Oi.set(e,i),v||Py(a,e,i,D.state))),t&&r===null)throw Error(g(528,""));return D}if(t&&r!==null)throw Error(g(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=qn(i),i=Gt(a).hoistableScripts,r=i.get(t),r||(r={type:"script",instance:null,count:0,state:null},i.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(g(444,e))}}function In(e){return'href="'+wi(e)+'"'}function qa(e){return'link[rel="stylesheet"]['+e+"]"}function xv(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Py(e,t,i,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),Ft(t,"link",i),rt(t),e.head.appendChild(t))}function qn(e){return'[src="'+wi(e)+'"]'}function Ka(e){return"script[async]"+e}function Rv(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+wi(i.href)+'"]');if(r)return t.instance=r,rt(r),r;var a=m({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),rt(r),Ft(r,"style",a),po(r,i.precedence,e),t.instance=r;case"stylesheet":a=In(i.href);var v=e.querySelector(qa(a));if(v)return t.state.loading|=4,t.instance=v,rt(v),v;r=xv(i),(a=Oi.get(a))&&$u(r,a),v=(e.ownerDocument||e).createElement("link"),rt(v);var D=v;return D._p=new Promise(function(H,K){D.onload=H,D.onerror=K}),Ft(v,"link",r),t.state.loading|=4,po(v,i.precedence,e),t.instance=v;case"script":return v=qn(i.src),(a=e.querySelector(Ka(v)))?(t.instance=a,rt(a),a):(r=i,(a=Oi.get(v))&&(r=m({},i),Zu(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),rt(a),Ft(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(g(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,po(r,i.precedence,e));return t.instance}function po(e,t,i){for(var r=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,v=a,D=0;D<r.length;D++){var H=r[D];if(H.dataset.precedence===t)v=H;else if(v!==a)break}v?v.parentNode.insertBefore(e,v.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function $u(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Zu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var yo=null;function Dv(e,t,i){if(yo===null){var r=new Map,a=yo=new Map;a.set(i,r)}else a=yo,r=a.get(i),r||(r=new Map,a.set(i,r));if(r.has(e))return r;for(r.set(e,null),i=i.getElementsByTagName(e),a=0;a<i.length;a++){var v=i[a];if(!(v[gt]||v[be]||e==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var D=v.getAttribute(t)||"";D=e+D;var H=r.get(D);H?H.push(v):r.set(D,[v])}}return r}function Av(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Fy(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Tv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Iy(e,t,i,r){if(i.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var a=In(r.href),v=t.querySelector(qa(a));if(v){t=v._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=So.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=v,rt(v);return}v=t.ownerDocument||t,r=xv(r),(a=Oi.get(a))&&$u(r,a),v=v.createElement("link"),rt(v);var D=v;D._p=new Promise(function(H,K){D.onload=H,D.onerror=K}),Ft(v,"link",r),i.instance=v}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=So.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Ju=0;function qy(e,t){return e.stylesheets&&e.count===0&&Co(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var r=setTimeout(function(){if(e.stylesheets&&Co(e,e.stylesheets),e.unsuspend){var v=e.unsuspend;e.unsuspend=null,v()}},6e4+t);0<e.imgBytes&&Ju===0&&(Ju=62500*Ey());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Co(e,e.stylesheets),e.unsuspend)){var v=e.unsuspend;e.unsuspend=null,v()}},(e.imgBytes>Ju?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function So(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Co(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var bo=null;function Co(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,bo=new Map,t.forEach(Ky,e),bo=null,So.call(e))}function Ky(e,t){if(!(t.state.loading&4)){var i=bo.get(e);if(i)var r=i.get(null);else{i=new Map,bo.set(e,i);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<a.length;v++){var D=a[v];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(i.set(D.dataset.precedence,D),r=D)}r&&i.set(null,r)}a=t.instance,D=a.getAttribute("data-precedence"),v=i.get(D)||r,v===r&&i.set(null,a),i.set(D,a),this.count++,r=So.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),v?v.parentNode.insertBefore(a,v.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Wa={$$typeof:f,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function Wy(e,t,i,r,a,v,D,H,K){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=cn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cn(0),this.hiddenUpdates=cn(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=v,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=K,this.incompleteTransitions=new Map}function Mv(e,t,i,r,a,v,D,H,K,se,de,me){return e=new Wy(e,t,i,D,K,se,de,me,H),t=1,v===!0&&(t|=24),v=_i(3,null,null,t),e.current=v,v.stateNode=e,t=Oc(),t.refCount++,e.pooledCache=t,t.refCount++,v.memoizedState={element:r,isDehydrated:i,cache:t},Nc(v),e}function Lv(e){return e?(e=Sn,e):Sn}function Ov(e,t,i,r,a,v){a=Lv(a),r.context===null?r.context=a:r.pendingContext=a,r=Wr(t),r.payload={element:i},v=v===void 0?null:v,v!==null&&(r.callback=v),i=Yr(e,r,t),i!==null&&(ci(i,e,t),Ea(i,e,t))}function Bv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function eh(e,t){Bv(e,t),(e=e.alternate)&&Bv(e,t)}function kv(e){if(e.tag===13||e.tag===31){var t=Ts(e,67108864);t!==null&&ci(t,e,67108864),eh(e,67108864)}}function Hv(e){if(e.tag===13||e.tag===31){var t=yi();t=pe(t);var i=Ts(e,t);i!==null&&ci(i,e,t),eh(e,t)}}var Eo=!0;function Yy(e,t,i,r){var a=q.T;q.T=null;var v=J.p;try{J.p=2,th(e,t,i,r)}finally{J.p=v,q.T=a}}function Gy(e,t,i,r){var a=q.T;q.T=null;var v=J.p;try{J.p=8,th(e,t,i,r)}finally{J.p=v,q.T=a}}function th(e,t,i,r){if(Eo){var a=ih(r);if(a===null)Fu(e,t,r,wo,i),jv(e,r);else if(Vy(a,e,t,i,r))r.stopPropagation();else if(jv(e,r),t&4&&-1<Qy.indexOf(e)){for(;a!==null;){var v=ii(a);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var D=Vi(v.pendingLanes);if(D!==0){var H=v;for(H.pendingLanes|=2,H.entangledLanes|=2;D;){var K=1<<31-Kt(D);H.entanglements[1]|=K,D&=~K}Ji(v),(et&6)===0&&(no=dt()+500,Ua(0))}}break;case 31:case 13:H=Ts(v,2),H!==null&&ci(H,v,2),lo(),eh(v,2)}if(v=ih(r),v===null&&Fu(e,t,r,wo,i),v===a)break;a=v}a!==null&&r.stopPropagation()}else Fu(e,t,r,null,i)}}function ih(e){return e=sc(e),rh(e)}var wo=null;function rh(e){if(wo=null,e=$e(e),e!==null){var t=T(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=M(t),e!==null)return e;e=null}else if(i===31){if(e=o(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wo=e,null}function Nv(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(Yt()){case Ci:return 2;case It:return 8;case yt:case cr:return 32;case fi:return 268435456;default:return 32}default:return 32}}var sh=!1,rs=null,ss=null,ns=null,Ya=new Map,Ga=new Map,as=[],Qy="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 jv(e,t){switch(e){case"focusin":case"focusout":rs=null;break;case"dragenter":case"dragleave":ss=null;break;case"mouseover":case"mouseout":ns=null;break;case"pointerover":case"pointerout":Ya.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ga.delete(t.pointerId)}}function Qa(e,t,i,r,a,v){return e===null||e.nativeEvent!==v?(e={blockedOn:t,domEventName:i,eventSystemFlags:r,nativeEvent:v,targetContainers:[a]},t!==null&&(t=ii(t),t!==null&&kv(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Vy(e,t,i,r,a){switch(t){case"focusin":return rs=Qa(rs,e,t,i,r,a),!0;case"dragenter":return ss=Qa(ss,e,t,i,r,a),!0;case"mouseover":return ns=Qa(ns,e,t,i,r,a),!0;case"pointerover":var v=a.pointerId;return Ya.set(v,Qa(Ya.get(v)||null,e,t,i,r,a)),!0;case"gotpointercapture":return v=a.pointerId,Ga.set(v,Qa(Ga.get(v)||null,e,t,i,r,a)),!0}return!1}function zv(e){var t=$e(e.target);if(t!==null){var i=T(t);if(i!==null){if(t=i.tag,t===13){if(t=M(i),t!==null){e.blockedOn=t,Ae(e.priority,function(){Hv(i)});return}}else if(t===31){if(t=o(i),t!==null){e.blockedOn=t,Ae(e.priority,function(){Hv(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=ih(e.nativeEvent);if(i===null){i=e.nativeEvent;var r=new i.constructor(i.type,i);rc=r,i.target.dispatchEvent(r),rc=null}else return t=ii(i),t!==null&&kv(t),e.blockedOn=i,!1;t.shift()}return!0}function Uv(e,t,i){xo(e)&&i.delete(t)}function Xy(){sh=!1,rs!==null&&xo(rs)&&(rs=null),ss!==null&&xo(ss)&&(ss=null),ns!==null&&xo(ns)&&(ns=null),Ya.forEach(Uv),Ga.forEach(Uv)}function Ro(e,t){e.blockedOn===t&&(e.blockedOn=null,sh||(sh=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,Xy)))}var Do=null;function Pv(e){Do!==e&&(Do=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Do===e&&(Do=null);for(var t=0;t<e.length;t+=3){var i=e[t],r=e[t+1],a=e[t+2];if(typeof r!="function"){if(rh(r||i)===null)continue;break}var v=ii(i);v!==null&&(e.splice(t,3),t-=3,iu(v,{pending:!0,data:a,method:i.method,action:r},r,a))}}))}function Kn(e){function t(K){return Ro(K,e)}rs!==null&&Ro(rs,e),ss!==null&&Ro(ss,e),ns!==null&&Ro(ns,e),Ya.forEach(t),Ga.forEach(t);for(var i=0;i<as.length;i++){var r=as[i];r.blockedOn===e&&(r.blockedOn=null)}for(;0<as.length&&(i=as[0],i.blockedOn===null);)zv(i),i.blockedOn===null&&as.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(r=0;r<i.length;r+=3){var a=i[r],v=i[r+1],D=a[we]||null;if(typeof v=="function")D||Pv(i);else if(D){var H=null;if(v&&v.hasAttribute("formAction")){if(a=v,D=v[we]||null)H=D.formAction;else if(rh(a)!==null)continue}else H=D.action;typeof H=="function"?i[r+1]=H:(i.splice(r,3),r-=3),Pv(i)}}}function Fv(){function e(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(D){return a=D})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),r||setTimeout(i,20)}function i(){if(!r&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function nh(e){this._internalRoot=e}Ao.prototype.render=nh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(g(409));var i=t.current,r=yi();Ov(i,r,e,t,null,null)},Ao.prototype.unmount=nh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ov(e.current,2,null,e,null,null),lo(),t[Le]=null}};function Ao(e){this._internalRoot=e}Ao.prototype.unstable_scheduleHydration=function(e){if(e){var t=De();e={blockedOn:null,target:e,priority:t};for(var i=0;i<as.length&&t!==0&&t<as[i].priority;i++);as.splice(i,0,e),i===0&&zv(e)}};var Iv=n.version;if(Iv!=="19.2.0")throw Error(g(527,Iv,"19.2.0"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(g(188)):(e=Object.keys(e).join(","),Error(g(268,e)));return e=d(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var $y={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var To=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!To.isDisabled&&To.supportsFiber)try{jt=To.inject($y),qt=To}catch{}}return Xa.createRoot=function(e,t){if(!w(e))throw Error(g(299));var i=!1,r="",a=Vd,v=Xd,D=$d;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(v=t.onCaughtError),t.onRecoverableError!==void 0&&(D=t.onRecoverableError)),t=Mv(e,1,!1,null,null,i,r,null,a,v,D,Fv),e[Le]=t.current,Pu(e),new nh(t)},Xa.hydrateRoot=function(e,t,i){if(!w(e))throw Error(g(299));var r=!1,a="",v=Vd,D=Xd,H=$d,K=null;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(a=i.identifierPrefix),i.onUncaughtError!==void 0&&(v=i.onUncaughtError),i.onCaughtError!==void 0&&(D=i.onCaughtError),i.onRecoverableError!==void 0&&(H=i.onRecoverableError),i.formState!==void 0&&(K=i.formState)),t=Mv(e,1,!0,t,i??null,r,a,K,v,D,H,Fv),t.context=Lv(null),i=t.current,r=yi(),r=pe(r),a=Wr(r),a.callback=null,Yr(i,a,r),i=r,t.current.lanes=i,xs(t,i),Ji(t),e[Le]=t.current,Pu(e),new Ao(t)},Xa.version="19.2.0",Xa}var Jv;function c0(){if(Jv)return ch.exports;Jv=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(n){console.error(n)}}return s(),ch.exports=o0(),ch.exports}var u0=c0();const h0=tg(u0);var la=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(s){return this.listeners.add(s),this.onSubscribe(),()=>{this.listeners.delete(s),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},f0={setTimeout:(s,n)=>setTimeout(s,n),clearTimeout:s=>clearTimeout(s),setInterval:(s,n)=>setInterval(s,n),clearInterval:s=>clearInterval(s)},hs,Uh,Km,d0=(Km=class{constructor(){Me(this,hs,f0);Me(this,Uh,!1)}setTimeoutProvider(s){Ce(this,hs,s)}setTimeout(s,n){return G(this,hs).setTimeout(s,n)}clearTimeout(s){G(this,hs).clearTimeout(s)}setInterval(s,n){return G(this,hs).setInterval(s,n)}clearInterval(s){G(this,hs).clearInterval(s)}},hs=new WeakMap,Uh=new WeakMap,Km),Is=new d0;function _0(s){setTimeout(s,0)}var Js=typeof window>"u"||"Deno"in globalThis;function Jt(){}function v0(s,n){return typeof s=="function"?s(n):s}function bh(s){return typeof s=="number"&&s>=0&&s!==1/0}function rg(s,n){return Math.max(s+(n||0)-Date.now(),0)}function bs(s,n){return typeof s=="function"?s(n):s}function Hi(s,n){return typeof s=="function"?s(n):s}function em(s,n){const{type:c="all",exact:g,fetchStatus:w,predicate:T,queryKey:M,stale:o}=s;if(M){if(g){if(n.queryHash!==Fh(M,n.options))return!1}else if(!sl(n.queryKey,M))return!1}if(c!=="all"){const _=n.isActive();if(c==="active"&&!_||c==="inactive"&&_)return!1}return!(typeof o=="boolean"&&n.isStale()!==o||w&&w!==n.state.fetchStatus||T&&!T(n))}function tm(s,n){const{exact:c,status:g,predicate:w,mutationKey:T}=s;if(T){if(!n.options.mutationKey)return!1;if(c){if(en(n.options.mutationKey)!==en(T))return!1}else if(!sl(n.options.mutationKey,T))return!1}return!(g&&n.state.status!==g||w&&!w(n))}function Fh(s,n){return((n==null?void 0:n.queryKeyHashFn)||en)(s)}function en(s){return JSON.stringify(s,(n,c)=>Ch(c)?Object.keys(c).sort().reduce((g,w)=>(g[w]=c[w],g),{}):c)}function sl(s,n){return s===n?!0:typeof s!=typeof n?!1:s&&n&&typeof s=="object"&&typeof n=="object"?Object.keys(n).every(c=>sl(s[c],n[c])):!1}var m0=Object.prototype.hasOwnProperty;function sg(s,n){if(s===n)return s;const c=im(s)&&im(n);if(!c&&!(Ch(s)&&Ch(n)))return n;const w=(c?s:Object.keys(s)).length,T=c?n:Object.keys(n),M=T.length,o=c?new Array(M):{};let _=0;for(let d=0;d<M;d++){const p=c?d:T[d],m=s[p],y=n[p];if(m===y){o[p]=m,(c?d<w:m0.call(s,p))&&_++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){o[p]=y;continue}const S=sg(m,y);o[p]=S,S===m&&_++}return w===M&&_===w?s:o}function Fo(s,n){if(!n||Object.keys(s).length!==Object.keys(n).length)return!1;for(const c in s)if(s[c]!==n[c])return!1;return!0}function im(s){return Array.isArray(s)&&s.length===Object.keys(s).length}function Ch(s){if(!rm(s))return!1;const n=s.constructor;if(n===void 0)return!0;const c=n.prototype;return!(!rm(c)||!c.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(s)!==Object.prototype)}function rm(s){return Object.prototype.toString.call(s)==="[object Object]"}function g0(s){return new Promise(n=>{Is.setTimeout(n,s)})}function Eh(s,n,c){return typeof c.structuralSharing=="function"?c.structuralSharing(s,n):c.structuralSharing!==!1?sg(s,n):n}function p0(s,n,c=0){const g=[...s,n];return c&&g.length>c?g.slice(1):g}function y0(s,n,c=0){const g=[n,...s];return c&&g.length>c?g.slice(0,-1):g}var Ih=Symbol();function ng(s,n){return!s.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!s.queryFn||s.queryFn===Ih?()=>Promise.reject(new Error(`Missing queryFn: '${s.queryHash}'`)):s.queryFn}function ag(s,n){return typeof s=="function"?s(...n):!!s}var Ks,fs,Vn,Wm,S0=(Wm=class extends la{constructor(){super();Me(this,Ks);Me(this,fs);Me(this,Vn);Ce(this,Vn,n=>{if(!Js&&window.addEventListener){const c=()=>n();return window.addEventListener("visibilitychange",c,!1),()=>{window.removeEventListener("visibilitychange",c)}}})}onSubscribe(){G(this,fs)||this.setEventListener(G(this,Vn))}onUnsubscribe(){var n;this.hasListeners()||((n=G(this,fs))==null||n.call(this),Ce(this,fs,void 0))}setEventListener(n){var c;Ce(this,Vn,n),(c=G(this,fs))==null||c.call(this),Ce(this,fs,n(g=>{typeof g=="boolean"?this.setFocused(g):this.onFocus()}))}setFocused(n){G(this,Ks)!==n&&(Ce(this,Ks,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(c=>{c(n)})}isFocused(){var n;return typeof G(this,Ks)=="boolean"?G(this,Ks):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},Ks=new WeakMap,fs=new WeakMap,Vn=new WeakMap,Wm),qh=new S0;function wh(){let s,n;const c=new Promise((w,T)=>{s=w,n=T});c.status="pending",c.catch(()=>{});function g(w){Object.assign(c,w),delete c.resolve,delete c.reject}return c.resolve=w=>{g({status:"fulfilled",value:w}),s(w)},c.reject=w=>{g({status:"rejected",reason:w}),n(w)},c}var b0=_0;function C0(){let s=[],n=0,c=o=>{o()},g=o=>{o()},w=b0;const T=o=>{n?s.push(o):w(()=>{c(o)})},M=()=>{const o=s;s=[],o.length&&w(()=>{g(()=>{o.forEach(_=>{c(_)})})})};return{batch:o=>{let _;n++;try{_=o()}finally{n--,n||M()}return _},batchCalls:o=>(..._)=>{T(()=>{o(..._)})},schedule:T,setNotifyFunction:o=>{c=o},setBatchNotifyFunction:o=>{g=o},setScheduler:o=>{w=o}}}var kt=C0(),Xn,ds,$n,Ym,E0=(Ym=class extends la{constructor(){super();Me(this,Xn,!0);Me(this,ds);Me(this,$n);Ce(this,$n,n=>{if(!Js&&window.addEventListener){const c=()=>n(!0),g=()=>n(!1);return window.addEventListener("online",c,!1),window.addEventListener("offline",g,!1),()=>{window.removeEventListener("online",c),window.removeEventListener("offline",g)}}})}onSubscribe(){G(this,ds)||this.setEventListener(G(this,$n))}onUnsubscribe(){var n;this.hasListeners()||((n=G(this,ds))==null||n.call(this),Ce(this,ds,void 0))}setEventListener(n){var c;Ce(this,$n,n),(c=G(this,ds))==null||c.call(this),Ce(this,ds,n(this.setOnline.bind(this)))}setOnline(n){G(this,Xn)!==n&&(Ce(this,Xn,n),this.listeners.forEach(g=>{g(n)}))}isOnline(){return G(this,Xn)}},Xn=new WeakMap,ds=new WeakMap,$n=new WeakMap,Ym),Io=new E0;function w0(s){return Math.min(1e3*2**s,3e4)}function lg(s){return(s??"online")==="online"?Io.isOnline():!0}var xh=class extends Error{constructor(s){super("CancelledError"),this.revert=s==null?void 0:s.revert,this.silent=s==null?void 0:s.silent}};function og(s){let n=!1,c=0,g;const w=wh(),T=()=>w.status!=="pending",M=b=>{var l;if(!T()){const h=new xh(b);y(h),(l=s.onCancel)==null||l.call(s,h)}},o=()=>{n=!0},_=()=>{n=!1},d=()=>qh.isFocused()&&(s.networkMode==="always"||Io.isOnline())&&s.canRun(),p=()=>lg(s.networkMode)&&s.canRun(),m=b=>{T()||(g==null||g(),w.resolve(b))},y=b=>{T()||(g==null||g(),w.reject(b))},S=()=>new Promise(b=>{var l;g=h=>{(T()||d())&&b(h)},(l=s.onPause)==null||l.call(s)}).then(()=>{var b;g=void 0,T()||(b=s.onContinue)==null||b.call(s)}),A=()=>{if(T())return;let b;const l=c===0?s.initialPromise:void 0;try{b=l??s.fn()}catch(h){b=Promise.reject(h)}Promise.resolve(b).then(m).catch(h=>{var L;if(T())return;const u=s.retry??(Js?0:3),f=s.retryDelay??w0,E=typeof f=="function"?f(c,h):f,R=u===!0||typeof u=="number"&&c<u||typeof u=="function"&&u(c,h);if(n||!R){y(h);return}c++,(L=s.onFail)==null||L.call(s,c,h),g0(E).then(()=>d()?void 0:S()).then(()=>{n?y(h):A()})})};return{promise:w,status:()=>w.status,cancel:M,continue:()=>(g==null||g(),w),cancelRetry:o,continueRetry:_,canStart:p,start:()=>(p()?A():S().then(A),w)}}var Ws,Gm,cg=(Gm=class{constructor(){Me(this,Ws)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bh(this.gcTime)&&Ce(this,Ws,Is.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(s){this.gcTime=Math.max(this.gcTime||0,s??(Js?1/0:300*1e3))}clearGcTimeout(){G(this,Ws)&&(Is.clearTimeout(G(this,Ws)),Ce(this,Ws,void 0))}},Ws=new WeakMap,Gm),Ys,Zn,Bi,Gs,Nt,ol,Qs,Gi,Dr,Qm,x0=(Qm=class extends cg{constructor(n){super();Me(this,Gi);Me(this,Ys);Me(this,Zn);Me(this,Bi);Me(this,Gs);Me(this,Nt);Me(this,ol);Me(this,Qs);Ce(this,Qs,!1),Ce(this,ol,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ce(this,Gs,n.client),Ce(this,Bi,G(this,Gs).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ce(this,Ys,nm(this.options)),this.state=n.state??G(this,Ys),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var n;return(n=G(this,Nt))==null?void 0:n.promise}setOptions(n){if(this.options={...G(this,ol),...n},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const c=nm(this.options);c.data!==void 0&&(this.setState(sm(c.data,c.dataUpdatedAt)),Ce(this,Ys,c))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&G(this,Bi).remove(this)}setData(n,c){const g=Eh(this.state.data,n,this.options);return Fe(this,Gi,Dr).call(this,{data:g,type:"success",dataUpdatedAt:c==null?void 0:c.updatedAt,manual:c==null?void 0:c.manual}),g}setState(n,c){Fe(this,Gi,Dr).call(this,{type:"setState",state:n,setStateOptions:c})}cancel(n){var g,w;const c=(g=G(this,Nt))==null?void 0:g.promise;return(w=G(this,Nt))==null||w.cancel(n),c?c.then(Jt).catch(Jt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(G(this,Ys))}isActive(){return this.observers.some(n=>Hi(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ih||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>bs(n.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(n=>n.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(n=0){return this.state.data===void 0?!0:n==="static"?!1:this.state.isInvalidated?!0:!rg(this.state.dataUpdatedAt,n)}onFocus(){var c;const n=this.observers.find(g=>g.shouldFetchOnWindowFocus());n==null||n.refetch({cancelRefetch:!1}),(c=G(this,Nt))==null||c.continue()}onOnline(){var c;const n=this.observers.find(g=>g.shouldFetchOnReconnect());n==null||n.refetch({cancelRefetch:!1}),(c=G(this,Nt))==null||c.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),G(this,Bi).notify({type:"observerAdded",query:this,observer:n}))}removeObserver(n){this.observers.includes(n)&&(this.observers=this.observers.filter(c=>c!==n),this.observers.length||(G(this,Nt)&&(G(this,Qs)?G(this,Nt).cancel({revert:!0}):G(this,Nt).cancelRetry()),this.scheduleGc()),G(this,Bi).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Fe(this,Gi,Dr).call(this,{type:"invalidate"})}async fetch(n,c){var _,d,p,m,y,S,A,b,l,h,u,f;if(this.state.fetchStatus!=="idle"&&((_=G(this,Nt))==null?void 0:_.status())!=="rejected"){if(this.state.data!==void 0&&(c!=null&&c.cancelRefetch))this.cancel({silent:!0});else if(G(this,Nt))return G(this,Nt).continueRetry(),G(this,Nt).promise}if(n&&this.setOptions(n),!this.options.queryFn){const E=this.observers.find(R=>R.options.queryFn);E&&this.setOptions(E.options)}const g=new AbortController,w=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(Ce(this,Qs,!0),g.signal)})},T=()=>{const E=ng(this.options,c),L=(()=>{const x={client:G(this,Gs),queryKey:this.queryKey,meta:this.meta};return w(x),x})();return Ce(this,Qs,!1),this.options.persister?this.options.persister(E,L,this):E(L)},o=(()=>{const E={fetchOptions:c,options:this.options,queryKey:this.queryKey,client:G(this,Gs),state:this.state,fetchFn:T};return w(E),E})();(d=this.options.behavior)==null||d.onFetch(o,this),Ce(this,Zn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((p=o.fetchOptions)==null?void 0:p.meta))&&Fe(this,Gi,Dr).call(this,{type:"fetch",meta:(m=o.fetchOptions)==null?void 0:m.meta}),Ce(this,Nt,og({initialPromise:c==null?void 0:c.initialPromise,fn:o.fetchFn,onCancel:E=>{E instanceof xh&&E.revert&&this.setState({...G(this,Zn),fetchStatus:"idle"}),g.abort()},onFail:(E,R)=>{Fe(this,Gi,Dr).call(this,{type:"failed",failureCount:E,error:R})},onPause:()=>{Fe(this,Gi,Dr).call(this,{type:"pause"})},onContinue:()=>{Fe(this,Gi,Dr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const E=await G(this,Nt).start();if(E===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(E),(S=(y=G(this,Bi).config).onSuccess)==null||S.call(y,E,this),(b=(A=G(this,Bi).config).onSettled)==null||b.call(A,E,this.state.error,this),E}catch(E){if(E instanceof xh){if(E.silent)return G(this,Nt).promise;if(E.revert){if(this.state.data===void 0)throw E;return this.state.data}}throw Fe(this,Gi,Dr).call(this,{type:"error",error:E}),(h=(l=G(this,Bi).config).onError)==null||h.call(l,E,this),(f=(u=G(this,Bi).config).onSettled)==null||f.call(u,this.state.data,E,this),E}finally{this.scheduleGc()}}},Ys=new WeakMap,Zn=new WeakMap,Bi=new WeakMap,Gs=new WeakMap,Nt=new WeakMap,ol=new WeakMap,Qs=new WeakMap,Gi=new WeakSet,Dr=function(n){const c=g=>{switch(n.type){case"failed":return{...g,fetchFailureCount:n.failureCount,fetchFailureReason:n.error};case"pause":return{...g,fetchStatus:"paused"};case"continue":return{...g,fetchStatus:"fetching"};case"fetch":return{...g,...ug(g.data,this.options),fetchMeta:n.meta??null};case"success":const w={...g,...sm(n.data,n.dataUpdatedAt),dataUpdateCount:g.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ce(this,Zn,n.manual?w:void 0),w;case"error":const T=n.error;return{...g,error:T,errorUpdateCount:g.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:g.fetchFailureCount+1,fetchFailureReason:T,fetchStatus:"idle",status:"error"};case"invalidate":return{...g,isInvalidated:!0};case"setState":return{...g,...n.state}}};this.state=c(this.state),kt.batch(()=>{this.observers.forEach(g=>{g.onQueryUpdate()}),G(this,Bi).notify({query:this,type:"updated",action:n})})},Qm);function ug(s,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:lg(n.networkMode)?"fetching":"paused",...s===void 0&&{error:null,status:"pending"}}}function sm(s,n){return{data:s,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function nm(s){const n=typeof s.initialData=="function"?s.initialData():s.initialData,c=n!==void 0,g=c?typeof s.initialDataUpdatedAt=="function"?s.initialDataUpdatedAt():s.initialDataUpdatedAt:0;return{data:n,dataUpdateCount:0,dataUpdatedAt:c?g??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:c?"success":"pending",fetchStatus:"idle"}}var ui,Ve,cl,$t,Vs,Jn,Tr,_s,ul,ea,ta,Xs,$s,vs,ia,tt,tl,Rh,Dh,Ah,Th,Mh,Lh,Oh,hg,Vm,R0=(Vm=class extends la{constructor(n,c){super();Me(this,tt);Me(this,ui);Me(this,Ve);Me(this,cl);Me(this,$t);Me(this,Vs);Me(this,Jn);Me(this,Tr);Me(this,_s);Me(this,ul);Me(this,ea);Me(this,ta);Me(this,Xs);Me(this,$s);Me(this,vs);Me(this,ia,new Set);this.options=c,Ce(this,ui,n),Ce(this,_s,null),Ce(this,Tr,wh()),this.bindMethods(),this.setOptions(c)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(G(this,Ve).addObserver(this),am(G(this,Ve),this.options)?Fe(this,tt,tl).call(this):this.updateResult(),Fe(this,tt,Th).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Bh(G(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Bh(G(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Fe(this,tt,Mh).call(this),Fe(this,tt,Lh).call(this),G(this,Ve).removeObserver(this)}setOptions(n){const c=this.options,g=G(this,Ve);if(this.options=G(this,ui).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Hi(this.options.enabled,G(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Fe(this,tt,Oh).call(this),G(this,Ve).setOptions(this.options),c._defaulted&&!Fo(this.options,c)&&G(this,ui).getQueryCache().notify({type:"observerOptionsUpdated",query:G(this,Ve),observer:this});const w=this.hasListeners();w&&lm(G(this,Ve),g,this.options,c)&&Fe(this,tt,tl).call(this),this.updateResult(),w&&(G(this,Ve)!==g||Hi(this.options.enabled,G(this,Ve))!==Hi(c.enabled,G(this,Ve))||bs(this.options.staleTime,G(this,Ve))!==bs(c.staleTime,G(this,Ve)))&&Fe(this,tt,Rh).call(this);const T=Fe(this,tt,Dh).call(this);w&&(G(this,Ve)!==g||Hi(this.options.enabled,G(this,Ve))!==Hi(c.enabled,G(this,Ve))||T!==G(this,vs))&&Fe(this,tt,Ah).call(this,T)}getOptimisticResult(n){const c=G(this,ui).getQueryCache().build(G(this,ui),n),g=this.createResult(c,n);return A0(this,g)&&(Ce(this,$t,g),Ce(this,Jn,this.options),Ce(this,Vs,G(this,Ve).state)),g}getCurrentResult(){return G(this,$t)}trackResult(n,c){return new Proxy(n,{get:(g,w)=>(this.trackProp(w),c==null||c(w),w==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&G(this,Tr).status==="pending"&&G(this,Tr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(g,w))})}trackProp(n){G(this,ia).add(n)}getCurrentQuery(){return G(this,Ve)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const c=G(this,ui).defaultQueryOptions(n),g=G(this,ui).getQueryCache().build(G(this,ui),c);return g.fetch().then(()=>this.createResult(g,c))}fetch(n){return Fe(this,tt,tl).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),G(this,$t)))}createResult(n,c){var B;const g=G(this,Ve),w=this.options,T=G(this,$t),M=G(this,Vs),o=G(this,Jn),d=n!==g?n.state:G(this,cl),{state:p}=n;let m={...p},y=!1,S;if(c._optimisticResults){const z=this.hasListeners(),I=!z&&am(n,c),F=z&&lm(n,g,c,w);(I||F)&&(m={...m,...ug(p.data,n.options)}),c._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:A,errorUpdatedAt:b,status:l}=m;S=m.data;let h=!1;if(c.placeholderData!==void 0&&S===void 0&&l==="pending"){let z;T!=null&&T.isPlaceholderData&&c.placeholderData===(o==null?void 0:o.placeholderData)?(z=T.data,h=!0):z=typeof c.placeholderData=="function"?c.placeholderData((B=G(this,ta))==null?void 0:B.state.data,G(this,ta)):c.placeholderData,z!==void 0&&(l="success",S=Eh(T==null?void 0:T.data,z,c),y=!0)}if(c.select&&S!==void 0&&!h)if(T&&S===(M==null?void 0:M.data)&&c.select===G(this,ul))S=G(this,ea);else try{Ce(this,ul,c.select),S=c.select(S),S=Eh(T==null?void 0:T.data,S,c),Ce(this,ea,S),Ce(this,_s,null)}catch(z){Ce(this,_s,z)}G(this,_s)&&(A=G(this,_s),S=G(this,ea),b=Date.now(),l="error");const u=m.fetchStatus==="fetching",f=l==="pending",E=l==="error",R=f&&u,L=S!==void 0,C={status:l,fetchStatus:m.fetchStatus,isPending:f,isSuccess:l==="success",isError:E,isInitialLoading:R,isLoading:R,data:S,dataUpdatedAt:m.dataUpdatedAt,error:A,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:u,isRefetching:u&&!f,isLoadingError:E&&!L,isPaused:m.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:E&&L,isStale:Kh(n,c),refetch:this.refetch,promise:G(this,Tr),isEnabled:Hi(c.enabled,n)!==!1};if(this.options.experimental_prefetchInRender){const z=Q=>{C.status==="error"?Q.reject(C.error):C.data!==void 0&&Q.resolve(C.data)},I=()=>{const Q=Ce(this,Tr,C.promise=wh());z(Q)},F=G(this,Tr);switch(F.status){case"pending":n.queryHash===g.queryHash&&z(F);break;case"fulfilled":(C.status==="error"||C.data!==F.value)&&I();break;case"rejected":(C.status!=="error"||C.error!==F.reason)&&I();break}}return C}updateResult(){const n=G(this,$t),c=this.createResult(G(this,Ve),this.options);if(Ce(this,Vs,G(this,Ve).state),Ce(this,Jn,this.options),G(this,Vs).data!==void 0&&Ce(this,ta,G(this,Ve)),Fo(c,n))return;Ce(this,$t,c);const g=()=>{if(!n)return!0;const{notifyOnChangeProps:w}=this.options,T=typeof w=="function"?w():w;if(T==="all"||!T&&!G(this,ia).size)return!0;const M=new Set(T??G(this,ia));return this.options.throwOnError&&M.add("error"),Object.keys(G(this,$t)).some(o=>{const _=o;return G(this,$t)[_]!==n[_]&&M.has(_)})};Fe(this,tt,hg).call(this,{listeners:g()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Fe(this,tt,Th).call(this)}},ui=new WeakMap,Ve=new WeakMap,cl=new WeakMap,$t=new WeakMap,Vs=new WeakMap,Jn=new WeakMap,Tr=new WeakMap,_s=new WeakMap,ul=new WeakMap,ea=new WeakMap,ta=new WeakMap,Xs=new WeakMap,$s=new WeakMap,vs=new WeakMap,ia=new WeakMap,tt=new WeakSet,tl=function(n){Fe(this,tt,Oh).call(this);let c=G(this,Ve).fetch(this.options,n);return n!=null&&n.throwOnError||(c=c.catch(Jt)),c},Rh=function(){Fe(this,tt,Mh).call(this);const n=bs(this.options.staleTime,G(this,Ve));if(Js||G(this,$t).isStale||!bh(n))return;const g=rg(G(this,$t).dataUpdatedAt,n)+1;Ce(this,Xs,Is.setTimeout(()=>{G(this,$t).isStale||this.updateResult()},g))},Dh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(G(this,Ve)):this.options.refetchInterval)??!1},Ah=function(n){Fe(this,tt,Lh).call(this),Ce(this,vs,n),!(Js||Hi(this.options.enabled,G(this,Ve))===!1||!bh(G(this,vs))||G(this,vs)===0)&&Ce(this,$s,Is.setInterval(()=>{(this.options.refetchIntervalInBackground||qh.isFocused())&&Fe(this,tt,tl).call(this)},G(this,vs)))},Th=function(){Fe(this,tt,Rh).call(this),Fe(this,tt,Ah).call(this,Fe(this,tt,Dh).call(this))},Mh=function(){G(this,Xs)&&(Is.clearTimeout(G(this,Xs)),Ce(this,Xs,void 0))},Lh=function(){G(this,$s)&&(Is.clearInterval(G(this,$s)),Ce(this,$s,void 0))},Oh=function(){const n=G(this,ui).getQueryCache().build(G(this,ui),this.options);if(n===G(this,Ve))return;const c=G(this,Ve);Ce(this,Ve,n),Ce(this,cl,n.state),this.hasListeners()&&(c==null||c.removeObserver(this),n.addObserver(this))},hg=function(n){kt.batch(()=>{n.listeners&&this.listeners.forEach(c=>{c(G(this,$t))}),G(this,ui).getQueryCache().notify({query:G(this,Ve),type:"observerResultsUpdated"})})},Vm);function D0(s,n){return Hi(n.enabled,s)!==!1&&s.state.data===void 0&&!(s.state.status==="error"&&n.retryOnMount===!1)}function am(s,n){return D0(s,n)||s.state.data!==void 0&&Bh(s,n,n.refetchOnMount)}function Bh(s,n,c){if(Hi(n.enabled,s)!==!1&&bs(n.staleTime,s)!=="static"){const g=typeof c=="function"?c(s):c;return g==="always"||g!==!1&&Kh(s,n)}return!1}function lm(s,n,c,g){return(s!==n||Hi(g.enabled,s)===!1)&&(!c.suspense||s.state.status!=="error")&&Kh(s,c)}function Kh(s,n){return Hi(n.enabled,s)!==!1&&s.isStaleByTime(bs(n.staleTime,s))}function A0(s,n){return!Fo(s.getCurrentResult(),n)}function om(s){return{onFetch:(n,c)=>{var p,m,y,S,A;const g=n.options,w=(y=(m=(p=n.fetchOptions)==null?void 0:p.meta)==null?void 0:m.fetchMore)==null?void 0:y.direction,T=((S=n.state.data)==null?void 0:S.pages)||[],M=((A=n.state.data)==null?void 0:A.pageParams)||[];let o={pages:[],pageParams:[]},_=0;const d=async()=>{let b=!1;const l=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(n.signal.aborted?b=!0:n.signal.addEventListener("abort",()=>{b=!0}),n.signal)})},h=ng(n.options,n.fetchOptions),u=async(f,E,R)=>{if(b)return Promise.reject();if(E==null&&f.pages.length)return Promise.resolve(f);const x=(()=>{const I={client:n.client,queryKey:n.queryKey,pageParam:E,direction:R?"backward":"forward",meta:n.options.meta};return l(I),I})(),C=await h(x),{maxPages:B}=n.options,z=R?y0:p0;return{pages:z(f.pages,C,B),pageParams:z(f.pageParams,E,B)}};if(w&&T.length){const f=w==="backward",E=f?T0:cm,R={pages:T,pageParams:M},L=E(g,R);o=await u(R,L,f)}else{const f=s??T.length;do{const E=_===0?M[0]??g.initialPageParam:cm(g,o);if(_>0&&E==null)break;o=await u(o,E),_++}while(_<f)}return o};n.options.persister?n.fetchFn=()=>{var b,l;return(l=(b=n.options).persister)==null?void 0:l.call(b,d,{client:n.client,queryKey:n.queryKey,meta:n.options.meta,signal:n.signal},c)}:n.fetchFn=d}}}function cm(s,{pages:n,pageParams:c}){const g=n.length-1;return n.length>0?s.getNextPageParam(n[g],n,c[g],c):void 0}function T0(s,{pages:n,pageParams:c}){var g;return n.length>0?(g=s.getPreviousPageParam)==null?void 0:g.call(s,n[0],n,c[0],c):void 0}var hl,er,Zt,Zs,tr,os,Xm,M0=(Xm=class extends cg{constructor(n){super();Me(this,tr);Me(this,hl);Me(this,er);Me(this,Zt);Me(this,Zs);Ce(this,hl,n.client),this.mutationId=n.mutationId,Ce(this,Zt,n.mutationCache),Ce(this,er,[]),this.state=n.state||fg(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){G(this,er).includes(n)||(G(this,er).push(n),this.clearGcTimeout(),G(this,Zt).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ce(this,er,G(this,er).filter(c=>c!==n)),this.scheduleGc(),G(this,Zt).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){G(this,er).length||(this.state.status==="pending"?this.scheduleGc():G(this,Zt).remove(this))}continue(){var n;return((n=G(this,Zs))==null?void 0:n.continue())??this.execute(this.state.variables)}async execute(n){var M,o,_,d,p,m,y,S,A,b,l,h,u,f,E,R,L,x,C,B;const c=()=>{Fe(this,tr,os).call(this,{type:"continue"})},g={client:G(this,hl),meta:this.options.meta,mutationKey:this.options.mutationKey};Ce(this,Zs,og({fn:()=>this.options.mutationFn?this.options.mutationFn(n,g):Promise.reject(new Error("No mutationFn found")),onFail:(z,I)=>{Fe(this,tr,os).call(this,{type:"failed",failureCount:z,error:I})},onPause:()=>{Fe(this,tr,os).call(this,{type:"pause"})},onContinue:c,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>G(this,Zt).canRun(this)}));const w=this.state.status==="pending",T=!G(this,Zs).canStart();try{if(w)c();else{Fe(this,tr,os).call(this,{type:"pending",variables:n,isPaused:T}),await((o=(M=G(this,Zt).config).onMutate)==null?void 0:o.call(M,n,this,g));const I=await((d=(_=this.options).onMutate)==null?void 0:d.call(_,n,g));I!==this.state.context&&Fe(this,tr,os).call(this,{type:"pending",context:I,variables:n,isPaused:T})}const z=await G(this,Zs).start();return await((m=(p=G(this,Zt).config).onSuccess)==null?void 0:m.call(p,z,n,this.state.context,this,g)),await((S=(y=this.options).onSuccess)==null?void 0:S.call(y,z,n,this.state.context,g)),await((b=(A=G(this,Zt).config).onSettled)==null?void 0:b.call(A,z,null,this.state.variables,this.state.context,this,g)),await((h=(l=this.options).onSettled)==null?void 0:h.call(l,z,null,n,this.state.context,g)),Fe(this,tr,os).call(this,{type:"success",data:z}),z}catch(z){try{throw await((f=(u=G(this,Zt).config).onError)==null?void 0:f.call(u,z,n,this.state.context,this,g)),await((R=(E=this.options).onError)==null?void 0:R.call(E,z,n,this.state.context,g)),await((x=(L=G(this,Zt).config).onSettled)==null?void 0:x.call(L,void 0,z,this.state.variables,this.state.context,this,g)),await((B=(C=this.options).onSettled)==null?void 0:B.call(C,void 0,z,n,this.state.context,g)),z}finally{Fe(this,tr,os).call(this,{type:"error",error:z})}}finally{G(this,Zt).runNext(this)}}},hl=new WeakMap,er=new WeakMap,Zt=new WeakMap,Zs=new WeakMap,tr=new WeakSet,os=function(n){const c=g=>{switch(n.type){case"failed":return{...g,failureCount:n.failureCount,failureReason:n.error};case"pause":return{...g,isPaused:!0};case"continue":return{...g,isPaused:!1};case"pending":return{...g,context:n.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:n.isPaused,status:"pending",variables:n.variables,submittedAt:Date.now()};case"success":return{...g,data:n.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...g,data:void 0,error:n.error,failureCount:g.failureCount+1,failureReason:n.error,isPaused:!1,status:"error"}}};this.state=c(this.state),kt.batch(()=>{G(this,er).forEach(g=>{g.onMutationUpdate(n)}),G(this,Zt).notify({mutation:this,type:"updated",action:n})})},Xm);function fg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mr,Qi,fl,$m,L0=($m=class extends la{constructor(n={}){super();Me(this,Mr);Me(this,Qi);Me(this,fl);this.config=n,Ce(this,Mr,new Set),Ce(this,Qi,new Map),Ce(this,fl,0)}build(n,c,g){const w=new M0({client:n,mutationCache:this,mutationId:++Lo(this,fl)._,options:n.defaultMutationOptions(c),state:g});return this.add(w),w}add(n){G(this,Mr).add(n);const c=Oo(n);if(typeof c=="string"){const g=G(this,Qi).get(c);g?g.push(n):G(this,Qi).set(c,[n])}this.notify({type:"added",mutation:n})}remove(n){if(G(this,Mr).delete(n)){const c=Oo(n);if(typeof c=="string"){const g=G(this,Qi).get(c);if(g)if(g.length>1){const w=g.indexOf(n);w!==-1&&g.splice(w,1)}else g[0]===n&&G(this,Qi).delete(c)}}this.notify({type:"removed",mutation:n})}canRun(n){const c=Oo(n);if(typeof c=="string"){const g=G(this,Qi).get(c),w=g==null?void 0:g.find(T=>T.state.status==="pending");return!w||w===n}else return!0}runNext(n){var g;const c=Oo(n);if(typeof c=="string"){const w=(g=G(this,Qi).get(c))==null?void 0:g.find(T=>T!==n&&T.state.isPaused);return(w==null?void 0:w.continue())??Promise.resolve()}else return Promise.resolve()}clear(){kt.batch(()=>{G(this,Mr).forEach(n=>{this.notify({type:"removed",mutation:n})}),G(this,Mr).clear(),G(this,Qi).clear()})}getAll(){return Array.from(G(this,Mr))}find(n){const c={exact:!0,...n};return this.getAll().find(g=>tm(c,g))}findAll(n={}){return this.getAll().filter(c=>tm(n,c))}notify(n){kt.batch(()=>{this.listeners.forEach(c=>{c(n)})})}resumePausedMutations(){const n=this.getAll().filter(c=>c.state.isPaused);return kt.batch(()=>Promise.all(n.map(c=>c.continue().catch(Jt))))}},Mr=new WeakMap,Qi=new WeakMap,fl=new WeakMap,$m);function Oo(s){var n;return(n=s.options.scope)==null?void 0:n.id}var Lr,ms,hi,Or,Br,jo,kh,Zm,O0=(Zm=class extends la{constructor(c,g){super();Me(this,Br);Me(this,Lr);Me(this,ms);Me(this,hi);Me(this,Or);Ce(this,Lr,c),this.setOptions(g),this.bindMethods(),Fe(this,Br,jo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(c){var w;const g=this.options;this.options=G(this,Lr).defaultMutationOptions(c),Fo(this.options,g)||G(this,Lr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:G(this,hi),observer:this}),g!=null&&g.mutationKey&&this.options.mutationKey&&en(g.mutationKey)!==en(this.options.mutationKey)?this.reset():((w=G(this,hi))==null?void 0:w.state.status)==="pending"&&G(this,hi).setOptions(this.options)}onUnsubscribe(){var c;this.hasListeners()||(c=G(this,hi))==null||c.removeObserver(this)}onMutationUpdate(c){Fe(this,Br,jo).call(this),Fe(this,Br,kh).call(this,c)}getCurrentResult(){return G(this,ms)}reset(){var c;(c=G(this,hi))==null||c.removeObserver(this),Ce(this,hi,void 0),Fe(this,Br,jo).call(this),Fe(this,Br,kh).call(this)}mutate(c,g){var w;return Ce(this,Or,g),(w=G(this,hi))==null||w.removeObserver(this),Ce(this,hi,G(this,Lr).getMutationCache().build(G(this,Lr),this.options)),G(this,hi).addObserver(this),G(this,hi).execute(c)}},Lr=new WeakMap,ms=new WeakMap,hi=new WeakMap,Or=new WeakMap,Br=new WeakSet,jo=function(){var g;const c=((g=G(this,hi))==null?void 0:g.state)??fg();Ce(this,ms,{...c,isPending:c.status==="pending",isSuccess:c.status==="success",isError:c.status==="error",isIdle:c.status==="idle",mutate:this.mutate,reset:this.reset})},kh=function(c){kt.batch(()=>{var g,w,T,M,o,_,d,p;if(G(this,Or)&&this.hasListeners()){const m=G(this,ms).variables,y=G(this,ms).context,S={client:G(this,Lr),meta:this.options.meta,mutationKey:this.options.mutationKey};(c==null?void 0:c.type)==="success"?((w=(g=G(this,Or)).onSuccess)==null||w.call(g,c.data,m,y,S),(M=(T=G(this,Or)).onSettled)==null||M.call(T,c.data,null,m,y,S)):(c==null?void 0:c.type)==="error"&&((_=(o=G(this,Or)).onError)==null||_.call(o,c.error,m,y,S),(p=(d=G(this,Or)).onSettled)==null||p.call(d,void 0,c.error,m,y,S))}this.listeners.forEach(m=>{m(G(this,ms))})})},Zm),ir,Jm,B0=(Jm=class extends la{constructor(n={}){super();Me(this,ir);this.config=n,Ce(this,ir,new Map)}build(n,c,g){const w=c.queryKey,T=c.queryHash??Fh(w,c);let M=this.get(T);return M||(M=new x0({client:n,queryKey:w,queryHash:T,options:n.defaultQueryOptions(c),state:g,defaultOptions:n.getQueryDefaults(w)}),this.add(M)),M}add(n){G(this,ir).has(n.queryHash)||(G(this,ir).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const c=G(this,ir).get(n.queryHash);c&&(n.destroy(),c===n&&G(this,ir).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){kt.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return G(this,ir).get(n)}getAll(){return[...G(this,ir).values()]}find(n){const c={exact:!0,...n};return this.getAll().find(g=>em(c,g))}findAll(n={}){const c=this.getAll();return Object.keys(n).length>0?c.filter(g=>em(n,g)):c}notify(n){kt.batch(()=>{this.listeners.forEach(c=>{c(n)})})}onFocus(){kt.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){kt.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},ir=new WeakMap,Jm),wt,gs,ps,ra,sa,ys,na,aa,eg,k0=(eg=class{constructor(s={}){Me(this,wt);Me(this,gs);Me(this,ps);Me(this,ra);Me(this,sa);Me(this,ys);Me(this,na);Me(this,aa);Ce(this,wt,s.queryCache||new B0),Ce(this,gs,s.mutationCache||new L0),Ce(this,ps,s.defaultOptions||{}),Ce(this,ra,new Map),Ce(this,sa,new Map),Ce(this,ys,0)}mount(){Lo(this,ys)._++,G(this,ys)===1&&(Ce(this,na,qh.subscribe(async s=>{s&&(await this.resumePausedMutations(),G(this,wt).onFocus())})),Ce(this,aa,Io.subscribe(async s=>{s&&(await this.resumePausedMutations(),G(this,wt).onOnline())})))}unmount(){var s,n;Lo(this,ys)._--,G(this,ys)===0&&((s=G(this,na))==null||s.call(this),Ce(this,na,void 0),(n=G(this,aa))==null||n.call(this),Ce(this,aa,void 0))}isFetching(s){return G(this,wt).findAll({...s,fetchStatus:"fetching"}).length}isMutating(s){return G(this,gs).findAll({...s,status:"pending"}).length}getQueryData(s){var c;const n=this.defaultQueryOptions({queryKey:s});return(c=G(this,wt).get(n.queryHash))==null?void 0:c.state.data}ensureQueryData(s){const n=this.defaultQueryOptions(s),c=G(this,wt).build(this,n),g=c.state.data;return g===void 0?this.fetchQuery(s):(s.revalidateIfStale&&c.isStaleByTime(bs(n.staleTime,c))&&this.prefetchQuery(n),Promise.resolve(g))}getQueriesData(s){return G(this,wt).findAll(s).map(({queryKey:n,state:c})=>{const g=c.data;return[n,g]})}setQueryData(s,n,c){const g=this.defaultQueryOptions({queryKey:s}),w=G(this,wt).get(g.queryHash),T=w==null?void 0:w.state.data,M=v0(n,T);if(M!==void 0)return G(this,wt).build(this,g).setData(M,{...c,manual:!0})}setQueriesData(s,n,c){return kt.batch(()=>G(this,wt).findAll(s).map(({queryKey:g})=>[g,this.setQueryData(g,n,c)]))}getQueryState(s){var c;const n=this.defaultQueryOptions({queryKey:s});return(c=G(this,wt).get(n.queryHash))==null?void 0:c.state}removeQueries(s){const n=G(this,wt);kt.batch(()=>{n.findAll(s).forEach(c=>{n.remove(c)})})}resetQueries(s,n){const c=G(this,wt);return kt.batch(()=>(c.findAll(s).forEach(g=>{g.reset()}),this.refetchQueries({type:"active",...s},n)))}cancelQueries(s,n={}){const c={revert:!0,...n},g=kt.batch(()=>G(this,wt).findAll(s).map(w=>w.cancel(c)));return Promise.all(g).then(Jt).catch(Jt)}invalidateQueries(s,n={}){return kt.batch(()=>(G(this,wt).findAll(s).forEach(c=>{c.invalidate()}),(s==null?void 0:s.refetchType)==="none"?Promise.resolve():this.refetchQueries({...s,type:(s==null?void 0:s.refetchType)??(s==null?void 0:s.type)??"active"},n)))}refetchQueries(s,n={}){const c={...n,cancelRefetch:n.cancelRefetch??!0},g=kt.batch(()=>G(this,wt).findAll(s).filter(w=>!w.isDisabled()&&!w.isStatic()).map(w=>{let T=w.fetch(void 0,c);return c.throwOnError||(T=T.catch(Jt)),w.state.fetchStatus==="paused"?Promise.resolve():T}));return Promise.all(g).then(Jt)}fetchQuery(s){const n=this.defaultQueryOptions(s);n.retry===void 0&&(n.retry=!1);const c=G(this,wt).build(this,n);return c.isStaleByTime(bs(n.staleTime,c))?c.fetch(n):Promise.resolve(c.state.data)}prefetchQuery(s){return this.fetchQuery(s).then(Jt).catch(Jt)}fetchInfiniteQuery(s){return s.behavior=om(s.pages),this.fetchQuery(s)}prefetchInfiniteQuery(s){return this.fetchInfiniteQuery(s).then(Jt).catch(Jt)}ensureInfiniteQueryData(s){return s.behavior=om(s.pages),this.ensureQueryData(s)}resumePausedMutations(){return Io.isOnline()?G(this,gs).resumePausedMutations():Promise.resolve()}getQueryCache(){return G(this,wt)}getMutationCache(){return G(this,gs)}getDefaultOptions(){return G(this,ps)}setDefaultOptions(s){Ce(this,ps,s)}setQueryDefaults(s,n){G(this,ra).set(en(s),{queryKey:s,defaultOptions:n})}getQueryDefaults(s){const n=[...G(this,ra).values()],c={};return n.forEach(g=>{sl(s,g.queryKey)&&Object.assign(c,g.defaultOptions)}),c}setMutationDefaults(s,n){G(this,sa).set(en(s),{mutationKey:s,defaultOptions:n})}getMutationDefaults(s){const n=[...G(this,sa).values()],c={};return n.forEach(g=>{sl(s,g.mutationKey)&&Object.assign(c,g.defaultOptions)}),c}defaultQueryOptions(s){if(s._defaulted)return s;const n={...G(this,ps).queries,...this.getQueryDefaults(s.queryKey),...s,_defaulted:!0};return n.queryHash||(n.queryHash=Fh(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===Ih&&(n.enabled=!1),n}defaultMutationOptions(s){return s!=null&&s._defaulted?s:{...G(this,ps).mutations,...(s==null?void 0:s.mutationKey)&&this.getMutationDefaults(s.mutationKey),...s,_defaulted:!0}}clear(){G(this,wt).clear(),G(this,gs).clear()}},wt=new WeakMap,gs=new WeakMap,ps=new WeakMap,ra=new WeakMap,sa=new WeakMap,ys=new WeakMap,na=new WeakMap,aa=new WeakMap,eg),dg=$.createContext(void 0),tn=s=>{const n=$.useContext(dg);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},H0=({client:s,children:n})=>($.useEffect(()=>(s.mount(),()=>{s.unmount()}),[s]),N.jsx(dg.Provider,{value:s,children:n})),_g=$.createContext(!1),N0=()=>$.useContext(_g);_g.Provider;function j0(){let s=!1;return{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s}}var z0=$.createContext(j0()),U0=()=>$.useContext(z0),P0=(s,n)=>{(s.suspense||s.throwOnError||s.experimental_prefetchInRender)&&(n.isReset()||(s.retryOnMount=!1))},F0=s=>{$.useEffect(()=>{s.clearReset()},[s])},I0=({result:s,errorResetBoundary:n,throwOnError:c,query:g,suspense:w})=>s.isError&&!n.isReset()&&!s.isFetching&&g&&(w&&s.data===void 0||ag(c,[s.error,g])),q0=s=>{if(s.suspense){const c=w=>w==="static"?w:Math.max(w??1e3,1e3),g=s.staleTime;s.staleTime=typeof g=="function"?(...w)=>c(g(...w)):c(g),typeof s.gcTime=="number"&&(s.gcTime=Math.max(s.gcTime,1e3))}},K0=(s,n)=>s.isLoading&&s.isFetching&&!n,W0=(s,n)=>(s==null?void 0:s.suspense)&&n.isPending,um=(s,n,c)=>n.fetchOptimistic(s).catch(()=>{c.clearReset()});function Y0(s,n,c){var m,y,S,A,b;const g=N0(),w=U0(),T=tn(),M=T.defaultQueryOptions(s);(y=(m=T.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||y.call(m,M),M._optimisticResults=g?"isRestoring":"optimistic",q0(M),P0(M,w),F0(w);const o=!T.getQueryCache().get(M.queryHash),[_]=$.useState(()=>new n(T,M)),d=_.getOptimisticResult(M),p=!g&&s.subscribed!==!1;if($.useSyncExternalStore($.useCallback(l=>{const h=p?_.subscribe(kt.batchCalls(l)):Jt;return _.updateResult(),h},[_,p]),()=>_.getCurrentResult(),()=>_.getCurrentResult()),$.useEffect(()=>{_.setOptions(M)},[M,_]),W0(M,d))throw um(M,_,w);if(I0({result:d,errorResetBoundary:w,throwOnError:M.throwOnError,query:T.getQueryCache().get(M.queryHash),suspense:M.suspense}))throw d.error;if((A=(S=T.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||A.call(S,M,d),M.experimental_prefetchInRender&&!Js&&K0(d,g)){const l=o?um(M,_,w):(b=T.getQueryCache().get(M.queryHash))==null?void 0:b.promise;l==null||l.catch(Jt).finally(()=>{_.updateResult()})}return M.notifyOnChangeProps?d:_.trackResult(d)}function Go(s,n){return Y0(s,R0)}function dl(s,n){const c=tn(),[g]=$.useState(()=>new O0(c,s));$.useEffect(()=>{g.setOptions(s)},[g,s]);const w=$.useSyncExternalStore($.useCallback(M=>g.subscribe(kt.batchCalls(M)),[g]),()=>g.getCurrentResult(),()=>g.getCurrentResult()),T=$.useCallback((M,o)=>{g.mutate(M,o).catch(Jt)},[g]);if(w.error&&ag(g.options.throwOnError,[w.error]))throw w.error;return{...w,mutate:T,mutateAsync:w.mutate}}/**
50
+ * react-router v7.9.6
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var vg=s=>{throw TypeError(s)},G0=(s,n,c)=>n.has(s)||vg("Cannot "+c),dh=(s,n,c)=>(G0(s,n,"read from private field"),c?c.call(s):n.get(s)),Q0=(s,n,c)=>n.has(s)?vg("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(s):n.set(s,c),hm="popstate";function V0(s={}){function n(g,w){let{pathname:T,search:M,hash:o}=g.location;return nl("",{pathname:T,search:M,hash:o},w.state&&w.state.usr||null,w.state&&w.state.key||"default")}function c(g,w){return typeof w=="string"?w:sr(w)}return $0(n,c,null,s)}function Ie(s,n){if(s===!1||s===null||typeof s>"u")throw new Error(n)}function Dt(s,n){if(!s){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function X0(){return Math.random().toString(36).substring(2,10)}function fm(s,n){return{usr:s.state,key:s.key,idx:n}}function nl(s,n,c=null,g){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof n=="string"?Cs(n):n,state:c,key:n&&n.key||g||X0()}}function sr({pathname:s="/",search:n="",hash:c=""}){return n&&n!=="?"&&(s+=n.charAt(0)==="?"?n:"?"+n),c&&c!=="#"&&(s+=c.charAt(0)==="#"?c:"#"+c),s}function Cs(s){let n={};if(s){let c=s.indexOf("#");c>=0&&(n.hash=s.substring(c),s=s.substring(0,c));let g=s.indexOf("?");g>=0&&(n.search=s.substring(g),s=s.substring(0,g)),s&&(n.pathname=s)}return n}function $0(s,n,c,g={}){let{window:w=document.defaultView,v5Compat:T=!1}=g,M=w.history,o="POP",_=null,d=p();d==null&&(d=0,M.replaceState({...M.state,idx:d},""));function p(){return(M.state||{idx:null}).idx}function m(){o="POP";let l=p(),h=l==null?null:l-d;d=l,_&&_({action:o,location:b.location,delta:h})}function y(l,h){o="PUSH";let u=nl(b.location,l,h);d=p()+1;let f=fm(u,d),E=b.createHref(u);try{M.pushState(f,"",E)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;w.location.assign(E)}T&&_&&_({action:o,location:b.location,delta:1})}function S(l,h){o="REPLACE";let u=nl(b.location,l,h);d=p();let f=fm(u,d),E=b.createHref(u);M.replaceState(f,"",E),T&&_&&_({action:o,location:b.location,delta:0})}function A(l){return mg(l)}let b={get action(){return o},get location(){return s(w,M)},listen(l){if(_)throw new Error("A history only accepts one active listener");return w.addEventListener(hm,m),_=l,()=>{w.removeEventListener(hm,m),_=null}},createHref(l){return n(w,l)},createURL:A,encodeLocation(l){let h=A(l);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:y,replace:S,go(l){return M.go(l)}};return b}function mg(s,n=!1){let c="http://localhost";typeof window<"u"&&(c=window.location.origin!=="null"?window.location.origin:window.location.href),Ie(c,"No window.location.(origin|href) available to create URL");let g=typeof s=="string"?s:sr(s);return g=g.replace(/ $/,"%20"),!n&&g.startsWith("//")&&(g=c+g),new URL(g,c)}var il,dm=class{constructor(s){if(Q0(this,il,new Map),s)for(let[n,c]of s)this.set(n,c)}get(s){if(dh(this,il).has(s))return dh(this,il).get(s);if(s.defaultValue!==void 0)return s.defaultValue;throw new Error("No value found for context")}set(s,n){dh(this,il).set(s,n)}};il=new WeakMap;var Z0=new Set(["lazy","caseSensitive","path","id","index","children"]);function J0(s){return Z0.has(s)}var eS=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function tS(s){return eS.has(s)}function iS(s){return s.index===!0}function al(s,n,c=[],g={},w=!1){return s.map((T,M)=>{let o=[...c,String(M)],_=typeof T.id=="string"?T.id:o.join("-");if(Ie(T.index!==!0||!T.children,"Cannot specify children on an index route"),Ie(w||!g[_],`Found a route id collision on id "${_}". Route id's must be globally unique within Data Router usages`),iS(T)){let d={...T,id:_};return g[_]=_m(d,n(d)),d}else{let d={...T,id:_,children:void 0};return g[_]=_m(d,n(d)),T.children&&(d.children=al(T.children,n,o,g,w)),d}})}function _m(s,n){return Object.assign(s,{...n,...typeof n.lazy=="object"&&n.lazy!=null?{lazy:{...s.lazy,...n.lazy}}:{}})}function cs(s,n,c="/"){return rl(s,n,c,!1)}function rl(s,n,c,g){let w=typeof n=="string"?Cs(n):n,T=Ui(w.pathname||"/",c);if(T==null)return null;let M=gg(s);sS(M);let o=null;for(let _=0;o==null&&_<M.length;++_){let d=vS(T);o=dS(M[_],d,g)}return o}function rS(s,n){let{route:c,pathname:g,params:w}=s;return{id:c.id,pathname:g,params:w,data:n[c.id],loaderData:n[c.id],handle:c.handle}}function gg(s,n=[],c=[],g="",w=!1){let T=(M,o,_=w,d)=>{let p={relativePath:d===void 0?M.path||"":d,caseSensitive:M.caseSensitive===!0,childrenIndex:o,route:M};if(p.relativePath.startsWith("/")){if(!p.relativePath.startsWith(g)&&_)return;Ie(p.relativePath.startsWith(g),`Absolute route path "${p.relativePath}" nested under path "${g}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),p.relativePath=p.relativePath.slice(g.length)}let m=rr([g,p.relativePath]),y=c.concat(p);M.children&&M.children.length>0&&(Ie(M.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),gg(M.children,n,y,m,_)),!(M.path==null&&!M.index)&&n.push({path:m,score:hS(m,M.index),routesMeta:y})};return s.forEach((M,o)=>{var _;if(M.path===""||!((_=M.path)!=null&&_.includes("?")))T(M,o);else for(let d of pg(M.path))T(M,o,!0,d)}),n}function pg(s){let n=s.split("/");if(n.length===0)return[];let[c,...g]=n,w=c.endsWith("?"),T=c.replace(/\?$/,"");if(g.length===0)return w?[T,""]:[T];let M=pg(g.join("/")),o=[];return o.push(...M.map(_=>_===""?T:[T,_].join("/"))),w&&o.push(...M),o.map(_=>s.startsWith("/")&&_===""?"/":_)}function sS(s){s.sort((n,c)=>n.score!==c.score?c.score-n.score:fS(n.routesMeta.map(g=>g.childrenIndex),c.routesMeta.map(g=>g.childrenIndex)))}var nS=/^:[\w-]+$/,aS=3,lS=2,oS=1,cS=10,uS=-2,vm=s=>s==="*";function hS(s,n){let c=s.split("/"),g=c.length;return c.some(vm)&&(g+=uS),n&&(g+=lS),c.filter(w=>!vm(w)).reduce((w,T)=>w+(nS.test(T)?aS:T===""?oS:cS),g)}function fS(s,n){return s.length===n.length&&s.slice(0,-1).every((g,w)=>g===n[w])?s[s.length-1]-n[n.length-1]:0}function dS(s,n,c=!1){let{routesMeta:g}=s,w={},T="/",M=[];for(let o=0;o<g.length;++o){let _=g[o],d=o===g.length-1,p=T==="/"?n:n.slice(T.length)||"/",m=qo({path:_.relativePath,caseSensitive:_.caseSensitive,end:d},p),y=_.route;if(!m&&d&&c&&!g[g.length-1].route.index&&(m=qo({path:_.relativePath,caseSensitive:_.caseSensitive,end:!1},p)),!m)return null;Object.assign(w,m.params),M.push({params:w,pathname:rr([T,m.pathname]),pathnameBase:yS(rr([T,m.pathnameBase])),route:y}),m.pathnameBase!=="/"&&(T=rr([T,m.pathnameBase]))}return M}function qo(s,n){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[c,g]=_S(s.path,s.caseSensitive,s.end),w=n.match(c);if(!w)return null;let T=w[0],M=T.replace(/(.)\/+$/,"$1"),o=w.slice(1);return{params:g.reduce((d,{paramName:p,isOptional:m},y)=>{if(p==="*"){let A=o[y]||"";M=T.slice(0,T.length-A.length).replace(/(.)\/+$/,"$1")}const S=o[y];return m&&!S?d[p]=void 0:d[p]=(S||"").replace(/%2F/g,"/"),d},{}),pathname:T,pathnameBase:M,pattern:s}}function _S(s,n=!1,c=!0){Dt(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let g=[],w="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(M,o,_)=>(g.push({paramName:o,isOptional:_!=null}),_?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(g.push({paramName:"*"}),w+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):c?w+="\\/*$":s!==""&&s!=="/"&&(w+="(?:(?=\\/|$))"),[new RegExp(w,n?void 0:"i"),g]}function vS(s){try{return s.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return Dt(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),s}}function Ui(s,n){if(n==="/")return s;if(!s.toLowerCase().startsWith(n.toLowerCase()))return null;let c=n.endsWith("/")?n.length-1:n.length,g=s.charAt(c);return g&&g!=="/"?null:s.slice(c)||"/"}function mS({basename:s,pathname:n}){return n==="/"?s:rr([s,n])}var gS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Qo=s=>gS.test(s);function pS(s,n="/"){let{pathname:c,search:g="",hash:w=""}=typeof s=="string"?Cs(s):s,T;if(c)if(Qo(c))T=c;else{if(c.includes("//")){let M=c;c=c.replace(/\/\/+/g,"/"),Dt(!1,`Pathnames cannot have embedded double slashes - normalizing ${M} -> ${c}`)}c.startsWith("/")?T=mm(c.substring(1),"/"):T=mm(c,n)}else T=n;return{pathname:T,search:SS(g),hash:bS(w)}}function mm(s,n){let c=n.replace(/\/+$/,"").split("/");return s.split("/").forEach(w=>{w===".."?c.length>1&&c.pop():w!=="."&&c.push(w)}),c.length>1?c.join("/"):"/"}function _h(s,n,c,g){return`Cannot include a '${s}' character in a manually specified \`to.${n}\` field [${JSON.stringify(g)}]. Please separate it out to the \`to.${c}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function yg(s){return s.filter((n,c)=>c===0||n.route.path&&n.route.path.length>0)}function Wh(s){let n=yg(s);return n.map((c,g)=>g===n.length-1?c.pathname:c.pathnameBase)}function Yh(s,n,c,g=!1){let w;typeof s=="string"?w=Cs(s):(w={...s},Ie(!w.pathname||!w.pathname.includes("?"),_h("?","pathname","search",w)),Ie(!w.pathname||!w.pathname.includes("#"),_h("#","pathname","hash",w)),Ie(!w.search||!w.search.includes("#"),_h("#","search","hash",w)));let T=s===""||w.pathname==="",M=T?"/":w.pathname,o;if(M==null)o=c;else{let m=n.length-1;if(!g&&M.startsWith("..")){let y=M.split("/");for(;y[0]==="..";)y.shift(),m-=1;w.pathname=y.join("/")}o=m>=0?n[m]:"/"}let _=pS(w,o),d=M&&M!=="/"&&M.endsWith("/"),p=(T||M===".")&&c.endsWith("/");return!_.pathname.endsWith("/")&&(d||p)&&(_.pathname+="/"),_}var rr=s=>s.join("/").replace(/\/\/+/g,"/"),yS=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),SS=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,bS=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,Ko=class{constructor(s,n,c,g=!1){this.status=s,this.statusText=n||"",this.internal=g,c instanceof Error?(this.data=c.toString(),this.error=c):this.data=c}};function ll(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function Gh(s){return s.filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ss=Symbol("Uninstrumented");function CS(s,n){let c={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};s.forEach(w=>w({id:n.id,index:n.index,path:n.path,instrument(T){let M=Object.keys(c);for(let o of M)T[o]&&c[o].push(T[o])}}));let g={};if(typeof n.lazy=="function"&&c.lazy.length>0){let w=Gn(c.lazy,n.lazy,()=>{});w&&(g.lazy=w)}if(typeof n.lazy=="object"){let w=n.lazy;["middleware","loader","action"].forEach(T=>{let M=w[T],o=c[`lazy.${T}`];if(typeof M=="function"&&o.length>0){let _=Gn(o,M,()=>{});_&&(g.lazy=Object.assign(g.lazy||{},{[T]:_}))}})}return["loader","action"].forEach(w=>{let T=n[w];if(typeof T=="function"&&c[w].length>0){let M=T[Ss]??T,o=Gn(c[w],M,(..._)=>gm(_[0]));o&&(o[Ss]=M,g[w]=o)}}),n.middleware&&n.middleware.length>0&&c.middleware.length>0&&(g.middleware=n.middleware.map(w=>{let T=w[Ss]??w,M=Gn(c.middleware,T,(...o)=>gm(o[0]));return M?(M[Ss]=T,M):w})),g}function ES(s,n){let c={navigate:[],fetch:[]};if(n.forEach(g=>g({instrument(w){let T=Object.keys(w);for(let M of T)w[M]&&c[M].push(w[M])}})),c.navigate.length>0){let g=s.navigate[Ss]??s.navigate,w=Gn(c.navigate,g,(...T)=>{let[M,o]=T;return{to:typeof M=="number"||typeof M=="string"?M:M?sr(M):".",...pm(s,o??{})}});w&&(w[Ss]=g,s.navigate=w)}if(c.fetch.length>0){let g=s.fetch[Ss]??s.fetch,w=Gn(c.fetch,g,(...T)=>{let[M,,o,_]=T;return{href:o??".",fetcherKey:M,...pm(s,_??{})}});w&&(w[Ss]=g,s.fetch=w)}return s}function Gn(s,n,c){return s.length===0?null:async(...g)=>{let w=await Sg(s,c(...g),()=>n(...g),s.length-1);if(w.type==="error")throw w.value;return w.value}}async function Sg(s,n,c,g){let w=s[g],T;if(w){let M,o=async()=>(M?console.error("You cannot call instrumented handlers more than once"):M=Sg(s,n,c,g-1),T=await M,Ie(T,"Expected a result"),T.type==="error"&&T.value instanceof Error?{status:"error",error:T.value}:{status:"success",error:void 0});try{await w(o,n)}catch(_){console.error("An instrumentation function threw an error:",_)}M||await o(),await M}else try{T={type:"success",value:await c()}}catch(M){T={type:"error",value:M}}return T||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function gm(s){let{request:n,context:c,params:g,unstable_pattern:w}=s;return{request:wS(n),params:{...g},unstable_pattern:w,context:xS(c)}}function pm(s,n){return{currentUrl:sr(s.state.location),..."formMethod"in n?{formMethod:n.formMethod}:{},..."formEncType"in n?{formEncType:n.formEncType}:{},..."formData"in n?{formData:n.formData}:{},..."body"in n?{body:n.body}:{}}}function wS(s){return{method:s.method,url:s.url,headers:{get:(...n)=>s.headers.get(...n)}}}function xS(s){if(DS(s)){let n={...s};return Object.freeze(n),n}else return{get:n=>s.get(n)}}var RS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function DS(s){if(s===null||typeof s!="object")return!1;const n=Object.getPrototypeOf(s);return n===Object.prototype||n===null||Object.getOwnPropertyNames(n).sort().join("\0")===RS}var bg=["POST","PUT","PATCH","DELETE"],AS=new Set(bg),TS=["GET",...bg],MS=new Set(TS),LS=new Set([301,302,303,307,308]),OS=new Set([307,308]),vh={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},BS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$a={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},kS=s=>({hasErrorBoundary:!!s.hasErrorBoundary}),Cg="remix-router-transitions",Eg=Symbol("ResetLoaderData");function HS(s){const n=s.window?s.window:typeof window<"u"?window:void 0,c=typeof n<"u"&&typeof n.document<"u"&&typeof n.document.createElement<"u";Ie(s.routes.length>0,"You must provide a non-empty routes array to createRouter");let g=s.hydrationRouteProperties||[],w=s.mapRouteProperties||kS,T=w;if(s.unstable_instrumentations){let W=s.unstable_instrumentations;T=Z=>({...w(Z),...CS(W.map(oe=>oe.route).filter(Boolean),Z)})}let M={},o=al(s.routes,T,void 0,M),_,d=s.basename||"/";d.startsWith("/")||(d=`/${d}`);let p=s.dataStrategy||PS,m={...s.future},y=null,S=new Set,A=null,b=null,l=null,h=s.hydrationData!=null,u=cs(o,s.history.location,d),f=!1,E=null,R;if(u==null&&!s.patchRoutesOnNavigation){let W=ki(404,{pathname:s.history.location.pathname}),{matches:Z,route:oe}=Bo(o);R=!0,u=Z,E={[oe.id]:W}}else if(u&&!s.hydrationData&&on(u,o,s.history.location.pathname).active&&(u=null),u)if(u.some(W=>W.route.lazy))R=!1;else if(!u.some(W=>Qh(W.route)))R=!0;else{let W=s.hydrationData?s.hydrationData.loaderData:null,Z=s.hydrationData?s.hydrationData.errors:null;if(Z){let oe=u.findIndex(pe=>Z[pe.route.id]!==void 0);R=u.slice(0,oe+1).every(pe=>!Nh(pe.route,W,Z))}else R=u.every(oe=>!Nh(oe.route,W,Z))}else{R=!1,u=[];let W=on(null,o,s.history.location.pathname);W.active&&W.matches&&(f=!0,u=W.matches)}let L,x={historyAction:s.history.action,location:s.history.location,matches:u,initialized:R,navigation:vh,restoreScrollPosition:s.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:s.hydrationData&&s.hydrationData.loaderData||{},actionData:s.hydrationData&&s.hydrationData.actionData||null,errors:s.hydrationData&&s.hydrationData.errors||E,fetchers:new Map,blockers:new Map},C="POP",B=!1,z,I=!1,F=new Map,Q=null,ce=!1,ae=!1,q=new Set,J=new Map,he=0,k=-1,U=new Map,O=new Set,j=new Map,X=new Map,te=new Set,ve=new Map,Y,ie=null;function P(){if(y=s.history.listen(({action:W,location:Z,delta:oe})=>{if(Y){Y(),Y=void 0;return}Dt(ve.size===0||oe!=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 pe=Es({currentLocation:x.location,nextLocation:Z,historyAction:W});if(pe&&oe!=null){let ye=new Promise(De=>{Y=De});s.history.go(oe*-1),nn(pe,{state:"blocked",location:Z,proceed(){nn(pe,{state:"proceeding",proceed:void 0,reset:void 0,location:Z}),ye.then(()=>s.history.go(oe))},reset(){let De=new Map(x.blockers);De.set(pe,$a),ue({blockers:De})}});return}return Ne(W,Z)}),c){tb(n,F);let W=()=>ib(n,F);n.addEventListener("pagehide",W),Q=()=>n.removeEventListener("pagehide",W)}return x.initialized||Ne("POP",x.location,{initialHydration:!0}),L}function le(){y&&y(),Q&&Q(),S.clear(),z&&z.abort(),x.fetchers.forEach((W,Z)=>Pi(Z)),x.blockers.forEach((W,Z)=>gl(Z))}function Se(W){return S.add(W),()=>S.delete(W)}function ue(W,Z={}){W.matches&&(W.matches=W.matches.map(ye=>{let De=M[ye.route.id],Ae=ye.route;return Ae.element!==De.element||Ae.errorElement!==De.errorElement||Ae.hydrateFallbackElement!==De.hydrateFallbackElement?{...ye,route:De}:ye})),x={...x,...W};let oe=[],pe=[];x.fetchers.forEach((ye,De)=>{ye.state==="idle"&&(te.has(De)?oe.push(De):pe.push(De))}),te.forEach(ye=>{!x.fetchers.has(ye)&&!J.has(ye)&&oe.push(ye)}),[...S].forEach(ye=>ye(x,{deletedFetchers:oe,viewTransitionOpts:Z.viewTransitionOpts,flushSync:Z.flushSync===!0})),oe.forEach(ye=>Pi(ye)),pe.forEach(ye=>x.fetchers.delete(ye))}function Xe(W,Z,{flushSync:oe}={}){var Le,Te;let pe=x.actionData!=null&&x.navigation.formMethod!=null&&ei(x.navigation.formMethod)&&x.navigation.state==="loading"&&((Le=W.state)==null?void 0:Le._isRedirect)!==!0,ye;Z.actionData?Object.keys(Z.actionData).length>0?ye=Z.actionData:ye=null:pe?ye=x.actionData:ye=null;let De=Z.loaderData?Am(x.loaderData,Z.loaderData,Z.matches||[],Z.errors):x.loaderData,Ae=x.blockers;Ae.size>0&&(Ae=new Map(Ae),Ae.forEach((je,at)=>Ae.set(at,$a)));let Ee=ce?!1:Nr(W,Z.matches||x.matches),be=B===!0||x.navigation.formMethod!=null&&ei(x.navigation.formMethod)&&((Te=W.state)==null?void 0:Te._isRedirect)!==!0;_&&(o=_,_=void 0),ce||C==="POP"||(C==="PUSH"?s.history.push(W,W.state):C==="REPLACE"&&s.history.replace(W,W.state));let we;if(C==="POP"){let je=F.get(x.location.pathname);je&&je.has(W.pathname)?we={currentLocation:x.location,nextLocation:W}:F.has(W.pathname)&&(we={currentLocation:W,nextLocation:x.location})}else if(I){let je=F.get(x.location.pathname);je?je.add(W.pathname):(je=new Set([W.pathname]),F.set(x.location.pathname,je)),we={currentLocation:x.location,nextLocation:W}}ue({...Z,actionData:ye,loaderData:De,historyAction:C,location:W,initialized:!0,navigation:vh,revalidation:"idle",restoreScrollPosition:Ee,preventScrollReset:be,blockers:Ae},{viewTransitionOpts:we,flushSync:oe===!0}),C="POP",B=!1,I=!1,ce=!1,ae=!1,ie==null||ie.resolve(),ie=null}async function He(W,Z){if(typeof W=="number"){s.history.go(W);return}let oe=Hh(x.location,x.matches,d,W,Z==null?void 0:Z.fromRouteId,Z==null?void 0:Z.relative),{path:pe,submission:ye,error:De}=ym(!1,oe,Z),Ae=x.location,Ee=nl(x.location,pe,Z&&Z.state);Ee={...Ee,...s.history.encodeLocation(Ee)};let be=Z&&Z.replace!=null?Z.replace:void 0,we="PUSH";be===!0?we="REPLACE":be===!1||ye!=null&&ei(ye.formMethod)&&ye.formAction===x.location.pathname+x.location.search&&(we="REPLACE");let Le=Z&&"preventScrollReset"in Z?Z.preventScrollReset===!0:void 0,Te=(Z&&Z.flushSync)===!0,je=Es({currentLocation:Ae,nextLocation:Ee,historyAction:we});if(je){nn(je,{state:"blocked",location:Ee,proceed(){nn(je,{state:"proceeding",proceed:void 0,reset:void 0,location:Ee}),He(W,Z)},reset(){let at=new Map(x.blockers);at.set(je,$a),ue({blockers:at})}});return}await Ne(we,Ee,{submission:ye,pendingError:De,preventScrollReset:Le,replace:Z&&Z.replace,enableViewTransition:Z&&Z.viewTransition,flushSync:Te})}function ge(){ie||(ie=rb()),Ci(),ue({revalidation:"loading"});let W=ie.promise;return x.navigation.state==="submitting"?W:x.navigation.state==="idle"?(Ne(x.historyAction,x.location,{startUninterruptedRevalidation:!0}),W):(Ne(C||x.historyAction,x.navigation.location,{overrideNavigation:x.navigation,enableViewTransition:I===!0}),W)}async function Ne(W,Z,oe){z&&z.abort(),z=null,C=W,ce=(oe&&oe.startUninterruptedRevalidation)===!0,ln(x.location,x.matches),B=(oe&&oe.preventScrollReset)===!0,I=(oe&&oe.enableViewTransition)===!0;let pe=_||o,ye=oe&&oe.overrideNavigation,De=oe!=null&&oe.initialHydration&&x.matches&&x.matches.length>0&&!f?x.matches:cs(pe,Z,d),Ae=(oe&&oe.flushSync)===!0;if(De&&x.initialized&&!ae&&QS(x.location,Z)&&!(oe&&oe.submission&&ei(oe.submission.formMethod))){Xe(Z,{matches:De},{flushSync:Ae});return}let Ee=on(De,pe,Z.pathname);if(Ee.active&&Ee.matches&&(De=Ee.matches),!De){let{error:gt,notFoundMatches:it,route:$e}=Hr(Z.pathname);Xe(Z,{matches:it,loaderData:{},errors:{[$e.id]:gt}},{flushSync:Ae});return}z=new AbortController;let be=Yn(s.history,Z,z.signal,oe&&oe.submission),we=s.getContext?await s.getContext():new dm,Le;if(oe&&oe.pendingError)Le=[us(De).route.id,{type:"error",error:oe.pendingError}];else if(oe&&oe.submission&&ei(oe.submission.formMethod)){let gt=await mt(be,Z,oe.submission,De,we,Ee.active,oe&&oe.initialHydration===!0,{replace:oe.replace,flushSync:Ae});if(gt.shortCircuited)return;if(gt.pendingActionResult){let[it,$e]=gt.pendingActionResult;if(Si($e)&&ll($e.error)&&$e.error.status===404){z=null,Xe(Z,{matches:gt.matches,loaderData:{},errors:{[it]:$e.error}});return}}De=gt.matches||De,Le=gt.pendingActionResult,ye=mh(Z,oe.submission),Ae=!1,Ee.active=!1,be=Yn(s.history,be.url,be.signal)}let{shortCircuited:Te,matches:je,loaderData:at,errors:bt}=await Be(be,Z,De,we,Ee.active,ye,oe&&oe.submission,oe&&oe.fetcherSubmission,oe&&oe.replace,oe&&oe.initialHydration===!0,Ae,Le);Te||(z=null,Xe(Z,{matches:je||De,...Tm(Le),loaderData:at,errors:bt}))}async function mt(W,Z,oe,pe,ye,De,Ae,Ee={}){Ci();let be=JS(Z,oe);if(ue({navigation:be},{flushSync:Ee.flushSync===!0}),De){let Te=await ws(pe,Z.pathname,W.signal);if(Te.type==="aborted")return{shortCircuited:!0};if(Te.type==="error"){if(Te.partialMatches.length===0){let{matches:at,route:bt}=Bo(o);return{matches:at,pendingActionResult:[bt.id,{type:"error",error:Te.error}]}}let je=us(Te.partialMatches).route.id;return{matches:Te.partialMatches,pendingActionResult:[je,{type:"error",error:Te.error}]}}else if(Te.matches)pe=Te.matches;else{let{notFoundMatches:je,error:at,route:bt}=Hr(Z.pathname);return{matches:je,pendingActionResult:[bt.id,{type:"error",error:at}]}}}let we,Le=zo(pe,Z);if(!Le.route.action&&!Le.route.lazy)we={type:"error",error:ki(405,{method:W.method,pathname:Z.pathname,routeId:Le.route.id})};else{let Te=Qn(T,M,W,pe,Le,Ae?[]:g,ye),je=await dt(W,Te,ye,null);if(we=je[Le.route.id],!we){for(let at of pe)if(je[at.route.id]){we=je[at.route.id];break}}if(W.signal.aborted)return{shortCircuited:!0}}if(qs(we)){let Te;return Ee&&Ee.replace!=null?Te=Ee.replace:Te=xm(we.response.headers.get("Location"),new URL(W.url),d)===x.location.pathname+x.location.search,await St(W,we,!0,{submission:oe,replace:Te}),{shortCircuited:!0}}if(Si(we)){let Te=us(pe,Le.route.id);return(Ee&&Ee.replace)!==!0&&(C="PUSH"),{matches:pe,pendingActionResult:[Te.route.id,we,Le.route.id]}}return{matches:pe,pendingActionResult:[Le.route.id,we]}}async function Be(W,Z,oe,pe,ye,De,Ae,Ee,be,we,Le,Te){let je=De||mh(Z,Ae),at=Ae||Ee||Lm(je),bt=!ce&&!we;if(ye){if(bt){let Ot=ti(Te);ue({navigation:je,...Ot!==void 0?{actionData:Ot}:{}},{flushSync:Le})}let We=await ws(oe,Z.pathname,W.signal);if(We.type==="aborted")return{shortCircuited:!0};if(We.type==="error"){if(We.partialMatches.length===0){let{matches:zr,route:Ei}=Bo(o);return{matches:zr,loaderData:{},errors:{[Ei.id]:We.error}}}let Ot=us(We.partialMatches).route.id;return{matches:We.partialMatches,loaderData:{},errors:{[Ot]:We.error}}}else if(We.matches)oe=We.matches;else{let{error:Ot,notFoundMatches:zr,route:Ei}=Hr(Z.pathname);return{matches:zr,loaderData:{},errors:{[Ei.id]:Ot}}}}let gt=_||o,{dsMatches:it,revalidatingFetchers:$e}=Sm(W,pe,T,M,s.history,x,oe,at,Z,we?[]:g,we===!0,ae,q,te,j,O,gt,d,s.patchRoutesOnNavigation!=null,Te);if(k=++he,!s.dataStrategy&&!it.some(We=>We.shouldLoad)&&!it.some(We=>We.route.middleware&&We.route.middleware.length>0)&&$e.length===0){let We=Fi();return Xe(Z,{matches:oe,loaderData:{},errors:Te&&Si(Te[1])?{[Te[0]]:Te[1].error}:null,...Tm(Te),...We?{fetchers:new Map(x.fetchers)}:{}},{flushSync:Le}),{shortCircuited:!0}}if(bt){let We={};if(!ye){We.navigation=je;let Ot=ti(Te);Ot!==void 0&&(We.actionData=Ot)}$e.length>0&&(We.fetchers=bi($e)),ue(We,{flushSync:Le})}$e.forEach(We=>{jt(We.key),We.controller&&J.set(We.key,We.controller)});let ii=()=>$e.forEach(We=>jt(We.key));z&&z.signal.addEventListener("abort",ii);let{loaderResults:Ii,fetcherResults:Gt}=await Yt(it,$e,W,pe);if(W.signal.aborted)return{shortCircuited:!0};z&&z.signal.removeEventListener("abort",ii),$e.forEach(We=>J.delete(We.key));let rt=ko(Ii);if(rt)return await St(W,rt.result,!0,{replace:be}),{shortCircuited:!0};if(rt=ko(Gt),rt)return O.add(rt.key),await St(W,rt.result,!0,{replace:be}),{shortCircuited:!0};let{loaderData:un,errors:jr}=Dm(x,oe,Ii,Te,$e,Gt);we&&x.errors&&(jr={...x.errors,...jr});let Qt=Fi(),qi=Kt(k),hn=Qt||qi||$e.length>0;return{matches:oe,loaderData:un,errors:jr,...hn?{fetchers:new Map(x.fetchers)}:{}}}function ti(W){if(W&&!Si(W[1]))return{[W[0]]:W[1].data};if(x.actionData)return Object.keys(x.actionData).length===0?null:x.actionData}function bi(W){return W.forEach(Z=>{let oe=x.fetchers.get(Z.key),pe=Za(void 0,oe?oe.data:void 0);x.fetchers.set(Z.key,pe)}),new Map(x.fetchers)}async function lr(W,Z,oe,pe){jt(W);let ye=(pe&&pe.flushSync)===!0,De=_||o,Ae=Hh(x.location,x.matches,d,oe,Z,pe==null?void 0:pe.relative),Ee=cs(De,Ae,d),be=on(Ee,De,Ae);if(be.active&&be.matches&&(Ee=be.matches),!Ee){yt(W,Z,ki(404,{pathname:Ae}),{flushSync:ye});return}let{path:we,submission:Le,error:Te}=ym(!0,Ae,pe);if(Te){yt(W,Z,Te,{flushSync:ye});return}let je=s.getContext?await s.getContext():new dm,at=(pe&&pe.preventScrollReset)===!0;if(Le&&ei(Le.formMethod)){await or(W,Z,we,Ee,je,be.active,ye,at,Le);return}j.set(W,{routeId:Z,path:we}),await kr(W,Z,we,Ee,je,be.active,ye,at,Le)}async function or(W,Z,oe,pe,ye,De,Ae,Ee,be){Ci(),j.delete(W);let we=x.fetchers.get(W);It(W,eb(be,we),{flushSync:Ae});let Le=new AbortController,Te=Yn(s.history,oe,Le.signal,be);if(De){let ht=await ws(pe,new URL(Te.url).pathname,Te.signal,W);if(ht.type==="aborted")return;if(ht.type==="error"){yt(W,Z,ht.error,{flushSync:Ae});return}else if(ht.matches)pe=ht.matches;else{yt(W,Z,ki(404,{pathname:oe}),{flushSync:Ae});return}}let je=zo(pe,oe);if(!je.route.action&&!je.route.lazy){let ht=ki(405,{method:be.formMethod,pathname:oe,routeId:Z});yt(W,Z,ht,{flushSync:Ae});return}J.set(W,Le);let at=he,bt=Qn(T,M,Te,pe,je,g,ye),gt=await dt(Te,bt,ye,W),it=gt[je.route.id];if(!it){for(let ht of bt)if(gt[ht.route.id]){it=gt[ht.route.id];break}}if(Te.signal.aborted){J.get(W)===Le&&J.delete(W);return}if(te.has(W)){if(qs(it)||Si(it)){It(W,Ar(void 0));return}}else{if(qs(it))if(J.delete(W),k>at){It(W,Ar(void 0));return}else return O.add(W),It(W,Za(be)),St(Te,it,!1,{fetcherSubmission:be,preventScrollReset:Ee});if(Si(it)){yt(W,Z,it.error);return}}let $e=x.navigation.location||x.location,ii=Yn(s.history,$e,Le.signal),Ii=_||o,Gt=x.navigation.state!=="idle"?cs(Ii,x.navigation.location,d):x.matches;Ie(Gt,"Didn't find any matches after fetcher action");let rt=++he;U.set(W,rt);let un=Za(be,it.data);x.fetchers.set(W,un);let{dsMatches:jr,revalidatingFetchers:Qt}=Sm(ii,ye,T,M,s.history,x,Gt,be,$e,g,!1,ae,q,te,j,O,Ii,d,s.patchRoutesOnNavigation!=null,[je.route.id,it]);Qt.filter(ht=>ht.key!==W).forEach(ht=>{let ri=ht.key,Vt=x.fetchers.get(ri),pl=Za(void 0,Vt?Vt.data:void 0);x.fetchers.set(ri,pl),jt(ri),ht.controller&&J.set(ri,ht.controller)}),ue({fetchers:new Map(x.fetchers)});let qi=()=>Qt.forEach(ht=>jt(ht.key));Le.signal.addEventListener("abort",qi);let{loaderResults:hn,fetcherResults:We}=await Yt(jr,Qt,ii,ye);if(Le.signal.aborted)return;if(Le.signal.removeEventListener("abort",qi),U.delete(W),J.delete(W),Qt.forEach(ht=>J.delete(ht.key)),x.fetchers.has(W)){let ht=Ar(it.data);x.fetchers.set(W,ht)}let Ot=ko(hn);if(Ot)return St(ii,Ot.result,!1,{preventScrollReset:Ee});if(Ot=ko(We),Ot)return O.add(Ot.key),St(ii,Ot.result,!1,{preventScrollReset:Ee});let{loaderData:zr,errors:Ei}=Dm(x,Gt,hn,void 0,Qt,We);Kt(rt),x.navigation.state==="loading"&&rt>k?(Ie(C,"Expected pending action"),z&&z.abort(),Xe(x.navigation.location,{matches:Gt,loaderData:zr,errors:Ei,fetchers:new Map(x.fetchers)})):(ue({errors:Ei,loaderData:Am(x.loaderData,zr,Gt,Ei),fetchers:new Map(x.fetchers)}),ae=!1)}async function kr(W,Z,oe,pe,ye,De,Ae,Ee,be){let we=x.fetchers.get(W);It(W,Za(be,we?we.data:void 0),{flushSync:Ae});let Le=new AbortController,Te=Yn(s.history,oe,Le.signal);if(De){let $e=await ws(pe,new URL(Te.url).pathname,Te.signal,W);if($e.type==="aborted")return;if($e.type==="error"){yt(W,Z,$e.error,{flushSync:Ae});return}else if($e.matches)pe=$e.matches;else{yt(W,Z,ki(404,{pathname:oe}),{flushSync:Ae});return}}let je=zo(pe,oe);J.set(W,Le);let at=he,bt=Qn(T,M,Te,pe,je,g,ye),it=(await dt(Te,bt,ye,W))[je.route.id];if(J.get(W)===Le&&J.delete(W),!Te.signal.aborted){if(te.has(W)){It(W,Ar(void 0));return}if(qs(it))if(k>at){It(W,Ar(void 0));return}else{O.add(W),await St(Te,it,!1,{preventScrollReset:Ee});return}if(Si(it)){yt(W,Z,it.error);return}It(W,Ar(it.data))}}async function St(W,Z,oe,{submission:pe,fetcherSubmission:ye,preventScrollReset:De,replace:Ae}={}){Z.response.headers.has("X-Remix-Revalidate")&&(ae=!0);let Ee=Z.response.headers.get("Location");Ie(Ee,"Expected a Location header on the redirect Response"),Ee=xm(Ee,new URL(W.url),d);let be=nl(x.location,Ee,{_isRedirect:!0});if(c){let bt=!1;if(Z.response.headers.has("X-Remix-Reload-Document"))bt=!0;else if(Qo(Ee)){const gt=mg(Ee,!0);bt=gt.origin!==n.location.origin||Ui(gt.pathname,d)==null}if(bt){Ae?n.location.replace(Ee):n.location.assign(Ee);return}}z=null;let we=Ae===!0||Z.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Le,formAction:Te,formEncType:je}=x.navigation;!pe&&!ye&&Le&&Te&&je&&(pe=Lm(x.navigation));let at=pe||ye;if(OS.has(Z.response.status)&&at&&ei(at.formMethod))await Ne(we,be,{submission:{...at,formAction:Ee},preventScrollReset:De||B,enableViewTransition:oe?I:void 0});else{let bt=mh(be,pe);await Ne(we,be,{overrideNavigation:bt,fetcherSubmission:ye,preventScrollReset:De||B,enableViewTransition:oe?I:void 0})}}async function dt(W,Z,oe,pe){let ye,De={};try{ye=await IS(p,W,Z,pe,oe,!1)}catch(Ae){return Z.filter(Ee=>Ee.shouldLoad).forEach(Ee=>{De[Ee.route.id]={type:"error",error:Ae}}),De}if(W.signal.aborted)return De;for(let[Ae,Ee]of Object.entries(ye))if($S(Ee)){let be=Ee.result;De[Ae]={type:"redirect",response:YS(be,W,Ae,Z,d)}}else De[Ae]=await WS(Ee);return De}async function Yt(W,Z,oe,pe){let ye=dt(oe,W,pe,null),De=Promise.all(Z.map(async be=>{if(be.matches&&be.match&&be.request&&be.controller){let Le=(await dt(be.request,be.matches,pe,be.key))[be.match.route.id];return{[be.key]:Le}}else return Promise.resolve({[be.key]:{type:"error",error:ki(404,{pathname:be.path})}})})),Ae=await ye,Ee=(await De).reduce((be,we)=>Object.assign(be,we),{});return{loaderResults:Ae,fetcherResults:Ee}}function Ci(){ae=!0,j.forEach((W,Z)=>{J.has(Z)&&q.add(Z),jt(Z)})}function It(W,Z,oe={}){x.fetchers.set(W,Z),ue({fetchers:new Map(x.fetchers)},{flushSync:(oe&&oe.flushSync)===!0})}function yt(W,Z,oe,pe={}){let ye=us(x.matches,Z);Pi(W),ue({errors:{[ye.route.id]:oe},fetchers:new Map(x.fetchers)},{flushSync:(pe&&pe.flushSync)===!0})}function cr(W){return X.set(W,(X.get(W)||0)+1),te.has(W)&&te.delete(W),x.fetchers.get(W)||BS}function fi(W,Z){jt(W,Z==null?void 0:Z.reason),It(W,Ar(null))}function Pi(W){let Z=x.fetchers.get(W);J.has(W)&&!(Z&&Z.state==="loading"&&U.has(W))&&jt(W),j.delete(W),U.delete(W),O.delete(W),te.delete(W),q.delete(W),x.fetchers.delete(W)}function ut(W){let Z=(X.get(W)||0)-1;Z<=0?(X.delete(W),te.add(W)):X.set(W,Z),ue({fetchers:new Map(x.fetchers)})}function jt(W,Z){let oe=J.get(W);oe&&(oe.abort(Z),J.delete(W))}function qt(W){for(let Z of W){let oe=cr(Z),pe=Ar(oe.data);x.fetchers.set(Z,pe)}}function Fi(){let W=[],Z=!1;for(let oe of O){let pe=x.fetchers.get(oe);Ie(pe,`Expected fetcher: ${oe}`),pe.state==="loading"&&(O.delete(oe),W.push(oe),Z=!0)}return qt(W),Z}function Kt(W){let Z=[];for(let[oe,pe]of U)if(pe<W){let ye=x.fetchers.get(oe);Ie(ye,`Expected fetcher: ${oe}`),ye.state==="loading"&&(jt(oe),U.delete(oe),Z.push(oe))}return qt(Z),Z.length>0}function $o(W,Z){let oe=x.blockers.get(W)||$a;return ve.get(W)!==Z&&ve.set(W,Z),oe}function gl(W){x.blockers.delete(W),ve.delete(W)}function nn(W,Z){let oe=x.blockers.get(W)||$a;Ie(oe.state==="unblocked"&&Z.state==="blocked"||oe.state==="blocked"&&Z.state==="blocked"||oe.state==="blocked"&&Z.state==="proceeding"||oe.state==="blocked"&&Z.state==="unblocked"||oe.state==="proceeding"&&Z.state==="unblocked",`Invalid blocker state transition: ${oe.state} -> ${Z.state}`);let pe=new Map(x.blockers);pe.set(W,Z),ue({blockers:pe})}function Es({currentLocation:W,nextLocation:Z,historyAction:oe}){if(ve.size===0)return;ve.size>1&&Dt(!1,"A router only supports one blocker at a time");let pe=Array.from(ve.entries()),[ye,De]=pe[pe.length-1],Ae=x.blockers.get(ye);if(!(Ae&&Ae.state==="proceeding")&&De({currentLocation:W,nextLocation:Z,historyAction:oe}))return ye}function Hr(W){let Z=ki(404,{pathname:W}),oe=_||o,{matches:pe,route:ye}=Bo(oe);return{notFoundMatches:pe,route:ye,error:Z}}function an(W,Z,oe){if(A=W,l=Z,b=oe||null,!h&&x.navigation===vh){h=!0;let pe=Nr(x.location,x.matches);pe!=null&&ue({restoreScrollPosition:pe})}return()=>{A=null,l=null,b=null}}function Vi(W,Z){return b&&b(W,Z.map(pe=>rS(pe,x.loaderData)))||W.key}function ln(W,Z){if(A&&l){let oe=Vi(W,Z);A[oe]=l()}}function Nr(W,Z){if(A){let oe=Vi(W,Z),pe=A[oe];if(typeof pe=="number")return pe}return null}function on(W,Z,oe){if(s.patchRoutesOnNavigation)if(W){if(Object.keys(W[0].params).length>0)return{active:!0,matches:rl(Z,oe,d,!0)}}else return{active:!0,matches:rl(Z,oe,d,!0)||[]};return{active:!1,matches:null}}async function ws(W,Z,oe,pe){if(!s.patchRoutesOnNavigation)return{type:"success",matches:W};let ye=W;for(;;){let De=_==null,Ae=_||o,Ee=M;try{await s.patchRoutesOnNavigation({signal:oe,path:Z,matches:ye,fetcherKey:pe,patch:(Le,Te)=>{oe.aborted||bm(Le,Te,Ae,Ee,T,!1)}})}catch(Le){return{type:"error",error:Le,partialMatches:ye}}finally{De&&!oe.aborted&&(o=[...o])}if(oe.aborted)return{type:"aborted"};let be=cs(Ae,Z,d),we=null;if(be){if(Object.keys(be[0].params).length===0)return{type:"success",matches:be};if(we=rl(Ae,Z,d,!0),!(we&&ye.length<we.length&&cn(ye,we.slice(0,ye.length))))return{type:"success",matches:be}}if(we||(we=rl(Ae,Z,d,!0)),!we||cn(ye,we))return{type:"success",matches:null};ye=we}}function cn(W,Z){return W.length===Z.length&&W.every((oe,pe)=>oe.route.id===Z[pe].route.id)}function xs(W){M={},_=al(W,T,void 0,M)}function Zo(W,Z,oe=!1){let pe=_==null;bm(W,Z,_||o,M,T,oe),pe&&(o=[...o],ue({}))}return L={get basename(){return d},get future(){return m},get state(){return x},get routes(){return o},get window(){return n},initialize:P,subscribe:Se,enableScrollRestoration:an,navigate:He,fetch:lr,revalidate:ge,createHref:W=>s.history.createHref(W),encodeLocation:W=>s.history.encodeLocation(W),getFetcher:cr,resetFetcher:fi,deleteFetcher:ut,dispose:le,getBlocker:$o,deleteBlocker:gl,patchRoutes:Zo,_internalFetchControllers:J,_internalSetRoutes:xs,_internalSetStateDoNotUseOrYouWillBreakYourApp(W){ue(W)}},s.unstable_instrumentations&&(L=ES(L,s.unstable_instrumentations.map(W=>W.router).filter(Boolean))),L}function NS(s){return s!=null&&("formData"in s&&s.formData!=null||"body"in s&&s.body!==void 0)}function Hh(s,n,c,g,w,T){let M,o;if(w){M=[];for(let d of n)if(M.push(d),d.route.id===w){o=d;break}}else M=n,o=n[n.length-1];let _=Yh(g||".",Wh(M),Ui(s.pathname,c)||s.pathname,T==="path");if(g==null&&(_.search=s.search,_.hash=s.hash),(g==null||g===""||g===".")&&o){let d=Vh(_.search);if(o.route.index&&!d)_.search=_.search?_.search.replace(/^\?/,"?index&"):"?index";else if(!o.route.index&&d){let p=new URLSearchParams(_.search),m=p.getAll("index");p.delete("index"),m.filter(S=>S).forEach(S=>p.append("index",S));let y=p.toString();_.search=y?`?${y}`:""}}return c!=="/"&&(_.pathname=mS({basename:c,pathname:_.pathname})),sr(_)}function ym(s,n,c){if(!c||!NS(c))return{path:n};if(c.formMethod&&!ZS(c.formMethod))return{path:n,error:ki(405,{method:c.formMethod})};let g=()=>({path:n,error:ki(400,{type:"invalid-body"})}),T=(c.formMethod||"get").toUpperCase(),M=Tg(n);if(c.body!==void 0){if(c.formEncType==="text/plain"){if(!ei(T))return g();let m=typeof c.body=="string"?c.body:c.body instanceof FormData||c.body instanceof URLSearchParams?Array.from(c.body.entries()).reduce((y,[S,A])=>`${y}${S}=${A}
59
+ `,""):String(c.body);return{path:n,submission:{formMethod:T,formAction:M,formEncType:c.formEncType,formData:void 0,json:void 0,text:m}}}else if(c.formEncType==="application/json"){if(!ei(T))return g();try{let m=typeof c.body=="string"?JSON.parse(c.body):c.body;return{path:n,submission:{formMethod:T,formAction:M,formEncType:c.formEncType,formData:void 0,json:m,text:void 0}}}catch{return g()}}}Ie(typeof FormData=="function","FormData is not available in this environment");let o,_;if(c.formData)o=zh(c.formData),_=c.formData;else if(c.body instanceof FormData)o=zh(c.body),_=c.body;else if(c.body instanceof URLSearchParams)o=c.body,_=Rm(o);else if(c.body==null)o=new URLSearchParams,_=new FormData;else try{o=new URLSearchParams(c.body),_=Rm(o)}catch{return g()}let d={formMethod:T,formAction:M,formEncType:c&&c.formEncType||"application/x-www-form-urlencoded",formData:_,json:void 0,text:void 0};if(ei(d.formMethod))return{path:n,submission:d};let p=Cs(n);return s&&p.search&&Vh(p.search)&&o.append("index",""),p.search=`?${o}`,{path:sr(p),submission:d}}function Sm(s,n,c,g,w,T,M,o,_,d,p,m,y,S,A,b,l,h,u,f){var ce;let E=f?Si(f[1])?f[1].error:f[1].data:void 0,R=w.createURL(T.location),L=w.createURL(_),x;if(p&&T.errors){let ae=Object.keys(T.errors)[0];x=M.findIndex(q=>q.route.id===ae)}else if(f&&Si(f[1])){let ae=f[0];x=M.findIndex(q=>q.route.id===ae)-1}let C=f?f[1].statusCode:void 0,B=C&&C>=400,z={currentUrl:R,currentParams:((ce=T.matches[0])==null?void 0:ce.params)||{},nextUrl:L,nextParams:M[0].params,...o,actionResult:E,actionStatus:C},I=Gh(M.map(ae=>ae.route.path)),F=M.map((ae,q)=>{let{route:J}=ae,he=null;if(x!=null&&q>x?he=!1:J.lazy?he=!0:Qh(J)?p?he=Nh(J,T.loaderData,T.errors):jS(T.loaderData,T.matches[q],ae)&&(he=!0):he=!1,he!==null)return jh(c,g,s,I,ae,d,n,he);let k=B?!1:m||R.pathname+R.search===L.pathname+L.search||R.search!==L.search||zS(T.matches[q],ae),U={...z,defaultShouldRevalidate:k},O=Wo(ae,U);return jh(c,g,s,I,ae,d,n,O,U)}),Q=[];return A.forEach((ae,q)=>{if(p||!M.some(te=>te.route.id===ae.routeId)||S.has(q))return;let J=T.fetchers.get(q),he=J&&J.state!=="idle"&&J.data===void 0,k=cs(l,ae.path,h);if(!k){if(u&&he)return;Q.push({key:q,routeId:ae.routeId,path:ae.path,matches:null,match:null,request:null,controller:null});return}if(b.has(q))return;let U=zo(k,ae.path),O=new AbortController,j=Yn(w,ae.path,O.signal),X=null;if(y.has(q))y.delete(q),X=Qn(c,g,j,k,U,d,n);else if(he)m&&(X=Qn(c,g,j,k,U,d,n));else{let te={...z,defaultShouldRevalidate:B?!1:m};Wo(U,te)&&(X=Qn(c,g,j,k,U,d,n,te))}X&&Q.push({key:q,routeId:ae.routeId,path:ae.path,matches:X,match:U,request:j,controller:O})}),{dsMatches:F,revalidatingFetchers:Q}}function Qh(s){return s.loader!=null||s.middleware!=null&&s.middleware.length>0}function Nh(s,n,c){if(s.lazy)return!0;if(!Qh(s))return!1;let g=n!=null&&s.id in n,w=c!=null&&c[s.id]!==void 0;return!g&&w?!1:typeof s.loader=="function"&&s.loader.hydrate===!0?!0:!g&&!w}function jS(s,n,c){let g=!n||c.route.id!==n.route.id,w=!s.hasOwnProperty(c.route.id);return g||w}function zS(s,n){let c=s.route.path;return s.pathname!==n.pathname||c!=null&&c.endsWith("*")&&s.params["*"]!==n.params["*"]}function Wo(s,n){if(s.route.shouldRevalidate){let c=s.route.shouldRevalidate(n);if(typeof c=="boolean")return c}return n.defaultShouldRevalidate}function bm(s,n,c,g,w,T){let M;if(s){let d=g[s];Ie(d,`No route found to patch children into: routeId = ${s}`),d.children||(d.children=[]),M=d.children}else M=c;let o=[],_=[];if(n.forEach(d=>{let p=M.find(m=>wg(d,m));p?_.push({existingRoute:p,newRoute:d}):o.push(d)}),o.length>0){let d=al(o,w,[s||"_","patch",String((M==null?void 0:M.length)||"0")],g);M.push(...d)}if(T&&_.length>0)for(let d=0;d<_.length;d++){let{existingRoute:p,newRoute:m}=_[d],y=p,[S]=al([m],w,[],{},!0);Object.assign(y,{element:S.element?S.element:y.element,errorElement:S.errorElement?S.errorElement:y.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:y.hydrateFallbackElement})}}function wg(s,n){return"id"in s&&"id"in n&&s.id===n.id?!0:s.index===n.index&&s.path===n.path&&s.caseSensitive===n.caseSensitive?(!s.children||s.children.length===0)&&(!n.children||n.children.length===0)?!0:s.children.every((c,g)=>{var w;return(w=n.children)==null?void 0:w.some(T=>wg(c,T))}):!1}var Cm=new WeakMap,xg=({key:s,route:n,manifest:c,mapRouteProperties:g})=>{let w=c[n.id];if(Ie(w,"No route found in manifest"),!w.lazy||typeof w.lazy!="object")return;let T=w.lazy[s];if(!T)return;let M=Cm.get(w);M||(M={},Cm.set(w,M));let o=M[s];if(o)return o;let _=(async()=>{let d=J0(s),m=w[s]!==void 0&&s!=="hasErrorBoundary";if(d)Dt(!d,"Route property "+s+" is not a supported lazy route property. This property will be ignored."),M[s]=Promise.resolve();else if(m)Dt(!1,`Route "${w.id}" has a static property "${s}" defined. The lazy property will be ignored.`);else{let y=await T();y!=null&&(Object.assign(w,{[s]:y}),Object.assign(w,g(w)))}typeof w.lazy=="object"&&(w.lazy[s]=void 0,Object.values(w.lazy).every(y=>y===void 0)&&(w.lazy=void 0))})();return M[s]=_,_},Em=new WeakMap;function US(s,n,c,g,w){let T=c[s.id];if(Ie(T,"No route found in manifest"),!s.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof s.lazy=="function"){let p=Em.get(T);if(p)return{lazyRoutePromise:p,lazyHandlerPromise:p};let m=(async()=>{Ie(typeof s.lazy=="function","No lazy route function found");let y=await s.lazy(),S={};for(let A in y){let b=y[A];if(b===void 0)continue;let l=tS(A),u=T[A]!==void 0&&A!=="hasErrorBoundary";l?Dt(!l,"Route property "+A+" is not a supported property to be returned from a lazy route function. This property will be ignored."):u?Dt(!u,`Route "${T.id}" has a static property "${A}" defined but its lazy function is also returning a value for this property. The lazy route property "${A}" will be ignored.`):S[A]=b}Object.assign(T,S),Object.assign(T,{...g(T),lazy:void 0})})();return Em.set(T,m),m.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:m}}let M=Object.keys(s.lazy),o=[],_;for(let p of M){if(w&&w.includes(p))continue;let m=xg({key:p,route:s,manifest:c,mapRouteProperties:g});m&&(o.push(m),p===n&&(_=m))}let d=o.length>0?Promise.all(o).then(()=>{}):void 0;return d==null||d.catch(()=>{}),_==null||_.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:_}}async function wm(s){let n=s.matches.filter(w=>w.shouldLoad),c={};return(await Promise.all(n.map(w=>w.resolve()))).forEach((w,T)=>{c[n[T].route.id]=w}),c}async function PS(s){return s.matches.some(n=>n.route.middleware)?Rg(s,()=>wm(s)):wm(s)}function Rg(s,n){return FS(s,n,g=>g,VS,c);function c(g,w,T){if(T)return Promise.resolve(Object.assign(T.value,{[w]:{type:"error",result:g}}));{let{matches:M}=s,o=Math.min(Math.max(M.findIndex(d=>d.route.id===w),0),Math.max(M.findIndex(d=>d.unstable_shouldCallHandler()),0)),_=us(M,M[o].route.id).route.id;return Promise.resolve({[_]:{type:"error",result:g}})}}}async function FS(s,n,c,g,w){let{matches:T,request:M,params:o,context:_,unstable_pattern:d}=s,p=T.flatMap(y=>y.route.middleware?y.route.middleware.map(S=>[y.route.id,S]):[]);return await Dg({request:M,params:o,context:_,unstable_pattern:d},p,n,c,g,w)}async function Dg(s,n,c,g,w,T,M=0){let{request:o}=s;if(o.signal.aborted)throw o.signal.reason??new Error(`Request aborted: ${o.method} ${o.url}`);let _=n[M];if(!_)return await c();let[d,p]=_,m,y=async()=>{if(m)throw new Error("You may only call `next()` once per middleware");try{return m={value:await Dg(s,n,c,g,w,T,M+1)},m.value}catch(S){return m={value:await T(S,d,m)},m.value}};try{let S=await p(s,y),A=S!=null?g(S):void 0;return w(A)?A:m?A??m.value:(m={value:await y()},m.value)}catch(S){return await T(S,d,m)}}function Ag(s,n,c,g,w){let T=xg({key:"middleware",route:g.route,manifest:n,mapRouteProperties:s}),M=US(g.route,ei(c.method)?"action":"loader",n,s,w);return{middleware:T,route:M.lazyRoutePromise,handler:M.lazyHandlerPromise}}function jh(s,n,c,g,w,T,M,o,_=null){let d=!1,p=Ag(s,n,c,w,T);return{...w,_lazyPromises:p,shouldLoad:o,unstable_shouldRevalidateArgs:_,unstable_shouldCallHandler(m){return d=!0,_?typeof m=="boolean"?Wo(w,{..._,defaultShouldRevalidate:m}):Wo(w,_):o},resolve(m){let{lazy:y,loader:S,middleware:A}=w.route,b=d||o||m&&!ei(c.method)&&(y||S),l=A&&A.length>0&&!S&&!y;return b&&(ei(c.method)||!l)?qS({request:c,unstable_pattern:g,match:w,lazyHandlerPromise:p==null?void 0:p.handler,lazyRoutePromise:p==null?void 0:p.route,handlerOverride:m,scopedContext:M}):Promise.resolve({type:"data",result:void 0})}}}function Qn(s,n,c,g,w,T,M,o=null){return g.map(_=>_.route.id!==w.route.id?{..._,shouldLoad:!1,unstable_shouldRevalidateArgs:o,unstable_shouldCallHandler:()=>!1,_lazyPromises:Ag(s,n,c,_,T),resolve:()=>Promise.resolve({type:"data",result:void 0})}:jh(s,n,c,Gh(g.map(d=>d.route.path)),_,T,M,!0,o))}async function IS(s,n,c,g,w,T){c.some(d=>{var p;return(p=d._lazyPromises)==null?void 0:p.middleware})&&await Promise.all(c.map(d=>{var p;return(p=d._lazyPromises)==null?void 0:p.middleware}));let M={request:n,unstable_pattern:Gh(c.map(d=>d.route.path)),params:c[0].params,context:w,matches:c},_=await s({...M,fetcherKey:g,runClientMiddleware:d=>{let p=M;return Rg(p,()=>d({...p,fetcherKey:g,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(c.flatMap(d=>{var p,m;return[(p=d._lazyPromises)==null?void 0:p.handler,(m=d._lazyPromises)==null?void 0:m.route]}))}catch{}return _}async function qS({request:s,unstable_pattern:n,match:c,lazyHandlerPromise:g,lazyRoutePromise:w,handlerOverride:T,scopedContext:M}){let o,_,d=ei(s.method),p=d?"action":"loader",m=y=>{let S,A=new Promise((h,u)=>S=u);_=()=>S(),s.signal.addEventListener("abort",_);let b=h=>typeof y!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${p}" [routeId: ${c.route.id}]`)):y({request:s,unstable_pattern:n,params:c.params,context:M},...h!==void 0?[h]:[]),l=(async()=>{try{return{type:"data",result:await(T?T(u=>b(u)):b())}}catch(h){return{type:"error",result:h}}})();return Promise.race([l,A])};try{let y=d?c.route.action:c.route.loader;if(g||w)if(y){let S,[A]=await Promise.all([m(y).catch(b=>{S=b}),g,w]);if(S!==void 0)throw S;o=A}else{await g;let S=d?c.route.action:c.route.loader;if(S)[o]=await Promise.all([m(S),w]);else if(p==="action"){let A=new URL(s.url),b=A.pathname+A.search;throw ki(405,{method:s.method,pathname:b,routeId:c.route.id})}else return{type:"data",result:void 0}}else if(y)o=await m(y);else{let S=new URL(s.url),A=S.pathname+S.search;throw ki(404,{pathname:A})}}catch(y){return{type:"error",result:y}}finally{_&&s.signal.removeEventListener("abort",_)}return o}async function KS(s){let n=s.headers.get("Content-Type");return n&&/\bapplication\/json\b/.test(n)?s.body==null?null:s.json():s.text()}async function WS(s){var g,w,T,M,o,_;let{result:n,type:c}=s;if(Mg(n)){let d;try{d=await KS(n)}catch(p){return{type:"error",error:p}}return c==="error"?{type:"error",error:new Ko(n.status,n.statusText,d),statusCode:n.status,headers:n.headers}:{type:"data",data:d,statusCode:n.status,headers:n.headers}}return c==="error"?Mm(n)?n.data instanceof Error?{type:"error",error:n.data,statusCode:(g=n.init)==null?void 0:g.status,headers:(w=n.init)!=null&&w.headers?new Headers(n.init.headers):void 0}:{type:"error",error:new Ko(((T=n.init)==null?void 0:T.status)||500,void 0,n.data),statusCode:ll(n)?n.status:void 0,headers:(M=n.init)!=null&&M.headers?new Headers(n.init.headers):void 0}:{type:"error",error:n,statusCode:ll(n)?n.status:void 0}:Mm(n)?{type:"data",data:n.data,statusCode:(o=n.init)==null?void 0:o.status,headers:(_=n.init)!=null&&_.headers?new Headers(n.init.headers):void 0}:{type:"data",data:n}}function YS(s,n,c,g,w){let T=s.headers.get("Location");if(Ie(T,"Redirects returned/thrown from loaders/actions must have a Location header"),!Qo(T)){let M=g.slice(0,g.findIndex(o=>o.route.id===c)+1);T=Hh(new URL(n.url),M,w,T),s.headers.set("Location",T)}return s}function xm(s,n,c){if(Qo(s)){let g=s,w=g.startsWith("//")?new URL(n.protocol+g):new URL(g),T=Ui(w.pathname,c)!=null;if(w.origin===n.origin&&T)return w.pathname+w.search+w.hash}return s}function Yn(s,n,c,g){let w=s.createURL(Tg(n)).toString(),T={signal:c};if(g&&ei(g.formMethod)){let{formMethod:M,formEncType:o}=g;T.method=M.toUpperCase(),o==="application/json"?(T.headers=new Headers({"Content-Type":o}),T.body=JSON.stringify(g.json)):o==="text/plain"?T.body=g.text:o==="application/x-www-form-urlencoded"&&g.formData?T.body=zh(g.formData):T.body=g.formData}return new Request(w,T)}function zh(s){let n=new URLSearchParams;for(let[c,g]of s.entries())n.append(c,typeof g=="string"?g:g.name);return n}function Rm(s){let n=new FormData;for(let[c,g]of s.entries())n.append(c,g);return n}function GS(s,n,c,g=!1,w=!1){let T={},M=null,o,_=!1,d={},p=c&&Si(c[1])?c[1].error:void 0;return s.forEach(m=>{if(!(m.route.id in n))return;let y=m.route.id,S=n[y];if(Ie(!qs(S),"Cannot handle redirect results in processLoaderData"),Si(S)){let A=S.error;if(p!==void 0&&(A=p,p=void 0),M=M||{},w)M[y]=A;else{let b=us(s,y);M[b.route.id]==null&&(M[b.route.id]=A)}g||(T[y]=Eg),_||(_=!0,o=ll(S.error)?S.error.status:500),S.headers&&(d[y]=S.headers)}else T[y]=S.data,S.statusCode&&S.statusCode!==200&&!_&&(o=S.statusCode),S.headers&&(d[y]=S.headers)}),p!==void 0&&c&&(M={[c[0]]:p},c[2]&&(T[c[2]]=void 0)),{loaderData:T,errors:M,statusCode:o||200,loaderHeaders:d}}function Dm(s,n,c,g,w,T){let{loaderData:M,errors:o}=GS(n,c,g);return w.filter(_=>!_.matches||_.matches.some(d=>d.shouldLoad)).forEach(_=>{let{key:d,match:p,controller:m}=_;if(m&&m.signal.aborted)return;let y=T[d];if(Ie(y,"Did not find corresponding fetcher result"),Si(y)){let S=us(s.matches,p==null?void 0:p.route.id);o&&o[S.route.id]||(o={...o,[S.route.id]:y.error}),s.fetchers.delete(d)}else if(qs(y))Ie(!1,"Unhandled fetcher revalidation redirect");else{let S=Ar(y.data);s.fetchers.set(d,S)}}),{loaderData:M,errors:o}}function Am(s,n,c,g){let w=Object.entries(n).filter(([,T])=>T!==Eg).reduce((T,[M,o])=>(T[M]=o,T),{});for(let T of c){let M=T.route.id;if(!n.hasOwnProperty(M)&&s.hasOwnProperty(M)&&T.route.loader&&(w[M]=s[M]),g&&g.hasOwnProperty(M))break}return w}function Tm(s){return s?Si(s[1])?{actionData:{}}:{actionData:{[s[0]]:s[1].data}}:{}}function us(s,n){return(n?s.slice(0,s.findIndex(g=>g.route.id===n)+1):[...s]).reverse().find(g=>g.route.hasErrorBoundary===!0)||s[0]}function Bo(s){let n=s.length===1?s[0]:s.find(c=>c.index||!c.path||c.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:n}],route:n}}function ki(s,{pathname:n,routeId:c,method:g,type:w,message:T}={}){let M="Unknown Server Error",o="Unknown @remix-run/router error";return s===400?(M="Bad Request",g&&n&&c?o=`You made a ${g} request to "${n}" but did not provide a \`loader\` for route "${c}", so there is no way to handle the request.`:w==="invalid-body"&&(o="Unable to encode submission body")):s===403?(M="Forbidden",o=`Route "${c}" does not match URL "${n}"`):s===404?(M="Not Found",o=`No route matches URL "${n}"`):s===405&&(M="Method Not Allowed",g&&n&&c?o=`You made a ${g.toUpperCase()} request to "${n}" but did not provide an \`action\` for route "${c}", so there is no way to handle the request.`:g&&(o=`Invalid request method "${g.toUpperCase()}"`)),new Ko(s||500,M,new Error(o),!0)}function ko(s){let n=Object.entries(s);for(let c=n.length-1;c>=0;c--){let[g,w]=n[c];if(qs(w))return{key:g,result:w}}}function Tg(s){let n=typeof s=="string"?Cs(s):s;return sr({...n,hash:""})}function QS(s,n){return s.pathname!==n.pathname||s.search!==n.search?!1:s.hash===""?n.hash!=="":s.hash===n.hash?!0:n.hash!==""}function VS(s){return s!=null&&typeof s=="object"&&Object.entries(s).every(([n,c])=>typeof n=="string"&&XS(c))}function XS(s){return s!=null&&typeof s=="object"&&"type"in s&&"result"in s&&(s.type==="data"||s.type==="error")}function $S(s){return Mg(s.result)&&LS.has(s.result.status)}function Si(s){return s.type==="error"}function qs(s){return(s&&s.type)==="redirect"}function Mm(s){return typeof s=="object"&&s!=null&&"type"in s&&"data"in s&&"init"in s&&s.type==="DataWithResponseInit"}function Mg(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.headers=="object"&&typeof s.body<"u"}function ZS(s){return MS.has(s.toUpperCase())}function ei(s){return AS.has(s.toUpperCase())}function Vh(s){return new URLSearchParams(s).getAll("index").some(n=>n==="")}function zo(s,n){let c=typeof n=="string"?Cs(n).search:n.search;if(s[s.length-1].route.index&&Vh(c||""))return s[s.length-1];let g=yg(s);return g[g.length-1]}function Lm(s){let{formMethod:n,formAction:c,formEncType:g,text:w,formData:T,json:M}=s;if(!(!n||!c||!g)){if(w!=null)return{formMethod:n,formAction:c,formEncType:g,formData:void 0,json:void 0,text:w};if(T!=null)return{formMethod:n,formAction:c,formEncType:g,formData:T,json:void 0,text:void 0};if(M!==void 0)return{formMethod:n,formAction:c,formEncType:g,formData:void 0,json:M,text:void 0}}}function mh(s,n){return n?{state:"loading",location:s,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}:{state:"loading",location:s,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function JS(s,n){return{state:"submitting",location:s,formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text}}function Za(s,n){return s?{state:"loading",formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text,data:n}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function eb(s,n){return{state:"submitting",formMethod:s.formMethod,formAction:s.formAction,formEncType:s.formEncType,formData:s.formData,json:s.json,text:s.text,data:n?n.data:void 0}}function Ar(s){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:s}}function tb(s,n){try{let c=s.sessionStorage.getItem(Cg);if(c){let g=JSON.parse(c);for(let[w,T]of Object.entries(g||{}))T&&Array.isArray(T)&&n.set(w,new Set(T||[]))}}catch{}}function ib(s,n){if(n.size>0){let c={};for(let[g,w]of n)c[g]=[...w];try{s.sessionStorage.setItem(Cg,JSON.stringify(c))}catch(g){Dt(!1,`Failed to save applied view transitions in sessionStorage (${g}).`)}}}function rb(){let s,n,c=new Promise((g,w)=>{s=async T=>{g(T);try{await c}catch{}},n=async T=>{w(T);try{await c}catch{}}});return{promise:c,resolve:s,reject:n}}var rn=$.createContext(null);rn.displayName="DataRouter";var _l=$.createContext(null);_l.displayName="DataRouterState";$.createContext(!1);var Xh=$.createContext({isTransitioning:!1});Xh.displayName="ViewTransition";var Lg=$.createContext(new Map);Lg.displayName="Fetchers";var sb=$.createContext(null);sb.displayName="Await";var nr=$.createContext(null);nr.displayName="Navigation";var Vo=$.createContext(null);Vo.displayName="Location";var ar=$.createContext({outlet:null,matches:[],isDataRoute:!1});ar.displayName="Route";var $h=$.createContext(null);$h.displayName="RouteError";function nb(s,{relative:n}={}){Ie(vl(),"useHref() may be used only in the context of a <Router> component.");let{basename:c,navigator:g}=$.useContext(nr),{hash:w,pathname:T,search:M}=ml(s,{relative:n}),o=T;return c!=="/"&&(o=T==="/"?c:rr([c,T])),g.createHref({pathname:o,search:M,hash:w})}function vl(){return $.useContext(Vo)!=null}function sn(){return Ie(vl(),"useLocation() may be used only in the context of a <Router> component."),$.useContext(Vo).location}var Og="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Bg(s){$.useContext(nr).static||$.useLayoutEffect(s)}function ab(){let{isDataRoute:s}=$.useContext(ar);return s?Sb():lb()}function lb(){Ie(vl(),"useNavigate() may be used only in the context of a <Router> component.");let s=$.useContext(rn),{basename:n,navigator:c}=$.useContext(nr),{matches:g}=$.useContext(ar),{pathname:w}=sn(),T=JSON.stringify(Wh(g)),M=$.useRef(!1);return Bg(()=>{M.current=!0}),$.useCallback((_,d={})=>{if(Dt(M.current,Og),!M.current)return;if(typeof _=="number"){c.go(_);return}let p=Yh(_,JSON.parse(T),w,d.relative==="path");s==null&&n!=="/"&&(p.pathname=p.pathname==="/"?n:rr([n,p.pathname])),(d.replace?c.replace:c.push)(p,d.state,d)},[n,c,T,w,s])}$.createContext(null);function ob(){let{matches:s}=$.useContext(ar),n=s[s.length-1];return n?n.params:{}}function ml(s,{relative:n}={}){let{matches:c}=$.useContext(ar),{pathname:g}=sn(),w=JSON.stringify(Wh(c));return $.useMemo(()=>Yh(s,JSON.parse(w),g,n==="path"),[s,w,g,n])}function cb(s,n,c,g,w){Ie(vl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:T}=$.useContext(nr),{matches:M}=$.useContext(ar),o=M[M.length-1],_=o?o.params:{},d=o?o.pathname:"/",p=o?o.pathnameBase:"/",m=o&&o.route;{let u=m&&m.path||"";kg(d,!m||u.endsWith("*")||u.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${u}">) 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.
60
+
61
+ Please change the parent <Route path="${u}"> to <Route path="${u==="/"?"*":`${u}/*`}">.`)}let y=sn(),S;S=y;let A=S.pathname||"/",b=A;if(p!=="/"){let u=p.replace(/^\//,"").split("/");b="/"+A.replace(/^\//,"").split("/").slice(u.length).join("/")}let l=cs(s,{pathname:b});return Dt(m||l!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),Dt(l==null||l[l.length-1].route.element!==void 0||l[l.length-1].route.Component!==void 0||l[l.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.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.`),_b(l&&l.map(u=>Object.assign({},u,{params:Object.assign({},_,u.params),pathname:rr([p,T.encodeLocation?T.encodeLocation(u.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:u.pathname]),pathnameBase:u.pathnameBase==="/"?p:rr([p,T.encodeLocation?T.encodeLocation(u.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:u.pathnameBase])})),M,c,g,w)}function ub(){let s=yb(),n=ll(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),c=s instanceof Error?s.stack:null,g="rgba(200,200,200, 0.5)",w={padding:"0.5rem",backgroundColor:g},T={padding:"2px 4px",backgroundColor:g},M=null;return console.error("Error handled by React Router default ErrorBoundary:",s),M=$.createElement($.Fragment,null,$.createElement("p",null,"💿 Hey developer 👋"),$.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",$.createElement("code",{style:T},"ErrorBoundary")," or"," ",$.createElement("code",{style:T},"errorElement")," prop on your route.")),$.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},n),c?$.createElement("pre",{style:w},c):null,M)}var hb=$.createElement(ub,null),fb=class extends $.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,n){return n.location!==s.location||n.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:n.error,location:n.location,revalidation:s.revalidation||n.revalidation}}componentDidCatch(s,n){this.props.onError?this.props.onError(s,n):console.error("React Router caught the following error during render",s)}render(){return this.state.error!==void 0?$.createElement(ar.Provider,{value:this.props.routeContext},$.createElement($h.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function db({routeContext:s,match:n,children:c}){let g=$.useContext(rn);return g&&g.static&&g.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(g.staticContext._deepestRenderedBoundaryId=n.route.id),$.createElement(ar.Provider,{value:s},c)}function _b(s,n=[],c=null,g=null,w=null){if(s==null){if(!c)return null;if(c.errors)s=c.matches;else if(n.length===0&&!c.initialized&&c.matches.length>0)s=c.matches;else return null}let T=s,M=c==null?void 0:c.errors;if(M!=null){let p=T.findIndex(m=>m.route.id&&(M==null?void 0:M[m.route.id])!==void 0);Ie(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(M).join(",")}`),T=T.slice(0,Math.min(T.length,p+1))}let o=!1,_=-1;if(c)for(let p=0;p<T.length;p++){let m=T[p];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(_=p),m.route.id){let{loaderData:y,errors:S}=c,A=m.route.loader&&!y.hasOwnProperty(m.route.id)&&(!S||S[m.route.id]===void 0);if(m.route.lazy||A){o=!0,_>=0?T=T.slice(0,_+1):T=[T[0]];break}}}let d=c&&g?(p,m)=>{var y,S;g(p,{location:c.location,params:((S=(y=c.matches)==null?void 0:y[0])==null?void 0:S.params)??{},errorInfo:m})}:void 0;return T.reduceRight((p,m,y)=>{let S,A=!1,b=null,l=null;c&&(S=M&&m.route.id?M[m.route.id]:void 0,b=m.route.errorElement||hb,o&&(_<0&&y===0?(kg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),A=!0,l=null):_===y&&(A=!0,l=m.route.hydrateFallbackElement||null)));let h=n.concat(T.slice(0,y+1)),u=()=>{let f;return S?f=b:A?f=l:m.route.Component?f=$.createElement(m.route.Component,null):m.route.element?f=m.route.element:f=p,$.createElement(db,{match:m,routeContext:{outlet:p,matches:h,isDataRoute:c!=null},children:f})};return c&&(m.route.ErrorBoundary||m.route.errorElement||y===0)?$.createElement(fb,{location:c.location,revalidation:c.revalidation,component:b,error:S,children:u(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:d}):u()},null)}function Zh(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function vb(s){let n=$.useContext(rn);return Ie(n,Zh(s)),n}function mb(s){let n=$.useContext(_l);return Ie(n,Zh(s)),n}function gb(s){let n=$.useContext(ar);return Ie(n,Zh(s)),n}function Jh(s){let n=gb(s),c=n.matches[n.matches.length-1];return Ie(c.route.id,`${s} can only be used on routes that contain a unique "id"`),c.route.id}function pb(){return Jh("useRouteId")}function yb(){var g;let s=$.useContext($h),n=mb("useRouteError"),c=Jh("useRouteError");return s!==void 0?s:(g=n.errors)==null?void 0:g[c]}function Sb(){let{router:s}=vb("useNavigate"),n=Jh("useNavigate"),c=$.useRef(!1);return Bg(()=>{c.current=!0}),$.useCallback(async(w,T={})=>{Dt(c.current,Og),c.current&&(typeof w=="number"?s.navigate(w):await s.navigate(w,{fromRouteId:n,...T}))},[s,n])}var Om={};function kg(s,n,c){!n&&!Om[s]&&(Om[s]=!0,Dt(!1,c))}var Bm={};function km(s,n){!s&&!Bm[n]&&(Bm[n]=!0,console.warn(n))}function bb(s){let n={hasErrorBoundary:s.hasErrorBoundary||s.ErrorBoundary!=null||s.errorElement!=null};return s.Component&&(s.element&&Dt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(n,{element:$.createElement(s.Component),Component:void 0})),s.HydrateFallback&&(s.hydrateFallbackElement&&Dt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(n,{hydrateFallbackElement:$.createElement(s.HydrateFallback),HydrateFallback:void 0})),s.ErrorBoundary&&(s.errorElement&&Dt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(n,{errorElement:$.createElement(s.ErrorBoundary),ErrorBoundary:void 0})),n}var Cb=["HydrateFallback","hydrateFallbackElement"],Eb=class{constructor(){this.status="pending",this.promise=new Promise((s,n)=>{this.resolve=c=>{this.status==="pending"&&(this.status="resolved",s(c))},this.reject=c=>{this.status==="pending"&&(this.status="rejected",n(c))}})}};function wb({router:s,flushSync:n,unstable_onError:c}){let[g,w]=$.useState(s.state),[T,M]=$.useState(),[o,_]=$.useState({isTransitioning:!1}),[d,p]=$.useState(),[m,y]=$.useState(),[S,A]=$.useState(),b=$.useRef(new Map),l=$.useCallback(R=>{w(L=>(R.errors&&c&&Object.entries(R.errors).forEach(([x,C])=>{var B,z;((B=L.errors)==null?void 0:B[x])!==C&&c(C,{location:R.location,params:((z=R.matches[0])==null?void 0:z.params)??{}})}),R))},[c]),h=$.useCallback((R,{deletedFetchers:L,flushSync:x,viewTransitionOpts:C})=>{R.fetchers.forEach((z,I)=>{z.data!==void 0&&b.current.set(I,z.data)}),L.forEach(z=>b.current.delete(z)),km(x===!1||n!=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 B=s.window!=null&&s.window.document!=null&&typeof s.window.document.startViewTransition=="function";if(km(C==null||B,"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."),!C||!B){n&&x?n(()=>l(R)):$.startTransition(()=>l(R));return}if(n&&x){n(()=>{m&&(d&&d.resolve(),m.skipTransition()),_({isTransitioning:!0,flushSync:!0,currentLocation:C.currentLocation,nextLocation:C.nextLocation})});let z=s.window.document.startViewTransition(()=>{n(()=>l(R))});z.finished.finally(()=>{n(()=>{p(void 0),y(void 0),M(void 0),_({isTransitioning:!1})})}),n(()=>y(z));return}m?(d&&d.resolve(),m.skipTransition(),A({state:R,currentLocation:C.currentLocation,nextLocation:C.nextLocation})):(M(R),_({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}))},[s.window,n,m,d,l]);$.useLayoutEffect(()=>s.subscribe(h),[s,h]),$.useEffect(()=>{o.isTransitioning&&!o.flushSync&&p(new Eb)},[o]),$.useEffect(()=>{if(d&&T&&s.window){let R=T,L=d.promise,x=s.window.document.startViewTransition(async()=>{$.startTransition(()=>l(R)),await L});x.finished.finally(()=>{p(void 0),y(void 0),M(void 0),_({isTransitioning:!1})}),y(x)}},[T,d,s.window,l]),$.useEffect(()=>{d&&T&&g.location.key===T.location.key&&d.resolve()},[d,m,g.location,T]),$.useEffect(()=>{!o.isTransitioning&&S&&(M(S.state),_({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),A(void 0))},[o.isTransitioning,S]);let u=$.useMemo(()=>({createHref:s.createHref,encodeLocation:s.encodeLocation,go:R=>s.navigate(R),push:(R,L,x)=>s.navigate(R,{state:L,preventScrollReset:x==null?void 0:x.preventScrollReset}),replace:(R,L,x)=>s.navigate(R,{replace:!0,state:L,preventScrollReset:x==null?void 0:x.preventScrollReset})}),[s]),f=s.basename||"/",E=$.useMemo(()=>({router:s,navigator:u,static:!1,basename:f,unstable_onError:c}),[s,u,f,c]);return $.createElement($.Fragment,null,$.createElement(rn.Provider,{value:E},$.createElement(_l.Provider,{value:g},$.createElement(Lg.Provider,{value:b.current},$.createElement(Xh.Provider,{value:o},$.createElement(Db,{basename:f,location:g.location,navigationType:g.historyAction,navigator:u},$.createElement(xb,{routes:s.routes,future:s.future,state:g,unstable_onError:c})))))),null)}var xb=$.memo(Rb);function Rb({routes:s,future:n,state:c,unstable_onError:g}){return cb(s,void 0,c,g,n)}function Db({basename:s="/",children:n=null,location:c,navigationType:g="POP",navigator:w,static:T=!1}){Ie(!vl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let M=s.replace(/^\/*/,"/"),o=$.useMemo(()=>({basename:M,navigator:w,static:T,future:{}}),[M,w,T]);typeof c=="string"&&(c=Cs(c));let{pathname:_="/",search:d="",hash:p="",state:m=null,key:y="default"}=c,S=$.useMemo(()=>{let A=Ui(_,M);return A==null?null:{location:{pathname:A,search:d,hash:p,state:m,key:y},navigationType:g}},[M,_,d,p,m,y,g]);return Dt(S!=null,`<Router basename="${M}"> is not able to match the URL "${_}${d}${p}" because it does not start with the basename, so the <Router> won't render anything.`),S==null?null:$.createElement(nr.Provider,{value:o},$.createElement(Vo.Provider,{children:n,value:S}))}var Uo="get",Po="application/x-www-form-urlencoded";function Xo(s){return s!=null&&typeof s.tagName=="string"}function Ab(s){return Xo(s)&&s.tagName.toLowerCase()==="button"}function Tb(s){return Xo(s)&&s.tagName.toLowerCase()==="form"}function Mb(s){return Xo(s)&&s.tagName.toLowerCase()==="input"}function Lb(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function Ob(s,n){return s.button===0&&(!n||n==="_self")&&!Lb(s)}var Ho=null;function Bb(){if(Ho===null)try{new FormData(document.createElement("form"),0),Ho=!1}catch{Ho=!0}return Ho}var kb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gh(s){return s!=null&&!kb.has(s)?(Dt(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Po}"`),null):s}function Hb(s,n){let c,g,w,T,M;if(Tb(s)){let o=s.getAttribute("action");g=o?Ui(o,n):null,c=s.getAttribute("method")||Uo,w=gh(s.getAttribute("enctype"))||Po,T=new FormData(s)}else if(Ab(s)||Mb(s)&&(s.type==="submit"||s.type==="image")){let o=s.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let _=s.getAttribute("formaction")||o.getAttribute("action");if(g=_?Ui(_,n):null,c=s.getAttribute("formmethod")||o.getAttribute("method")||Uo,w=gh(s.getAttribute("formenctype"))||gh(o.getAttribute("enctype"))||Po,T=new FormData(o,s),!Bb()){let{name:d,type:p,value:m}=s;if(p==="image"){let y=d?`${d}.`:"";T.append(`${y}x`,"0"),T.append(`${y}y`,"0")}else d&&T.append(d,m)}}else{if(Xo(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');c=Uo,g=null,w=Po,M=s}return T&&w==="text/plain"&&(M=T,T=void 0),{action:g,method:c.toLowerCase(),encType:w,formData:T,body:M}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ef(s,n){if(s===!1||s===null||typeof s>"u")throw new Error(n)}function Nb(s,n,c){let g=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return g.pathname==="/"?g.pathname=`_root.${c}`:n&&Ui(g.pathname,n)==="/"?g.pathname=`${n.replace(/\/$/,"")}/_root.${c}`:g.pathname=`${g.pathname.replace(/\/$/,"")}.${c}`,g}async function jb(s,n){if(s.id in n)return n[s.id];try{let c=await import(s.module);return n[s.id]=c,c}catch(c){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(c),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function zb(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function Ub(s,n,c){let g=await Promise.all(s.map(async w=>{let T=n.routes[w.route.id];if(T){let M=await jb(T,c);return M.links?M.links():[]}return[]}));return qb(g.flat(1).filter(zb).filter(w=>w.rel==="stylesheet"||w.rel==="preload").map(w=>w.rel==="stylesheet"?{...w,rel:"prefetch",as:"style"}:{...w,rel:"prefetch"}))}function Hm(s,n,c,g,w,T){let M=(_,d)=>c[d]?_.route.id!==c[d].route.id:!0,o=(_,d)=>{var p;return c[d].pathname!==_.pathname||((p=c[d].route.path)==null?void 0:p.endsWith("*"))&&c[d].params["*"]!==_.params["*"]};return T==="assets"?n.filter((_,d)=>M(_,d)||o(_,d)):T==="data"?n.filter((_,d)=>{var m;let p=g.routes[_.route.id];if(!p||!p.hasLoader)return!1;if(M(_,d)||o(_,d))return!0;if(_.route.shouldRevalidate){let y=_.route.shouldRevalidate({currentUrl:new URL(w.pathname+w.search+w.hash,window.origin),currentParams:((m=c[0])==null?void 0:m.params)||{},nextUrl:new URL(s,window.origin),nextParams:_.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function Pb(s,n,{includeHydrateFallback:c}={}){return Fb(s.map(g=>{let w=n.routes[g.route.id];if(!w)return[];let T=[w.module];return w.clientActionModule&&(T=T.concat(w.clientActionModule)),w.clientLoaderModule&&(T=T.concat(w.clientLoaderModule)),c&&w.hydrateFallbackModule&&(T=T.concat(w.hydrateFallbackModule)),w.imports&&(T=T.concat(w.imports)),T}).flat(1))}function Fb(s){return[...new Set(s)]}function Ib(s){let n={},c=Object.keys(s).sort();for(let g of c)n[g]=s[g];return n}function qb(s,n){let c=new Set;return new Set(n),s.reduce((g,w)=>{let T=JSON.stringify(Ib(w));return c.has(T)||(c.add(T),g.push({key:T,link:w})),g},[])}function Hg(){let s=$.useContext(rn);return ef(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function Kb(){let s=$.useContext(_l);return ef(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var tf=$.createContext(void 0);tf.displayName="FrameworkContext";function Ng(){let s=$.useContext(tf);return ef(s,"You must render this element inside a <HydratedRouter> element"),s}function Wb(s,n){let c=$.useContext(tf),[g,w]=$.useState(!1),[T,M]=$.useState(!1),{onFocus:o,onBlur:_,onMouseEnter:d,onMouseLeave:p,onTouchStart:m}=n,y=$.useRef(null);$.useEffect(()=>{if(s==="render"&&M(!0),s==="viewport"){let b=h=>{h.forEach(u=>{M(u.isIntersecting)})},l=new IntersectionObserver(b,{threshold:.5});return y.current&&l.observe(y.current),()=>{l.disconnect()}}},[s]),$.useEffect(()=>{if(g){let b=setTimeout(()=>{M(!0)},100);return()=>{clearTimeout(b)}}},[g]);let S=()=>{w(!0)},A=()=>{w(!1),M(!1)};return c?s!=="intent"?[T,y,{}]:[T,y,{onFocus:Ja(o,S),onBlur:Ja(_,A),onMouseEnter:Ja(d,S),onMouseLeave:Ja(p,A),onTouchStart:Ja(m,S)}]:[!1,y,{}]}function Ja(s,n){return c=>{s&&s(c),c.defaultPrevented||n(c)}}function Yb({page:s,...n}){let{router:c}=Hg(),g=$.useMemo(()=>cs(c.routes,s,c.basename),[c.routes,s,c.basename]);return g?$.createElement(Qb,{page:s,matches:g,...n}):null}function Gb(s){let{manifest:n,routeModules:c}=Ng(),[g,w]=$.useState([]);return $.useEffect(()=>{let T=!1;return Ub(s,n,c).then(M=>{T||w(M)}),()=>{T=!0}},[s,n,c]),g}function Qb({page:s,matches:n,...c}){let g=sn(),{manifest:w,routeModules:T}=Ng(),{basename:M}=Hg(),{loaderData:o,matches:_}=Kb(),d=$.useMemo(()=>Hm(s,n,_,w,g,"data"),[s,n,_,w,g]),p=$.useMemo(()=>Hm(s,n,_,w,g,"assets"),[s,n,_,w,g]),m=$.useMemo(()=>{if(s===g.pathname+g.search+g.hash)return[];let A=new Set,b=!1;if(n.forEach(h=>{var f;let u=w.routes[h.route.id];!u||!u.hasLoader||(!d.some(E=>E.route.id===h.route.id)&&h.route.id in o&&((f=T[h.route.id])!=null&&f.shouldRevalidate)||u.hasClientLoader?b=!0:A.add(h.route.id))}),A.size===0)return[];let l=Nb(s,M,"data");return b&&A.size>0&&l.searchParams.set("_routes",n.filter(h=>A.has(h.route.id)).map(h=>h.route.id).join(",")),[l.pathname+l.search]},[M,o,g,w,d,n,s,T]),y=$.useMemo(()=>Pb(p,w),[p,w]),S=Gb(p);return $.createElement($.Fragment,null,m.map(A=>$.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...c})),y.map(A=>$.createElement("link",{key:A,rel:"modulepreload",href:A,...c})),S.map(({key:A,link:b})=>$.createElement("link",{key:A,nonce:c.nonce,...b})))}function Vb(...s){return n=>{s.forEach(c=>{typeof c=="function"?c(n):c!=null&&(c.current=n)})}}var jg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{jg&&(window.__reactRouterVersion="7.9.6")}catch{}function Xb(s,n){return HS({basename:n==null?void 0:n.basename,getContext:n==null?void 0:n.getContext,future:n==null?void 0:n.future,history:V0({window:n==null?void 0:n.window}),hydrationData:$b(),routes:s,mapRouteProperties:bb,hydrationRouteProperties:Cb,dataStrategy:n==null?void 0:n.dataStrategy,patchRoutesOnNavigation:n==null?void 0:n.patchRoutesOnNavigation,window:n==null?void 0:n.window,unstable_instrumentations:n==null?void 0:n.unstable_instrumentations}).initialize()}function $b(){let s=window==null?void 0:window.__staticRouterHydrationData;return s&&s.errors&&(s={...s,errors:Zb(s.errors)}),s}function Zb(s){if(!s)return null;let n=Object.entries(s),c={};for(let[g,w]of n)if(w&&w.__type==="RouteErrorResponse")c[g]=new Ko(w.status,w.statusText,w.data,w.internal===!0);else if(w&&w.__type==="Error"){if(w.__subType){let T=window[w.__subType];if(typeof T=="function")try{let M=new T(w.message);M.stack="",c[g]=M}catch{}}if(c[g]==null){let T=new Error(w.message);T.stack="",c[g]=T}}else c[g]=w;return c}var zg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ni=$.forwardRef(function({onClick:n,discover:c="render",prefetch:g="none",relative:w,reloadDocument:T,replace:M,state:o,target:_,to:d,preventScrollReset:p,viewTransition:m,...y},S){let{basename:A}=$.useContext(nr),b=typeof d=="string"&&zg.test(d),l,h=!1;if(typeof d=="string"&&b&&(l=d,jg))try{let B=new URL(window.location.href),z=d.startsWith("//")?new URL(B.protocol+d):new URL(d),I=Ui(z.pathname,A);z.origin===B.origin&&I!=null?d=I+z.search+z.hash:h=!0}catch{Dt(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let u=nb(d,{relative:w}),[f,E,R]=Wb(g,y),L=i1(d,{replace:M,state:o,target:_,preventScrollReset:p,relative:w,viewTransition:m});function x(B){n&&n(B),B.defaultPrevented||L(B)}let C=$.createElement("a",{...y,...R,href:l||u,onClick:h||T?n:x,ref:Vb(S,E),target:_,"data-discover":!b&&c==="render"?"true":void 0});return f&&!b?$.createElement($.Fragment,null,C,$.createElement(Yb,{page:u})):C});Ni.displayName="Link";var Jb=$.forwardRef(function({"aria-current":n="page",caseSensitive:c=!1,className:g="",end:w=!1,style:T,to:M,viewTransition:o,children:_,...d},p){let m=ml(M,{relative:d.relative}),y=sn(),S=$.useContext(_l),{navigator:A,basename:b}=$.useContext(nr),l=S!=null&&l1(m)&&o===!0,h=A.encodeLocation?A.encodeLocation(m).pathname:m.pathname,u=y.pathname,f=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;c||(u=u.toLowerCase(),f=f?f.toLowerCase():null,h=h.toLowerCase()),f&&b&&(f=Ui(f,b)||f);const E=h!=="/"&&h.endsWith("/")?h.length-1:h.length;let R=u===h||!w&&u.startsWith(h)&&u.charAt(E)==="/",L=f!=null&&(f===h||!w&&f.startsWith(h)&&f.charAt(h.length)==="/"),x={isActive:R,isPending:L,isTransitioning:l},C=R?n:void 0,B;typeof g=="function"?B=g(x):B=[g,R?"active":null,L?"pending":null,l?"transitioning":null].filter(Boolean).join(" ");let z=typeof T=="function"?T(x):T;return $.createElement(Ni,{...d,"aria-current":C,className:B,ref:p,style:z,to:M,viewTransition:o},typeof _=="function"?_(x):_)});Jb.displayName="NavLink";var e1=$.forwardRef(({discover:s="render",fetcherKey:n,navigate:c,reloadDocument:g,replace:w,state:T,method:M=Uo,action:o,onSubmit:_,relative:d,preventScrollReset:p,viewTransition:m,...y},S)=>{let A=n1(),b=a1(o,{relative:d}),l=M.toLowerCase()==="get"?"get":"post",h=typeof o=="string"&&zg.test(o),u=f=>{if(_&&_(f),f.defaultPrevented)return;f.preventDefault();let E=f.nativeEvent.submitter,R=(E==null?void 0:E.getAttribute("formmethod"))||M;A(E||f.currentTarget,{fetcherKey:n,method:R,navigate:c,replace:w,state:T,relative:d,preventScrollReset:p,viewTransition:m})};return $.createElement("form",{ref:S,method:l,action:b,onSubmit:g?_:u,...y,"data-discover":!h&&s==="render"?"true":void 0})});e1.displayName="Form";function t1(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ug(s){let n=$.useContext(rn);return Ie(n,t1(s)),n}function i1(s,{target:n,replace:c,state:g,preventScrollReset:w,relative:T,viewTransition:M}={}){let o=ab(),_=sn(),d=ml(s,{relative:T});return $.useCallback(p=>{if(Ob(p,n)){p.preventDefault();let m=c!==void 0?c:sr(_)===sr(d);o(s,{replace:m,state:g,preventScrollReset:w,relative:T,viewTransition:M})}},[_,o,d,c,g,n,s,w,T,M])}var r1=0,s1=()=>`__${String(++r1)}__`;function n1(){let{router:s}=Ug("useSubmit"),{basename:n}=$.useContext(nr),c=pb();return $.useCallback(async(g,w={})=>{let{action:T,method:M,encType:o,formData:_,body:d}=Hb(g,n);if(w.navigate===!1){let p=w.fetcherKey||s1();await s.fetch(p,c,w.action||T,{preventScrollReset:w.preventScrollReset,formData:_,body:d,formMethod:w.method||M,formEncType:w.encType||o,flushSync:w.flushSync})}else await s.navigate(w.action||T,{preventScrollReset:w.preventScrollReset,formData:_,body:d,formMethod:w.method||M,formEncType:w.encType||o,replace:w.replace,state:w.state,fromRouteId:c,flushSync:w.flushSync,viewTransition:w.viewTransition})},[s,n,c])}function a1(s,{relative:n}={}){let{basename:c}=$.useContext(nr),g=$.useContext(ar);Ie(g,"useFormAction must be used inside a RouteContext");let[w]=g.matches.slice(-1),T={...ml(s||".",{relative:n})},M=sn();if(s==null){T.search=M.search;let o=new URLSearchParams(T.search),_=o.getAll("index");if(_.some(p=>p==="")){o.delete("index"),_.filter(m=>m).forEach(m=>o.append("index",m));let p=o.toString();T.search=p?`?${p}`:""}}return(!s||s===".")&&w.route.index&&(T.search=T.search?T.search.replace(/^\?/,"?index&"):"?index"),c!=="/"&&(T.pathname=T.pathname==="/"?c:rr([c,T.pathname])),sr(T)}function l1(s,{relative:n}={}){let c=$.useContext(Xh);Ie(c!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:g}=Ug("useViewTransitionState"),w=ml(s,{relative:n});if(!c.isTransitioning)return!1;let T=Ui(c.currentLocation.pathname,g)||c.currentLocation.pathname,M=Ui(c.nextLocation.pathname,g)||c.nextLocation.pathname;return qo(w.pathname,M)!=null||qo(w.pathname,T)!=null}var o1=ig();function c1(s){return $.createElement(wb,{flushSync:o1.flushSync,...s})}const ji="/api";class Pg extends Error{constructor(n,c,g){super(n),this.statusCode=c,this.details=g,this.name="ApiError"}}async function zi(s,n){const c=await fetch(s,{...n,headers:{"Content-Type":"application/json",...n==null?void 0:n.headers}}),g=await c.json();if(!c.ok||!g.success)throw new Pg(g.error||"API request failed",c.status,g.details);return g.data}const rf={list:async()=>zi(`${ji}/branches`),get:async s=>{const n=encodeURIComponent(s);return zi(`${ji}/branches/${n}`)},sync:async(s,n)=>{const c=encodeURIComponent(s);return zi(`${ji}/branches/${c}/sync`,{method:"POST",body:JSON.stringify(n)})}},u1={list:async()=>zi(`${ji}/worktrees`),create:async s=>zi(`${ji}/worktrees`,{method:"POST",body:JSON.stringify(s)}),delete:async s=>{const n=new URL(`${ji}/worktrees/delete`,window.location.origin);n.searchParams.set("path",s),await zi(n.toString(),{method:"DELETE"})}},sf={list:async()=>zi(`${ji}/sessions`),start:async s=>zi(`${ji}/sessions`,{method:"POST",body:JSON.stringify(s)}),get:async s=>zi(`${ji}/sessions/${s}`),delete:async s=>{await zi(`${ji}/sessions/${s}`,{method:"DELETE"})}},Fg={get:async()=>zi(`${ji}/config`),update:async s=>zi(`${ji}/config`,{method:"PUT",body:JSON.stringify(s)})};function h1(){return Go({queryKey:["branches"],queryFn:rf.list})}function f1(s){return Go({queryKey:["branches",s],queryFn:()=>rf.get(s),enabled:!!s})}function d1(s){const n=tn();return dl({mutationFn:c=>rf.sync(s,c),onSuccess:c=>{n.setQueryData(["branches",s],c.branch),n.invalidateQueries({queryKey:["branches"]})}})}const el="__unknown__";function _1(s){return s.name.length>32?`${s.name.slice(0,29)}...`:s.name}function v1(s){if(!s.divergence)return"divergence: n/a";const{ahead:n,behind:c,upToDate:g}=s.divergence;return g?"divergence: up-to-date":`divergence: +${n} / -${c}`}function m1({branches:s}){const n=$.useMemo(()=>new Map(s.map(w=>[w.name,w])),[s]),c=$.useMemo(()=>{const w=new Set;return s.forEach(T=>{T.baseBranch&&w.add(T.baseBranch)}),w},[s]),g=$.useMemo(()=>{const w=new Map;return s.forEach(T=>{const M=T.baseBranch??el;if(!(!T.baseBranch&&c.has(T.name))){if(!w.has(M)){const o=M!==el?n.get(M)??null:null;w.set(M,{id:M,baseLabel:M===el?"ベース不明":M,baseNode:o,nodes:[],isSyntheticBase:o===null})}w.get(M).nodes.push(T)}}),Array.from(w.values()).sort((T,M)=>T.id===el?1:M.id===el?-1:T.baseLabel.localeCompare(M.baseLabel,"ja"))},[s,n,c]);return g.length?N.jsxs("section",{className:"branch-graph-panel",children:[N.jsxs("header",{className:"branch-graph-panel__header",children:[N.jsxs("div",{children:[N.jsx("p",{className:"branch-graph-panel__eyebrow",children:"BRANCH GRAPH"}),N.jsx("h2",{children:"ベースブランチの関係をグラフィカルに把握"}),N.jsx("p",{children:"baseRef、Git upstream、merge-baseヒューリスティクスを用いて推定したベースブランチ単位で 派生ノードをレーン表示します。"})]}),N.jsxs("div",{className:"branch-graph-panel__legend",children:[N.jsx("span",{className:"graph-chip graph-chip--base",children:"Base"}),N.jsx("span",{className:"graph-chip graph-chip--local",children:"Local"}),N.jsx("span",{className:"graph-chip graph-chip--remote",children:"Remote"}),N.jsx("span",{className:"graph-chip graph-chip--worktree",children:"Worktree"})]})]}),N.jsx("div",{className:"branch-graph",children:g.map(w=>N.jsxs("article",{className:"branch-graph__lane",children:[N.jsxs("div",{className:"branch-graph__lane-heading",children:[N.jsxs("p",{className:"branch-graph__lane-label",children:[w.baseLabel,w.baseNode&&N.jsx("span",{className:"branch-graph__lane-meta",children:w.baseNode.type==="local"?"LOCAL":"REMOTE"}),w.isSyntheticBase&&N.jsx("span",{className:"branch-graph__lane-meta lane-meta--muted",children:"推定のみ"})]}),N.jsxs("span",{className:"branch-graph__lane-count",children:[w.nodes.length," branch",w.nodes.length>1?"es":""]})]}),N.jsxs("div",{className:"branch-graph__track",children:[g1(w),w.nodes.map(T=>N.jsx(p1,{branch:T},T.name))]})]},w.id))})]}):N.jsx("section",{className:"branch-graph-panel",children:N.jsxs("div",{className:"branch-graph-panel__empty",children:[N.jsx("p",{children:"グラフ表示できるブランチがありません。"}),N.jsx("p",{children:"fetch済みのブランチやWorktreeを追加すると関係図が表示されます。"})]})})}function g1(s){const n=s.baseLabel==="ベース不明"?"Unknown base":s.baseLabel,c=N.jsxs("div",{className:`branch-graph__node branch-graph__node--base ${s.baseNode?`branch-graph__node--${s.baseNode.type}`:""}`,children:[N.jsx("span",{className:"branch-graph__node-label",children:n}),N.jsx("span",{className:"branch-graph__node-meta",children:"BASE"}),N.jsxs("div",{className:"branch-graph__tooltip",children:[N.jsx("p",{children:n}),N.jsx("p",{children:s.baseNode?`type: ${s.baseNode.type}`:"推定されたベースブランチ"})]})]});return s.baseNode?N.jsx(Ni,{to:`/${encodeURIComponent(s.baseNode.name)}`,className:"branch-graph__node-link","aria-label":`ベースブランチ ${s.baseNode.name} を開く`,children:c},`base-${s.id}`):N.jsx("div",{className:"branch-graph__node-link",children:c},`base-${s.id}`)}function p1({branch:s}){const n=N.jsxs("div",{className:`branch-graph__node branch-graph__node--${s.type} ${s.mergeStatus==="merged"?"branch-graph__node--merged":s.mergeStatus==="unmerged"?"branch-graph__node--active":""}`,children:[N.jsx("span",{className:"branch-graph__node-label",children:_1(s)}),N.jsx("span",{className:"branch-graph__node-meta",children:s.worktreePath?"Worktree":"No Worktree"}),N.jsxs("div",{className:"branch-graph__tooltip",children:[N.jsx("p",{children:s.name}),N.jsxs("p",{children:["base: ",s.baseBranch??"unknown"]}),N.jsx("p",{children:v1(s)}),N.jsx("p",{children:s.worktreePath??"Worktree未作成"})]})]});return N.jsx(Ni,{to:`/${encodeURIComponent(s.name)}`,className:"branch-graph__node-link","aria-label":`${s.name} の詳細を開く`,children:n})}const Wn=new Intl.NumberFormat("ja-JP"),Nm={local:"ローカル",remote:"リモート"},y1={merged:"マージ済み",unmerged:"未マージ",unknown:"状態不明"},S1={merged:"success",unmerged:"warning",unknown:"muted"},b1="ブランチ名やタイプで検索...";function C1(){const{data:s,isLoading:n,error:c}=h1(),[g,w]=$.useState(""),T=s??[],M=$.useMemo(()=>{const p=T.filter(S=>!!S.worktreePath).length,m=T.filter(S=>S.type==="remote").length,y=T.filter(S=>{var A;return(A=S.divergence)==null?void 0:A.upToDate}).length;return{total:T.length,worktrees:p,remote:m,healthy:y}},[T]),o=g.trim().toLowerCase(),_=$.useMemo(()=>o?T.filter(p=>[p.name,p.type,p.mergeStatus,p.commitMessage??"",p.worktreePath??""].join(" ").toLowerCase().includes(o)):T,[T,o]),d=$.useMemo(()=>n?{title:"データを読み込み中",description:"最新のブランチ一覧を取得しています..."}:c?{title:"ブランチの取得に失敗しました",description:c instanceof Error?c.message:"未知のエラーが発生しました。"}:T.length?null:{title:"ブランチが見つかりません",description:"git fetch origin などで最新のブランチを取得してください。"},[T.length,c,n]);return N.jsxs("div",{className:"app-shell",children:[N.jsxs("header",{className:"page-hero",children:[N.jsx("p",{className:"page-hero__eyebrow",children:"WORKTREE DASHBOARD"}),N.jsx("h1",{children:"gwt Control Center"}),N.jsx("p",{children:"ローカルのGitブランチとAIツールをブラウザ上で一元管理し、Worktree状態を瞬時に 可視化します。"}),N.jsx("div",{className:"page-hero__meta",children:"リアルタイムで更新されるステータスビュー"})]}),N.jsxs("main",{className:"page-content",children:[!d&&_.length>0&&N.jsx(m1,{branches:_}),N.jsxs("section",{className:"metrics-grid",children:[N.jsxs("article",{className:"metric-card",children:[N.jsx("p",{className:"metric-card__label",children:"総ブランチ数"}),N.jsx("p",{className:"metric-card__value","data-testid":"metric-total",children:Wn.format(M.total)}),N.jsx("p",{className:"metric-card__hint",children:"ローカル + リモート"})]}),N.jsxs("article",{className:"metric-card",children:[N.jsx("p",{className:"metric-card__label",children:"作成済みWorktree"}),N.jsx("p",{className:"metric-card__value","data-testid":"metric-worktrees",children:Wn.format(M.worktrees)}),N.jsx("p",{className:"metric-card__hint",children:"即座にAIツールを起動可能"})]}),N.jsxs("article",{className:"metric-card",children:[N.jsx("p",{className:"metric-card__label",children:"リモート追跡ブランチ"}),N.jsx("p",{className:"metric-card__value",children:Wn.format(M.remote)}),N.jsx("p",{className:"metric-card__hint",children:"origin との同期ステータス"})]}),N.jsxs("article",{className:"metric-card",children:[N.jsx("p",{className:"metric-card__label",children:"最新コミットが最新"}),N.jsx("p",{className:"metric-card__value",children:Wn.format(M.healthy)}),N.jsx("p",{className:"metric-card__hint",children:"divergence 0 のブランチ"})]})]}),N.jsxs("section",{className:"toolbar",children:[N.jsxs("label",{className:"toolbar__field",children:[N.jsx("span",{className:"toolbar__icon","aria-hidden":"true",children:"🔍"}),N.jsx("input",{type:"search",className:"search-input",placeholder:b1,value:g,onChange:p=>w(p.target.value)})]}),N.jsxs("span",{className:"toolbar__count",children:[Wn.format(_.length)," / "," ",Wn.format(M.total)," branches"]})]}),d?N.jsxs("div",{className:"page-state page-state--card",children:[N.jsx("h2",{children:d.title}),N.jsx("p",{children:d.description})]}):_.length===0?N.jsxs("div",{className:"empty-state",children:[N.jsx("h3",{children:"一致するブランチがありません"}),N.jsx("p",{children:"検索条件を見直すか、タグ・ブランチタイプ・コミットメッセージなど別のキーワードを 試してください。"})]}):N.jsx("div",{className:"branch-grid",children:_.map(p=>N.jsxs("article",{className:"branch-card",children:[N.jsxs("div",{className:"branch-card__header",children:[N.jsxs("div",{children:[N.jsxs("p",{className:"branch-card__eyebrow",children:[Nm[p.type],"ブランチ"]}),N.jsx("h2",{children:p.name})]}),N.jsxs("div",{className:"badge-group",children:[N.jsx("span",{className:`status-badge status-badge--${p.type}`,children:Nm[p.type]}),N.jsx("span",{className:`status-badge status-badge--${S1[p.mergeStatus]}`,children:y1[p.mergeStatus]}),N.jsx("span",{className:`status-badge ${p.worktreePath?"status-badge--success":"status-badge--muted"}`,children:p.worktreePath?"Worktreeあり":"Worktree未作成"})]})]}),N.jsx("p",{className:"branch-card__commit",children:p.commitMessage??"コミットメッセージがありません"}),N.jsxs("dl",{className:"metadata-grid metadata-grid--compact",children:[N.jsxs("div",{children:[N.jsx("dt",{children:"最新コミット"}),N.jsx("dd",{children:p.commitHash.slice(0,7)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Author"}),N.jsx("dd",{children:p.author??"N/A"})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Worktree"}),N.jsx("dd",{children:p.worktreePath??"未作成"})]})]}),p.divergence&&N.jsxs("div",{className:"pill-group",children:[N.jsxs("span",{className:"pill",children:["Ahead ",p.divergence.ahead]}),N.jsxs("span",{className:"pill",children:["Behind ",p.divergence.behind]}),N.jsx("span",{className:`pill ${p.divergence.upToDate?"pill--success":"pill--warning"}`,children:p.divergence.upToDate?"最新":"更新あり"})]}),N.jsxs("div",{className:"branch-card__actions",children:[N.jsx(Ni,{className:"button button--ghost",to:`/${encodeURIComponent(p.name)}`,children:"詳細を見る"}),N.jsx("span",{className:`info-pill ${p.worktreePath?"info-pill--success":"info-pill--warning"}`,children:p.worktreePath??"Worktree未作成"})]})]},p.name))})]})]})}function E1(){const s=tn();return dl({mutationFn:n=>u1.create(n),onSuccess:()=>{s.invalidateQueries({queryKey:["worktrees"]}),s.invalidateQueries({queryKey:["branches"]})}})}function w1(){return Go({queryKey:["sessions"],queryFn:sf.list})}function x1(){const s=tn();return dl({mutationFn:n=>sf.start(n),onSuccess:()=>{s.invalidateQueries({queryKey:["sessions"]})}})}function R1(){const s=tn();return dl({mutationFn:n=>sf.delete(n),onSuccess:()=>{s.invalidateQueries({queryKey:["sessions"]})}})}function Ig(){return Go({queryKey:["config"],queryFn:Fg.get})}function D1(){const s=tn();return dl({mutationFn:Fg.update,onSuccess:n=>{s.setQueryData(["config"],n)}})}var ph={exports:{}},jm;function A1(){return jm||(jm=1,(function(s,n){(function(c,g){s.exports=g()})(globalThis,(()=>(()=>{var c={4567:function(M,o,_){var d=this&&this.__decorate||function(h,u,f,E){var R,L=arguments.length,x=L<3?u:E===null?E=Object.getOwnPropertyDescriptor(u,f):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(h,u,f,E);else for(var C=h.length-1;C>=0;C--)(R=h[C])&&(x=(L<3?R(x):L>3?R(u,f,x):R(u,f))||x);return L>3&&x&&Object.defineProperty(u,f,x),x},p=this&&this.__param||function(h,u){return function(f,E){u(f,E,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const m=_(9042),y=_(9924),S=_(844),A=_(4725),b=_(2585);let l=o.AccessibilityManager=class extends S.Disposable{constructor(h,u,f,E){super(),this._terminal=h,this._coreBrowserService=f,this._renderService=E,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let R=0;R<this._terminal.rows;R++)this._rowElements[R]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[R]);if(this._topBoundaryFocusListener=R=>this._handleBoundaryFocus(R,0),this._bottomBoundaryFocusListener=R=>this._handleBoundaryFocus(R,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new y.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((R=>this._handleResize(R.rows)))),this.register(this._terminal.onRender((R=>this._refreshRows(R.start,R.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((R=>this._handleChar(R)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
62
+ `)))),this.register(this._terminal.onA11yTab((R=>this._handleTab(R)))),this.register(this._terminal.onKey((R=>this._handleKey(R.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,S.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(h){for(let u=0;u<h;u++)this._handleChar(" ")}_handleChar(h){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==h&&(this._charsToAnnounce+=h):this._charsToAnnounce+=h,h===`
63
+ `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=m.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(h){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(h)||this._charsToConsume.push(h)}_refreshRows(h,u){this._liveRegionDebouncer.refresh(h,u,this._terminal.rows)}_renderRows(h,u){const f=this._terminal.buffer,E=f.lines.length.toString();for(let R=h;R<=u;R++){const L=f.translateBufferLineToString(f.ydisp+R,!0),x=(f.ydisp+R+1).toString(),C=this._rowElements[R];C&&(L.length===0?C.innerText=" ":C.textContent=L,C.setAttribute("aria-posinset",x),C.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(h,u){const f=h.target,E=this._rowElements[u===0?1:this._rowElements.length-2];if(f.getAttribute("aria-posinset")===(u===0?"1":`${this._terminal.buffer.lines.length}`)||h.relatedTarget!==E)return;let R,L;if(u===0?(R=f,L=this._rowElements.pop(),this._rowContainer.removeChild(L)):(R=this._rowElements.shift(),L=f,this._rowContainer.removeChild(R)),R.removeEventListener("focus",this._topBoundaryFocusListener),L.removeEventListener("focus",this._bottomBoundaryFocusListener),u===0){const x=this._createAccessibilityTreeNode();this._rowElements.unshift(x),this._rowContainer.insertAdjacentElement("afterbegin",x)}else{const x=this._createAccessibilityTreeNode();this._rowElements.push(x),this._rowContainer.appendChild(x)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(u===0?-1:1),this._rowElements[u===0?1:this._rowElements.length-2].focus(),h.preventDefault(),h.stopImmediatePropagation()}_handleResize(h){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let u=this._rowContainer.children.length;u<this._terminal.rows;u++)this._rowElements[u]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[u]);for(;this._rowElements.length>h;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const h=this._coreBrowserService.mainDocument.createElement("div");return h.setAttribute("role","listitem"),h.tabIndex=-1,this._refreshRowDimensions(h),h}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let h=0;h<this._terminal.rows;h++)this._refreshRowDimensions(this._rowElements[h])}}_refreshRowDimensions(h){h.style.height=`${this._renderService.dimensions.css.cell.height}px`}};o.AccessibilityManager=l=d([p(1,b.IInstantiationService),p(2,A.ICoreBrowserService),p(3,A.IRenderService)],l)},3614:(M,o)=>{function _(y){return y.replace(/\r?\n/g,"\r")}function d(y,S){return S?"\x1B[200~"+y+"\x1B[201~":y}function p(y,S,A,b){y=d(y=_(y),A.decPrivateModes.bracketedPasteMode&&b.rawOptions.ignoreBracketedPasteMode!==!0),A.triggerDataEvent(y,!0),S.value=""}function m(y,S,A){const b=A.getBoundingClientRect(),l=y.clientX-b.left-10,h=y.clientY-b.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${l}px`,S.style.top=`${h}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=_,o.bracketTextForPaste=d,o.copyHandler=function(y,S){y.clipboardData&&y.clipboardData.setData("text/plain",S.selectionText),y.preventDefault()},o.handlePasteEvent=function(y,S,A,b){y.stopPropagation(),y.clipboardData&&p(y.clipboardData.getData("text/plain"),S,A,b)},o.paste=p,o.moveTextAreaUnderMouseCursor=m,o.rightClickHandler=function(y,S,A,b,l){m(y,S,A),l&&b.rightClickSelect(y),S.value=b.selectionText,S.select()}},7239:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const d=_(1505);o.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(p,m,y){this._css.set(p,m,y)}getCss(p,m){return this._css.get(p,m)}setColor(p,m,y){this._color.set(p,m,y)}getColor(p,m){return this._color.get(p,m)}clear(){this._color.clear(),this._css.clear()}}},3656:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(_,d,p,m){_.addEventListener(d,p,m);let y=!1;return{dispose:()=>{y||(y=!0,_.removeEventListener(d,p,m))}}}},6465:function(M,o,_){var d=this&&this.__decorate||function(l,h,u,f){var E,R=arguments.length,L=R<3?h:f===null?f=Object.getOwnPropertyDescriptor(h,u):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(l,h,u,f);else for(var x=l.length-1;x>=0;x--)(E=l[x])&&(L=(R<3?E(L):R>3?E(h,u,L):E(h,u))||L);return R>3&&L&&Object.defineProperty(h,u,L),L},p=this&&this.__param||function(l,h){return function(u,f){h(u,f,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier2=void 0;const m=_(3656),y=_(8460),S=_(844),A=_(2585);let b=o.Linkifier2=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(l){super(),this._bufferService=l,this._linkProviders=[],this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new y.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new y.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)((()=>{this._lastMouseEvent=void 0}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0})))}registerLinkProvider(l){return this._linkProviders.push(l),{dispose:()=>{const h=this._linkProviders.indexOf(l);h!==-1&&this._linkProviders.splice(h,1)}}}attachToDom(l,h,u){this._element=l,this._mouseService=h,this._renderService=u,this.register((0,m.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,m.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,m.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,m.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(l){if(this._lastMouseEvent=l,!this._element||!this._mouseService)return;const h=this._positionFromMouseEvent(l,this._element,this._mouseService);if(!h)return;this._isMouseOut=!1;const u=l.composedPath();for(let f=0;f<u.length;f++){const E=u[f];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&h.x===this._lastBufferCell.x&&h.y===this._lastBufferCell.y||(this._handleHover(h),this._lastBufferCell=h)}_handleHover(l){if(this._activeLine!==l.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(l,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,l)||(this._clearCurrentLink(),this._askForLink(l,!0))}_askForLink(l,h){var f,E;this._activeProviderReplies&&h||((f=this._activeProviderReplies)==null||f.forEach((R=>{R==null||R.forEach((L=>{L.link.dispose&&L.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=l.y);let u=!1;for(const[R,L]of this._linkProviders.entries())h?(E=this._activeProviderReplies)!=null&&E.get(R)&&(u=this._checkLinkProviderResult(R,l,u)):L.provideLinks(l.y,(x=>{var B,z;if(this._isMouseOut)return;const C=x==null?void 0:x.map((I=>({link:I})));(B=this._activeProviderReplies)==null||B.set(R,C),u=this._checkLinkProviderResult(R,l,u),((z=this._activeProviderReplies)==null?void 0:z.size)===this._linkProviders.length&&this._removeIntersectingLinks(l.y,this._activeProviderReplies)}))}_removeIntersectingLinks(l,h){const u=new Set;for(let f=0;f<h.size;f++){const E=h.get(f);if(E)for(let R=0;R<E.length;R++){const L=E[R],x=L.link.range.start.y<l?0:L.link.range.start.x,C=L.link.range.end.y>l?this._bufferService.cols:L.link.range.end.x;for(let B=x;B<=C;B++){if(u.has(B)){E.splice(R--,1);break}u.add(B)}}}}_checkLinkProviderResult(l,h,u){var R;if(!this._activeProviderReplies)return u;const f=this._activeProviderReplies.get(l);let E=!1;for(let L=0;L<l;L++)this._activeProviderReplies.has(L)&&!this._activeProviderReplies.get(L)||(E=!0);if(!E&&f){const L=f.find((x=>this._linkAtPosition(x.link,h)));L&&(u=!0,this._handleNewLink(L))}if(this._activeProviderReplies.size===this._linkProviders.length&&!u)for(let L=0;L<this._activeProviderReplies.size;L++){const x=(R=this._activeProviderReplies.get(L))==null?void 0:R.find((C=>this._linkAtPosition(C.link,h)));if(x){u=!0,this._handleNewLink(x);break}}return u}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(l){if(!this._element||!this._mouseService||!this._currentLink)return;const h=this._positionFromMouseEvent(l,this._element,this._mouseService);h&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,h)&&this._currentLink.link.activate(l,this._currentLink.link.text)}_clearCurrentLink(l,h){this._element&&this._currentLink&&this._lastMouseEvent&&(!l||!h||this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=h)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(l){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const h=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);h&&this._linkAtPosition(l.link,h)&&(this._currentLink=l,this._currentLink.state={decorations:{underline:l.link.decorations===void 0||l.link.decorations.underline,pointerCursor:l.link.decorations===void 0||l.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,l.link,this._lastMouseEvent),l.link.decorations={},Object.defineProperties(l.link.decorations,{pointerCursor:{get:()=>{var u,f;return(f=(u=this._currentLink)==null?void 0:u.state)==null?void 0:f.decorations.pointerCursor},set:u=>{var f,E;(f=this._currentLink)!=null&&f.state&&this._currentLink.state.decorations.pointerCursor!==u&&(this._currentLink.state.decorations.pointerCursor=u,this._currentLink.state.isHovered&&((E=this._element)==null||E.classList.toggle("xterm-cursor-pointer",u)))}},underline:{get:()=>{var u,f;return(f=(u=this._currentLink)==null?void 0:u.state)==null?void 0:f.decorations.underline},set:u=>{var f,E,R;(f=this._currentLink)!=null&&f.state&&((R=(E=this._currentLink)==null?void 0:E.state)==null?void 0:R.decorations.underline)!==u&&(this._currentLink.state.decorations.underline=u,this._currentLink.state.isHovered&&this._fireUnderlineEvent(l.link,u))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((u=>{if(!this._currentLink)return;const f=u.start===0?0:u.start+1+this._bufferService.buffer.ydisp,E=this._bufferService.buffer.ydisp+1+u.end;if(this._currentLink.link.range.start.y>=f&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(f,E),this._lastMouseEvent&&this._element)){const R=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);R&&this._askForLink(R,!1)}}))))}_linkHover(l,h,u){var f;(f=this._currentLink)!=null&&f.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(h,!0),this._currentLink.state.decorations.pointerCursor&&l.classList.add("xterm-cursor-pointer")),h.hover&&h.hover(u,h.text)}_fireUnderlineEvent(l,h){const u=l.range,f=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(u.start.x-1,u.start.y-f-1,u.end.x,u.end.y-f-1,void 0);(h?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(l,h,u){var f;(f=this._currentLink)!=null&&f.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(h,!1),this._currentLink.state.decorations.pointerCursor&&l.classList.remove("xterm-cursor-pointer")),h.leave&&h.leave(u,h.text)}_linkAtPosition(l,h){const u=l.range.start.y*this._bufferService.cols+l.range.start.x,f=l.range.end.y*this._bufferService.cols+l.range.end.x,E=h.y*this._bufferService.cols+h.x;return u<=E&&E<=f}_positionFromMouseEvent(l,h,u){const f=u.getCoords(l,h,this._bufferService.cols,this._bufferService.rows);if(f)return{x:f[0],y:f[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(l,h,u,f,E){return{x1:l,y1:h,x2:u,y2:f,cols:this._bufferService.cols,fg:E}}};o.Linkifier2=b=d([p(0,A.IBufferService)],b)},9042:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(M,o,_){var d=this&&this.__decorate||function(b,l,h,u){var f,E=arguments.length,R=E<3?l:u===null?u=Object.getOwnPropertyDescriptor(l,h):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(b,l,h,u);else for(var L=b.length-1;L>=0;L--)(f=b[L])&&(R=(E<3?f(R):E>3?f(l,h,R):f(l,h))||R);return E>3&&R&&Object.defineProperty(l,h,R),R},p=this&&this.__param||function(b,l){return function(h,u){l(h,u,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const m=_(511),y=_(2585);let S=o.OscLinkProvider=class{constructor(b,l,h){this._bufferService=b,this._optionsService=l,this._oscLinkService=h}provideLinks(b,l){var B;const h=this._bufferService.buffer.lines.get(b-1);if(!h)return void l(void 0);const u=[],f=this._optionsService.rawOptions.linkHandler,E=new m.CellData,R=h.getTrimmedLength();let L=-1,x=-1,C=!1;for(let z=0;z<R;z++)if(x!==-1||h.hasContent(z)){if(h.loadCell(z,E),E.hasExtendedAttrs()&&E.extended.urlId){if(x===-1){x=z,L=E.extended.urlId;continue}C=E.extended.urlId!==L}else x!==-1&&(C=!0);if(C||x!==-1&&z===R-1){const I=(B=this._oscLinkService.getLinkData(L))==null?void 0:B.uri;if(I){const F={start:{x:x+1,y:b},end:{x:z+(C||z!==R-1?0:1),y:b}};let Q=!1;if(!(f!=null&&f.allowNonHttpProtocols))try{const ce=new URL(I);["http:","https:"].includes(ce.protocol)||(Q=!0)}catch{Q=!0}Q||u.push({text:I,range:F,activate:(ce,ae)=>f?f.activate(ce,ae,F):A(0,ae),hover:(ce,ae)=>{var q;return(q=f==null?void 0:f.hover)==null?void 0:q.call(f,ce,ae,F)},leave:(ce,ae)=>{var q;return(q=f==null?void 0:f.leave)==null?void 0:q.call(f,ce,ae,F)}})}C=!1,E.hasExtendedAttrs()&&E.extended.urlId?(x=z,L=E.extended.urlId):(x=-1,L=-1)}}l(u)}};function A(b,l){if(confirm(`Do you want to navigate to ${l}?
64
+
65
+ WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=S=d([p(0,y.IBufferService),p(1,y.IOptionsService),p(2,y.IOscLinkService)],S)},6193:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(_,d){this._parentWindow=_,this._renderCallback=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(_){return this._refreshCallbacks.push(_),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(_,d,p){this._rowCount=p,_=_!==void 0?_:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,_):_,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const _=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(_,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const _ of this._refreshCallbacks)_(0);this._refreshCallbacks=[]}}},3236:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const d=_(3614),p=_(3656),m=_(6465),y=_(9042),S=_(3730),A=_(1680),b=_(3107),l=_(5744),h=_(2950),u=_(1296),f=_(428),E=_(4269),R=_(5114),L=_(8934),x=_(3230),C=_(9312),B=_(4725),z=_(6731),I=_(8055),F=_(8969),Q=_(8460),ce=_(844),ae=_(6114),q=_(8437),J=_(2584),he=_(7399),k=_(5941),U=_(9074),O=_(2585),j=_(5435),X=_(4567);class te extends F.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(Y={}){super(Y),this.browser=ae,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new ce.MutableDisposable),this._onCursorMove=this.register(new Q.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new Q.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new Q.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new Q.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new Q.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new Q.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new Q.EventEmitter),this._onBlur=this.register(new Q.EventEmitter),this._onA11yCharEmitter=this.register(new Q.EventEmitter),this._onA11yTabEmitter=this.register(new Q.EventEmitter),this._onWillOpen=this.register(new Q.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(m.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(U.DecorationService),this._instantiationService.setService(O.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((ie,P)=>this.refresh(ie,P)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((ie=>this._reportWindowsOptions(ie)))),this.register(this._inputHandler.onColor((ie=>this._handleColorEvent(ie)))),this.register((0,Q.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,Q.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,Q.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,Q.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((ie=>this._afterResize(ie.cols,ie.rows)))),this.register((0,ce.toDisposable)((()=>{var ie,P;this._customKeyEventHandler=void 0,(P=(ie=this.element)==null?void 0:ie.parentNode)==null||P.removeChild(this.element)})))}_handleColorEvent(Y){if(this._themeService)for(const ie of Y){let P,le="";switch(ie.index){case 256:P="foreground",le="10";break;case 257:P="background",le="11";break;case 258:P="cursor",le="12";break;default:P="ansi",le="4;"+ie.index}switch(ie.type){case 0:const Se=I.color.toColorRGB(P==="ansi"?this._themeService.colors.ansi[ie.index]:this._themeService.colors[P]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${le};${(0,k.toRgbString)(Se)}${J.C1_ESCAPED.ST}`);break;case 1:if(P==="ansi")this._themeService.modifyColors((ue=>ue.ansi[ie.index]=I.rgba.toColor(...ie.color)));else{const ue=P;this._themeService.modifyColors((Xe=>Xe[ue]=I.rgba.toColor(...ie.color)))}break;case 2:this._themeService.restoreColor(ie.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Y){Y?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(X.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Y){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[I"),this.updateCursorStyle(Y),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var Y;return(Y=this.textarea)==null?void 0:Y.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const Y=this.buffer.ybase+this.buffer.y,ie=this.buffer.lines.get(Y);if(!ie)return;const P=Math.min(this.buffer.x,this.cols-1),le=this._renderService.dimensions.css.cell.height,Se=ie.getWidth(P),ue=this._renderService.dimensions.css.cell.width*Se,Xe=this.buffer.y*this._renderService.dimensions.css.cell.height,He=P*this._renderService.dimensions.css.cell.width;this.textarea.style.left=He+"px",this.textarea.style.top=Xe+"px",this.textarea.style.width=ue+"px",this.textarea.style.height=le+"px",this.textarea.style.lineHeight=le+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,p.addDisposableDomListener)(this.element,"copy",(ie=>{this.hasSelection()&&(0,d.copyHandler)(ie,this._selectionService)})));const Y=ie=>(0,d.handlePasteEvent)(ie,this.textarea,this.coreService,this.optionsService);this.register((0,p.addDisposableDomListener)(this.textarea,"paste",Y)),this.register((0,p.addDisposableDomListener)(this.element,"paste",Y)),ae.isFirefox?this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(ie=>{ie.button===2&&(0,d.rightClickHandler)(ie,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,p.addDisposableDomListener)(this.element,"contextmenu",(ie=>{(0,d.rightClickHandler)(ie,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ae.isLinux&&this.register((0,p.addDisposableDomListener)(this.element,"auxclick",(ie=>{ie.button===1&&(0,d.moveTextAreaUnderMouseCursor)(ie,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,p.addDisposableDomListener)(this.textarea,"keyup",(Y=>this._keyUp(Y)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keydown",(Y=>this._keyDown(Y)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"keypress",(Y=>this._keyPress(Y)),!0)),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionupdate",(Y=>this._compositionHelper.compositionupdate(Y)))),this.register((0,p.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,p.addDisposableDomListener)(this.textarea,"input",(Y=>this._inputEvent(Y)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Y){var P;if(!Y)throw new Error("Terminal requires a parent element.");if(Y.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((P=this.element)==null?void 0:P.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Y.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),Y.appendChild(this.element);const ie=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),ie.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),ie.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",y.promptLabel),ae.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(R.CoreBrowserService,this.textarea,Y.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(B.ICoreBrowserService,this._coreBrowserService),this.register((0,p.addDisposableDomListener)(this.textarea,"focus",(le=>this._handleTextAreaFocus(le)))),this.register((0,p.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(f.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(B.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(z.ThemeService),this._instantiationService.setService(B.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(E.CharacterJoinerService),this._instantiationService.setService(B.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(x.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(B.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((le=>this._onRender.fire(le)))),this.onResize((le=>this._renderService.resize(le.cols,le.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(ie);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(L.MouseService),this._instantiationService.setService(B.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(A.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(C.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(B.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((le=>this.scrollLines(le.amount,le.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((le=>this._renderService.handleSelectionChanged(le.start,le.end,le.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((le=>{this.textarea.value=le,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((le=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,p.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(b.BufferDecorationRenderer,this.screenElement)),this.register((0,p.addDisposableDomListener)(this.element,"mousedown",(le=>this._selectionService.handleMouseDown(le)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(X.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(le=>this._handleScreenReaderModeOptionChange(le)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(le=>{!this._overviewRulerRenderer&&le&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(u.DomRenderer,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier2)}bindMouse(){const Y=this,ie=this.element;function P(ue){const Xe=Y._mouseService.getMouseReportCoords(ue,Y.screenElement);if(!Xe)return!1;let He,ge;switch(ue.overrideType||ue.type){case"mousemove":ge=32,ue.buttons===void 0?(He=3,ue.button!==void 0&&(He=ue.button<3?ue.button:3)):He=1&ue.buttons?0:4&ue.buttons?1:2&ue.buttons?2:3;break;case"mouseup":ge=0,He=ue.button<3?ue.button:3;break;case"mousedown":ge=1,He=ue.button<3?ue.button:3;break;case"wheel":if(Y.viewport.getLinesScrolled(ue)===0)return!1;ge=ue.deltaY<0?0:1,He=4;break;default:return!1}return!(ge===void 0||He===void 0||He>4)&&Y.coreMouseService.triggerMouseEvent({col:Xe.col,row:Xe.row,x:Xe.x,y:Xe.y,button:He,action:ge,ctrl:ue.ctrlKey,alt:ue.altKey,shift:ue.shiftKey})}const le={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Se={mouseup:ue=>(P(ue),ue.buttons||(this._document.removeEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.removeEventListener("mousemove",le.mousedrag)),this.cancel(ue)),wheel:ue=>(P(ue),this.cancel(ue,!0)),mousedrag:ue=>{ue.buttons&&P(ue)},mousemove:ue=>{ue.buttons||P(ue)}};this.register(this.coreMouseService.onProtocolChange((ue=>{ue?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(ue)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&ue?le.mousemove||(ie.addEventListener("mousemove",Se.mousemove),le.mousemove=Se.mousemove):(ie.removeEventListener("mousemove",le.mousemove),le.mousemove=null),16&ue?le.wheel||(ie.addEventListener("wheel",Se.wheel,{passive:!1}),le.wheel=Se.wheel):(ie.removeEventListener("wheel",le.wheel),le.wheel=null),2&ue?le.mouseup||(le.mouseup=Se.mouseup):(this._document.removeEventListener("mouseup",le.mouseup),le.mouseup=null),4&ue?le.mousedrag||(le.mousedrag=Se.mousedrag):(this._document.removeEventListener("mousemove",le.mousedrag),le.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,p.addDisposableDomListener)(ie,"mousedown",(ue=>{if(ue.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ue))return P(ue),le.mouseup&&this._document.addEventListener("mouseup",le.mouseup),le.mousedrag&&this._document.addEventListener("mousemove",le.mousedrag),this.cancel(ue)}))),this.register((0,p.addDisposableDomListener)(ie,"wheel",(ue=>{if(!le.wheel){if(!this.buffer.hasScrollback){const Xe=this.viewport.getLinesScrolled(ue);if(Xe===0)return;const He=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ue.deltaY<0?"A":"B");let ge="";for(let Ne=0;Ne<Math.abs(Xe);Ne++)ge+=He;return this.coreService.triggerDataEvent(ge,!0),this.cancel(ue,!0)}return this.viewport.handleWheel(ue)?this.cancel(ue):void 0}}),{passive:!1})),this.register((0,p.addDisposableDomListener)(ie,"touchstart",(ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ue),this.cancel(ue)}),{passive:!0})),this.register((0,p.addDisposableDomListener)(ie,"touchmove",(ue=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ue)?void 0:this.cancel(ue)}),{passive:!1}))}refresh(Y,ie){var P;(P=this._renderService)==null||P.refreshRows(Y,ie)}updateCursorStyle(Y){var ie;(ie=this._selectionService)!=null&&ie.shouldColumnSelect(Y)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(Y,ie,P=0){var le;P===1?(super.scrollLines(Y,ie,P),this.refresh(0,this.rows-1)):(le=this.viewport)==null||le.scrollLines(Y)}paste(Y){(0,d.paste)(Y,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Y){this._customKeyEventHandler=Y}registerLinkProvider(Y){return this.linkifier2.registerLinkProvider(Y)}registerCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const ie=this._characterJoinerService.register(Y);return this.refresh(0,this.rows-1),ie}deregisterCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Y)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Y){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Y)}registerDecoration(Y){return this._decorationService.registerDecoration(Y)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Y,ie,P){this._selectionService.setSelection(Y,ie,P)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var Y;(Y=this._selectionService)==null||Y.clearSelection()}selectAll(){var Y;(Y=this._selectionService)==null||Y.selectAll()}selectLines(Y,ie){var P;(P=this._selectionService)==null||P.selectLines(Y,ie)}_keyDown(Y){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;const ie=this.browser.isMac&&this.options.macOptionIsMeta&&Y.altKey;if(!ie&&!this._compositionHelper.keydown(Y))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;ie||Y.key!=="Dead"&&Y.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const P=(0,he.evaluateKeyboardEvent)(Y,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Y),P.type===3||P.type===2){const le=this.rows-1;return this.scrollLines(P.type===2?-le:le),this.cancel(Y,!0)}return P.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Y)||(P.cancel&&this.cancel(Y,!0),!P.key||!!(Y.key&&!Y.ctrlKey&&!Y.altKey&&!Y.metaKey&&Y.key.length===1&&Y.key.charCodeAt(0)>=65&&Y.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(P.key!==J.C0.ETX&&P.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:P.key,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(P.key,!0),!this.optionsService.rawOptions.screenReaderMode||Y.altKey||Y.ctrlKey?this.cancel(Y,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Y,ie){const P=Y.isMac&&!this.options.macOptionIsMeta&&ie.altKey&&!ie.ctrlKey&&!ie.metaKey||Y.isWindows&&ie.altKey&&ie.ctrlKey&&!ie.metaKey||Y.isWindows&&ie.getModifierState("AltGraph");return ie.type==="keypress"?P:P&&(!ie.keyCode||ie.keyCode>47)}_keyUp(Y){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1||((function(ie){return ie.keyCode===16||ie.keyCode===17||ie.keyCode===18})(Y)||this.focus(),this.updateCursorStyle(Y),this._keyPressHandled=!1)}_keyPress(Y){let ie;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;if(this.cancel(Y),Y.charCode)ie=Y.charCode;else if(Y.which===null||Y.which===void 0)ie=Y.keyCode;else{if(Y.which===0||Y.charCode===0)return!1;ie=Y.which}return!(!ie||(Y.altKey||Y.ctrlKey||Y.metaKey)&&!this._isThirdLevelShift(this.browser,Y)||(ie=String.fromCharCode(ie),this._onKey.fire({key:ie,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(ie,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Y){if(Y.data&&Y.inputType==="insertText"&&(!Y.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const ie=Y.data;return this.coreService.triggerDataEvent(ie,!0),this.cancel(Y),!0}return!1}resize(Y,ie){Y!==this.cols||ie!==this.rows?super.resize(Y,ie):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Y,ie){var P,le;(P=this._charSizeService)==null||P.measure(),(le=this.viewport)==null||le.syncScrollArea(!0)}clear(){var Y;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let ie=1;ie<this.rows;ie++)this.buffer.lines.push(this.buffer.getBlankLine(q.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(Y=this.viewport)==null||Y.reset(),this.refresh(0,this.rows-1)}}reset(){var ie,P;this.options.rows=this.rows,this.options.cols=this.cols;const Y=this._customKeyEventHandler;this._setup(),super.reset(),(ie=this._selectionService)==null||ie.reset(),this._decorationService.reset(),(P=this.viewport)==null||P.reset(),this._customKeyEventHandler=Y,this.refresh(0,this.rows-1)}clearTextureAtlas(){var Y;(Y=this._renderService)==null||Y.clearTextureAtlas()}_reportFocus(){var Y;(Y=this.element)!=null&&Y.classList.contains("focus")?this.coreService.triggerDataEvent(J.C0.ESC+"[I"):this.coreService.triggerDataEvent(J.C0.ESC+"[O")}_reportWindowsOptions(Y){if(this._renderService)switch(Y){case j.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const ie=this._renderService.dimensions.css.canvas.width.toFixed(0),P=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[4;${P};${ie}t`);break;case j.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const le=this._renderService.dimensions.css.cell.width.toFixed(0),Se=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[6;${Se};${le}t`)}}cancel(Y,ie){if(this.options.cancelEvents||ie)return Y.preventDefault(),Y.stopPropagation(),!1}}o.Terminal=te},9924:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(_,d=1e3){this._renderCallback=_,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(_,d,p){this._rowCount=p,_=_!==void 0?_:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,_):_,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const m=Date.now();if(m-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=m,this._innerRefresh();else if(!this._additionalRefreshRequested){const y=m-this._lastRefreshMs,S=this._debounceThresholdMS-y;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),S)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const _=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(_,d)}}},1680:function(M,o,_){var d=this&&this.__decorate||function(h,u,f,E){var R,L=arguments.length,x=L<3?u:E===null?E=Object.getOwnPropertyDescriptor(u,f):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(h,u,f,E);else for(var C=h.length-1;C>=0;C--)(R=h[C])&&(x=(L<3?R(x):L>3?R(u,f,x):R(u,f))||x);return L>3&&x&&Object.defineProperty(u,f,x),x},p=this&&this.__param||function(h,u){return function(f,E){u(f,E,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const m=_(3656),y=_(4725),S=_(8460),A=_(844),b=_(2585);let l=o.Viewport=class extends A.Disposable{constructor(h,u,f,E,R,L,x,C){super(),this._viewportElement=h,this._scrollArea=u,this._bufferService=f,this._optionsService=E,this._charSizeService=R,this._renderService=L,this._coreBrowserService=x,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((B=>this._activeBuffer=B.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((B=>this._renderDimensions=B))),this._handleThemeChange(C.colors),this.register(C.onChangeColors((B=>this._handleThemeChange(B)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(h){if(h)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const u=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==u&&(this._lastRecordedBufferHeight=u,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const u=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:u,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(h,u){const f=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(u<0&&this._viewportElement.scrollTop!==0||u>0&&f<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const u=this._getPixelsScrolled(h);return u!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+u:this._smoothScrollState.target+=u,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=u,this._bubbleScroll(h,u))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const u=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+u,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let u=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?u*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(u*=this._currentRowHeight*this._bufferService.rows),u}getBufferElements(h,u){var C;let f,E="";const R=[],L=u??this._bufferService.buffer.lines.length,x=this._bufferService.buffer.lines;for(let B=h;B<L;B++){const z=x.get(B);if(!z)continue;const I=(C=x.get(B+1))==null?void 0:C.isWrapped;if(E+=z.translateToString(!I),!I||B===x.length-1){const F=document.createElement("div");F.textContent=E,R.push(F),E.length>0&&(f=F),E=""}}return{bufferElements:R,cursorElement:f}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let u=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(u/=this._currentRowHeight+0,this._wheelPartialScroll+=u,u=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(u*=this._bufferService.rows),u}_applyScrollModifier(h,u){const f=this._optionsService.rawOptions.fastScrollModifier;return f==="alt"&&u.altKey||f==="ctrl"&&u.ctrlKey||f==="shift"&&u.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const u=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,u!==0&&(this._viewportElement.scrollTop+=u,this._bubbleScroll(h,u))}};o.Viewport=l=d([p(2,b.IBufferService),p(3,b.IOptionsService),p(4,y.ICharSizeService),p(5,y.IRenderService),p(6,y.ICoreBrowserService),p(7,y.IThemeService)],l)},3107:function(M,o,_){var d=this&&this.__decorate||function(b,l,h,u){var f,E=arguments.length,R=E<3?l:u===null?u=Object.getOwnPropertyDescriptor(l,h):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(b,l,h,u);else for(var L=b.length-1;L>=0;L--)(f=b[L])&&(R=(E<3?f(R):E>3?f(l,h,R):f(l,h))||R);return E>3&&R&&Object.defineProperty(l,h,R),R},p=this&&this.__param||function(b,l){return function(h,u){l(h,u,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const m=_(4725),y=_(844),S=_(2585);let A=o.BufferDecorationRenderer=class extends y.Disposable{constructor(b,l,h,u,f){super(),this._screenElement=b,this._bufferService=l,this._coreBrowserService=h,this._decorationService=u,this._renderService=f,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((E=>this._removeDecoration(E)))),this.register((0,y.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const b of this._decorationService.decorations)this._renderDecoration(b);this._dimensionsChanged=!1}_renderDecoration(b){this._refreshStyle(b),this._dimensionsChanged&&this._refreshXPosition(b)}_createElement(b){var u;const l=this._coreBrowserService.mainDocument.createElement("div");l.classList.add("xterm-decoration"),l.classList.toggle("xterm-decoration-top-layer",((u=b==null?void 0:b.options)==null?void 0:u.layer)==="top"),l.style.width=`${Math.round((b.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,l.style.height=(b.options.height||1)*this._renderService.dimensions.css.cell.height+"px",l.style.top=(b.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",l.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=b.options.x??0;return h&&h>this._bufferService.cols&&(l.style.display="none"),this._refreshXPosition(b,l),l}_refreshStyle(b){const l=b.marker.line-this._bufferService.buffers.active.ydisp;if(l<0||l>=this._bufferService.rows)b.element&&(b.element.style.display="none",b.onRenderEmitter.fire(b.element));else{let h=this._decorationElements.get(b);h||(h=this._createElement(b),b.element=h,this._decorationElements.set(b,h),this._container.appendChild(h),b.onDispose((()=>{this._decorationElements.delete(b),h.remove()}))),h.style.top=l*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",b.onRenderEmitter.fire(h)}}_refreshXPosition(b,l=b.element){if(!l)return;const h=b.options.x??0;(b.options.anchor||"left")==="right"?l.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":l.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(b){var l;(l=this._decorationElements.get(b))==null||l.remove(),this._decorationElements.delete(b),b.dispose()}};o.BufferDecorationRenderer=A=d([p(1,S.IBufferService),p(2,m.ICoreBrowserService),p(3,S.IDecorationService),p(4,m.IRenderService)],A)},5871:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(_){if(_.options.overviewRulerOptions){for(const d of this._zones)if(d.color===_.options.overviewRulerOptions.color&&d.position===_.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,_.marker.line))return;if(this._lineAdjacentToZone(d,_.marker.line,_.options.overviewRulerOptions.position))return void this._addLineToZone(d,_.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=_.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=_.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=_.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=_.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:_.options.overviewRulerOptions.color,position:_.options.overviewRulerOptions.position,startBufferLine:_.marker.line,endBufferLine:_.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(_){this._linePadding=_}_lineIntersectsZone(_,d){return d>=_.startBufferLine&&d<=_.endBufferLine}_lineAdjacentToZone(_,d,p){return d>=_.startBufferLine-this._linePadding[p||"full"]&&d<=_.endBufferLine+this._linePadding[p||"full"]}_addLineToZone(_,d){_.startBufferLine=Math.min(_.startBufferLine,d),_.endBufferLine=Math.max(_.endBufferLine,d)}}},5744:function(M,o,_){var d=this&&this.__decorate||function(f,E,R,L){var x,C=arguments.length,B=C<3?E:L===null?L=Object.getOwnPropertyDescriptor(E,R):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(f,E,R,L);else for(var z=f.length-1;z>=0;z--)(x=f[z])&&(B=(C<3?x(B):C>3?x(E,R,B):x(E,R))||B);return C>3&&B&&Object.defineProperty(E,R,B),B},p=this&&this.__param||function(f,E){return function(R,L){E(R,L,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const m=_(5871),y=_(4725),S=_(844),A=_(2585),b={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let u=o.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(f,E,R,L,x,C,B){var I;super(),this._viewportElement=f,this._screenElement=E,this._bufferService=R,this._decorationService=L,this._renderService=x,this._optionsService=C,this._coreBrowserService=B,this._colorZoneStore=new m.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(I=this._viewportElement.parentElement)==null||I.insertBefore(this._canvas,this._viewportElement);const z=this._canvas.getContext("2d");if(!z)throw new Error("Ctx cannot be null");this._ctx=z,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)((()=>{var F;(F=this._canvas)==null||F.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const f=Math.floor(this._canvas.width/3),E=Math.ceil(this._canvas.width/3);l.full=this._canvas.width,l.left=f,l.center=E,l.right=f,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=l.left,h.right=l.left+l.center}_refreshDrawHeightConstants(){b.full=Math.round(2*this._coreBrowserService.dpr);const f=this._canvas.height/this._bufferService.buffer.lines.length,E=Math.round(Math.max(Math.min(f,12),6)*this._coreBrowserService.dpr);b.left=E,b.center=E,b.right=E}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*b.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const E of this._decorationService.decorations)this._colorZoneStore.addDecoration(E);this._ctx.lineWidth=1;const f=this._colorZoneStore.zones;for(const E of f)E.position!=="full"&&this._renderColorZone(E);for(const E of f)E.position==="full"&&this._renderColorZone(E);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(f){this._ctx.fillStyle=f.color,this._ctx.fillRect(h[f.position||"full"],Math.round((this._canvas.height-1)*(f.startBufferLine/this._bufferService.buffers.active.lines.length)-b[f.position||"full"]/2),l[f.position||"full"],Math.round((this._canvas.height-1)*((f.endBufferLine-f.startBufferLine)/this._bufferService.buffers.active.lines.length)+b[f.position||"full"]))}_queueRefresh(f,E){this._shouldUpdateDimensions=f||this._shouldUpdateDimensions,this._shouldUpdateAnchor=E||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};o.OverviewRulerRenderer=u=d([p(2,A.IBufferService),p(3,A.IDecorationService),p(4,y.IRenderService),p(5,A.IOptionsService),p(6,y.ICoreBrowserService)],u)},2950:function(M,o,_){var d=this&&this.__decorate||function(b,l,h,u){var f,E=arguments.length,R=E<3?l:u===null?u=Object.getOwnPropertyDescriptor(l,h):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(b,l,h,u);else for(var L=b.length-1;L>=0;L--)(f=b[L])&&(R=(E<3?f(R):E>3?f(l,h,R):f(l,h))||R);return E>3&&R&&Object.defineProperty(l,h,R),R},p=this&&this.__param||function(b,l){return function(h,u){l(h,u,b)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const m=_(4725),y=_(2585),S=_(2584);let A=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(b,l,h,u,f,E){this._textarea=b,this._compositionView=l,this._bufferService=h,this._optionsService=u,this._coreService=f,this._renderService=E,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(b){this._compositionView.textContent=b.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(b){if(this._isComposing||this._isSendingComposition){if(b.keyCode===229||b.keyCode===16||b.keyCode===17||b.keyCode===18)return!1;this._finalizeComposition(!1)}return b.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(b){if(this._compositionView.classList.remove("active"),this._isComposing=!1,b){const l={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,l.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(l.start,l.end):this._textarea.value.substring(l.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const l=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(l,!0)}}_handleAnyTextareaChanges(){const b=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const l=this._textarea.value,h=l.replace(b,"");this._dataAlreadySent=h,l.length>b.length?this._coreService.triggerDataEvent(h,!0):l.length<b.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):l.length===b.length&&l!==b&&this._coreService.triggerDataEvent(l,!0)}}),0)}updateCompositionElements(b){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,u=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,f=l*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=f+"px",this._compositionView.style.top=u+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const E=this._compositionView.getBoundingClientRect();this._textarea.style.left=f+"px",this._textarea.style.top=u+"px",this._textarea.style.width=Math.max(E.width,1)+"px",this._textarea.style.height=Math.max(E.height,1)+"px",this._textarea.style.lineHeight=E.height+"px"}b||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};o.CompositionHelper=A=d([p(2,y.IBufferService),p(3,y.IOptionsService),p(4,y.ICoreService),p(5,m.IRenderService)],A)},9806:(M,o)=>{function _(d,p,m){const y=m.getBoundingClientRect(),S=d.getComputedStyle(m),A=parseInt(S.getPropertyValue("padding-left")),b=parseInt(S.getPropertyValue("padding-top"));return[p.clientX-y.left-A,p.clientY-y.top-b]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=_,o.getCoords=function(d,p,m,y,S,A,b,l,h){if(!A)return;const u=_(d,p,m);return u?(u[0]=Math.ceil((u[0]+(h?b/2:0))/b),u[1]=Math.ceil(u[1]/l),u[0]=Math.min(Math.max(u[0],1),y+(h?1:0)),u[1]=Math.min(Math.max(u[1],1),S),u):void 0}},9504:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const d=_(2584);function p(l,h,u,f){const E=l-m(l,u),R=h-m(h,u),L=Math.abs(E-R)-(function(x,C,B){let z=0;const I=x-m(x,B),F=C-m(C,B);for(let Q=0;Q<Math.abs(I-F);Q++){const ce=y(x,C)==="A"?-1:1,ae=B.buffer.lines.get(I+ce*Q);ae!=null&&ae.isWrapped&&z++}return z})(l,h,u);return b(L,A(y(l,h),f))}function m(l,h){let u=0,f=h.buffer.lines.get(l),E=f==null?void 0:f.isWrapped;for(;E&&l>=0&&l<h.rows;)u++,f=h.buffer.lines.get(--l),E=f==null?void 0:f.isWrapped;return u}function y(l,h){return l>h?"A":"B"}function S(l,h,u,f,E,R){let L=l,x=h,C="";for(;L!==u||x!==f;)L+=E?1:-1,E&&L>R.cols-1?(C+=R.buffer.translateBufferLineToString(x,!1,l,L),L=0,l=0,x++):!E&&L<0&&(C+=R.buffer.translateBufferLineToString(x,!1,0,l+1),L=R.cols-1,l=L,x--);return C+R.buffer.translateBufferLineToString(x,!1,l,L)}function A(l,h){const u=h?"O":"[";return d.C0.ESC+u+l}function b(l,h){l=Math.floor(l);let u="";for(let f=0;f<l;f++)u+=h;return u}o.moveToCellSequence=function(l,h,u,f){const E=u.buffer.x,R=u.buffer.y;if(!u.buffer.hasScrollback)return(function(C,B,z,I,F,Q){return p(B,I,F,Q).length===0?"":b(S(C,B,C,B-m(B,F),!1,F).length,A("D",Q))})(E,R,0,h,u,f)+p(R,h,u,f)+(function(C,B,z,I,F,Q){let ce;ce=p(B,I,F,Q).length>0?I-m(I,F):B;const ae=I,q=(function(J,he,k,U,O,j){let X;return X=p(k,U,O,j).length>0?U-m(U,O):he,J<k&&X<=U||J>=k&&X<U?"C":"D"})(C,B,z,I,F,Q);return b(S(C,ce,z,ae,q==="C",F).length,A(q,Q))})(E,R,l,h,u,f);let L;if(R===h)return L=E>l?"D":"C",b(Math.abs(E-l),A(L,f));L=R>h?"D":"C";const x=Math.abs(R-h);return b((function(C,B){return B.cols-C})(R>h?l:E,u)+(x-1)*u.cols+1+((R>h?E:l)-1),A(L,f))}},1296:function(M,o,_){var d=this&&this.__decorate||function(F,Q,ce,ae){var q,J=arguments.length,he=J<3?Q:ae===null?ae=Object.getOwnPropertyDescriptor(Q,ce):ae;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")he=Reflect.decorate(F,Q,ce,ae);else for(var k=F.length-1;k>=0;k--)(q=F[k])&&(he=(J<3?q(he):J>3?q(Q,ce,he):q(Q,ce))||he);return J>3&&he&&Object.defineProperty(Q,ce,he),he},p=this&&this.__param||function(F,Q){return function(ce,ae){Q(ce,ae,F)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const m=_(3787),y=_(2550),S=_(2223),A=_(6171),b=_(4725),l=_(8055),h=_(8460),u=_(844),f=_(2585),E="xterm-dom-renderer-owner-",R="xterm-rows",L="xterm-fg-",x="xterm-bg-",C="xterm-focus",B="xterm-selection";let z=1,I=o.DomRenderer=class extends u.Disposable{constructor(F,Q,ce,ae,q,J,he,k,U,O,j,X){super(),this._document=F,this._element=Q,this._screenElement=ce,this._viewportElement=ae,this._helperContainer=q,this._linkifier2=J,this._charSizeService=k,this._optionsService=U,this._bufferService=O,this._coreBrowserService=j,this._themeService=X,this._terminalClass=z++,this._rowElements=[],this.onRequestRedraw=this.register(new h.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(R),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(B),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,A.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((te=>this._injectCss(te)))),this._injectCss(this._themeService.colors),this._rowFactory=he.createInstance(m.DomRendererRowFactory,document),this._element.classList.add(E+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((te=>this._handleLinkHover(te)))),this.register(this._linkifier2.onHideLinkUnderline((te=>this._handleLinkLeave(te)))),this.register((0,u.toDisposable)((()=>{this._element.classList.remove(E+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new y.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const F=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*F,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*F),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/F),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/F),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const ce of this._rowElements)ce.style.width=`${this.dimensions.css.canvas.width}px`,ce.style.height=`${this.dimensions.css.cell.height}px`,ce.style.lineHeight=`${this.dimensions.css.cell.height}px`,ce.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Q=`${this._terminalSelector} .${R} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Q,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(F){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Q=`${this._terminalSelector} .${R} { color: ${F.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Q+=`${this._terminalSelector} .${R} .xterm-dim { color: ${l.color.multiplyOpacity(F.foreground,.5).css};}`,Q+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`,Q+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",Q+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${F.cursor.css}; color: ${F.cursorAccent.css}; } 50% { background-color: inherit; color: ${F.cursor.css}; }}`,Q+=`${this._terminalSelector} .${R}.${C} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${R}.${C} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-block { background-color: ${F.cursor.css} !important; color: ${F.cursorAccent.css} !important;}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${F.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${F.cursor.css} inset;}${this._terminalSelector} .${R} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${F.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Q+=`${this._terminalSelector} .${B} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${B} div { position: absolute; background-color: ${F.selectionBackgroundOpaque.css};}${this._terminalSelector} .${B} div { position: absolute; background-color: ${F.selectionInactiveBackgroundOpaque.css};}`;for(const[ce,ae]of F.ansi.entries())Q+=`${this._terminalSelector} .${L}${ce} { color: ${ae.css}; }${this._terminalSelector} .${L}${ce}.xterm-dim { color: ${l.color.multiplyOpacity(ae,.5).css}; }${this._terminalSelector} .${x}${ce} { background-color: ${ae.css}; }`;Q+=`${this._terminalSelector} .${L}${S.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(F.background).css}; }${this._terminalSelector} .${L}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${l.color.multiplyOpacity(l.color.opaque(F.background),.5).css}; }${this._terminalSelector} .${x}${S.INVERTED_DEFAULT_COLOR} { background-color: ${F.foreground.css}; }`,this._themeStyleElement.textContent=Q}_setDefaultSpacing(){const F=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${F}px`,this._rowFactory.defaultSpacing=F}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(F,Q){for(let ce=this._rowElements.length;ce<=Q;ce++){const ae=this._document.createElement("div");this._rowContainer.appendChild(ae),this._rowElements.push(ae)}for(;this._rowElements.length>Q;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(F,Q){this._refreshRowElements(F,Q),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(C),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(C),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(F,Q,ce){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(F,Q,ce),this.renderRows(0,this._bufferService.rows-1),!F||!Q)return;const ae=F[1]-this._bufferService.buffer.ydisp,q=Q[1]-this._bufferService.buffer.ydisp,J=Math.max(ae,0),he=Math.min(q,this._bufferService.rows-1);if(J>=this._bufferService.rows||he<0)return;const k=this._document.createDocumentFragment();if(ce){const U=F[0]>Q[0];k.appendChild(this._createSelectionElement(J,U?Q[0]:F[0],U?F[0]:Q[0],he-J+1))}else{const U=ae===J?F[0]:0,O=J===q?Q[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(J,U,O));const j=he-J-1;if(k.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,j)),J!==he){const X=q===he?Q[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(he,0,X))}}this._selectionContainer.appendChild(k)}_createSelectionElement(F,Q,ce,ae=1){const q=this._document.createElement("div");return q.style.height=ae*this.dimensions.css.cell.height+"px",q.style.top=F*this.dimensions.css.cell.height+"px",q.style.left=Q*this.dimensions.css.cell.width+"px",q.style.width=this.dimensions.css.cell.width*(ce-Q)+"px",q}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const F of this._rowElements)F.replaceChildren()}renderRows(F,Q){const ce=this._bufferService.buffer,ae=ce.ybase+ce.y,q=Math.min(ce.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,he=this._optionsService.rawOptions.cursorStyle,k=this._optionsService.rawOptions.cursorInactiveStyle;for(let U=F;U<=Q;U++){const O=U+ce.ydisp,j=this._rowElements[U],X=ce.lines.get(O);if(!j||!X)break;j.replaceChildren(...this._rowFactory.createRow(X,O,O===ae,he,k,q,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E}${this._terminalClass}`}_handleLinkHover(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!0)}_handleLinkLeave(F){this._setCellUnderline(F.x1,F.x2,F.y1,F.y2,F.cols,!1)}_setCellUnderline(F,Q,ce,ae,q,J){ce<0&&(F=0),ae<0&&(Q=0);const he=this._bufferService.rows-1;ce=Math.max(Math.min(ce,he),0),ae=Math.max(Math.min(ae,he),0),q=Math.min(q,this._bufferService.cols);const k=this._bufferService.buffer,U=k.ybase+k.y,O=Math.min(k.x,q-1),j=this._optionsService.rawOptions.cursorBlink,X=this._optionsService.rawOptions.cursorStyle,te=this._optionsService.rawOptions.cursorInactiveStyle;for(let ve=ce;ve<=ae;++ve){const Y=ve+k.ydisp,ie=this._rowElements[ve],P=k.lines.get(Y);if(!ie||!P)break;ie.replaceChildren(...this._rowFactory.createRow(P,Y,Y===U,X,te,O,j,this.dimensions.css.cell.width,this._widthCache,J?ve===ce?F:0:-1,J?(ve===ae?Q:q)-1:-1))}}};o.DomRenderer=I=d([p(6,f.IInstantiationService),p(7,b.ICharSizeService),p(8,f.IOptionsService),p(9,f.IBufferService),p(10,b.ICoreBrowserService),p(11,b.IThemeService)],I)},3787:function(M,o,_){var d=this&&this.__decorate||function(L,x,C,B){var z,I=arguments.length,F=I<3?x:B===null?B=Object.getOwnPropertyDescriptor(x,C):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(L,x,C,B);else for(var Q=L.length-1;Q>=0;Q--)(z=L[Q])&&(F=(I<3?z(F):I>3?z(x,C,F):z(x,C))||F);return I>3&&F&&Object.defineProperty(x,C,F),F},p=this&&this.__param||function(L,x){return function(C,B){x(C,B,L)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const m=_(2223),y=_(643),S=_(511),A=_(2585),b=_(8055),l=_(4725),h=_(4269),u=_(6171),f=_(3734);let E=o.DomRendererRowFactory=class{constructor(L,x,C,B,z,I,F){this._document=L,this._characterJoinerService=x,this._optionsService=C,this._coreBrowserService=B,this._coreService=z,this._decorationService=I,this._themeService=F,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(L,x,C){this._selectionStart=L,this._selectionEnd=x,this._columnSelectMode=C}createRow(L,x,C,B,z,I,F,Q,ce,ae,q){const J=[],he=this._characterJoinerService.getJoinedCharacters(x),k=this._themeService.colors;let U,O=L.getNoBgTrimmedLength();C&&O<I+1&&(O=I+1);let j=0,X="",te=0,ve=0,Y=0,ie=!1,P=0,le=!1,Se=0;const ue=[],Xe=ae!==-1&&q!==-1;for(let He=0;He<O;He++){L.loadCell(He,this._workCell);let ge=this._workCell.getWidth();if(ge===0)continue;let Ne=!1,mt=He,Be=this._workCell;if(he.length>0&&He===he[0][0]){Ne=!0;const ut=he.shift();Be=new h.JoinedCellData(this._workCell,L.translateToString(!0,ut[0],ut[1]),ut[1]-ut[0]),mt=ut[1]-1,ge=Be.getWidth()}const ti=this._isCellInSelection(He,x),bi=C&&He===I,lr=Xe&&He>=ae&&He<=q;let or=!1;this._decorationService.forEachDecorationAtCell(He,x,void 0,(ut=>{or=!0}));let kr=Be.getChars()||y.WHITESPACE_CELL_CHAR;if(kr===" "&&(Be.isUnderline()||Be.isOverline())&&(kr=" "),Se=ge*Q-ce.get(kr,Be.isBold(),Be.isItalic()),U){if(j&&(ti&&le||!ti&&!le&&Be.bg===te)&&(ti&&le&&k.selectionForeground||Be.fg===ve)&&Be.extended.ext===Y&&lr===ie&&Se===P&&!bi&&!Ne&&!or){Be.isInvisible()?X+=y.WHITESPACE_CELL_CHAR:X+=kr,j++;continue}j&&(U.textContent=X),U=this._document.createElement("span"),j=0,X=""}else U=this._document.createElement("span");if(te=Be.bg,ve=Be.fg,Y=Be.extended.ext,ie=lr,P=Se,le=ti,Ne&&I>=He&&I<=mt&&(I=He),!this._coreService.isCursorHidden&&bi&&this._coreService.isCursorInitialized){if(ue.push("xterm-cursor"),this._coreBrowserService.isFocused)F&&ue.push("xterm-cursor-blink"),ue.push(B==="bar"?"xterm-cursor-bar":B==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(z)switch(z){case"outline":ue.push("xterm-cursor-outline");break;case"block":ue.push("xterm-cursor-block");break;case"bar":ue.push("xterm-cursor-bar");break;case"underline":ue.push("xterm-cursor-underline")}}if(Be.isBold()&&ue.push("xterm-bold"),Be.isItalic()&&ue.push("xterm-italic"),Be.isDim()&&ue.push("xterm-dim"),X=Be.isInvisible()?y.WHITESPACE_CELL_CHAR:Be.getChars()||y.WHITESPACE_CELL_CHAR,Be.isUnderline()&&(ue.push(`xterm-underline-${Be.extended.underlineStyle}`),X===" "&&(X=" "),!Be.isUnderlineColorDefault()))if(Be.isUnderlineColorRGB())U.style.textDecorationColor=`rgb(${f.AttributeData.toColorRGB(Be.getUnderlineColor()).join(",")})`;else{let ut=Be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Be.isBold()&&ut<8&&(ut+=8),U.style.textDecorationColor=k.ansi[ut].css}Be.isOverline()&&(ue.push("xterm-overline"),X===" "&&(X=" ")),Be.isStrikethrough()&&ue.push("xterm-strikethrough"),lr&&(U.style.textDecoration="underline");let St=Be.getFgColor(),dt=Be.getFgColorMode(),Yt=Be.getBgColor(),Ci=Be.getBgColorMode();const It=!!Be.isInverse();if(It){const ut=St;St=Yt,Yt=ut;const jt=dt;dt=Ci,Ci=jt}let yt,cr,fi,Pi=!1;switch(this._decorationService.forEachDecorationAtCell(He,x,void 0,(ut=>{ut.options.layer!=="top"&&Pi||(ut.backgroundColorRGB&&(Ci=50331648,Yt=ut.backgroundColorRGB.rgba>>8&16777215,yt=ut.backgroundColorRGB),ut.foregroundColorRGB&&(dt=50331648,St=ut.foregroundColorRGB.rgba>>8&16777215,cr=ut.foregroundColorRGB),Pi=ut.options.layer==="top")})),!Pi&&ti&&(yt=this._coreBrowserService.isFocused?k.selectionBackgroundOpaque:k.selectionInactiveBackgroundOpaque,Yt=yt.rgba>>8&16777215,Ci=50331648,Pi=!0,k.selectionForeground&&(dt=50331648,St=k.selectionForeground.rgba>>8&16777215,cr=k.selectionForeground)),Pi&&ue.push("xterm-decoration-top"),Ci){case 16777216:case 33554432:fi=k.ansi[Yt],ue.push(`xterm-bg-${Yt}`);break;case 50331648:fi=b.rgba.toColor(Yt>>16,Yt>>8&255,255&Yt),this._addStyle(U,`background-color:#${R((Yt>>>0).toString(16),"0",6)}`);break;default:It?(fi=k.foreground,ue.push(`xterm-bg-${m.INVERTED_DEFAULT_COLOR}`)):fi=k.background}switch(yt||Be.isDim()&&(yt=b.color.multiplyOpacity(fi,.5)),dt){case 16777216:case 33554432:Be.isBold()&&St<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(St+=8),this._applyMinimumContrast(U,fi,k.ansi[St],Be,yt,void 0)||ue.push(`xterm-fg-${St}`);break;case 50331648:const ut=b.rgba.toColor(St>>16&255,St>>8&255,255&St);this._applyMinimumContrast(U,fi,ut,Be,yt,cr)||this._addStyle(U,`color:#${R(St.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(U,fi,k.foreground,Be,yt,cr)||It&&ue.push(`xterm-fg-${m.INVERTED_DEFAULT_COLOR}`)}ue.length&&(U.className=ue.join(" "),ue.length=0),bi||Ne||or?U.textContent=X:j++,Se!==this.defaultSpacing&&(U.style.letterSpacing=`${Se}px`),J.push(U),He=mt}return U&&j&&(U.textContent=X),J}_applyMinimumContrast(L,x,C,B,z,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,u.excludeFromContrastRatioDemands)(B.getCode()))return!1;const F=this._getContrastCache(B);let Q;if(z||I||(Q=F.getColor(x.rgba,C.rgba)),Q===void 0){const ce=this._optionsService.rawOptions.minimumContrastRatio/(B.isDim()?2:1);Q=b.color.ensureContrastRatio(z||x,I||C,ce),F.setColor((z||x).rgba,(I||C).rgba,Q??null)}return!!Q&&(this._addStyle(L,`color:${Q.css}`),!0)}_getContrastCache(L){return L.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(L,x){L.setAttribute("style",`${L.getAttribute("style")||""}${x};`)}_isCellInSelection(L,x){const C=this._selectionStart,B=this._selectionEnd;return!(!C||!B)&&(this._columnSelectMode?C[0]<=B[0]?L>=C[0]&&x>=C[1]&&L<B[0]&&x<=B[1]:L<C[0]&&x>=C[1]&&L>=B[0]&&x<=B[1]:x>C[1]&&x<B[1]||C[1]===B[1]&&x===C[1]&&L>=C[0]&&L<B[0]||C[1]<B[1]&&x===B[1]&&L<B[0]||C[1]<B[1]&&x===C[1]&&L>=C[0])}};function R(L,x,C){for(;L.length<C;)L=x+L;return L}o.DomRendererRowFactory=E=d([p(1,l.ICharacterJoinerService),p(2,A.IOptionsService),p(3,l.ICoreBrowserService),p(4,A.ICoreService),p(5,A.IDecorationService),p(6,l.IThemeService)],E)},2550:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(_,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=_.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const p=_.createElement("span");p.classList.add("xterm-char-measure-element");const m=_.createElement("span");m.classList.add("xterm-char-measure-element"),m.style.fontWeight="bold";const y=_.createElement("span");y.classList.add("xterm-char-measure-element"),y.style.fontStyle="italic";const S=_.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[p,m,y,S],this._container.appendChild(p),this._container.appendChild(m),this._container.appendChild(y),this._container.appendChild(S),d.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(_,d,p,m){_===this._font&&d===this._fontSize&&p===this._weight&&m===this._weightBold||(this._font=_,this._fontSize=d,this._weight=p,this._weightBold=m,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${p}`,this._measureElements[1].style.fontWeight=`${m}`,this._measureElements[2].style.fontWeight=`${p}`,this._measureElements[3].style.fontWeight=`${m}`,this.clear())}get(_,d,p){let m=0;if(!d&&!p&&_.length===1&&(m=_.charCodeAt(0))<256)return this._flat[m]!==-9999?this._flat[m]:this._flat[m]=this._measure(_,0);let y=_;d&&(y+="B"),p&&(y+="I");let S=this._holey.get(y);if(S===void 0){let A=0;d&&(A|=1),p&&(A|=2),S=this._measure(_,A),this._holey.set(y,S)}return S}_measure(_,d){const p=this._measureElements[d];return p.textContent=_.repeat(32),p.offsetWidth/32}}},2223:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const d=_(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(M,o)=>{function _(d){return 57508<=d&&d<=57558}Object.defineProperty(o,"__esModule",{value:!0}),o.createRenderDimensions=o.excludeFromContrastRatioDemands=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},o.isPowerlineGlyph=_,o.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},o.excludeFromContrastRatioDemands=function(d){return _(d)||(function(p){return 9472<=p&&p<=9631})(d)},o.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}}},456:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(_){this._bufferService=_,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const _=this.selectionStart[0]+this.selectionStartLength;return _>this._bufferService.cols?_%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(_/this._bufferService.cols)-1]:[_%this._bufferService.cols,this.selectionStart[1]+Math.floor(_/this._bufferService.cols)]:[_,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const _=this.selectionStart[0]+this.selectionStartLength;return _>this._bufferService.cols?[_%this._bufferService.cols,this.selectionStart[1]+Math.floor(_/this._bufferService.cols)]:[Math.max(_,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const _=this.selectionStart,d=this.selectionEnd;return!(!_||!d)&&(_[1]>d[1]||_[1]===d[1]&&_[0]>d[0])}handleTrim(_){return this.selectionStart&&(this.selectionStart[1]-=_),this.selectionEnd&&(this.selectionEnd[1]-=_),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(M,o,_){var d=this&&this.__decorate||function(l,h,u,f){var E,R=arguments.length,L=R<3?h:f===null?f=Object.getOwnPropertyDescriptor(h,u):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(l,h,u,f);else for(var x=l.length-1;x>=0;x--)(E=l[x])&&(L=(R<3?E(L):R>3?E(h,u,L):E(h,u))||L);return R>3&&L&&Object.defineProperty(h,u,L),L},p=this&&this.__param||function(l,h){return function(u,f){h(u,f,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const m=_(2585),y=_(8460),S=_(844);let A=o.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,h,u){super(),this._optionsService=u,this.width=0,this.height=0,this._onCharSizeChange=this.register(new y.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new b(l,h,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const l=this._measureStrategy.measure();l.width===this.width&&l.height===this.height||(this.width=l.width,this.height=l.height,this._onCharSizeChange.fire())}};o.CharSizeService=A=d([p(2,m.IOptionsService)],A);class b{constructor(h,u,f){this._document=h,this._parentElement=u,this._optionsService=f,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`;const h={height:Number(this._measureElement.offsetHeight),width:Number(this._measureElement.offsetWidth)};return h.width!==0&&h.height!==0&&(this._result.width=h.width/32,this._result.height=Math.ceil(h.height)),this._result}}},4269:function(M,o,_){var d=this&&this.__decorate||function(h,u,f,E){var R,L=arguments.length,x=L<3?u:E===null?E=Object.getOwnPropertyDescriptor(u,f):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(h,u,f,E);else for(var C=h.length-1;C>=0;C--)(R=h[C])&&(x=(L<3?R(x):L>3?R(u,f,x):R(u,f))||x);return L>3&&x&&Object.defineProperty(u,f,x),x},p=this&&this.__param||function(h,u){return function(f,E){u(f,E,h)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const m=_(3734),y=_(643),S=_(511),A=_(2585);class b extends m.AttributeData{constructor(u,f,E){super(),this.content=0,this.combinedData="",this.fg=u.fg,this.bg=u.bg,this.combinedData=f,this._width=E}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(u){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=b;let l=o.CharacterJoinerService=class qg{constructor(u){this._bufferService=u,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(u){const f={id:this._nextCharacterJoinerId++,handler:u};return this._characterJoiners.push(f),f.id}deregister(u){for(let f=0;f<this._characterJoiners.length;f++)if(this._characterJoiners[f].id===u)return this._characterJoiners.splice(f,1),!0;return!1}getJoinedCharacters(u){if(this._characterJoiners.length===0)return[];const f=this._bufferService.buffer.lines.get(u);if(!f||f.length===0)return[];const E=[],R=f.translateToString(!0);let L=0,x=0,C=0,B=f.getFg(0),z=f.getBg(0);for(let I=0;I<f.getTrimmedLength();I++)if(f.loadCell(I,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==B||this._workCell.bg!==z){if(I-L>1){const F=this._getJoinedRanges(R,C,x,f,L);for(let Q=0;Q<F.length;Q++)E.push(F[Q])}L=I,C=x,B=this._workCell.fg,z=this._workCell.bg}x+=this._workCell.getChars().length||y.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-L>1){const I=this._getJoinedRanges(R,C,x,f,L);for(let F=0;F<I.length;F++)E.push(I[F])}return E}_getJoinedRanges(u,f,E,R,L){const x=u.substring(f,E);let C=[];try{C=this._characterJoiners[0].handler(x)}catch(B){console.error(B)}for(let B=1;B<this._characterJoiners.length;B++)try{const z=this._characterJoiners[B].handler(x);for(let I=0;I<z.length;I++)qg._mergeRanges(C,z[I])}catch(z){console.error(z)}return this._stringRangesToCellRanges(C,R,L),C}_stringRangesToCellRanges(u,f,E){let R=0,L=!1,x=0,C=u[R];if(C){for(let B=E;B<this._bufferService.cols;B++){const z=f.getWidth(B),I=f.getString(B).length||y.WHITESPACE_CELL_CHAR.length;if(z!==0){if(!L&&C[0]<=x&&(C[0]=B,L=!0),C[1]<=x){if(C[1]=B,C=u[++R],!C)break;C[0]<=x?(C[0]=B,L=!0):L=!1}x+=I}}C&&(C[1]=this._bufferService.cols)}}static _mergeRanges(u,f){let E=!1;for(let R=0;R<u.length;R++){const L=u[R];if(E){if(f[1]<=L[0])return u[R-1][1]=f[1],u;if(f[1]<=L[1])return u[R-1][1]=Math.max(f[1],L[1]),u.splice(R,1),u;u.splice(R,1),R--}else{if(f[1]<=L[0])return u.splice(R,0,f),u;if(f[1]<=L[1])return L[0]=Math.min(f[0],L[0]),u;f[0]<L[1]&&(L[0]=Math.min(f[0],L[0]),E=!0)}}return E?u[u.length-1][1]=f[1]:u.push(f),u}};o.CharacterJoinerService=l=d([p(0,A.IBufferService)],l)},5114:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const d=_(844),p=_(8460),m=_(3656);class y extends d.Disposable{constructor(b,l,h){super(),this._textarea=b,this._window=l,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new p.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((u=>this._screenDprMonitor.setWindow(u)))),this.register((0,p.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(b){this._window!==b&&(this._window=b,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}o.CoreBrowserService=y;class S extends d.Disposable{constructor(b){super(),this._parentWindow=b,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new p.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(b){this._parentWindow=b,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,m.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var b;this._outerListener&&((b=this._resolutionMediaMatchList)==null||b.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},8934:function(M,o,_){var d=this&&this.__decorate||function(A,b,l,h){var u,f=arguments.length,E=f<3?b:h===null?h=Object.getOwnPropertyDescriptor(b,l):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(A,b,l,h);else for(var R=A.length-1;R>=0;R--)(u=A[R])&&(E=(f<3?u(E):f>3?u(b,l,E):u(b,l))||E);return f>3&&E&&Object.defineProperty(b,l,E),E},p=this&&this.__param||function(A,b){return function(l,h){b(l,h,A)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const m=_(4725),y=_(9806);let S=o.MouseService=class{constructor(A,b){this._renderService=A,this._charSizeService=b}getCoords(A,b,l,h,u){return(0,y.getCoords)(window,A,b,l,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,u)}getMouseReportCoords(A,b){const l=(0,y.getCoordsRelativeToElement)(window,A,b);if(this._charSizeService.hasValidSize)return l[0]=Math.min(Math.max(l[0],0),this._renderService.dimensions.css.canvas.width-1),l[1]=Math.min(Math.max(l[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(l[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(l[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(l[0]),y:Math.floor(l[1])}}};o.MouseService=S=d([p(0,m.IRenderService),p(1,m.ICharSizeService)],S)},3230:function(M,o,_){var d=this&&this.__decorate||function(u,f,E,R){var L,x=arguments.length,C=x<3?f:R===null?R=Object.getOwnPropertyDescriptor(f,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(u,f,E,R);else for(var B=u.length-1;B>=0;B--)(L=u[B])&&(C=(x<3?L(C):x>3?L(f,E,C):L(f,E))||C);return x>3&&C&&Object.defineProperty(f,E,C),C},p=this&&this.__param||function(u,f){return function(E,R){f(E,R,u)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const m=_(6193),y=_(4725),S=_(8460),A=_(844),b=_(7226),l=_(2585);let h=o.RenderService=class extends A.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(u,f,E,R,L,x,C,B,z){if(super(),this._rowCount=u,this._charSizeService=R,this._renderer=this.register(new A.MutableDisposable),this._pausedResizeTask=new b.DebouncedIdleTask,this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new m.RenderDebouncer(C.window,((I,F)=>this._renderRows(I,F))),this.register(this._renderDebouncer),this.register(C.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(x.onResize((()=>this._fullRefresh()))),this.register(x.buffers.onBufferActivate((()=>{var I;return(I=this._renderer.value)==null?void 0:I.clear()}))),this.register(E.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(L.onDecorationRegistered((()=>this._fullRefresh()))),this.register(L.onDecorationRemoved((()=>this._fullRefresh()))),this.register(E.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],(()=>{this.clear(),this.handleResize(x.cols,x.rows),this._fullRefresh()}))),this.register(E.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(x.buffer.y,x.buffer.y,!0)))),this.register(z.onChangeColors((()=>this._fullRefresh()))),"IntersectionObserver"in C.window){const I=new C.window.IntersectionObserver((F=>this._handleIntersectionChange(F[F.length-1])),{threshold:0});I.observe(f),this.register({dispose:()=>I.disconnect()})}}_handleIntersectionChange(u){this._isPaused=u.isIntersecting===void 0?u.intersectionRatio===0:!u.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(u,f,E=!1){this._isPaused?this._needsFullRefresh=!0:(E||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(u,f,this._rowCount))}_renderRows(u,f){this._renderer.value&&(u=Math.min(u,this._rowCount-1),f=Math.min(f,this._rowCount-1),this._renderer.value.renderRows(u,f),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:u,end:f}),this._onRender.fire({start:u,end:f}),this._isNextRenderRedrawOnly=!0)}resize(u,f){this._rowCount=f,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(u){this._renderer.value=u,this._renderer.value&&(this._renderer.value.onRequestRedraw((f=>this.refreshRows(f.start,f.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(u){return this._renderDebouncer.addRefreshCallback(u)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var u,f;this._renderer.value&&((f=(u=this._renderer.value).clearTextureAtlas)==null||f.call(u),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(u,f){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value.handleResize(u,f))):this._renderer.value.handleResize(u,f),this._fullRefresh())}handleCharSizeChanged(){var u;(u=this._renderer.value)==null||u.handleCharSizeChanged()}handleBlur(){var u;(u=this._renderer.value)==null||u.handleBlur()}handleFocus(){var u;(u=this._renderer.value)==null||u.handleFocus()}handleSelectionChanged(u,f,E){var R;this._selectionState.start=u,this._selectionState.end=f,this._selectionState.columnSelectMode=E,(R=this._renderer.value)==null||R.handleSelectionChanged(u,f,E)}handleCursorMove(){var u;(u=this._renderer.value)==null||u.handleCursorMove()}clear(){var u;(u=this._renderer.value)==null||u.clear()}};o.RenderService=h=d([p(2,l.IOptionsService),p(3,y.ICharSizeService),p(4,l.IDecorationService),p(5,l.IBufferService),p(6,y.ICoreBrowserService),p(7,l.IInstantiationService),p(8,y.IThemeService)],h)},9312:function(M,o,_){var d=this&&this.__decorate||function(C,B,z,I){var F,Q=arguments.length,ce=Q<3?B:I===null?I=Object.getOwnPropertyDescriptor(B,z):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ce=Reflect.decorate(C,B,z,I);else for(var ae=C.length-1;ae>=0;ae--)(F=C[ae])&&(ce=(Q<3?F(ce):Q>3?F(B,z,ce):F(B,z))||ce);return Q>3&&ce&&Object.defineProperty(B,z,ce),ce},p=this&&this.__param||function(C,B){return function(z,I){B(z,I,C)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const m=_(9806),y=_(9504),S=_(456),A=_(4725),b=_(8460),l=_(844),h=_(6114),u=_(4841),f=_(511),E=_(2585),R=" ",L=new RegExp(R,"g");let x=o.SelectionService=class extends l.Disposable{constructor(C,B,z,I,F,Q,ce,ae,q){super(),this._element=C,this._screenElement=B,this._linkifier=z,this._bufferService=I,this._coreService=F,this._mouseService=Q,this._optionsService=ce,this._renderService=ae,this._coreBrowserService=q,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new f.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new b.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new b.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new b.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),this.enable(),this._model=new S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,l.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const C=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!C||!B||C[0]===B[0]&&C[1]===B[1])}get selectionText(){const C=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;if(!C||!B)return"";const z=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(C[0]===B[0])return"";const F=C[0]<B[0]?C[0]:B[0],Q=C[0]<B[0]?B[0]:C[0];for(let ce=C[1];ce<=B[1];ce++){const ae=z.translateBufferLineToString(ce,!0,F,Q);I.push(ae)}}else{const F=C[1]===B[1]?B[0]:void 0;I.push(z.translateBufferLineToString(C[1],!0,C[0],F));for(let Q=C[1]+1;Q<=B[1]-1;Q++){const ce=z.lines.get(Q),ae=z.translateBufferLineToString(Q,!0);ce!=null&&ce.isWrapped?I[I.length-1]+=ae:I.push(ae)}if(C[1]!==B[1]){const Q=z.lines.get(B[1]),ce=z.translateBufferLineToString(B[1],!0,0,B[0]);Q&&Q.isWrapped?I[I.length-1]+=ce:I.push(ce)}}return I.map((F=>F.replace(L," "))).join(h.isWindows?`\r
66
+ `:`
67
+ `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(C){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&C&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(C){const B=this._getMouseBufferCoords(C),z=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(z&&I&&B)&&this._areCoordsInSelection(B,z,I)}isCellInSelection(C,B){const z=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!z||!I)&&this._areCoordsInSelection([C,B],z,I)}_areCoordsInSelection(C,B,z){return C[1]>B[1]&&C[1]<z[1]||B[1]===z[1]&&C[1]===B[1]&&C[0]>=B[0]&&C[0]<z[0]||B[1]<z[1]&&C[1]===z[1]&&C[0]<z[0]||B[1]<z[1]&&C[1]===B[1]&&C[0]>=B[0]}_selectWordAtCursor(C,B){var F,Q;const z=(Q=(F=this._linkifier.currentLink)==null?void 0:F.link)==null?void 0:Q.range;if(z)return this._model.selectionStart=[z.start.x-1,z.start.y-1],this._model.selectionStartLength=(0,u.getRangeLength)(z,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(C);return!!I&&(this._selectWordAt(I,B),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(C,B){this._model.clearSelection(),C=Math.max(C,0),B=Math.min(B,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,C],this._model.selectionEnd=[this._bufferService.cols,B],this.refresh(),this._onSelectionChange.fire()}_handleTrim(C){this._model.handleTrim(C)&&this.refresh()}_getMouseBufferCoords(C){const B=this._mouseService.getCoords(C,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(B)return B[0]--,B[1]--,B[1]+=this._bufferService.buffer.ydisp,B}_getMouseEventScrollAmount(C){let B=(0,m.getCoordsRelativeToElement)(this._coreBrowserService.window,C,this._screenElement)[1];const z=this._renderService.dimensions.css.canvas.height;return B>=0&&B<=z?0:(B>z&&(B-=z),B=Math.min(Math.max(B,-50),50),B/=50,B/Math.abs(B)+Math.round(14*B))}shouldForceSelection(C){return h.isMac?C.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:C.shiftKey}handleMouseDown(C){if(this._mouseDownTimeStamp=C.timeStamp,(C.button!==2||!this.hasSelection)&&C.button===0){if(!this._enabled){if(!this.shouldForceSelection(C))return;C.stopPropagation()}C.preventDefault(),this._dragScrollAmount=0,this._enabled&&C.shiftKey?this._handleIncrementalClick(C):C.detail===1?this._handleSingleClick(C):C.detail===2?this._handleDoubleClick(C):C.detail===3&&this._handleTripleClick(C),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(C){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(C))}_handleSingleClick(C){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(C)?3:0,this._model.selectionStart=this._getMouseBufferCoords(C),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const B=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);B&&B.length!==this._model.selectionStart[0]&&B.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(C){this._selectWordAtCursor(C,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(C){const B=this._getMouseBufferCoords(C);B&&(this._activeSelectionMode=2,this._selectLineAt(B[1]))}shouldColumnSelect(C){return C.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(C){if(C.stopImmediatePropagation(),!this._model.selectionStart)return;const B=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(C),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(C),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const z=this._bufferService.buffer;if(this._model.selectionEnd[1]<z.lines.length){const I=z.lines.get(this._model.selectionEnd[1]);I&&I.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}B&&B[0]===this._model.selectionEnd[0]&&B[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const C=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(C.ydisp+this._bufferService.rows,C.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=C.ydisp),this.refresh()}}_handleMouseUp(C){const B=C.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&B<500&&C.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const z=this._mouseService.getCoords(C,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(z&&z[0]!==void 0&&z[1]!==void 0){const I=(0,y.moveToCellSequence)(z[0]-1,z[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const C=this._model.finalSelectionStart,B=this._model.finalSelectionEnd,z=!(!C||!B||C[0]===B[0]&&C[1]===B[1]);z?C&&B&&(this._oldSelectionStart&&this._oldSelectionEnd&&C[0]===this._oldSelectionStart[0]&&C[1]===this._oldSelectionStart[1]&&B[0]===this._oldSelectionEnd[0]&&B[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(C,B,z)):this._oldHasSelection&&this._fireOnSelectionChange(C,B,z)}_fireOnSelectionChange(C,B,z){this._oldSelectionStart=C,this._oldSelectionEnd=B,this._oldHasSelection=z,this._onSelectionChange.fire()}_handleBufferActivate(C){this.clearSelection(),this._trimListener.dispose(),this._trimListener=C.activeBuffer.lines.onTrim((B=>this._handleTrim(B)))}_convertViewportColToCharacterIndex(C,B){let z=B;for(let I=0;B>=I;I++){const F=C.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?z--:F>1&&B!==I&&(z+=F-1)}return z}setSelection(C,B,z){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[C,B],this._model.selectionStartLength=z,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(C){this._isClickInSelection(C)||(this._selectWordAtCursor(C,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(C,B,z=!0,I=!0){if(C[0]>=this._bufferService.cols)return;const F=this._bufferService.buffer,Q=F.lines.get(C[1]);if(!Q)return;const ce=F.translateBufferLineToString(C[1],!1);let ae=this._convertViewportColToCharacterIndex(Q,C[0]),q=ae;const J=C[0]-ae;let he=0,k=0,U=0,O=0;if(ce.charAt(ae)===" "){for(;ae>0&&ce.charAt(ae-1)===" ";)ae--;for(;q<ce.length&&ce.charAt(q+1)===" ";)q++}else{let te=C[0],ve=C[0];Q.getWidth(te)===0&&(he++,te--),Q.getWidth(ve)===2&&(k++,ve++);const Y=Q.getString(ve).length;for(Y>1&&(O+=Y-1,q+=Y-1);te>0&&ae>0&&!this._isCharWordSeparator(Q.loadCell(te-1,this._workCell));){Q.loadCell(te-1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===0?(he++,te--):ie>1&&(U+=ie-1,ae-=ie-1),ae--,te--}for(;ve<Q.length&&q+1<ce.length&&!this._isCharWordSeparator(Q.loadCell(ve+1,this._workCell));){Q.loadCell(ve+1,this._workCell);const ie=this._workCell.getChars().length;this._workCell.getWidth()===2?(k++,ve++):ie>1&&(O+=ie-1,q+=ie-1),q++,ve++}}q++;let j=ae+J-he+U,X=Math.min(this._bufferService.cols,q-ae+he+k-U-O);if(B||ce.slice(ae,q).trim()!==""){if(z&&j===0&&Q.getCodePoint(0)!==32){const te=F.lines.get(C[1]-1);if(te&&Q.isWrapped&&te.getCodePoint(this._bufferService.cols-1)!==32){const ve=this._getWordAt([this._bufferService.cols-1,C[1]-1],!1,!0,!1);if(ve){const Y=this._bufferService.cols-ve.start;j-=Y,X+=Y}}}if(I&&j+X===this._bufferService.cols&&Q.getCodePoint(this._bufferService.cols-1)!==32){const te=F.lines.get(C[1]+1);if(te!=null&&te.isWrapped&&te.getCodePoint(0)!==32){const ve=this._getWordAt([0,C[1]+1],!1,!1,!0);ve&&(X+=ve.length)}}return{start:j,length:X}}}_selectWordAt(C,B){const z=this._getWordAt(C,B);if(z){for(;z.start<0;)z.start+=this._bufferService.cols,C[1]--;this._model.selectionStart=[z.start,C[1]],this._model.selectionStartLength=z.length}}_selectToWordAt(C){const B=this._getWordAt(C,!0);if(B){let z=C[1];for(;B.start<0;)B.start+=this._bufferService.cols,z--;if(!this._model.areSelectionValuesReversed())for(;B.start+B.length>this._bufferService.cols;)B.length-=this._bufferService.cols,z++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?B.start:B.start+B.length,z]}}_isCharWordSeparator(C){return C.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(C.getChars())>=0}_selectLineAt(C){const B=this._bufferService.buffer.getWrappedRangeForLine(C),z={start:{x:0,y:B.first},end:{x:this._bufferService.cols-1,y:B.last}};this._model.selectionStart=[0,B.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,u.getRangeLength)(z,this._bufferService.cols)}};o.SelectionService=x=d([p(3,E.IBufferService),p(4,E.ICoreService),p(5,A.IMouseService),p(6,E.IOptionsService),p(7,A.IRenderService),p(8,A.ICoreBrowserService)],x)},4725:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const d=_(8343);o.ICharSizeService=(0,d.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),o.IMouseService=(0,d.createDecorator)("MouseService"),o.IRenderService=(0,d.createDecorator)("RenderService"),o.ISelectionService=(0,d.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,d.createDecorator)("ThemeService")},6731:function(M,o,_){var d=this&&this.__decorate||function(x,C,B,z){var I,F=arguments.length,Q=F<3?C:z===null?z=Object.getOwnPropertyDescriptor(C,B):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(x,C,B,z);else for(var ce=x.length-1;ce>=0;ce--)(I=x[ce])&&(Q=(F<3?I(Q):F>3?I(C,B,Q):I(C,B))||Q);return F>3&&Q&&Object.defineProperty(C,B,Q),Q},p=this&&this.__param||function(x,C){return function(B,z){C(B,z,x)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const m=_(7239),y=_(8055),S=_(8460),A=_(844),b=_(2585),l=y.css.toColor("#ffffff"),h=y.css.toColor("#000000"),u=y.css.toColor("#ffffff"),f=y.css.toColor("#000000"),E={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const x=[y.css.toColor("#2e3436"),y.css.toColor("#cc0000"),y.css.toColor("#4e9a06"),y.css.toColor("#c4a000"),y.css.toColor("#3465a4"),y.css.toColor("#75507b"),y.css.toColor("#06989a"),y.css.toColor("#d3d7cf"),y.css.toColor("#555753"),y.css.toColor("#ef2929"),y.css.toColor("#8ae234"),y.css.toColor("#fce94f"),y.css.toColor("#729fcf"),y.css.toColor("#ad7fa8"),y.css.toColor("#34e2e2"),y.css.toColor("#eeeeec")],C=[0,95,135,175,215,255];for(let B=0;B<216;B++){const z=C[B/36%6|0],I=C[B/6%6|0],F=C[B%6];x.push({css:y.channels.toCss(z,I,F),rgba:y.channels.toRgba(z,I,F)})}for(let B=0;B<24;B++){const z=8+10*B;x.push({css:y.channels.toCss(z,z,z),rgba:y.channels.toRgba(z,z,z)})}return x})());let R=o.ThemeService=class extends A.Disposable{get colors(){return this._colors}constructor(x){super(),this._optionsService=x,this._contrastCache=new m.ColorContrastCache,this._halfContrastCache=new m.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:l,background:h,cursor:u,cursorAccent:f,selectionForeground:void 0,selectionBackgroundTransparent:E,selectionBackgroundOpaque:y.color.blend(h,E),selectionInactiveBackgroundTransparent:E,selectionInactiveBackgroundOpaque:y.color.blend(h,E),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(x={}){const C=this._colors;if(C.foreground=L(x.foreground,l),C.background=L(x.background,h),C.cursor=L(x.cursor,u),C.cursorAccent=L(x.cursorAccent,f),C.selectionBackgroundTransparent=L(x.selectionBackground,E),C.selectionBackgroundOpaque=y.color.blend(C.background,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundTransparent=L(x.selectionInactiveBackground,C.selectionBackgroundTransparent),C.selectionInactiveBackgroundOpaque=y.color.blend(C.background,C.selectionInactiveBackgroundTransparent),C.selectionForeground=x.selectionForeground?L(x.selectionForeground,y.NULL_COLOR):void 0,C.selectionForeground===y.NULL_COLOR&&(C.selectionForeground=void 0),y.color.isOpaque(C.selectionBackgroundTransparent)&&(C.selectionBackgroundTransparent=y.color.opacity(C.selectionBackgroundTransparent,.3)),y.color.isOpaque(C.selectionInactiveBackgroundTransparent)&&(C.selectionInactiveBackgroundTransparent=y.color.opacity(C.selectionInactiveBackgroundTransparent,.3)),C.ansi=o.DEFAULT_ANSI_COLORS.slice(),C.ansi[0]=L(x.black,o.DEFAULT_ANSI_COLORS[0]),C.ansi[1]=L(x.red,o.DEFAULT_ANSI_COLORS[1]),C.ansi[2]=L(x.green,o.DEFAULT_ANSI_COLORS[2]),C.ansi[3]=L(x.yellow,o.DEFAULT_ANSI_COLORS[3]),C.ansi[4]=L(x.blue,o.DEFAULT_ANSI_COLORS[4]),C.ansi[5]=L(x.magenta,o.DEFAULT_ANSI_COLORS[5]),C.ansi[6]=L(x.cyan,o.DEFAULT_ANSI_COLORS[6]),C.ansi[7]=L(x.white,o.DEFAULT_ANSI_COLORS[7]),C.ansi[8]=L(x.brightBlack,o.DEFAULT_ANSI_COLORS[8]),C.ansi[9]=L(x.brightRed,o.DEFAULT_ANSI_COLORS[9]),C.ansi[10]=L(x.brightGreen,o.DEFAULT_ANSI_COLORS[10]),C.ansi[11]=L(x.brightYellow,o.DEFAULT_ANSI_COLORS[11]),C.ansi[12]=L(x.brightBlue,o.DEFAULT_ANSI_COLORS[12]),C.ansi[13]=L(x.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),C.ansi[14]=L(x.brightCyan,o.DEFAULT_ANSI_COLORS[14]),C.ansi[15]=L(x.brightWhite,o.DEFAULT_ANSI_COLORS[15]),x.extendedAnsi){const B=Math.min(C.ansi.length-16,x.extendedAnsi.length);for(let z=0;z<B;z++)C.ansi[z+16]=L(x.extendedAnsi[z],o.DEFAULT_ANSI_COLORS[z+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(x){this._restoreColor(x),this._onChangeColors.fire(this.colors)}_restoreColor(x){if(x!==void 0)switch(x){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[x]=this._restoreColors.ansi[x]}else for(let C=0;C<this._restoreColors.ansi.length;++C)this._colors.ansi[C]=this._restoreColors.ansi[C]}modifyColors(x){x(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function L(x,C){if(x!==void 0)try{return y.css.toColor(x)}catch{}return C}o.ThemeService=R=d([p(0,b.IOptionsService)],R)},6349:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const d=_(8460),p=_(844);class m extends p.Disposable{constructor(S){super(),this._maxLength=S,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(S){if(this._maxLength===S)return;const A=new Array(S);for(let b=0;b<Math.min(S,this.length);b++)A[b]=this._array[this._getCyclicIndex(b)];this._array=A,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let A=this._length;A<S;A++)this._array[A]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,A){this._array[this._getCyclicIndex(S)]=A}push(S){this._array[this._getCyclicIndex(this._length)]=S,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(S,A,...b){if(A){for(let l=S;l<this._length-A;l++)this._array[this._getCyclicIndex(l)]=this._array[this._getCyclicIndex(l+A)];this._length-=A,this.onDeleteEmitter.fire({index:S,amount:A})}for(let l=this._length-1;l>=S;l--)this._array[this._getCyclicIndex(l+b.length)]=this._array[this._getCyclicIndex(l)];for(let l=0;l<b.length;l++)this._array[this._getCyclicIndex(S+l)]=b[l];if(b.length&&this.onInsertEmitter.fire({index:S,amount:b.length}),this._length+b.length>this._maxLength){const l=this._length+b.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=b.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,A,b){if(!(A<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+b<0)throw new Error("Cannot shift elements in list beyond index 0");if(b>0){for(let h=A-1;h>=0;h--)this.set(S+h+b,this.get(S+h));const l=S+A+b-this._length;if(l>0)for(this._length+=l;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let l=0;l<A;l++)this.set(S+l+b,this.get(S+l))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}o.CircularList=m},1439:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function _(d,p=5){if(typeof d!="object")return d;const m=Array.isArray(d)?[]:{};for(const y in d)m[y]=p<=1?d[y]:d[y]&&_(d[y],p-1);return m}},8055:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;const d=_(6114);let p=0,m=0,y=0,S=0;var A,b,l,h,u;function f(R){const L=R.toString(16);return L.length<2?"0"+L:L}function E(R,L){return R<L?(L+.05)/(R+.05):(R+.05)/(L+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},(function(R){R.toCss=function(L,x,C,B){return B!==void 0?`#${f(L)}${f(x)}${f(C)}${f(B)}`:`#${f(L)}${f(x)}${f(C)}`},R.toRgba=function(L,x,C,B=255){return(L<<24|x<<16|C<<8|B)>>>0}})(A||(o.channels=A={})),(function(R){function L(x,C){return S=Math.round(255*C),[p,m,y]=u.toChannels(x.rgba),{css:A.toCss(p,m,y,S),rgba:A.toRgba(p,m,y,S)}}R.blend=function(x,C){if(S=(255&C.rgba)/255,S===1)return{css:C.css,rgba:C.rgba};const B=C.rgba>>24&255,z=C.rgba>>16&255,I=C.rgba>>8&255,F=x.rgba>>24&255,Q=x.rgba>>16&255,ce=x.rgba>>8&255;return p=F+Math.round((B-F)*S),m=Q+Math.round((z-Q)*S),y=ce+Math.round((I-ce)*S),{css:A.toCss(p,m,y),rgba:A.toRgba(p,m,y)}},R.isOpaque=function(x){return(255&x.rgba)==255},R.ensureContrastRatio=function(x,C,B){const z=u.ensureContrastRatio(x.rgba,C.rgba,B);if(z)return u.toColor(z>>24&255,z>>16&255,z>>8&255)},R.opaque=function(x){const C=(255|x.rgba)>>>0;return[p,m,y]=u.toChannels(C),{css:A.toCss(p,m,y),rgba:C}},R.opacity=L,R.multiplyOpacity=function(x,C){return S=255&x.rgba,L(x,S*C/255)},R.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(b||(o.color=b={})),(function(R){let L,x;if(!d.isNode){const C=document.createElement("canvas");C.width=1,C.height=1;const B=C.getContext("2d",{willReadFrequently:!0});B&&(L=B,L.globalCompositeOperation="copy",x=L.createLinearGradient(0,0,1,1))}R.toColor=function(C){if(C.match(/#[\da-f]{3,8}/i))switch(C.length){case 4:return p=parseInt(C.slice(1,2).repeat(2),16),m=parseInt(C.slice(2,3).repeat(2),16),y=parseInt(C.slice(3,4).repeat(2),16),u.toColor(p,m,y);case 5:return p=parseInt(C.slice(1,2).repeat(2),16),m=parseInt(C.slice(2,3).repeat(2),16),y=parseInt(C.slice(3,4).repeat(2),16),S=parseInt(C.slice(4,5).repeat(2),16),u.toColor(p,m,y,S);case 7:return{css:C,rgba:(parseInt(C.slice(1),16)<<8|255)>>>0};case 9:return{css:C,rgba:parseInt(C.slice(1),16)>>>0}}const B=C.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(B)return p=parseInt(B[1]),m=parseInt(B[2]),y=parseInt(B[3]),S=Math.round(255*(B[5]===void 0?1:parseFloat(B[5]))),u.toColor(p,m,y,S);if(!L||!x)throw new Error("css.toColor: Unsupported css format");if(L.fillStyle=x,L.fillStyle=C,typeof L.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(L.fillRect(0,0,1,1),[p,m,y,S]=L.getImageData(0,0,1,1).data,S!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:A.toRgba(p,m,y,S),css:C}}})(l||(o.css=l={})),(function(R){function L(x,C,B){const z=x/255,I=C/255,F=B/255;return .2126*(z<=.03928?z/12.92:Math.pow((z+.055)/1.055,2.4))+.7152*(I<=.03928?I/12.92:Math.pow((I+.055)/1.055,2.4))+.0722*(F<=.03928?F/12.92:Math.pow((F+.055)/1.055,2.4))}R.relativeLuminance=function(x){return L(x>>16&255,x>>8&255,255&x)},R.relativeLuminance2=L})(h||(o.rgb=h={})),(function(R){function L(C,B,z){const I=C>>24&255,F=C>>16&255,Q=C>>8&255;let ce=B>>24&255,ae=B>>16&255,q=B>>8&255,J=E(h.relativeLuminance2(ce,ae,q),h.relativeLuminance2(I,F,Q));for(;J<z&&(ce>0||ae>0||q>0);)ce-=Math.max(0,Math.ceil(.1*ce)),ae-=Math.max(0,Math.ceil(.1*ae)),q-=Math.max(0,Math.ceil(.1*q)),J=E(h.relativeLuminance2(ce,ae,q),h.relativeLuminance2(I,F,Q));return(ce<<24|ae<<16|q<<8|255)>>>0}function x(C,B,z){const I=C>>24&255,F=C>>16&255,Q=C>>8&255;let ce=B>>24&255,ae=B>>16&255,q=B>>8&255,J=E(h.relativeLuminance2(ce,ae,q),h.relativeLuminance2(I,F,Q));for(;J<z&&(ce<255||ae<255||q<255);)ce=Math.min(255,ce+Math.ceil(.1*(255-ce))),ae=Math.min(255,ae+Math.ceil(.1*(255-ae))),q=Math.min(255,q+Math.ceil(.1*(255-q))),J=E(h.relativeLuminance2(ce,ae,q),h.relativeLuminance2(I,F,Q));return(ce<<24|ae<<16|q<<8|255)>>>0}R.ensureContrastRatio=function(C,B,z){const I=h.relativeLuminance(C>>8),F=h.relativeLuminance(B>>8);if(E(I,F)<z){if(F<I){const ae=L(C,B,z),q=E(I,h.relativeLuminance(ae>>8));if(q<z){const J=x(C,B,z);return q>E(I,h.relativeLuminance(J>>8))?ae:J}return ae}const Q=x(C,B,z),ce=E(I,h.relativeLuminance(Q>>8));if(ce<z){const ae=L(C,B,z);return ce>E(I,h.relativeLuminance(ae>>8))?Q:ae}return Q}},R.reduceLuminance=L,R.increaseLuminance=x,R.toChannels=function(C){return[C>>24&255,C>>16&255,C>>8&255,255&C]},R.toColor=function(C,B,z,I){return{css:A.toCss(C,B,z,I),rgba:A.toRgba(C,B,z,I)}}})(u||(o.rgba=u={})),o.toPaddedHex=f,o.contrastRatio=E},8969:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const d=_(844),p=_(2585),m=_(4348),y=_(7866),S=_(744),A=_(7302),b=_(6975),l=_(8460),h=_(1753),u=_(1480),f=_(7994),E=_(9282),R=_(5435),L=_(5981),x=_(2660);let C=!1;class B extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new l.EventEmitter),this._onScroll.event((I=>{var F;(F=this._onScrollApi)==null||F.fire(I.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(I){for(const F in I)this.optionsService.options[F]=I[F]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new l.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new l.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new l.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new l.EventEmitter),this._instantiationService=new m.InstantiationService,this.optionsService=this.register(new A.OptionsService(I)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(y.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(b.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(u.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(f.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(x.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new R.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,l.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,l.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,l.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,l.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((F=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((F=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new L.WriteBuffer(((F,Q)=>this._inputHandler.parse(F,Q)))),this.register((0,l.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,F){this._writeBuffer.write(I,F)}writeSync(I,F){this._logService.logLevel<=p.LogLevelEnum.WARN&&!C&&(this._logService.warn("writeSync is unreliable and will be removed soon."),C=!0),this._writeBuffer.writeSync(I,F)}resize(I,F){isNaN(I)||isNaN(F)||(I=Math.max(I,S.MINIMUM_COLS),F=Math.max(F,S.MINIMUM_ROWS),this._bufferService.resize(I,F))}scroll(I,F=!1){this._bufferService.scroll(I,F)}scrollLines(I,F,Q){this._bufferService.scrollLines(I,F,Q)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const F=I-this._bufferService.buffer.ydisp;F!==0&&this.scrollLines(F)}registerEscHandler(I,F){return this._inputHandler.registerEscHandler(I,F)}registerDcsHandler(I,F){return this._inputHandler.registerDcsHandler(I,F)}registerCsiHandler(I,F){return this._inputHandler.registerCsiHandler(I,F)}registerOscHandler(I,F){return this._inputHandler.registerOscHandler(I,F)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const F=this.optionsService.rawOptions.windowsPty;F&&F.buildNumber!==void 0&&F.buildNumber!==void 0?I=F.backend==="conpty"&&F.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,E.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const F of I)F.dispose()}))}}}o.CoreTerminal=B},8460:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=_=>(this._listeners.push(_),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===_)return void this._listeners.splice(d,1)}}})),this._event}fire(_,d){const p=[];for(let m=0;m<this._listeners.length;m++)p.push(this._listeners[m]);for(let m=0;m<p.length;m++)p[m].call(void 0,_,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(_,d){return _((p=>d.fire(p)))},o.runAndSubscribe=function(_,d){return d(void 0),_((p=>d(p)))}},5435:function(M,o,_){var d=this&&this.__decorate||function(he,k,U,O){var j,X=arguments.length,te=X<3?k:O===null?O=Object.getOwnPropertyDescriptor(k,U):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")te=Reflect.decorate(he,k,U,O);else for(var ve=he.length-1;ve>=0;ve--)(j=he[ve])&&(te=(X<3?j(te):X>3?j(k,U,te):j(k,U))||te);return X>3&&te&&Object.defineProperty(k,U,te),te},p=this&&this.__param||function(he,k){return function(U,O){k(U,O,he)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const m=_(2584),y=_(7116),S=_(2015),A=_(844),b=_(482),l=_(8437),h=_(8460),u=_(643),f=_(511),E=_(3734),R=_(2585),L=_(1480),x=_(6242),C=_(6351),B=_(5941),z={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function F(he,k){if(he>24)return k.setWinLines||!1;switch(he){case 1:return!!k.restoreWin;case 2:return!!k.minimizeWin;case 3:return!!k.setWinPosition;case 4:return!!k.setWinSizePixels;case 5:return!!k.raiseWin;case 6:return!!k.lowerWin;case 7:return!!k.refreshWin;case 8:return!!k.setWinSizeChars;case 9:return!!k.maximizeWin;case 10:return!!k.fullscreenWin;case 11:return!!k.getWinState;case 13:return!!k.getWinPosition;case 14:return!!k.getWinSizePixels;case 15:return!!k.getScreenSizePixels;case 16:return!!k.getCellSizePixels;case 18:return!!k.getWinSizeChars;case 19:return!!k.getScreenSizeChars;case 20:return!!k.getIconTitle;case 21:return!!k.getWinTitle;case 22:return!!k.pushTitle;case 23:return!!k.popTitle;case 24:return!!k.setWinLines}return!1}var Q;(function(he){he[he.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",he[he.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(Q||(o.WindowsOptionsReportType=Q={}));let ce=0;class ae extends A.Disposable{getAttrData(){return this._curAttrData}constructor(k,U,O,j,X,te,ve,Y,ie=new S.EscapeSequenceParser){super(),this._bufferService=k,this._charsetService=U,this._coreService=O,this._logService=j,this._optionsService=X,this._oscLinkService=te,this._coreMouseService=ve,this._unicodeService=Y,this._parser=ie,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new b.StringToUtf32,this._utf8Decoder=new b.Utf8ToUtf32,this._workCell=new f.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new q(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((P=>this._activeBuffer=P.activeBuffer))),this._parser.setCsiHandlerFallback(((P,le)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(P),params:le.toArray()})})),this._parser.setEscHandlerFallback((P=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(P)})})),this._parser.setExecuteHandlerFallback((P=>{this._logService.debug("Unknown EXECUTE code: ",{code:P})})),this._parser.setOscHandlerFallback(((P,le,Se)=>{this._logService.debug("Unknown OSC code: ",{identifier:P,action:le,data:Se})})),this._parser.setDcsHandlerFallback(((P,le,Se)=>{le==="HOOK"&&(Se=Se.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(P),action:le,payload:Se})})),this._parser.setPrintHandler(((P,le,Se)=>this.print(P,le,Se))),this._parser.registerCsiHandler({final:"@"},(P=>this.insertChars(P))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(P=>this.scrollLeft(P))),this._parser.registerCsiHandler({final:"A"},(P=>this.cursorUp(P))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(P=>this.scrollRight(P))),this._parser.registerCsiHandler({final:"B"},(P=>this.cursorDown(P))),this._parser.registerCsiHandler({final:"C"},(P=>this.cursorForward(P))),this._parser.registerCsiHandler({final:"D"},(P=>this.cursorBackward(P))),this._parser.registerCsiHandler({final:"E"},(P=>this.cursorNextLine(P))),this._parser.registerCsiHandler({final:"F"},(P=>this.cursorPrecedingLine(P))),this._parser.registerCsiHandler({final:"G"},(P=>this.cursorCharAbsolute(P))),this._parser.registerCsiHandler({final:"H"},(P=>this.cursorPosition(P))),this._parser.registerCsiHandler({final:"I"},(P=>this.cursorForwardTab(P))),this._parser.registerCsiHandler({final:"J"},(P=>this.eraseInDisplay(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(P=>this.eraseInDisplay(P,!0))),this._parser.registerCsiHandler({final:"K"},(P=>this.eraseInLine(P,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(P=>this.eraseInLine(P,!0))),this._parser.registerCsiHandler({final:"L"},(P=>this.insertLines(P))),this._parser.registerCsiHandler({final:"M"},(P=>this.deleteLines(P))),this._parser.registerCsiHandler({final:"P"},(P=>this.deleteChars(P))),this._parser.registerCsiHandler({final:"S"},(P=>this.scrollUp(P))),this._parser.registerCsiHandler({final:"T"},(P=>this.scrollDown(P))),this._parser.registerCsiHandler({final:"X"},(P=>this.eraseChars(P))),this._parser.registerCsiHandler({final:"Z"},(P=>this.cursorBackwardTab(P))),this._parser.registerCsiHandler({final:"`"},(P=>this.charPosAbsolute(P))),this._parser.registerCsiHandler({final:"a"},(P=>this.hPositionRelative(P))),this._parser.registerCsiHandler({final:"b"},(P=>this.repeatPrecedingCharacter(P))),this._parser.registerCsiHandler({final:"c"},(P=>this.sendDeviceAttributesPrimary(P))),this._parser.registerCsiHandler({prefix:">",final:"c"},(P=>this.sendDeviceAttributesSecondary(P))),this._parser.registerCsiHandler({final:"d"},(P=>this.linePosAbsolute(P))),this._parser.registerCsiHandler({final:"e"},(P=>this.vPositionRelative(P))),this._parser.registerCsiHandler({final:"f"},(P=>this.hVPosition(P))),this._parser.registerCsiHandler({final:"g"},(P=>this.tabClear(P))),this._parser.registerCsiHandler({final:"h"},(P=>this.setMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(P=>this.setModePrivate(P))),this._parser.registerCsiHandler({final:"l"},(P=>this.resetMode(P))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(P=>this.resetModePrivate(P))),this._parser.registerCsiHandler({final:"m"},(P=>this.charAttributes(P))),this._parser.registerCsiHandler({final:"n"},(P=>this.deviceStatus(P))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(P=>this.deviceStatusPrivate(P))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(P=>this.softReset(P))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(P=>this.setCursorStyle(P))),this._parser.registerCsiHandler({final:"r"},(P=>this.setScrollRegion(P))),this._parser.registerCsiHandler({final:"s"},(P=>this.saveCursor(P))),this._parser.registerCsiHandler({final:"t"},(P=>this.windowOptions(P))),this._parser.registerCsiHandler({final:"u"},(P=>this.restoreCursor(P))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(P=>this.insertColumns(P))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(P=>this.deleteColumns(P))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(P=>this.selectProtected(P))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(P=>this.requestMode(P,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(P=>this.requestMode(P,!1))),this._parser.setExecuteHandler(m.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(m.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(m.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(m.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(m.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(m.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(m.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(m.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(m.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(m.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(m.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(m.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new x.OscHandler((P=>(this.setTitle(P),this.setIconName(P),!0)))),this._parser.registerOscHandler(1,new x.OscHandler((P=>this.setIconName(P)))),this._parser.registerOscHandler(2,new x.OscHandler((P=>this.setTitle(P)))),this._parser.registerOscHandler(4,new x.OscHandler((P=>this.setOrReportIndexedColor(P)))),this._parser.registerOscHandler(8,new x.OscHandler((P=>this.setHyperlink(P)))),this._parser.registerOscHandler(10,new x.OscHandler((P=>this.setOrReportFgColor(P)))),this._parser.registerOscHandler(11,new x.OscHandler((P=>this.setOrReportBgColor(P)))),this._parser.registerOscHandler(12,new x.OscHandler((P=>this.setOrReportCursorColor(P)))),this._parser.registerOscHandler(104,new x.OscHandler((P=>this.restoreIndexedColor(P)))),this._parser.registerOscHandler(110,new x.OscHandler((P=>this.restoreFgColor(P)))),this._parser.registerOscHandler(111,new x.OscHandler((P=>this.restoreBgColor(P)))),this._parser.registerOscHandler(112,new x.OscHandler((P=>this.restoreCursorColor(P)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const P in y.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:P},(()=>this.selectCharset("("+P))),this._parser.registerEscHandler({intermediates:")",final:P},(()=>this.selectCharset(")"+P))),this._parser.registerEscHandler({intermediates:"*",final:P},(()=>this.selectCharset("*"+P))),this._parser.registerEscHandler({intermediates:"+",final:P},(()=>this.selectCharset("+"+P))),this._parser.registerEscHandler({intermediates:"-",final:P},(()=>this.selectCharset("-"+P))),this._parser.registerEscHandler({intermediates:".",final:P},(()=>this.selectCharset("."+P))),this._parser.registerEscHandler({intermediates:"/",final:P},(()=>this.selectCharset("/"+P)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((P=>(this._logService.error("Parsing error: ",P),P))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new C.DcsHandler(((P,le)=>this.requestStatusString(P,le))))}_preserveStack(k,U,O,j){this._parseStack.paused=!0,this._parseStack.cursorStartX=k,this._parseStack.cursorStartY=U,this._parseStack.decodedLength=O,this._parseStack.position=j}_logSlowResolvingAsync(k){this._logService.logLevel<=R.LogLevelEnum.WARN&&Promise.race([k,new Promise(((U,O)=>setTimeout((()=>O("#SLOW_TIMEOUT")),5e3)))]).catch((U=>{if(U!=="#SLOW_TIMEOUT")throw U;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(k,U){let O,j=this._activeBuffer.x,X=this._activeBuffer.y,te=0;const ve=this._parseStack.paused;if(ve){if(O=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,U))return this._logSlowResolvingAsync(O),O;j=this._parseStack.cursorStartX,X=this._parseStack.cursorStartY,this._parseStack.paused=!1,k.length>I&&(te=this._parseStack.position+I)}if(this._logService.logLevel<=R.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof k=="string"?` "${k}"`:` "${Array.prototype.map.call(k,(P=>String.fromCharCode(P))).join("")}"`),typeof k=="string"?k.split("").map((P=>P.charCodeAt(0))):k),this._parseBuffer.length<k.length&&this._parseBuffer.length<I&&(this._parseBuffer=new Uint32Array(Math.min(k.length,I))),ve||this._dirtyRowTracker.clearRange(),k.length>I)for(let P=te;P<k.length;P+=I){const le=P+I<k.length?P+I:k.length,Se=typeof k=="string"?this._stringDecoder.decode(k.substring(P,le),this._parseBuffer):this._utf8Decoder.decode(k.subarray(P,le),this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,Se))return this._preserveStack(j,X,Se,P),this._logSlowResolvingAsync(O),O}else if(!ve){const P=typeof k=="string"?this._stringDecoder.decode(k,this._parseBuffer):this._utf8Decoder.decode(k,this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,P))return this._preserveStack(j,X,P,0),this._logSlowResolvingAsync(O),O}this._activeBuffer.x===j&&this._activeBuffer.y===X||this._onCursorMove.fire();const Y=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),ie=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);ie<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(ie,this._bufferService.rows-1),Math.min(Y,this._bufferService.rows-1))}print(k,U,O){let j,X;const te=this._charsetService.charset,ve=this._optionsService.rawOptions.screenReaderMode,Y=this._bufferService.cols,ie=this._coreService.decPrivateModes.wraparound,P=this._coreService.modes.insertMode,le=this._curAttrData;let Se=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&O-U>0&&Se.getWidth(this._activeBuffer.x-1)===2&&Se.setCellFromCodePoint(this._activeBuffer.x-1,0,1,le.fg,le.bg,le.extended);let ue=this._parser.precedingJoinState;for(let Xe=U;Xe<O;++Xe){if(j=k[Xe],j<127&&te){const mt=te[String.fromCharCode(j)];mt&&(j=mt.charCodeAt(0))}const He=this._unicodeService.charProperties(j,ue);X=L.UnicodeService.extractWidth(He);const ge=L.UnicodeService.extractShouldJoin(He),Ne=ge?L.UnicodeService.extractWidth(ue):0;if(ue=He,ve&&this._onA11yChar.fire((0,b.stringFromCodePoint)(j)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+X-Ne>Y){if(ie){const mt=Se;let Be=this._activeBuffer.x-Ne;for(this._activeBuffer.x=Ne,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),Se=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ne>0&&Se instanceof l.BufferLine&&Se.copyCellsFrom(mt,Be,0,Ne,!1);Be<Y;)mt.setCellFromCodePoint(Be++,0,1,le.fg,le.bg,le.extended)}else if(this._activeBuffer.x=Y-1,X===2)continue}if(ge&&this._activeBuffer.x){const mt=Se.getWidth(this._activeBuffer.x-1)?1:2;Se.addCodepointToCell(this._activeBuffer.x-mt,j,X);for(let Be=X-Ne;--Be>=0;)Se.setCellFromCodePoint(this._activeBuffer.x++,0,0,le.fg,le.bg,le.extended)}else if(P&&(Se.insertCells(this._activeBuffer.x,X-Ne,this._activeBuffer.getNullCell(le),le),Se.getWidth(Y-1)===2&&Se.setCellFromCodePoint(Y-1,u.NULL_CELL_CODE,u.NULL_CELL_WIDTH,le.fg,le.bg,le.extended)),Se.setCellFromCodePoint(this._activeBuffer.x++,j,X,le.fg,le.bg,le.extended),X>0)for(;--X;)Se.setCellFromCodePoint(this._activeBuffer.x++,0,0,le.fg,le.bg,le.extended)}this._parser.precedingJoinState=ue,this._activeBuffer.x<Y&&O-U>0&&Se.getWidth(this._activeBuffer.x)===0&&!Se.hasContent(this._activeBuffer.x)&&Se.setCellFromCodePoint(this._activeBuffer.x,0,1,le.fg,le.bg,le.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(k,U){return k.final!=="t"||k.prefix||k.intermediates?this._parser.registerCsiHandler(k,U):this._parser.registerCsiHandler(k,(O=>!F(O.params[0],this._optionsService.rawOptions.windowOptions)||U(O)))}registerDcsHandler(k,U){return this._parser.registerDcsHandler(k,new C.DcsHandler(U))}registerEscHandler(k,U){return this._parser.registerEscHandler(k,U)}registerOscHandler(k,U){return this._parser.registerOscHandler(k,new x.OscHandler(U))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var k;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&k.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);U.hasWidth(this._activeBuffer.x)&&!U.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const k=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-k),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(k=this._bufferService.cols-1){this._activeBuffer.x=Math.min(k,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(k,U){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=k,this._activeBuffer.y=this._activeBuffer.scrollTop+U):(this._activeBuffer.x=k,this._activeBuffer.y=U),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(k,U){this._restrictCursor(),this._setCursor(this._activeBuffer.x+k,this._activeBuffer.y+U)}cursorUp(k){const U=this._activeBuffer.y-this._activeBuffer.scrollTop;return U>=0?this._moveCursor(0,-Math.min(U,k.params[0]||1)):this._moveCursor(0,-(k.params[0]||1)),!0}cursorDown(k){const U=this._activeBuffer.scrollBottom-this._activeBuffer.y;return U>=0?this._moveCursor(0,Math.min(U,k.params[0]||1)):this._moveCursor(0,k.params[0]||1),!0}cursorForward(k){return this._moveCursor(k.params[0]||1,0),!0}cursorBackward(k){return this._moveCursor(-(k.params[0]||1),0),!0}cursorNextLine(k){return this.cursorDown(k),this._activeBuffer.x=0,!0}cursorPrecedingLine(k){return this.cursorUp(k),this._activeBuffer.x=0,!0}cursorCharAbsolute(k){return this._setCursor((k.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(k){return this._setCursor(k.length>=2?(k.params[1]||1)-1:0,(k.params[0]||1)-1),!0}charPosAbsolute(k){return this._setCursor((k.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(k){return this._moveCursor(k.params[0]||1,0),!0}linePosAbsolute(k){return this._setCursor(this._activeBuffer.x,(k.params[0]||1)-1),!0}vPositionRelative(k){return this._moveCursor(0,k.params[0]||1),!0}hVPosition(k){return this.cursorPosition(k),!0}tabClear(k){const U=k.params[0];return U===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:U===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(k){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let U=k.params[0]||1;for(;U--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(k){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let U=k.params[0]||1;for(;U--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(k){const U=k.params[0];return U===1&&(this._curAttrData.bg|=536870912),U!==2&&U!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(k,U,O,j=!1,X=!1){const te=this._activeBuffer.lines.get(this._activeBuffer.ybase+k);te.replaceCells(U,O,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),X),j&&(te.isWrapped=!1)}_resetBufferLine(k,U=!1){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+k);O&&(O.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),U),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+k),O.isWrapped=!1)}eraseInDisplay(k,U=!1){let O;switch(this._restrictCursor(this._bufferService.cols),k.params[0]){case 0:for(O=this._activeBuffer.y,this._dirtyRowTracker.markDirty(O),this._eraseInBufferLine(O++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,U);O<this._bufferService.rows;O++)this._resetBufferLine(O,U);this._dirtyRowTracker.markDirty(O);break;case 1:for(O=this._activeBuffer.y,this._dirtyRowTracker.markDirty(O),this._eraseInBufferLine(O,0,this._activeBuffer.x+1,!0,U),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(O+1).isWrapped=!1);O--;)this._resetBufferLine(O,U);this._dirtyRowTracker.markDirty(0);break;case 2:for(O=this._bufferService.rows,this._dirtyRowTracker.markDirty(O-1);O--;)this._resetBufferLine(O,U);this._dirtyRowTracker.markDirty(0);break;case 3:const j=this._activeBuffer.lines.length-this._bufferService.rows;j>0&&(this._activeBuffer.lines.trimStart(j),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-j,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-j,0),this._onScroll.fire(0))}return!0}eraseInLine(k,U=!1){switch(this._restrictCursor(this._bufferService.cols),k.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,U);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,U);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,U)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(k){this._restrictCursor();let U=k.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=this._activeBuffer.ybase+this._activeBuffer.y,j=this._bufferService.rows-1-this._activeBuffer.scrollBottom,X=this._bufferService.rows-1+this._activeBuffer.ybase-j+1;for(;U--;)this._activeBuffer.lines.splice(X-1,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(k){this._restrictCursor();let U=k.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=this._activeBuffer.ybase+this._activeBuffer.y;let j;for(j=this._bufferService.rows-1-this._activeBuffer.scrollBottom,j=this._bufferService.rows-1+this._activeBuffer.ybase-j;U--;)this._activeBuffer.lines.splice(O,1),this._activeBuffer.lines.splice(j,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(k){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.insertCells(this._activeBuffer.x,k.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(k){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.deleteCells(this._activeBuffer.x,k.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(k){let U=k.params[0]||1;for(;U--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(k){let U=k.params[0]||1;for(;U--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(l.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(k){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=k.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);j.deleteCells(0,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),j.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(k){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=k.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);j.insertCells(0,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),j.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(k){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=k.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);j.insertCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),j.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(k){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const U=k.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const j=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);j.deleteCells(this._activeBuffer.x,U,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),j.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(k){this._restrictCursor();const U=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return U&&(U.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(k.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(k){const U=this._parser.precedingJoinState;if(!U)return!0;const O=k.params[0]||1,j=L.UnicodeService.extractWidth(U),X=this._activeBuffer.x-j,te=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(X),ve=new Uint32Array(te.length*O);let Y=0;for(let P=0;P<te.length;){const le=te.codePointAt(P)||0;ve[Y++]=le,P+=le>65535?2:1}let ie=Y;for(let P=1;P<O;++P)ve.copyWithin(ie,0,Y),ie+=Y;return this.print(ve,0,ie),!0}sendDeviceAttributesPrimary(k){return k.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(m.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(m.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(k){return k.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(m.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(m.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(k.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(m.C0.ESC+"[>83;40003;0c")),!0}_is(k){return(this._optionsService.rawOptions.termName+"").indexOf(k)===0}setMode(k){for(let U=0;U<k.length;U++)switch(k.params[U]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(k){for(let U=0;U<k.length;U++)switch(k.params[U]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,y.DEFAULT_CHARSET),this._charsetService.setgCharset(1,y.DEFAULT_CHARSET),this._charsetService.setgCharset(2,y.DEFAULT_CHARSET),this._charsetService.setgCharset(3,y.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(k){for(let U=0;U<k.length;U++)switch(k.params[U]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(k){for(let U=0;U<k.length;U++)switch(k.params[U]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),k.params[U]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(k,U){const O=this._coreService.decPrivateModes,{activeProtocol:j,activeEncoding:X}=this._coreMouseService,te=this._coreService,{buffers:ve,cols:Y}=this._bufferService,{active:ie,alt:P}=ve,le=this._optionsService.rawOptions,Se=ge=>ge?1:2,ue=k.params[0];return Xe=ue,He=U?ue===2?4:ue===4?Se(te.modes.insertMode):ue===12?3:ue===20?Se(le.convertEol):0:ue===1?Se(O.applicationCursorKeys):ue===3?le.windowOptions.setWinLines?Y===80?2:Y===132?1:0:0:ue===6?Se(O.origin):ue===7?Se(O.wraparound):ue===8?3:ue===9?Se(j==="X10"):ue===12?Se(le.cursorBlink):ue===25?Se(!te.isCursorHidden):ue===45?Se(O.reverseWraparound):ue===66?Se(O.applicationKeypad):ue===67?4:ue===1e3?Se(j==="VT200"):ue===1002?Se(j==="DRAG"):ue===1003?Se(j==="ANY"):ue===1004?Se(O.sendFocus):ue===1005?4:ue===1006?Se(X==="SGR"):ue===1015?4:ue===1016?Se(X==="SGR_PIXELS"):ue===1048?1:ue===47||ue===1047||ue===1049?Se(ie===P):ue===2004?Se(O.bracketedPasteMode):0,te.triggerDataEvent(`${m.C0.ESC}[${U?"":"?"}${Xe};${He}$y`),!0;var Xe,He}_updateAttrColor(k,U,O,j,X){return U===2?(k|=50331648,k&=-16777216,k|=E.AttributeData.fromColorRGB([O,j,X])):U===5&&(k&=-50331904,k|=33554432|255&O),k}_extractColor(k,U,O){const j=[0,0,-1,0,0,0];let X=0,te=0;do{if(j[te+X]=k.params[U+te],k.hasSubParams(U+te)){const ve=k.getSubParams(U+te);let Y=0;do j[1]===5&&(X=1),j[te+Y+1+X]=ve[Y];while(++Y<ve.length&&Y+te+1+X<j.length);break}if(j[1]===5&&te+X>=2||j[1]===2&&te+X>=5)break;j[1]&&(X=1)}while(++te+U<k.length&&te+X<j.length);for(let ve=2;ve<j.length;++ve)j[ve]===-1&&(j[ve]=0);switch(j[0]){case 38:O.fg=this._updateAttrColor(O.fg,j[1],j[3],j[4],j[5]);break;case 48:O.bg=this._updateAttrColor(O.bg,j[1],j[3],j[4],j[5]);break;case 58:O.extended=O.extended.clone(),O.extended.underlineColor=this._updateAttrColor(O.extended.underlineColor,j[1],j[3],j[4],j[5])}return te}_processUnderline(k,U){U.extended=U.extended.clone(),(!~k||k>5)&&(k=1),U.extended.underlineStyle=k,U.fg|=268435456,k===0&&(U.fg&=-268435457),U.updateExtended()}_processSGR0(k){k.fg=l.DEFAULT_ATTR_DATA.fg,k.bg=l.DEFAULT_ATTR_DATA.bg,k.extended=k.extended.clone(),k.extended.underlineStyle=0,k.extended.underlineColor&=-67108864,k.updateExtended()}charAttributes(k){if(k.length===1&&k.params[0]===0)return this._processSGR0(this._curAttrData),!0;const U=k.length;let O;const j=this._curAttrData;for(let X=0;X<U;X++)O=k.params[X],O>=30&&O<=37?(j.fg&=-50331904,j.fg|=16777216|O-30):O>=40&&O<=47?(j.bg&=-50331904,j.bg|=16777216|O-40):O>=90&&O<=97?(j.fg&=-50331904,j.fg|=16777224|O-90):O>=100&&O<=107?(j.bg&=-50331904,j.bg|=16777224|O-100):O===0?this._processSGR0(j):O===1?j.fg|=134217728:O===3?j.bg|=67108864:O===4?(j.fg|=268435456,this._processUnderline(k.hasSubParams(X)?k.getSubParams(X)[0]:1,j)):O===5?j.fg|=536870912:O===7?j.fg|=67108864:O===8?j.fg|=1073741824:O===9?j.fg|=2147483648:O===2?j.bg|=134217728:O===21?this._processUnderline(2,j):O===22?(j.fg&=-134217729,j.bg&=-134217729):O===23?j.bg&=-67108865:O===24?(j.fg&=-268435457,this._processUnderline(0,j)):O===25?j.fg&=-536870913:O===27?j.fg&=-67108865:O===28?j.fg&=-1073741825:O===29?j.fg&=2147483647:O===39?(j.fg&=-67108864,j.fg|=16777215&l.DEFAULT_ATTR_DATA.fg):O===49?(j.bg&=-67108864,j.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):O===38||O===48||O===58?X+=this._extractColor(k,X,j):O===53?j.bg|=1073741824:O===55?j.bg&=-1073741825:O===59?(j.extended=j.extended.clone(),j.extended.underlineColor=-1,j.updateExtended()):O===100?(j.fg&=-67108864,j.fg|=16777215&l.DEFAULT_ATTR_DATA.fg,j.bg&=-67108864,j.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",O);return!0}deviceStatus(k){switch(k.params[0]){case 5:this._coreService.triggerDataEvent(`${m.C0.ESC}[0n`);break;case 6:const U=this._activeBuffer.y+1,O=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${m.C0.ESC}[${U};${O}R`)}return!0}deviceStatusPrivate(k){if(k.params[0]===6){const U=this._activeBuffer.y+1,O=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${m.C0.ESC}[?${U};${O}R`)}return!0}softReset(k){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(k){const U=k.params[0]||1;switch(U){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const O=U%2==1;return this._optionsService.options.cursorBlink=O,!0}setScrollRegion(k){const U=k.params[0]||1;let O;return(k.length<2||(O=k.params[1])>this._bufferService.rows||O===0)&&(O=this._bufferService.rows),O>U&&(this._activeBuffer.scrollTop=U-1,this._activeBuffer.scrollBottom=O-1,this._setCursor(0,0)),!0}windowOptions(k){if(!F(k.params[0],this._optionsService.rawOptions.windowOptions))return!0;const U=k.length>1?k.params[1]:0;switch(k.params[0]){case 14:U!==2&&this._onRequestWindowsOptionsReport.fire(Q.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(Q.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${m.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:U!==0&&U!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),U!==0&&U!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:U!==0&&U!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),U!==0&&U!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(k){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(k){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(k){return this._windowTitle=k,this._onTitleChange.fire(k),!0}setIconName(k){return this._iconName=k,!0}setOrReportIndexedColor(k){const U=[],O=k.split(";");for(;O.length>1;){const j=O.shift(),X=O.shift();if(/^\d+$/.exec(j)){const te=parseInt(j);if(J(te))if(X==="?")U.push({type:0,index:te});else{const ve=(0,B.parseColor)(X);ve&&U.push({type:1,index:te,color:ve})}}}return U.length&&this._onColor.fire(U),!0}setHyperlink(k){const U=k.split(";");return!(U.length<2)&&(U[1]?this._createHyperlink(U[0],U[1]):!U[0]&&this._finishHyperlink())}_createHyperlink(k,U){this._getCurrentLinkId()&&this._finishHyperlink();const O=k.split(":");let j;const X=O.findIndex((te=>te.startsWith("id=")));return X!==-1&&(j=O[X].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:j,uri:U}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(k,U){const O=k.split(";");for(let j=0;j<O.length&&!(U>=this._specialColors.length);++j,++U)if(O[j]==="?")this._onColor.fire([{type:0,index:this._specialColors[U]}]);else{const X=(0,B.parseColor)(O[j]);X&&this._onColor.fire([{type:1,index:this._specialColors[U],color:X}])}return!0}setOrReportFgColor(k){return this._setOrReportSpecialColor(k,0)}setOrReportBgColor(k){return this._setOrReportSpecialColor(k,1)}setOrReportCursorColor(k){return this._setOrReportSpecialColor(k,2)}restoreIndexedColor(k){if(!k)return this._onColor.fire([{type:2}]),!0;const U=[],O=k.split(";");for(let j=0;j<O.length;++j)if(/^\d+$/.exec(O[j])){const X=parseInt(O[j]);J(X)&&U.push({type:2,index:X})}return U.length&&this._onColor.fire(U),!0}restoreFgColor(k){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(k){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(k){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,y.DEFAULT_CHARSET),!0}selectCharset(k){return k.length!==2?(this.selectDefaultCharset(),!0):(k[0]==="/"||this._charsetService.setgCharset(z[k[0]],y.CHARSETS[k[1]]||y.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const k=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,k,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(k){return this._charsetService.setgLevel(k),!0}screenAlignmentPattern(){const k=new f.CellData;k.content=4194373,k.fg=this._curAttrData.fg,k.bg=this._curAttrData.bg,this._setCursor(0,0);for(let U=0;U<this._bufferService.rows;++U){const O=this._activeBuffer.ybase+this._activeBuffer.y+U,j=this._activeBuffer.lines.get(O);j&&(j.fill(k),j.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(k,U){const O=this._bufferService.buffer,j=this._optionsService.rawOptions;return(X=>(this._coreService.triggerDataEvent(`${m.C0.ESC}${X}${m.C0.ESC}\\`),!0))(k==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:k==='"p'?'P1$r61;1"p':k==="r"?`P1$r${O.scrollTop+1};${O.scrollBottom+1}r`:k==="m"?"P1$r0m":k===" q"?`P1$r${{block:2,underline:4,bar:6}[j.cursorStyle]-(j.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(k,U){this._dirtyRowTracker.markRangeDirty(k,U)}}o.InputHandler=ae;let q=class{constructor(he){this._bufferService=he,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(he){he<this.start?this.start=he:he>this.end&&(this.end=he)}markRangeDirty(he,k){he>k&&(ce=he,he=k,k=ce),he<this.start&&(this.start=he),k>this.end&&(this.end=k)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(he){return 0<=he&&he<256}q=d([p(0,R.IBufferService)],q)},844:(M,o)=>{function _(d){for(const p of d)p.dispose();d.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const p=this._disposables.indexOf(d);p!==-1&&this._disposables.splice(p,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var p;this._isDisposed||d===this._value||((p=this._value)==null||p.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)==null||d.dispose(),this._value=void 0}},o.toDisposable=function(d){return{dispose:d}},o.disposeArray=_,o.getDisposeArrayDisposable=function(d){return{dispose:()=>_(d)}}},1505:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class _{constructor(){this._data={}}set(p,m,y){this._data[p]||(this._data[p]={}),this._data[p][m]=y}get(p,m){return this._data[p]?this._data[p][m]:void 0}clear(){this._data={}}}o.TwoKeyMap=_,o.FourKeyMap=class{constructor(){this._data=new _}set(d,p,m,y,S){this._data.get(d,p)||this._data.set(d,p,new _),this._data.get(d,p).set(m,y,S)}get(d,p,m,y){var S;return(S=this._data.get(d,p))==null?void 0:S.get(m,y)}clear(){this._data.clear()}}},6114:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u";const _=o.isNode?"node":navigator.userAgent,d=o.isNode?"node":navigator.platform;o.isFirefox=_.includes("Firefox"),o.isLegacyEdge=_.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(_),o.getSafariVersion=function(){if(!o.isSafari)return 0;const p=_.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),o.isIpad=d==="iPad",o.isIphone=d==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),o.isLinux=d.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(_)},6106:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let _=0;o.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(_=this._search(this._getKey(d)),this._array.splice(_,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const p=this._getKey(d);if(p===void 0||(_=this._search(p),_===-1)||this._getKey(this._array[_])!==p)return!1;do if(this._array[_]===d)return this._array.splice(_,1),!0;while(++_<this._array.length&&this._getKey(this._array[_])===p);return!1}*getKeyIterator(d){if(this._array.length!==0&&(_=this._search(d),!(_<0||_>=this._array.length)&&this._getKey(this._array[_])===d))do yield this._array[_];while(++_<this._array.length&&this._getKey(this._array[_])===d)}forEachByKey(d,p){if(this._array.length!==0&&(_=this._search(d),!(_<0||_>=this._array.length)&&this._getKey(this._array[_])===d))do p(this._array[_]);while(++_<this._array.length&&this._getKey(this._array[_])===d)}values(){return[...this._array].values()}_search(d){let p=0,m=this._array.length-1;for(;m>=p;){let y=p+m>>1;const S=this._getKey(this._array[y]);if(S>d)m=y-1;else{if(!(S<d)){for(;y>0&&this._getKey(this._array[y-1])===d;)y--;return y}p=y+1}}return p}}},7226:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const d=_(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(S){this._idleCallback=void 0;let A=0,b=0,l=S.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(A=Date.now(),this._tasks[this._i]()||this._i++,A=Math.max(1,Date.now()-A),b=Math.max(A,b),h=S.timeRemaining(),1.5*b>h)return l-A<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-A))}ms`),void this._start();l=h}this.clear()}}class m extends p{_requestCallback(S){return setTimeout((()=>S(this._createDeadline(16))))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const A=Date.now()+S;return{timeRemaining:()=>Math.max(0,A-Date.now())}}}o.PriorityTaskQueue=m,o.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(y){return requestIdleCallback(y)}_cancelCallback(y){cancelIdleCallback(y)}}:m,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(y){this._queue.clear(),this._queue.enqueue(y)}flush(){this._queue.flush()}}},9282:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const d=_(643);o.updateWindowsModeWrappedState=function(p){const m=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),y=m==null?void 0:m.get(p.cols-1),S=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);S&&y&&(S.isWrapped=y[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&y[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class _{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(m){return[m>>>16&255,m>>>8&255,255&m]}static fromColorRGB(m){return(255&m[0])<<16|(255&m[1])<<8|255&m[2]}clone(){const m=new _;return m.fg=this.fg,m.bg=this.bg,m.extended=this.extended.clone(),m}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}}o.AttributeData=_;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(m){this._ext=m}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(m){this._ext&=-469762049,this._ext|=m<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(m){this._ext&=-67108864,this._ext|=67108863&m}get urlId(){return this._urlId}set urlId(m){this._urlId=m}constructor(m=0,y=0){this._ext=0,this._urlId=0,this._ext=m,this._urlId=y}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=d},9092:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const d=_(6349),p=_(7226),m=_(3734),y=_(8437),S=_(4634),A=_(511),b=_(643),l=_(4863),h=_(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(u,f,E){this._hasScrollback=u,this._optionsService=f,this._bufferService=E,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=y.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=A.CellData.fromCharData([0,b.NULL_CELL_CHAR,b.NULL_CELL_WIDTH,b.NULL_CELL_CODE]),this._whitespaceCell=A.CellData.fromCharData([0,b.WHITESPACE_CELL_CHAR,b.WHITESPACE_CELL_WIDTH,b.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(u){return u?(this._nullCell.fg=u.fg,this._nullCell.bg=u.bg,this._nullCell.extended=u.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new m.ExtendedAttrs),this._nullCell}getWhitespaceCell(u){return u?(this._whitespaceCell.fg=u.fg,this._whitespaceCell.bg=u.bg,this._whitespaceCell.extended=u.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new m.ExtendedAttrs),this._whitespaceCell}getBlankLine(u,f){return new y.BufferLine(this._bufferService.cols,this.getNullCell(u),f)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const u=this.ybase+this.y-this.ydisp;return u>=0&&u<this._rows}_getCorrectBufferLength(u){if(!this._hasScrollback)return u;const f=u+this._optionsService.rawOptions.scrollback;return f>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:f}fillViewportRows(u){if(this.lines.length===0){u===void 0&&(u=y.DEFAULT_ATTR_DATA);let f=this._rows;for(;f--;)this.lines.push(this.getBlankLine(u))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(u,f){const E=this.getNullCell(y.DEFAULT_ATTR_DATA);let R=0;const L=this._getCorrectBufferLength(f);if(L>this.lines.maxLength&&(this.lines.maxLength=L),this.lines.length>0){if(this._cols<u)for(let C=0;C<this.lines.length;C++)R+=+this.lines.get(C).resize(u,E);let x=0;if(this._rows<f)for(let C=this._rows;C<f;C++)this.lines.length<f+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new y.BufferLine(u,E)):this.ybase>0&&this.lines.length<=this.ybase+this.y+x+1?(this.ybase--,x++,this.ydisp>0&&this.ydisp--):this.lines.push(new y.BufferLine(u,E)));else for(let C=this._rows;C>f;C--)this.lines.length>f+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(L<this.lines.maxLength){const C=this.lines.length-L;C>0&&(this.lines.trimStart(C),this.ybase=Math.max(this.ybase-C,0),this.ydisp=Math.max(this.ydisp-C,0),this.savedY=Math.max(this.savedY-C,0)),this.lines.maxLength=L}this.x=Math.min(this.x,u-1),this.y=Math.min(this.y,f-1),x&&(this.y+=x),this.savedX=Math.min(this.savedX,u-1),this.scrollTop=0}if(this.scrollBottom=f-1,this._isReflowEnabled&&(this._reflow(u,f),this._cols>u))for(let x=0;x<this.lines.length;x++)R+=+this.lines.get(x).resize(u,E);this._cols=u,this._rows=f,this._memoryCleanupQueue.clear(),R>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let u=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,u=!1);let f=0;for(;this._memoryCleanupPosition<this.lines.length;)if(f+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),f>100)return!0;return u}get _isReflowEnabled(){const u=this._optionsService.rawOptions.windowsPty;return u&&u.buildNumber?this._hasScrollback&&u.backend==="conpty"&&u.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(u,f){this._cols!==u&&(u>this._cols?this._reflowLarger(u,f):this._reflowSmaller(u,f))}_reflowLarger(u,f){const E=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,u,this.ybase+this.y,this.getNullCell(y.DEFAULT_ATTR_DATA));if(E.length>0){const R=(0,S.reflowLargerCreateNewLayout)(this.lines,E);(0,S.reflowLargerApplyNewLayout)(this.lines,R.layout),this._reflowLargerAdjustViewport(u,f,R.countRemoved)}}_reflowLargerAdjustViewport(u,f,E){const R=this.getNullCell(y.DEFAULT_ATTR_DATA);let L=E;for(;L-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<f&&this.lines.push(new y.BufferLine(u,R))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-E,0)}_reflowSmaller(u,f){const E=this.getNullCell(y.DEFAULT_ATTR_DATA),R=[];let L=0;for(let x=this.lines.length-1;x>=0;x--){let C=this.lines.get(x);if(!C||!C.isWrapped&&C.getTrimmedLength()<=u)continue;const B=[C];for(;C.isWrapped&&x>0;)C=this.lines.get(--x),B.unshift(C);const z=this.ybase+this.y;if(z>=x&&z<x+B.length)continue;const I=B[B.length-1].getTrimmedLength(),F=(0,S.reflowSmallerGetNewLineLengths)(B,this._cols,u),Q=F.length-B.length;let ce;ce=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+Q):Math.max(0,this.lines.length-this.lines.maxLength+Q);const ae=[];for(let O=0;O<Q;O++){const j=this.getBlankLine(y.DEFAULT_ATTR_DATA,!0);ae.push(j)}ae.length>0&&(R.push({start:x+B.length+L,newLines:ae}),L+=ae.length),B.push(...ae);let q=F.length-1,J=F[q];J===0&&(q--,J=F[q]);let he=B.length-Q-1,k=I;for(;he>=0;){const O=Math.min(k,J);if(B[q]===void 0)break;if(B[q].copyCellsFrom(B[he],k-O,J-O,O,!0),J-=O,J===0&&(q--,J=F[q]),k-=O,k===0){he--;const j=Math.max(he,0);k=(0,S.getWrappedLineTrimmedLength)(B,j,this._cols)}}for(let O=0;O<B.length;O++)F[O]<u&&B[O].setCell(F[O],E);let U=Q-ce;for(;U-- >0;)this.ybase===0?this.y<f-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+L)-f&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+Q,this.ybase+f-1)}if(R.length>0){const x=[],C=[];for(let q=0;q<this.lines.length;q++)C.push(this.lines.get(q));const B=this.lines.length;let z=B-1,I=0,F=R[I];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+L);let Q=0;for(let q=Math.min(this.lines.maxLength-1,B+L-1);q>=0;q--)if(F&&F.start>z+Q){for(let J=F.newLines.length-1;J>=0;J--)this.lines.set(q--,F.newLines[J]);q++,x.push({index:z+1,amount:F.newLines.length}),Q+=F.newLines.length,F=R[++I]}else this.lines.set(q,C[z--]);let ce=0;for(let q=x.length-1;q>=0;q--)x[q].index+=ce,this.lines.onInsertEmitter.fire(x[q]),ce+=x[q].amount;const ae=Math.max(0,B+L-this.lines.maxLength);ae>0&&this.lines.onTrimEmitter.fire(ae)}}translateBufferLineToString(u,f,E=0,R){const L=this.lines.get(u);return L?L.translateToString(f,E,R):""}getWrappedRangeForLine(u){let f=u,E=u;for(;f>0&&this.lines.get(f).isWrapped;)f--;for(;E+1<this.lines.length&&this.lines.get(E+1).isWrapped;)E++;return{first:f,last:E}}setupTabStops(u){for(u!=null?this.tabs[u]||(u=this.prevStop(u)):(this.tabs={},u=0);u<this._cols;u+=this._optionsService.rawOptions.tabStopWidth)this.tabs[u]=!0}prevStop(u){for(u==null&&(u=this.x);!this.tabs[--u]&&u>0;);return u>=this._cols?this._cols-1:u<0?0:u}nextStop(u){for(u==null&&(u=this.x);!this.tabs[++u]&&u<this._cols;);return u>=this._cols?this._cols-1:u<0?0:u}clearMarkers(u){this._isClearing=!0;for(let f=0;f<this.markers.length;f++)this.markers[f].line===u&&(this.markers[f].dispose(),this.markers.splice(f--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let u=0;u<this.markers.length;u++)this.markers[u].dispose(),this.markers.splice(u--,1);this._isClearing=!1}addMarker(u){const f=new l.Marker(u);return this.markers.push(f),f.register(this.lines.onTrim((E=>{f.line-=E,f.line<0&&f.dispose()}))),f.register(this.lines.onInsert((E=>{f.line>=E.index&&(f.line+=E.amount)}))),f.register(this.lines.onDelete((E=>{f.line>=E.index&&f.line<E.index+E.amount&&f.dispose(),f.line>E.index&&(f.line-=E.amount)}))),f.register(f.onDispose((()=>this._removeMarker(f)))),f}_removeMarker(u){this._isClearing||this.markers.splice(this.markers.indexOf(u),1)}}},8437:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const d=_(3734),p=_(511),m=_(643),y=_(482);o.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let S=0;class A{constructor(l,h,u=!1){this.isWrapped=u,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*l);const f=h||p.CellData.fromCharData([0,m.NULL_CELL_CHAR,m.NULL_CELL_WIDTH,m.NULL_CELL_CODE]);for(let E=0;E<l;++E)this.setCell(E,f);this.length=l}get(l){const h=this._data[3*l+0],u=2097151&h;return[this._data[3*l+1],2097152&h?this._combined[l]:u?(0,y.stringFromCodePoint)(u):"",h>>22,2097152&h?this._combined[l].charCodeAt(this._combined[l].length-1):u]}set(l,h){this._data[3*l+1]=h[m.CHAR_DATA_ATTR_INDEX],h[m.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[l]=h[1],this._data[3*l+0]=2097152|l|h[m.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*l+0]=h[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[m.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(l){return this._data[3*l+0]>>22}hasWidth(l){return 12582912&this._data[3*l+0]}getFg(l){return this._data[3*l+1]}getBg(l){return this._data[3*l+2]}hasContent(l){return 4194303&this._data[3*l+0]}getCodePoint(l){const h=this._data[3*l+0];return 2097152&h?this._combined[l].charCodeAt(this._combined[l].length-1):2097151&h}isCombined(l){return 2097152&this._data[3*l+0]}getString(l){const h=this._data[3*l+0];return 2097152&h?this._combined[l]:2097151&h?(0,y.stringFromCodePoint)(2097151&h):""}isProtected(l){return 536870912&this._data[3*l+2]}loadCell(l,h){return S=3*l,h.content=this._data[S+0],h.fg=this._data[S+1],h.bg=this._data[S+2],2097152&h.content&&(h.combinedData=this._combined[l]),268435456&h.bg&&(h.extended=this._extendedAttrs[l]),h}setCell(l,h){2097152&h.content&&(this._combined[l]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[l]=h.extended),this._data[3*l+0]=h.content,this._data[3*l+1]=h.fg,this._data[3*l+2]=h.bg}setCellFromCodePoint(l,h,u,f,E,R){268435456&E&&(this._extendedAttrs[l]=R),this._data[3*l+0]=h|u<<22,this._data[3*l+1]=f,this._data[3*l+2]=E}addCodepointToCell(l,h,u){let f=this._data[3*l+0];2097152&f?this._combined[l]+=(0,y.stringFromCodePoint)(h):2097151&f?(this._combined[l]=(0,y.stringFromCodePoint)(2097151&f)+(0,y.stringFromCodePoint)(h),f&=-2097152,f|=2097152):f=h|4194304,u&&(f&=-12582913,f|=u<<22),this._data[3*l+0]=f}insertCells(l,h,u,f){if((l%=this.length)&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new d.ExtendedAttrs),h<this.length-l){const E=new p.CellData;for(let R=this.length-l-h-1;R>=0;--R)this.setCell(l+h+R,this.loadCell(l+R,E));for(let R=0;R<h;++R)this.setCell(l+R,u)}else for(let E=l;E<this.length;++E)this.setCell(E,u);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new d.ExtendedAttrs)}deleteCells(l,h,u,f){if(l%=this.length,h<this.length-l){const E=new p.CellData;for(let R=0;R<this.length-l-h;++R)this.setCell(l+R,this.loadCell(l+h+R,E));for(let R=this.length-h;R<this.length;++R)this.setCell(R,u)}else for(let E=l;E<this.length;++E)this.setCell(E,u);l&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new d.ExtendedAttrs),this.getWidth(l)!==0||this.hasContent(l)||this.setCellFromCodePoint(l,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new d.ExtendedAttrs)}replaceCells(l,h,u,f,E=!1){if(E)for(l&&this.getWidth(l-1)===2&&!this.isProtected(l-1)&&this.setCellFromCodePoint(l-1,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new d.ExtendedAttrs),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodePoint(h,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new d.ExtendedAttrs);l<h&&l<this.length;)this.isProtected(l)||this.setCell(l,u),l++;else for(l&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new d.ExtendedAttrs),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodePoint(h,0,1,(f==null?void 0:f.fg)||0,(f==null?void 0:f.bg)||0,(f==null?void 0:f.extended)||new d.ExtendedAttrs);l<h&&l<this.length;)this.setCell(l++,u)}resize(l,h){if(l===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const u=3*l;if(l>this.length){if(this._data.buffer.byteLength>=4*u)this._data=new Uint32Array(this._data.buffer,0,u);else{const f=new Uint32Array(u);f.set(this._data),this._data=f}for(let f=this.length;f<l;++f)this.setCell(f,h)}else{this._data=this._data.subarray(0,u);const f=Object.keys(this._combined);for(let R=0;R<f.length;R++){const L=parseInt(f[R],10);L>=l&&delete this._combined[L]}const E=Object.keys(this._extendedAttrs);for(let R=0;R<E.length;R++){const L=parseInt(E[R],10);L>=l&&delete this._extendedAttrs[L]}}return this.length=l,4*u*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const l=new Uint32Array(this._data.length);return l.set(this._data),this._data=l,1}return 0}fill(l,h=!1){if(h)for(let u=0;u<this.length;++u)this.isProtected(u)||this.setCell(u,l);else{this._combined={},this._extendedAttrs={};for(let u=0;u<this.length;++u)this.setCell(u,l)}}copyFrom(l){this.length!==l.length?this._data=new Uint32Array(l._data):this._data.set(l._data),this.length=l.length,this._combined={};for(const h in l._combined)this._combined[h]=l._combined[h];this._extendedAttrs={};for(const h in l._extendedAttrs)this._extendedAttrs[h]=l._extendedAttrs[h];this.isWrapped=l.isWrapped}clone(){const l=new A(0);l._data=new Uint32Array(this._data),l.length=this.length;for(const h in this._combined)l._combined[h]=this._combined[h];for(const h in this._extendedAttrs)l._extendedAttrs[h]=this._extendedAttrs[h];return l.isWrapped=this.isWrapped,l}getTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0])return l+(this._data[3*l+0]>>22);return 0}getNoBgTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0]||50331648&this._data[3*l+2])return l+(this._data[3*l+0]>>22);return 0}copyCellsFrom(l,h,u,f,E){const R=l._data;if(E)for(let x=f-1;x>=0;x--){for(let C=0;C<3;C++)this._data[3*(u+x)+C]=R[3*(h+x)+C];268435456&R[3*(h+x)+2]&&(this._extendedAttrs[u+x]=l._extendedAttrs[h+x])}else for(let x=0;x<f;x++){for(let C=0;C<3;C++)this._data[3*(u+x)+C]=R[3*(h+x)+C];268435456&R[3*(h+x)+2]&&(this._extendedAttrs[u+x]=l._extendedAttrs[h+x])}const L=Object.keys(l._combined);for(let x=0;x<L.length;x++){const C=parseInt(L[x],10);C>=h&&(this._combined[C-h+u]=l._combined[C])}}translateToString(l=!1,h=0,u=this.length){l&&(u=Math.min(u,this.getTrimmedLength()));let f="";for(;h<u;){const E=this._data[3*h+0],R=2097151&E;f+=2097152&E?this._combined[h]:R?(0,y.stringFromCodePoint)(R):m.WHITESPACE_CELL_CHAR,h+=E>>22||1}return f}}o.BufferLine=A},4841:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(_,d){if(_.start.y>_.end.y)throw new Error(`Buffer range end (${_.end.x}, ${_.end.y}) cannot be before start (${_.start.x}, ${_.start.y})`);return d*(_.end.y-_.start.y)+(_.end.x-_.start.x+1)}},4634:(M,o)=>{function _(d,p,m){if(p===d.length-1)return d[p].getTrimmedLength();const y=!d[p].hasContent(m-1)&&d[p].getWidth(m-1)===1,S=d[p+1].getWidth(0)===2;return y&&S?m-1:m}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(d,p,m,y,S){const A=[];for(let b=0;b<d.length-1;b++){let l=b,h=d.get(++l);if(!h.isWrapped)continue;const u=[d.get(b)];for(;l<d.length&&h.isWrapped;)u.push(h),h=d.get(++l);if(y>=b&&y<l){b+=u.length-1;continue}let f=0,E=_(u,f,p),R=1,L=0;for(;R<u.length;){const C=_(u,R,p),B=C-L,z=m-E,I=Math.min(B,z);u[f].copyCellsFrom(u[R],L,E,I,!1),E+=I,E===m&&(f++,E=0),L+=I,L===C&&(R++,L=0),E===0&&f!==0&&u[f-1].getWidth(m-1)===2&&(u[f].copyCellsFrom(u[f-1],m-1,E++,1,!1),u[f-1].setCell(m-1,S))}u[f].replaceCells(E,m,S);let x=0;for(let C=u.length-1;C>0&&(C>f||u[C].getTrimmedLength()===0);C--)x++;x>0&&(A.push(b+u.length-x),A.push(x)),b+=u.length-1}return A},o.reflowLargerCreateNewLayout=function(d,p){const m=[];let y=0,S=p[y],A=0;for(let b=0;b<d.length;b++)if(S===b){const l=p[++y];d.onDeleteEmitter.fire({index:b-A,amount:l}),b+=l-1,A+=l,S=p[++y]}else m.push(b);return{layout:m,countRemoved:A}},o.reflowLargerApplyNewLayout=function(d,p){const m=[];for(let y=0;y<p.length;y++)m.push(d.get(p[y]));for(let y=0;y<m.length;y++)d.set(y,m[y]);d.length=p.length},o.reflowSmallerGetNewLineLengths=function(d,p,m){const y=[],S=d.map(((h,u)=>_(d,u,p))).reduce(((h,u)=>h+u));let A=0,b=0,l=0;for(;l<S;){if(S-l<m){y.push(S-l);break}A+=m;const h=_(d,b,p);A>h&&(A-=h,b++);const u=d[b].getWidth(A-1)===2;u&&A--;const f=u?m-1:m;y.push(f),l+=f}return y},o.getWrappedLineTrimmedLength=_},5295:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const d=_(8460),p=_(844),m=_(9092);class y extends p.Disposable{constructor(A,b){super(),this._optionsService=A,this._bufferService=b,this._onBufferActivate=this.register(new d.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new m.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new m.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(A){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(A),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(A,b){this._normal.resize(A,b),this._alt.resize(A,b),this.setupTabStops(A)}setupTabStops(A){this._normal.setupTabStops(A),this._alt.setupTabStops(A)}}o.BufferSet=y},511:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const d=_(482),p=_(643),m=_(3734);class y extends m.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new m.ExtendedAttrs,this.combinedData=""}static fromCharData(A){const b=new y;return b.setFromCharData(A),b}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(A){this.fg=A[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let b=!1;if(A[p.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(A[p.CHAR_DATA_CHAR_INDEX].length===2){const l=A[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const h=A[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(l-55296)+h-56320+65536|A[p.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=A[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|A[p.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=A[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|A[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=y},643:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const d=_(8460),p=_(844);class m{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=m._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}o.Marker=m,m._nextId=1},7116:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(M,o)=>{var _,d,p;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(m){m.NUL="\0",m.SOH="",m.STX="",m.ETX="",m.EOT="",m.ENQ="",m.ACK="",m.BEL="\x07",m.BS="\b",m.HT=" ",m.LF=`
68
+ `,m.VT="\v",m.FF="\f",m.CR="\r",m.SO="",m.SI="",m.DLE="",m.DC1="",m.DC2="",m.DC3="",m.DC4="",m.NAK="",m.SYN="",m.ETB="",m.CAN="",m.EM="",m.SUB="",m.ESC="\x1B",m.FS="",m.GS="",m.RS="",m.US="",m.SP=" ",m.DEL=""})(_||(o.C0=_={})),(function(m){m.PAD="€",m.HOP="",m.BPH="‚",m.NBH="ƒ",m.IND="„",m.NEL="…",m.SSA="†",m.ESA="‡",m.HTS="ˆ",m.HTJ="‰",m.VTS="Š",m.PLD="‹",m.PLU="Œ",m.RI="",m.SS2="Ž",m.SS3="",m.DCS="",m.PU1="‘",m.PU2="’",m.STS="“",m.CCH="”",m.MW="•",m.SPA="–",m.EPA="—",m.SOS="˜",m.SGCI="™",m.SCI="š",m.CSI="›",m.ST="œ",m.OSC="",m.PM="ž",m.APC="Ÿ"})(d||(o.C1=d={})),(function(m){m.ST=`${_.ESC}\\`})(p||(o.C1_ESCAPED=p={}))},7399:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const d=_(2584),p={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(m,y,S,A){const b={type:0,cancel:!1,key:void 0},l=(m.shiftKey?1:0)|(m.altKey?2:0)|(m.ctrlKey?4:0)|(m.metaKey?8:0);switch(m.keyCode){case 0:m.key==="UIKeyInputUpArrow"?b.key=y?d.C0.ESC+"OA":d.C0.ESC+"[A":m.key==="UIKeyInputLeftArrow"?b.key=y?d.C0.ESC+"OD":d.C0.ESC+"[D":m.key==="UIKeyInputRightArrow"?b.key=y?d.C0.ESC+"OC":d.C0.ESC+"[C":m.key==="UIKeyInputDownArrow"&&(b.key=y?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:if(m.altKey){b.key=d.C0.ESC+d.C0.DEL;break}b.key=d.C0.DEL;break;case 9:if(m.shiftKey){b.key=d.C0.ESC+"[Z";break}b.key=d.C0.HT,b.cancel=!0;break;case 13:b.key=m.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,b.cancel=!0;break;case 27:b.key=d.C0.ESC,m.altKey&&(b.key=d.C0.ESC+d.C0.ESC),b.cancel=!0;break;case 37:if(m.metaKey)break;l?(b.key=d.C0.ESC+"[1;"+(l+1)+"D",b.key===d.C0.ESC+"[1;3D"&&(b.key=d.C0.ESC+(S?"b":"[1;5D"))):b.key=y?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(m.metaKey)break;l?(b.key=d.C0.ESC+"[1;"+(l+1)+"C",b.key===d.C0.ESC+"[1;3C"&&(b.key=d.C0.ESC+(S?"f":"[1;5C"))):b.key=y?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(m.metaKey)break;l?(b.key=d.C0.ESC+"[1;"+(l+1)+"A",S||b.key!==d.C0.ESC+"[1;3A"||(b.key=d.C0.ESC+"[1;5A")):b.key=y?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(m.metaKey)break;l?(b.key=d.C0.ESC+"[1;"+(l+1)+"B",S||b.key!==d.C0.ESC+"[1;3B"||(b.key=d.C0.ESC+"[1;5B")):b.key=y?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:m.shiftKey||m.ctrlKey||(b.key=d.C0.ESC+"[2~");break;case 46:b.key=l?d.C0.ESC+"[3;"+(l+1)+"~":d.C0.ESC+"[3~";break;case 36:b.key=l?d.C0.ESC+"[1;"+(l+1)+"H":y?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:b.key=l?d.C0.ESC+"[1;"+(l+1)+"F":y?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:m.shiftKey?b.type=2:m.ctrlKey?b.key=d.C0.ESC+"[5;"+(l+1)+"~":b.key=d.C0.ESC+"[5~";break;case 34:m.shiftKey?b.type=3:m.ctrlKey?b.key=d.C0.ESC+"[6;"+(l+1)+"~":b.key=d.C0.ESC+"[6~";break;case 112:b.key=l?d.C0.ESC+"[1;"+(l+1)+"P":d.C0.ESC+"OP";break;case 113:b.key=l?d.C0.ESC+"[1;"+(l+1)+"Q":d.C0.ESC+"OQ";break;case 114:b.key=l?d.C0.ESC+"[1;"+(l+1)+"R":d.C0.ESC+"OR";break;case 115:b.key=l?d.C0.ESC+"[1;"+(l+1)+"S":d.C0.ESC+"OS";break;case 116:b.key=l?d.C0.ESC+"[15;"+(l+1)+"~":d.C0.ESC+"[15~";break;case 117:b.key=l?d.C0.ESC+"[17;"+(l+1)+"~":d.C0.ESC+"[17~";break;case 118:b.key=l?d.C0.ESC+"[18;"+(l+1)+"~":d.C0.ESC+"[18~";break;case 119:b.key=l?d.C0.ESC+"[19;"+(l+1)+"~":d.C0.ESC+"[19~";break;case 120:b.key=l?d.C0.ESC+"[20;"+(l+1)+"~":d.C0.ESC+"[20~";break;case 121:b.key=l?d.C0.ESC+"[21;"+(l+1)+"~":d.C0.ESC+"[21~";break;case 122:b.key=l?d.C0.ESC+"[23;"+(l+1)+"~":d.C0.ESC+"[23~";break;case 123:b.key=l?d.C0.ESC+"[24;"+(l+1)+"~":d.C0.ESC+"[24~";break;default:if(!m.ctrlKey||m.shiftKey||m.altKey||m.metaKey)if(S&&!A||!m.altKey||m.metaKey)!S||m.altKey||m.ctrlKey||m.shiftKey||!m.metaKey?m.key&&!m.ctrlKey&&!m.altKey&&!m.metaKey&&m.keyCode>=48&&m.key.length===1?b.key=m.key:m.key&&m.ctrlKey&&(m.key==="_"&&(b.key=d.C0.US),m.key==="@"&&(b.key=d.C0.NUL)):m.keyCode===65&&(b.type=1);else{const h=p[m.keyCode],u=h==null?void 0:h[m.shiftKey?1:0];if(u)b.key=d.C0.ESC+u;else if(m.keyCode>=65&&m.keyCode<=90){const f=m.ctrlKey?m.keyCode-64:m.keyCode+32;let E=String.fromCharCode(f);m.shiftKey&&(E=E.toUpperCase()),b.key=d.C0.ESC+E}else if(m.keyCode===32)b.key=d.C0.ESC+(m.ctrlKey?d.C0.NUL:" ");else if(m.key==="Dead"&&m.code.startsWith("Key")){let f=m.code.slice(3,4);m.shiftKey||(f=f.toLowerCase()),b.key=d.C0.ESC+f,b.cancel=!0}}else m.keyCode>=65&&m.keyCode<=90?b.key=String.fromCharCode(m.keyCode-64):m.keyCode===32?b.key=d.C0.NUL:m.keyCode>=51&&m.keyCode<=55?b.key=String.fromCharCode(m.keyCode-51+27):m.keyCode===56?b.key=d.C0.DEL:m.keyCode===219?b.key=d.C0.ESC:m.keyCode===220?b.key=d.C0.FS:m.keyCode===221&&(b.key=d.C0.GS)}return b}},482:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(_){return _>65535?(_-=65536,String.fromCharCode(55296+(_>>10))+String.fromCharCode(_%1024+56320)):String.fromCharCode(_)},o.utf32ToString=function(_,d=0,p=_.length){let m="";for(let y=d;y<p;++y){let S=_[y];S>65535?(S-=65536,m+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):m+=String.fromCharCode(S)}return m},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(_,d){const p=_.length;if(!p)return 0;let m=0,y=0;if(this._interim){const S=_.charCodeAt(y++);56320<=S&&S<=57343?d[m++]=1024*(this._interim-55296)+S-56320+65536:(d[m++]=this._interim,d[m++]=S),this._interim=0}for(let S=y;S<p;++S){const A=_.charCodeAt(S);if(55296<=A&&A<=56319){if(++S>=p)return this._interim=A,m;const b=_.charCodeAt(S);56320<=b&&b<=57343?d[m++]=1024*(A-55296)+b-56320+65536:(d[m++]=A,d[m++]=b)}else A!==65279&&(d[m++]=A)}return m}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(_,d){const p=_.length;if(!p)return 0;let m,y,S,A,b=0,l=0,h=0;if(this.interim[0]){let E=!1,R=this.interim[0];R&=(224&R)==192?31:(240&R)==224?15:7;let L,x=0;for(;(L=63&this.interim[++x])&&x<4;)R<<=6,R|=L;const C=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,B=C-x;for(;h<B;){if(h>=p)return 0;if(L=_[h++],(192&L)!=128){h--,E=!0;break}this.interim[x++]=L,R<<=6,R|=63&L}E||(C===2?R<128?h--:d[b++]=R:C===3?R<2048||R>=55296&&R<=57343||R===65279||(d[b++]=R):R<65536||R>1114111||(d[b++]=R)),this.interim.fill(0)}const u=p-4;let f=h;for(;f<p;){for(;!(!(f<u)||128&(m=_[f])||128&(y=_[f+1])||128&(S=_[f+2])||128&(A=_[f+3]));)d[b++]=m,d[b++]=y,d[b++]=S,d[b++]=A,f+=4;if(m=_[f++],m<128)d[b++]=m;else if((224&m)==192){if(f>=p)return this.interim[0]=m,b;if(y=_[f++],(192&y)!=128){f--;continue}if(l=(31&m)<<6|63&y,l<128){f--;continue}d[b++]=l}else if((240&m)==224){if(f>=p)return this.interim[0]=m,b;if(y=_[f++],(192&y)!=128){f--;continue}if(f>=p)return this.interim[0]=m,this.interim[1]=y,b;if(S=_[f++],(192&S)!=128){f--;continue}if(l=(15&m)<<12|(63&y)<<6|63&S,l<2048||l>=55296&&l<=57343||l===65279)continue;d[b++]=l}else if((248&m)==240){if(f>=p)return this.interim[0]=m,b;if(y=_[f++],(192&y)!=128){f--;continue}if(f>=p)return this.interim[0]=m,this.interim[1]=y,b;if(S=_[f++],(192&S)!=128){f--;continue}if(f>=p)return this.interim[0]=m,this.interim[1]=y,this.interim[2]=S,b;if(A=_[f++],(192&A)!=128){f--;continue}if(l=(7&m)<<18|(63&y)<<12|(63&S)<<6|63&A,l<65536||l>1114111)continue;d[b++]=l}}return b}}},225:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const d=_(1480),p=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],m=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let y;o.UnicodeV6=class{constructor(){if(this.version="6",!y){y=new Uint8Array(65536),y.fill(1),y[0]=0,y.fill(0,1,32),y.fill(0,127,160),y.fill(2,4352,4448),y[9001]=2,y[9002]=2,y.fill(2,11904,42192),y[12351]=1,y.fill(2,44032,55204),y.fill(2,63744,64256),y.fill(2,65040,65050),y.fill(2,65072,65136),y.fill(2,65280,65377),y.fill(2,65504,65511);for(let S=0;S<p.length;++S)y.fill(0,p[S][0],p[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?y[S]:(function(A,b){let l,h=0,u=b.length-1;if(A<b[0][0]||A>b[u][1])return!1;for(;u>=h;)if(l=h+u>>1,A>b[l][1])h=l+1;else{if(!(A<b[l][0]))return!0;u=l-1}return!1})(S,m)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,A){let b=this.wcwidth(S),l=b===0&&A!==0;if(l){const h=d.UnicodeService.extractWidth(A);h===0?l=!1:h>b&&(b=h)}return d.UnicodeService.createPropertyValue(0,b,l)}}},5981:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const d=_(8460),p=_(844);class m extends p.Disposable{constructor(S){super(),this._action=S,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(S,A){if(A!==void 0&&this._syncCalls>A)return void(this._syncCalls=0);if(this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let b;for(this._isSyncWriting=!0;b=this._writeBuffer.shift();){this._action(b);const l=this._callbacks.shift();l&&l()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(S,A){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(A),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(A)}_innerWrite(S=0,A=!0){const b=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const l=this._writeBuffer[this._bufferOffset],h=this._action(l,A);if(h){const f=E=>Date.now()-b>=12?setTimeout((()=>this._innerWrite(0,E))):this._innerWrite(b,E);return void h.catch((E=>(queueMicrotask((()=>{throw E})),Promise.resolve(!1)))).then(f)}const u=this._callbacks[this._bufferOffset];if(u&&u(),this._bufferOffset++,this._pendingData-=l.length,Date.now()-b>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=m},5941:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const _=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,d=/^[\da-f]+$/;function p(m,y){const S=m.toString(16),A=S.length<2?"0"+S:S;switch(y){case 4:return S[0];case 8:return A;case 12:return(A+A).slice(0,3);default:return A+A}}o.parseColor=function(m){if(!m)return;let y=m.toLowerCase();if(y.indexOf("rgb:")===0){y=y.slice(4);const S=_.exec(y);if(S){const A=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/A*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/A*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/A*255)]}}else if(y.indexOf("#")===0&&(y=y.slice(1),d.exec(y)&&[3,6,9,12].includes(y.length))){const S=y.length/3,A=[0,0,0];for(let b=0;b<3;++b){const l=parseInt(y.slice(S*b,S*b+S),16);A[b]=S===1?l<<4:S===2?l:S===3?l>>4:l>>8}return A}},o.toRgbString=function(m,y=16){const[S,A,b]=m;return`rgb:${p(S,y)}/${p(A,y)}/${p(b,y)}`}},5770:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const d=_(482),p=_(8742),m=_(5770),y=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=y,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=y}registerHandler(A,b){this._handlers[A]===void 0&&(this._handlers[A]=[]);const l=this._handlers[A];return l.push(b),{dispose:()=>{const h=l.indexOf(b);h!==-1&&l.splice(h,1)}}}clearHandler(A){this._handlers[A]&&delete this._handlers[A]}setHandlerFallback(A){this._handlerFb=A}reset(){if(this._active.length)for(let A=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;A>=0;--A)this._active[A].unhook(!1);this._stack.paused=!1,this._active=y,this._ident=0}hook(A,b){if(this.reset(),this._ident=A,this._active=this._handlers[A]||y,this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].hook(b);else this._handlerFb(this._ident,"HOOK",b)}put(A,b,l){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(A,b,l);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(A,b,l))}unhook(A,b=!0){if(this._active.length){let l=!1,h=this._active.length-1,u=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,l=b,u=this._stack.fallThrough,this._stack.paused=!1),!u&&l===!1){for(;h>=0&&(l=this._active[h].unhook(A),l!==!0);h--)if(l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,l;h--}for(;h>=0;h--)if(l=this._active[h].unhook(!1),l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,l}else this._handlerFb(this._ident,"UNHOOK",A);this._active=y,this._ident=0}};const S=new p.Params;S.addParam(0),o.DcsHandler=class{constructor(A){this._handler=A,this._data="",this._params=S,this._hitLimit=!1}hook(A){this._params=A.length>1||A.params[0]?A.clone():S,this._data="",this._hitLimit=!1}put(A,b,l){this._hitLimit||(this._data+=(0,d.utf32ToString)(A,b,l),this._data.length>m.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(A){let b=!1;if(this._hitLimit)b=!1;else if(A&&(b=this._handler(this._data,this._params),b instanceof Promise))return b.then((l=>(this._params=S,this._data="",this._hitLimit=!1,l)));return this._params=S,this._data="",this._hitLimit=!1,b}}},2015:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const d=_(844),p=_(8742),m=_(6242),y=_(6351);class S{constructor(h){this.table=new Uint8Array(h)}setDefault(h,u){this.table.fill(h<<4|u)}add(h,u,f,E){this.table[u<<8|h]=f<<4|E}addMany(h,u,f,E){for(let R=0;R<h.length;R++)this.table[u<<8|h[R]]=f<<4|E}}o.TransitionTable=S;const A=160;o.VT500_TRANSITION_TABLE=(function(){const l=new S(4095),h=Array.apply(null,Array(256)).map(((x,C)=>C)),u=(x,C)=>h.slice(x,C),f=u(32,127),E=u(0,24);E.push(25),E.push.apply(E,u(28,32));const R=u(0,14);let L;for(L in l.setDefault(1,0),l.addMany(f,0,2,0),R)l.addMany([24,26,153,154],L,3,0),l.addMany(u(128,144),L,3,0),l.addMany(u(144,152),L,3,0),l.add(156,L,0,0),l.add(27,L,11,1),l.add(157,L,4,8),l.addMany([152,158,159],L,0,7),l.add(155,L,11,3),l.add(144,L,11,9);return l.addMany(E,0,3,0),l.addMany(E,1,3,1),l.add(127,1,0,1),l.addMany(E,8,0,8),l.addMany(E,3,3,3),l.add(127,3,0,3),l.addMany(E,4,3,4),l.add(127,4,0,4),l.addMany(E,6,3,6),l.addMany(E,5,3,5),l.add(127,5,0,5),l.addMany(E,2,3,2),l.add(127,2,0,2),l.add(93,1,4,8),l.addMany(f,8,5,8),l.add(127,8,5,8),l.addMany([156,27,24,26,7],8,6,0),l.addMany(u(28,32),8,0,8),l.addMany([88,94,95],1,0,7),l.addMany(f,7,0,7),l.addMany(E,7,0,7),l.add(156,7,0,0),l.add(127,7,0,7),l.add(91,1,11,3),l.addMany(u(64,127),3,7,0),l.addMany(u(48,60),3,8,4),l.addMany([60,61,62,63],3,9,4),l.addMany(u(48,60),4,8,4),l.addMany(u(64,127),4,7,0),l.addMany([60,61,62,63],4,0,6),l.addMany(u(32,64),6,0,6),l.add(127,6,0,6),l.addMany(u(64,127),6,0,0),l.addMany(u(32,48),3,9,5),l.addMany(u(32,48),5,9,5),l.addMany(u(48,64),5,0,6),l.addMany(u(64,127),5,7,0),l.addMany(u(32,48),4,9,5),l.addMany(u(32,48),1,9,2),l.addMany(u(32,48),2,9,2),l.addMany(u(48,127),2,10,0),l.addMany(u(48,80),1,10,0),l.addMany(u(81,88),1,10,0),l.addMany([89,90,92],1,10,0),l.addMany(u(96,127),1,10,0),l.add(80,1,11,9),l.addMany(E,9,0,9),l.add(127,9,0,9),l.addMany(u(28,32),9,0,9),l.addMany(u(32,48),9,9,12),l.addMany(u(48,60),9,8,10),l.addMany([60,61,62,63],9,9,10),l.addMany(E,11,0,11),l.addMany(u(32,128),11,0,11),l.addMany(u(28,32),11,0,11),l.addMany(E,10,0,10),l.add(127,10,0,10),l.addMany(u(28,32),10,0,10),l.addMany(u(48,60),10,8,10),l.addMany([60,61,62,63],10,0,11),l.addMany(u(32,48),10,9,12),l.addMany(E,12,0,12),l.add(127,12,0,12),l.addMany(u(28,32),12,0,12),l.addMany(u(32,48),12,9,12),l.addMany(u(48,64),12,0,11),l.addMany(u(64,127),12,12,13),l.addMany(u(64,127),10,12,13),l.addMany(u(64,127),9,12,13),l.addMany(E,13,13,13),l.addMany(f,13,13,13),l.add(127,13,0,13),l.addMany([27,156,24,26],13,14,0),l.add(A,0,2,0),l.add(A,8,5,8),l.add(A,6,0,6),l.add(A,11,0,11),l.add(A,13,13,13),l})();class b extends d.Disposable{constructor(h=o.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(u,f,E)=>{},this._executeHandlerFb=u=>{},this._csiHandlerFb=(u,f)=>{},this._escHandlerFb=u=>{},this._errorHandlerFb=u=>u,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new m.OscParser),this._dcsParser=this.register(new y.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,u=[64,126]){let f=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(f=h.prefix.charCodeAt(0),f&&60>f||f>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let R=0;R<h.intermediates.length;++R){const L=h.intermediates.charCodeAt(R);if(32>L||L>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");f<<=8,f|=L}}if(h.final.length!==1)throw new Error("final must be a single byte");const E=h.final.charCodeAt(0);if(u[0]>E||E>u[1])throw new Error(`final must be in range ${u[0]} .. ${u[1]}`);return f<<=8,f|=E,f}identToString(h){const u=[];for(;h;)u.push(String.fromCharCode(255&h)),h>>=8;return u.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,u){const f=this._identifier(h,[48,126]);this._escHandlers[f]===void 0&&(this._escHandlers[f]=[]);const E=this._escHandlers[f];return E.push(u),{dispose:()=>{const R=E.indexOf(u);R!==-1&&E.splice(R,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,u){this._executeHandlers[h.charCodeAt(0)]=u}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,u){const f=this._identifier(h);this._csiHandlers[f]===void 0&&(this._csiHandlers[f]=[]);const E=this._csiHandlers[f];return E.push(u),{dispose:()=>{const R=E.indexOf(u);R!==-1&&E.splice(R,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,u){return this._dcsParser.registerHandler(this._identifier(h),u)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,u){return this._oscParser.registerHandler(h,u)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(h,u,f,E,R){this._parseStack.state=h,this._parseStack.handlers=u,this._parseStack.handlerPos=f,this._parseStack.transition=E,this._parseStack.chunkPos=R}parse(h,u,f){let E,R=0,L=0,x=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,x=this._parseStack.chunkPos+1;else{if(f===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const C=this._parseStack.handlers;let B=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(f===!1&&B>-1){for(;B>=0&&(E=C[B](this._params),E!==!0);B--)if(E instanceof Promise)return this._parseStack.handlerPos=B,E}this._parseStack.handlers=[];break;case 4:if(f===!1&&B>-1){for(;B>=0&&(E=C[B](),E!==!0);B--)if(E instanceof Promise)return this._parseStack.handlerPos=B,E}this._parseStack.handlers=[];break;case 6:if(R=h[this._parseStack.chunkPos],E=this._dcsParser.unhook(R!==24&&R!==26,f),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(R=h[this._parseStack.chunkPos],E=this._oscParser.end(R!==24&&R!==26,f),E)return E;R===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,x=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let C=x;C<u;++C){switch(R=h[C],L=this._transitions.table[this.currentState<<8|(R<160?R:A)],L>>4){case 2:for(let Q=C+1;;++Q){if(Q>=u||(R=h[Q])<32||R>126&&R<A){this._printHandler(h,C,Q),C=Q-1;break}if(++Q>=u||(R=h[Q])<32||R>126&&R<A){this._printHandler(h,C,Q),C=Q-1;break}if(++Q>=u||(R=h[Q])<32||R>126&&R<A){this._printHandler(h,C,Q),C=Q-1;break}if(++Q>=u||(R=h[Q])<32||R>126&&R<A){this._printHandler(h,C,Q),C=Q-1;break}}break;case 3:this._executeHandlers[R]?this._executeHandlers[R]():this._executeHandlerFb(R),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:C,code:R,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const B=this._csiHandlers[this._collect<<8|R];let z=B?B.length-1:-1;for(;z>=0&&(E=B[z](this._params),E!==!0);z--)if(E instanceof Promise)return this._preserveStack(3,B,z,L,C),E;z<0&&this._csiHandlerFb(this._collect<<8|R,this._params),this.precedingJoinState=0;break;case 8:do switch(R){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(R-48)}while(++C<u&&(R=h[C])>47&&R<60);C--;break;case 9:this._collect<<=8,this._collect|=R;break;case 10:const I=this._escHandlers[this._collect<<8|R];let F=I?I.length-1:-1;for(;F>=0&&(E=I[F](),E!==!0);F--)if(E instanceof Promise)return this._preserveStack(4,I,F,L,C),E;F<0&&this._escHandlerFb(this._collect<<8|R),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|R,this._params);break;case 13:for(let Q=C+1;;++Q)if(Q>=u||(R=h[Q])===24||R===26||R===27||R>127&&R<A){this._dcsParser.put(h,C,Q),C=Q-1;break}break;case 14:if(E=this._dcsParser.unhook(R!==24&&R!==26),E)return this._preserveStack(6,[],0,L,C),E;R===27&&(L|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let Q=C+1;;Q++)if(Q>=u||(R=h[Q])<32||R>127&&R<A){this._oscParser.put(h,C,Q),C=Q-1;break}break;case 6:if(E=this._oscParser.end(R!==24&&R!==26),E)return this._preserveStack(5,[],0,L,C),E;R===27&&(L|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&L}}}o.EscapeSequenceParser=b},6242:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const d=_(5770),p=_(482),m=[];o.OscParser=class{constructor(){this._state=0,this._active=m,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(y,S){this._handlers[y]===void 0&&(this._handlers[y]=[]);const A=this._handlers[y];return A.push(S),{dispose:()=>{const b=A.indexOf(S);b!==-1&&A.splice(b,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=m}reset(){if(this._state===2)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].end(!1);this._stack.paused=!1,this._active=m,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||m,this._active.length)for(let y=this._active.length-1;y>=0;y--)this._active[y].start();else this._handlerFb(this._id,"START")}_put(y,S,A){if(this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].put(y,S,A);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(y,S,A))}start(){this.reset(),this._state=1}put(y,S,A){if(this._state!==3){if(this._state===1)for(;S<A;){const b=y[S++];if(b===59){this._state=2,this._start();break}if(b<48||57<b)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+b-48}this._state===2&&A-S>0&&this._put(y,S,A)}}end(y,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let A=!1,b=this._active.length-1,l=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,A=S,l=this._stack.fallThrough,this._stack.paused=!1),!l&&A===!1){for(;b>=0&&(A=this._active[b].end(y),A!==!0);b--)if(A instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,A;b--}for(;b>=0;b--)if(A=this._active[b].end(!1),A instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,A}else this._handlerFb(this._id,"END",y);this._active=m,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(y){this._handler=y,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(y,S,A){this._hitLimit||(this._data+=(0,p.utf32ToString)(y,S,A),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(y){let S=!1;if(this._hitLimit)S=!1;else if(y&&(S=this._handler(this._data),S instanceof Promise))return S.then((A=>(this._data="",this._hitLimit=!1,A)));return this._data="",this._hitLimit=!1,S}}},8742:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const _=2147483647;class d{static fromArray(m){const y=new d;if(!m.length)return y;for(let S=Array.isArray(m[0])?1:0;S<m.length;++S){const A=m[S];if(Array.isArray(A))for(let b=0;b<A.length;++b)y.addSubParam(A[b]);else y.addParam(A)}return y}constructor(m=32,y=32){if(this.maxLength=m,this.maxSubParamsLength=y,y>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(m),this.length=0,this._subParams=new Int32Array(y),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(m),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const m=new d(this.maxLength,this.maxSubParamsLength);return m.params.set(this.params),m.length=this.length,m._subParams.set(this._subParams),m._subParamsLength=this._subParamsLength,m._subParamsIdx.set(this._subParamsIdx),m._rejectDigits=this._rejectDigits,m._rejectSubDigits=this._rejectSubDigits,m._digitIsSub=this._digitIsSub,m}toArray(){const m=[];for(let y=0;y<this.length;++y){m.push(this.params[y]);const S=this._subParamsIdx[y]>>8,A=255&this._subParamsIdx[y];A-S>0&&m.push(Array.prototype.slice.call(this._subParams,S,A))}return m}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(m){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(m<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=m>_?_:m}}addSubParam(m){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(m<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=m>_?_:m,this._subParamsIdx[this.length-1]++}}hasSubParams(m){return(255&this._subParamsIdx[m])-(this._subParamsIdx[m]>>8)>0}getSubParams(m){const y=this._subParamsIdx[m]>>8,S=255&this._subParamsIdx[m];return S-y>0?this._subParams.subarray(y,S):null}getSubParamsAll(){const m={};for(let y=0;y<this.length;++y){const S=this._subParamsIdx[y]>>8,A=255&this._subParamsIdx[y];A-S>0&&(m[y]=this._subParams.slice(S,A))}return m}addDigit(m){let y;if(this._rejectDigits||!(y=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,A=S[y-1];S[y-1]=~A?Math.min(10*A+m,_):m}}o.Params=d},5741:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let _=this._addons.length-1;_>=0;_--)this._addons[_].instance.dispose()}loadAddon(_,d){const p={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(p),d.dispose=()=>this._wrappedAddonDispose(p),d.activate(_)}_wrappedAddonDispose(_){if(_.isDisposed)return;let d=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===_){d=p;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");_.isDisposed=!0,_.dispose.apply(_.instance),this._addons.splice(d,1)}}},8771:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const d=_(3785),p=_(511);o.BufferApiView=class{constructor(m,y){this._buffer=m,this.type=y}init(m){return this._buffer=m,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(m){const y=this._buffer.lines.get(m);if(y)return new d.BufferLineApiView(y)}getNullCell(){return new p.CellData}}},3785:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const d=_(511);o.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,m){if(!(p<0||p>=this._line.length))return m?(this._line.loadCell(p,m),m):this._line.loadCell(p,new d.CellData)}translateToString(p,m,y){return this._line.translateToString(p,m,y)}}},8285:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const d=_(8771),p=_(8460),m=_(844);class y extends m.Disposable{constructor(A){super(),this._core=A,this._onBufferChange=this.register(new p.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=y},7975:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(_){this._core=_}registerCsiHandler(_,d){return this._core.registerCsiHandler(_,(p=>d(p.toArray())))}addCsiHandler(_,d){return this.registerCsiHandler(_,d)}registerDcsHandler(_,d){return this._core.registerDcsHandler(_,((p,m)=>d(p,m.toArray())))}addDcsHandler(_,d){return this.registerDcsHandler(_,d)}registerEscHandler(_,d){return this._core.registerEscHandler(_,d)}addEscHandler(_,d){return this.registerEscHandler(_,d)}registerOscHandler(_,d){return this._core.registerOscHandler(_,d)}addOscHandler(_,d){return this.registerOscHandler(_,d)}}},7090:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(_){this._core=_}register(_){this._core.unicodeService.register(_)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(_){this._core.unicodeService.activeVersion=_}}},744:function(M,o,_){var d=this&&this.__decorate||function(l,h,u,f){var E,R=arguments.length,L=R<3?h:f===null?f=Object.getOwnPropertyDescriptor(h,u):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(l,h,u,f);else for(var x=l.length-1;x>=0;x--)(E=l[x])&&(L=(R<3?E(L):R>3?E(h,u,L):E(h,u))||L);return R>3&&L&&Object.defineProperty(h,u,L),L},p=this&&this.__param||function(l,h){return function(u,f){h(u,f,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const m=_(8460),y=_(844),S=_(5295),A=_(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let b=o.BufferService=class extends y.Disposable{get buffer(){return this.buffers.active}constructor(l){super(),this.isUserScrolling=!1,this._onResize=this.register(new m.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new m.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(l.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(l.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(l,this))}resize(l,h){this.cols=l,this.rows=h,this.buffers.resize(l,h),this._onResize.fire({cols:l,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(l,h=!1){const u=this.buffer;let f;f=this._cachedBlankLine,f&&f.length===this.cols&&f.getFg(0)===l.fg&&f.getBg(0)===l.bg||(f=u.getBlankLine(l,h),this._cachedBlankLine=f),f.isWrapped=h;const E=u.ybase+u.scrollTop,R=u.ybase+u.scrollBottom;if(u.scrollTop===0){const L=u.lines.isFull;R===u.lines.length-1?L?u.lines.recycle().copyFrom(f):u.lines.push(f.clone()):u.lines.splice(R+1,0,f.clone()),L?this.isUserScrolling&&(u.ydisp=Math.max(u.ydisp-1,0)):(u.ybase++,this.isUserScrolling||u.ydisp++)}else{const L=R-E+1;u.lines.shiftElements(E+1,L-1,-1),u.lines.set(R,f.clone())}this.isUserScrolling||(u.ydisp=u.ybase),this._onScroll.fire(u.ydisp)}scrollLines(l,h,u){const f=this.buffer;if(l<0){if(f.ydisp===0)return;this.isUserScrolling=!0}else l+f.ydisp>=f.ybase&&(this.isUserScrolling=!1);const E=f.ydisp;f.ydisp=Math.max(Math.min(f.ydisp+l,f.ybase),0),E!==f.ydisp&&(h||this._onScroll.fire(f.ydisp))}};o.BufferService=b=d([p(0,A.IOptionsService)],b)},7994:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(_){this.glevel=_,this.charset=this._charsets[_]}setgCharset(_,d){this._charsets[_]=d,this.glevel===_&&(this.charset=d)}}},1753:function(M,o,_){var d=this&&this.__decorate||function(f,E,R,L){var x,C=arguments.length,B=C<3?E:L===null?L=Object.getOwnPropertyDescriptor(E,R):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(f,E,R,L);else for(var z=f.length-1;z>=0;z--)(x=f[z])&&(B=(C<3?x(B):C>3?x(E,R,B):x(E,R))||B);return C>3&&B&&Object.defineProperty(E,R,B),B},p=this&&this.__param||function(f,E){return function(R,L){E(R,L,f)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const m=_(2585),y=_(8460),S=_(844),A={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:f=>f.button!==4&&f.action===1&&(f.ctrl=!1,f.alt=!1,f.shift=!1,!0)},VT200:{events:19,restrict:f=>f.action!==32},DRAG:{events:23,restrict:f=>f.action!==32||f.button!==3},ANY:{events:31,restrict:f=>!0}};function b(f,E){let R=(f.ctrl?16:0)|(f.shift?4:0)|(f.alt?8:0);return f.button===4?(R|=64,R|=f.action):(R|=3&f.button,4&f.button&&(R|=64),8&f.button&&(R|=128),f.action===32?R|=32:f.action!==0||E||(R|=3)),R}const l=String.fromCharCode,h={DEFAULT:f=>{const E=[b(f,!1)+32,f.col+32,f.row+32];return E[0]>255||E[1]>255||E[2]>255?"":`\x1B[M${l(E[0])}${l(E[1])}${l(E[2])}`},SGR:f=>{const E=f.action===0&&f.button!==4?"m":"M";return`\x1B[<${b(f,!0)};${f.col};${f.row}${E}`},SGR_PIXELS:f=>{const E=f.action===0&&f.button!==4?"m":"M";return`\x1B[<${b(f,!0)};${f.x};${f.y}${E}`}};let u=o.CoreMouseService=class extends S.Disposable{constructor(f,E){super(),this._bufferService=f,this._coreService=E,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new y.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const R of Object.keys(A))this.addProtocol(R,A[R]);for(const R of Object.keys(h))this.addEncoding(R,h[R]);this.reset()}addProtocol(f,E){this._protocols[f]=E}addEncoding(f,E){this._encodings[f]=E}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(f){if(!this._protocols[f])throw new Error(`unknown protocol "${f}"`);this._activeProtocol=f,this._onProtocolChange.fire(this._protocols[f].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(f){if(!this._encodings[f])throw new Error(`unknown encoding "${f}"`);this._activeEncoding=f}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(f){if(f.col<0||f.col>=this._bufferService.cols||f.row<0||f.row>=this._bufferService.rows||f.button===4&&f.action===32||f.button===3&&f.action!==32||f.button!==4&&(f.action===2||f.action===3)||(f.col++,f.row++,f.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,f,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(f))return!1;const E=this._encodings[this._activeEncoding](f);return E&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(E):this._coreService.triggerDataEvent(E,!0)),this._lastEvent=f,!0}explainEvents(f){return{down:!!(1&f),up:!!(2&f),drag:!!(4&f),move:!!(8&f),wheel:!!(16&f)}}_equalEvents(f,E,R){if(R){if(f.x!==E.x||f.y!==E.y)return!1}else if(f.col!==E.col||f.row!==E.row)return!1;return f.button===E.button&&f.action===E.action&&f.ctrl===E.ctrl&&f.alt===E.alt&&f.shift===E.shift}};o.CoreMouseService=u=d([p(0,m.IBufferService),p(1,m.ICoreService)],u)},6975:function(M,o,_){var d=this&&this.__decorate||function(u,f,E,R){var L,x=arguments.length,C=x<3?f:R===null?R=Object.getOwnPropertyDescriptor(f,E):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(u,f,E,R);else for(var B=u.length-1;B>=0;B--)(L=u[B])&&(C=(x<3?L(C):x>3?L(f,E,C):L(f,E))||C);return x>3&&C&&Object.defineProperty(f,E,C),C},p=this&&this.__param||function(u,f){return function(E,R){f(E,R,u)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const m=_(1439),y=_(8460),S=_(844),A=_(2585),b=Object.freeze({insertMode:!1}),l=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=o.CoreService=class extends S.Disposable{constructor(u,f,E){super(),this._bufferService=u,this._logService=f,this._optionsService=E,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new y.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new y.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new y.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new y.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,m.clone)(b),this.decPrivateModes=(0,m.clone)(l)}reset(){this.modes=(0,m.clone)(b),this.decPrivateModes=(0,m.clone)(l)}triggerDataEvent(u,f=!1){if(this._optionsService.rawOptions.disableStdin)return;const E=this._bufferService.buffer;f&&this._optionsService.rawOptions.scrollOnUserInput&&E.ybase!==E.ydisp&&this._onRequestScrollToBottom.fire(),f&&this._onUserInput.fire(),this._logService.debug(`sending data "${u}"`,(()=>u.split("").map((R=>R.charCodeAt(0))))),this._onData.fire(u)}triggerBinaryEvent(u){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${u}"`,(()=>u.split("").map((f=>f.charCodeAt(0))))),this._onBinary.fire(u))}};o.CoreService=h=d([p(0,A.IBufferService),p(1,A.ILogService),p(2,A.IOptionsService)],h)},9074:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const d=_(8055),p=_(8460),m=_(844),y=_(6106);let S=0,A=0;class b extends m.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new y.SortedList((u=>u==null?void 0:u.marker.line)),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,m.toDisposable)((()=>this.reset())))}registerDecoration(u){if(u.marker.isDisposed)return;const f=new l(u);if(f){const E=f.marker.onDispose((()=>f.dispose()));f.onDispose((()=>{f&&(this._decorations.delete(f)&&this._onDecorationRemoved.fire(f),E.dispose())})),this._decorations.insert(f),this._onDecorationRegistered.fire(f)}return f}reset(){for(const u of this._decorations.values())u.dispose();this._decorations.clear()}*getDecorationsAtCell(u,f,E){let R=0,L=0;for(const x of this._decorations.getKeyIterator(f))R=x.options.x??0,L=R+(x.options.width??1),u>=R&&u<L&&(!E||(x.options.layer??"bottom")===E)&&(yield x)}forEachDecorationAtCell(u,f,E,R){this._decorations.forEachByKey(f,(L=>{S=L.options.x??0,A=S+(L.options.width??1),u>=S&&u<A&&(!E||(L.options.layer??"bottom")===E)&&R(L)}))}}o.DecorationService=b;class l extends m.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(u){super(),this.options=u,this.onRenderEmitter=this.register(new p.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=u.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const d=_(2585),p=_(8343);class m{constructor(...S){this._entries=new Map;for(const[A,b]of S)this.set(A,b)}set(S,A){const b=this._entries.get(S);return this._entries.set(S,A),b}forEach(S){for(const[A,b]of this._entries.entries())S(A,b)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}o.ServiceCollection=m,o.InstantiationService=class{constructor(){this._services=new m,this._services.set(d.IInstantiationService,this)}setService(y,S){this._services.set(y,S)}getService(y){return this._services.get(y)}createInstance(y,...S){const A=(0,p.getServiceDependencies)(y).sort(((h,u)=>h.index-u.index)),b=[];for(const h of A){const u=this._services.get(h.id);if(!u)throw new Error(`[createInstance] ${y.name} depends on UNKNOWN service ${h.id}.`);b.push(u)}const l=A.length>0?A[0].index:S.length;if(S.length!==l)throw new Error(`[createInstance] First service dependency of ${y.name} at position ${l+1} conflicts with ${S.length} static arguments`);return new y(...S,...b)}}},7866:function(M,o,_){var d=this&&this.__decorate||function(l,h,u,f){var E,R=arguments.length,L=R<3?h:f===null?f=Object.getOwnPropertyDescriptor(h,u):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(l,h,u,f);else for(var x=l.length-1;x>=0;x--)(E=l[x])&&(L=(R<3?E(L):R>3?E(h,u,L):E(h,u))||L);return R>3&&L&&Object.defineProperty(h,u,L),L},p=this&&this.__param||function(l,h){return function(u,f){h(u,f,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const m=_(844),y=_(2585),S={trace:y.LogLevelEnum.TRACE,debug:y.LogLevelEnum.DEBUG,info:y.LogLevelEnum.INFO,warn:y.LogLevelEnum.WARN,error:y.LogLevelEnum.ERROR,off:y.LogLevelEnum.OFF};let A,b=o.LogService=class extends m.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=y.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),A=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(l){for(let h=0;h<l.length;h++)typeof l[h]=="function"&&(l[h]=l[h]())}_log(l,h,u){this._evalLazyOptionalParams(u),l.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...u)}trace(l,...h){var u;this._logLevel<=y.LogLevelEnum.TRACE&&this._log(((u=this._optionsService.options.logger)==null?void 0:u.trace.bind(this._optionsService.options.logger))??console.log,l,h)}debug(l,...h){var u;this._logLevel<=y.LogLevelEnum.DEBUG&&this._log(((u=this._optionsService.options.logger)==null?void 0:u.debug.bind(this._optionsService.options.logger))??console.log,l,h)}info(l,...h){var u;this._logLevel<=y.LogLevelEnum.INFO&&this._log(((u=this._optionsService.options.logger)==null?void 0:u.info.bind(this._optionsService.options.logger))??console.info,l,h)}warn(l,...h){var u;this._logLevel<=y.LogLevelEnum.WARN&&this._log(((u=this._optionsService.options.logger)==null?void 0:u.warn.bind(this._optionsService.options.logger))??console.warn,l,h)}error(l,...h){var u;this._logLevel<=y.LogLevelEnum.ERROR&&this._log(((u=this._optionsService.options.logger)==null?void 0:u.error.bind(this._optionsService.options.logger))??console.error,l,h)}};o.LogService=b=d([p(0,y.IOptionsService)],b),o.setTraceLogger=function(l){A=l},o.traceCall=function(l,h,u){if(typeof u.value!="function")throw new Error("not supported");const f=u.value;u.value=function(...E){if(A.logLevel!==y.LogLevelEnum.TRACE)return f.apply(this,E);A.trace(`GlyphRenderer#${f.name}(${E.map((L=>JSON.stringify(L))).join(", ")})`);const R=f.apply(this,E);return A.trace(`GlyphRenderer#${f.name} return`,R),R}}},7302:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const d=_(8460),p=_(844),m=_(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:m.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const y=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends p.Disposable{constructor(b){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const l={...o.DEFAULT_OPTIONS};for(const h in b)if(h in l)try{const u=b[h];l[h]=this._sanitizeAndValidateOption(h,u)}catch(u){console.error(u)}this.rawOptions=l,this.options={...l},this._setupOptions()}onSpecificOptionChange(b,l){return this.onOptionChange((h=>{h===b&&l(this.rawOptions[b])}))}onMultipleOptionChange(b,l){return this.onOptionChange((h=>{b.indexOf(h)!==-1&&l()}))}_setupOptions(){const b=h=>{if(!(h in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},l=(h,u)=>{if(!(h in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);u=this._sanitizeAndValidateOption(h,u),this.rawOptions[h]!==u&&(this.rawOptions[h]=u,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const u={get:b.bind(this,h),set:l.bind(this,h)};Object.defineProperty(this.options,h,u)}}_sanitizeAndValidateOption(b,l){switch(b){case"cursorStyle":if(l||(l=o.DEFAULT_OPTIONS[b]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(l))throw new Error(`"${l}" is not a valid value for ${b}`);break;case"wordSeparator":l||(l=o.DEFAULT_OPTIONS[b]);break;case"fontWeight":case"fontWeightBold":if(typeof l=="number"&&1<=l&&l<=1e3)break;l=y.includes(l)?l:o.DEFAULT_OPTIONS[b];break;case"cursorWidth":l=Math.floor(l);case"lineHeight":case"tabStopWidth":if(l<1)throw new Error(`${b} cannot be less than 1, value: ${l}`);break;case"minimumContrastRatio":l=Math.max(1,Math.min(21,Math.round(10*l)/10));break;case"scrollback":if((l=Math.min(l,4294967295))<0)throw new Error(`${b} cannot be less than 0, value: ${l}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(l<=0)throw new Error(`${b} cannot be less than or equal to 0, value: ${l}`);break;case"rows":case"cols":if(!l&&l!==0)throw new Error(`${b} must be numeric, value: ${l}`);break;case"windowsPty":l=l??{}}return l}}o.OptionsService=S},2660:function(M,o,_){var d=this&&this.__decorate||function(S,A,b,l){var h,u=arguments.length,f=u<3?A:l===null?l=Object.getOwnPropertyDescriptor(A,b):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(S,A,b,l);else for(var E=S.length-1;E>=0;E--)(h=S[E])&&(f=(u<3?h(f):u>3?h(A,b,f):h(A,b))||f);return u>3&&f&&Object.defineProperty(A,b,f),f},p=this&&this.__param||function(S,A){return function(b,l){A(b,l,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const m=_(2585);let y=o.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const A=this._bufferService.buffer;if(S.id===void 0){const E=A.addMarker(A.ybase+A.y),R={data:S,id:this._nextId++,lines:[E]};return E.onDispose((()=>this._removeMarkerFromLink(R,E))),this._dataByLinkId.set(R.id,R),R.id}const b=S,l=this._getEntryIdKey(b),h=this._entriesWithId.get(l);if(h)return this.addLineToLink(h.id,A.ybase+A.y),h.id;const u=A.addMarker(A.ybase+A.y),f={id:this._nextId++,key:this._getEntryIdKey(b),data:b,lines:[u]};return u.onDispose((()=>this._removeMarkerFromLink(f,u))),this._entriesWithId.set(f.key,f),this._dataByLinkId.set(f.id,f),f.id}addLineToLink(S,A){const b=this._dataByLinkId.get(S);if(b&&b.lines.every((l=>l.line!==A))){const l=this._bufferService.buffer.addMarker(A);b.lines.push(l),l.onDispose((()=>this._removeMarkerFromLink(b,l)))}}getLinkData(S){var A;return(A=this._dataByLinkId.get(S))==null?void 0:A.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,A){const b=S.lines.indexOf(A);b!==-1&&(S.lines.splice(b,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};o.OscLinkService=y=d([p(0,m.IBufferService)],y)},8343:(M,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const _="di$target",d="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(p){return p[d]||[]},o.createDecorator=function(p){if(o.serviceRegistry.has(p))return o.serviceRegistry.get(p);const m=function(y,S,A){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(b,l,h){l[_]===l?l[d].push({id:b,index:h}):(l[d]=[{id:b,index:h}],l[_]=l)})(m,y,A)};return m.toString=()=>p,o.serviceRegistry.set(p,m),m}},2585:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const d=_(8343);var p;o.IBufferService=(0,d.createDecorator)("BufferService"),o.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),o.ICoreService=(0,d.createDecorator)("CoreService"),o.ICharsetService=(0,d.createDecorator)("CharsetService"),o.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(m){m[m.TRACE=0]="TRACE",m[m.DEBUG=1]="DEBUG",m[m.INFO=2]="INFO",m[m.WARN=3]="WARN",m[m.ERROR=4]="ERROR",m[m.OFF=5]="OFF"})(p||(o.LogLevelEnum=p={})),o.ILogService=(0,d.createDecorator)("LogService"),o.IOptionsService=(0,d.createDecorator)("OptionsService"),o.IOscLinkService=(0,d.createDecorator)("OscLinkService"),o.IUnicodeService=(0,d.createDecorator)("UnicodeService"),o.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(M,o,_)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const d=_(8460),p=_(225);class m{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,A,b=!1){return(16777215&S)<<3|(3&A)<<1|(b?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const S=new p.UnicodeV6;this.register(S),this._active=S.version,this._activeProvider=S}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(S){if(!this._providers[S])throw new Error(`unknown Unicode version "${S}"`);this._active=S,this._activeProvider=this._providers[S],this._onChange.fire(S)}register(S){this._providers[S.version]=S}wcwidth(S){return this._activeProvider.wcwidth(S)}getStringCellWidth(S){let A=0,b=0;const l=S.length;for(let h=0;h<l;++h){let u=S.charCodeAt(h);if(55296<=u&&u<=56319){if(++h>=l)return A+this.wcwidth(u);const R=S.charCodeAt(h);56320<=R&&R<=57343?u=1024*(u-55296)+R-56320+65536:A+=this.wcwidth(R)}const f=this.charProperties(u,b);let E=m.extractWidth(f);m.extractShouldJoin(f)&&(E-=m.extractWidth(b)),A+=E,b=f}return A}charProperties(S,A){return this._activeProvider.charProperties(S,A)}}o.UnicodeService=m}},g={};function w(M){var o=g[M];if(o!==void 0)return o.exports;var _=g[M]={exports:{}};return c[M].call(_.exports,_,_.exports,w),_.exports}var T={};return(()=>{var M=T;Object.defineProperty(M,"__esModule",{value:!0}),M.Terminal=void 0;const o=w(9042),_=w(3236),d=w(844),p=w(5741),m=w(8285),y=w(7975),S=w(7090),A=["cols","rows"];class b extends d.Disposable{constructor(h){super(),this._core=this.register(new _.Terminal(h)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const u=E=>this._core.options[E],f=(E,R)=>{this._checkReadonlyOptions(E),this._core.options[E]=R};for(const E in this._core.options){const R={get:u.bind(this,E),set:f.bind(this,E)};Object.defineProperty(this._publicOptions,E,R)}}_checkReadonlyOptions(h){if(A.includes(h))throw new Error(`Option "${h}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new y.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new S.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new m.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const h=this._core.coreService.decPrivateModes;let u="none";switch(this._core.coreMouseService.activeProtocol){case"X10":u="x10";break;case"VT200":u="vt200";break;case"DRAG":u="drag";break;case"ANY":u="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:u,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const u in h)this._publicOptions[u]=h[u]}blur(){this._core.blur()}focus(){this._core.focus()}resize(h,u){this._verifyIntegers(h,u),this._core.resize(h,u)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,u,f){this._verifyIntegers(h,u,f),this._core.select(h,u,f)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,u){this._verifyIntegers(h,u),this._core.selectLines(h,u)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,u){this._core.write(h,u)}writeln(h,u){this._core.write(h),this._core.write(`\r
69
+ `,u)}paste(h){this._core.paste(h)}refresh(h,u){this._verifyIntegers(h,u),this._core.refresh(h,u)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return o}_verifyIntegers(...h){for(const u of h)if(u===1/0||isNaN(u)||u%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const u of h)if(u&&(u===1/0||isNaN(u)||u%1!=0||u<0))throw new Error("This API only accepts positive integers")}}M.Terminal=b})(),T})()))})(ph)),ph.exports}var T1=A1(),yh={exports:{}},zm;function M1(){return zm||(zm=1,(function(s,n){(function(c,g){s.exports=g()})(self,(()=>(()=>{var c={};return(()=>{var g=c;Object.defineProperty(g,"__esModule",{value:!0}),g.FitAddon=void 0,g.FitAddon=class{activate(w){this._terminal=w}dispose(){}fit(){const w=this.proposeDimensions();if(!w||!this._terminal||isNaN(w.cols)||isNaN(w.rows))return;const T=this._terminal._core;this._terminal.rows===w.rows&&this._terminal.cols===w.cols||(T._renderService.clear(),this._terminal.resize(w.cols,w.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const w=this._terminal._core,T=w._renderService.dimensions;if(T.css.cell.width===0||T.css.cell.height===0)return;const M=this._terminal.options.scrollback===0?0:w.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),_=parseInt(o.getPropertyValue("height")),d=Math.max(0,parseInt(o.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),m=_-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),y=d-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-M;return{cols:Math.max(2,Math.floor(y/T.css.cell.width)),rows:Math.max(1,Math.floor(m/T.css.cell.height))}}}})(),c})()))})(yh)),yh.exports}var L1=M1();class O1{constructor(n,c){Mo(this,"ws",null);Mo(this,"handlers");Mo(this,"sessionId");this.sessionId=n,this.handlers=c}connect(){const n=window.location.protocol==="https:"?"wss:":"ws:",c=window.location.host,g=`${n}//${c}/api/sessions/${this.sessionId}/terminal?sessionId=${this.sessionId}`;this.ws=new WebSocket(g),this.ws.onopen=()=>{var w,T;(T=(w=this.handlers).onOpen)==null||T.call(w)},this.ws.onmessage=w=>{try{const T=JSON.parse(w.data);this.handleServerMessage(T)}catch(T){console.error("Failed to parse WebSocket message:",T)}},this.ws.onerror=w=>{var T,M;console.error("WebSocket error:",w),(M=(T=this.handlers).onError)==null||M.call(T,"WebSocket connection error")},this.ws.onclose=()=>{var w,T;(T=(w=this.handlers).onClose)==null||T.call(w)}}handleServerMessage(n){var c,g,w,T,M,o,_,d;switch(n.type){case"output":{const p=n;(g=(c=this.handlers).onOutput)==null||g.call(c,p.data);break}case"exit":{const p=n;(T=(w=this.handlers).onExit)==null||T.call(w,p.data.code,p.data.signal);break}case"error":{const p=n;(o=(M=this.handlers).onError)==null||o.call(M,p.data.message);break}case"pong":{(d=(_=this.handlers).onPong)==null||d.call(_);break}default:{console.warn("Unknown server message type:",n.type);break}}}sendInput(n){if(!this.ws||this.ws.readyState!==WebSocket.OPEN){console.error("WebSocket is not connected");return}const c={type:"input",data:n,timestamp:new Date().toISOString()};this.ws.send(JSON.stringify(c))}sendResize(n,c){if(!this.ws||this.ws.readyState!==WebSocket.OPEN){console.error("WebSocket is not connected");return}const g={type:"resize",data:{cols:n,rows:c},timestamp:new Date().toISOString()};this.ws.send(JSON.stringify(g))}sendPing(){if(!this.ws||this.ws.readyState!==WebSocket.OPEN){console.error("WebSocket is not connected");return}const n={type:"ping",timestamp:new Date().toISOString()};this.ws.send(JSON.stringify(n))}disconnect(){this.ws&&(this.ws.close(),this.ws=null)}isConnected(){return this.ws!==null&&this.ws.readyState===WebSocket.OPEN}}function B1({sessionId:s,onExit:n,onError:c}){const g=$.useRef(null),w=$.useRef(null),T=$.useRef(null),M=$.useRef(null);return $.useEffect(()=>{if(!g.current)return;const o=new T1.Terminal({cursorBlink:!0,fontSize:14,fontFamily:'"Cascadia Code", "SF Mono", Monaco, Consolas, monospace',theme:{background:"#1e1e1e",foreground:"#d4d4d4",cursor:"#aeafad",black:"#000000",red:"#cd3131",green:"#0dbc79",yellow:"#e5e510",blue:"#2472c8",magenta:"#bc3fbc",cyan:"#11a8cd",white:"#e5e5e5",brightBlack:"#666666",brightRed:"#f14c4c",brightGreen:"#23d18b",brightYellow:"#f5f543",brightBlue:"#3b8eea",brightMagenta:"#d670d6",brightCyan:"#29b8db",brightWhite:"#ffffff"}}),_=new L1.FitAddon;o.loadAddon(_),o.open(g.current),_.fit(),w.current=o,T.current=_;const d=new O1(s,{onOutput:y=>{o.write(y)},onExit:y=>{o.write(`\r
70
+ \r
71
+ [Process exited with code ${y}]\r
72
+ `),n==null||n(y)},onError:y=>{o.write(`\r
73
+ \r
74
+ [Error: ${y}]\r
75
+ `),c==null||c(y)},onOpen:()=>{o.write(`Connected to session...\r
76
+ `)},onClose:()=>{o.write(`\r
77
+ [Connection closed]\r
78
+ `)}});d.connect(),M.current=d,o.onData(y=>{d.sendInput(y)});const p=()=>{_.fit(),d.isConnected()&&d.sendResize(o.cols,o.rows)};window.addEventListener("resize",p);let m=null;return typeof ResizeObserver<"u"&&(m=new ResizeObserver(()=>{p()}),m.observe(g.current)),()=>{window.removeEventListener("resize",p),m==null||m.disconnect(),d.disconnect(),o.dispose()}},[s,n,c]),N.jsx("div",{ref:g,style:{width:"100%",height:"100%",padding:"8px",backgroundColor:"#1e1e1e"}})}const k1={"claude-code":{command:"claude",defaultArgs:[],modeArgs:{normal:[],continue:["-c"],resume:["-r"]},permissionSkipArgs:["--dangerously-skip-permissions"]},"codex-cli":{command:"codex",defaultArgs:["--auto-approve","--verbose"],modeArgs:{normal:[],continue:["resume","--last"],resume:["resume"]}}},H1={local:"ローカル",remote:"リモート"},N1={merged:"マージ済み",unmerged:"未マージ",unknown:"状態不明"},j1={merged:"success",unmerged:"warning",unknown:"muted"};function z1(){var He;const{branchName:s}=ob(),n=s?decodeURIComponent(s):"",{data:c,isLoading:g,error:w}=f1(n),T=d1(n),M=E1(),o=x1(),{data:_,isLoading:d}=w1(),p=R1(),{data:m,isLoading:y,error:S}=Ig(),[A,b]=$.useState(null),[l,h]=$.useState(!1),[u,f]=$.useState(null),[E,R]=$.useState(!1),[L,x]=$.useState("claude-code"),[C,B]=$.useState("normal"),[z,I]=$.useState(!1),[F,Q]=$.useState(""),[ce,ae]=$.useState(null),q=$.useMemo(()=>Sh(c==null?void 0:c.commitDate),[c==null?void 0:c.commitDate]);if($.useEffect(()=>{if(!E)return;const ge=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=ge}},[E]),g)return N.jsx("div",{className:"app-shell",children:N.jsxs("div",{className:"page-state page-state--centered",children:[N.jsx("h1",{children:"読み込み中"}),N.jsx("p",{children:"ブランチ情報を取得しています..."})]})});if(w)return N.jsx("div",{className:"app-shell",children:N.jsxs("div",{className:"page-state page-state--centered",children:[N.jsx("h1",{children:"ブランチの取得に失敗しました"}),N.jsx("p",{children:w instanceof Error?w.message:"未知のエラーです"}),N.jsx(Ni,{to:"/",className:"button button--ghost",children:"ブランチ一覧に戻る"})]})});if(!c)return N.jsx("div",{className:"app-shell",children:N.jsxs("div",{className:"page-state page-state--centered",children:[N.jsx("h1",{children:"Branch not found"}),N.jsx("p",{children:"指定されたブランチは存在しません。"}),N.jsx(Ni,{to:"/",className:"button button--ghost",children:"ブランチ一覧に戻る"})]})});const J=!!c.worktreePath,he=c.divergence??null,k=!!(he&&he.ahead>0&&he.behind>0),U=!!(c.worktreePath&&he&&he.behind>0&&he.ahead===0&&!k),O=T.isPending,j=(m==null?void 0:m.tools)??[],X=$.useMemo(()=>[{id:"claude-code",label:"Claude Code",target:"claude"},{id:"codex-cli",label:"Codex CLI",target:"codex"},...j.map(ge=>({id:ge.id,label:ge.displayName,target:"custom",definition:ge}))],[j]);$.useEffect(()=>{if(!X.length){x("claude-code");return}if(!X.find(ge=>ge.id===L)){const ge=X[0];ge&&x(ge.id)}},[X,L]);const te=X.find(ge=>ge.id===L),ve=$.useMemo(()=>te?te.target==="custom"?{command:te.definition.command,defaultArgs:te.definition.defaultArgs??null,modeArgs:te.definition.modeArgs,permissionSkipArgs:te.definition.permissionSkipArgs??null}:k1[te.id]??null:null,[te]),Y=$.useMemo(()=>{var Be,ti,bi;if(!ve)return null;const ge=[];(Be=ve.defaultArgs)!=null&&Be.length&&ge.push(...ve.defaultArgs);const Ne=(ti=ve.modeArgs)==null?void 0:ti[C];Ne!=null&&Ne.length&&ge.push(...Ne),z&&((bi=ve.permissionSkipArgs)!=null&&bi.length)&&ge.push(...ve.permissionSkipArgs);const mt=Fm(F);return mt.length&&ge.push(...mt),{command:ve.command,args:ge}},[ve,C,z,F]),ie=async()=>{try{await M.mutateAsync({branchName:c.name,createBranch:!1}),f({type:"success",message:`${c.name} のWorktreeを作成しました。`})}catch(ge){f({type:"error",message:No(ge,"Worktreeの作成に失敗しました")})}},P=async()=>{if(!c.worktreePath){f({type:"error",message:"Worktreeが存在しないため、先に作成してください。"});return}if(!te){f({type:"error",message:"起動するAIツールを選択してください"});return}if(U){f({type:"error",message:"リモートの更新を取り込むまでAIツールは起動できません。『最新の変更を同期』を実行してください。"});return}if(k){f({type:"error",message:"リモートとローカルの双方で進捗が発生しているため、CLIと同様にAIツールの起動をブロックしました。先に rebase/merge 等で差分を解消してください。"});return}if(!(z&&!window.confirm("権限チェックをスキップして起動します。自己責任で実行してください。続行しますか?"))){h(!0);try{const ge=te.target==="codex"?"codex-cli":te.target==="custom"?"custom":"claude-code",Ne=Fm(F),mt={toolType:ge,toolName:te.target==="custom"?te.id:null,...te.target==="custom"?{customToolId:te.id}:{},mode:C,worktreePath:c.worktreePath,skipPermissions:z,...te.target==="codex"?{bypassApprovals:z}:{},...Ne.length?{extraArgs:Ne}:{}},Be=await o.mutateAsync(mt);b(Be.sessionId),R(!1),f({type:"info",message:`${Um(ge,te)} を起動しました。`})}catch(ge){f({type:"error",message:No(ge,"セッションの起動に失敗しました")})}finally{h(!1)}}},le=async ge=>{ae(ge);try{await p.mutateAsync(ge),f({type:"success",message:"セッションを終了しました"}),A===ge&&b(null)}catch(Ne){f({type:"error",message:No(Ne,"セッションの終了に失敗しました")})}finally{ae(null)}},Se=async()=>{var ge;if(!c.worktreePath){f({type:"error",message:"Worktreeが存在しないため同期できません。"});return}try{const Ne=await T.mutateAsync({worktreePath:c.worktreePath});if(Ne.pullStatus==="success")f({type:"success",message:"リモートの最新変更を取り込みました。"});else{const mt=((ge=Ne.warnings)==null?void 0:ge.join(`
79
+ `))??"fast-forward pull が完了しませんでした";f({type:"error",message:`git pull --ff-only が失敗しました。
80
+ ${mt}`})}}catch(Ne){f({type:"error",message:No(Ne,"Git同期に失敗しました")})}},ue=$.useMemo(()=>(_??[]).filter(ge=>ge.worktreePath===(c==null?void 0:c.worktreePath)).sort((ge,Ne)=>(Ne.startedAt??"").localeCompare(ge.startedAt??"")),[_,c==null?void 0:c.worktreePath]),Xe=ge=>{b(null),R(!1),f({type:ge===0?"success":"error",message:`セッションがコード ${ge} で終了しました。`})};return N.jsxs("div",{className:"app-shell",children:[N.jsxs("header",{className:"page-hero page-hero--compact",children:[N.jsx(Ni,{to:"/",className:"link-back",children:"← ブランチ一覧に戻る"}),N.jsx("p",{className:"page-hero__eyebrow",children:"BRANCH DETAIL"}),N.jsx("h1",{children:c.name}),N.jsxs("p",{className:"page-hero__subtitle",children:["最新コミット ",c.commitHash.slice(0,7)," ・ ",q]}),N.jsxs("div",{className:"badge-group",children:[N.jsx("span",{className:`status-badge status-badge--${c.type}`,children:H1[c.type]}),N.jsx("span",{className:`status-badge status-badge--${j1[c.mergeStatus]}`,children:N1[c.mergeStatus]}),N.jsx("span",{className:`status-badge ${c.worktreePath?"status-badge--success":"status-badge--muted"}`,children:c.worktreePath?"Worktreeあり":"Worktree未作成"})]}),N.jsx("div",{className:"page-hero__actions",children:J?N.jsx(Ni,{to:"/config",className:"button button--secondary",children:"カスタムツール設定を開く"}):N.jsx("button",{type:"button",className:"button button--primary",onClick:ie,disabled:M.isPending,children:M.isPending?"作成中...":"Worktreeを作成"})}),u&&N.jsx("div",{className:`inline-banner inline-banner--${u.type}`,children:u.message})]}),E&&N.jsx("div",{className:"terminal-overlay-backdrop","aria-hidden":"true",onClick:()=>R(!1)}),N.jsx("main",{className:"page-content page-content--wide",children:N.jsxs("div",{className:"page-layout page-layout--split",children:[N.jsxs("div",{className:"info-stack",children:[N.jsxs("section",{className:"section-card",children:[N.jsxs("header",{className:"terminal-section__header",children:[N.jsxs("div",{children:[N.jsx("h2",{children:"AIツール起動"}),N.jsx("p",{className:"section-card__body",children:"Web UI から直接AIツールを起動できます。設定したカスタムツールも一覧に表示されます。"})]}),S&&N.jsx("span",{className:"pill pill--warning",children:"設定の取得に失敗しました"})]}),J?N.jsxs("div",{className:"tool-form",children:[N.jsxs("div",{className:"form-grid",children:[N.jsxs("label",{className:"form-field",children:[N.jsx("span",{children:"AIツール"}),N.jsx("select",{value:L,onChange:ge=>x(ge.target.value),disabled:y,children:X.map(ge=>N.jsx("option",{value:ge.id,children:ge.label},ge.id))})]}),N.jsxs("label",{className:"form-field",children:[N.jsx("span",{children:"起動モード"}),N.jsxs("select",{value:C,onChange:ge=>B(ge.target.value),children:[N.jsx("option",{value:"normal",children:"normal"}),N.jsx("option",{value:"continue",children:"continue"}),N.jsx("option",{value:"resume",children:"resume"})]})]}),N.jsxs("label",{className:"form-field",children:[N.jsx("span",{children:"追加引数 (スペース区切り)"}),N.jsx("input",{type:"text",value:F,onChange:ge=>Q(ge.target.value),placeholder:"--flag value"})]})]}),N.jsx("label",{className:"form-field",children:N.jsxs("span",{children:[N.jsx("input",{type:"checkbox",checked:z,onChange:ge=>I(ge.target.checked)}),N.jsx("span",{style:{marginLeft:"0.5rem"},children:"権限チェックをスキップ (自己責任)"})]})}),z&&N.jsx("div",{className:"inline-banner inline-banner--warning",children:N.jsx("p",{children:"権限チェックをスキップすることで、CLI での `--dangerously-skip-permissions` 指定と同様のリスクを負います。"})}),U&&N.jsxs("div",{className:"inline-banner inline-banner--info","data-testid":"sync-required",children:[N.jsxs("p",{children:["リモートに未取得の更新 (",((He=c.divergence)==null?void 0:He.behind)??0," commits) があるため、AIツールを起動する前に同期してください。"]}),N.jsx("p",{className:"section-card__body",children:"CLI の `git fetch --all` と `git pull --ff-only` と同じ処理を Web UI から実行できます。"})]}),k&&N.jsxs("div",{className:"inline-banner inline-banner--warning","data-testid":"divergence-warning",children:[N.jsx("p",{children:"リモートとローカルの両方に未解決の差分があるため、Web UI でも CLI と同様に起動をブロックしています。"}),N.jsxs("ul",{className:"list-muted",children:[N.jsxs("li",{children:["git fetch && git pull --ff-only origin ",c.name]}),N.jsxs("li",{children:["必要に応じて git push origin ",c.name," でローカル進捗を共有"]})]}),N.jsx("p",{className:"section-card__body",children:"rebase / merge などで差分を解消した後にページを更新してください。"})]}),N.jsxs("div",{className:"tool-card__actions",children:[N.jsx("button",{type:"button",className:"button button--primary",onClick:P,disabled:l||!te||k||U||O,children:l?"起動中...":"セッションを起動"}),N.jsx("button",{type:"button",className:"button button--secondary",onClick:Se,disabled:!c.worktreePath||O,children:O?"同期中...":"最新の変更を同期"}),N.jsx(Ni,{to:"/config",className:"button button--ghost",children:"設定を編集"})]}),ve&&N.jsxs("dl",{className:"metadata-grid metadata-grid--compact",children:[N.jsxs("div",{children:[N.jsx("dt",{children:"コマンド"}),N.jsx("dd",{className:"tool-card__command",children:ve.command})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"defaultArgs"}),N.jsx("dd",{children:Pm(ve.defaultArgs)})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"permissionSkipArgs"}),N.jsx("dd",{children:Pm(ve.permissionSkipArgs)})]}),Y&&N.jsxs("div",{className:"metadata-grid__full",children:[N.jsx("dt",{children:"最終的に実行されるコマンド"}),N.jsxs("dd",{className:"tool-card__command",children:[Y.command," ",Y.args.join(" ")]})]})]})]}):N.jsx("p",{className:"section-card__body",children:"Worktreeが未作成のため、先にWorktreeを作成してください。"})]}),N.jsxs("section",{className:"section-card",children:[N.jsxs("header",{className:"terminal-section__header",children:[N.jsxs("div",{children:[N.jsx("h2",{children:"セッション履歴"}),N.jsx("p",{className:"section-card__body",children:"この Worktree に紐づいた最新の AI セッションが表示されます。CLI からの起動分も共有されます。"})]}),d&&N.jsx("span",{className:"pill",children:"読み込み中..."})]}),ue.length===0?N.jsx("p",{className:"section-card__body",children:"セッション履歴はまだありません。"}):N.jsx("div",{className:"session-table-wrapper",children:N.jsxs("table",{className:"session-table",children:[N.jsx("thead",{children:N.jsxs("tr",{children:[N.jsx("th",{children:"状態"}),N.jsx("th",{children:"ツール"}),N.jsx("th",{children:"モード"}),N.jsx("th",{children:"開始時刻"}),N.jsx("th",{children:"終了時刻"}),N.jsx("th",{children:"操作"})]})}),N.jsx("tbody",{children:ue.slice(0,5).map(ge=>N.jsxs("tr",{children:[N.jsx("td",{children:N.jsx("span",{className:`status-pill status-pill--${ge.status}`,children:U1[ge.status]})}),N.jsx("td",{children:ge.toolType==="custom"?ge.toolName??"custom":Um(ge.toolType)}),N.jsx("td",{children:ge.mode}),N.jsx("td",{children:Sh(ge.startedAt)}),N.jsx("td",{children:ge.endedAt?Sh(ge.endedAt):"--"}),N.jsx("td",{children:ge.status==="running"?N.jsx("button",{type:"button",className:"button button--ghost",onClick:()=>le(ge.sessionId),disabled:ce===ge.sessionId||p.isPending,children:ce===ge.sessionId?"終了中...":"終了"}):N.jsx("span",{className:"session-table__muted",children:"--"})})]},ge.sessionId))})]})})]}),N.jsxs("section",{className:"section-card",children:[N.jsx("header",{children:N.jsx("h2",{children:"ブランチインサイト"})}),N.jsxs("dl",{className:"metadata-grid",children:[N.jsxs("div",{children:[N.jsx("dt",{children:"コミット"}),N.jsx("dd",{children:c.commitHash})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Author"}),N.jsx("dd",{children:c.author??"N/A"})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"更新日"}),N.jsx("dd",{children:q})]}),N.jsxs("div",{children:[N.jsx("dt",{children:"Worktree"}),N.jsx("dd",{children:c.worktreePath??"未作成"})]})]})]}),N.jsxs("section",{className:"section-card",children:[N.jsx("header",{children:N.jsx("h2",{children:"コミット情報"})}),N.jsx("p",{className:"section-card__body",children:c.commitMessage??"コミットメッセージがありません。"})]}),c.divergence&&N.jsxs("section",{className:"section-card",children:[N.jsx("header",{children:N.jsx("h2",{children:"差分状況"})}),N.jsxs("div",{className:"pill-group",children:[N.jsxs("span",{className:"pill",children:["Ahead ",c.divergence.ahead]}),N.jsxs("span",{className:"pill",children:["Behind ",c.divergence.behind]}),N.jsx("span",{className:`pill ${c.divergence.upToDate?"pill--success":"pill--warning"}`,children:c.divergence.upToDate?"最新":"更新あり"})]})]}),N.jsxs("section",{className:"section-card",children:[N.jsx("header",{children:N.jsx("h2",{children:"Worktree情報"})}),N.jsxs("ul",{className:"list-muted",children:[N.jsxs("li",{children:["パス: ",N.jsx("strong",{children:c.worktreePath??"未作成"})]}),N.jsx("li",{children:"AIツールの起動にはクリーンなワークツリーであることを推奨します。"}),N.jsx("li",{children:"Worktreeを再作成すると既存のローカル変更が失われる可能性があります。"})]})]})]}),N.jsx("div",{className:"terminal-column",children:A?N.jsxs("section",{className:`section-card terminal-section ${E?"terminal-section--fullscreen":""}`,"data-testid":"active-terminal",children:[N.jsxs("div",{className:"terminal-section__header",children:[N.jsxs("div",{children:[N.jsx("h2",{children:"ターミナルセッション"}),N.jsx("p",{className:"section-card__body",children:"出力はリアルタイムにストリームされます。終了するとこのパネルは自動で閉じます。"})]}),N.jsx("div",{className:"terminal-section__controls",children:N.jsx("button",{type:"button",className:"button button--ghost",onClick:()=>R(ge=>!ge),children:E?"通常表示に戻す":"ターミナルを最大化"})})]}),N.jsx("div",{className:"terminal-surface",children:N.jsx(B1,{sessionId:A,onExit:Xe,onError:ge=>f({type:"error",message:ge??"不明なエラー"})})}),E&&N.jsx("button",{type:"button",className:"terminal-section__close","aria-label":"ターミナルを閉じる",onClick:()=>R(!1),children:"×"})]}):N.jsxs("section",{className:"section-card session-hint",children:[N.jsx("header",{children:N.jsx("h2",{children:"セッションは未起動"})}),N.jsx("p",{className:"section-card__body",children:"上部のアクションからAIツールを起動すると、このエリアにターミナルが表示されます。"})]})})]})})]})}function Sh(s){if(!s)return"日時不明";try{const n=new Date(s);return new Intl.DateTimeFormat("ja-JP",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}).format(n)}catch{return s}}function No(s,n){return s instanceof Pg?`${s.message}${s.details?`
81
+ ${s.details}`:""}`:s instanceof Error?s.message:n}function Um(s,n){return s==="custom"&&(n==null?void 0:n.target)==="custom"?n.label:s==="codex-cli"?"Codex CLI":"Claude Code"}function Pm(s){return!s||s.length===0?N.jsx("span",{className:"tool-card__muted",children:"未設定"}):s.join(" ")}const U1={pending:"pending",running:"running",completed:"completed",failed:"failed"};function Fm(s){return s.split(/\s+/).map(n=>n.trim()).filter(Boolean)}const P1=/^[A-Z0-9_]+$/;function Kg(s){const n={id:(s==null?void 0:s.id)??`env-${Date.now()}-${Math.random().toString(36).slice(2)}`,key:(s==null?void 0:s.key)??"",value:(s==null?void 0:s.value)??""};return typeof(s==null?void 0:s.importedFromOs)=="boolean"&&(n.importedFromOs=s.importedFromOs),s!=null&&s.lastUpdated&&(n.lastUpdated=s.lastUpdated),n}function F1(s){return s.key?!P1.test(s.key):!0}function Im({title:s,rows:n,onChange:c,description:g,allowAdd:w=!0,emptyLabel:T="環境変数はまだありません"}){const M=(d,p,m)=>{c(n.map(y=>y.id===d?{...y,[p]:p==="key"?m.toUpperCase().replace(/[^A-Z0-9_]/g,"_"):m}:y))},o=d=>{c(n.filter(p=>p.id!==d))},_=()=>{c([...n,Kg()])};return N.jsxs("div",{className:"env-editor",children:[N.jsxs("header",{className:"env-editor__header",children:[N.jsxs("div",{children:[N.jsx("h3",{children:s}),g&&N.jsx("p",{className:"env-editor__description",children:g})]}),w&&N.jsx("button",{type:"button",className:"button button--secondary",onClick:_,children:"変数を追加"})]}),n.length===0?N.jsx("p",{className:"env-editor__empty",children:T}):N.jsxs("table",{className:"env-editor__table",children:[N.jsx("thead",{children:N.jsxs("tr",{children:[N.jsx("th",{children:"キー"}),N.jsx("th",{children:"値"}),N.jsx("th",{style:{width:"140px"},children:"操作"})]})}),N.jsx("tbody",{children:n.map(d=>{const p=F1(d);return N.jsxs("tr",{className:p?"env-editor__row--invalid":void 0,children:[N.jsxs("td",{children:[N.jsx("input",{type:"text",value:d.key,onChange:m=>M(d.id,"key",m.target.value),placeholder:"EXAMPLE_KEY"}),d.importedFromOs&&N.jsx("span",{className:"pill pill--info",style:{marginLeft:"0.5rem"},children:"OSから取り込み"}),d.lastUpdated&&N.jsxs("span",{className:"env-editor__meta",children:["更新: ",new Date(d.lastUpdated).toLocaleString()]}),p&&N.jsx("p",{className:"env-editor__error",children:"A-Z,0-9,_ のみ使用できます"})]}),N.jsx("td",{children:N.jsx("input",{type:"text",value:d.value,onChange:m=>M(d.id,"value",m.target.value),placeholder:"値"})}),N.jsx("td",{children:N.jsx("button",{type:"button",className:"button button--ghost",onClick:()=>o(d.id),children:"削除"})})]},d.id)})})]})]})}function qm(s){return s?s.map(n=>{const c={key:n.key,value:n.value};return typeof n.importedFromOs=="boolean"&&(c.importedFromOs=n.importedFromOs),n.lastUpdated&&(c.lastUpdated=n.lastUpdated),Kg(c)}):[]}function Yo(s){return s.filter(n=>n.key.trim().length>0).map(n=>({key:n.key.trim().toUpperCase(),value:n.value}))}function I1(s,n,c){const g=((s==null?void 0:s.tools)??[]).map(w=>({...w,env:Yo(c[w.id]??[])}));return{version:(s==null?void 0:s.version)??"1.0.0",env:Yo(n),tools:g}}function q1(){var b;const{data:s,isLoading:n,error:c}=Ig(),g=D1(),[w,T]=$.useState([]),[M,o]=$.useState({}),[_,d]=$.useState(null);$.useEffect(()=>{var h;if(!s)return;T(qm(s.env));const l={};(h=s.tools)==null||h.forEach(u=>{l[u.id]=qm(u.env)}),o(l)},[s]);const p=$.useMemo(()=>JSON.stringify((s==null?void 0:s.env)??[]),[s==null?void 0:s.env]),m=$.useMemo(()=>JSON.stringify(Yo(w)),[w]),y=$.useMemo(()=>{const l=w.some(f=>!f.key||/[^A-Z0-9_]/.test(f.key)),h=w.some(f=>f.key&&f.value.trim().length===0),u=Object.values(M).some(f=>f.some(E=>!E.key||/[^A-Z0-9_]/.test(E.key)||E.value.trim().length===0));return l||h||u},[w,M]),S=$.useMemo(()=>{var u,f;if(p!==m)return!0;if(!s)return!1;const l=((u=s.tools)==null?void 0:u.map(E=>Yo(M[E.id]??[])))??[],h=((f=s.tools)==null?void 0:f.map(E=>E.env??[]))??[];return JSON.stringify(l)!==JSON.stringify(h)},[s,p,m,M]),A=async()=>{if(s)try{const l=I1(s,w,M);await g.mutateAsync(l),d({type:"success",message:"設定を保存しました"})}catch(l){d({type:"error",message:l instanceof Error?l.message:"保存に失敗しました"})}};return n?N.jsx("div",{className:"app-shell",children:N.jsxs("div",{className:"page-state page-state--centered",children:[N.jsx("h1",{children:"読み込み中"}),N.jsx("p",{children:"設定を読み込んでいます..."})]})}):c?N.jsx("div",{className:"app-shell",children:N.jsxs("div",{className:"page-state page-state--centered",children:[N.jsx("h1",{children:"設定の取得に失敗しました"}),N.jsx("p",{children:c instanceof Error?c.message:"未知のエラーです"}),N.jsx(Ni,{to:"/",className:"button button--ghost",children:"ブランチ一覧に戻る"})]})}):N.jsxs("div",{className:"app-shell",children:[N.jsxs("header",{className:"page-hero",children:[N.jsx(Ni,{to:"/",className:"page-hero__back",children:"← ブランチ一覧へ"}),N.jsx("p",{className:"page-hero__eyebrow",children:"CONFIG"}),N.jsx("h1",{children:"環境変数の管理"}),N.jsx("p",{className:"page-hero__subtitle",children:"共通環境変数とツールごとの上書きをブラウザから編集できます。"}),N.jsx("div",{className:"page-hero__actions",children:N.jsx("button",{type:"button",className:"button button--primary",onClick:A,disabled:g.isPending||y||!S,children:g.isPending?"保存中...":"保存"})}),_&&N.jsx("div",{className:`inline-banner inline-banner--${_.type}`,children:_.message})]}),N.jsxs("main",{className:"page-content page-content--wide",children:[N.jsx("section",{className:"section-card",children:N.jsx(Im,{title:"共通環境変数",description:"全てのAIツールで共有される値。PAT やプロキシ設定などはこちらに入力してください。",rows:w,onChange:T})}),N.jsxs("section",{className:"section-card",children:[N.jsx("h2",{children:"ツール固有の環境変数"}),N.jsx("p",{className:"section-card__body",children:"各ツール固有に上書きしたい値がある場合はこちらから設定します。共通設定との競合がある場合は ツール設定が優先されます。"}),N.jsx("div",{className:"env-editor__tool-list",children:(b=s==null?void 0:s.tools)==null?void 0:b.map(l=>N.jsx("div",{className:"env-editor__tool",children:N.jsx(Im,{title:l.displayName,description:`${l.executionType} / ${l.command}`,rows:M[l.id]??[],onChange:h=>o(u=>({...u,[l.id]:h}))})},l.id))})]})]})]})}const K1=Xb([{path:"/",element:N.jsx(C1,{})},{path:"/:branchName",element:N.jsx(z1,{})},{path:"/config",element:N.jsx(q1,{})}]),W1=new k0({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:3e4}}}),Wg=document.getElementById("root");if(!Wg)throw new Error("Root element not found");h0.createRoot(Wg).render(N.jsx(s0.StrictMode,{children:N.jsx(H0,{client:W1,children:N.jsx(c1,{router:K1})})}));