cli-jaw 2.0.1 → 2.0.2

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 (607) hide show
  1. package/README.ko.md +3 -2
  2. package/README.md +41 -12
  3. package/dist/bin/_http-client.js +34 -0
  4. package/dist/bin/_http-client.js.map +1 -0
  5. package/dist/bin/cli-jaw.js +10 -5
  6. package/dist/bin/cli-jaw.js.map +1 -1
  7. package/dist/bin/commands/browser-web-ai.js +155 -38
  8. package/dist/bin/commands/browser-web-ai.js.map +1 -1
  9. package/dist/bin/commands/browser.js +265 -37
  10. package/dist/bin/commands/browser.js.map +1 -1
  11. package/dist/bin/commands/chat.js +18 -14
  12. package/dist/bin/commands/chat.js.map +1 -1
  13. package/dist/bin/commands/clone.js +3 -2
  14. package/dist/bin/commands/clone.js.map +1 -1
  15. package/dist/bin/commands/dashboard.js +22 -18
  16. package/dist/bin/commands/dashboard.js.map +1 -1
  17. package/dist/bin/commands/dispatch.js +9 -11
  18. package/dist/bin/commands/dispatch.js.map +1 -1
  19. package/dist/bin/commands/doctor.js +26 -14
  20. package/dist/bin/commands/doctor.js.map +1 -1
  21. package/dist/bin/commands/employee.js +12 -7
  22. package/dist/bin/commands/employee.js.map +1 -1
  23. package/dist/bin/commands/init.js +9 -9
  24. package/dist/bin/commands/init.js.map +1 -1
  25. package/dist/bin/commands/launchd.js +17 -7
  26. package/dist/bin/commands/launchd.js.map +1 -1
  27. package/dist/bin/commands/mcp.js +7 -4
  28. package/dist/bin/commands/mcp.js.map +1 -1
  29. package/dist/bin/commands/memory.js +7 -5
  30. package/dist/bin/commands/memory.js.map +1 -1
  31. package/dist/bin/commands/orchestrate.js +6 -3
  32. package/dist/bin/commands/orchestrate.js.map +1 -1
  33. package/dist/bin/commands/reset.js +4 -3
  34. package/dist/bin/commands/reset.js.map +1 -1
  35. package/dist/bin/commands/serve.js +3 -2
  36. package/dist/bin/commands/serve.js.map +1 -1
  37. package/dist/bin/commands/service.js +2 -2
  38. package/dist/bin/commands/service.js.map +1 -1
  39. package/dist/bin/commands/status.js +10 -9
  40. package/dist/bin/commands/status.js.map +1 -1
  41. package/dist/bin/commands/tui/api.js +26 -18
  42. package/dist/bin/commands/tui/api.js.map +1 -1
  43. package/dist/bin/commands/tui/overlays.js +3 -1
  44. package/dist/bin/commands/tui/overlays.js.map +1 -1
  45. package/dist/bin/commands/tui/simple-mode.js +1 -1
  46. package/dist/bin/commands/tui/simple-mode.js.map +1 -1
  47. package/dist/bin/commands/tui/types.js.map +1 -1
  48. package/dist/bin/postinstall.js +153 -65
  49. package/dist/bin/postinstall.js.map +1 -1
  50. package/dist/bin/star-prompt.js +4 -3
  51. package/dist/bin/star-prompt.js.map +1 -1
  52. package/dist/lib/mcp/format-converters.js +15 -10
  53. package/dist/lib/mcp/format-converters.js.map +1 -1
  54. package/dist/lib/mcp/mcp-install.js +2 -2
  55. package/dist/lib/mcp/mcp-install.js.map +1 -1
  56. package/dist/lib/mcp/skills-distribution.js +2 -2
  57. package/dist/lib/mcp/skills-distribution.js.map +1 -1
  58. package/dist/lib/mcp/skills-reset.js +5 -4
  59. package/dist/lib/mcp/skills-reset.js.map +1 -1
  60. package/dist/lib/mcp/skills-symlinks.js +9 -9
  61. package/dist/lib/mcp/skills-symlinks.js.map +1 -1
  62. package/dist/lib/mcp/skills-utils.js +5 -4
  63. package/dist/lib/mcp/skills-utils.js.map +1 -1
  64. package/dist/lib/mcp/unified-config.js +3 -2
  65. package/dist/lib/mcp/unified-config.js.map +1 -1
  66. package/dist/lib/mime-detect.js +65 -0
  67. package/dist/lib/mime-detect.js.map +1 -0
  68. package/dist/lib/quota-copilot.js +12 -10
  69. package/dist/lib/quota-copilot.js.map +1 -1
  70. package/dist/lib/stt.js +3 -3
  71. package/dist/lib/stt.js.map +1 -1
  72. package/dist/lib/upload.js +14 -5
  73. package/dist/lib/upload.js.map +1 -1
  74. package/dist/scripts/i18n-registry.js +4 -4
  75. package/dist/scripts/i18n-registry.js.map +1 -1
  76. package/dist/server.js +61 -57
  77. package/dist/server.js.map +1 -1
  78. package/dist/src/agent/alert-escalation.js +61 -0
  79. package/dist/src/agent/alert-escalation.js.map +1 -0
  80. package/dist/src/agent/args.js +71 -2
  81. package/dist/src/agent/args.js.map +1 -1
  82. package/dist/src/agent/error-classifier.js +9 -4
  83. package/dist/src/agent/error-classifier.js.map +1 -1
  84. package/dist/src/agent/events.js +130 -101
  85. package/dist/src/agent/events.js.map +1 -1
  86. package/dist/src/agent/lifecycle-handler.js +44 -19
  87. package/dist/src/agent/lifecycle-handler.js.map +1 -1
  88. package/dist/src/agent/live-run-state.js +7 -3
  89. package/dist/src/agent/live-run-state.js.map +1 -1
  90. package/dist/src/agent/memory-flush-controller.js +6 -4
  91. package/dist/src/agent/memory-flush-controller.js.map +1 -1
  92. package/dist/src/agent/opencode-diagnostics.js +7 -6
  93. package/dist/src/agent/opencode-diagnostics.js.map +1 -1
  94. package/dist/src/agent/session-persistence.js +1 -1
  95. package/dist/src/agent/session-persistence.js.map +1 -1
  96. package/dist/src/agent/spawn-env.js +33 -16
  97. package/dist/src/agent/spawn-env.js.map +1 -1
  98. package/dist/src/agent/spawn.js +176 -110
  99. package/dist/src/agent/spawn.js.map +1 -1
  100. package/dist/src/agent/watchdog.js +56 -0
  101. package/dist/src/agent/watchdog.js.map +1 -0
  102. package/dist/src/browser/actions.js +179 -70
  103. package/dist/src/browser/actions.js.map +1 -1
  104. package/dist/src/browser/connection.js +296 -19
  105. package/dist/src/browser/connection.js.map +1 -1
  106. package/dist/src/browser/index.js +4 -1
  107. package/dist/src/browser/index.js.map +1 -1
  108. package/dist/src/browser/launch-policy.js +1 -1
  109. package/dist/src/browser/launch-policy.js.map +1 -1
  110. package/dist/src/browser/primitives.js +11 -7
  111. package/dist/src/browser/primitives.js.map +1 -1
  112. package/dist/src/browser/runtime-diagnostics.js +45 -0
  113. package/dist/src/browser/runtime-diagnostics.js.map +1 -0
  114. package/dist/src/browser/runtime-orphans.js +127 -0
  115. package/dist/src/browser/runtime-orphans.js.map +1 -0
  116. package/dist/src/browser/runtime-owner-store.js +51 -0
  117. package/dist/src/browser/runtime-owner-store.js.map +1 -0
  118. package/dist/src/browser/runtime-owner.js +2 -2
  119. package/dist/src/browser/runtime-owner.js.map +1 -1
  120. package/dist/src/browser/tab-lifecycle.js +157 -0
  121. package/dist/src/browser/tab-lifecycle.js.map +1 -0
  122. package/dist/src/browser/vision.js +35 -11
  123. package/dist/src/browser/vision.js.map +1 -1
  124. package/dist/src/browser/web-ai/action-breadth.js +56 -0
  125. package/dist/src/browser/web-ai/action-breadth.js.map +1 -0
  126. package/dist/src/browser/web-ai/action-cache.js +9 -8
  127. package/dist/src/browser/web-ai/action-cache.js.map +1 -1
  128. package/dist/src/browser/web-ai/action-intent.js +64 -0
  129. package/dist/src/browser/web-ai/action-intent.js.map +1 -0
  130. package/dist/src/browser/web-ai/action-memory.js +82 -0
  131. package/dist/src/browser/web-ai/action-memory.js.map +1 -0
  132. package/dist/src/browser/web-ai/action-trace.js +11 -6
  133. package/dist/src/browser/web-ai/action-trace.js.map +1 -1
  134. package/dist/src/browser/web-ai/annotated-screenshot.js +2 -1
  135. package/dist/src/browser/web-ai/annotated-screenshot.js.map +1 -1
  136. package/dist/src/browser/web-ai/answer-artifact.js +97 -0
  137. package/dist/src/browser/web-ai/answer-artifact.js.map +1 -0
  138. package/dist/src/browser/web-ai/ax-snapshot.js +3 -2
  139. package/dist/src/browser/web-ai/ax-snapshot.js.map +1 -1
  140. package/dist/src/browser/web-ai/browser-primitives.js +10 -7
  141. package/dist/src/browser/web-ai/browser-primitives.js.map +1 -1
  142. package/dist/src/browser/web-ai/capability-registry.js +1 -1
  143. package/dist/src/browser/web-ai/capability-registry.js.map +1 -1
  144. package/dist/src/browser/web-ai/chatgpt-composer.js +12 -12
  145. package/dist/src/browser/web-ai/chatgpt-composer.js.map +1 -1
  146. package/dist/src/browser/web-ai/chatgpt-model.js +469 -50
  147. package/dist/src/browser/web-ai/chatgpt-model.js.map +1 -1
  148. package/dist/src/browser/web-ai/chatgpt-response.js +82 -10
  149. package/dist/src/browser/web-ai/chatgpt-response.js.map +1 -1
  150. package/dist/src/browser/web-ai/chatgpt.js +325 -49
  151. package/dist/src/browser/web-ai/chatgpt.js.map +1 -1
  152. package/dist/src/browser/web-ai/churn-log.js +1 -1
  153. package/dist/src/browser/web-ai/churn-log.js.map +1 -1
  154. package/dist/src/browser/web-ai/cli-sessions.js +42 -26
  155. package/dist/src/browser/web-ai/cli-sessions.js.map +1 -1
  156. package/dist/src/browser/web-ai/context-pack/builder.js +1 -1
  157. package/dist/src/browser/web-ai/context-pack/builder.js.map +1 -1
  158. package/dist/src/browser/web-ai/context-pack/file-selector.js +2 -2
  159. package/dist/src/browser/web-ai/context-pack/file-selector.js.map +1 -1
  160. package/dist/src/browser/web-ai/context-pack/report.js +1 -1
  161. package/dist/src/browser/web-ai/context-pack/report.js.map +1 -1
  162. package/dist/src/browser/web-ai/copy-markdown.js +25 -5
  163. package/dist/src/browser/web-ai/copy-markdown.js.map +1 -1
  164. package/dist/src/browser/web-ai/diagnostics.js +17 -14
  165. package/dist/src/browser/web-ai/diagnostics.js.map +1 -1
  166. package/dist/src/browser/web-ai/doctor.js +10 -6
  167. package/dist/src/browser/web-ai/doctor.js.map +1 -1
  168. package/dist/src/browser/web-ai/dom-hash.js.map +1 -1
  169. package/dist/src/browser/web-ai/errors.js +5 -22
  170. package/dist/src/browser/web-ai/errors.js.map +1 -1
  171. package/dist/src/browser/web-ai/gemini-live.js +7 -6
  172. package/dist/src/browser/web-ai/gemini-live.js.map +1 -1
  173. package/dist/src/browser/web-ai/grok-live.js +9 -5
  174. package/dist/src/browser/web-ai/grok-live.js.map +1 -1
  175. package/dist/src/browser/web-ai/index.js +5 -0
  176. package/dist/src/browser/web-ai/index.js.map +1 -1
  177. package/dist/src/browser/web-ai/observation-bundle.js +90 -0
  178. package/dist/src/browser/web-ai/observation-bundle.js.map +1 -0
  179. package/dist/src/browser/web-ai/observe-actions.js +186 -0
  180. package/dist/src/browser/web-ai/observe-actions.js.map +1 -0
  181. package/dist/src/browser/web-ai/observe-targets.js +6 -1
  182. package/dist/src/browser/web-ai/observe-targets.js.map +1 -1
  183. package/dist/src/browser/web-ai/planner-contract.js +18 -0
  184. package/dist/src/browser/web-ai/planner-contract.js.map +1 -0
  185. package/dist/src/browser/web-ai/post-action-assert.js +8 -7
  186. package/dist/src/browser/web-ai/post-action-assert.js.map +1 -1
  187. package/dist/src/browser/web-ai/product-surfaces.js +2 -1
  188. package/dist/src/browser/web-ai/product-surfaces.js.map +1 -1
  189. package/dist/src/browser/web-ai/provider-adapter.js.map +1 -1
  190. package/dist/src/browser/web-ai/question.js +14 -7
  191. package/dist/src/browser/web-ai/question.js.map +1 -1
  192. package/dist/src/browser/web-ai/ref-registry.js.map +1 -1
  193. package/dist/src/browser/web-ai/self-heal.js +20 -14
  194. package/dist/src/browser/web-ai/self-heal.js.map +1 -1
  195. package/dist/src/browser/web-ai/session-store.js +61 -1
  196. package/dist/src/browser/web-ai/session-store.js.map +1 -1
  197. package/dist/src/browser/web-ai/session.js +43 -2
  198. package/dist/src/browser/web-ai/session.js.map +1 -1
  199. package/dist/src/browser/web-ai/source-audit.js +116 -0
  200. package/dist/src/browser/web-ai/source-audit.js.map +1 -0
  201. package/dist/src/browser/web-ai/tab-finalizer.js +18 -0
  202. package/dist/src/browser/web-ai/tab-finalizer.js.map +1 -0
  203. package/dist/src/browser/web-ai/tab-lease-store.js +390 -0
  204. package/dist/src/browser/web-ai/tab-lease-store.js.map +1 -0
  205. package/dist/src/browser/web-ai/tab-pool.js +44 -0
  206. package/dist/src/browser/web-ai/tab-pool.js.map +1 -0
  207. package/dist/src/browser/web-ai/target-resolver.js +31 -0
  208. package/dist/src/browser/web-ai/target-resolver.js.map +1 -0
  209. package/dist/src/browser/web-ai/trace-persistence.js +4 -2
  210. package/dist/src/browser/web-ai/trace-persistence.js.map +1 -1
  211. package/dist/src/browser/web-ai/vendor-editor-contract.js.map +1 -1
  212. package/dist/src/browser/web-ai/watcher.js +8 -7
  213. package/dist/src/browser/web-ai/watcher.js.map +1 -1
  214. package/dist/src/cli/acp-client.js +40 -26
  215. package/dist/src/cli/acp-client.js.map +1 -1
  216. package/dist/src/cli/command-context.js +3 -3
  217. package/dist/src/cli/command-context.js.map +1 -1
  218. package/dist/src/cli/commands.js +25 -16
  219. package/dist/src/cli/commands.js.map +1 -1
  220. package/dist/src/cli/compact.js.map +1 -1
  221. package/dist/src/cli/handlers-completions.js +6 -4
  222. package/dist/src/cli/handlers-completions.js.map +1 -1
  223. package/dist/src/cli/handlers-runtime.js +45 -38
  224. package/dist/src/cli/handlers-runtime.js.map +1 -1
  225. package/dist/src/cli/handlers.js +44 -36
  226. package/dist/src/cli/handlers.js.map +1 -1
  227. package/dist/src/cli/readiness.js +3 -1
  228. package/dist/src/cli/readiness.js.map +1 -1
  229. package/dist/src/cli/registry.js +1 -1
  230. package/dist/src/cli/registry.js.map +1 -1
  231. package/dist/src/cli/tui/overlay.js +4 -1
  232. package/dist/src/cli/tui/overlay.js.map +1 -1
  233. package/dist/src/cli/types.js +4 -0
  234. package/dist/src/cli/types.js.map +1 -0
  235. package/dist/src/command-contract/catalog.js +1 -1
  236. package/dist/src/command-contract/catalog.js.map +1 -1
  237. package/dist/src/command-contract/help-renderer.js +1 -1
  238. package/dist/src/command-contract/help-renderer.js.map +1 -1
  239. package/dist/src/core/browser-open-default.js +13 -0
  240. package/dist/src/core/browser-open-default.js.map +1 -0
  241. package/dist/src/core/browser-open.js +41 -0
  242. package/dist/src/core/browser-open.js.map +1 -0
  243. package/dist/src/core/bus.js +13 -2
  244. package/dist/src/core/bus.js.map +1 -1
  245. package/dist/src/core/compact.js +5 -4
  246. package/dist/src/core/compact.js.map +1 -1
  247. package/dist/src/core/config.js +51 -52
  248. package/dist/src/core/config.js.map +1 -1
  249. package/dist/src/core/db.js +48 -6
  250. package/dist/src/core/db.js.map +1 -1
  251. package/dist/src/core/employees.js +9 -8
  252. package/dist/src/core/employees.js.map +1 -1
  253. package/dist/src/core/instance.js +7 -6
  254. package/dist/src/core/instance.js.map +1 -1
  255. package/dist/src/core/logger.js +1 -1
  256. package/dist/src/core/logger.js.map +1 -1
  257. package/dist/src/core/main-session.js +7 -7
  258. package/dist/src/core/main-session.js.map +1 -1
  259. package/dist/src/core/path-expand.js +10 -0
  260. package/dist/src/core/path-expand.js.map +1 -0
  261. package/dist/src/core/runtime-path.js +1 -1
  262. package/dist/src/core/runtime-path.js.map +1 -1
  263. package/dist/src/core/runtime-settings.js +13 -13
  264. package/dist/src/core/runtime-settings.js.map +1 -1
  265. package/dist/src/core/settings-merge.js +14 -14
  266. package/dist/src/core/settings-merge.js.map +1 -1
  267. package/dist/src/core/strip-undefined.js +13 -0
  268. package/dist/src/core/strip-undefined.js.map +1 -0
  269. package/dist/src/core/tcc.js +1 -1
  270. package/dist/src/core/tcc.js.map +1 -1
  271. package/dist/src/discord/bot.js +19 -18
  272. package/dist/src/discord/bot.js.map +1 -1
  273. package/dist/src/discord/channel-types.js +14 -0
  274. package/dist/src/discord/channel-types.js.map +1 -0
  275. package/dist/src/discord/commands.js +7 -6
  276. package/dist/src/discord/commands.js.map +1 -1
  277. package/dist/src/discord/discord-file.js.map +1 -1
  278. package/dist/src/discord/forwarder.js +3 -3
  279. package/dist/src/discord/forwarder.js.map +1 -1
  280. package/dist/src/http/error-middleware.js +3 -3
  281. package/dist/src/http/error-middleware.js.map +1 -1
  282. package/dist/src/http/response.js +2 -2
  283. package/dist/src/http/response.js.map +1 -1
  284. package/dist/src/ide/diff.js +7 -7
  285. package/dist/src/ide/diff.js.map +1 -1
  286. package/dist/src/manager/board/routes.js +28 -27
  287. package/dist/src/manager/board/routes.js.map +1 -1
  288. package/dist/src/manager/dashboard-home.js +3 -5
  289. package/dist/src/manager/dashboard-home.js.map +1 -1
  290. package/dist/src/manager/dashboard-service.js +2 -2
  291. package/dist/src/manager/dashboard-service.js.map +1 -1
  292. package/dist/src/manager/health-history.js +10 -9
  293. package/dist/src/manager/health-history.js.map +1 -1
  294. package/dist/src/manager/launchd-service.js +2 -2
  295. package/dist/src/manager/launchd-service.js.map +1 -1
  296. package/dist/src/manager/lifecycle-helpers.js +7 -6
  297. package/dist/src/manager/lifecycle-helpers.js.map +1 -1
  298. package/dist/src/manager/lifecycle.js +7 -6
  299. package/dist/src/manager/lifecycle.js.map +1 -1
  300. package/dist/src/manager/logs.js +18 -18
  301. package/dist/src/manager/logs.js.map +1 -1
  302. package/dist/src/manager/metadata.js +10 -2
  303. package/dist/src/manager/metadata.js.map +1 -1
  304. package/dist/src/manager/notes/assets.js +216 -0
  305. package/dist/src/manager/notes/assets.js.map +1 -0
  306. package/dist/src/manager/notes/capabilities.js +56 -0
  307. package/dist/src/manager/notes/capabilities.js.map +1 -0
  308. package/dist/src/manager/notes/constants.js +11 -0
  309. package/dist/src/manager/notes/constants.js.map +1 -0
  310. package/dist/src/manager/notes/frontmatter.js +120 -0
  311. package/dist/src/manager/notes/frontmatter.js.map +1 -0
  312. package/dist/src/manager/notes/link-resolver.js +96 -0
  313. package/dist/src/manager/notes/link-resolver.js.map +1 -0
  314. package/dist/src/manager/notes/path-guards.js +4 -0
  315. package/dist/src/manager/notes/path-guards.js.map +1 -1
  316. package/dist/src/manager/notes/remote-assets.js +128 -0
  317. package/dist/src/manager/notes/remote-assets.js.map +1 -0
  318. package/dist/src/manager/notes/routes.js +63 -13
  319. package/dist/src/manager/notes/routes.js.map +1 -1
  320. package/dist/src/manager/notes/store.js +3 -2
  321. package/dist/src/manager/notes/store.js.map +1 -1
  322. package/dist/src/manager/notes/system-trash.js +3 -3
  323. package/dist/src/manager/notes/system-trash.js.map +1 -1
  324. package/dist/src/manager/notes/vault-index.js +220 -0
  325. package/dist/src/manager/notes/vault-index.js.map +1 -0
  326. package/dist/src/manager/notes/watcher.js +27 -0
  327. package/dist/src/manager/notes/watcher.js.map +1 -0
  328. package/dist/src/manager/notes/wiki-links.js +109 -0
  329. package/dist/src/manager/notes/wiki-links.js.map +1 -0
  330. package/dist/src/manager/process-verify.js +29 -0
  331. package/dist/src/manager/process-verify.js.map +1 -1
  332. package/dist/src/manager/profiles.js +3 -2
  333. package/dist/src/manager/profiles.js.map +1 -1
  334. package/dist/src/manager/registry.js +60 -58
  335. package/dist/src/manager/registry.js.map +1 -1
  336. package/dist/src/manager/routes/electron-metrics.js +22 -22
  337. package/dist/src/manager/routes/electron-metrics.js.map +1 -1
  338. package/dist/src/manager/scan.js +2 -2
  339. package/dist/src/manager/scan.js.map +1 -1
  340. package/dist/src/manager/schedule/routes.js +24 -23
  341. package/dist/src/manager/schedule/routes.js.map +1 -1
  342. package/dist/src/manager/server.js +28 -28
  343. package/dist/src/manager/server.js.map +1 -1
  344. package/dist/src/manager/systemd-service.js +1 -1
  345. package/dist/src/manager/systemd-service.js.map +1 -1
  346. package/dist/src/memory/bootstrap.js +5 -4
  347. package/dist/src/memory/bootstrap.js.map +1 -1
  348. package/dist/src/memory/heartbeat-schedule.js +10 -10
  349. package/dist/src/memory/heartbeat-schedule.js.map +1 -1
  350. package/dist/src/memory/heartbeat.js +23 -22
  351. package/dist/src/memory/heartbeat.js.map +1 -1
  352. package/dist/src/memory/indexing.js.map +1 -1
  353. package/dist/src/memory/keyword-expand.js +1 -1
  354. package/dist/src/memory/keyword-expand.js.map +1 -1
  355. package/dist/src/memory/memory.js +2 -2
  356. package/dist/src/memory/memory.js.map +1 -1
  357. package/dist/src/memory/runtime.js +6 -5
  358. package/dist/src/memory/runtime.js.map +1 -1
  359. package/dist/src/memory/shared.js +2 -1
  360. package/dist/src/memory/shared.js.map +1 -1
  361. package/dist/src/memory/worklog.js +1 -1
  362. package/dist/src/memory/worklog.js.map +1 -1
  363. package/dist/src/messaging/runtime.js +13 -10
  364. package/dist/src/messaging/runtime.js.map +1 -1
  365. package/dist/src/messaging/send.js +16 -15
  366. package/dist/src/messaging/send.js.map +1 -1
  367. package/dist/src/orchestrator/collect.js +6 -6
  368. package/dist/src/orchestrator/collect.js.map +1 -1
  369. package/dist/src/orchestrator/distribute.js +112 -77
  370. package/dist/src/orchestrator/distribute.js.map +1 -1
  371. package/dist/src/orchestrator/gateway.js +6 -5
  372. package/dist/src/orchestrator/gateway.js.map +1 -1
  373. package/dist/src/orchestrator/pipeline.js +42 -42
  374. package/dist/src/orchestrator/pipeline.js.map +1 -1
  375. package/dist/src/orchestrator/state-machine.js +3 -3
  376. package/dist/src/orchestrator/state-machine.js.map +1 -1
  377. package/dist/src/orchestrator/worker-registry.js +4 -3
  378. package/dist/src/orchestrator/worker-registry.js.map +1 -1
  379. package/dist/src/prompt/builder.js +24 -19
  380. package/dist/src/prompt/builder.js.map +1 -1
  381. package/dist/src/prompt/templates/a1-system.md +15 -10
  382. package/dist/src/prompt/templates/control-system.md +9 -7
  383. package/dist/src/prompt/templates/employee.md +5 -4
  384. package/dist/src/prompt/templates/vision-click.md +1 -1
  385. package/dist/src/routes/_http-error.js +15 -0
  386. package/dist/src/routes/_http-error.js.map +1 -0
  387. package/dist/src/routes/avatar.js +6 -5
  388. package/dist/src/routes/avatar.js.map +1 -1
  389. package/dist/src/routes/browser.js +132 -45
  390. package/dist/src/routes/browser.js.map +1 -1
  391. package/dist/src/routes/employees.js +28 -21
  392. package/dist/src/routes/employees.js.map +1 -1
  393. package/dist/src/routes/heartbeat.js +12 -9
  394. package/dist/src/routes/heartbeat.js.map +1 -1
  395. package/dist/src/routes/i18n.js +13 -7
  396. package/dist/src/routes/i18n.js.map +1 -1
  397. package/dist/src/routes/jaw-memory.js +15 -11
  398. package/dist/src/routes/jaw-memory.js.map +1 -1
  399. package/dist/src/routes/memory.js +25 -20
  400. package/dist/src/routes/memory.js.map +1 -1
  401. package/dist/src/routes/messaging.js +50 -29
  402. package/dist/src/routes/messaging.js.map +1 -1
  403. package/dist/src/routes/orchestrate.js +38 -24
  404. package/dist/src/routes/orchestrate.js.map +1 -1
  405. package/dist/src/routes/quota.js +81 -17
  406. package/dist/src/routes/quota.js.map +1 -1
  407. package/dist/src/routes/settings.js +28 -18
  408. package/dist/src/routes/settings.js.map +1 -1
  409. package/dist/src/routes/skills.js +22 -13
  410. package/dist/src/routes/skills.js.map +1 -1
  411. package/dist/src/routes/traces.js +77 -0
  412. package/dist/src/routes/traces.js.map +1 -0
  413. package/dist/src/security/path-guards.js +2 -1
  414. package/dist/src/security/path-guards.js.map +1 -1
  415. package/dist/src/shared/tool-log-sanitize.js +191 -0
  416. package/dist/src/shared/tool-log-sanitize.js.map +1 -0
  417. package/dist/src/telegram/bot.js +65 -55
  418. package/dist/src/telegram/bot.js.map +1 -1
  419. package/dist/src/telegram/forwarder.js +5 -9
  420. package/dist/src/telegram/forwarder.js.map +1 -1
  421. package/dist/src/telegram/telegram-file.js +28 -24
  422. package/dist/src/telegram/telegram-file.js.map +1 -1
  423. package/dist/src/telegram/voice.js +4 -3
  424. package/dist/src/telegram/voice.js.map +1 -1
  425. package/dist/src/trace/redact.js +50 -0
  426. package/dist/src/trace/redact.js.map +1 -0
  427. package/dist/src/trace/store.js +162 -0
  428. package/dist/src/trace/store.js.map +1 -0
  429. package/dist/src/trace/types.js +2 -0
  430. package/dist/src/trace/types.js.map +1 -0
  431. package/dist/src/types/cli-engine.js +34 -0
  432. package/dist/src/types/cli-engine.js.map +1 -0
  433. package/dist/src/types/cli-events.js +31 -0
  434. package/dist/src/types/cli-events.js.map +1 -0
  435. package/package.json +22 -2
  436. package/public/css/tool-ui.css +3 -1
  437. package/public/css/trace-drawer.css +48 -0
  438. package/public/dist/assets/{AdvancedExport-3WAYIabE.js → AdvancedExport-DJZ2VmBR.js} +1 -1
  439. package/public/dist/assets/Agent-CgpLT8IY.js +1 -0
  440. package/public/dist/assets/Browser-CrkiQoB8.js +1 -0
  441. package/public/dist/assets/{ChannelsDiscord-UzFPlWT4.js → ChannelsDiscord-CVUC22D4.js} +1 -1
  442. package/public/dist/assets/{ChannelsTelegram-DNWtPX0w.js → ChannelsTelegram-DEatIQNM.js} +1 -1
  443. package/public/dist/assets/{DashboardMeta-Y_6nVeJO.js → DashboardMeta-BKoxRc7i.js} +1 -1
  444. package/public/dist/assets/{Display-D8vGOl4s.js → Display-DnNGV9Km.js} +1 -1
  445. package/public/dist/assets/{Employees-YR_sIRK4.js → Employees-DZ2iJYKy.js} +1 -1
  446. package/public/dist/assets/{HealthBadge-CPePajyU.js → HealthBadge-Cq2c7G9s.js} +1 -1
  447. package/public/dist/assets/{Heartbeat-DTpAULQR.js → Heartbeat-BML6eTXZ.js} +1 -1
  448. package/public/dist/assets/{Mcp-DM-PgG6z.js → Mcp-BlEviQ3h.js} +1 -1
  449. package/public/dist/assets/{Memory-C_LvJnkn.js → Memory-BRyH80He.js} +1 -1
  450. package/public/dist/assets/MilkdownWysiwygEditor-Cm3uXfWf.js +52 -0
  451. package/public/dist/assets/ModelProvider-DxyR7EL9.js +1 -0
  452. package/public/dist/assets/Network-DDOOESh1.js +1 -0
  453. package/public/dist/assets/{Permissions-B1naJjjw.js → Permissions-Br0eSbKb.js} +1 -1
  454. package/public/dist/assets/{Permissions-BKffrMJD.js → Permissions-QHkzStqQ.js} +1 -1
  455. package/public/dist/assets/{Profile-DIqjSe2C.js → Profile-C79NKumk.js} +1 -1
  456. package/public/dist/assets/{Prompts-BMfbV6Y4.js → Prompts-BmiIDiXW.js} +1 -1
  457. package/public/dist/assets/{SpeechKeys-DjiQTzSL.js → SpeechKeys-B8304XJK.js} +1 -1
  458. package/public/dist/assets/app-Be58Cs3Y.js +32 -0
  459. package/public/dist/assets/{app-BzvwJJiv.css → app-CphocJzo.css} +1 -1
  460. package/public/dist/assets/{dist-DTvxN3ux.js → dist-BD0UXfgF2.js} +1 -1
  461. package/public/dist/assets/{dist-CASeq-Tl.js → dist-BNfXO3Yr.js} +1 -1
  462. package/public/dist/assets/{dist-BMPiaUzF.js → dist-BUnPYbK3.js} +1 -1
  463. package/public/dist/assets/{dist-CT_X3hVT.js → dist-BZosRD2u.js} +1 -1
  464. package/public/dist/assets/{dist-4J6YbNXv.js → dist-Bd9PlnQm.js} +1 -1
  465. package/public/dist/assets/{dist-BcZjyn5g.js → dist-BsT5UdNP.js} +1 -1
  466. package/public/dist/assets/{dist-BfBhOPR-.js → dist-CIuXW-sc.js} +1 -1
  467. package/public/dist/assets/{dist-BMiCig3A2.js → dist-CL4PTYWf.js} +1 -1
  468. package/public/dist/assets/{dist-VyP6-HLb.js → dist-Ch5VAlV9.js} +1 -1
  469. package/public/dist/assets/dist-ClqO40BE.js +1 -0
  470. package/public/dist/assets/{dist-c98Tp7bP.js → dist-Cp42cMcI.js} +1 -1
  471. package/public/dist/assets/{dist-CIlYL1qe.js → dist-CpUK8ypo.js} +1 -1
  472. package/public/dist/assets/dist-CxeLAw2Y.js +1 -0
  473. package/public/dist/assets/dist-D2SH8nxa.js +1 -0
  474. package/public/dist/assets/{dist-84fwQ7bO.js → dist-D6cUXP7K.js} +1 -1
  475. package/public/dist/assets/{dist-BOCcQAyF.js → dist-D7bCuS3f.js} +1 -1
  476. package/public/dist/assets/{dist-DMmpfLVP.js → dist-DFYRUAjN.js} +1 -1
  477. package/public/dist/assets/{dist-DdY6pTJr.js → dist-DZsFVYF4.js} +1 -1
  478. package/public/dist/assets/{dist-B0p3Eyme.js → dist-Db16ogVk.js} +1 -1
  479. package/public/dist/assets/{dist-DlnNtr6L.js → dist-DfodGES_.js} +1 -1
  480. package/public/dist/assets/{dist-DO9so2a2.js → dist-SU-YTAIg.js} +1 -1
  481. package/public/dist/assets/{dist-DUjXiMLP.js → dist-UYn7T-GH.js} +1 -1
  482. package/public/dist/assets/{dist-BW1409rz.js → dist-W51oDoeA.js} +1 -1
  483. package/public/dist/assets/{dist-BimBQZx1.js → dist-eU7TyC86.js} +1 -1
  484. package/public/dist/assets/dist-l9HH00ip.js +1 -0
  485. package/public/dist/assets/{dist-BrOPNxdH.js → dist-urPTQzXL.js} +1 -1
  486. package/public/dist/assets/{dist-AloEV3J52.js → dist-yHP6L0Ty.js} +1 -1
  487. package/public/dist/assets/{employees-Bbabvbyx.js → employees-CxdghzoD.js} +7 -7
  488. package/public/dist/assets/{error-normalize-DdvKGLt_.js → error-normalize-5n-zlEQ3.js} +1 -1
  489. package/public/dist/assets/insert-image-markdown-DIEa-zjk.js +22 -0
  490. package/public/dist/assets/{manager-DyB2ZUr9.css → manager-DEiyrWDP.css} +1 -1
  491. package/public/dist/assets/manager-UEXd1_9T.js +25 -0
  492. package/public/dist/assets/{memory-B_plvcuQ.js → memory-CsMNkYtv.js} +9 -9
  493. package/public/dist/assets/memory-DXad_DPO.js +1 -0
  494. package/public/dist/assets/{page-shell-DML_HneX.js → page-shell-D5tbivHH.js} +1 -1
  495. package/public/dist/assets/{render-DEhbfUAW.js → render-DGQX46ei.js} +2 -2
  496. package/public/dist/assets/{settings-D7F-_kYG.js → settings-BH213Yv3.js} +14 -14
  497. package/public/dist/assets/settings-DXT87G2U.js +1 -0
  498. package/public/dist/assets/settings-client-ajlwI-oK.js +1 -0
  499. package/public/dist/assets/skills-5o_1v0nz.js +1 -0
  500. package/public/dist/assets/{skills-DoGJOc0D.js → skills-CQtCtHPA.js} +6 -6
  501. package/public/dist/assets/slash-commands-D4-hrrmh.js +1 -0
  502. package/public/dist/assets/{slash-commands-khNFPOyF.js → slash-commands-Dzk1xHWS.js} +1 -1
  503. package/public/dist/assets/trace-drawer-SRKcfm2S.js +15 -0
  504. package/public/dist/assets/ui-CdRKN2S6.js +141 -0
  505. package/public/dist/assets/ui-n43jmg_f.js +1 -0
  506. package/public/dist/assets/{ws-B2aJ-nD2.js → ws-CTHQFzM1.js} +8 -8
  507. package/public/dist/index.html +2 -2
  508. package/public/dist/manager/index.html +2 -2
  509. package/public/index.html +1 -0
  510. package/public/js/constants.ts +5 -5
  511. package/public/js/diagram/iframe-renderer.ts +11 -11
  512. package/public/js/features/chat.ts +1 -1
  513. package/public/js/features/memory.ts +10 -10
  514. package/public/js/features/pending-queue.ts +2 -2
  515. package/public/js/features/process-block.ts +257 -29
  516. package/public/js/features/process-step-match.ts +18 -0
  517. package/public/js/features/settings-cli-status.ts +1 -1
  518. package/public/js/features/settings-stt.ts +37 -11
  519. package/public/js/features/settings-templates.ts +2 -2
  520. package/public/js/features/slash-commands.ts +1 -1
  521. package/public/js/features/tool-ui.ts +13 -7
  522. package/public/js/features/trace-drawer.ts +122 -0
  523. package/public/js/icons.ts +1 -1
  524. package/public/js/main.ts +28 -28
  525. package/public/js/provider-icons.ts +1 -1
  526. package/public/js/render.ts +29 -27
  527. package/public/js/sanitizer.ts +4 -0
  528. package/public/js/ui.ts +234 -68
  529. package/public/js/virtual-scroll.ts +19 -33
  530. package/public/js/ws.ts +22 -10
  531. package/public/manager/src/App.tsx +34 -6
  532. package/public/manager/src/api.ts +55 -1
  533. package/public/manager/src/components/ActivityTimeline.tsx +1 -1
  534. package/public/manager/src/components/InstanceDetailPanel.tsx +2 -2
  535. package/public/manager/src/components/InstanceGroups.tsx +5 -5
  536. package/public/manager/src/components/InstanceListContent.tsx +1 -1
  537. package/public/manager/src/dashboard-features.ts +1 -1
  538. package/public/manager/src/manager-notes.css +49 -2
  539. package/public/manager/src/notes/MarkdownEditor.tsx +7 -3
  540. package/public/manager/src/notes/NotesFileTree.tsx +45 -6
  541. package/public/manager/src/notes/NotesSidebar.tsx +24 -55
  542. package/public/manager/src/notes/NotesWorkspace.tsx +50 -3
  543. package/public/manager/src/notes/image-assets/clipboard-images.ts +100 -0
  544. package/public/manager/src/notes/image-assets/insert-image-markdown.ts +85 -0
  545. package/public/manager/src/notes/notes-api.ts +2 -0
  546. package/public/manager/src/notes/notes-types.ts +8 -1
  547. package/public/manager/src/notes/rendering/MarkdownRenderer.tsx +6 -0
  548. package/public/manager/src/notes/rendering/markdown-render-security.ts +19 -1
  549. package/public/manager/src/notes/rich-markdown/paste-policy.ts +6 -2
  550. package/public/manager/src/notes/rich-markdown/rich-markdown-extension.ts +5 -5
  551. package/public/manager/src/notes/rich-markdown/rich-widget.ts +8 -8
  552. package/public/manager/src/notes/useNotesExternalSync.ts +37 -0
  553. package/public/manager/src/notes/useNotesModel.ts +91 -0
  554. package/public/manager/src/notes/wysiwyg/MilkdownWysiwygEditor.tsx +157 -17
  555. package/public/manager/src/notes/wysiwyg/milkdown-block-keymap.ts +14 -2
  556. package/public/manager/src/notes/wysiwyg/milkdown-code-block-view.ts +20 -20
  557. package/public/manager/src/notes/wysiwyg/milkdown-heading-source-view.ts +8 -8
  558. package/public/manager/src/notes/wysiwyg/milkdown-math.ts +25 -25
  559. package/public/manager/src/settings/pages/Browser.tsx +38 -20
  560. package/public/manager/src/settings/pages/ModelProvider.tsx +11 -9
  561. package/public/manager/src/settings/pages/Network.tsx +10 -10
  562. package/public/manager/src/settings/pages/components/HealthBadge.tsx +12 -12
  563. package/public/manager/src/settings/pages/components/agent/runtime-employees-helpers.ts +12 -10
  564. package/public/manager/src/settings/pages/components/employees-helpers.ts +9 -9
  565. package/public/manager/src/settings/pages/components/heartbeat-helpers.ts +13 -13
  566. package/public/manager/src/settings/pages/components/memory-helpers.ts +4 -4
  567. package/public/manager/src/settings/pages/mcp-helpers.ts +7 -7
  568. package/public/manager/src/settings/settings-client.ts +4 -3
  569. package/public/manager/src/sync/IframeBridge.tsx +29 -0
  570. package/public/manager/src/sync/VisibilityBridge.tsx +24 -0
  571. package/public/manager/src/sync/invalidation-bus.ts +30 -0
  572. package/public/manager/src/sync/useInvalidationSubscription.ts +19 -0
  573. package/public/manager/src/types.ts +101 -0
  574. package/scripts/check-strict-baseline.mjs +255 -0
  575. package/scripts/claim-audit.mjs +159 -0
  576. package/scripts/i18n-registry.ts +4 -4
  577. package/scripts/install-officecli.sh +2 -2
  578. package/scripts/install-wsl.sh +2 -1
  579. package/scripts/release-gates.mjs +347 -0
  580. package/scripts/release-preview.sh +3 -0
  581. package/scripts/release.sh +4 -0
  582. package/scripts/smoke/opencode-external-dir-smoke.ts +14 -5
  583. package/public/dist/assets/Agent-BYdzZwD0.js +0 -1
  584. package/public/dist/assets/Browser-CkGeczuN.js +0 -1
  585. package/public/dist/assets/MilkdownWysiwygEditor-B7k9bAey.js +0 -52
  586. package/public/dist/assets/ModelProvider-CX3Qhowu.js +0 -1
  587. package/public/dist/assets/Network-DfPLFAvw.js +0 -1
  588. package/public/dist/assets/app-DLYoRkU9.js +0 -32
  589. package/public/dist/assets/dist-8zNAQAIa.js +0 -1
  590. package/public/dist/assets/dist-BgeY6nvK.js +0 -1
  591. package/public/dist/assets/dist-BzDGGxHQ.js +0 -1
  592. package/public/dist/assets/dist-D3YKbVi-.js +0 -1
  593. package/public/dist/assets/manager-CUSgFbMO.js +0 -25
  594. package/public/dist/assets/markdown-render-security-DJfJPWO-.js +0 -22
  595. package/public/dist/assets/memory-DQ6dU0qs.js +0 -1
  596. package/public/dist/assets/settings-DxLPUbpj.js +0 -1
  597. package/public/dist/assets/settings-client-CGf3uPPf.js +0 -1
  598. package/public/dist/assets/skills-yMfNYJ8m.js +0 -1
  599. package/public/dist/assets/slash-commands-CZcwr1W6.js +0 -1
  600. package/public/dist/assets/ui-04YlOMgn.js +0 -136
  601. package/public/dist/assets/ui-D6hlMjRq.js +0 -1
  602. /package/public/dist/assets/{InlineWarn-CqgWEC41.js → InlineWarn-BooBRm7o.js} +0 -0
  603. /package/public/dist/assets/{agent-meta-puNn13DV.js → agent-meta-DHddpWHQ.js} +0 -0
  604. /package/public/dist/assets/{fields-DH9JS3mb.js → fields-BtncIZYA.js} +0 -0
  605. /package/public/dist/assets/{mermaid-loader-6XC0y10y.js → mermaid-loader-BEFIOoJn.js} +0 -0
  606. /package/public/dist/assets/{path-utils-CtsDDGZg.js → path-utils-BuEEtj9w.js} +0 -0
  607. /package/public/dist/assets/{w3c-keyname-VSld09PZ.js → w3c-keyname-IiiZScED.js} +0 -0
@@ -1,25 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-render-Bjnw0wQ6.css"])))=>i.map(i=>d[i]);
2
- import{o as e,r as t,t as n}from"./rolldown-runtime-DE9SaGGd.js";import{f as r}from"./vendor-render-984tPmpy.js";import{t as i}from"./preload-helper-CMqhPRCH.js";import{n as a,t as o}from"./jsx-runtime-DOs-BiPY.js";import{n as s}from"./settings-client-CGf3uPPf.js";import{t as c}from"./error-normalize-DdvKGLt_.js";import{$ as l,A as u,At as d,B as f,Ct as p,Dt as m,E as h,F as g,Ft as _,It as v,J as y,Lt as b,M as x,Mt as S,Nt as ee,O as te,P as C,Pt as ne,Q as re,R as w,Rt as ie,S as ae,St as oe,T as se,Tt as ce,X as T,Y as E,Z as le,_t as ue,a as de,at as fe,b as pe,bt as D,ct as me,dt as he,et as ge,f as O,ft as _e,g as ve,gt as k,it as ye,jt as be,k as xe,kt as Se,l as A,mt as Ce,o as we,ot as Te,p as Ee,pt as De,q as j,rt as Oe,st as ke,tt as M,u as Ae,ut as je,vt as Me,xt as N,yt as Ne}from"./dist-CIlYL1qe.js";import{i as Pe,n as Fe,o as Ie,r as Le}from"./dist-BcZjyn5g.js";import{a as Re}from"./dist-CASeq-Tl.js";import{C as ze,S as Be,_ as Ve,a as He,b as Ue,f as We,g as Ge,h as Ke,i as qe,m as Je,n as Ye,o as Xe,p as Ze,r as Qe,t as $e,v as et,y as tt}from"./markdown-render-security-DJfJPWO-.js";var nt=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,w());else{var t=n(l);t!==null&&oe(x,t.startTime-e)}}var S=!1,ee=-1,te=5,C=-1;function ne(){return g?!0:!(e.unstable_now()-C<te)}function re(){if(g=!1,S){var t=e.unstable_now();C=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(ee),ee=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&oe(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?w():S=!1}}}var w;if(typeof y==`function`)w=function(){y(re)};else if(typeof MessageChannel<`u`){var ie=new MessageChannel,ae=ie.port2;ie.port1.onmessage=re,w=function(){ae.postMessage(null)}}else w=function(){_(re,0)};function oe(t,n){ee=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):te=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(ee),ee=-1):h=!0,oe(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,w()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),rt=n(((e,t)=>{t.exports=nt()})),it=n((e=>{var t=a();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}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 r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=i.p;try{if(c.T=null,i.p=2,e)return e()}finally{c.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.5`})),at=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=it()})),ot=n((e=>{var t=rt(),n=a(),r=at();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function c(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 l(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 u(e){if(s(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return u(a),e;if(o===r)return u(a),t;o=o.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=o;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=o;break}if(l===r){c=!0,r=a,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=a;break}if(l===r){c=!0,r=o,n=a;break}l=l.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),C=Symbol.for(`react.memo`),ne=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),w=Symbol.for(`react.memo_cache_sentinel`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case ee:return`Suspense`;case te:return`SuspenseList`;case re:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case C:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case ne:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,T=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ue=[],de=-1;function fe(e){return{current:e}}function pe(e){0>de||(e.current=ue[de],ue[de]=null,de--)}function D(e,t){de++,ue[de]=e.current,e.current=t}var me=fe(null),he=fe(null),ge=fe(null),O=fe(null);function _e(e,t){switch(D(ge,t),D(he,e),D(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(me),D(me,e)}function ve(){pe(me),pe(he),pe(ge)}function k(e){e.memoizedState!==null&&D(O,e);var t=me.current,n=Hd(t,e.type);t!==n&&(D(he,e),D(me,n))}function ye(e){he.current===e&&(pe(me),pe(he)),O.current===e&&(pe(O),Qf._currentValue=le)}var be,xe;function Se(e){if(be===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);be=t&&t[1]||``,xe=-1<e.stack.indexOf(`
3
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
- `+be+e+xe}var A=!1;function Ce(e,t){if(!e||A)return``;A=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
- `),l=s.split(`
6
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{A=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Se(n):``}function we(e,t){switch(e.tag){case 26:case 27:case 5:return Se(e.type);case 16:return Se(`Lazy`);case 13:return e.child!==t&&t!==null?Se(`Suspense Fallback`):Se(`Suspense`);case 19:return Se(`SuspenseList`);case 0:case 15:return Ce(e.type,!1);case 11:return Ce(e.type.render,!1);case 1:return Ce(e.type,!0);case 31:return Se(`Activity`);default:return``}}function Te(e){try{var t=``,n=null;do t+=we(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
- Error generating stack: `+e.message+`
9
- `+e.stack}}var Ee=Object.prototype.hasOwnProperty,De=t.unstable_scheduleCallback,j=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,M=t.unstable_now,Ae=t.unstable_getCurrentPriorityLevel,je=t.unstable_ImmediatePriority,Me=t.unstable_UserBlockingPriority,N=t.unstable_NormalPriority,Ne=t.unstable_LowPriority,Pe=t.unstable_IdlePriority,Fe=t.log,Ie=t.unstable_setDisableYieldValue,Le=null,Re=null;function ze(e){if(typeof Fe==`function`&&Ie(e),Re&&typeof Re.setStrictMode==`function`)try{Re.setStrictMode(Le,e)}catch{}}var Be=Math.clz32?Math.clz32:Ue,Ve=Math.log,He=Math.LN2;function Ue(e){return e>>>=0,e===0?32:31-(Ve(e)/He|0)|0}var We=256,Ge=262144,Ke=4194304;function qe(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 Je(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=qe(n))):i=qe(o):i=qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=qe(n))):i=qe(o)):i=qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ye(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xe(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 Ze(){var e=Ke;return Ke<<=1,!(Ke&62914560)&&(Ke=4194304),e}function Qe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function $e(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function et(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Be(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&tt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function tt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Be(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function nt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Be(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function it(e,t){var n=t&-t;return n=n&42?1:ot(n),(n&(e.suspendedLanes|t))===0?n:0}function ot(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 st(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function P(){var e=E.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ct(e,t){var n=E.p;try{return E.p=e,t()}finally{E.p=n}}var lt=Math.random().toString(36).slice(2),ut=`__reactFiber$`+lt,dt=`__reactProps$`+lt,ft=`__reactContainer$`+lt,pt=`__reactEvents$`+lt,mt=`__reactListeners$`+lt,ht=`__reactHandles$`+lt,gt=`__reactResources$`+lt,_t=`__reactMarker$`+lt;function vt(e){delete e[ut],delete e[dt],delete e[pt],delete e[mt],delete e[ht]}function yt(e){var t=e[ut];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ft]||n[ut]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[ut])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function bt(e){if(e=e[ut]||e[ft]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function xt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function St(e){var t=e[gt];return t||=e[gt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ct(e){e[_t]=!0}var wt=new Set,Tt={};function Et(e,t){Dt(e,t),Dt(e+`Capture`,t)}function Dt(e,t){for(Tt[e]=t,e=0;e<t.length;e++)wt.add(t[e])}var Ot=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]*$`),kt={},At={};function F(e){return Ee.call(At,e)?!0:Ee.call(kt,e)?!1:Ot.test(e)?At[e]=!0:(kt[e]=!0,!1)}function jt(e,t,n){if(F(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){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,``+n)}}function Mt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Nt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Pt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Ft(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function It(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lt(e){if(!e._valueTracker){var t=Ft(e)?`checked`:`value`;e._valueTracker=It(e,t,``+e[t])}}function Rt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Ft(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function zt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Bt=/[\n"\\]/g;function Vt(e){return e.replace(Bt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ht(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Pt(t)):e.value!==``+Pt(t)&&(e.value=``+Pt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Wt(e,o,Pt(n)):Wt(e,o,Pt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Pt(s):e.removeAttribute(`name`)}function Ut(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Lt(e);return}n=n==null?``:``+Pt(n),t=t==null?n:``+Pt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Lt(e)}function Wt(e,t,n){t===`number`&&zt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Gt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Pt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Kt(e,t,n){if(t!=null&&(t=``+Pt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Pt(n)}function qt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(ce(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Pt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Lt(e)}function Jt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Yt=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 Xt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Yt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Zt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.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)&&n[a]!==r&&Xt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Xt(e,o,t[o])}function Qt(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 $t=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`]]),en=/^[\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 tn(e){return en.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function nn(){}var rn=null;function an(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var on=null,sn=null;function cn(e){var t=bt(e);if(t&&(e=t.stateNode)){var n=e[dt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ht(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Vt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[dt]||null;if(!a)throw Error(i(90));Ht(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Rt(r)}break a;case`textarea`:Kt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Gt(e,!!n.multiple,t,!1)}}}var ln=!1;function un(e,t,n){if(ln)return e(t,n);ln=!0;try{return e(t)}finally{if(ln=!1,(on!==null||sn!==null)&&(bu(),on&&(t=on,e=sn,sn=on=null,cn(t),e)))for(t=0;t<e.length;t++)cn(e[t])}}function dn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[dt]||null;if(r===null)return null;n=r[t];a: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 a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var fn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),pn=!1;if(fn)try{var mn={};Object.defineProperty(mn,`passive`,{get:function(){pn=!0}}),window.addEventListener(`test`,mn,mn),window.removeEventListener(`test`,mn,mn)}catch{pn=!1}var hn=null,gn=null,_n=null;function vn(){if(_n)return _n;var e,t=gn,n=t.length,r,i=`value`in hn?hn.value:hn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return _n=i.slice(e,1<r?1-r:void 0)}function yn(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 bn(){return!0}function xn(){return!1}function Sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?bn:xn,this.isPropagationStopped=xn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=bn)},persist:function(){},isPersistent:bn}),t}var Cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wn=Sn(Cn),Tn=p({},Cn,{view:0,detail:0}),En=Sn(Tn),Dn,On,kn,An=p({},Tn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vn,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!==kn&&(kn&&e.type===`mousemove`?(Dn=e.screenX-kn.screenX,On=e.screenY-kn.screenY):On=Dn=0,kn=e),Dn)},movementY:function(e){return`movementY`in e?e.movementY:On}}),jn=Sn(An),Mn=Sn(p({},An,{dataTransfer:0})),Nn=Sn(p({},Tn,{relatedTarget:0})),Pn=Sn(p({},Cn,{animationName:0,elapsedTime:0,pseudoElement:0})),Fn=Sn(p({},Cn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),In=Sn(p({},Cn,{data:0})),Ln={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Rn={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`},zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Bn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zn[e])?!!t[e]:!1}function Vn(){return Bn}var Hn=Sn(p({},Tn,{key:function(e){if(e.key){var t=Ln[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=yn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Rn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vn,charCode:function(e){return e.type===`keypress`?yn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?yn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Un=Sn(p({},An,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Wn=Sn(p({},Tn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vn})),Gn=Sn(p({},Cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Kn=Sn(p({},An,{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})),qn=Sn(p({},Cn,{newState:0,oldState:0})),Jn=[9,13,27,32],Yn=fn&&`CompositionEvent`in window,Xn=null;fn&&`documentMode`in document&&(Xn=document.documentMode);var Zn=fn&&`TextEvent`in window&&!Xn,Qn=fn&&(!Yn||Xn&&8<Xn&&11>=Xn),$n=` `,er=!1;function tr(e,t){switch(e){case`keyup`:return Jn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function nr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var rr=!1;function ir(e,t){switch(e){case`compositionend`:return nr(t);case`keypress`:return t.which===32?(er=!0,$n):null;case`textInput`:return e=t.data,e===$n&&er?null:e;default:return null}}function ar(e,t){if(rr)return e===`compositionend`||!Yn&&tr(e,t)?(e=vn(),_n=gn=hn=null,rr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Qn&&t.locale!==`ko`?null:t.data;default:return null}}var or={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 sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!or[e.type]:t===`textarea`}function cr(e,t,n,r){on?sn?sn.push(r):sn=[r]:on=r,t=Ed(t,`onChange`),0<t.length&&(n=new wn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var lr=null,ur=null;function dr(e){yd(e,0)}function fr(e){if(Rt(xt(e)))return e}function pr(e,t){if(e===`change`)return t}var mr=!1;if(fn){var hr;if(fn){var gr=`oninput`in document;if(!gr){var _r=document.createElement(`div`);_r.setAttribute(`oninput`,`return;`),gr=typeof _r.oninput==`function`}hr=gr}else hr=!1;mr=hr&&(!document.documentMode||9<document.documentMode)}function vr(){lr&&(lr.detachEvent(`onpropertychange`,yr),ur=lr=null)}function yr(e){if(e.propertyName===`value`&&fr(ur)){var t=[];cr(t,ur,e,an(e)),un(dr,t)}}function br(e,t,n){e===`focusin`?(vr(),lr=t,ur=n,lr.attachEvent(`onpropertychange`,yr)):e===`focusout`&&vr()}function xr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return fr(ur)}function Sr(e,t){if(e===`click`)return fr(t)}function Cr(e,t){if(e===`input`||e===`change`)return fr(t)}function wr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Tr=typeof Object.is==`function`?Object.is:wr;function Er(e,t){if(Tr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ee.call(t,i)||!Tr(e[i],t[i]))return!1}return!0}function Dr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Or(e,t){var n=Dr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Dr(n)}}function kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ar(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=zt(e.document)}return t}function jr(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 Mr=fn&&`documentMode`in document&&11>=document.documentMode,Nr=null,Pr=null,Fr=null,Ir=!1;function Lr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ir||Nr==null||Nr!==zt(r)||(r=Nr,`selectionStart`in r&&jr(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}),Fr&&Er(Fr,r)||(Fr=r,r=Ed(Pr,`onSelect`),0<r.length&&(t=new wn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Nr)))}function Rr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var zr={animationend:Rr(`Animation`,`AnimationEnd`),animationiteration:Rr(`Animation`,`AnimationIteration`),animationstart:Rr(`Animation`,`AnimationStart`),transitionrun:Rr(`Transition`,`TransitionRun`),transitionstart:Rr(`Transition`,`TransitionStart`),transitioncancel:Rr(`Transition`,`TransitionCancel`),transitionend:Rr(`Transition`,`TransitionEnd`)},Br={},Vr={};fn&&(Vr=document.createElement(`div`).style,`AnimationEvent`in window||(delete zr.animationend.animation,delete zr.animationiteration.animation,delete zr.animationstart.animation),`TransitionEvent`in window||delete zr.transitionend.transition);function Hr(e){if(Br[e])return Br[e];if(!zr[e])return e;var t=zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vr)return Br[e]=t[n];return e}var Ur=Hr(`animationend`),Wr=Hr(`animationiteration`),Gr=Hr(`animationstart`),Kr=Hr(`transitionrun`),qr=Hr(`transitionstart`),Jr=Hr(`transitioncancel`),Yr=Hr(`transitionend`),Xr=new Map,Zr=`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(` `);Zr.push(`scrollEnd`);function Qr(e,t){Xr.set(e,t),Et(t,[e])}var $r=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&&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)},ei=[],ti=0,ni=0;function ri(){for(var e=ti,t=ni=ti=0;t<e;){var n=ei[t];ei[t++]=null;var r=ei[t];ei[t++]=null;var i=ei[t];ei[t++]=null;var a=ei[t];if(ei[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&si(n,i,a)}}function ii(e,t,n,r){ei[ti++]=e,ei[ti++]=t,ei[ti++]=n,ei[ti++]=r,ni|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ai(e,t,n,r){return ii(e,t,n,r),ci(e)}function oi(e,t){return ii(e,null,null,t),ci(e)}function si(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Be(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ci(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var li={};function ui(e,t,n,r){this.tag=e,this.key=n,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 di(e,t,n,r){return new ui(e,t,n,r)}function fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pi(e,t){var n=e.alternate;return n===null?(n=di(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function mi(e,t){e.flags&=65011714;var n=e.alternate;return n===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=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function hi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)fi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,me.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case re:return e=di(31,n,t,a),e.elementType=re,e.lanes=o,e;case _:return gi(n.children,a,o,t);case v:s=8,a|=24;break;case y:return e=di(12,n,t,a|2),e.elementType=y,e.lanes=o,e;case ee:return e=di(13,n,t,a),e.elementType=ee,e.lanes=o,e;case te:return e=di(19,n,t,a),e.elementType=te,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case C:s=14;break a;case ne:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=di(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function gi(e,t,n,r){return e=di(7,e,r,t),e.lanes=n,e}function _i(e,t,n){return e=di(6,e,null,t),e.lanes=n,e}function vi(e){var t=di(18,null,null,0);return t.stateNode=e,t}function yi(e,t,n){return t=di(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var bi=new WeakMap;function xi(e,t){if(typeof e==`object`&&e){var n=bi.get(e);return n===void 0?(t={value:e,source:t,stack:Te(t)},bi.set(e,t),t):n}return{value:e,source:t,stack:Te(t)}}var Si=[],Ci=0,wi=null,Ti=0,Ei=[],Di=0,Oi=null,ki=1,Ai=``;function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=wi,wi=e,Ti=t}function Mi(e,t,n){Ei[Di++]=ki,Ei[Di++]=Ai,Ei[Di++]=Oi,Oi=e;var r=ki;e=Ai;var i=32-Be(r)-1;r&=~(1<<i),n+=1;var a=32-Be(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ki=1<<32-Be(t)+i|n<<i|r,Ai=a+e}else ki=1<<a|n<<i|r,Ai=e}function Ni(e){e.return!==null&&(ji(e,1),Mi(e,1,0))}function Pi(e){for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null;for(;e===Oi;)Oi=Ei[--Di],Ei[Di]=null,Ai=Ei[--Di],Ei[Di]=null,ki=Ei[--Di],Ei[Di]=null}function Fi(e,t){Ei[Di++]=ki,Ei[Di++]=Ai,Ei[Di++]=Oi,ki=t.id,Ai=t.overflow,Oi=e}var Ii=null,I=null,L=!1,Li=null,Ri=!1,zi=Error(i(519));function Bi(e){throw Ki(xi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function Vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ut]=e,t[dt]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Ut(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),qt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=nn),t=!0):t=!1,t||Bi(e,!0)}function Hi(e){for(Ii=e.return;Ii;)switch(Ii.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:Ii=Ii.return}}function Ui(e){if(e!==Ii)return!1;if(!L)return Hi(e),L=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&I&&Bi(e),Hi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));I=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));I=uf(e)}else t===27?(t=I,Zd(e.type)?(e=lf,lf=null,I=e):I=t):I=Ii?cf(e.stateNode.nextSibling):null;return!0}function Wi(){I=Ii=null,L=!1}function Gi(){var e=Li;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Li=null),e}function Ki(e){Li===null?Li=[e]:Li.push(e)}var qi=fe(null),Ji=null,Yi=null;function Xi(e,t,n){D(qi,t._currentValue),t._currentValue=n}function Zi(e){e._currentValue=qi.current,pe(qi)}function Qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function $i(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ea(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Tr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===O.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&$i(t,e,n,r),t.flags|=262144}function ta(e){for(e=e.firstContext;e!==null;){if(!Tr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function na(e){Ji=e,Yi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ra(e){return aa(Ji,e)}function ia(e,t){return Ji===null&&na(e),aa(e,t)}function aa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Yi===null){if(e===null)throw Error(i(308));Yi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yi=Yi.next=t;return n}var oa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},sa=t.unstable_scheduleCallback,ca=t.unstable_NormalPriority,la={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ua(){return{controller:new oa,data:new Map,refCount:0}}function da(e){e.refCount--,e.refCount===0&&sa(ca,function(){e.controller.abort()})}var fa=null,pa=0,ma=0,ha=null;function ga(e,t){if(fa===null){var n=fa=[];pa=0,ma=dd(),ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return pa++,t.then(_a,_a),t}function _a(){if(--pa===0&&fa!==null){ha!==null&&(ha.status=`fulfilled`);var e=fa;fa=null,ma=0,ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function va(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ya=T.S;T.S=function(e,t){eu=M(),typeof t==`object`&&t&&typeof t.then==`function`&&ga(e,t),ya!==null&&ya(e,t)};var ba=fe(null);function xa(){var e=ba.current;return e===null?q.pooledCache:e}function Sa(e,t){t===null?D(ba,ba.current):D(ba,t.pool)}function Ca(){var e=xa();return e===null?null:{parent:la._currentValue,pool:e}}var wa=Error(i(460)),Ta=Error(i(474)),Ea=Error(i(542)),Da={then:function(){}};function Oa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(nn,nn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e;default:if(typeof t.status==`string`)t.then(nn,nn);else{if(e=q,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e}throw ja=t,wa}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ja=e,wa):e}}var ja=null;function Ma(){if(ja===null)throw Error(i(459));var e=ja;return ja=null,e}function Na(e){if(e===wa||e===Ea)throw Error(i(483))}var Pa=null,Fa=0;function Ia(e){var t=Fa;return Fa+=1,Pa===null&&(Pa=[]),ka(Pa,e,t)}function La(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ra(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=pi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=_i(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ne&&Aa(i)===t.type)?(t=a(t,n.props),La(t,n),t.return=e,t):(t=hi(n.type,n.key,n.props,null,e.mode,r),La(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=yi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=gi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=_i(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=hi(t.type,t.key,t.props,null,e.mode,n),La(n,t),n.return=e,n;case g:return t=yi(t,e.mode,n),t.return=e,t;case ne:return t=Aa(t),f(e,t,n)}if(ce(t)||ae(t))return t=gi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ia(t),n);if(t.$$typeof===x)return f(e,ia(e,t),n);Ra(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case ne:return n=Aa(n),p(e,t,n,r)}if(ce(n)||ae(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ia(n),r);if(n.$$typeof===x)return p(e,t,ia(e,n),r);Ra(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ne:return r=Aa(r),m(e,t,n,r,i)}if(ce(r)||ae(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ia(r),i);if(r.$$typeof===x)return m(e,t,n,ia(t,r),i);Ra(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),L&&ji(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return L&&ji(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),L&&ji(i,h),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),L&&ji(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return L&&ji(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),L&&ji(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ne&&Aa(l)===r.type){n(e,r.sibling),c=a(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=gi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=hi(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=yi(o,e.mode,c),c.return=e,e=c}return s(e);case ne:return o=Aa(o),b(e,r,o,c)}if(ce(o))return v(e,r,o,c);if(ae(o)){if(l=ae(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ia(o),c);if(o.$$typeof===x)return b(e,r,ia(e,o),c);Ra(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=_i(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=b(e,t,n,r);return Pa=null,i}catch(t){if(t===wa||t===Ea)throw t;var a=di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(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 Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ci(e),si(e,null,n),t}return ii(e,r,t,n),ci(e)}function qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}function Ja(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ya=!1;function Xa(){if(Ya){var e=ha;if(e!==null)throw e}}function Za(e,t,n,r){Ya=!1;var i=e.updateQueue;Ha=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(Y&f)===f:(r&f)===f){f!==0&&f===ma&&(Ya=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Ha=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function $a(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Qa(n[e],t)}var eo=fe(null),to=fe(0);function no(e,t){e=Ul,D(to,e),D(eo,t),Ul=e|t.baseLanes}function ro(){D(to,Ul),D(eo,eo.current)}function io(){Ul=to.current,pe(eo),pe(to)}var ao=fe(null),oo=null;function so(e){var t=e.alternate;D(po,po.current&1),D(ao,e),oo===null&&(t===null||eo.current!==null||t.memoizedState!==null)&&(oo=e)}function co(e){D(po,po.current),D(ao,e),oo===null&&(oo=e)}function lo(e){e.tag===22?(D(po,po.current),D(ao,e),oo===null&&(oo=e)):uo(e)}function uo(){D(po,po.current),D(ao,ao.current)}function fo(e){pe(ao),oo===e&&(oo=null),pe(po)}var po=fe(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))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)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 ho=0,R=null,z=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return ho=a,R=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?Us:Ws,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){T.H=Hs;var t=z!==null&&z.next!==null;if(ho=0,go=z=R=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||sc||(e=e.dependencies,e!==null&&ta(e)&&(sc=!0))}function Oo(e,t,n,r){R=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=z=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}T.H=Gs,o=t(n,r)}while(vo);return o}function ko(){var e=T.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(z===null?null:z.memoizedState)!==e&&(R.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}ho=0,go=z=R=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?R.memoizedState=go=e:go=go.next=e,go}function Po(){if(z===null){var e=R.alternate;e=e===null?null:e.memoizedState}else e=z.next;var t=go===null?R.memoizedState:go.next;if(t!==null)go=t,z=e;else{if(e===null)throw R.alternate===null?Error(i(467)):Error(i(310));z=e,e={memoizedState:z.memoizedState,baseState:z.baseState,baseQueue:z.baseQueue,queue:z.queue,next:null},go===null?R.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=ka(So,e,t),t=R,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?Us:Ws),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===x)return ra(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=R.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=R.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),R.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=w;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),z,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ho&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ma&&(d=!0);else if((ho&p)===p){u=u.next,p===ma&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,R.lanes|=p,Gl|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,R.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Tr(o,e.memoizedState)&&(sc=!0,d&&(n=ha,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Tr(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=R,a=Po(),o=L;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Tr((z||a).memoizedState,n);if(s&&(a.memoizedState=n,sc=!0),a=a.queue,ms(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),q===null)throw Error(i(349));o||ho&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=R.updateQueue,t===null?(t=Fo(),R.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tr(e,n)}catch{return!0}}function Jo(e){var t=oi(e,2);t!==null&&hu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){ze(!0);try{n()}finally{ze(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,z,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(zs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};T.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=T.T,o={};T.T=o;try{var s=n(i,r),c=T.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),T.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(L){var n=q.formState;if(n!==null){a:{var r=R;if(L){if(I){b:{for(var i=I,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){I=cf(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Is.bind(null,R,r),r.dispatch=n,r=Yo(!1),a=Rs.bind(null,R,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,R,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),z,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===wa?Ea:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(R.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=z;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=R.updateQueue,t===null&&(t=Fo(),R.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function us(){return Po().memoizedState}function ds(e,t,n,r){var i=No();R.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function fs(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;z!==null&&r!==null&&To(r,z.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(R.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function ps(e,t){ds(8390656,8,e,t)}function ms(e,t){fs(2048,8,e,t)}function hs(e){R.flags|=4;var t=R.updateQueue;if(t===null)t=Fo(),R.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gs(e){var t=Po().memoizedState;return hs({ref:t,nextImpl:e}),function(){if(K&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function _s(e,t){return fs(4,2,e,t)}function vs(e,t){return fs(4,4,e,t)}function ys(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bs(e,t,n){n=n==null?null:n.concat([e]),fs(4,4,ys.bind(null,t,e),n)}function xs(){}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r}function ws(e,t,n){return n===void 0||ho&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),R.lanes|=e,Gl|=e,n)}function Ts(e,t,n,r){return Tr(n,t)?n:eo.current===null?!(ho&42)||ho&1073741824&&!(Y&261930)?(sc=!0,e.memoizedState=n):(e=mu(),R.lanes|=e,Gl|=e,t):(e=ws(e,n,r),Tr(e,t)||(sc=!0),e)}function Es(e,t,n,r,i){var a=E.p;E.p=a!==0&&8>a?a:8;var o=T.T,s={};T.T=s,Rs(e,!1,t,n);try{var c=i(),l=T.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,va(c,r),pu(e)):Ls(e,t,r,pu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{E.p=a,o!==null&&s.types!==null&&(o.types=s.types),T.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ks(e).queue;Es(e,a,t,le,n===null?Ds:function(){return As(e),n(r)})}function ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},pu())}function js(){return ra(Qf)}function Ms(){return Po().memoizedState}function Ns(){return Po().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ga(n);var r=Ka(t,e,n);r!==null&&(hu(r,t,n),qa(r,t,n)),t={cache:ua()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=ai(e,t,n,r),n!==null&&(hu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,pu())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Tr(s,o))return ii(e,t,i,0),q===null&&ri(),!1}catch{}if(n=ai(e,t,i,r),n!==null)return hu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=ai(e,n,r,2),t!==null&&hu(t,e,2)}function zs(e){var t=e.alternate;return e===R||t!==null&&t===R}function Bs(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,nt(e,n)}}var Hs={readContext:ra,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Hs.useEffectEvent=wo;var Us={readContext:ra,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:ra,useEffect:ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){ze(!0);try{e()}finally{ze(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){ze(!0);try{n(t)}finally{ze(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Fs.bind(null,R,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Is.bind(null,R,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xs,useDeferredValue:function(e,t){return ws(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=Es.bind(null,R,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=R,a=No();if(L){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),q===null)throw Error(i(349));Y&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ps(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=q.identifierPrefix;if(L){var n=Ai,r=ki;n=(r&~(1<<32-Be(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:js,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,R,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ps.bind(null,R)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:ra,use:Lo,useCallback:Ss,useContext:ra,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Bo,useRef:us,useState:function(){return Bo(zo)},useDebugValue:xs,useDeferredValue:function(e,t){return Ts(Po(),z.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),z,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Ws.useEffectEvent=gs;var Gs={readContext:ra,use:Lo,useCallback:Ss,useContext:ra,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Ho,useRef:us,useState:function(){return Ho(zo)},useDebugValue:xs,useDeferredValue:function(e,t){var n=Po();return z===null?ws(n,e,t):Ts(n,z.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return z===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,z,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Gs.useEffectEvent=gs;function Ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ga(r);i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(hu(t,e,r),qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ga(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(hu(t,e,r),qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ga(n);r.tag=2,t!=null&&(r.callback=t),t=Ka(e,r,n),t!==null&&(hu(t,e,n),qa(t,e,n))}};function Js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Er(n,r)||!Er(i,a):!0}function Ys(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qs.enqueueReplaceState(t,t.state,null)}function Xs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Zs(e){$r(e)}function Qs(e){console.error(e)}function $s(e){$r(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){return n=Ga(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=Ga(e),e.tag=3,e}function ic(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ea(t,n,a,!0),n=ao.current,n!==null){switch(n.tag){case 31:case 13:return oo===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(L)return t=ao.current,t===null?(r!==zi&&(t=Error(i(423),{cause:r}),Ki(xi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=xi(r,n),a=nc(e.stateNode,r,a),Ja(e,a),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==zi&&(e=Error(i(422),{cause:r}),Ki(xi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=xi(o,n),Xl===null?Xl=[o]:Xl.push(o),Wl!==4&&(Wl=2),t===null)return!0;r=xi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=nc(n.stateNode,r,e),Ja(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=rc(a),ic(a,e,n,r),Ja(n,a),!1}n=n.return}while(n!==null);return!1}var oc=Error(i(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?Va(t,null,n,r):Ba(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return na(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(L&&s&&Ni(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=hi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Er:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=pi(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Er(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return yc(e,t,n,r,i)}function fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Sa(t,a===null?null:a.cachePool),a===null?ro():no(t,a),lo(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Sa(t,null),ro(),uo(t)):(Sa(t,a.cachePool),no(t,a),uo(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=xa();return a=a===null?null:{parent:la._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Sa(t,null),ro(),lo(t),e!==null&&ea(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ba(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,fo(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(L){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(co(t),(e=I)?(e=rf(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi===null?null:{id:ki,overflow:Ai},retryLane:536870912,hydrationErrors:null},n=vi(e),n.return=t,t.child=n,Ii=t,I=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(co(t),a)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(sc||ea(e,t,n,!1),a=(n&e.childLanes)!==0,sc||a){if(r=q,r!==null&&(s=it(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,oi(e,s),hu(r,e,s),oc;Du(),t=gc(e,t,n)}else e=o.treeContext,I=cf(s.nextSibling),Ii=t,L=!0,Li=null,Ri=!1,e!==null&&Fi(t,e),t=hc(t,r),t.flags|=4096;return t}return e=pi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function yc(e,t,n,r,i){return na(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(L&&r&&Ni(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return na(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!sc?(jo(e,t,a),Nc(e,t,a)):(L&&r&&Ni(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(na(t),t.stateNode===null){var a=li,o=n.contextType;typeof o==`object`&&o&&(a=ra(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ua(t),o=n.contextType,a.context=typeof o==`object`&&o?ra(o):li,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ks(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&qs.enqueueReplaceState(a,a.state,null),Za(t,r,a,i),Xa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=li,typeof u==`object`&&u&&(o=ra(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ys(t,a,r,o),Ha=!1;var f=t.memoizedState;a.state=f,Za(t,r,a,i),Xa(),l=t.memoizedState,s||f!==l||Ha?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Ha||Js(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Wa(e,t),o=t.memoizedProps,u=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=li,typeof l==`object`&&l&&(c=ra(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ys(t,a,r,c),Ha=!1,f=t.memoizedState,a.state=f,Za(t,r,a,i),Xa();var p=t.memoizedState;o!==d||f!==p||Ha||e!==null&&e.dependencies!==null&&ta(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Ha||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ta(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,vc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ba(t,e.child,null,i),t.child=Ba(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Sc(e,t,n,r){return Wi(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:Ca()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function Ec(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(po.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(L){if(a?so(t):uo(t),(e=I)?(e=rf(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi===null?null:{id:ki,overflow:Ai},retryLane:536870912,hydrationErrors:null},n=vi(e),n.return=t,t.child=n,Ii=t,I=null)):e=null,e===null)throw Bi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(uo(t),a=t.mode,c=Oc({mode:`hidden`,children:c},a),r=gi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(so(t),Dc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(so(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(uo(t),c=r.fallback,a=t.mode,r=Oc({mode:`visible`,children:r.children},a),c=gi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ba(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(uo(t),t.child=e.child,t.flags|=128,t=null);else if(so(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ki({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(sc||ea(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=q,s!==null&&(r=it(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,oi(e,r),hu(s,e,r),oc;af(c)||Du(),t=kc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,I=cf(c.nextSibling),Ii=t,L=!0,Li=null,Ri=!1,e!==null&&Fi(t,e),t=Dc(t,r.children),t.flags|=4096);return t}return a?(uo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=pi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=gi(c,a,n,null),c.flags|=2):c=pi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(a=c.cachePool,a===null?a=Ca():(l=la._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(so(t),n=e.child,e=n.sibling,n=pi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Dc(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=di(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return Ba(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qi(e.return,t,n)}function jc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=po.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,D(po,o),cc(e,t,r,n),r=L?Ti:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ac(e,n,t);else if(e.tag===19)Ac(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ea(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=pi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ta(e))):!0}function Fc(e,t,n){switch(t.tag){case 3:_e(t,t.stateNode.containerInfo),Xi(t,la,e.memoizedState.cache),Wi();break;case 27:case 5:k(t);break;case 4:_e(t,t.stateNode.containerInfo);break;case 10:Xi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,co(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(so(t),e=Nc(e,t,n),e===null?null:e.sibling):Ec(e,t,n):(so(t),t.flags|=128,null);so(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),D(po,po.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:Xi(t,la,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!Pc(e,n)&&!(t.flags&128))return sc=!1,Fc(e,t,n);sc=!!(e.flags&131072)}else sc=!1,L&&t.flags&1048576&&Mi(t,Ti,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Aa(t.elementType),t.type=e,typeof e==`function`)fi(e)?(r=Xs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===S){t.tag=11,t=lc(null,t,e,r,n);break a}else if(a===C){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=se(e)||e,Error(i(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Xs(r,t.pendingProps),xc(e,t,r,a,n);case 3:a:{if(_e(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Wa(e,t),Za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Xi(t,la,r),r!==o.cache&&$i(t,[la],n,!0),Xa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sc(e,t,r,n);break a}else if(r!==a){a=xi(Error(i(424)),t),Ki(a),t=Sc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(I=cf(e.firstChild),Ii=t,L=!0,Li=null,Ri=!0,n=Va(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wi(),r===a){t=Nc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:L||(n=t.type,e=t.pendingProps,r=Bd(ge.current).createElement(n),r[ut]=t,r[dt]=e,Pd(r,n,e),Ct(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return k(t),e===null&&L&&(r=t.stateNode=ff(t.type,t.pendingProps,ge.current),Ii=t,Ri=!0,a=I,Zd(t.type)?(lf=a,I=cf(r.firstChild)):I=a),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&L&&((a=r=I)&&(r=tf(r,t.type,t.pendingProps,Ri),r===null?a=!1:(t.stateNode=r,Ii=t,I=cf(r.firstChild),Ri=!1,a=!0)),a||Bi(t)),k(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),Qf._currentValue=a),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&L&&((e=n=I)&&(n=nf(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,Ii=t,I=null,e=!0)),e||Bi(t)),null;case 13:return Ec(e,t,n);case 4:return _e(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ba(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Xi(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,na(t),a=ra(a),r=r(a),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return na(t),r=ra(la),e===null?(a=xa(),a===null&&(a=q,o=ua(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ua(t),Xi(t,la,a)):((e.lanes&n)!==0&&(Wa(e,t),Za(t,null,null,n),Xa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Xi(t,la,r),r!==a.cache&&$i(t,[la],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Xi(t,la,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Lc(e){e.flags|=4}function Rc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw ja=Da,Ta}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw ja=Da,Ta}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ze(),e.lanes|=t,Yl|=t)}function Vc(e,t){if(!L)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function B(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Hc(e,t,n){var r=t.pendingProps;switch(Pi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return B(t),null;case 1:return B(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Zi(la),ve(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gi())),B(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(B(t),Rc(t,a,null,r,n)):(B(t),zc(t,o))):o?o===e.memoizedState?(B(t),t.flags&=-16777217):(Lc(t),B(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),B(t),Rc(t,a,e,r,n)),null;case 27:if(ye(t),n=ge.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return B(t),null}e=me.current,Ui(t)?Vi(t,e):(e=ff(a,r,n),t.stateNode=e,Lc(t))}return B(t),null;case 5:if(ye(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return B(t),null}if(o=me.current,Ui(t))Vi(t,o);else{var s=Bd(ge.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ut]=t,o[dt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return B(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ge.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ii,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ut]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Bi(t,!0)}else e=Bd(e).createTextNode(r),e[ut]=t,t.stateNode=e}return B(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ut]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),e=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fo(t),t):(fo(t),null);if(t.flags&128)throw Error(i(558))}return B(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ui(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ut]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),a=!1}else a=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(fo(t),t):(fo(t),null)}return fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),B(t),null);case 4:return ve(),e===null&&Sd(t.stateNode.containerInfo),B(t),null;case 10:return Zi(t.type),B(t),null;case 19:if(pe(po),r=t.memoizedState,r===null)return B(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Vc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=mo(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)mi(n,e),n=n.sibling;return D(po,po.current&1|2),L&&ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&M()>tu&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304)}else{if(!a)if(e=mo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!L)return B(t),null}else 2*M()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(B(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=M(),e.sibling=null,n=po.current,D(po,a?n&1|2:n&1),L&&ji(t,r.treeForkCount),e);case 22:case 23:return fo(t),io(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(B(t),t.subtreeFlags&6&&(t.flags|=8192)):B(t),n=t.updateQueue,n!==null&&Bc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&pe(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Zi(la),B(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Uc(e,t){switch(Pi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(la),ve(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ye(t),null;case 31:if(t.memoizedState!==null){if(fo(t),t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(po),null;case 4:return ve(),null;case 10:return Zi(t.type),null;case 22:case 23:return fo(t),io(),e!==null&&pe(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zi(la),null;case 25:return null;default:return null}}function Wc(e,t){switch(Pi(t),t.tag){case 3:Zi(la),ve();break;case 26:case 27:case 5:ye(t);break;case 4:ve();break;case 31:t.memoizedState!==null&&fo(t);break;case 13:fo(t);break;case 19:pe(po);break;case 10:Zi(t.type);break;case 22:case 23:fo(t),io(),e!==null&&pe(ba);break;case 24:Zi(la)}}function Gc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Kc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{$a(t,n)}catch(t){Z(e,e.return,t)}}}function Jc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Yc(e,t){try{var n=e.ref;if(n!==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 n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Xc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Zc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[dt]=t}catch(t){Z(e,e.return,t)}}function $c(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function el(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||$c(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&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function V(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(V(e,t,n),e=e.sibling;e!==null;)V(e,t,n),e=e.sibling}function tl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[ut]=e,t[dt]=n}catch(t){Z(e,e.return,t)}}var rl=!1,il=!1,al=!1,ol=typeof WeakSet==`function`?WeakSet:Set,sl=null;function cl(e,t){if(e=e.containerInfo,Rd=sp,e=Ar(e),jr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,sl=t;sl!==null;)if(t=sl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,sl=e;else for(;sl!==null;){switch(t=sl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Xs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,sl=e;break}sl=t.return}}function ll(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Sl(e,n),r&4&&Gc(5,n);break;case 1:if(Sl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&qc(n),r&512&&Yc(n,n.return);break;case 3:if(Sl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{$a(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&nl(n);case 26:case 5:Sl(e,n),t===null&&r&4&&Zc(n),r&512&&Yc(n,n.return);break;case 12:Sl(e,n);break;case 31:Sl(e,n),r&4&&hl(e,n);break;case 13:Sl(e,n),r&4&&gl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||rl,!r){t=t!==null&&t.memoizedState!==null||il,i=rl;var a=il;rl=r,(il=t)&&!a?G(e,n,(n.subtreeFlags&8772)!=0):Sl(e,n),rl=i,il=a}break;case 30:break;default:Sl(e,n)}}function ul(e){var t=e.alternate;t!==null&&(e.alternate=null,ul(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&vt(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 dl=null,fl=!1;function pl(e,t,n){for(n=n.child;n!==null;)ml(e,t,n),n=n.sibling}function ml(e,t,n){if(Re&&typeof Re.onCommitFiberUnmount==`function`)try{Re.onCommitFiberUnmount(Le,n)}catch{}switch(n.tag){case 26:il||Xc(n,t),pl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:il||Xc(n,t);var r=dl,i=fl;Zd(n.type)&&(dl=n.stateNode,fl=!1),pl(e,t,n),pf(n.stateNode),dl=r,fl=i;break;case 5:il||Xc(n,t);case 6:if(r=dl,i=fl,dl=null,pl(e,t,n),dl=r,fl=i,dl!==null)if(fl)try{(dl.nodeType===9?dl.body:dl.nodeName===`HTML`?dl.ownerDocument.body:dl).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{dl.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:dl!==null&&(fl?(e=dl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(dl,n.stateNode));break;case 4:r=dl,i=fl,dl=n.stateNode.containerInfo,fl=!0,pl(e,t,n),dl=r,fl=i;break;case 0:case 11:case 14:case 15:Kc(2,n,t),il||Kc(4,n,t),pl(e,t,n);break;case 1:il||(Xc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Jc(n,t,r)),pl(e,t,n);break;case 21:pl(e,t,n);break;case 22:il=(r=il)||n.memoizedState!==null,pl(e,t,n),il=r;break;default:pl(e,t,n)}}function hl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function _l(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ol),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ol),t;default:throw Error(i(435,e.tag))}}function vl(e,t){var n=_l(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function H(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){dl=c.stateNode,fl=!1;break a}break;case 5:dl=c.stateNode,fl=!1;break a;case 3:case 4:dl=c.stateNode.containerInfo,fl=!0;break a}c=c.return}if(dl===null)throw Error(i(160));ml(o,s,a),dl=null,fl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)bl(t,e),t=t.sibling}var yl=null;function bl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:H(t,e),U(e),r&4&&(Kc(3,e,e.return),Gc(3,e),Kc(5,e,e.return));break;case 1:H(t,e),U(e),r&512&&(il||n===null||Xc(n,n.return)),r&64&&rl&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=yl;if(H(t,e),U(e),r&512&&(il||n===null||Xc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[_t]||o[ut]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[ut]=e,Ct(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ut]=e,Ct(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:H(t,e),U(e),r&512&&(il||n===null||Xc(n,n.return)),n!==null&&r&4&&Qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(H(t,e),U(e),r&512&&(il||n===null||Xc(n,n.return)),e.flags&32){a=e.stateNode;try{Jt(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(al=!0);break;case 6:if(H(t,e),U(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=yl,yl=gf(t.containerInfo),H(t,e),yl=a,U(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}al&&(al=!1,xl(e));break;case 4:r=yl,yl=gf(e.stateNode.containerInfo),H(t,e),U(e),yl=r;break;case 12:H(t,e),U(e);break;case 31:H(t,e),U(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 13:H(t,e),U(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=M()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=rl,d=il;if(rl=u||a,il=d||l,H(t,e),il=d,rl=u,U(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||rl||il||W(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}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 a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,vl(e,n))));break;case 19:H(t,e),U(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,vl(e,r)));break;case 30:break;case 21:break;default:H(t,e),U(e)}}function U(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if($c(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;tl(e,el(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Jt(o,``),n.flags&=-33),tl(e,el(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;V(e,el(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Sl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ll(e,t.alternate,t),t=t.sibling}function W(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Kc(4,t,t.return),W(t);break;case 1:Xc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Jc(t,t.return,n),W(t);break;case 27:pf(t.stateNode);case 26:case 5:Xc(t,t.return),W(t);break;case 22:t.memoizedState===null&&W(t);break;case 30:W(t);break;default:W(t)}e=e.sibling}}function G(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:G(i,a,n),Gc(4,a);break;case 1:if(G(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Qa(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&qc(a),Yc(a,a.return);break;case 27:nl(a);case 26:case 5:G(i,a,n),n&&r===null&&o&4&&Zc(a),Yc(a,a.return);break;case 12:G(i,a,n);break;case 31:G(i,a,n),n&&o&4&&hl(i,a);break;case 13:G(i,a,n),n&&o&4&&gl(i,a);break;case 22:a.memoizedState===null&&G(i,a,n),Yc(a,a.return);break;case 30:break;default:G(i,a,n)}t=t.sibling}}function Cl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&da(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Gc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e)));break;case 12:if(i&2048){Tl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(a,o,s,c,i),Gc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,yl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=yl;yl=gf(e.stateNode.containerInfo),Al(e,t,n),yl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(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 Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Kc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sl=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;sl!==null;){var n=sl;switch(n.tag){case 0:case 11:case 15:Kc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:da(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,sl=r;else a:for(n=e;sl!==null;){r=sl;var i=r.sibling,a=r.return;if(ul(r),r===n){sl=null;break a}if(i!==null){i.return=a,sl=i;break a}sl=a}}}var Ll={getCacheForType:function(e){var t=ra(la),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ra(la).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return K&2&&Y!==0?Y&-Y:T.T===null?P():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||L){var e=Ge;Ge<<=1,!(Ge&3932160)&&(Ge=262144),Jl=e}else Jl=536870912;return e=ao.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),$e(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Ye(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=o,Kl|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-M(),10<a)){if(yu(r,t,Jl,!Bl),Je(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nn},jl(t,a,d);var m=(a&62914560)===a?$l-M():(a&4194048)===a?eu-M():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Tr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Be(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&tt(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Yi=Ji=null,Mo(e),Pa=null,Fa=0,e=J;for(;e!==null;)Wc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),q=e,J=n=pi(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=Ye(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Be(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,ri(),n}function Cu(e,t){R=null,T.H=Hs,t===wa||t===Ea?(t=Ma(),X=3):t===Ta?(t=Ma(),X=4):X=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,ec(e,xi(t,e.current)))}function wu(){var e=ao.current;return e===null?!0:(Y&4194048)===Y?oo===null:(Y&62914560)===Y||Y&536870912?e===oo:!1}function Tu(){var e=T.H;return T.H=Hs,e===null?Hs:e}function Eu(){var e=T.A;return T.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&ao.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:ao.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Yi=Ji=null,K=r,T.H=i,T.A=a,J===null&&(q=null,Y=0,ri()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),a=Eu();q!==e||Y!==t?(nu=null,tu=M()+500,Su(e,t)):Vl=Ye(e,t);a:do try{if(X!==0&&J!==null){t=J;var o=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,o,1);break;case 2:case 9:if(Oa(o)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),rd(e)},o.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:Oa(o)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,o,7));break;case 5:var s=null;switch(J.tag){case 26:s=J.memoizedState;case 5:case 27:var c=J;if(s?Wf(s):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,o,5);break;case 6:X=0,zl=null,Pu(e,t,o,6);break;case 8:xu(),Wl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Yi=Ji=null,T.H=r,T.A=a,K=n,J===null?(q=null,Y=0,ri(),Wl):0}function ju(){for(;J!==null&&!Oe();)Mu(J)}function Mu(e){var t=Ic(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Mo(t);default:Wc(n,t),t=J=mi(t,Ul),t=Ic(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Yi=Ji=null,Mo(t),Pa=null,Fa=0;var i=t.return;try{if(ac(e,i,t,n,Y)){Wl=1,ec(e,xi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,ec(e,xi(n,e.current)),J=null;return}t.flags&32768?(L||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Hc(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Uc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(K&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ni,et(e,n,o,s,c,l),e===q&&(J=q=null,Y=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(N,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=T.T,T.T=null,a=E.p,E.p=2,s=K,K|=4;try{cl(e,t,n)}finally{K=s,E.p=a,T.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=T.T,T.T=null;var r=E.p;E.p=2;var i=K;K|=4;try{bl(t,e);var a=zd,o=Ar(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&kr(s.ownerDocument.documentElement,s)){if(c!==null&&jr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Or(s,h),v=Or(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{K=i,E.p=r,T.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=T.T,T.T=null;var r=E.p;E.p=2;var i=K;K|=4;try{ll(e,t.alternate,t)}finally{K=i,E.p=r,T.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,ke();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),st(n),t=t.stateNode,Re&&typeof Re.onCommitFiberRoot==`function`)try{Re.onCommitFiberRoot(Le,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=T.T,i=E.p,E.p=2,T.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{T.T=t,E.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,da(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=st(su),r=T.T,a=E.p;try{E.p=32>n?32:n,T.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(i(331));var c=K;if(K|=4,Pl(o.current),El(o,o.current,s,n),K=c,id(0,!1),Re&&typeof Re.onPostCommitFiberRoot==`function`)try{Re.onPostCommitFiberRoot(Le,o)}catch{}return!0}finally{E.p=a,T.T=r,Vu(e,t)}}function Wu(e,t,n){t=xi(n,t),t=nc(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&($e(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=xi(n,e),n=rc(2),r=Ka(t,n,2),r!==null&&(ic(n,r,t,e),$e(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>M()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Ze()),e=oi(e,t),e!==null&&($e(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return De(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Be(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=Je(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ye(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=M(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Be(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Xe(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=Je(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&j(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Ye(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&j(r),st(n)){case 2:case 8:n=Me;break;case 32:n=N;break;case 268435456:n=Pe;break;default:n=N}return r=cd.bind(null,e),n=De(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&j(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=Je(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,M()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){K&6?De(je,ad):od()})}function dd(){if(nd===0){var e=ma;e===0&&(e=We,We<<=1,!(We&261888)&&(We=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:tn(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[dt]||null).action),o=r.submitter;o&&(t=(t=o[dt]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new wn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Zr.length;hd++){var gd=Zr[hd];Qr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Qr(Ur,`onAnimationEnd`),Qr(Wr,`onAnimationIteration`),Qr(Gr,`onAnimationStart`),Qr(`dblclick`,`onDoubleClick`),Qr(`focusin`,`onFocus`),Qr(`focusout`,`onBlur`),Qr(Kr,`onTransitionRun`),Qr(qr,`onTransitionStart`),Qr(Jr,`onTransitionCancel`),Qr(Yr,`onTransitionEnd`),Dt(`onMouseEnter`,[`mouseout`,`mouseover`]),Dt(`onMouseLeave`,[`mouseout`,`mouseover`]),Dt(`onPointerEnter`,[`pointerout`,`pointerover`]),Dt(`onPointerLeave`,[`pointerout`,`pointerover`]),Et(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Et(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Et(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Et(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Et(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Et(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){$r(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){$r(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[pt];n===void 0&&(n=t[pt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,wt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!pn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var c=r.stateNode.containerInfo;if(c===i)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;c!==null;){if(o=yt(c),o===null)return;if(l=o.tag,l===5||l===6||l===26||l===27){r=a=o;continue a}c=c.parentNode}}r=r.return}un(function(){var r=a,i=an(n),o=[];a:{var c=Xr.get(e);if(c!==void 0){var l=wn,u=e;switch(e){case`keypress`:if(yn(n)===0)break a;case`keydown`:case`keyup`:l=Hn;break;case`focusin`:u=`focus`,l=Nn;break;case`focusout`:u=`blur`,l=Nn;break;case`beforeblur`:case`afterblur`:l=Nn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Mn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Wn;break;case Ur:case Wr:case Gr:l=Pn;break;case Yr:l=Gn;break;case`scroll`:case`scrollend`:l=En;break;case`wheel`:l=Kn;break;case`copy`:case`cut`:case`paste`:l=Fn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Un;break;case`toggle`:case`beforetoggle`:l=qn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=dn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),o.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==rn&&(u=n.relatedTarget||n.fromElement)&&(yt(u)||u[ft]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?yt(u):null,u!==null&&(f=s(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=jn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Un,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:xt(l),h=u==null?c:xt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,yt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(o,c,l,d,!1),u!==null&&f!==null&&Od(o,f,u,d,!0)}}a:{if(c=r?xt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=pr;else if(sr(c))if(mr)v=Cr;else{v=xr;var y=br}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Qt(r.elementType)&&(v=pr):v=Sr;if(v&&=v(e,r)){cr(o,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Wt(c,`number`,c.value)}switch(y=r?xt(r):window,e){case`focusin`:(sr(y)||y.contentEditable===`true`)&&(Nr=y,Pr=r,Fr=null);break;case`focusout`:Fr=Pr=Nr=null;break;case`mousedown`:Ir=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ir=!1,Lr(o,n,i);break;case`selectionchange`:if(Mr)break;case`keydown`:case`keyup`:Lr(o,n,i)}var b;if(Yn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else rr?tr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Qn&&n.locale!==`ko`&&(rr||x!==`onCompositionStart`?x===`onCompositionEnd`&&rr&&(b=vn()):(hn=i,gn=`value`in hn?hn.value:hn.textContent,rr=!0)),y=Ed(r,x),0<y.length&&(x=new In(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=nr(n),b!==null&&(x.data=b)))),(b=Zn?ir(e,n):ar(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new In(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),md(o,e,r,n,i)}yd(o,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=dn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=dn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=dn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=dn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
10
- `).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Jt(e,``+r);break;case`className`:Mt(e,`class`,r);break;case`tabIndex`:Mt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Mt(e,n,r);break;case`style`:Zt(e,r,o);break;case`data`:if(t!==`object`){Mt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`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 o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}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}n=tn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);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(n,``+r):e.removeAttribute(n);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(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),jt(e,`popover`,r);break;case`xlinkActuate`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Nt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Nt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:jt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=$t.get(n)||n,jt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Zt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Jt(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Tt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[dt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):jt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}Ut(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Gt(e,!!r,n,!0):Gt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}qt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`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(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if(Qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,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,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Ht(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Gt(e,!!n,n?[]:``,!1):Gt(e,!!n,t,!0)):Gt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Kt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(Qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.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 Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(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 Ud(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 Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[_t]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),vt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[_t])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(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 lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);vt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=E.d;E.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=bt(e);t!==null&&t.tag===5&&t.type===`form`?As(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Vt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),Ct(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Vt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Vt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Vt(n.imageSizes)+`"]`)):i+=`[href="`+Vt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),Ct(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Vt(r)+`"][href="`+Vt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),Ct(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=St(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);Ct(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=St(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Ct(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=St(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),Ct(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=ge.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=St(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=St(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=St(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Vt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,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}),Pd(t,`link`,n),Ct(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Vt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Vt(n.href)+`"]`);if(r)return t.instance=r,Ct(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ct(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,Ct(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),Ct(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,Ct(a),a):(r=n,(a=mf.get(o))&&(r=p({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ct(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[_t]||a[ut]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===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 Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ct(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),Ct(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){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=Qe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qe(0),this.hiddenUpdates=Qe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=di(3,null,null,t),e.current=a,a.stateNode=e,t=ua(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function tp(e){return e?(e=li,e):li}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ga(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ka(e,r,t),n!==null&&(hu(n,e,t),qa(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=oi(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=ot(t);var n=oi(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=T.T;T.T=null;var a=E.p;try{E.p=2,up(e,t,n,r)}finally{E.p=a,T.T=i}}function lp(e,t,n,r){var i=T.T;T.T=null;var a=E.p;try{E.p=8,up(e,t,n,r)}finally{E.p=a,T.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=bt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Be(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=M()+500,id(0,!1))}}break;case 31:case 13:s=oi(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=an(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=yt(e),e!==null){var t=s(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=c(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(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(Ae()){case je:return 2;case Me:return 8;case N:case Ne:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=bt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=yt(e.target);if(t!==null){var n=s(t);if(n!==null){if(t=n.tag,t===13){if(t=c(n),t!==null){e.blockedOn=t,ct(e.priority,function(){op(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,ct(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);rn=r,n.target.dispatchEvent(r),rn=null}else return t=bt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=bt(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[dt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[dt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[ft]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=P();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));E.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:T,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Le=zp.inject(Rp),Re=zp}catch{}}e.createRoot=function(e,t){if(!o(e))throw Error(i(299));var n=!1,r=``,a=Zs,s=Qs,c=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,a,s,c,Pp),e[ft]=t.current,Sd(e),new Fp(t)}})),st=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ot()})),P=e(a(),1),ct=st(),lt=class extends Error{status;code;constructor(e,t,n=null){super(e),this.name=`DashboardApiError`,this.status=t,this.code=n}};async function ut(e=!1){let t=await fetch(e?`/api/dashboard/instances?showHidden=1`:`/api/dashboard/instances`);if(!t.ok)throw Error(`scan failed: ${t.status}`);return await t.json()}async function dt(){let e=await fetch(`/api/dashboard/registry`);if(!e.ok)throw Error(`registry load failed: ${e.status}`);return await e.json()}async function ft(e){let t=await fetch(`/api/dashboard/registry`,{method:`PATCH`,headers:{"content-type":`application/json`},body:JSON.stringify(e)});if(!t.ok)throw Error(`registry save failed: ${t.status}`);return await t.json()}async function pt(e,t,n){let r=await fetch(`/api/dashboard/lifecycle/${e}`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({port:t,...n?.trim()?{home:n.trim()}:{}})}),i=await r.json();if(!r.ok||!i.ok)throw Error(i.message||`${e} failed: ${r.status}`);return i}async function mt(){let e=await fetch(`/api/dashboard/process-control`);if(!e.ok)throw Error(`process control fetch failed: ${e.status}`);return(await e.json()).state}async function ht(){let e=await fetch(`/api/dashboard/process-control/adopt`,{method:`POST`});if(!e.ok)throw Error(`adopt managed failed: ${e.status}`);return(await e.json()).state}async function gt(){let e=await fetch(`/api/dashboard/process-control/stop-managed`,{method:`POST`});if(!e.ok)throw Error(`stop managed failed: ${e.status}`);return(await e.json()).state}async function _t(e,t={}){let n=await fetch(`/api/dashboard/instances/${e}`,{signal:t.signal});if(!n.ok)throw Error(`status fetch failed: ${n.status}`);return(await n.json()).instance}async function vt(e=null){let t=e?`/api/manager/events?since=${encodeURIComponent(e)}`:`/api/manager/events`,n=await fetch(t);if(!n.ok)throw Error(`events fetch failed: ${n.status}`);return(await n.json()).events}async function yt(e,t){let n=await e.text(),r=null;if(n.trim())try{r=JSON.parse(n)}catch{throw new lt(`${t}: response was not JSON`,e.status,`invalid_json`)}if(!e.ok){let n=typeof r==`object`&&r&&`error`in r?String(r.error):t,i=typeof r==`object`&&r&&`code`in r&&typeof r.code==`string`?r.code:null;throw new lt(n||t,e.status,i)}return r}async function bt(){let e=await fetch(`/api/dashboard/notes/info`);return await yt(e,`notes info fetch failed: ${e.status}`)}async function xt(){let e=await fetch(`/api/dashboard/notes/tree`);return await yt(e,`notes tree fetch failed: ${e.status}`)}async function St(e){let t=await fetch(`/api/dashboard/notes/file?path=${encodeURIComponent(e)}`);return await yt(t,`note fetch failed: ${t.status}`)}async function Ct(e,t=``){let n=await fetch(`/api/dashboard/notes/file`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({path:e,content:t})});return await yt(n,`note create failed: ${n.status}`)}async function wt(e){let t=await fetch(`/api/dashboard/notes/file`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(e)});return await yt(t,`note save failed: ${t.status}`)}async function Tt(e){let t=await fetch(`/api/dashboard/notes/folder`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({path:e})});return await yt(t,`note folder create failed: ${t.status}`)}async function Et(e,t){let n=await fetch(`/api/dashboard/notes/rename`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({from:e,to:t})});return await yt(n,`note rename failed: ${n.status}`)}async function Dt(e,t=`file`){let n=await fetch(`/api/dashboard/notes/trash`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({path:e,kind:t})});return await yt(n,`note trash failed: ${n.status}`)}async function Ot(e){let t=Math.max(1,e.maxAttempts??16),n=Math.max(50,e.intervalMs??500),r=null;for(let i=1;i<=t;i+=1){if(e.signal?.aborted)return{settled:!1,attempts:i-1,instance:r};let a=new AbortController,o=()=>a.abort();e.signal?.addEventListener(`abort`,o,{once:!0});try{r=await e.fetchOnce(e.port,a.signal)}catch{r=null}finally{e.signal?.removeEventListener(`abort`,o)}if(e.onAttempt?.(r,i),kt(r,e))return{settled:!0,attempts:i,instance:r};if(i===t)break;await At(n,e.signal)}return{settled:!1,attempts:t,instance:r}}function kt(e,t){return t.expected===`online`?e?.status===`online`:t.expected===`offline`?e?e.status!==`online`:!0:t.expected===`restart-detected`?!e||e.status!==`online`||typeof e.uptime!=`number`?!1:typeof t.previousUptime==`number`?e.uptime<t.previousUptime:!0:!1}function At(e,t){return new Promise(n=>{let r=setTimeout(()=>{i(),n()},e);function i(){clearTimeout(r),t?.removeEventListener(`abort`,a)}function a(){i(),n()}if(t?.aborted){i(),n();return}t?.addEventListener(`abort`,a,{once:!0})})}var F=o();function jt(e){switch(e.kind){case`scan-completed`:return{at:e.at,source:`scan`,message:`range ${e.from}-${e.to}, ${e.reachable} reachable`};case`scan-failed`:return{at:e.at,source:`error`,message:e.reason};case`lifecycle-result`:return{at:e.at,source:e.action,message:`:${e.port} ${e.status}`};case`health-changed`:return{at:e.at,source:`health`,message:`:${e.port} ${e.from} → ${e.to}`};case`version-mismatch`:return{at:e.at,source:`version`,message:`:${e.port} ${e.expected||`?`} → ${e.seen}`};case`port-collision`:return{at:e.at,source:`collision`,message:`:${e.port} pids ${e.pids.join(`, `)}`};default:return{at:new Date().toISOString(),source:`event`,message:`unknown event`}}}var Mt={now:`Now`,earlier:`Earlier today`,yesterday:`Yesterday`,older:`Older`},Nt=[`now`,`earlier`,`yesterday`,`older`],Pt=300*1e3;function Ft(e,t){return typeof e==`string`?{at:t,source:void 0,message:e}:`kind`in e?jt(e):e}function It(e,t){let n=Date.parse(e);if(Number.isNaN(n))return`older`;if(t.getTime()-n<=Pt)return`now`;let r=new Date(t);if(r.setHours(0,0,0,0),n>=r.getTime())return`earlier`;let i=new Date(r);return i.setDate(i.getDate()-1),n>=i.getTime()?`yesterday`:`older`}function Lt(e,t){let n=new Date(e);return Number.isNaN(n.getTime())?`—`:t===`now`||t===`earlier`?n.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):t===`yesterday`?`Yesterday ${n.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}`:n.toLocaleDateString([],{month:`short`,day:`numeric`})}function Rt(e){let t=(0,P.useMemo)(()=>{let t=new Date,n=t.toISOString(),r={now:[],earlier:[],yesterday:[],older:[]};for(let i of e.entries){let e=Ft(i,n),a=It(e.at,t);r[a].push({...e,_bucket:a})}return r},[e.entries]);return e.entries.length===0?(0,F.jsx)(`div`,{className:`activity-list activity-list-empty`,role:`status`,children:(0,F.jsx)(`p`,{children:e.emptyMessage||`Activity will appear here as scans, lifecycle changes, and registry updates happen.`})}):(0,F.jsx)(`div`,{className:`activity-list`,role:`list`,"aria-label":`Recent activity grouped by time`,children:Nt.map(e=>{let n=t[e];return n.length===0?null:(0,F.jsxs)(`section`,{className:`activity-group`,"aria-label":Mt[e],children:[(0,F.jsx)(`header`,{className:`activity-group-header`,children:Mt[e]}),n.map((t,n)=>(0,F.jsxs)(`article`,{className:`activity-entry`,role:`listitem`,children:[(0,F.jsx)(`time`,{className:`activity-entry-time`,dateTime:t.at,children:Lt(t.at,t._bucket)}),t.source&&(0,F.jsx)(`span`,{className:`activity-entry-source`,children:t.source}),(0,F.jsx)(`p`,{className:`activity-entry-message`,children:t.message})]},`${e}-${n}`))]},e)})})}var zt=88,Bt=320;function Vt(e){return Math.min(Bt,Math.max(zt,Math.round(e)))}function Ht(e){let t=(0,P.useRef)(null),{onHeightChange:n}=e,r=Ut(e);(0,P.useEffect)(()=>{function e(e){let r=t.current;r&&n(Vt(r.startHeight+r.startY-e.clientY))}function r(){t.current=null,document.body.classList.remove(`is-resizing-activity`)}return document.addEventListener(`pointermove`,e),document.addEventListener(`pointerup`,r),()=>{document.removeEventListener(`pointermove`,e),document.removeEventListener(`pointerup`,r),document.body.classList.remove(`is-resizing-activity`)}},[n]);function i(n){e.collapsed||(n.preventDefault(),t.current={startY:n.clientY,startHeight:e.height},document.body.classList.add(`is-resizing-activity`))}return(0,F.jsxs)(`aside`,{className:`activity-dock ${e.collapsed?`is-collapsed`:``}`,"aria-label":`Activity dock`,children:[(0,F.jsx)(`button`,{className:`activity-resize-handle`,type:`button`,"aria-label":`Resize activity dock`,title:`Resize activity dock`,onPointerDown:i,disabled:e.collapsed}),(0,F.jsxs)(`div`,{className:`activity-header`,children:[(0,F.jsx)(`span`,{children:`Activity`}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onToggle,children:e.collapsed?`Expand`:`Collapse`})]}),!e.collapsed&&(0,F.jsx)(Rt,{entries:r})]})}function Ut(e){return(0,P.useMemo)(()=>{let t=[];if(e.events&&e.events.length>0)for(let n of e.events)t.push(n);let n=new Date().toISOString();return e.error&&t.push({at:n,source:`error`,message:e.error}),e.registryMessage&&t.push({at:n,source:`registry`,message:e.registryMessage}),e.lifecycleMessage&&t.push({at:n,source:`lifecycle`,message:e.lifecycleMessage}),t.length===0&&t.push({at:n,source:`scan`,message:e.loading?`scanning local ports`:`no recent activity`}),t},[e.events,e.loading,e.error,e.registryMessage,e.lifecycleMessage])}async function Wt(){let e=await fetch(`/api/dashboard/desktop-status`);if(!e.ok)throw Error(`desktop status failed: ${e.status}`);return await e.json()}function Gt(){let e=window.location.pathname+window.location.search;window.location.href=`jaw://open?path=${encodeURIComponent(e)}`}function Kt(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{let e=!1;return Wt().then(n=>{e||t(n)}).catch(()=>{e||r(!0)}),()=>{e=!0}},[]),e?.inDesktop?(0,F.jsx)(`span`,{className:`desktop-status-badge`,title:`cli-jaw Desktop ${e.version}`,children:`Running in cli-jaw Desktop`}):!e&&!n?null:(0,F.jsx)(`button`,{type:`button`,className:`desktop-open-button`,onClick:Gt,title:e?.downloadUrl||`Open this dashboard path in cli-jaw Desktop`,children:`Open in Desktop App`})}function qt(e){return(0,F.jsx)(`div`,{className:`command-center command-bar`,children:(0,F.jsxs)(`div`,{className:`command-primary`,children:[e.mobileMenuButton,(0,F.jsx)(`div`,{className:`command-title`,children:e.title}),(0,F.jsx)(`div`,{className:`command-search`,children:e.search}),(0,F.jsx)(`div`,{className:`command-actions`,children:e.actions})]})})}var Jt=[{value:`auto`,label:`Auto`,hint:`Follow OS preference`},{value:`light`,label:`Light`,hint:`Always light theme`},{value:`dark`,label:`Dark`,hint:`Always dark theme`}];function Yt(e){return(0,F.jsx)(`div`,{className:`theme-switch`,role:`radiogroup`,"aria-label":`Theme`,children:Jt.map(t=>{let n=e.theme===t.value;return(0,F.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":n,title:t.hint,className:n?`is-active`:``,onClick:()=>e.onChange(t.value),children:t.label},t.value)})})}function Xt(e){return(0,F.jsx)(qt,{mobileMenuButton:(0,F.jsx)(`button`,{className:`drawer-trigger`,type:`button`,onClick:e.onOpenDrawer,"aria-label":`Open sidebar`,children:`☰`}),title:(0,F.jsxs)(`h1`,{className:`manager-brand-heading`,"aria-label":`CLI-JAW Dashboard`,children:[(0,F.jsx)(`span`,{className:`manager-brand-wordmark`,children:`CLI-JAW`}),(0,F.jsx)(`span`,{className:`manager-brand-dash`,children:`DASH`})]}),search:(0,F.jsxs)(`div`,{className:`search-input-wrapper`,children:[(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`14`,height:`14`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,F.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,F.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,F.jsx)(`input`,{value:e.query,onChange:t=>e.onQueryChange(t.target.value),placeholder:`Search port, home, CLI, model`,"aria-label":`Search instances`})]}),actions:(0,F.jsxs)(`div`,{className:`command-actions-group`,children:[(0,F.jsx)(Kt,{}),(0,F.jsx)(`button`,{type:`button`,className:`command-palette-trigger`,onClick:e.onOpenPalette,"aria-label":`Open command palette`,title:`Open command palette (⌘K / Ctrl+K)`,children:(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`⌘K`})}),(0,F.jsx)(Yt,{theme:e.theme,onChange:e.onThemeChange}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onRefresh,disabled:e.loading,children:e.loading?`Scanning`:`Refresh`})]})})}var Zt=8,Qt=5;function $t(e,t,n){if(!n)return!0;let r=n.toLowerCase();return[String(e.port),t,e.url,e.workingDir,e.currentCli].some(e=>{if(!e)return!1;let t=String(e).toLowerCase();return t.startsWith(r)?!0:RegExp(`(^|[^\\p{L}\\p{N}])${en(r)}`,`u`).test(t)})}function en(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function tn(e){let[t,n]=(0,P.useState)(``),[r,i]=(0,P.useState)(0),a=(0,P.useRef)(null),o=(0,P.useRef)(null);(0,P.useEffect)(()=>{e.open&&(n(``),i(0),requestAnimationFrame(()=>a.current?.focus()))},[e.open]),(0,P.useEffect)(()=>{if(!e.open)return;function t(t){t.key===`Escape`&&(t.preventDefault(),e.onClose())}return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e.open,e.onClose]);let s=(0,P.useMemo)(()=>e.instances.filter(n=>$t(n,e.getLabel(n),t)).slice(0,Zt),[e.instances,e.getLabel,t]),c=(0,P.useMemo)(()=>[{id:`refresh`,label:`Refresh scan`,hint:`Re-scan local ports`,run:e.onRefresh},{id:`theme`,label:`Theme: cycle (current ${e.theme})`,hint:`Auto → Light → Dark`,run:e.onCycleTheme},{id:`hidden`,label:e.showHidden?`Hide hidden instances`:`Show hidden instances`,run:e.onToggleHidden},...e.selectedInstance?[{id:`open`,label:`Open ${e.selectedInstance.url} in new tab`,run:e.onOpenSelected}]:[]].slice(0,Qt),[e.onRefresh,e.theme,e.onCycleTheme,e.showHidden,e.onToggleHidden,e.selectedInstance,e.onOpenSelected]),l=(0,P.useMemo)(()=>{let e=[];for(let t of s)e.push({kind:`instance`,instance:t});for(let t of c)e.push({kind:`action`,action:t});return e},[s,c]);(0,P.useEffect)(()=>{r>=l.length&&i(Math.max(0,l.length-1))},[l.length,r]);function u(t){let n=l[t];n&&(n.kind===`instance`?e.onSelectInstance(n.instance):n.action.run(),e.onClose())}function d(e){e.key===`ArrowDown`?(e.preventDefault(),i(e=>Math.min(l.length-1,e+1))):e.key===`ArrowUp`?(e.preventDefault(),i(e=>Math.max(0,e-1))):e.key===`Enter`&&(e.preventDefault(),u(r))}return e.open?(0,F.jsx)(`div`,{className:`command-palette-backdrop`,role:`presentation`,onClick:e.onClose,children:(0,F.jsxs)(`div`,{className:`command-palette`,role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,onClick:e=>e.stopPropagation(),children:[(0,F.jsx)(`input`,{ref:a,className:`command-palette-input`,placeholder:`Go to instance, or run an action…`,value:t,onChange:e=>{n(e.target.value),i(0)},onKeyDown:d,"aria-label":`Command query`}),(0,F.jsxs)(`div`,{className:`command-palette-list`,ref:o,children:[s.length>0&&(0,F.jsxs)(`div`,{className:`command-palette-section`,role:`group`,"aria-label":`Go to instance`,children:[(0,F.jsx)(`header`,{className:`command-palette-section-header`,children:`Go to instance`}),s.map((t,n)=>{let a=n;return(0,F.jsxs)(`button`,{type:`button`,className:a===r?`command-palette-item is-active`:`command-palette-item`,onMouseEnter:()=>i(a),onClick:()=>u(a),children:[(0,F.jsxs)(`span`,{className:`command-palette-port`,children:[`:`,t.port]}),(0,F.jsx)(`span`,{className:`command-palette-label`,children:e.getLabel(t)})]},t.port)})]}),c.length>0&&(0,F.jsxs)(`div`,{className:`command-palette-section`,role:`group`,"aria-label":`Actions`,children:[(0,F.jsx)(`header`,{className:`command-palette-section-header`,children:`Actions`}),c.map((e,t)=>{let n=s.length+t;return(0,F.jsxs)(`button`,{type:`button`,className:n===r?`command-palette-item is-active`:`command-palette-item`,onMouseEnter:()=>i(n),onClick:()=>u(n),children:[(0,F.jsx)(`span`,{className:`command-palette-label`,children:e.label}),e.hint&&(0,F.jsx)(`span`,{className:`command-palette-hint`,children:e.hint})]},e.id)})]}),l.length===0&&(0,F.jsx)(`p`,{className:`command-palette-empty`,children:`No matches.`})]}),(0,F.jsxs)(`footer`,{className:`command-palette-footer`,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`↑↓`}),` navigate`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`Enter`}),` select`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`Esc`}),` close`]})]})]})}):null}function nn({value:e,onChange:t}){return(0,F.jsx)(`div`,{className:`settings-sidebar-search`,children:(0,F.jsx)(`input`,{type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:`Search settings…`,"aria-label":`Search settings`,spellCheck:!1,autoComplete:`off`})})}var rn=[`runtime`,`identity`,`channels`,`automation`,`integrations`,`network-security`,`advanced`],an={runtime:`Runtime`,identity:`Identity`,channels:`Channels`,automation:`Automation`,integrations:`Integrations`,"network-security":`Network & security`,advanced:`Advanced`};function on(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>e.label.toLowerCase().includes(n)||e.id.toLowerCase().includes(n)):e.slice()}function sn(e){let t=new Map;for(let n of e){let e=t.get(n.group)||[];e.push(n),t.set(n.group,e)}return rn.filter(e=>(t.get(e)?.length??0)>0).map(e=>({group:e,label:an[e],items:t.get(e)??[]}))}var cn=[{id:`agent`,label:`Agent`,group:`runtime`},{id:`model`,label:`Model defaults`,group:`runtime`},{id:`profile`,label:`Profile`,group:`identity`},{id:`display`,label:`Display`,group:`identity`},{id:`channels-telegram`,label:`Channels — Telegram`,group:`channels`},{id:`channels-discord`,label:`Channels — Discord`,group:`channels`},{id:`heartbeat`,label:`Heartbeat & schedules`,group:`automation`},{id:`memory`,label:`Memory`,group:`automation`},{id:`speech`,label:`Speech & keys`,group:`integrations`},{id:`prompts`,label:`Prompts`,group:`integrations`},{id:`mcp`,label:`MCP servers`,group:`integrations`},{id:`browser`,label:`Browser / CDP`,group:`integrations`},{id:`network`,label:`Network`,group:`network-security`},{id:`permissions`,label:`Permissions`,group:`network-security`},{id:`dashboard-meta`,label:`Dashboard meta`,group:`advanced`},{id:`advanced-export`,label:`Export / import`,group:`advanced`}];function ln({activeId:e,onSelect:t}){let[n,r]=(0,P.useState)(``),[i,a]=(0,P.useState)(new Set),o=sn(on(cn,n)),s=(0,P.useCallback)(e=>{a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);return(0,F.jsxs)(`nav`,{className:`settings-sidebar`,"aria-label":`Settings categories`,children:[(0,F.jsx)(nn,{value:n,onChange:r}),o.length===0?(0,F.jsx)(`p`,{className:`settings-sidebar-empty`,children:`No matches.`}):null,o.map(({group:n,label:r,items:a})=>{let o=i.has(n);return(0,F.jsxs)(`section`,{className:`settings-sidebar-group`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`settings-sidebar-group-header`,"aria-expanded":!o,"aria-controls":`settings-sidebar-group-${n}`,onClick:()=>s(n),children:[(0,F.jsx)(`span`,{className:`settings-sidebar-group-caret`,"aria-hidden":`true`,children:o?`▸`:`▾`}),(0,F.jsx)(`span`,{className:`settings-sidebar-group-label`,children:r})]}),o?null:(0,F.jsx)(`div`,{id:`settings-sidebar-group-${n}`,role:`tablist`,className:`settings-sidebar-group-items`,children:a.map(n=>{let r=n.id===e;return(0,F.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":r,"aria-current":r?`page`:void 0,className:`settings-sidebar-item${r?` is-active`:``}`,onClick:()=>t(n.id),children:n.label},n.id)})})]},n)})]})}function un(){let e=new Map,t=new Set;function n(){for(let e of t)e()}return{pending:e,isDirty:()=>Array.from(e.values()).some(e=>!dn(e.value,e.original)),set(t,r){if(dn(r.value,r.original)){e.has(t)&&(e.delete(t),n());return}e.set(t,r),n()},remove(t){e.delete(t)&&n()},clear(){e.size!==0&&(e.clear(),n())},saveBundle(){let t={};for(let[n,r]of e)r.valid&&(t[n]=r.value);return t},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function dn(e,t){return e===t?!0:typeof e!=`object`||typeof t!=`object`||e===null||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):JSON.stringify(e)===JSON.stringify(t)}function fn({isDirty:e,saving:t,pendingCount:n,error:r,onDiscard:i,onSave:a}){return!e&&!t&&!r?null:(0,F.jsxs)(`div`,{className:`settings-save-bar`,role:`region`,"aria-label":`Save changes`,"data-testid":`settings-save-bar`,children:[r?(0,F.jsx)(`span`,{className:`settings-save-bar-error`,role:`alert`,children:r}):(0,F.jsx)(`span`,{className:`settings-save-bar-status muted`,children:n===0?`No pending changes.`:`${n} pending change${n===1?``:`s`}`}),(0,F.jsx)(`button`,{type:`button`,className:`settings-action settings-action-discard`,onClick:i,disabled:t||!e,children:`Discard`}),(0,F.jsx)(`button`,{type:`button`,className:`settings-action settings-action-save`,onClick:a,disabled:t||!e,"aria-keyshortcuts":`Meta+S Control+S`,children:t?`Saving…`:`Save`})]})}function pn({kind:e,message:t,onDismiss:n,timeoutMs:r=3500}){return(0,P.useEffect)(()=>{if(r<=0)return;let e=setTimeout(n,r);return()=>clearTimeout(e)},[n,r]),(0,F.jsxs)(`div`,{className:`settings-toast settings-toast-${e}`,role:`status`,"aria-live":`polite`,children:[(0,F.jsx)(`span`,{className:`settings-toast-message`,children:t}),(0,F.jsx)(`button`,{type:`button`,className:`settings-toast-dismiss`,"aria-label":`Dismiss notification`,onClick:n,children:`×`})]})}function mn({enabled:e,containerRef:t,onSave:n}){(0,P.useEffect)(()=>{if(!e)return;function r(e){if(e.key!==`s`&&e.key!==`S`||!(e.metaKey||e.ctrlKey)||e.altKey||e.shiftKey)return;let r=t.current;if(!r)return;let i=e.target,a=i instanceof Node?i:null;a&&!r.contains(a)||(e.preventDefault(),n())}return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[e,t,n])}var hn={agent:(0,P.lazy)(()=>i(()=>import(`./Agent-BYdzZwD0.js`),[])),profile:(0,P.lazy)(()=>i(()=>import(`./Profile-DIqjSe2C.js`),[])),display:(0,P.lazy)(()=>i(()=>import(`./Display-D8vGOl4s.js`),[])),model:(0,P.lazy)(()=>i(()=>import(`./ModelProvider-CX3Qhowu.js`),[])),"channels-telegram":(0,P.lazy)(()=>i(()=>import(`./ChannelsTelegram-DNWtPX0w.js`),[])),"channels-discord":(0,P.lazy)(()=>i(()=>import(`./ChannelsDiscord-UzFPlWT4.js`),[])),speech:(0,P.lazy)(()=>i(()=>import(`./SpeechKeys-DjiQTzSL.js`),[])),heartbeat:(0,P.lazy)(()=>i(()=>import(`./Heartbeat-DTpAULQR.js`),[])),memory:(0,P.lazy)(()=>i(()=>import(`./Memory-C_LvJnkn.js`),[])),employees:(0,P.lazy)(()=>i(()=>import(`./Employees-YR_sIRK4.js`),[])),network:(0,P.lazy)(()=>i(()=>import(`./Network-DfPLFAvw.js`),[])),permissions:(0,P.lazy)(()=>i(()=>import(`./Permissions-BKffrMJD.js`),[])),prompts:(0,P.lazy)(()=>i(()=>import(`./Prompts-BMfbV6Y4.js`),[])),mcp:(0,P.lazy)(()=>i(()=>import(`./Mcp-DM-PgG6z.js`),[])),browser:(0,P.lazy)(()=>i(()=>import(`./Browser-CkGeczuN.js`),[])),"dashboard-meta":(0,P.lazy)(()=>i(()=>import(`./DashboardMeta-Y_6nVeJO.js`),[])),"advanced-export":(0,P.lazy)(()=>i(()=>import(`./AdvancedExport-3WAYIabE.js`),[]))};function gn(){let e=(0,P.useRef)(null);return e.current===null&&(e.current=un()),e.current}function _n(e){return(0,P.useSyncExternalStore)((0,P.useCallback)(t=>e.subscribe(t),[e]),(0,P.useCallback)(()=>e.isDirty(),[e]),(0,P.useCallback)(()=>!1,[]))}function vn(e){return(0,P.useSyncExternalStore)((0,P.useCallback)(t=>e.subscribe(t),[e]),(0,P.useCallback)(()=>e.pending.size,[e]),(0,P.useCallback)(()=>0,[]))}function yn({port:e,instanceUrl:t,onDirtyChange:n,onSaved:r}){let[i,a]=(0,P.useState)(`agent`),o=gn(),l=_n(o),u=vn(o),d=(0,P.useMemo)(()=>s(e),[e]),f=(0,P.useRef)(null),[p,m]=(0,P.useState)(!1),[h,g]=(0,P.useState)(null),[_,v]=(0,P.useState)(null),y=(0,P.useRef)(null),b=(0,P.useCallback)(e=>{f.current=e},[]);(0,P.useEffect)(()=>{o.clear(),f.current=null,g(null),v(null)},[e,o]),(0,P.useEffect)(()=>{n?.(l)},[l,n]),(0,P.useEffect)(()=>()=>n?.(!1),[n]);let x=(0,P.useCallback)(e=>{e!==i&&(p||o.isDirty()&&!window.confirm(`Discard unsaved changes?`)||(o.clear(),g(null),v(null),f.current=null,a(e)))},[i,o,p]),S=(0,P.useCallback)(()=>{p||(o.clear(),g(null))},[o,p]),ee=(0,P.useCallback)(async()=>{if(p)return;let e=f.current;if(g(null),!e){o.clear();return}m(!0);try{await e(),r?.(),v({kind:`ok`,message:`Saved.`})}catch(e){let t=c(e);g(t),v({kind:`err`,message:`Failed: ${t}`})}finally{m(!1)}},[o,r,p]);mn({enabled:l&&!p,containerRef:y,onSave:()=>{ee()}});let te=hn[i];return(0,F.jsxs)(`div`,{className:`settings-shell`,ref:y,children:[(0,F.jsx)(ln,{activeId:i,onSelect:x}),(0,F.jsxs)(`section`,{className:`settings-page`,"aria-live":`polite`,children:[(0,F.jsx)(P.Suspense,{fallback:(0,F.jsx)(`div`,{className:`settings-loading`,children:`Loading…`}),children:te?(0,F.jsx)(te,{port:e,instanceUrl:t,client:d,dirty:o,registerSave:b}):(0,F.jsx)(`div`,{className:`settings-placeholder`,children:`This page lands in a later phase.`})}),(0,F.jsx)(fn,{isDirty:l,saving:p,pendingCount:u,error:h,onDiscard:S,onSave:()=>void ee()}),_?(0,F.jsx)(pn,{kind:_.kind,message:_.message,onDismiss:()=>v(null)}):null]})]})}function bn(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(null),[i,a]=(0,P.useState)(null),o=e?.managed.length||0;(0,P.useEffect)(()=>{s()},[]);async function s(){try{t(await mt())}catch(e){a(e.message)}}async function c(e,n){r(e),a(null);try{t(await n()),a(`${e} complete.`)}catch(e){a(e.message)}finally{r(null)}}function l(){o!==0&&window.confirm(`Stop ${o} dashboard-managed server${o===1?``:`s`}?`)&&c(`Stop all managed`,gt)}return(0,F.jsxs)(`section`,{className:`process-control-panel`,"aria-label":`Process control`,children:[(0,F.jsxs)(`div`,{className:`process-control-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Process control`}),(0,F.jsxs)(`strong`,{children:[o,` managed`]})]}),(0,F.jsx)(`button`,{type:`button`,onClick:s,disabled:n!=null,children:`Refresh`})]}),(0,F.jsxs)(`div`,{className:`process-control-actions`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:l,disabled:n!=null||o===0,children:`Stop all managed`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void c(`Adopt/recover managed`,ht),disabled:n!=null,children:`Adopt/recover`}),(0,F.jsx)(`button`,{type:`button`,disabled:!0,title:e?.unsupported.reason||`Planned`,children:`Force release port`})]}),(0,F.jsxs)(`div`,{className:`process-control-list`,children:[e?.managed.map(e=>(0,F.jsxs)(`div`,{className:`process-control-row`,children:[(0,F.jsxs)(`span`,{children:[`:`,e.port]}),(0,F.jsx)(`strong`,{children:e.pid?`pid ${e.pid}`:`pid n/a`}),(0,F.jsx)(`em`,{children:e.proof})]},e.port)),o===0&&(0,F.jsx)(`p`,{children:`No dashboard-managed servers are registered.`})]}),i&&(0,F.jsx)(`p`,{className:`process-control-message`,children:i})]})}function xn(e){let t=e.instance;return(0,F.jsxs)(`section`,{className:`detail-panel`,"aria-label":`Selected instance detail`,children:[e.activeTab===`overview`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`overview-grid`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Status`}),(0,F.jsx)(`strong`,{children:t?.status||`n/a`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`CLI`}),(0,F.jsx)(`strong`,{children:t?.currentCli||`n/a`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Model`}),(0,F.jsx)(`strong`,{children:t?.currentModel||`n/a`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Owner`}),(0,F.jsx)(`strong`,{children:t?.lifecycle?.owner||`n/a`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Version`}),(0,F.jsx)(`strong`,{children:t?.version||`n/a`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Group`}),(0,F.jsx)(`strong`,{children:t?.group||`ungrouped`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Reason`}),(0,F.jsx)(`strong`,{children:t?.lifecycle?.reason||t?.healthReason||`ok`})]})]}),(0,F.jsx)(bn,{})]}),e.activeTab===`logs`&&(0,F.jsx)(`div`,{className:`detail-empty`,children:`Logs stream is planned for phase 10.7. Recent dashboard events are available in the activity dock.`}),e.activeTab===`settings`&&t&&(0,F.jsx)(yn,{port:t.port,instanceUrl:`http://localhost:${t.port}`,onDirtyChange:e.onSettingsDirtyChange,onSaved:e.onSettingsSaved},t.port),e.activeTab===`settings`&&!t&&(0,F.jsx)(`div`,{className:`detail-empty`,children:`Select an instance to configure it.`})]})}function Sn(e){let{children:t,onClose:n,open:r}=e,i=(0,P.useRef)(null),a=(0,P.useRef)(null);return(0,P.useEffect)(()=>{if(r)return a.current=document.activeElement,i.current?.focus(),()=>a.current?.focus()},[r]),(0,P.useEffect)(()=>{if(!r)return;function e(e){e.key===`Escape`&&n()}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[n,r]),r?(0,F.jsx)(`div`,{className:`drawer-backdrop`,onClick:n,children:(0,F.jsxs)(`aside`,{className:`instance-drawer`,role:`dialog`,"aria-modal":`true`,"aria-label":`Instance drawer`,onClick:e=>e.stopPropagation(),children:[(0,F.jsxs)(`div`,{className:`drawer-header`,children:[(0,F.jsx)(`span`,{children:`Instances`}),(0,F.jsx)(`button`,{ref:i,type:`button`,onClick:n,children:`Close`})]}),(0,F.jsxs)(`div`,{className:`drawer-body`,children:[e.profileFilters&&(0,F.jsx)(`div`,{className:`drawer-profile-filters`,children:e.profileFilters}),t]})]})}):null}function Cn(e){return(0,F.jsxs)(`div`,{className:`empty-navigator`,role:`status`,"aria-live":`polite`,children:[(0,F.jsx)(`p`,{className:`empty-navigator-headline`,children:`No Jaw instances detected on the scanned range.`}),(0,F.jsxs)(`p`,{className:`empty-navigator-subline`,children:[`Currently scanning ports `,e.rangeFrom,`–`,e.rangeTo,`. Try widening the range, or start a Jaw with the command below.`]}),(0,F.jsxs)(`code`,{className:`empty-navigator-code`,"aria-label":`Suggested command`,children:[`jaw serve --port `,e.rangeFrom]})]})}var wn={start:`starting…`,stop:`stopping…`,restart:`restarting…`,perm:`registering…`,unperm:`unregistering…`};function Tn(e){return`instance-status status-${e}`}var En=()=>(0,F.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`currentColor`,"aria-hidden":`true`,children:(0,F.jsx)(`rect`,{x:`3`,y:`3`,width:`10`,height:`10`,rx:`1.5`})}),Dn=()=>(0,F.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,stroke:`currentColor`,strokeWidth:`1.5`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{d:`M6.5 3.5H4a1 1 0 0 0-1 1V12a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1V9.5`}),(0,F.jsx)(`path`,{d:`M9.5 2.5h4v4`}),(0,F.jsx)(`path`,{d:`M13.5 2.5 8 8`})]});function On(e){let t=e.instance.lifecycle,n=t?.reason||e.instance.healthReason||`ok`,[r,i]=(0,P.useState)(!1),[a,o]=(0,P.useState)(e.instance.label||e.profile?.label||e.label),[s,c]=(0,P.useState)(!1),[l,u]=(0,P.useState)(null);function d(e){e.stopPropagation()}let f=e.transitioning?wn[e.transitioning]:null,p=`${Tn(e.instance.status)}${f?` is-transitioning`:``}${e.agentBusy?` is-busy`:``}`,m=e.instance.label||e.profile?.label||e.label;async function h(t){t.preventDefault(),t.stopPropagation(),c(!0),u(null);try{await e.onInstanceLabelSave(e.instance.port,a),i(!1)}catch(e){u(e.message)}finally{c(!1)}}return(0,F.jsxs)(`article`,{className:`instance-row density-${e.density||`comfortable`} priority-${e.priority||`normal`} ${e.selected?`is-selected`:``}${f?` is-transitioning-row`:``}`,children:[(0,F.jsxs)(`button`,{className:`instance-row-select`,type:`button`,"aria-pressed":e.selected,onClick:()=>{e.onSelect(e.instance)},children:[(0,F.jsxs)(`div`,{className:`instance-row-main`,children:[(0,F.jsx)(`span`,{className:p,"aria-label":e.instance.status}),(0,F.jsxs)(`div`,{className:`instance-row-title`,children:[(0,F.jsxs)(`div`,{className:`instance-row-title-line`,children:[(0,F.jsx)(`strong`,{children:e.instance.favorite?`Pinned ${m}`:m}),e.activityUnreadCount?(0,F.jsxs)(`span`,{className:`instance-unread-badge`,"aria-label":`${e.activityUnreadCount} unread activity`,children:[`(`,e.activityUnreadCount>99?`99+`:e.activityUnreadCount,`)`]}):null]}),f&&(0,F.jsx)(`span`,{children:(0,F.jsx)(`em`,{className:`instance-row-transition`,children:f})})]}),(0,F.jsxs)(`div`,{className:`instance-row-quick`,onClick:d,children:[(0,F.jsx)(`button`,{type:`button`,className:`quick-btn action-stop`,onClick:t=>{d(t),e.onLifecycle(`stop`,e.instance)},disabled:!t?.canStop||e.busy,title:`Stop`,"aria-label":`Stop`,children:(0,F.jsx)(En,{})}),(0,F.jsx)(`a`,{className:`quick-btn action-open${e.instance.ok?``:` is-disabled`}`,href:e.instance.ok?e.instance.url:void 0,target:e.instance.ok?`_blank`:void 0,rel:e.instance.ok?`noreferrer`:void 0,title:`Open in new tab`,"aria-label":`Open`,"aria-disabled":!e.instance.ok||void 0,tabIndex:e.instance.ok?void 0:-1,onClick:t=>{if(!e.instance.ok){t.preventDefault();return}d(t),e.onMarkActivitySeen(e.instance.port)},children:(0,F.jsx)(Dn,{})}),(0,F.jsxs)(`span`,{className:`port`,children:[`:`,e.instance.port]})]})]}),(0,F.jsxs)(`div`,{className:`instance-row-meta`,children:[e.showLatestActivityTitle!==!1&&e.latestActivityTitle&&(0,F.jsx)(`span`,{className:`instance-row-activity-title`,children:e.latestActivityTitle}),e.showRuntimeLine!==!1&&(0,F.jsxs)(`span`,{className:`instance-row-runtime`,children:[e.instance.currentCli||`cli n/a`,` / `,e.instance.currentModel||`model n/a`]}),(0,F.jsxs)(`span`,{className:`instance-row-version`,children:[`v`,e.instance.version||`n/a`,` · `,e.uptime]}),(0,F.jsxs)(`span`,{className:`instance-row-reason`,children:[new Date(e.instance.lastCheckedAt).toLocaleTimeString(),` · `,n]})]})]}),e.showInlineLabelEditor!==!1&&r?(0,F.jsxs)(`form`,{className:`instance-label-edit-form`,onSubmit:e=>void h(e),onClick:d,children:[(0,F.jsx)(`input`,{className:`instance-label-input`,value:a,maxLength:120,"aria-label":`Rename ${m}`,onChange:e=>o(e.target.value)}),(0,F.jsx)(`button`,{className:`instance-label-save`,type:`submit`,disabled:s,children:`Save`}),(0,F.jsx)(`button`,{className:`instance-label-cancel`,type:`button`,disabled:s,onClick:()=>{o(e.instance.label||e.profile?.label||e.label),u(null),i(!1)},children:`Cancel`}),l&&(0,F.jsx)(`span`,{className:`instance-label-error`,children:l})]}):e.showInlineLabelEditor===!1?null:(0,F.jsx)(`button`,{className:`instance-label-edit-button`,type:`button`,"aria-label":`Rename ${m}`,title:`Rename`,onClick:t=>{d(t),o(e.instance.label||e.profile?.label||e.label),u(null),i(!0)},children:(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`13`,height:`13`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{d:`M12 20h9`}),(0,F.jsx)(`path`,{d:`M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z`})]})}),e.showSelectedActions!==!1&&(0,F.jsxs)(`div`,{className:`instance-actions`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:t=>{d(t),e.onPreview(e.instance)},disabled:!e.instance.ok,children:`Preview`}),(0,F.jsx)(`button`,{type:`button`,className:`action-start`,onClick:t=>{d(t),e.onLifecycle(`start`,e.instance)},disabled:!t?.canStart||e.busy,title:t?.commandPreview?.join(` `),children:`Start`}),(0,F.jsx)(`button`,{type:`button`,onClick:t=>{d(t),e.onLifecycle(`perm`,e.instance)},disabled:!t?.canPerm||e.busy,title:`Register as persistent service`,children:`Perm`}),(0,F.jsx)(`button`,{type:`button`,onClick:t=>{d(t),e.onLifecycle(`restart`,e.instance)},disabled:!t?.canRestart||e.busy,children:`Restart`})]})]})}function kn(e,t){return e.filter(e=>!t.has(e.port))}function An(e,t){let n=new Set,r=t==null?[]:e.filter(e=>e.port===t),i=kn(e,n).filter(e=>e.favorite);i.forEach(e=>n.add(e.port));let a=new Map;for(let t of kn(e,n)){if(!t.group)continue;let e=a.get(t.group)||[];e.push(t),a.set(t.group,e),n.add(t.port)}let o=kn(e,n),s=o.filter(e=>e.status===`online`),c=o.filter(e=>[`timeout`,`error`,`unknown`].includes(e.status)),l=o.filter(e=>e.status===`offline`);return[{id:`active`,label:`Active`,instances:r},{id:`favorites`,label:`Pinned`,instances:i},...Array.from(a.entries()).map(([e,t])=>({id:`group-${e}`,label:e,instances:t})),{id:`running`,label:`Running`,instances:s},{id:`attention`,label:`Attention`,instances:c},{id:`offline`,label:`Offline`,instances:l}].filter(e=>e.instances.length>0)}function jn(e,t,n){return(0,F.jsx)(On,{instance:t,profile:n,selected:e.selectedPort===t.port,busy:e.lifecycleBusyPort===t.port,transitioning:e.transitioningPort===t.port&&e.transitionAction||null,activityUnreadCount:e.activityUnreadByPort?.[t.port]||0,latestActivityTitle:e.latestTitleByPort?.[t.port]||null,agentBusy:e.busyPorts?.has(t.port)||!1,showLatestActivityTitle:e.showLatestActivityTitles,showInlineLabelEditor:e.showInlineLabelEditor,showRuntimeLine:e.showSidebarRuntimeLine,showSelectedActions:e.showSelectedRowActions,label:e.getLabel(t),uptime:e.formatUptime(t.uptime),onSelect:e.onSelect,onPreview:e.onPreview,onMarkActivitySeen:e.onMarkActivitySeen,onInstanceLabelSave:e.onInstanceLabelSave,onLifecycle:e.onLifecycle},t.port)}function Mn(e,t,n=new Map){return An(t,e.selectedPort).map(t=>(0,F.jsxs)(`section`,{className:`instance-group`,"aria-label":`${t.label} instances`,children:[(0,F.jsxs)(`div`,{className:`instance-group-header`,children:[(0,F.jsx)(`span`,{children:t.label}),(0,F.jsx)(`strong`,{children:t.instances.length})]}),t.instances.map(t=>jn(e,t,t.profileId?n.get(t.profileId):void 0))]},t.id))}function Nn(e){let t=An(e.instances,e.selectedPort),n=new Map((e.profiles||[]).map(e=>[e.profileId,e]));return t.length===0&&n.size===0?(0,F.jsx)(`section`,{className:`state`,children:`No matching instances found.`}):n.size>0?(0,F.jsx)(`div`,{className:`instance-groups profile-instance-groups is-profile-merged`,children:Mn(e,e.instances,n)}):(0,F.jsx)(`div`,{className:`instance-groups`,children:Mn(e,e.instances)})}function Pn(e){let t=!e.error&&!e.loading&&e.instances.length===0&&!e.instances.some(e=>e.hidden),n=e.selectedInstance&&!e.filtered.some(t=>t.port===e.selectedInstance?.port)?[e.selectedInstance,...e.filtered]:e.filtered;return(0,F.jsxs)(F.Fragment,{children:[e.error&&(0,F.jsxs)(`section`,{className:`state error-state`,children:[`Scan failed: `,e.error]}),!e.error&&e.loading&&(0,F.jsx)(`section`,{className:`state`,children:`Scanning local Jaw instances...`}),t&&e.data?.manager&&(0,F.jsx)(Cn,{rangeFrom:e.data.manager.rangeFrom,rangeTo:e.data.manager.rangeTo}),!e.error&&!t&&(0,F.jsx)(Nn,{instances:n,selectedPort:e.selectedInstance?.port||null,lifecycleBusyPort:e.lifecycleBusyPort,transitioningPort:e.transitioningPort,transitionAction:e.transitionAction,activityUnreadByPort:e.activityUnreadByPort,latestTitleByPort:e.latestTitleByPort,busyPorts:e.busyPorts,showLatestActivityTitles:e.showLatestActivityTitles,showInlineLabelEditor:e.showInlineLabelEditor,showSidebarRuntimeLine:e.showSidebarRuntimeLine,showSelectedRowActions:e.showSelectedRowActions,profiles:e.profiles,getLabel:e.getLabel,formatUptime:e.formatUptime,onSelect:e.onSelect,onPreview:e.onPreview,onMarkActivitySeen:e.onMarkActivitySeen,onInstanceLabelSave:e.onInstanceLabelSave,onLifecycle:e.onLifecycle})]})}function Fn(e){return e.collapsed?(0,F.jsx)(`div`,{className:`instance-navigator is-collapsed`,children:e.children}):(0,F.jsxs)(`section`,{className:`instance-navigator`,"aria-label":`Instance navigator`,children:[(0,F.jsxs)(`header`,{className:`instance-navigator-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`eyebrow`,children:`Navigator`}),(0,F.jsx)(`strong`,{children:e.active?`:${e.active.port}`:`No active target`})]}),(0,F.jsxs)(`span`,{children:[e.hiddenCount,` hidden`]})]}),(0,F.jsx)(`div`,{className:`instance-navigator-scroll`,children:e.children})]})}function In(e){let t={"--activity-dock-height":`${e.activityHeight}px`};return(0,F.jsxs)(`main`,{className:`dashboard-shell manager-shell${e.sidebarCollapsed?` is-sidebar-collapsed`:``}`,style:t,children:[(0,F.jsx)(`header`,{className:`manager-command`,children:e.commandBar}),e.workspace]})}function Ln(e){return(0,F.jsxs)(`div`,{className:`mobile-nav-actions`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:e.onOpenInstances,children:`Instances`}),(0,F.jsx)(`button`,{type:`button`,className:e.activeTab===`preview`?`is-active`:``,onClick:()=>e.onSelectTab(`preview`),children:`Preview`}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onToggleActivity,children:`Activity`}),(0,F.jsx)(`button`,{type:`button`,className:e.activeTab===`settings`?`is-active`:``,onClick:()=>e.onSelectTab(`settings`),children:`More`})]})}function Rn(e){let t=e.count==null?``:` ${e.count}`;return(0,F.jsxs)(`button`,{type:`button`,className:`profile-chip ${e.active?`is-active`:``}`,onClick:()=>e.onToggle(e.profile.profileId),"aria-pressed":e.active,title:e.profile.homePath,children:[(0,F.jsx)(`span`,{children:e.profile.label}),t&&(0,F.jsx)(`strong`,{children:t})]})}function zn({direction:e}){return(0,F.jsx)(`svg`,{className:`rail-collapse-chevron`,viewBox:`0 0 16 20`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:(0,F.jsx)(`polyline`,{points:e===`left`?`11 4 5 10 11 16`:`5 4 11 10 5 16`})})}function Bn(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`rect`,{x:`3`,y:`4`,width:`14`,height:`10`,rx:`1.5`}),(0,F.jsx)(`path`,{d:`M8 17h4M10 14v3`})]})}function Vn(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`path`,{d:`M6 3h6l3 3v11H6z`}),(0,F.jsx)(`path`,{d:`M12 3v4h3M8 10h5M8 13h5`})]})}function Hn(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`rect`,{x:`3`,y:`4`,width:`14`,height:`12`,rx:`1.5`}),(0,F.jsx)(`path`,{d:`M7 4v12M13 4v12`})]})}function Un(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`rect`,{x:`3`,y:`5`,width:`14`,height:`12`,rx:`1.5`}),(0,F.jsx)(`path`,{d:`M3 9h14M7 3v4M13 3v4`})]})}function Wn(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}),(0,F.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}function Gn(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`circle`,{cx:`10`,cy:`10`,r:`7`}),(0,F.jsx)(`path`,{d:`M7.6 7.6a2.4 2.4 0 0 1 4.8 0c0 1.4-1.6 1.7-2.2 2.5-.3.4-.3.8-.3 1.2`}),(0,F.jsx)(`circle`,{cx:`10`,cy:`14.2`,r:`0.6`,fill:`currentColor`,stroke:`none`})]})}function Kn(e){let t=!e.collapsed,n=t?`Collapse navigation`:`Expand navigation`;return(0,F.jsxs)(`div`,{className:`sidebar-rail`,children:[(0,F.jsx)(`button`,{className:`rail-collapse-button`,type:`button`,onClick:e.onToggleSidebar,"aria-label":n,"aria-expanded":t,"aria-pressed":e.collapsed,"aria-controls":`manager-sidebar-list`,title:n,children:(0,F.jsx)(zn,{direction:t?`left`:`right`})}),(0,F.jsx)(`button`,{className:`rail-button rail-workspace-button${e.mode===`instances`?` is-active`:``}`,type:`button`,onClick:()=>e.onModeChange(`instances`),"aria-label":`Instances`,"aria-pressed":e.mode===`instances`,title:`Instances`,children:(0,F.jsx)(Bn,{})}),(0,F.jsx)(`button`,{className:`rail-button rail-workspace-button${e.mode===`board`?` is-active`:``}`,type:`button`,onClick:()=>e.onModeChange(`board`),"aria-label":`Board`,"aria-pressed":e.mode===`board`,title:`Board`,children:(0,F.jsx)(Hn,{})}),e.scheduleWorkspaceEnabled?(0,F.jsx)(`button`,{className:`rail-button rail-workspace-button${e.mode===`schedule`?` is-active`:``}`,type:`button`,onClick:()=>e.onModeChange(`schedule`),"aria-label":`Schedule`,"aria-pressed":e.mode===`schedule`,title:`Schedule`,children:(0,F.jsx)(Un,{})}):null,(0,F.jsx)(`button`,{className:`rail-button rail-workspace-button${e.mode===`notes`?` is-active`:``}`,type:`button`,onClick:()=>e.onModeChange(`notes`),"aria-label":`Notes`,"aria-pressed":e.mode===`notes`,title:`Notes`,children:(0,F.jsx)(Vn,{})}),(0,F.jsx)(`button`,{className:`rail-button rail-workspace-button${e.mode===`settings`?` is-active`:``}`,type:`button`,onClick:()=>e.onModeChange(`settings`),"aria-label":`Dashboard settings`,"aria-pressed":e.mode===`settings`,title:`Dashboard settings`,children:(0,F.jsx)(Wn,{})}),(0,F.jsx)(`div`,{className:`rail-spacer`}),(0,F.jsx)(`button`,{className:`rail-button rail-help-button${e.helpOpen?` is-active`:``}`,type:`button`,onClick:e.onToggleHelp,"aria-label":`Help guide`,"aria-pressed":e.helpOpen,"aria-expanded":e.helpOpen,title:`Help (?)`,children:(0,F.jsx)(Gn,{})}),(0,F.jsx)(`span`,{className:`rail-status-dot`,"aria-label":`${e.onlineCount} online instances`})]})}var qn=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`실행 중인 jaw 인스턴스를 보고, 미리보기·로그·설정을 다루는 곳이에요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsx)(`li`,{children:`좌측 네비게이터에서 인스턴스를 골라 우측 Workbench(Overview / Preview / Logs / Settings)에서 작업하실 수 있어요.`}),(0,F.jsx)(`li`,{children:`우측 상단 상태 점이 초록이면 온라인, 회색이면 오프라인이에요.`}),(0,F.jsx)(`li`,{children:`인스턴스에 직접 메시지를 보내실 땐 Preview 탭의 채팅 입력을 쓰세요.`})]}),(0,F.jsxs)(`p`,{className:`help-tip`,children:[`💡 인스턴스가 안 보이시면 터미널에서 `,(0,F.jsx)(`code`,{children:`cli-jaw start`}),`로 새 jaw를 띄워보세요 — 자동으로 목록에 떠요.`]})]}),Jn=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`사람이 먼저 일반 칸반 블럭을 만들고, 실행 인스턴스 블럭을 그 안에 붙이는 계층형 보드예요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsxs)(`li`,{children:[`레인 5개는 `,(0,F.jsx)(`strong`,{children:`Backlog / Ready / In Progress / Review / Done`}),` 순서예요. Backlog는 아직 commit 전 옵션, Ready는 바로 pull 가능한 작업이에요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Overall`}),`은 5열 전체 보드이고, 사이드바에서 각 레인을 누르면 해당 레인만 보는 detail 화면으로 전환돼요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Done`}),`은 Overall에서 최근 4개만 full card로 보여주고, 나머지는 `,(0,F.jsx)(`strong`,{children:`+ N more`}),`를 눌러 Done detail 화면에서 2줄 row로 확인해요.`]}),(0,F.jsxs)(`li`,{children:[`각 레인 하단의 `,(0,F.jsx)(`strong`,{children:`+ Add task`}),`로 일반 칸반 블럭을 만들고, 그 블럭 제목에 쿼리나 작업 메모를 적으시면 돼요.`]}),(0,F.jsxs)(`li`,{children:[`좌측 `,(0,F.jsx)(`strong`,{children:`Running`}),` 섹션에는 현재 실행 중인 인스턴스만 인스턴스 블럭으로 보여요.`]}),(0,F.jsx)(`li`,{children:`인스턴스 블럭을 일반 칸반 블럭 안의 드롭 영역으로 끌어 넣으면 내부 자식 블럭으로 병합돼요. 인스턴스 실행에는 영향 없어요.`}),(0,F.jsxs)(`li`,{children:[`일반 칸반 블럭은 직접 드래그해서 다른 레인으로 옮길 수 있고, `,(0,F.jsx)(`strong`,{children:`Move`}),` / `,(0,F.jsx)(`strong`,{children:`Delete`}),`도 유지돼요.`]})]}),(0,F.jsx)(`p`,{className:`help-tip`,children:`💡 인스턴스가 없어도 일반 칸반 블럭은 계속 남아요. 그래서 쿼리·아이디어·작업 단위를 먼저 적고, 필요할 때만 실행 인스턴스를 붙이면 돼요.`})]}),Yn=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`매니저가 1분마다 틱을 돌면서 대시보드에 등록된 자동화 작업을 일괄 dispatch 해주는 곳이에요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Today / Upcoming / Recurring / Blocked`}),` 그룹으로 정리되고, `,(0,F.jsx)(`code`,{children:`cron`}),`·`,(0,F.jsx)(`code`,{children:`runAt`}),`·target port를 함께 저장해요.`]}),(0,F.jsx)(`li`,{children:`Run 버튼으로 즉시 dispatch, 대상 인스턴스가 바쁘면 자동 큐잉이에요. last/next 컬럼으로 실행 이력이 보여요.`}),(0,F.jsxs)(`li`,{children:[`예전엔 인스턴스마다 자기 `,(0,F.jsx)(`code`,{children:`heartbeat.json`}),`을 setInterval로 돌리던 구조였는데, 지금은 `,(0,F.jsx)(`strong`,{children:`매니저가 단일 ticker`}),`로 돌려요. heartbeat.json은 legacy로만 표시되고 자동 실행은 안 돼요.`]})]}),(0,F.jsx)(`p`,{className:`help-tip`,children:`💡 새 작업은 여기서 만들고, 기존 heartbeat job은 같은 cron으로 옮겨 등록하시면 돼요. (마이그레이션 자동화는 추후 추가)`})]}),Xn=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`p`,{className:`help-lead`,children:[(0,F.jsx)(`code`,{children:`~/.cli-jaw-dashboard/notes/`}),`의 마크다운 파일을 직접 편집하는 노트장이에요.`]}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsxs)(`li`,{children:[`좌측 트리에서 파일 선택, 우측에서 `,(0,F.jsx)(`strong`,{children:`Raw / Preview / WYSIWYG`}),` 모드로 편집하실 수 있어요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`kbd`,{children:`⌘/Ctrl + S`}),`로 저장, `,(0,F.jsx)(`kbd`,{children:`⌘/Ctrl + E`}),`로 모드 순환 전환이에요.`]}),(0,F.jsx)(`li`,{children:`파일이 외부에서 바뀌면 충돌 알림이 떠요 — Reload / Overwrite / Keep local 중 선택하세요.`})]}),(0,F.jsxs)(`p`,{className:`help-tip`,children:[`💡 좌측 트리 상단 `,(0,F.jsx)(`strong`,{children:`+ New`}),`로 첫 노트를 만들어 보세요. 폴더는 `,(0,F.jsx)(`code`,{children:`folder/note.md`}),` 처럼 한 번에 만드실 수 있어요.`]})]}),Zn=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`대시보드 외형과 동작 옵션을 조정하는 곳이에요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsx)(`li`,{children:`사이드바 폭, 워드랩, 테마 같은 표시 옵션을 바꾸실 수 있어요.`}),(0,F.jsxs)(`li`,{children:[`인스턴스 자체 설정이 아니라 `,(0,F.jsx)(`strong`,{children:`이 대시보드 UI의 환경설정`}),`이에요.`]}),(0,F.jsx)(`li`,{children:`변경 사항은 즉시 저장돼요.`})]}),(0,F.jsxs)(`p`,{className:`help-tip`,children:[`💡 인스턴스 동작을 바꾸시려면 여기가 아니라 `,(0,F.jsx)(`strong`,{children:`Instances → 해당 인스턴스 → Settings 탭`}),`으로 가세요.`]})]}),Qn={instances:{title:`Instances`,subtitle:`인스턴스 운영`,body:qn},board:{title:`Board`,subtitle:`Cross-instance Kanban`,body:Jn},schedule:{title:`Schedule`,subtitle:`시간 기반 작업`,body:Yn},notes:{title:`Notes`,subtitle:`마크다운 노트`,body:Xn},settings:{title:`Settings`,subtitle:`대시보드 설정`,body:Zn}};function $n({open:e,mode:t,onClose:n}){let r=(0,P.useRef)(null);if((0,P.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,t),r.current?.focus(),()=>document.removeEventListener(`keydown`,t)},[e,n]),!e)return null;let i=Qn[t];return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`help-drawer-overlay`,onClick:n,"aria-hidden":`true`}),(0,F.jsxs)(`aside`,{className:`help-drawer`,role:`dialog`,"aria-modal":`true`,"aria-label":`${i.title} help`,children:[(0,F.jsxs)(`header`,{className:`help-drawer-header`,children:[(0,F.jsxs)(`div`,{className:`help-drawer-title`,children:[(0,F.jsx)(`span`,{className:`help-drawer-eyebrow`,children:`현재 모드`}),(0,F.jsx)(`h3`,{children:i.title}),(0,F.jsx)(`span`,{className:`help-drawer-subtitle`,children:i.subtitle})]}),(0,F.jsx)(`button`,{ref:r,type:`button`,className:`help-drawer-close`,onClick:n,"aria-label":`Close help`,children:`×`})]}),(0,F.jsx)(`div`,{className:`help-drawer-body`,children:i.body}),(0,F.jsx)(`footer`,{className:`help-drawer-footer`,children:(0,F.jsx)(`span`,{children:`모드를 바꾸시면 도움말도 자동으로 따라가요 🦈`})})]})]})}var er=[`overview`,`preview`,`logs`,`settings`];function tr(e){return e[0].toUpperCase()+e.slice(1)}function nr(e){return(0,F.jsxs)(`section`,{className:`workbench workbench-${e.mode}`,"aria-label":`Selected instance workbench`,children:[(0,F.jsxs)(`div`,{className:`workbench-header`,children:[e.header,(0,F.jsx)(`div`,{className:`workbench-mode-tabs`,role:`tablist`,"aria-label":`Workbench modes`,children:er.map(t=>(0,F.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e.mode===t,className:e.mode===t?`is-active`:``,onClick:()=>e.onModeChange(t),children:tr(t)},t))})]}),(0,F.jsxs)(`div`,{className:`workbench-body`,children:[e.mode===`overview`&&(0,F.jsx)(`div`,{className:`workbench-panel workbench-panel-overview`,children:e.overview},`overview`),(0,F.jsx)(`div`,{className:`workbench-panel workbench-panel-preview`,hidden:e.mode!==`preview`,"aria-hidden":e.mode!==`preview`,"data-preview-host":`persistent`,children:e.preview},`preview`),e.mode===`logs`&&(0,F.jsx)(`div`,{className:`workbench-panel workbench-panel-logs`,children:e.logs},`logs`),e.mode===`settings`&&(0,F.jsx)(`div`,{className:`workbench-panel workbench-panel-settings`,children:e.settings},`settings`)]})]})}function rr(e,t){return(e.split(`/`).filter(Boolean).pop()||e).replace(/^\.?cli-jaw-(\d+)-[a-f0-9]{7,}$/i,`cli-jaw $1`).replace(/^\.?cli-jaw-(\d+)$/i,`cli-jaw $1`)||`cli-jaw ${t}`}function ir(e){if(e.label)return e.label;let t=e.instanceId||e.homeDisplay||``;return rr(t.split(`/`).filter(Boolean).pop()||t,e.port)}function ar(e){if(e==null)return`n/a`;let t=Math.floor(e/60);if(t<1)return`${Math.round(e)}s`;let n=Math.floor(t/60);return n<1?`${t}m`:`${n}h ${t%60}m`}function or(e){let t=e.instance,n=!!t?.ok,r=e.previewEnabled?`Preview on`:`Preview off`;return(0,F.jsxs)(`div`,{className:`detail-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`eyebrow`,children:`Selected instance`}),(0,F.jsx)(`h2`,{children:t?ir(t):`No instance selected`}),(0,F.jsx)(`span`,{children:t?.workingDir||t?.url||`Select an online instance to inspect it.`})]}),t&&(0,F.jsxs)(`div`,{className:`detail-header-actions`,children:[(0,F.jsx)(`span`,{className:`preview-inline-status ${t.ok&&e.previewEnabled?`is-ready`:`is-unavailable`}`,"aria-label":t.ok&&e.previewEnabled?`Preview ready`:`Preview unavailable`,title:t.ok&&e.previewEnabled?`Preview ready`:`Preview unavailable`}),(0,F.jsxs)(`button`,{type:`button`,className:`preview-switch ${e.previewEnabled?`is-on`:`is-off`}`,role:`switch`,"aria-checked":e.previewEnabled,disabled:!n,onClick:()=>e.onPreviewEnabledChange(!e.previewEnabled),children:[(0,F.jsx)(`span`,{className:`preview-switch-track`,"aria-hidden":`true`}),(0,F.jsx)(`span`,{children:r})]}),(0,F.jsx)(`button`,{type:`button`,className:`preview-refresh-button`,disabled:!n||!e.previewEnabled,onClick:e.onPreviewRefresh,children:`Refresh`}),(0,F.jsxs)(`a`,{className:`open-link`,href:t.url,target:`_blank`,rel:`noreferrer`,children:[(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`12`,height:`12`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,F.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,F.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]}),`Open`]})]})]})}function sr(e){let t={"--activity-dock-height":`${e.inspectorHeight}px`};return(0,F.jsxs)(`div`,{className:[`manager-workspace`,e.sidebarCollapsed&&`is-sidebar-collapsed`,e.inspectorCollapsed&&`is-inspector-collapsed`,e.drawerOpen&&`is-drawer-open`].filter(Boolean).join(` `),style:t,children:[e.drawerOpen&&(0,F.jsx)(`div`,{className:`drawer-backdrop`,onClick:e.onCloseDrawer}),(0,F.jsx)(`aside`,{className:`manager-sidebar`,"aria-label":`Jaw instances`,children:e.navigator}),(0,F.jsx)(`section`,{className:`manager-detail`,"aria-label":`Manager workbench`,children:e.workbench}),(0,F.jsx)(`section`,{className:`manager-activity`,"aria-label":`Manager inspector`,children:e.inspector}),(0,F.jsx)(`nav`,{className:`manager-mobile-nav`,"aria-label":`Mobile dashboard navigation`,children:e.mobileNav}),e.drawer]})}function cr(e){return e===`dark`||e===`light`}function lr(e,t){if(!t)return e;let n=e.startsWith(`/`),r=new URL(e,`http://jaw.local`);return r.searchParams.set(`jawTheme`,t),n?`${r.pathname}${r.search}${r.hash}`:r.toString()}function ur(e,t,n){if(!e)return{canPreview:!1,src:null,reason:`Select an online instance to preview.`,transport:`none`,warning:null};if(!e.ok)return{canPreview:!1,src:null,reason:`Preview is only available for online instances.`,transport:`none`,warning:null};let r=t?.manager.proxy;if(!r?.enabled)return{canPreview:!1,src:null,reason:`Proxy preview is not available.`,transport:`none`,warning:null};if(e.port<r.allowedFrom||e.port>r.allowedTo)return{canPreview:!1,src:null,reason:`This port is outside the proxy allowlist.`,transport:`none`,warning:null};let i=r.preview?.instances[String(e.port)],a=cr(n)?n:null;return r.preview?.enabled&&i?.status===`ready`&&i.url?{canPreview:!0,src:lr(i.url,a),reason:null,transport:`origin-port`,warning:`origin proxy ready`}:{canPreview:!0,src:lr(`${r.basePath||`/i`}/${e.port}/`,a),reason:null,transport:`legacy-path`,warning:`legacy proxy fallback`}}function dr(e,t){if(typeof window>`u`)return`http://localhost`;try{let e=t?.contentWindow?.location.origin;if(e&&e!==`null`)return e}catch{}let n=new URL(e,window.location.href).origin;return n===`null`?null:n}function fr(e,t,n){let r=e?.contentWindow;if(!r)return;let i=dr(t,e);if(!(!i||i===`null`))try{r.postMessage({type:`jaw-preview-theme-sync`,theme:n},i)}catch(e){console.warn(`[manager-preview] theme sync skipped`,e)}}function pr(e){let t=(0,P.useRef)(null),n=(0,P.useRef)(null),r=ur(e.instance,e.data,e.theme),i=e.instance?.ok?`Preview is off. Turn it on from the header to mount the iframe.`:r.reason,a=(0,P.useCallback)(()=>{!e.enabled||!r.canPreview||!r.src||n.current===r.src&&fr(t.current,r.src,e.theme)},[e.enabled,e.theme,r.canPreview,r.src]);return(0,P.useEffect)(()=>{a()},[a]),(0,F.jsxs)(`aside`,{className:`preview-panel`,"aria-label":`Instance preview`,children:[(!e.enabled||!r.canPreview)&&(0,F.jsx)(`div`,{className:`preview-empty`,children:i}),e.enabled&&r.canPreview&&r.src&&(0,F.jsx)(`iframe`,{title:`Jaw instance ${e.instance?.port} preview`,ref:t,className:`preview-frame`,src:r.src,sandbox:`allow-forms allow-modals allow-popups allow-same-origin allow-scripts allow-downloads`,allow:`clipboard-read; clipboard-write; microphone`,onLoad:()=>{n.current=r.src,a()}},`${e.instance?.port||`none`}:${e.refreshKey}`)]})}var mr=5e3,hr=1572864,gr=24,_r=`jaw.metricsPanelCollapsed`;async function vr(){let e=await fetch(`/api/dashboard/electron-metrics`);if(!e.ok)throw Error(`electron-metrics failed: ${e.status}`);return await e.json()}function yr(e){return e>=1024*1024?`${(e/1024/1024).toFixed(2)} GB`:`${(e/1024).toFixed(1)} MB`}function br(e){return e.length>gr?`${e.slice(0,gr-1)}…`:e}function xr(){if(typeof localStorage>`u`)return!1;try{return localStorage.getItem(_r)===`true`}catch{return!1}}function Sr(e){if(!(typeof localStorage>`u`))try{localStorage.setItem(_r,e?`true`:`false`)}catch{}}function Cr(e={}){let[t,n]=(0,P.useState)(null),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(()=>xr());if((0,P.useEffect)(()=>{Sr(a)},[a]),(0,P.useEffect)(()=>{let e=!1,t=null,r=async()=>{try{let t=await vr();if(e)return;t.available?(n(!0),i(t.snapshot)):(n(!1),i(null))}catch{e||n(!1)}e||(t=setTimeout(r,mr))};return r(),()=>{e=!0,t&&clearTimeout(t)}},[]),t!==!0)return null;if(!r)return(0,F.jsxs)(`div`,{className:`electron-metrics-panel electron-metrics-panel--empty`,"aria-label":`Electron process metrics`,children:[(0,F.jsx)(`div`,{className:`electron-metrics-header`,children:(0,F.jsx)(`span`,{className:`electron-metrics-title`,children:`Desktop metrics`})}),(0,F.jsx)(`div`,{className:`electron-metrics-empty`,children:`awaiting first sample…`})]});let s=[...r.processes].sort((e,t)=>t.rssKb-e.rssKb).slice(0,3),c=r.rssTotalKb>=hr;return(0,F.jsxs)(`div`,{className:`electron-metrics-panel${c?` electron-metrics-panel--warn`:``}`,"aria-label":`Electron process metrics`,children:[(0,F.jsxs)(`div`,{className:`electron-metrics-header`,children:[(0,F.jsx)(`span`,{className:`electron-metrics-title`,children:`Desktop metrics`}),(0,F.jsx)(`button`,{type:`button`,className:`electron-metrics-toggle`,onClick:()=>o(e=>!e),"aria-expanded":!a,"aria-label":a?`Expand metrics panel`:`Collapse metrics panel`,children:a?`▸`:`▾`})]}),!a&&(0,F.jsxs)(`div`,{className:`electron-metrics-body`,children:[c&&(0,F.jsxs)(`div`,{className:`electron-metrics-warn`,children:[(0,F.jsxs)(`span`,{role:`alert`,children:[`Electron RSS total exceeds `,yr(1572864),`.`]}),e.onUnloadPreview&&(0,F.jsx)(`button`,{type:`button`,className:`electron-metrics-unload-btn`,onClick:()=>e.onUnloadPreview?.(),children:`Unload preview`})]}),(0,F.jsxs)(`div`,{className:`electron-metrics-row`,children:[(0,F.jsx)(`span`,{children:`renderers`}),(0,F.jsx)(`span`,{children:r.rendererCount})]}),(0,F.jsxs)(`div`,{className:`electron-metrics-row`,children:[(0,F.jsx)(`span`,{children:`processes`}),(0,F.jsx)(`span`,{children:r.processes.length})]}),(0,F.jsxs)(`div`,{className:`electron-metrics-row`,children:[(0,F.jsx)(`span`,{children:`RSS total`}),(0,F.jsx)(`span`,{children:yr(r.rssTotalKb)})]}),(0,F.jsx)(`div`,{className:`electron-metrics-divider`,"aria-hidden":`true`}),(0,F.jsx)(`div`,{className:`electron-metrics-subtitle`,children:`top by RSS`}),(0,F.jsx)(`ul`,{className:`electron-metrics-list`,children:s.map(e=>(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`span`,{className:`electron-metrics-proc`,children:br(e.name?`${e.type} · ${e.name}`:e.type)}),(0,F.jsx)(`span`,{className:`electron-metrics-proc-rss`,children:yr(e.rssKb)})]},e.pid))})]})]})}var wr=`jaw.previewEnabled`;function Tr(){if(typeof localStorage>`u`)return!1;try{let e=localStorage.getItem(wr);return e===null?!1:e===`true`}catch{return!1}}function Er(e){if(!(typeof localStorage>`u`))try{localStorage.setItem(wr,e?`true`:`false`)}catch{}}var Dr=300*1e3;function Or(e){let{onUnload:t,idleMs:n,doc:r,setTimeout:i,clearTimeout:a,now:o}=e,s=null,c=null,l=!1,u=()=>{l||(l=!0,t())},d=()=>{c=o(),s=i(()=>{s=null,u()},n)},f=()=>{s!==null&&(a(s),s=null)},p=()=>{if(l)return;if(r.hidden){c===null&&d();return}let e=c===null?0:o()-c;f(),c=null,e>=n&&u()};return r.hidden&&d(),r.addEventListener(`visibilitychange`,p),r.addEventListener(`resume`,p),()=>{r.removeEventListener(`visibilitychange`,p),r.removeEventListener(`resume`,p),f()}}function kr(e){let{enabled:t,onUnload:n,idleMs:r=Dr}=e,i=(0,P.useRef)(n);i.current=n,(0,P.useEffect)(()=>{if(t&&!(typeof document>`u`))return Or({onUnload:()=>i.current(),idleMs:r,doc:document,setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()})},[t,r])}var Ar={ko:{navLabel:`대시보드 설정 섹션`,eyebrow:`대시보드`,title:`설정`,sections:{display:{label:`사이드바 행`,hint:`밀도와 행 안 컨트롤`},activity:{label:`미리보기와 활동`,hint:`제목 출처와 기본값`}}},en:{navLabel:`Dashboard settings sections`,eyebrow:`Dashboard`,title:`Settings`,sections:{display:{label:`Sidebar rows`,hint:`Density and inline controls`},activity:{label:`Preview & activity`,hint:`Title source and defaults`}}},zh:{navLabel:`仪表盘设置分区`,eyebrow:`仪表盘`,title:`设置`,sections:{display:{label:`侧边栏列表`,hint:`密度与行内控件`},activity:{label:`预览与活动`,hint:`标题来源与默认值`}}},ja:{navLabel:`ダッシュボード設定セクション`,eyebrow:`ダッシュボード`,title:`設定`,sections:{display:{label:`サイドバーの行`,hint:`密度と行内コントロール`},activity:{label:`プレビューとアクティビティ`,hint:`タイトルの取得元と既定値`}}}},jr=[`display`,`activity`];function Mr(e){let t=Ar[e.locale]||Ar.ko;return(0,F.jsxs)(`nav`,{className:`dashboard-settings-sidebar`,"aria-label":t.navLabel,children:[(0,F.jsxs)(`div`,{className:`dashboard-settings-sidebar-header`,children:[(0,F.jsx)(`span`,{className:`eyebrow`,children:t.eyebrow}),(0,F.jsx)(`strong`,{children:t.title})]}),(0,F.jsx)(`div`,{className:`dashboard-settings-sidebar-list`,children:jr.map(n=>(0,F.jsxs)(`button`,{className:`dashboard-settings-sidebar-button${e.activeSection===n?` is-active`:``}`,type:`button`,"aria-pressed":e.activeSection===n,onClick:()=>e.onSectionChange(n),children:[(0,F.jsx)(`span`,{children:t.sections[n].label}),(0,F.jsx)(`small`,{children:t.sections[n].hint})]},n))})]})}var Nr=[{value:`ko`,label:`한국어 (ko)`},{value:`en`,label:`English (en)`},{value:`zh`,label:`中文 (zh)`},{value:`ja`,label:`日本語 (ja)`}];function Pr(e){return Nr.find(t=>t.value===e)?.value??`ko`}var Fr={ko:{ariaLabel:`대시보드 설정`,eyebrow:`매니저 환경설정`,title:`대시보드 설정`,displayTitle:`인스턴스 목록 표시`,displayDescription:`이 설정은 왼쪽 인스턴스 목록과 저장된 매니저 UI 환경설정에만 적용됩니다.`,activityTitle:`미리보기와 활동`,activityDescription:`최근 작업 제목은 각 인스턴스 서버의 endpoint 버전에 따라 달라집니다.`,fields:{activity:{label:`최근 작업 미리보기`,scope:`왼쪽 인스턴스 목록`,description:`요약 endpoint를 지원하는 인스턴스에서 최신 user 또는 assistant 메시지를 정리한 한 줄을 표시합니다.`},rename:{label:`이름 변경 컨트롤`,scope:`왼쪽 인스턴스 목록`,description:`대시보드 전용 인스턴스 이름을 편집하는 연필 버튼을 표시합니다.`},runtime:{label:`런타임 줄`,scope:`왼쪽 인스턴스 목록`,description:`각 인스턴스 이름 아래에 codex / gpt-5.5 같은 CLI와 모델 정보를 표시합니다.`},actions:{label:`확장 행 액션`,scope:`선택된 인스턴스 행`,description:`선택된 인스턴스 행에 Preview, Open, Start, Stop, Restart 버튼을 표시합니다.`},language:{label:`언어`,scope:`전체 Jaw UI`,description:`i18n을 지원하는 매니저 대시보드 화면에 사용할 언어를 저장합니다.`}},support:{ariaLabel:`작업 제목 출처 준비 상태`,ready:`준비됨`,legacy:`레거시 endpoint`,offline:`오프라인`,empty:`현재 표시할 인스턴스가 없습니다.`,restart:`최근 작업 제목을 사용하려면 레거시 인스턴스를 재시작하세요.`}},en:{ariaLabel:`Dashboard settings`,eyebrow:`Manager preferences`,title:`Dashboard settings`,displayTitle:`Instance list display`,displayDescription:`These controls only affect the left instance list and saved manager UI preferences.`,activityTitle:`Preview & activity`,activityDescription:`Latest activity titles depend on each instance server endpoint version.`,fields:{activity:{label:`Recent activity preview`,scope:`Left instance list`,description:`Show one cleaned line from the latest user or assistant message when the instance supports the summary endpoint.`},rename:{label:`Rename control`,scope:`Left instance list`,description:`Show the pencil button for editing the dashboard-only instance label.`},runtime:{label:`Runtime line`,scope:`Left instance list`,description:`Show CLI and model text, for example codex / gpt-5.5, under each instance label.`},actions:{label:`Expanded row actions`,scope:`Selected instance row`,description:`Show Preview, Open, Start, Stop, and Restart buttons on the selected instance row.`},language:{label:`Language`,scope:`Global Jaw UI`,description:`Sets the saved manager dashboard locale for i18n-aware surfaces.`}},support:{ariaLabel:`Activity title source readiness`,ready:`Ready`,legacy:`Legacy endpoint`,offline:`Offline`,empty:`No instances are currently visible.`,restart:`Restart legacy instances to enable latest activity titles.`}},zh:{ariaLabel:`仪表盘设置`,eyebrow:`管理器偏好`,title:`仪表盘设置`,displayTitle:`实例列表显示`,displayDescription:`这些设置只影响左侧实例列表与已保存的管理器界面偏好。`,activityTitle:`预览与活动`,activityDescription:`最近活动标题取决于各实例服务器的 endpoint 版本。`,fields:{activity:{label:`最近活动预览`,scope:`左侧实例列表`,description:`当实例支持摘要 endpoint 时,显示最近一条 user 或 assistant 消息整理后的单行内容。`},rename:{label:`重命名控件`,scope:`左侧实例列表`,description:`显示用于编辑仪表盘内实例标签的铅笔按钮。`},runtime:{label:`运行时信息行`,scope:`左侧实例列表`,description:`在每个实例标签下方显示 CLI 与模型信息,例如 codex / gpt-5.5。`},actions:{label:`展开行操作`,scope:`已选中的实例行`,description:`在已选中的实例行上显示 Preview、Open、Start、Stop、Restart 按钮。`},language:{label:`语言`,scope:`整个 Jaw 界面`,description:`为支持 i18n 的管理器仪表盘界面设置已保存的语言。`}},support:{ariaLabel:`活动标题来源就绪状态`,ready:`就绪`,legacy:`旧版 endpoint`,offline:`离线`,empty:`当前没有可显示的实例。`,restart:`请重启旧版实例以启用最近活动标题。`}},ja:{ariaLabel:`ダッシュボード設定`,eyebrow:`マネージャー環境設定`,title:`ダッシュボード設定`,displayTitle:`インスタンス一覧の表示`,displayDescription:`これらの設定は左側のインスタンス一覧と保存済みのマネージャー UI 設定にのみ反映されます。`,activityTitle:`プレビューとアクティビティ`,activityDescription:`最近のアクティビティタイトルは各インスタンスサーバーの endpoint バージョンによって変わります。`,fields:{activity:{label:`最近のアクティビティのプレビュー`,scope:`左側のインスタンス一覧`,description:`サマリ endpoint をサポートするインスタンスでは、直近の user または assistant メッセージを整形した 1 行を表示します。`},rename:{label:`名前変更コントロール`,scope:`左側のインスタンス一覧`,description:`ダッシュボード専用のインスタンス表示名を編集する鉛筆ボタンを表示します。`},runtime:{label:`ランタイム行`,scope:`左側のインスタンス一覧`,description:`各インスタンス名の下に codex / gpt-5.5 のような CLI とモデル情報を表示します。`},actions:{label:`展開行アクション`,scope:`選択中のインスタンス行`,description:`選択中のインスタンス行に Preview、Open、Start、Stop、Restart のボタンを表示します。`},language:{label:`言語`,scope:`Jaw UI 全体`,description:`i18n 対応のマネージャーダッシュボード画面で使用する言語を保存します。`}},support:{ariaLabel:`アクティビティタイトル取得元の準備状態`,ready:`準備完了`,legacy:`旧 endpoint`,offline:`オフライン`,empty:`現在表示できるインスタンスはありません。`,restart:`最新のアクティビティタイトルを使うには、旧バージョンのインスタンスを再起動してください。`}}};function Ir(e){return(0,F.jsxs)(`div`,{className:`dashboard-settings-row`,children:[(0,F.jsxs)(`div`,{className:`dashboard-settings-row-main`,children:[(0,F.jsxs)(`label`,{className:`dashboard-settings-row-heading`,htmlFor:e.id,children:[(0,F.jsx)(`span`,{children:e.label}),(0,F.jsx)(`span`,{className:`dashboard-settings-row-scope`,children:e.scope})]}),(0,F.jsx)(`p`,{className:`dashboard-settings-row-description`,children:e.description})]}),(0,F.jsx)(`div`,{className:`dashboard-settings-row-control`,children:e.children})]})}function Lr(e){return(0,F.jsx)(Ir,{id:e.id,label:e.label,scope:e.scope,description:e.description,children:(0,F.jsx)(`input`,{id:e.id,className:`dashboard-settings-toggle`,type:`checkbox`,checked:e.value,onChange:t=>e.onChange(t.currentTarget.checked)})})}function Rr(e){return(0,F.jsx)(Ir,{id:e.id,label:e.label,scope:e.scope,description:e.description,children:(0,F.jsx)(`select`,{id:e.id,className:`dashboard-settings-select`,value:e.value,onChange:t=>e.onChange(Pr(t.currentTarget.value)),children:e.options.map(e=>(0,F.jsx)(`option`,{value:e.value,children:e.label},e.value))})})}function zr({support:e,locale:t}){let n=e.ready+e.legacy+e.offline,r=Fr[t].support;return(0,F.jsxs)(`div`,{className:`dashboard-settings-status-grid`,"aria-label":r.ariaLabel,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:r.ready}),(0,F.jsx)(`strong`,{children:e.ready})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:r.legacy}),(0,F.jsx)(`strong`,{children:e.legacy})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:r.offline}),(0,F.jsx)(`strong`,{children:e.offline})]}),(0,F.jsx)(`p`,{children:n===0?r.empty:r.restart})]})}function Br(e){let t=Pr(e.ui.locale),n=Fr[t];return(0,P.useEffect)(()=>{document.documentElement.lang=t},[t]),(0,F.jsxs)(`main`,{className:`dashboard-settings-workspace`,"aria-label":n.ariaLabel,children:[(0,F.jsxs)(`header`,{className:`dashboard-settings-header`,children:[(0,F.jsx)(`span`,{className:`eyebrow`,children:n.eyebrow}),(0,F.jsx)(`h2`,{children:n.title})]}),e.activeSection===`display`?(0,F.jsxs)(`section`,{className:`dashboard-settings-section`,children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`h3`,{children:n.displayTitle}),(0,F.jsx)(`p`,{children:n.displayDescription})]}),(0,F.jsxs)(`div`,{className:`dashboard-settings-field-list`,children:[(0,F.jsx)(Lr,{id:`dashboard-show-activity-title`,label:n.fields.activity.label,scope:n.fields.activity.scope,value:e.ui.showLatestActivityTitles,description:n.fields.activity.description,onChange:t=>e.onUiPatch({showLatestActivityTitles:t})}),(0,F.jsx)(Lr,{id:`dashboard-show-label-editor`,label:n.fields.rename.label,scope:n.fields.rename.scope,value:e.ui.showInlineLabelEditor,description:n.fields.rename.description,onChange:t=>e.onUiPatch({showInlineLabelEditor:t})}),(0,F.jsx)(Lr,{id:`dashboard-show-runtime-line`,label:n.fields.runtime.label,scope:n.fields.runtime.scope,value:e.ui.showSidebarRuntimeLine,description:n.fields.runtime.description,onChange:t=>e.onUiPatch({showSidebarRuntimeLine:t})}),(0,F.jsx)(Lr,{id:`dashboard-show-row-actions`,label:n.fields.actions.label,scope:n.fields.actions.scope,value:e.ui.showSelectedRowActions,description:n.fields.actions.description,onChange:t=>e.onUiPatch({showSelectedRowActions:t})}),(0,F.jsx)(Rr,{id:`dashboard-locale`,label:n.fields.language.label,scope:n.fields.language.scope,value:t,options:Nr,description:n.fields.language.description,onChange:t=>e.onUiPatch({locale:t})})]})]}):(0,F.jsxs)(`section`,{className:`dashboard-settings-section`,children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`h3`,{children:n.activityTitle}),(0,F.jsx)(`p`,{children:n.activityDescription})]}),(0,F.jsx)(zr,{support:e.titleSupport,locale:t})]})]})}function Vr(e){let t={ready:0,legacy:0,offline:0,byPort:e};for(let n of Object.values(e))t[n]+=1;return t}function Hr(e,t){return{selectedPort:e.selectedPort,selectedTab:e.activeDetailTab,sidebarCollapsed:e.sidebarCollapsed,activityDockCollapsed:e.activityDockCollapsed,activityDockHeight:e.activityDockHeight,activitySeenAt:null,activitySeenByPort:{},uiTheme:t,locale:e.locale,sidebarMode:e.sidebarMode,notesSelectedPath:e.notesSelectedPath,notesViewMode:e.notesViewMode,notesAuthoringMode:e.notesAuthoringMode,notesWordWrap:e.notesWordWrap,notesTreeWidth:e.notesTreeWidth,showLatestActivityTitles:e.showLatestActivityTitles,showInlineLabelEditor:e.showInlineLabelEditor,showSidebarRuntimeLine:e.showSidebarRuntimeLine,showSelectedRowActions:e.showSelectedRowActions}}function Ur({expanded:e}){return(0,F.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,className:`notes-tree-chevron`,children:(0,F.jsx)(`path`,{d:e?`M4 6l4 4 4-4`:`M6 4l4 4-4 4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function Wr({open:e}){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-icon`,children:[(0,F.jsx)(`path`,{d:`M2.5 5.2h5.1l1.2 1.5h6.7v6.7a1.4 1.4 0 0 1-1.4 1.4H3.9a1.4 1.4 0 0 1-1.4-1.4V5.2Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:e?`M2.8 7.1h12.7`:`M2.8 5.2h4.8`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function Gr(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-icon`,children:[(0,F.jsx)(`path`,{d:`M5 2.8h5.2L13.5 6v9.2H5V2.8Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M10.2 2.8V6h3.3M6.9 9h4.4M6.9 11.5h3.3`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function Kr(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-action-icon`,children:[(0,F.jsx)(`path`,{d:`M5 2.8h5.2L13.5 6v9.2H5V2.8Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M9.2 8.1v4.2M7.1 10.2h4.2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function qr(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-action-icon`,children:[(0,F.jsx)(`path`,{d:`M2.5 5.2h5.1l1.2 1.5h6.7v6.7a1.4 1.4 0 0 1-1.4 1.4H3.9a1.4 1.4 0 0 1-1.4-1.4V5.2Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M9 8.3v4M7 10.3h4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function Jr(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-action-icon`,children:[(0,F.jsx)(`path`,{d:`M14.2 6.3A5.5 5.5 0 0 0 4 5.2L3 6.6M3.8 11.7A5.5 5.5 0 0 0 14 12.8l1-1.4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M3 3.5v3.1h3.1M15 14.5v-3.1h-3.1`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function Yr(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-action-icon`,children:[(0,F.jsx)(`path`,{d:`M4 12.8 3.5 15l2.2-.5 7.7-7.7-1.7-1.7L4 12.8Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`m10.9 5.9 1.7 1.7`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function Xr(e){return e.dataTransfer.getData(`application/x-cli-jaw-note-path`)||e.dataTransfer.getData(`text/plain`)||null}function Zr(e){return Array.from(e.dataTransfer.types).some(e=>e===`application/x-cli-jaw-note-path`||e===`text/plain`)}function Qr(e,t){let n=[];for(let r of e)n.push(r.path),r.kind===`folder`&&t.has(r.path)&&r.children&&n.push(...Qr(r.children,t));return n}function $r(e,t){for(let n of e)t.set(n.path,n.kind),n.kind===`folder`&&n.children&&$r(n.children,t)}function ei(e,t){let n=[];for(let r of e){let e=t.get(r);e&&n.push({path:r,kind:e})}return n}function ti(e,t,n){let r=e.indexOf(t),i=e.indexOf(n);if(r===-1||i===-1)return new Set([n]);let a=Math.min(r,i),o=Math.max(r,i);return new Set(e.slice(a,o+1))}function ni(e,t,n){if(e.key===`F2`){e.preventDefault(),n.onRenamePath(t.path,t.kind);return}if(e.key===`Delete`||e.key===`Backspace`){if(e.preventDefault(),n.multiSelected.size>1&&n.multiSelected.has(t.path)){let e=ei(n.multiSelected,n.pathKindLookup);e.length>0&&n.onTrashPaths(e);return}n.onTrashPath(t.path,t.kind);return}if(e.key===`Enter`){if(e.preventDefault(),t.kind===`folder`){n.onSelectFolder?.(t.path),n.toggleFolder?.(t.path);return}n.onSelectPath(t.path)}}function ri(e,t,n,r,i,a,o,s,c){let l=e.path===t.selectedPath,u=o.has(e.path);if(e.kind===`folder`){let l=n.has(e.path),d=e.path===t.selectedFolderPath,f=e.children||[];return(0,F.jsxs)(`li`,{className:`notes-tree-folder`,children:[(0,F.jsxs)(`div`,{className:`notes-tree-folder-row ${d?`is-folder-selected`:``} ${i===e.path?`is-drop-target`:``} ${u?`is-multi-selected`:``}`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`notes-tree-folder-button`,"aria-expanded":l,onClick:n=>{if(n.shiftKey||n.metaKey||n.ctrlKey){c(e.path,n);return}c(e.path,n),t.onSelectFolder(e.path),r(e.path)},onDragOver:t=>{t.preventDefault(),t.stopPropagation(),a(e.path)},onDragLeave:e=>{e.stopPropagation(),a(null)},onDrop:n=>{n.preventDefault(),n.stopPropagation();let r=Xr(n);a(null),r&&t.onMovePath(r,e.path)},onKeyDown:n=>{if(n.key===`ArrowRight`&&!l){n.preventDefault(),r(e.path);return}if(n.key===`ArrowLeft`&&l){n.preventDefault(),r(e.path);return}ni(n,e,{toggleFolder:r,onSelectPath:t.onSelectPath,onSelectFolder:t.onSelectFolder,onRenamePath:t.onRenamePath,onTrashPath:t.onTrashPath,onTrashPaths:t.onTrashPaths,multiSelected:o,pathKindLookup:s})},children:[(0,F.jsx)(Ur,{expanded:l}),(0,F.jsx)(Wr,{open:l}),(0,F.jsx)(`span`,{children:e.name})]}),(0,F.jsx)(`button`,{type:`button`,className:`notes-tree-inline-action`,title:`Rename folder`,"aria-label":`Rename folder ${e.name}`,onClick:n=>{n.stopPropagation(),t.onRenamePath(e.path,e.kind)},children:(0,F.jsx)(Yr,{})})]}),l&&f.length>0&&(0,F.jsx)(`ul`,{children:f.map(e=>ri(e,t,n,r,i,a,o,s,c))})]},e.path)}let d=e.path===t.dirtyPath;return(0,F.jsx)(`li`,{children:(0,F.jsxs)(`div`,{className:`notes-tree-file-row ${l?`is-selected`:``} ${d?`is-dirty`:``} ${u?`is-multi-selected`:``}`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`notes-tree-file-button`,"aria-current":l?`page`:void 0,draggable:!0,onDragStart:t=>{t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`application/x-cli-jaw-note-path`,e.path),t.dataTransfer.setData(`text/plain`,e.path)},onClick:n=>{if(n.shiftKey||n.metaKey||n.ctrlKey){c(e.path,n);return}c(e.path,n),t.onSelectPath(e.path)},onKeyDown:n=>ni(n,e,{onSelectPath:t.onSelectPath,onRenamePath:t.onRenamePath,onTrashPath:t.onTrashPath,onTrashPaths:t.onTrashPaths,multiSelected:o,pathKindLookup:s}),children:[(0,F.jsx)(Gr,{}),(0,F.jsx)(`span`,{children:e.name}),d&&(0,F.jsx)(`span`,{className:`notes-tree-dirty-dot`,"aria-label":`Unsaved changes`})]}),(0,F.jsx)(`button`,{type:`button`,className:`notes-tree-inline-action`,title:`Rename`,"aria-label":`Rename ${e.name}`,onClick:n=>{n.stopPropagation(),t.onRenamePath(e.path,e.kind)},children:(0,F.jsx)(Yr,{})})]})},e.path)}function ii(e){let t={"--notes-tree-width":`${e.width}px`},[n,r]=(0,P.useState)(()=>new Set),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(()=>new Set),[c,l]=(0,P.useState)(null);function u(e){r(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}let d=Qr(e.entries,n),f=(()=>{let t=new Map;return $r(e.entries,t),t})();function p(){if(o.size===0)return;let t=ei(o,f);t.length!==0&&e.onTrashPaths(t)}let m=(0,P.useCallback)((t,n)=>{n.shiftKey&&c?s(ti(d,c,t)):n.metaKey||n.ctrlKey?(s(n=>{let r=new Set(n);return r.size===0&&e.selectedPath&&r.add(e.selectedPath),r.has(t)?r.delete(t):r.add(t),r}),l(t)):(o.size>0&&s(new Set),l(t))},[c,d,o.size,e.selectedPath]);return(0,P.useEffect)(()=>{e.selectedPath&&l(e.selectedPath)},[e.selectedPath]),(0,P.useEffect)(()=>{o.size!==0&&s(e=>{let t=!1,n=new Set;for(let r of e)f.has(r)?n.add(r):t=!0;return t?n:e})},[e.entries]),(0,P.useEffect)(()=>{function t(t){if(!(t.metaKey||t.ctrlKey)||!t.shiftKey||t.key.toLowerCase()!==`c`)return;let n=e.notesRoot;if(!n)return;let r=o.size>0?Array.from(o):e.selectedPath?[e.selectedPath]:[];if(r.length===0)return;t.preventDefault();let i=r.map(e=>`${n}/${e}`).join(`
11
- `);navigator.clipboard.writeText(i)}return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[o,e.selectedPath,e.notesRoot]),(0,F.jsxs)(`aside`,{className:`notes-tree ${i===null?`is-root-drop-target`:``}`,style:t,onDragOver:e=>{Zr(e)&&(e.preventDefault(),a(null))},onDrop:t=>{let n=Xr(t);n&&(t.preventDefault(),e.onMovePath(n,null))},children:[(0,F.jsxs)(`div`,{className:`notes-tree-header`,children:[(0,F.jsx)(`strong`,{children:`Notes`}),(0,F.jsxs)(`div`,{className:`notes-tree-actions`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:e.onCreateNote,title:`New note`,"aria-label":`New note`,children:(0,F.jsx)(Kr,{})}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onCreateFolder,title:`New folder`,"aria-label":`New folder`,children:(0,F.jsx)(qr,{})}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onRefresh,disabled:e.loading,title:`Refresh notes`,"aria-label":`Refresh notes`,children:(0,F.jsx)(Jr,{})})]})]}),o.size>0&&(0,F.jsxs)(`div`,{className:`notes-tree-selection-info`,children:[o.size,` selected`,(0,F.jsx)(`button`,{type:`button`,className:`notes-tree-selection-delete`,onClick:p,disabled:o.size===0,children:`Delete`}),(0,F.jsx)(`button`,{type:`button`,className:`notes-tree-clear-selection`,onClick:()=>s(new Set),children:`Clear`})]}),e.loading&&(0,F.jsx)(`div`,{className:`notes-tree-state`,children:`Loading notes...`}),!e.loading&&e.entries.length===0&&(0,F.jsx)(`div`,{className:`notes-tree-state`,children:`No notes or folders`}),!e.loading&&e.entries.length>0&&(0,F.jsx)(`ul`,{className:`notes-tree-list`,children:e.entries.map(t=>ri(t,e,n,u,i,a,o,f,m))})]})}function ai(e){for(let t of e){if(t.kind===`file`)return t.path;let e=ai(t.children||[]);if(e)return e}return null}function oi(e,t){for(let n of e)if(n.kind===`file`&&n.path===t||oi(n.children||[],t))return!0;return!1}function si(e,t){let n=e.split(`/`).filter(Boolean),r=n[n.length-1];return r?t?`${t}/${r}`:r:e}function ci(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]||e}function li(e){let t=e.split(`/`).filter(Boolean);return t.length<=1?null:t.slice(0,-1).join(`/`)}function ui(e,t,n){let r=n===`file`&&!t.endsWith(`.md`)?`${t}.md`:t;if(r.includes(`/`))return r;let i=li(e);return i?`${i}/${r}`:r}function di(e,t,n){return e?e===t?n:e.startsWith(`${t}/`)?`${n}/${e.slice(t.length+1)}`:e:null}function fi(e,t){return t?t===e||t.startsWith(`${e}/`):!1}function pi(e,t,n){return n?t===`folder`?fi(e,n):n===e:!1}function mi(e,t,n){let r=t===`folder`?`Move folder "${e}" and all child notes to trash?`:`Move note "${e}" to trash?`;return n?`${r}\n\nThere are unsaved changes inside this target.`:r}function hi(e,t){let n=e.filter(e=>e.kind===`file`).length,r=e.length-n,i=[];r>0&&i.push(`${r} folder${r===1?``:`s`}`),n>0&&i.push(`${n} note${n===1?``:`s`}`);let a=`Move ${i.length>0?i.join(` + `):`${e.length} items`} to trash?`;return t?`${a}\n\nThere are unsaved changes inside this selection.`:a}function gi(e){let[t,n]=(0,P.useState)([]),[r,i]=(0,P.useState)(!1),[a,o]=(0,P.useState)(null),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(null),[d,f]=(0,P.useState)(null);(0,P.useEffect)(()=>{bt().then(e=>f(e.root)).catch(()=>{})},[]);async function p(t=e.selectedPath){i(!0),o(null);try{let r=await xt();n(r);let i=t&&oi(r,t)?t:ai(r);i!==e.selectedPath&&e.onSelectedPathChange(i)}catch(e){o(e.message)}finally{i(!1)}}(0,P.useEffect)(()=>{p()},[]);async function m(){let t=l?`${l}/untitled.md`:`untitled.md`,n=window.prompt(`Note path`,t);if(n)try{c(null);let t=await Ct(n.endsWith(`.md`)?n:`${n}.md`,``);e.onSelectedPathChange(t.path),await p(t.path)}catch(e){o(e.message)}}(0,P.useEffect)(()=>{function e(e){!e.altKey||e.metaKey||e.ctrlKey||e.shiftKey||e.key.toLowerCase()!==`n`||(e.preventDefault(),m())}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});async function h(){let e=l?`${l}/new-folder`:`new-folder`,t=window.prompt(`Folder path`,e);if(t)try{c(null),u((await Tt(t)).path),await p()}catch(e){o(e.message)}}async function g(t,n){let r=si(t,n);if(t!==r)try{c(null);let n=await Et(t,r);e.selectedPath===t&&e.onSelectedPathChange(n.to),await p(n.to)}catch(e){o(e.message)}}async function _(t,n){let r=n===`folder`?`Rename folder`:`Rename note`,i=window.prompt(r,ci(t));if(!i)return;let a=ui(t,i,n);if(a!==t)try{c(null);let n=await Et(t,a),r=di(e.selectedPath,n.from,n.to),i=di(l,n.from,n.to);i!==l&&u(i),r!==e.selectedPath&&e.onSelectedPathChange(r),await p(r)}catch(e){o(e.message)}}async function v(t){if(t.length===0)return;if(t.length===1){await y(t[0].path,t[0].kind);return}let n=t.some(t=>pi(t.path,t.kind,e.dirtyPath));if(!window.confirm(hi(t,n)))return;c(null);let r=0,i=!1,a=!1,s=null;for(let n of t)try{await Dt(n.path,n.kind),r+=1,i||(n.kind===`folder`?fi(n.path,e.selectedPath):e.selectedPath===n.path)&&(i=!0),!a&&n.kind===`folder`&&fi(n.path,l)&&(a=!0)}catch(e){s=`Failed at ${n.path}: ${e.message}`;break}i&&e.onSelectedPathChange(null),a&&u(null),s?(o(s),c(r>0?`Moved ${r} of ${t.length} to trash before stopping.`:null)):c(`Moved ${r} item${r===1?``:`s`} to trash.`),await p(i?null:e.selectedPath)}async function y(t,n){let r=pi(t,n,e.dirtyPath);if(window.confirm(mi(t,n,r)))try{c(null);let r=await Dt(t,n),i=n===`folder`?fi(t,e.selectedPath):e.selectedPath===t,a=n===`folder`?fi(t,l):!1;i&&e.onSelectedPathChange(null),a&&u(null);let o=r.deletedTo===`os-trash`?`OS trash`:`dashboard trash`,s=r.deletedTo===`dashboard-trash`&&r.restoreHint?` Restore from: ${r.restoreHint}`:``;c(`Moved ${r.path} to ${o}.${s}`),await p(i?null:e.selectedPath)}catch(e){o(e.message)}}return(0,F.jsxs)(F.Fragment,{children:[a&&(0,F.jsx)(`section`,{className:`state error-state`,children:a}),s&&(0,F.jsx)(`section`,{className:`state notes-status-state`,children:s}),(0,F.jsx)(ii,{entries:t,selectedPath:e.selectedPath,selectedFolderPath:l,dirtyPath:e.dirtyPath,loading:r,width:e.treeWidth,notesRoot:d,onSelectPath:e.onSelectedPathChange,onSelectFolder:u,onMovePath:(e,t)=>void g(e,t),onRenamePath:(e,t)=>void _(e,t),onTrashPath:(e,t)=>void y(e,t),onTrashPaths:e=>void v(e),onCreateNote:()=>void m(),onCreateFolder:()=>void h(),onRefresh:()=>void p()})]})}function _i(){return _i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_i.apply(null,arguments)}function vi(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var yi=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=wi(e.state,n.from);return r.line?xi(e):r.block?Ci(e):!1};function bi(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var xi=bi(ki,0),Si=bi(Oi,0),Ci=bi((e,t)=>Oi(e,t,Di(t)),0);function wi(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var Ti=50;function Ei(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-Ti,r),o=e.sliceDoc(i,i+Ti),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=2*Ti?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+Ti),d=e.sliceDoc(i-Ti,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function Di(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function Oi(e,t,n=t.selection.ranges){let r=n.map(e=>wi(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>Ei(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function ki(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=wi(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}else if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var Ai=ue.define(),ji=ue.define(),Mi=p.define(),Ni=p.define({combine(e){return _(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),Pi=d.define({create(){return Zi.empty},update(e,t){let n=t.state.facet(Ni),r=t.annotation(Ai);if(r){let i=zi.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?Bi(o,o.length,n.minDepth,i):Ki(o,t.startState.selection),new Zi(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(ji);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(S.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=zi.fromTransaction(t),o=t.annotation(S.time),s=t.annotation(S.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new Zi(e.done.map(zi.fromJSON),e.undone.map(zi.fromJSON))}});function Fi(e={}){return[Pi,Ni.of(e),E.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?I:e.inputType==`historyRedo`?L:null;return n?(e.preventDefault(),n(t)):!1}})]}function Ii(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(Pi,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var I=Ii(0,!1),L=Ii(1,!1),Li=Ii(0,!0),Ri=Ii(1,!0),zi=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&Ne.fromJSON(t.changes),[],t.mapped&&Me.fromJSON(t.mapped),t.startSelection&&N.fromJSON(t.startSelection),t.selectionsAfter.map(N.fromJSON))}static fromTransaction(t,n){let r=Wi;for(let e of t.startState.facet(Mi)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,Wi)}static selection(t){return new e(void 0,Wi,void 0,void 0,t)}};function Bi(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function Vi(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function Hi(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function Ui(e,t){return e.length?t.length?e.concat(t):e:t}var Wi=[],Gi=200;function Ki(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Gi));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Bi(e,e.length-1,1e9,n.setSelAfter(r)))}else return[zi.selection([t])]}function qi(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function Ji(e,t){if(!e.length)return e;let n=e.length,r=Wi;for(;n;){let i=Yi(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[zi.selection(r)]:Wi}function Yi(e,t,n){let r=Ui(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):Wi,n);if(!e.changes)return zi.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new zi(i,Se.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var Xi=/^(input\.type|delete)($|\.)/,Zi=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||Xi.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,Vi(s.changes,t.changes))||r==`input.type.compose`)?Bi(o,o.length-1,i.minDepth,new zi(t.changes.compose(s.changes),Ui(Se.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,Wi)):Bi(o,o.length,i.minDepth,t),new e(o,Wi,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:Wi;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&Hi(a[a.length-1],t)?this:new e(Ki(this.done,t),this.undone,n,r)}addMapping(t){return new e(Ji(this.done,t),Ji(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:Ai.of({side:e,rest:qi(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?Wi:r.slice(0,r.length-1);return i.mapped&&(n=Ji(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:Ai.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}else return null}};Zi.empty=new Zi(Wi,Wi);var Qi=[{key:`Mod-z`,run:I,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:L,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:L,preventDefault:!0},{key:`Mod-u`,run:Li,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:Ri,preventDefault:!0}];function $i(e,t){return N.create(e.ranges.map(t),e.mainIndex)}function ea(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function ta({state:e,dispatch:t},n){let r=$i(e.selection,n);return r.eq(e.selection,!0)?!1:(t(ea(e,r)),!0)}function na(e,t){return N.cursor(t?e.to:e.from)}function ra(e,t){return ta(e,n=>n.empty?e.moveByChar(n,t):na(n,t))}function ia(e){return e.textDirectionAt(e.state.selection.main.head)==y.LTR}var aa=e=>ra(e,!ia(e)),oa=e=>ra(e,ia(e));function sa(e,t){return ta(e,n=>n.empty?e.moveByGroup(n,t):na(n,t))}var ca=e=>sa(e,!ia(e)),la=e=>sa(e,ia(e));typeof Intl<`u`&&Intl.Segmenter;function ua(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function da(e,t,n){let r=g(e).resolveInner(t.head),i=n?f.closedBy:f.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;ua(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?x(e,r.from,1):x(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,N.cursor(s,n?-1:1)}var fa=e=>ta(e,t=>da(e.state,t,!ia(e))),pa=e=>ta(e,t=>da(e.state,t,ia(e)));function ma(e,t){return ta(e,n=>{if(!n.empty)return na(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var ha=e=>ma(e,!1),ga=e=>ma(e,!0);function _a(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(E.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function va(e,t){let n=_a(e),{state:r}=e,i=$i(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):na(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=E.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(ea(r,i),{effects:a}),!0}var ya=e=>va(e,!1),ba=e=>va(e,!0);function xa(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=N.cursor(r.from+n))}return i}var Sa=e=>ta(e,t=>xa(e,t,!0)),Ca=e=>ta(e,t=>xa(e,t,!1)),wa=e=>ta(e,t=>xa(e,t,!ia(e))),Ta=e=>ta(e,t=>xa(e,t,ia(e))),Ea=e=>ta(e,t=>N.cursor(e.lineBlockAt(t.head).from,1)),Da=e=>ta(e,t=>N.cursor(e.lineBlockAt(t.head).to,-1));function Oa(e,t,n){let r=!1,i=$i(e.selection,t=>{let i=x(e,t.head,-1)||x(e,t.head,1)||t.head>0&&x(e,t.head-1,1)||t.head<e.doc.length&&x(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?N.range(t.anchor,a):N.cursor(a)});return r?(t(ea(e,i)),!0):!1}var ka=({state:e,dispatch:t})=>Oa(e,t,!1);function Aa(e,t){let n=$i(e.state.selection,e=>{let n=t(e);return N.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0,n.assoc)});return n.eq(e.state.selection)?!1:(e.dispatch(ea(e.state,n)),!0)}function ja(e,t){return Aa(e,n=>e.moveByChar(n,t))}var Ma=e=>ja(e,!ia(e)),Na=e=>ja(e,ia(e));function Pa(e,t){return Aa(e,n=>e.moveByGroup(n,t))}var Fa=e=>Pa(e,!ia(e)),Ia=e=>Pa(e,ia(e)),La=e=>Aa(e,t=>da(e.state,t,!ia(e))),Ra=e=>Aa(e,t=>da(e.state,t,ia(e)));function za(e,t){return Aa(e,n=>e.moveVertically(n,t))}var Ba=e=>za(e,!1),Va=e=>za(e,!0);function Ha(e,t){return Aa(e,n=>e.moveVertically(n,t,_a(e).height))}var Ua=e=>Ha(e,!1),Wa=e=>Ha(e,!0),Ga=e=>Aa(e,t=>xa(e,t,!0)),Ka=e=>Aa(e,t=>xa(e,t,!1)),qa=e=>Aa(e,t=>xa(e,t,!ia(e))),Ja=e=>Aa(e,t=>xa(e,t,ia(e))),Ya=e=>Aa(e,t=>N.cursor(e.lineBlockAt(t.head).from)),Xa=e=>Aa(e,t=>N.cursor(e.lineBlockAt(t.head).to)),Za=({state:e,dispatch:t})=>(t(ea(e,{anchor:0})),!0),Qa=({state:e,dispatch:t})=>(t(ea(e,{anchor:e.doc.length})),!0),$a=({state:e,dispatch:t})=>(t(ea(e,{anchor:e.selection.main.anchor,head:0})),!0),eo=({state:e,dispatch:t})=>(t(ea(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),to=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),no=({state:e,dispatch:t})=>{let n=bo(e).map(({from:t,to:n})=>N.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:N.create(n),userEvent:`select`})),!0},ro=({state:e,dispatch:t})=>{let n=$i(e.selection,t=>{let n=g(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return N.range(n.to,n.from)}return t});return n.eq(e.selection)?!1:(t(ea(e,n)),!0)};function io(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}else if(r.head==n.head)break;else n=r}}return i.length==r.ranges.length?!1:(e.dispatch(ea(n,N.create(i,i.length-1))),!0)}var ao=e=>io(e,!1),oo=e=>io(e,!0),so=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=N.create([n.main]):n.main.empty||(r=N.create([N.cursor(n.main.head)])),r?(t(ea(e,r)),!0):!1};function co(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=lo(e,o,!1)):o>i&&(n=`delete.forward`,o=lo(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=lo(e,i,!1),a=lo(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:N.cursor(i,i<r.head?-1:1)}});return i.changes.empty?!1:(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?E.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function lo(e,t,n){if(e instanceof E)for(let r of e.state.facet(E.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var uo=(e,t,n)=>co(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=v(s,a.tabSize)%se(a)||se(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=b(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=b(o.text,c-o.from,!1,!1)+o.from);return c}),fo=e=>uo(e,!1,!0),po=e=>uo(e,!0,!1),mo=(e,t)=>co(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=b(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),ho=e=>mo(e,!1),R=e=>mo(e,!0),z=e=>co(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),go=e=>co(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),_o=e=>co(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),vo=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:be.of([``,``])},range:N.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},yo=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:b(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:b(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:N.cursor(a)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function bo(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function xo(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of bo(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(N.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(N.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:N.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var So=({state:e,dispatch:t})=>xo(e,t,!1),Co=({state:e,dispatch:t})=>xo(e,t,!0);function wo(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of bo(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var To=({state:e,dispatch:t})=>wo(e,t,!1),Eo=({state:e,dispatch:t})=>wo(e,t,!0),Do=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(bo(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=$i(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function Oo(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=g(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(f.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var ko=jo(!1),Ao=jo(!0);function jo(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&Oo(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new we(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=h(s,r);for(c??=v(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,xe(t,c)];return o&&l.push(xe(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:be.of(l)},range:N.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function Mo(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:N.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var No=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new we(e,{overrideIndentation:e=>n[e]??-1}),i=Mo(e,(t,i,a)=>{let o=h(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=xe(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},Po=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(Mo(e,(t,n)=>{n.push({from:t.from,insert:e.facet(u)})}),{userEvent:`input.indent`})),!0),Fo=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(Mo(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=v(r,e.tabSize),a=0,o=xe(e,Math.max(0,i-se(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),Io=e=>(e.setTabFocusMode(),!0),Lo=[{key:`Ctrl-b`,run:aa,shift:Ma,preventDefault:!0},{key:`Ctrl-f`,run:oa,shift:Na},{key:`Ctrl-p`,run:ha,shift:Ba},{key:`Ctrl-n`,run:ga,shift:Va},{key:`Ctrl-a`,run:Ea,shift:Ya},{key:`Ctrl-e`,run:Da,shift:Xa},{key:`Ctrl-d`,run:po},{key:`Ctrl-h`,run:fo},{key:`Ctrl-k`,run:z},{key:`Ctrl-Alt-h`,run:ho},{key:`Ctrl-o`,run:vo},{key:`Ctrl-t`,run:yo},{key:`Ctrl-v`,run:ba}],Ro=[{key:`ArrowLeft`,run:aa,shift:Ma,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:ca,shift:Fa,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:wa,shift:qa,preventDefault:!0},{key:`ArrowRight`,run:oa,shift:Na,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:la,shift:Ia,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:Ta,shift:Ja,preventDefault:!0},{key:`ArrowUp`,run:ha,shift:Ba,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:Za,shift:$a},{mac:`Ctrl-ArrowUp`,run:ya,shift:Ua},{key:`ArrowDown`,run:ga,shift:Va,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:Qa,shift:eo},{mac:`Ctrl-ArrowDown`,run:ba,shift:Wa},{key:`PageUp`,run:ya,shift:Ua},{key:`PageDown`,run:ba,shift:Wa},{key:`Home`,run:Ca,shift:Ka,preventDefault:!0},{key:`Mod-Home`,run:Za,shift:$a},{key:`End`,run:Sa,shift:Ga,preventDefault:!0},{key:`Mod-End`,run:Qa,shift:eo},{key:`Enter`,run:ko,shift:ko},{key:`Mod-a`,run:to},{key:`Backspace`,run:fo,shift:fo,preventDefault:!0},{key:`Delete`,run:po,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:ho,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:R,preventDefault:!0},{mac:`Mod-Backspace`,run:go,preventDefault:!0},{mac:`Mod-Delete`,run:_o,preventDefault:!0}].concat(Lo.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),zo=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:fa,shift:La},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:pa,shift:Ra},{key:`Alt-ArrowUp`,run:So},{key:`Shift-Alt-ArrowUp`,run:To},{key:`Alt-ArrowDown`,run:Co},{key:`Shift-Alt-ArrowDown`,run:Eo},{key:`Mod-Alt-ArrowUp`,run:ao},{key:`Mod-Alt-ArrowDown`,run:oo},{key:`Escape`,run:so},{key:`Mod-Enter`,run:Ao},{key:`Alt-l`,mac:`Ctrl-l`,run:no},{key:`Mod-i`,run:ro,preventDefault:!0},{key:`Mod-[`,run:Fo},{key:`Mod-]`,run:Po},{key:`Mod-Alt-\\`,run:No},{key:`Shift-Mod-k`,run:Do},{key:`Shift-Mod-\\`,run:ka},{key:`Mod-/`,run:yi},{key:`Alt-A`,run:Si},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:Io}].concat(Ro),Bo={key:`Tab`,run:Po,shift:Fo},Vo=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,Ho=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(Vo(e)):Vo,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ee(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=ie(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=ne(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n,a=!0;;e++){let n=r.charCodeAt(e),o=this.match(n,i,a,this.bufferPos+this.bufferStart,e==r.length-1);if(o)return this.value=o,this;if(e==r.length-1)break;a&&e<t.length&&t.charCodeAt(e)==n?i++:a=!1}}}match(e,t,n,r,i){let a=null;for(let t=0;t<this.matches.length;){let n=this.matches[t],o=!1;this.query.charCodeAt(n.index)==e&&(n.index==this.query.length-1?a={from:n.from,to:r,precise:i&&n.precise}:(n.index++,o=!0)),o?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:t,to:r,precise:n&&i}:this.matches.push({from:t,index:1,precise:n})),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}};typeof Symbol<`u`&&(Ho.prototype[Symbol.iterator]=function(){return this});var Uo={from:-1,to:-1,match:/.*/.exec(``),precise:!0},Wo=`gm`+(/x/.unicode==null?``:`u`),Go=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=Uo,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new Jo(e,t,n,r,i);this.re=new RegExp(t,Wo+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=Xo(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=Xo(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},Ko=new WeakMap,qo=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=Ko.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return Ko.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),Ko.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},Jo=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=Uo,this.matchPos=Xo(e,r),this.re=new RegExp(t,Wo+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=qo.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,precise:!0,match:t},this.matchPos=Xo(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=qo.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(Go.prototype[Symbol.iterator]=Jo.prototype[Symbol.iterator]=function(){return this});function Yo(e){try{return new RegExp(e,Wo),!0}catch{return!1}}function Xo(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var Zo=e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:r,result:i}=De(e,{label:t.phrase(`Go to line`),input:{type:`text`,name:`line`,value:n},focus:!0,submitLabel:t.phrase(`go`)});return i.then(n=>{let i=n&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.elements.line.value);if(!i){e.dispatch({effects:r});return}let a=t.doc.lineAt(t.selection.main.head),[,o,s,c,l]=i,u=c?+c.slice(1):0,d=s?+s:a.number;if(s&&l){let e=d/100;o&&(e=e*(o==`-`?-1:1)+a.number/t.doc.lines),d=Math.round(t.doc.lines*e)}else s&&o&&(d=d*(o==`-`?-1:1)+a.number);let f=t.doc.line(Math.max(1,Math.min(t.doc.lines,d))),p=N.cursor(f.from+Math.max(0,Math.min(u,f.length)));e.dispatch({effects:[r,E.scrollIntoView(p.from,{y:`center`})],selection:p})}),!0},Qo={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},$o=p.define({combine(e){return _(e,Qo,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function es(e){let t=[os,as];return e&&t.push($o.of(e)),t}var ts=j.mark({class:`cm-selectionMatch`}),ns=j.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function rs(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=D.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=D.Word)}function is(e,t,n,r){return e(t.sliceDoc(n,n+1))==D.Word&&e(t.sliceDoc(r-1,r))==D.Word}var as=T.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet($o),{state:n}=e,r=n.selection;if(r.ranges.length>1)return j.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return j.none;let e=n.wordAt(i.head);if(!e)return j.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return j.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(rs(o,n,i.from,i.to)&&is(o,n,i.from,i.to)))return j.none}else if(a=n.sliceDoc(i.from,i.to),!a)return j.none}let s=[];for(let r of e.visibleRanges){let e=new Ho(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||rs(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(ns.range(r,a)):(r>=i.to||a<=i.from)&&s.push(ts.range(r,a)),s.length>t.maxMatches))return j.none}}return j.set(s)}},{decorations:e=>e.decorations}),os=E.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),ss=({state:e,dispatch:t})=>{let{selection:n}=e,r=N.create(n.ranges.map(t=>e.wordAt(t.head)||N.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function cs(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new Ho(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new Ho(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var ls=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return ss({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=cs(e,r);return i?(t(e.update({selection:e.selection.addRange(N.range(i.from,i.to),!1),effects:E.scrollIntoView(i.to)})),!0):!1},us=p.define({combine(e){return _(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Ws(e),scrollToMatch:e=>E.scrollIntoView(e)})}}),ds=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||Yo(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
12
- `:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new Ss(this):new gs(this)}getCursor(e,t=0,n){let r=e.doc?e:oe.create({doc:e});return n??=r.doc.length,this.regexp?vs(this,r,t,n):ms(this,r,t,n)}},fs=class{constructor(e){this.spec=e}};function ps(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function ms(e,t,n,r){let i;return e.wholeWord&&(i=hs(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=ps(e.test,t,i)),new Ho(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function hs(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(ys(i,n-a))!=D.Word||t(bs(i,n-a))!=D.Word)&&(t(bs(i,r-a))!=D.Word||t(ys(i,r-a))!=D.Word))}var gs=class extends fs{constructor(e){super(e)}nextMatch(e,t,n){let r=ms(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=ms(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=ms(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=ms(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=ms(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function _s(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function vs(e,t,n,r){let i;return e.wholeWord&&(i=xs(t.charCategorizer(t.selection.main.head))),e.test&&(i=_s(e.test,t,i)),new Go(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function ys(e,t){return e.slice(b(e,t,!1),t)}function bs(e,t){return e.slice(t,b(e,t))}function xs(e){return(t,n,r)=>!r[0].length||(e(ys(r.input,r.index))!=D.Word||e(bs(r.input,r.index))!=D.Word)&&(e(bs(r.input,r.index+r[0].length))!=D.Word||e(ys(r.input,r.index+r[0].length))!=D.Word)}var Ss=class extends fs{nextMatch(e,t,n){let r=vs(this.spec,e,n,e.doc.length).next();return r.done&&(r=vs(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=vs(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=vs(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=vs(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},Cs=Se.define(),ws=Se.define(),Ts=d.define({create(e){return new Es(Rs(e).create(),null)},update(e,t){for(let n of t.effects)n.is(Cs)?e=new Es(n.value.create(),e.panel):n.is(ws)&&(e=new Es(e.query,n.value?Ls:null));return e},provide:e=>Ce.from(e,e=>e.panel)}),Es=class{constructor(e,t){this.query=e,this.panel=t}},Ds=j.mark({class:`cm-searchMatch`}),Os=j.mark({class:`cm-searchMatch cm-searchMatch-selected`}),ks=T.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(Ts))}update(e){let t=e.state.field(Ts);(t!=e.startState.field(Ts)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return j.none;let{view:n}=this,r=new m;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?Os:Ds)})}return r.finish()}},{decorations:e=>e.decorations});function As(e){return t=>{let n=t.state.field(Ts,!1);return n&&n.query.spec.valid?e(t,n):Vs(t)}}var js=As((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=N.single(r.from,r.to),a=e.state.facet(us);return e.dispatch({selection:i,effects:[Js(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),Bs(e),!0}),Ms=As((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=N.single(i.from,i.to),o=e.state.facet(us);return e.dispatch({selection:a,effects:[Js(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),Bs(e),!0}),Ns=As((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:N.create(n.map(e=>N.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),Ps=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new Ho(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(N.range(t.value.from,t.value.to))}return t(e.update({selection:N.create(a,o),userEvent:`select.search.matches`})),!0},Fs=As((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.precise?o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),u.push(E.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`))):o=t.nextMatch(n,o.from,o.to);let d=e.state.changes(s);return o&&(c=N.single(o.from,o.to).map(d),u.push(Js(e,o)),u.push(n.facet(us).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),Is=As((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:a}=r;a&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:E.announce.of(r),userEvent:`input.replace.all`}),!0});function Ls(e){return e.state.facet(us).createPanel(e)}function Rs(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(us);return new ds({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function zs(e){let t=M(e,Ls);return t&&t.dom.querySelector(`[main-field]`)}function Bs(e){let t=zs(e);t&&t==e.root.activeElement&&t.select()}var Vs=e=>{let t=e.state.field(Ts,!1);if(t&&t.panel){let n=zs(e);if(n&&n!=e.root.activeElement){let r=Rs(e.state,t.query.spec);r.valid&&e.dispatch({effects:Cs.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[ws.of(!0),t?Cs.of(Rs(e.state,t.query.spec)):Se.appendConfig.of(Xs)]});return!0},Hs=e=>{let t=e.state.field(Ts,!1);if(!t||!t.panel)return!1;let n=M(e,Ls);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:ws.of(!1)}),!0},Us=[{key:`Mod-f`,run:Vs,scope:`editor search-panel`},{key:`F3`,run:js,shift:Ms,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:js,shift:Ms,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:Hs,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:Ps},{key:`Mod-Alt-g`,run:Zo},{key:`Mod-d`,run:ls,preventDefault:!0}],Ws=class{constructor(e){this.view=e;let t=this.query=e.state.field(Ts).query.spec;this.commit=this.commit.bind(this),this.searchField=k(`input`,{value:t.search,placeholder:Gs(e,`Find`),"aria-label":Gs(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=k(`input`,{value:t.replace,placeholder:Gs(e,`Replace`),"aria-label":Gs(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=k(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=k(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=k(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return k(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=k(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>js(e),[Gs(e,`next`)]),n(`prev`,()=>Ms(e),[Gs(e,`previous`)]),n(`select`,()=>Ns(e),[Gs(e,`all`)]),k(`label`,null,[this.caseField,Gs(e,`match case`)]),k(`label`,null,[this.reField,Gs(e,`regexp`)]),k(`label`,null,[this.wordField,Gs(e,`by word`)]),...e.state.readOnly?[]:[k(`br`),this.replaceField,n(`replace`,()=>Fs(e),[Gs(e,`replace`)]),n(`replaceAll`,()=>Is(e),[Gs(e,`replace all`)])],k(`button`,{name:`close`,onclick:()=>Hs(e),"aria-label":Gs(e,`close`),type:`button`},[`×`])])}commit(){let e=new ds({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Cs.of(e)}))}keydown(e){_e(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Ms:js)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Fs(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(Cs)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(us).top}};function Gs(e,t){return e.state.phrase(t)}var Ks=30,qs=/[\s\.,:;?!]/;function Js(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-Ks),o=Math.min(i,n+Ks),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<Ks;e++)if(!qs.test(s[e+1])&&qs.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-Ks;e--)if(!qs.test(s[e-1])&&qs.test(s[e])){s=s.slice(0,e);break}}return E.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var Ys=E.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),Xs=[Ts,ce.low(ks),Ys],Zs=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},Qs=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,n,r){let i=r.facet(fc).markerFilter;i&&(t=i(t,r));let a=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new m,s=[],c=0,l=r.doc.iter(),u=0,d=r.doc.length;for(let e=0;;){let t=e==a.length?null:a[e];if(!t&&!s.length)break;let n,r;if(s.length)n=c,r=s.reduce((e,t)=>Math.min(e,t.to),t&&t.from>n?t.from:1e8);else{if(n=t.from,n>d)break;r=t.to,s.push(t),e++}for(;e<a.length;){let t=a[e];if(t.from==n&&(t.to>t.from||t.to==n))s.push(t),e++,r=Math.min(t.to,r);else{r=Math.min(t.from,r);break}}r=Math.min(r,d);let i=!1;if(s.some(e=>e.from==n&&(e.to==r||r==d))&&(i=n==r,!i&&r-n<10)){let e=n-(u+l.value.length);e>0&&(l.next(e),u=n);for(let e=n;;){if(e>=r){i=!0;break}if(!l.lineBreak&&u+l.value.length>e)break;e=u+l.value.length,u+=l.value.length,l.next()}}let f=Cc(s);if(i)o.add(n,n,j.widget({widget:new gc(f),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);o.add(n,r,j.mark({class:`cm-lintRange cm-lintRange-`+f+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>r)}))}if(c=r,c==d)break;for(let e=0;e<s.length;e++)s[e].to<=c&&s.splice(e--,1)}let f=o.finish();return new e(f,n,$s(f))}};function $s(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0))if(!r)r=new Zs(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new Zs(r.from,n,r.diagnostic)}),r}function ec(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(fc).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(nc))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function tc(e,t){return e.field(ac,!1)?t:t.concat(Se.appendConfig.of(wc))}var nc=Se.define(),rc=Se.define(),ic=Se.define(),ac=d.define({create(){return new Qs(j.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=$s(n,e.selected.diagnostic,i)||$s(n,null,i)}!n.size&&i&&t.state.facet(fc).autoPanel&&(i=null),e=new Qs(n,i,r)}for(let n of t.effects)if(n.is(nc)){let r=t.state.facet(fc).autoPanel?n.value.length?vc.open:null:e.panel;e=Qs.init(n.value,r,t.state)}else n.is(rc)?e=new Qs(e.diagnostics,n.value?vc.open:null,e.selected):n.is(ic)&&(e=new Qs(e.diagnostics,e.panel,n.value));return e},provide:e=>[Ce.from(e,e=>e.panel),E.decorations.from(e,e=>e.diagnostics)]}),oc=j.mark({class:`cm-lintRange cm-lintRange-active`});function sc(e,t,n){let{diagnostics:r}=e.state.field(ac),i,a=-1,o=-1;r.between(t-+(n<0),t+ +(n>0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=s.diagnostics,a=e,o=r,!1});let s=e.state.facet(fc).tooltipFilter;return i&&s&&(i=s(i,e.state)),i?{pos:a,end:o,above:e.state.doc.lineAt(a).to<o,create(){return{dom:cc(e,i)}}}:null}function cc(e,t){return k(`ul`,{class:`cm-tooltip-lint`},t.map(t=>hc(e,t,!1)))}var lc=e=>{let t=e.state.field(ac,!1);(!t||!t.panel)&&e.dispatch({effects:tc(e.state,[rc.of(!0)])});let n=M(e,vc.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},uc=e=>{let t=e.state.field(ac,!1);return!t||!t.panel?!1:(e.dispatch({effects:rc.of(!1)}),!0)},dc=[{key:`Mod-Shift-m`,run:lc,preventDefault:!0},{key:`F8`,run:e=>{let t=e.state.field(ac,!1);if(!t)return!1;let n=e.state.selection.main,r=$s(t.diagnostics,null,n.to+1);return!r&&(r=$s(t.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],fc=p.define({combine(e){return{sources:e.map(e=>e.source).filter(e=>e!=null),..._(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:pc,tooltipFilter:pc,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})}}});function pc(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function mc(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue actions}}t.push(``)}return t}function hc(e,t,n){let r=n?mc(t.actions):[];return k(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},k(`span`,{class:`cm-diagnosticText`},t.renderMessage?t.renderMessage(e):t.message),t.actions?.map((n,i)=>{let a=!1,o=r=>{if(r.preventDefault(),a)return;a=!0;let i=$s(e.state.field(ac).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,c=r[i]?s.indexOf(r[i]):-1,l=c<0?s:[s.slice(0,c),k(`u`,s.slice(c,c+1)),s.slice(c+1)];return k(`button`,{type:`button`,class:`cm-diagnosticAction`+(n.markClass?` `+n.markClass:``),onclick:o,onmousedown:o,"aria-label":` Action: ${s}${c<0?``:` (access key "${r[i]})"`}.`},l)}),t.source&&k(`div`,{class:`cm-diagnosticSource`},t.source))}var gc=class extends le{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return k(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},_c=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=hc(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},vc=class e{constructor(e){this.view=e,this.items=[],this.list=k(`ul`,{tabIndex:0,role:`listbox`,"aria-label":this.view.state.phrase(`Diagnostics`),onkeydown:t=>{if(!(t.ctrlKey||t.altKey||t.metaKey)){if(t.keyCode==27)uc(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:n}=this.items[this.selectedIndex],r=mc(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=$s(this.view.state.field(ac).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}else return;t.preventDefault()}},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=k(`div`,{class:`cm-panel-lint`},this.list,k(`button`,{type:`button`,name:`close`,"aria-label":this.view.state.phrase(`close`),onclick:()=>uc(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(ac).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(ac),n=0,r=!1,i=null,a=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:s})=>{for(let e of s.diagnostics){if(a.has(e))continue;a.add(e);let o=-1,s;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(s=new _c(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute(`aria-selected`)||(s.dom.setAttribute(`aria-selected`,`true`),i=s):s.dom.hasAttribute(`aria-selected`)&&s.dom.removeAttribute(`aria-selected`),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new _c(this.view,{from:-1,to:-1,severity:`info`,message:this.view.state.phrase(`No diagnostics`)})),r=!0),i?(this.list.setAttribute(`aria-activedescendant`,i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute(`aria-activedescendant`),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=$s(this.view.state.field(ac).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:ic.of(t)})}static open(t){return new e(t)}};function yc(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function bc(e){return yc(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,`width="6" height="3"`)}var xc=E.baseTheme({".cm-diagnostic":{padding:`3px 6px 3px 8px`,marginLeft:`-1px`,display:`block`,whiteSpace:`pre-wrap`},".cm-diagnostic-error":{borderLeft:`5px solid #d11`},".cm-diagnostic-warning":{borderLeft:`5px solid orange`},".cm-diagnostic-info":{borderLeft:`5px solid #999`},".cm-diagnostic-hint":{borderLeft:`5px solid #66d`},".cm-diagnosticAction":{font:`inherit`,border:`none`,padding:`2px 4px`,backgroundColor:`#444`,color:`white`,borderRadius:`3px`,marginLeft:`8px`,cursor:`pointer`},".cm-diagnosticSource":{fontSize:`70%`,opacity:.7},".cm-lintRange":{backgroundPosition:`left bottom`,backgroundRepeat:`repeat-x`,paddingBottom:`0.7px`},".cm-lintRange-error":{backgroundImage:bc(`#d11`)},".cm-lintRange-warning":{backgroundImage:bc(`orange`)},".cm-lintRange-info":{backgroundImage:bc(`#999`)},".cm-lintRange-hint":{backgroundImage:bc(`#66d`)},".cm-lintRange-active":{backgroundColor:`#ffdd9980`},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:`relative`,"&:after":{content:`""`,position:`absolute`,bottom:0,left:`-2px`,borderLeft:`3px solid transparent`,borderRight:`3px solid transparent`,borderBottom:`4px solid #d11`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`orange`}},".cm-lintPoint-info":{"&:after":{borderBottomColor:`#999`}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:`#66d`}},".cm-panel.cm-panel-lint":{position:`relative`,"& ul":{maxHeight:`100px`,overflowY:`auto`,"& [aria-selected]":{backgroundColor:`#ddd`,"& u":{textDecoration:`underline`}},"&:focus [aria-selected]":{background_fallback:`#bdf`,backgroundColor:`Highlight`,color_fallback:`white`,color:`HighlightText`},"& u":{textDecoration:`none`},padding:0,margin:0},"& [name=close]":{position:`absolute`,top:`0`,right:`2px`,background:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:`#86714a80`},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:`#2e343e`}}});function Sc(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function Cc(e){let t=`hint`,n=1;for(let r of e){let e=Sc(r.severity);e>n&&(n=e,t=r.severity)}return t}var wc=[ac,E.decorations.compute([ac],e=>{let{selected:t,panel:n}=e.field(ac);return!t||!n||t.from==t.to?j.none:j.set([oc.range(t.from,t.to)])}),Te(sc,{hideOn:ec}),xc],Tc=function(e){e===void 0&&(e={});var{crosshairCursor:t=!1}=e,n=[];e.closeBracketsKeymap!==!1&&(n=n.concat(Pe)),e.defaultKeymap!==!1&&(n=n.concat(zo)),e.searchKeymap!==!1&&(n=n.concat(Us)),e.historyKeymap!==!1&&(n=n.concat(Qi)),e.foldKeymap!==!1&&(n=n.concat(ae)),e.completionKeymap!==!1&&(n=n.concat(Ie)),e.lintKeymap!==!1&&(n=n.concat(dc));var r=[];return e.lineNumbers!==!1&&r.push(me()),e.highlightActiveLineGutter!==!1&&r.push(ye()),e.highlightSpecialChars!==!1&&r.push(fe()),e.history!==!1&&r.push(Fi()),e.foldGutter!==!1&&r.push(pe()),e.drawSelection!==!1&&r.push(l()),e.dropCursor!==!1&&r.push(ge()),e.allowMultipleSelections!==!1&&r.push(oe.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&r.push(te()),e.syntaxHighlighting!==!1&&r.push(C(ve,{fallback:!0})),e.bracketMatching!==!1&&r.push(Ee()),e.closeBrackets!==!1&&r.push(Le()),e.autocompletion!==!1&&r.push(Fe()),e.rectangularSelection!==!1&&r.push(he()),t!==!1&&r.push(re()),e.highlightActiveLine!==!1&&r.push(Oe()),e.highlightSelectionMatches!==!1&&r.push(es()),e.tabSize&&typeof e.tabSize==`number`&&r.push(u.of(` `.repeat(e.tabSize))),r.concat([ke.of(n.flat())]).filter(Boolean)},Ec=`#e5c07b`,Dc=`#e06c75`,Oc=`#56b6c2`,kc=`#ffffff`,Ac=`#abb2bf`,jc=`#7d8799`,Mc=`#61afef`,Nc=`#98c379`,Pc=`#d19a66`,Fc=`#c678dd`,Ic=`#21252b`,Lc=`#2c313a`,Rc=`#282c34`,zc=`#353a42`,Bc=`#3E4451`,Vc=`#528bff`,B=[E.theme({"&":{color:Ac,backgroundColor:Rc},".cm-content":{caretColor:Vc},".cm-cursor, .cm-dropCursor":{borderLeftColor:Vc},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Bc},".cm-panels":{backgroundColor:Ic,color:Ac},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:Rc,color:jc,border:`none`},".cm-activeLineGutter":{backgroundColor:Lc},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:zc},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:zc,borderBottomColor:zc},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Lc,color:Ac}}},{dark:!0}),C(de.define([{tag:w.keyword,color:Fc},{tag:[w.name,w.deleted,w.character,w.propertyName,w.macroName],color:Dc},{tag:[w.function(w.variableName),w.labelName],color:Mc},{tag:[w.color,w.constant(w.name),w.standard(w.name)],color:Pc},{tag:[w.definition(w.name),w.separator],color:Ac},{tag:[w.typeName,w.className,w.number,w.changed,w.annotation,w.modifier,w.self,w.namespace],color:Ec},{tag:[w.operator,w.operatorKeyword,w.url,w.escape,w.regexp,w.link,w.special(w.string)],color:Oc},{tag:[w.meta,w.comment],color:jc},{tag:w.strong,fontWeight:`bold`},{tag:w.emphasis,fontStyle:`italic`},{tag:w.strikethrough,textDecoration:`line-through`},{tag:w.link,color:jc,textDecoration:`underline`},{tag:w.heading,fontWeight:`bold`,color:Dc},{tag:[w.atom,w.bool,w.special(w.variableName)],color:Pc},{tag:[w.processingInstruction,w.string,w.inserted],color:Nc},{tag:w.invalid,color:kc}]))],Hc=E.theme({"&":{backgroundColor:`#fff`}},{dark:!1}),Uc=function(e){e===void 0&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:i=`light`,placeholder:a=``,basicSetup:o=!0}=e,s=[];switch(t&&s.unshift(ke.of([Bo])),o&&(typeof o==`boolean`?s.unshift(Tc()):s.unshift(Tc(o))),a&&s.unshift(je(a)),i){case`light`:s.push(Hc);break;case`dark`:s.push(B);break;case`none`:break;default:s.push(i);break}return n===!1&&s.push(E.editable.of(!1)),r&&s.push(oe.readOnly.of(!0)),[...s]},Wc=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}),Gc=class{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error(`TimeoutLatch callback error:`,e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}},Kc=class{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},qc=null,Jc=()=>typeof window>`u`?new Kc:(qc||=new Kc,qc),Yc=ue.define(),Xc=200,Zc=[];function Qc(e){var{value:t,selection:n,onChange:r,onStatistics:i,onCreateEditor:a,onUpdate:o,extensions:s=Zc,autoFocus:c,theme:l=`light`,height:u=null,minHeight:d=null,maxHeight:f=null,width:p=null,minWidth:m=null,maxWidth:h=null,placeholder:g=``,editable:_=!0,readOnly:v=!1,indentWithTab:y=!0,basicSetup:b=!0,root:x,initialState:S}=e,[ee,te]=(0,P.useState)(),[C,ne]=(0,P.useState)(),[re,w]=(0,P.useState)(),ie=(0,P.useState)(()=>({current:null}))[0],ae=(0,P.useState)(()=>({current:null}))[0],se=E.theme({"&":{height:u,minHeight:d,maxHeight:f,width:p,minWidth:m,maxWidth:h},"& .cm-scroller":{height:`100% !important`}}),ce=[E.updateListener.of(e=>{e.docChanged&&typeof r==`function`&&!e.transactions.some(e=>e.annotation(Yc))&&(ie.current?ie.current.reset():(ie.current=new Gc(()=>{if(ae.current){var e=ae.current;ae.current=null,e()}ie.current=null},Xc),Jc().add(ie.current)),r(e.state.doc.toString(),e)),i&&i(Wc(e))}),se,...Uc({theme:l,editable:_,readOnly:v,placeholder:g,indentWithTab:y,basicSetup:b})];return o&&typeof o==`function`&&ce.push(E.updateListener.of(o)),ce=ce.concat(s),(0,P.useLayoutEffect)(()=>{if(ee&&!re){var e={doc:t,selection:n,extensions:ce},r=S?oe.fromJSON(S.json,e,S.fields):oe.create(e);if(w(r),!C){var i=new E({state:r,parent:ee,root:x});ne(i),a&&a(i,r)}}return()=>{C&&(w(void 0),ne(void 0))}},[ee,re]),(0,P.useEffect)(()=>{e.container&&te(e.container)},[e.container]),(0,P.useEffect)(()=>()=>{C&&(C.destroy(),ne(void 0)),ie.current&&=(ie.current.cancel(),null)},[C]),(0,P.useEffect)(()=>{c&&C&&C.focus()},[c,C]),(0,P.useEffect)(()=>{C&&C.dispatch({effects:Se.reconfigure.of(ce)})},[l,s,u,d,f,p,m,h,g,_,v,y,b,r,o]),(0,P.useEffect)(()=>{if(t!==void 0){var e=C?C.state.doc.toString():``;if(C&&t!==e){var n=ie.current&&!ie.current.isDone,r=()=>{C&&t!==C.state.doc.toString()&&C.dispatch({changes:{from:0,to:C.state.doc.toString().length,insert:t||``},annotations:[Yc.of(!0)]})};n?ae.current=r:r()}}},[t,C]),{state:re,setState:w,view:C,setView:ne,container:ee,setContainer:te}}var $c=[`className`,`value`,`selection`,`extensions`,`onChange`,`onStatistics`,`onCreateEditor`,`onUpdate`,`autoFocus`,`theme`,`height`,`minHeight`,`maxHeight`,`width`,`minWidth`,`maxWidth`,`basicSetup`,`placeholder`,`indentWithTab`,`editable`,`readOnly`,`root`,`initialState`],el=(0,P.forwardRef)((e,t)=>{var{className:n,value:r=``,selection:i,extensions:a=[],onChange:o,onStatistics:s,onCreateEditor:c,onUpdate:l,autoFocus:u,theme:d=`light`,height:f,minHeight:p,maxHeight:m,width:h,minWidth:g,maxWidth:_,basicSetup:v,placeholder:y,indentWithTab:b,editable:x,readOnly:S,root:ee,initialState:te}=e,C=vi(e,$c),ne=(0,P.useRef)(null),{state:re,view:w,container:ie,setContainer:ae}=Qc({root:ee,value:r,autoFocus:u,theme:d,height:f,minHeight:p,maxHeight:m,width:h,minWidth:g,maxWidth:_,basicSetup:v,placeholder:y,indentWithTab:b,editable:x,readOnly:S,selection:i,onChange:o,onStatistics:s,onCreateEditor:c,onUpdate:l,extensions:a,initialState:te});(0,P.useImperativeHandle)(t,()=>({editor:ne.current,state:re,view:w}),[ne,ie,re,w]);var oe=(0,P.useCallback)(e=>{ne.current=e,ae(e)},[ae]);if(typeof r!=`string`)throw Error(`value must be typeof string but got `+typeof r);return(0,F.jsx)(`div`,_i({ref:oe,className:(typeof d==`string`?`cm-theme-`+d:`cm-theme`)+(n?` `+n:``)},C))});el.displayName=`CodeMirror`;function V(e){return new Ae(O.define(e))}function tl(e){return i(()=>import(`./dist-BfBhOPR-.js`).then(t=>t.sql({dialect:t[e]})),[])}var nl=[A.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return i(()=>import(`./dist-B0p3Eyme.js`).then(e=>e.cpp()),[])}}),A.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return i(()=>import(`./dist-B0p3Eyme.js`).then(e=>e.cpp()),[])}}),A.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return tl(`Cassandra`)}}),A.of({name:`CSS`,extensions:[`css`],load(){return i(()=>import(`./dist-BgeY6nvK.js`).then(e=>e.css()),[])}}),A.of({name:`Go`,extensions:[`go`],load(){return i(()=>import(`./dist-DdY6pTJr.js`).then(e=>e.go()),[])}}),A.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return i(()=>import(`./dist-BzDGGxHQ.js`).then(e=>e.html()),[])}}),A.of({name:`Java`,extensions:[`java`],load(){return i(()=>import(`./dist-CT_X3hVT.js`).then(e=>e.java()),[])}}),A.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return i(()=>import(`./dist-D3YKbVi-.js`).then(e=>e.javascript()),[])}}),A.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return i(()=>import(`./dist-DMmpfLVP.js`).then(e=>e.jinja()),[])}}),A.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return i(()=>import(`./dist-BOCcQAyF.js`).then(e=>e.json()),[])}}),A.of({name:`JSX`,extensions:[`jsx`],load(){return i(()=>import(`./dist-D3YKbVi-.js`).then(e=>e.javascript({jsx:!0})),[])}}),A.of({name:`LESS`,extensions:[`less`],load(){return i(()=>import(`./dist-VyP6-HLb.js`).then(e=>e.less()),[])}}),A.of({name:`Liquid`,extensions:[`liquid`],load(){return i(()=>import(`./dist-c98Tp7bP.js`).then(e=>e.liquid()),[])}}),A.of({name:`MariaDB SQL`,load(){return tl(`MariaSQL`)}}),A.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return i(()=>import(`./dist-8zNAQAIa.js`).then(e=>e.markdown()),[])}}),A.of({name:`MS SQL`,load(){return tl(`MSSQL`)}}),A.of({name:`MySQL`,load(){return tl(`MySQL`)}}),A.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return i(()=>import(`./dist-BimBQZx1.js`).then(e=>e.php()),[])}}),A.of({name:`PLSQL`,extensions:[`pls`],load(){return tl(`PLSQL`)}}),A.of({name:`PostgreSQL`,load(){return tl(`PostgreSQL`)}}),A.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return i(()=>import(`./dist-BrOPNxdH.js`).then(e=>e.python()),[])}}),A.of({name:`Rust`,extensions:[`rs`],load(){return i(()=>import(`./dist-84fwQ7bO.js`).then(e=>e.rust()),[])}}),A.of({name:`Sass`,extensions:[`sass`],load(){return i(()=>import(`./dist-4J6YbNXv.js`).then(e=>e.sass({indented:!0})),[])}}),A.of({name:`SCSS`,extensions:[`scss`],load(){return i(()=>import(`./dist-4J6YbNXv.js`).then(e=>e.sass()),[])}}),A.of({name:`SQL`,extensions:[`sql`],load(){return tl(`StandardSQL`)}}),A.of({name:`SQLite`,load(){return tl(`SQLite`)}}),A.of({name:`TSX`,extensions:[`tsx`],load(){return i(()=>import(`./dist-D3YKbVi-.js`).then(e=>e.javascript({jsx:!0,typescript:!0})),[])}}),A.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return i(()=>import(`./dist-D3YKbVi-.js`).then(e=>e.javascript({typescript:!0})),[])}}),A.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return i(()=>import(`./dist-BMiCig3A2.js`).then(e=>e.wast()),[])}}),A.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return i(()=>import(`./dist-DTvxN3ux.js`).then(e=>e.xml()),[])}}),A.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return i(()=>import(`./dist-AloEV3J52.js`).then(e=>e.yaml()),[])}}),A.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return i(()=>import(`./apl-1H3fJ-n9.js`).then(e=>V(e.apl)),[])}}),A.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return i(()=>import(`./asciiarmor-_1f4lqIZ.js`).then(e=>V(e.asciiArmor)),[])}}),A.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return i(()=>import(`./asn1-B_wp1Pdt.js`).then(e=>V(e.asn1({}))),[])}}),A.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return i(()=>import(`./asterisk-9Hxmlnbz.js`).then(e=>V(e.asterisk)),[])}}),A.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return i(()=>import(`./brainfuck-C-PAVNT8.js`).then(e=>V(e.brainfuck)),[])}}),A.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return i(()=>import(`./cobol-CU8lw6mH.js`).then(e=>V(e.cobol)),[])}}),A.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return i(()=>import(`./clike-DAVXDhrz.js`).then(e=>V(e.csharp)),[])}}),A.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return i(()=>import(`./clojure-BIpQu4v4.js`).then(e=>V(e.clojure)),[])}}),A.of({name:`ClojureScript`,extensions:[`cljs`],load(){return i(()=>import(`./clojure-BIpQu4v4.js`).then(e=>V(e.clojure)),[])}}),A.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return i(()=>import(`./css-C9qNtc8P.js`).then(e=>V(e.gss)),[])}}),A.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return i(()=>import(`./cmake-YlOBEvgc.js`).then(e=>V(e.cmake)),[])}}),A.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return i(()=>import(`./coffeescript-DKG8mABL.js`).then(e=>V(e.coffeeScript)),[])}}),A.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return i(()=>import(`./commonlisp-CbWboHR_.js`).then(e=>V(e.commonLisp)),[])}}),A.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return i(()=>import(`./cypher-DglnWVZO.js`).then(e=>V(e.cypher)),[])}}),A.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return i(()=>import(`./python-D9BZyYi1.js`).then(e=>V(e.cython)),[])}}),A.of({name:`Crystal`,extensions:[`cr`],load(){return i(()=>import(`./crystal-WWs3Njra.js`).then(e=>V(e.crystal)),[])}}),A.of({name:`D`,extensions:[`d`],load(){return i(()=>import(`./d-DiNW6jcC.js`).then(e=>V(e.d)),[])}}),A.of({name:`Dart`,extensions:[`dart`],load(){return i(()=>import(`./clike-DAVXDhrz.js`).then(e=>V(e.dart)),[])}}),A.of({name:`diff`,extensions:[`diff`,`patch`],load(){return i(()=>import(`./diff-PxsoX0eK.js`).then(e=>V(e.diff)),[])}}),A.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return i(()=>import(`./dockerfile-zC7EsydA.js`).then(e=>V(e.dockerFile)),[])}}),A.of({name:`DTD`,extensions:[`dtd`],load(){return i(()=>import(`./dtd-BSiaE0hE.js`).then(e=>V(e.dtd)),[])}}),A.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return i(()=>import(`./dylan-GcUJt0a5.js`).then(e=>V(e.dylan)),[])}}),A.of({name:`EBNF`,load(){return i(()=>import(`./ebnf-DSIN9Ycp.js`).then(e=>V(e.ebnf)),[])}}),A.of({name:`ECL`,extensions:[`ecl`],load(){return i(()=>import(`./ecl-LP9l5g0J.js`).then(e=>V(e.ecl)),[])}}),A.of({name:`edn`,extensions:[`edn`],load(){return i(()=>import(`./clojure-BIpQu4v4.js`).then(e=>V(e.clojure)),[])}}),A.of({name:`Eiffel`,extensions:[`e`],load(){return i(()=>import(`./eiffel-CqpH5qaY.js`).then(e=>V(e.eiffel)),[])}}),A.of({name:`Elm`,extensions:[`elm`],load(){return i(()=>import(`./elm-Dw3cJ7hz.js`).then(e=>V(e.elm)),[])}}),A.of({name:`Erlang`,extensions:[`erl`],load(){return i(()=>import(`./erlang-DL9rpJep.js`).then(e=>V(e.erlang)),[])}}),A.of({name:`Esper`,load(){return i(()=>import(`./sql-BaHU6gLz.js`).then(e=>V(e.esper)),[])}}),A.of({name:`Factor`,extensions:[`factor`],load(){return i(()=>import(`./factor-DSufIRGh.js`).then(e=>V(e.factor)),[])}}),A.of({name:`FCL`,load(){return i(()=>import(`./fcl-DUmfTiJ7.js`).then(e=>V(e.fcl)),[])}}),A.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return i(()=>import(`./forth-BSp-YOKj.js`).then(e=>V(e.forth)),[])}}),A.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return i(()=>import(`./fortran-BtIRmo6s.js`).then(e=>V(e.fortran)),[])}}),A.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return i(()=>import(`./mllike-CV8oQtvy.js`).then(e=>V(e.fSharp)),[])}}),A.of({name:`Gas`,extensions:[`s`],load(){return i(()=>import(`./gas-okqIRy8I.js`).then(e=>V(e.gas)),[])}}),A.of({name:`Gherkin`,extensions:[`feature`],load(){return i(()=>import(`./gherkin-DIlSAX9i.js`).then(e=>V(e.gherkin)),[])}}),A.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return i(()=>import(`./groovy-Dn6VQ7le.js`).then(e=>V(e.groovy)),[])}}),A.of({name:`Haskell`,extensions:[`hs`],load(){return i(()=>import(`./haskell-DxXJRRAf.js`).then(e=>V(e.haskell)),[])}}),A.of({name:`Haxe`,extensions:[`hx`],load(){return i(()=>import(`./haxe-Cf0nItU4.js`).then(e=>V(e.haxe)),[])}}),A.of({name:`HXML`,extensions:[`hxml`],load(){return i(()=>import(`./haxe-Cf0nItU4.js`).then(e=>V(e.hxml)),[])}}),A.of({name:`HTTP`,load(){return i(()=>import(`./http-C3zQeWFV.js`).then(e=>V(e.http)),[])}}),A.of({name:`IDL`,extensions:[`pro`],load(){return i(()=>import(`./idl-BvqkcZq5.js`).then(e=>V(e.idl)),[])}}),A.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return i(()=>import(`./javascript-DT-6B2IU.js`).then(e=>V(e.jsonld)),[])}}),A.of({name:`Julia`,extensions:[`jl`],load(){return i(()=>import(`./julia-CCUCEuMJ.js`).then(e=>V(e.julia)),[])}}),A.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return i(()=>import(`./clike-DAVXDhrz.js`).then(e=>V(e.kotlin)),[])}}),A.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return i(()=>import(`./livescript-DJ-6Zja2.js`).then(e=>V(e.liveScript)),[])}}),A.of({name:`Lua`,extensions:[`lua`],load(){return i(()=>import(`./lua-CxE7YJaJ.js`).then(e=>V(e.lua)),[])}}),A.of({name:`mIRC`,extensions:[`mrc`],load(){return i(()=>import(`./mirc-CiJGiXcS.js`).then(e=>V(e.mirc)),[])}}),A.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return i(()=>import(`./mathematica-oNEp3xtK.js`).then(e=>V(e.mathematica)),[])}}),A.of({name:`Modelica`,extensions:[`mo`],load(){return i(()=>import(`./modelica-M4BAagfL.js`).then(e=>V(e.modelica)),[])}}),A.of({name:`MUMPS`,extensions:[`mps`],load(){return i(()=>import(`./mumps-BZoVj2VG.js`).then(e=>V(e.mumps)),[])}}),A.of({name:`Mbox`,extensions:[`mbox`],load(){return i(()=>import(`./mbox-AvjHxuWl.js`).then(e=>V(e.mbox)),[])}}),A.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return i(()=>import(`./nginx-CBycrar_.js`).then(e=>V(e.nginx)),[])}}),A.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return i(()=>import(`./nsis-DLskXEqR.js`).then(e=>V(e.nsis)),[])}}),A.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return i(()=>import(`./ntriples-BzBBWYSl.js`).then(e=>V(e.ntriples)),[])}}),A.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return i(()=>import(`./clike-DAVXDhrz.js`).then(e=>V(e.objectiveC)),[])}}),A.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return i(()=>import(`./clike-DAVXDhrz.js`).then(e=>V(e.objectiveCpp)),[])}}),A.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return i(()=>import(`./mllike-CV8oQtvy.js`).then(e=>V(e.oCaml)),[])}}),A.of({name:`Octave`,extensions:[`m`],load(){return i(()=>import(`./octave-BeIsGSMy.js`).then(e=>V(e.octave)),[])}}),A.of({name:`Oz`,extensions:[`oz`],load(){return i(()=>import(`./oz-DdNR63iD.js`).then(e=>V(e.oz)),[])}}),A.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return i(()=>import(`./pascal-BvmM4Y7z.js`).then(e=>V(e.pascal)),[])}}),A.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return i(()=>import(`./perl-DFibaVbf.js`).then(e=>V(e.perl)),[])}}),A.of({name:`Pig`,extensions:[`pig`],load(){return i(()=>import(`./pig-DyLcrln-.js`).then(e=>V(e.pig)),[])}}),A.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return i(()=>import(`./powershell-CDOpEwhN.js`).then(e=>V(e.powerShell)),[])}}),A.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return i(()=>import(`./properties-Ju2yMwi3.js`).then(e=>V(e.properties)),[])}}),A.of({name:`ProtoBuf`,extensions:[`proto`],load(){return i(()=>import(`./protobuf-CfKx2SfO.js`).then(e=>V(e.protobuf)),[])}}),A.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return i(()=>import(`./pug-B2rz0Rz1.js`).then(e=>V(e.pug)),[])}}),A.of({name:`Puppet`,extensions:[`pp`],load(){return i(()=>import(`./puppet-dmjzqANu.js`).then(e=>V(e.puppet)),[])}}),A.of({name:`Q`,extensions:[`q`],load(){return i(()=>import(`./q-C68SC4ma.js`).then(e=>V(e.q)),[])}}),A.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return i(()=>import(`./r-DP6KYC7N.js`).then(e=>V(e.r)),[])}}),A.of({name:`RPM Changes`,load(){return i(()=>import(`./rpm-DH2Z4z_v.js`).then(e=>V(e.rpmChanges)),[])}}),A.of({name:`RPM Spec`,extensions:[`spec`],load(){return i(()=>import(`./rpm-DH2Z4z_v.js`).then(e=>V(e.rpmSpec)),[])}}),A.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return i(()=>import(`./ruby-CwiqsW2a.js`).then(e=>V(e.ruby)),[])}}),A.of({name:`SAS`,extensions:[`sas`],load(){return i(()=>import(`./sas-Btq5K1IU.js`).then(e=>V(e.sas)),[])}}),A.of({name:`Scala`,extensions:[`scala`],load(){return i(()=>import(`./clike-DAVXDhrz.js`).then(e=>V(e.scala)),[])}}),A.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return i(()=>import(`./scheme-BvG_RNGf.js`).then(e=>V(e.scheme)),[])}}),A.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return i(()=>import(`./shell-waWIPbLL.js`).then(e=>V(e.shell)),[])}}),A.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return i(()=>import(`./sieve-wIycBENd.js`).then(e=>V(e.sieve)),[])}}),A.of({name:`Smalltalk`,extensions:[`st`],load(){return i(()=>import(`./smalltalk-SHoYQOtw.js`).then(e=>V(e.smalltalk)),[])}}),A.of({name:`Solr`,load(){return i(()=>import(`./solr-D1Apesak.js`).then(e=>V(e.solr)),[])}}),A.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return i(()=>import(`./mllike-CV8oQtvy.js`).then(e=>V(e.sml)),[])}}),A.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return i(()=>import(`./sparql-BJozOrmN.js`).then(e=>V(e.sparql)),[])}}),A.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return i(()=>import(`./spreadsheet-71jLW2fq.js`).then(e=>V(e.spreadsheet)),[])}}),A.of({name:`Squirrel`,extensions:[`nut`],load(){return i(()=>import(`./clike-DAVXDhrz.js`).then(e=>V(e.squirrel)),[])}}),A.of({name:`Stylus`,extensions:[`styl`],load(){return i(()=>import(`./stylus-Cqweyusm.js`).then(e=>V(e.stylus)),[])}}),A.of({name:`Swift`,extensions:[`swift`],load(){return i(()=>import(`./swift-Dx3m4XfV.js`).then(e=>V(e.swift)),[])}}),A.of({name:`sTeX`,load(){return i(()=>import(`./stex-BuVGLRtt.js`).then(e=>V(e.stex)),[])}}),A.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return i(()=>import(`./stex-BuVGLRtt.js`).then(e=>V(e.stex)),[])}}),A.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return i(()=>import(`./verilog-DSfhYFaT.js`).then(e=>V(e.verilog)),[])}}),A.of({name:`Tcl`,extensions:[`tcl`],load(){return i(()=>import(`./tcl-5yXjCZ8e.js`).then(e=>V(e.tcl)),[])}}),A.of({name:`Textile`,extensions:[`textile`],load(){return i(()=>import(`./textile-9HVfsYV6.js`).then(e=>V(e.textile)),[])}}),A.of({name:`TiddlyWiki`,load(){return i(()=>import(`./tiddlywiki-DlSf8L__.js`).then(e=>V(e.tiddlyWiki)),[])}}),A.of({name:`Tiki wiki`,load(){return i(()=>import(`./tiki-CDZRH0A4.js`).then(e=>V(e.tiki)),[])}}),A.of({name:`TOML`,extensions:[`toml`],load(){return i(()=>import(`./toml-BgjfE0Y7.js`).then(e=>V(e.toml)),[])}}),A.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return i(()=>import(`./troff-B4ZrJIrZ.js`).then(e=>V(e.troff)),[])}}),A.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return i(()=>import(`./ttcn-BJIiaYhP.js`).then(e=>V(e.ttcn)),[])}}),A.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return i(()=>import(`./ttcn-cfg-PZp_QKQg.js`).then(e=>V(e.ttcnCfg)),[])}}),A.of({name:`Turtle`,extensions:[`ttl`],load(){return i(()=>import(`./turtle--ft5y7IN.js`).then(e=>V(e.turtle)),[])}}),A.of({name:`Web IDL`,extensions:[`webidl`],load(){return i(()=>import(`./webidl-C-IpKmuN.js`).then(e=>V(e.webIDL)),[])}}),A.of({name:`VB.NET`,extensions:[`vb`],load(){return i(()=>import(`./vb-DL6cecZs.js`).then(e=>V(e.vb)),[])}}),A.of({name:`VBScript`,extensions:[`vbs`],load(){return i(()=>import(`./vbscript-Bb1xiv7E.js`).then(e=>V(e.vbScript)),[])}}),A.of({name:`Velocity`,extensions:[`vtl`],load(){return i(()=>import(`./velocity-DKS9ZfbJ.js`).then(e=>V(e.velocity)),[])}}),A.of({name:`Verilog`,extensions:[`v`],load(){return i(()=>import(`./verilog-DSfhYFaT.js`).then(e=>V(e.verilog)),[])}}),A.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return i(()=>import(`./vhdl-CFTSUmh9.js`).then(e=>V(e.vhdl)),[])}}),A.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return i(()=>import(`./xquery-9pXYEith.js`).then(e=>V(e.xQuery)),[])}}),A.of({name:`Yacas`,extensions:[`ys`],load(){return i(()=>import(`./yacas-CqSYoSTv.js`).then(e=>V(e.yacas)),[])}}),A.of({name:`Z80`,extensions:[`z80`],load(){return i(()=>import(`./z80-BltHQfm4.js`).then(e=>V(e.z80)),[])}}),A.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return i(()=>import(`./mscgen-3QXoaqEl.js`).then(e=>V(e.mscgen)),[])}}),A.of({name:`Xù`,extensions:[`xu`],load(){return i(()=>import(`./mscgen-3QXoaqEl.js`).then(e=>V(e.xu)),[])}}),A.of({name:`MsGenny`,extensions:[`msgenny`],load(){return i(()=>import(`./mscgen-3QXoaqEl.js`).then(e=>V(e.msgenny)),[])}}),A.of({name:`Vue`,extensions:[`vue`],load(){return i(()=>import(`./dist-DUjXiMLP.js`).then(e=>e.vue()),[])}}),A.of({name:`Angular Template`,load(){return i(()=>import(`./dist-BW1409rz.js`).then(e=>e.angular()),[])}})],rl=E.theme({"&":{height:`100%`,color:`var(--text-primary)`,backgroundColor:`var(--canvas-deep)`},".cm-editor":{height:`100%`,color:`var(--text-primary)`,backgroundColor:`var(--canvas-deep)`},".cm-scroller":{fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,backgroundColor:`var(--canvas-deep)`},".cm-content":{caretColor:`var(--text-primary)`},".cm-gutters":{color:`var(--text-tertiary, var(--text-secondary))`,backgroundColor:`var(--canvas-deep)`,borderRight:`1px solid var(--border-subtle)`},".cm-activeLine":{backgroundColor:`var(--canvas-soft)`},".cm-activeLineGutter":{color:`var(--text-primary)`,backgroundColor:`var(--canvas-soft)`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--text-primary)`},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, ::selection":{backgroundColor:`var(--selection-bg)`},"&.cm-focused":{outline:`1px solid var(--border-strong)`},".cm-line":{color:`var(--text-primary)`},".cm-panels":{color:`var(--text-primary)`,backgroundColor:`var(--bg-panel)`,borderColor:`var(--border-subtle)`},".cm-tooltip":{color:`var(--text-primary)`,backgroundColor:`var(--bg-panel)`,border:`1px solid var(--border-subtle)`},".cm-matchingBracket, .cm-nonmatchingBracket":{outline:`1px solid var(--accent)`,backgroundColor:`var(--accent-soft)`},".cm-rich-widget":{color:`var(--text-primary)`,backgroundColor:`var(--canvas-soft)`,border:`1px solid var(--border-subtle)`,borderRadius:`6px`},".cm-rich-block":{display:`block`,margin:`6px 0`,padding:`8px 10px`,overflowX:`auto`},".cm-rich-inline":{display:`inline-flex`,alignItems:`center`,maxWidth:`100%`,padding:`0 4px`,verticalAlign:`baseline`},".cm-rich-source-muted":{color:`var(--text-tertiary, var(--text-secondary))`},".cm-rich-widget-error":{color:`var(--danger-strong, var(--text-primary))`,borderColor:`var(--danger-strong, var(--border-subtle))`}},{dark:!0}),il=C(de.define([{tag:w.heading,color:`var(--text-primary)`,fontWeight:`650`},{tag:[w.strong,w.emphasis],color:`var(--text-primary)`},{tag:w.link,color:`var(--accent-strong, var(--accent))`,textDecoration:`underline`},{tag:w.url,color:`var(--accent-strong, var(--accent))`},{tag:[w.keyword,w.atom,w.bool],color:`var(--accent-strong, var(--accent))`},{tag:[w.string,w.special(w.string)],color:`var(--success-strong, var(--text-primary))`},{tag:[w.comment,w.quote],color:`var(--text-tertiary, var(--text-secondary))`},{tag:[w.number,w.integer,w.float],color:`var(--warning-strong, var(--text-primary))`},{tag:[w.variableName,w.propertyName],color:`var(--text-primary)`},{tag:[w.definition(w.variableName),w.function(w.variableName)],color:`var(--accent)`},{tag:[w.punctuation,w.bracket],color:`var(--text-secondary)`},{tag:w.invalid,color:`var(--danger-strong, var(--text-primary))`}]));function al(e,t=e){return n=>{let{state:r}=n,i=!1,a=r.changeByRange(n=>{i=!0;let a=r.sliceDoc(n.from,n.to),o=`${e}${a}${t}`,s=n.from+e.length,c=s+a.length;return{changes:{from:n.from,to:n.to,insert:o},range:n.empty?N.cursor(s):N.range(s,c)}});return i?(n.dispatch(a),!0):!1}}var ol=[{key:`Mod-b`,run:al(`**`),preventDefault:!0},{key:`Mod-i`,run:al(`*`),preventDefault:!0},{key:`Mod-e`,run:al("`"),preventDefault:!0},{key:`Mod-k`,run:e=>{let{state:t}=e,n=!1,r=t.changeByRange(e=>{n=!0;let r=t.sliceDoc(e.from,e.to);if(e.empty)return{changes:{from:e.from,insert:`[](url)`},range:N.cursor(e.from+1)};let i=`[${r}](url)`,a=e.from+1+r.length+2,o=a+3;return{changes:{from:e.from,to:e.to,insert:i},range:N.range(a,o)}});return n?(e.dispatch(r),!0):!1},preventDefault:!0}];function sl(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function cl(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var ll=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ul=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dl={};function fl(e,t){return((t||dl).jsx?ul:ll).test(e)}var pl=/[ \t\n\f\r]/g;function ml(e){return typeof e==`object`?e.type===`text`?hl(e.value):!1:hl(e)}function hl(e){return e.replace(pl,``)===``}var gl=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};gl.prototype.normal={},gl.prototype.property={},gl.prototype.space=void 0;function _l(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new gl(n,r,t)}function vl(e){return e.toLowerCase()}var H=class{constructor(e,t){this.attribute=t,this.property=e}};H.prototype.attribute=``,H.prototype.booleanish=!1,H.prototype.boolean=!1,H.prototype.commaOrSpaceSeparated=!1,H.prototype.commaSeparated=!1,H.prototype.defined=!1,H.prototype.mustUseProperty=!1,H.prototype.number=!1,H.prototype.overloadedBoolean=!1,H.prototype.property=``,H.prototype.spaceSeparated=!1,H.prototype.space=void 0;var yl=t({boolean:()=>U,booleanish:()=>xl,commaOrSpaceSeparated:()=>wl,commaSeparated:()=>Cl,number:()=>W,overloadedBoolean:()=>Sl,spaceSeparated:()=>G}),bl=0,U=Tl(),xl=Tl(),Sl=Tl(),W=Tl(),G=Tl(),Cl=Tl(),wl=Tl();function Tl(){return 2**++bl}var El=Object.keys(yl),Dl=class extends H{constructor(e,t,n,r){let i=-1;if(super(e,t),Ol(this,`space`,r),typeof n==`number`)for(;++i<El.length;){let e=El[i];Ol(this,El[i],(n&yl[e])===yl[e])}}};Dl.prototype.defined=!0;function Ol(e,t,n){n&&(e[t]=n)}function kl(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new Dl(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[vl(r)]=r,n[vl(a.attribute)]=r}return new gl(t,n,e.space)}var Al=kl({properties:{ariaActiveDescendant:null,ariaAtomic:xl,ariaAutoComplete:null,ariaBusy:xl,ariaChecked:xl,ariaColCount:W,ariaColIndex:W,ariaColSpan:W,ariaControls:G,ariaCurrent:null,ariaDescribedBy:G,ariaDetails:null,ariaDisabled:xl,ariaDropEffect:G,ariaErrorMessage:null,ariaExpanded:xl,ariaFlowTo:G,ariaGrabbed:xl,ariaHasPopup:null,ariaHidden:xl,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:G,ariaLevel:W,ariaLive:null,ariaModal:xl,ariaMultiLine:xl,ariaMultiSelectable:xl,ariaOrientation:null,ariaOwns:G,ariaPlaceholder:null,ariaPosInSet:W,ariaPressed:xl,ariaReadOnly:xl,ariaRelevant:null,ariaRequired:xl,ariaRoleDescription:G,ariaRowCount:W,ariaRowIndex:W,ariaRowSpan:W,ariaSelected:xl,ariaSetSize:W,ariaSort:null,ariaValueMax:W,ariaValueMin:W,ariaValueNow:W,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function jl(e,t){return t in e?e[t]:t}function Ml(e,t){return jl(e,t.toLowerCase())}var Nl=kl({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Cl,acceptCharset:G,accessKey:G,action:null,allow:null,allowFullScreen:U,allowPaymentRequest:U,allowUserMedia:U,alt:null,as:null,async:U,autoCapitalize:null,autoComplete:G,autoFocus:U,autoPlay:U,blocking:G,capture:null,charSet:null,checked:U,cite:null,className:G,cols:W,colSpan:null,content:null,contentEditable:xl,controls:U,controlsList:G,coords:W|Cl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:U,defer:U,dir:null,dirName:null,disabled:U,download:Sl,draggable:xl,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:U,formTarget:null,headers:G,height:W,hidden:Sl,high:W,href:null,hrefLang:null,htmlFor:G,httpEquiv:G,id:null,imageSizes:null,imageSrcSet:null,inert:U,inputMode:null,integrity:null,is:null,isMap:U,itemId:null,itemProp:G,itemRef:G,itemScope:U,itemType:G,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:U,low:W,manifest:null,max:null,maxLength:W,media:null,method:null,min:null,minLength:W,multiple:U,muted:U,name:null,nonce:null,noModule:U,noValidate:U,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:U,optimum:W,pattern:null,ping:G,placeholder:null,playsInline:U,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:U,referrerPolicy:null,rel:G,required:U,reversed:U,rows:W,rowSpan:W,sandbox:G,scope:null,scoped:U,seamless:U,selected:U,shadowRootClonable:U,shadowRootDelegatesFocus:U,shadowRootMode:null,shape:null,size:W,sizes:null,slot:null,span:W,spellCheck:xl,src:null,srcDoc:null,srcLang:null,srcSet:null,start:W,step:null,style:null,tabIndex:W,target:null,title:null,translate:null,type:null,typeMustMatch:U,useMap:null,value:xl,width:W,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:G,axis:null,background:null,bgColor:null,border:W,borderColor:null,bottomMargin:W,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:U,declare:U,event:null,face:null,frame:null,frameBorder:null,hSpace:W,leftMargin:W,link:null,longDesc:null,lowSrc:null,marginHeight:W,marginWidth:W,noResize:U,noHref:U,noShade:U,noWrap:U,object:null,profile:null,prompt:null,rev:null,rightMargin:W,rules:null,scheme:null,scrolling:xl,standby:null,summary:null,text:null,topMargin:W,valueType:null,version:null,vAlign:null,vLink:null,vSpace:W,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:U,disableRemotePlayback:U,prefix:null,property:null,results:W,security:null,unselectable:null},space:`html`,transform:Ml}),Pl=kl({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,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`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,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`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,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`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:wl,accentHeight:W,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:W,amplitude:W,arabicForm:null,ascent:W,attributeName:null,attributeType:null,azimuth:W,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:W,by:null,calcMode:null,capHeight:W,className:G,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:W,diffuseConstant:W,direction:null,display:null,dur:null,divisor:W,dominantBaseline:null,download:U,dx:null,dy:null,edgeMode:null,editable:null,elevation:W,enableBackground:null,end:null,event:null,exponent:W,externalResourcesRequired:null,fill:null,fillOpacity:W,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Cl,g2:Cl,glyphName:Cl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:W,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:W,horizOriginX:W,horizOriginY:W,id:null,ideographic:W,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:W,k:W,k1:W,k2:W,k3:W,k4:W,kernelMatrix:wl,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:W,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:W,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:W,overlineThickness:W,paintOrder:null,panose1:null,path:null,pathLength:W,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:G,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:W,pointsAtY:W,pointsAtZ:W,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:wl,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:wl,rev:wl,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:wl,requiredFeatures:wl,requiredFonts:wl,requiredFormats:wl,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:W,specularExponent:W,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:W,strikethroughThickness:W,string:null,stroke:null,strokeDashArray:wl,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:W,strokeOpacity:W,strokeWidth:null,style:null,surfaceScale:W,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:wl,tabIndex:W,tableValues:null,target:null,targetX:W,targetY:W,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:wl,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:W,underlineThickness:W,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:W,values:null,vAlphabetic:W,vMathematical:W,vectorEffect:null,vHanging:W,vIdeographic:W,version:null,vertAdvY:W,vertOriginX:W,vertOriginY:W,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:W,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:jl}),Fl=kl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),Il=kl({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:Ml}),Ll=kl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),Rl={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},K=/[A-Z]/g,q=/-[a-z]/g,J=/^data[-\w.:]+$/i;function Y(e,t){let n=vl(t),r=t,i=H;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&J.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(q,zl);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!q.test(e)){let n=e.replace(K,X);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Dl}return new i(r,t)}function X(e){return`-`+e.toLowerCase()}function zl(e){return e.charAt(1).toUpperCase()}var Bl=_l([Al,Nl,Fl,Il,Ll],`html`),Vl=_l([Al,Pl,Fl,Il,Ll],`svg`);function Hl(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function Ul(e){return e.join(` `).trim()}var Wl=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
13
- `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),ee(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function ee(){S(i)}function te(e){var t;for(e||=[];t=C();)t!==!1&&e.push(t);return e}function C(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function ne(){var e=y(),t=S(a);if(t){if(C(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function re(){var e=[];te(e);for(var t;t=ne();)t!==!1&&(e.push(t),te(e));return e}return ee(),re()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Gl=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Wl());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Kl=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),ql=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Gl()),r=Kl();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Jl=Xl(`end`),Yl=Xl(`start`);function Xl(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Zl(e){let t=Yl(e),n=Jl(e);if(t&&n)return{start:t,end:n}}var Ql=e(ql(),1),$l={}.hasOwnProperty,eu=new Map,tu=/[A-Z]/g,nu=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),ru=new Set([`td`,`th`]),iu=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function au(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=gu(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=hu(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Vl:Bl,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=ou(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function ou(e,t,n){if(t.type===`element`)return su(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return cu(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return uu(e,t,n);if(t.type===`mdxjsEsm`)return lu(e,t);if(t.type===`root`)return du(e,t,n);if(t.type===`text`)return fu(e,t)}function su(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Vl,e.schema=i),e.ancestors.push(t);let a=Su(e,t.tagName,!1),o=_u(e,t),s=yu(e,t);return nu.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!ml(e):!0})),pu(e,o,a,t),mu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function cu(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Cu(e,t.position)}function lu(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Cu(e,t.position)}function uu(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Vl,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:Su(e,t.name,!0),o=vu(e,t),s=yu(e,t);return pu(e,o,a,t),mu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function du(e,t,n){let r={};return mu(r,yu(e,t)),e.create(t,e.Fragment,r,n)}function fu(e,t){return t.value}function pu(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function mu(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function hu(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function gu(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Yl(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function _u(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&$l.call(t.properties,i)){let a=bu(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&ru.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function vu(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Cu(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Cu(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function yu(e,t){let n=[],r=-1,i=e.passKeys?new Map:eu;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=ou(e,a,o);s!==void 0&&n.push(s)}return n}function bu(e,t,n){let r=Y(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?cl(n):Ul(n)),r.property===`style`){let t=typeof n==`object`?n:xu(e,String(n));return e.stylePropertyNameCase===`css`&&(t=wu(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?Rl[r.property]||r.property:r.attribute,n]}}function xu(e,t){try{return(0,Ql.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new ze("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=iu+`#cannot-parse-style-attribute`,r}}function Su(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=fl(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=fl(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return $l.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);Cu(e)}function Cu(e,t){let n=new ze("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=iu+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function wu(e){let t={},n;for(n in e)$l.call(e,n)&&(t[Tu(n)]=e[n]);return t}function Tu(e){let t=e.replace(tu,Eu);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Eu(e){return`-`+e.toLowerCase()}var Du={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]};function Ou(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Be(e.charCodeAt(n+1))&&Be(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function ku(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Au(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
14
- `}]}function ju(e,t){let n=t.value?t.value+`
15
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Mu(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nu(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pu(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=Ou(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Fu(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Iu(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Lu(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Ru(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Lu(e,t);let i={src:Ou(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function zu(e,t){let n={src:Ou(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Bu(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Vu(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Lu(e,t);let i={href:Ou(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Hu(e,t){let n={href:Ou(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Uu(e,t,n){let r=e.all(t),i=n?Wu(n):Z(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
16
- `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
17
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Wu(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Z(n[r])}return t}function Z(e){return e.spread??e.children.length>1}function Gu(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Ku(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qu(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ju(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yu(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Yl(t.children[1]),o=Jl(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Xu(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Zu(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Qu=9,$u=32;function ed(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(td(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(td(t.slice(i),i>0,!1)),a.join(``)}function td(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Qu||t===$u;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Qu||t===$u;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function nd(e,t){let n={type:`text`,value:ed(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function rd(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var id={blockquote:ku,break:Au,code:ju,delete:Mu,emphasis:Nu,footnoteReference:Pu,heading:Fu,html:Iu,imageReference:Ru,image:zu,inlineCode:Bu,linkReference:Vu,link:Hu,listItem:Uu,list:Gu,paragraph:Ku,root:qu,strong:Ju,table:Yu,tableCell:Zu,tableRow:Xu,text:nd,thematicBreak:rd,toml:ad,yaml:ad,definition:ad,footnoteDefinition:ad};function ad(){}var od=typeof self==`object`?self:globalThis,sd=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new od[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new od[a](o),i)};return r},cd=e=>sd(new Map,e)(0),ld=``,{toString:ud}={},{keys:dd}=Object,fd=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=ud.call(e).slice(8,-1);switch(n){case`Array`:return[1,ld];case`Object`:return[2,ld];case`Date`:return[3,ld];case`RegExp`:return[4,ld];case`Map`:return[5,ld];case`Set`:return[6,ld];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},pd=([e,t])=>e===0&&(t===`function`||t===`symbol`),md=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=fd(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of dd(r))(e||!pd(fd(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(pd(fd(n))||pd(fd(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!pd(fd(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},hd=(e,{json:t,lossy:n}={})=>{let r=[];return md(!(t||n),!!t,new Map,r)(e),r},gd=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?cd(hd(e,t)):structuredClone(e):(e,t)=>cd(hd(e,t));function _d(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function vd(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function yd(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||_d,r=e.options.footnoteBackLabel||vd,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=Ou(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...gd(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
18
- `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
19
- `}]}}var Q={}.hasOwnProperty,bd={};function xd(e,t){let n=t||bd,r=new Map,i=new Map,a={all:s,applyData:Cd,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...id,...n.handlers},one:o,options:n,patch:Sd,wrap:Td};return Ge(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Q.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=gd(n);return r.children=a.all(e),r}return gd(e)}return(a.options.unknownHandler||wd)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Ed(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Ed(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Sd(e,t){e.position&&(t.position=Zl(e))}function Cd(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,gd(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function wd(e,t){let n=t.data||{},r=`value`in t&&!(Q.call(n,`hProperties`)||Q.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Td(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
20
- `});++r<e.length;)r&&n.push({type:`text`,value:`
21
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
22
- `}),n}function Ed(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Dd(e,t){let n=xd(e,t),r=n.one(e,void 0),i=yd(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
23
- `},i)),a}function Od(e,t){return e&&`run`in e?async function(n,r){let i=Dd(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Dd(n,{file:r,...e||t})}}var kd=[],Ad={allowDangerousHtml:!0},jd=/^(https?|ircs?|mailto|xmpp)$/i,Md=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function $(e){let t=Nd(e),n=Pd(e);return Fd(t.runSync(t.parse(n),n),e)}function Nd(e){let t=e.rehypePlugins||kd,n=e.remarkPlugins||kd,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Ad}:Ad;return Je().use(Ue).use(n).use(Od,r).use(t)}function Pd(e){let t=e.children||``,n=new Ke;return typeof t==`string`?n.value=t:``+t,n}function Fd(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Id;for(let e of Md)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Ge(e,l),au(e,{Fragment:F.Fragment,components:i,ignoreInvalidStyle:!0,jsx:F.jsx,jsxs:F.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Du)if(Object.hasOwn(Du,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Du[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Id(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||jd.test(e.slice(0,t))?e:``}var Ld=/[#.]/g;function Rd(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){Ld.lastIndex=i;let e=Ld.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function zd(e,t,n){let r=n?Gd(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=Rd(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,Bd(i))a.unshift(i);else for(let[t,n]of Object.entries(i))Vd(e,o.properties,t,n)}for(let e of a)Hd(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function Bd(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function Vd(e,t,n,r){let i=Y(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?Hl(r):i.commaSeparated?sl(r):i.commaOrSpaceSeparated?Hl(sl(r).join(` `)):Ud(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Wd(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Ud(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function Hd(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)Hd(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?Hd(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Ud(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||vl(n)===vl(t)))return!0}return n}function Wd(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function Gd(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Kd=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),qd=zd(Bl,`div`),Jd=zd(Vl,`g`,Kd),Yd={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Xd(e,t){return Zd(e,t||{})||{type:`root`,children:[]}}function Zd(e,t){let n=Qd(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function Qd(e,t){switch(e.nodeType){case 1:return rf(e,t);case 3:return tf(e);case 8:return nf(e);case 9:return $d(e,t);case 10:return ef();case 11:return $d(e,t);default:return}}function $d(e,t){return{type:`root`,children:af(e,t)}}function ef(){return{type:`doctype`}}function tf(e){return{type:`text`,value:e.nodeValue||``}}function nf(e){return{type:`comment`,value:e.nodeValue||``}}function rf(e,t){let n=e.namespaceURI,r=n===Yd.svg?Jd:qd,i=n===Yd.html?e.tagName.toLowerCase():e.tagName,a=n===Yd.html&&i===`template`?e.content:e,o=e.getAttributeNames(),s={},c=-1;for(;++c<o.length;)s[o[c]]=e.getAttribute(o[c])||``;return r(i,s,af(a,t))}function af(e,t){let n=e.childNodes,r=[],i=-1;for(;++i<n.length;){let e=Zd(n[i],t);e!==void 0&&r.push(e)}return r}var of=new DOMParser;function sf(e,t){return Xd(t?.fragment?cf(e):of.parseFromString(e,`text/html`))}function cf(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var lf=(function(e,t,n){let r=tt(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),uf=(function(e){if(e==null)return mf;if(typeof e==`string`)return ff(e);if(typeof e==`object`)return df(e);if(typeof e==`function`)return pf(e);throw Error("Expected function, string, or array as `test`")});function df(e){let t=[],n=-1;for(;++n<e.length;)t[n]=uf(e[n]);return pf(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function ff(e){return pf(t);function t(t){return t.tagName===e}}function pf(e){return t;function t(t,n,r){return!!(hf(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function mf(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function hf(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var gf=/\n/g,_f=/[\t ]+/g,vf=uf(`br`),yf=uf(Mf),bf=uf(`p`),xf=uf(`tr`),Sf=uf([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,jf,Nf]),Cf=uf(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function wf(e,t){let n=t||{},r=`children`in e?e.children:[],i=Cf(e),a=Af(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...Df(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...Tf(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?vf(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
24
- `.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function Tf(e,t,n){return e.type===`element`?Ef(e,t,n):e.type===`text`?n.whitespace===`normal`?Df(e,n):Of(e):[]}function Ef(e,t,n){let r=Af(e,n),i=e.children||[],a=-1,o=[];if(Sf(e))return o;let s,c;for(vf(e)||xf(e)&&lf(t,e,xf)?c=`
25
- `:bf(e)?(s=2,c=2):Cf(e)&&(s=1,c=1);++a<i.length;)o=o.concat(Tf(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?vf(i[a+1]):c}));return yf(e)&&lf(t,e,yf)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function Df(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){gf.lastIndex=a;let e=gf.exec(n),i=e&&`index`in e?e.index:n.length;r.push(kf(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function Of(e){return[String(e.value)]}function kf(e,t,n){let r=[],i=0,a;for(;i<e.length;){_f.lastIndex=i;let n=_f.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function Af(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function jf(e){return!!(e.properties||{}).hidden}function Mf(e){return e.tagName===`td`||e.tagName===`th`}function Nf(e){return e.tagName===`dialog`&&!(e.properties||{}).open}var Pf={},Ff=[];function If(e){let t=e||Pf;return function(e,n){et(e,`element`,function(e,i){let a=Array.isArray(e.properties.className)?e.properties.className:Ff,o=a.includes(`language-math`),s=a.includes(`math-display`),c=a.includes(`math-inline`),l=s;if(!o&&!s&&!c)return;let u=i[i.length-1],d=e;if(e.tagName===`code`&&o&&u&&u.type===`element`&&u.tagName===`pre`&&(d=u,u=i[i.length-2],l=!0),!u)return;let f=wf(d,{whitespace:`pre`}),p;try{p=r.renderToString(f,{...t,displayMode:l,throwOnError:!0})}catch(a){let o=a,s=o.name.toLowerCase();n.message(`Could not render math with KaTeX`,{ancestors:[...i,e],cause:o,place:e.position,ruleId:s,source:`rehype-katex`});try{p=r.renderToString(f,{...t,displayMode:l,strict:`ignore`,throwOnError:!1})}catch{p=[{type:`element`,tagName:`span`,properties:{className:[`katex-error`],style:`color:`+(t.errorColor||`#cc0000`),title:String(a)},children:[{type:`text`,value:f}]}]}}typeof p==`string`&&(p=sf(p,{fragment:!0}).children);let m=u.children.indexOf(d);return u.children.splice(m,1,...p),Ve})}}var Lf={}.hasOwnProperty;function Rf(e,t){let n={type:`root`,children:[]},r=zf({schema:t?{...Ze,...t}:Ze,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function zf(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return Bf(e,n);case`doctype`:return Vf(e,n);case`element`:return Hf(e,n);case`root`:return Uf(e,n);case`text`:return Wf(e,n);default:}}}function Bf(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return Zf(r,t),r}}function Vf(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return Zf(e,t),e}}function Hf(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Gf(e,t.children),i=Kf(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Lf.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return Zf(o,t),o}function Uf(e,t){let n={type:`root`,children:Gf(e,t.children)};return Zf(n,t),n}function Wf(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return Zf(n,t),n}function Gf(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=zf(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function Kf(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&Lf.call(r,n)?r[n]:void 0,o=r&&Lf.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(Lf.call(s,l)){let t=s[l],n=qf(e,Qf(a,l),l,t);n??=qf(e,Qf(o,l),l,t),n!=null&&(c[l]=n)}if(i&&Lf.call(i,n)){let e=i[n];for(l in e)Lf.call(e,l)&&!Lf.call(c,l)&&(c[l]=e[l])}return c}function qf(e,t,n,r){return t?Array.isArray(r)?Jf(e,t,n,r):Yf(e,t,n,r):void 0}function Jf(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=Yf(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function Yf(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&Xf(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Xf(e,t,n){let r=e.schema.protocols&&Lf.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function Zf(e,t){let n=Zl(t);t.data&&(e.data=gd(t.data)),n&&(e.position=n)}function Qf(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function $f(e){return function(t){return Rf(t,e)}}function ep(e){We(e,[/\r?\n|\r/g,tp])}function tp(){return{type:`break`}}function np(){return function(e){ep(e)}}var rp=at();function ip(e){let[t,n]=(0,P.useState)(!1),r=qe(e.code,e.language),i=r.language||`text`;async function a(){try{await navigator.clipboard.writeText(e.code),n(!0),window.setTimeout(()=>n(!1),1200)}catch(e){console.error(`[notes:code-copy]`,e)}}return(0,F.jsxs)(`div`,{className:`notes-code-block`,children:[(0,F.jsx)(`div`,{className:`notes-code-header`,children:(0,F.jsx)(`button`,{type:`button`,onClick:()=>void a(),children:t?`Copied`:i})}),(0,F.jsx)(`pre`,{children:(0,F.jsx)(`code`,{className:`hljs language-${i}`,"data-highlighted":r.highlighted?`yes`:`no`,dangerouslySetInnerHTML:{__html:r.html}})})]})}var ap=null;async function op(){if(!ap){let e=(await i(()=>import(`./mermaid.core-D0tXHgVC.js`),__vite__mapDeps([0]))).default;e.initialize({startOnLoad:!1,securityLevel:`strict`}),ap=e}return ap}function sp(e){let t=(0,P.useId)().replace(/[^a-zA-Z0-9_-]/g,``),[n,r]=(0,P.useState)({status:`loading`});return(0,P.useEffect)(()=>{let n=!1;async function i(){r({status:`loading`});try{let{svg:i}=await(await op()).render(`notes-mermaid-${t}`,e.code);n||r({status:`ready`,svg:i})}catch(e){n||r({status:`error`,message:e instanceof Error?e.message:`Mermaid render failed`})}}return i(),()=>{n=!0}},[e.code,t]),n.status===`ready`?(0,F.jsx)(`div`,{className:`notes-mermaid-block is-ready`,dangerouslySetInnerHTML:{__html:n.svg}}):n.status===`error`?(0,F.jsxs)(`div`,{className:`notes-mermaid-block is-error`,children:[(0,F.jsx)(`strong`,{children:`Mermaid render failed`}),(0,F.jsx)(`span`,{children:n.message}),(0,F.jsx)(`pre`,{children:(0,F.jsx)(`code`,{children:e.code})})]}):(0,F.jsx)(`div`,{className:`notes-mermaid-block is-loading`,role:`status`,"aria-label":`Diagram loading`,children:`Rendering diagram...`})}function cp(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(cp).join(``):(0,P.isValidElement)(e)?cp(e.props.children):``}function lp(e){return(0,P.isValidElement)(e)?(e.props.className??``).match(/language-([^\s]+)/)?.[1]??`text`:`text`}function up(e){return(0,F.jsx)($,{skipHtml:!0,urlTransform:Qe,remarkPlugins:[Xe,np,He],rehypePlugins:[[$f,Ye],If],components:{a:({href:e,children:t,node:n,...r})=>{let i=typeof e==`string`&&$e(e)?e:void 0,a=!!(i&&/^https?:\/\//i.test(i));return(0,F.jsx)(`a`,{...r,href:i,target:a?`_blank`:void 0,rel:a?`noreferrer noopener`:void 0,children:t})},code:({className:e,children:t})=>(0,F.jsx)(`code`,{className:e,children:t}),pre:({children:e})=>{let t=lp(e),n=cp(e).replace(/\n$/,``);return t===`mermaid`?(0,F.jsx)(sp,{code:n}):(0,F.jsx)(ip,{code:n,language:t})}},children:e.markdown})}function dp(e){return(0,F.jsx)(F.Fragment,{children:e.widgets.map(e=>(0,rp.createPortal)((0,F.jsx)(up,{markdown:e.markdown}),e.shell,e.id))})}function fp(e,t,n){return n.selectionFrom<=t&&n.selectionTo>=e}function pp(e,t){return new TextEncoder().encode(e).byteLength<=t.maxSnippetBytes}function mp(e,t,n){e.length>=n.maxWidgets||fp(t.from,t.to,n)||pp(t.markdown,n)&&e.push(t)}function hp(e,t){if(e.length>t.largeNoteDisableThreshold)return[];let n=[],r=0;for(let i of e.matchAll(/^```([^\n`]*)\n[\s\S]*?\n```[ \t]*$/gm)){if(n.length>=t.maxWidgets)break;let e=i.index||0,a=e+i[0].length,o=(i[1]||``).trim().toLowerCase();if(o===`mermaid`){if(r>=t.maxMermaidWidgets)continue;r+=1}mp(n,{from:e,to:a,kind:o===`mermaid`?`mermaid`:`code`,markdown:i[0],block:!0},t)}for(let r of e.matchAll(/^\$\$\n[\s\S]*?\n\$\$[ \t]*$/gm)){if(n.length>=t.maxWidgets)break;let e=r.index||0;mp(n,{from:e,to:e+r[0].length,kind:`math-block`,markdown:r[0],block:!0},t)}for(let r of e.matchAll(/(^|[^$\\])(\$[^$\n]+\$)/g)){if(n.length>=t.maxWidgets)break;let e=r[1].length,i=(r.index||0)+e,a=r[2];mp(n,{from:i,to:i+a.length,kind:`math-inline`,markdown:a,block:!1},t)}return n.sort((e,t)=>e.from-t.from||e.to-t.to)}var gp=class e extends le{constructor(e){super(),this.options=e}eq(t){return t instanceof e?this.options.id===t.options.id&&this.options.kind===t.options.kind&&this.options.markdown===t.options.markdown:!1}toDOM(){let e=document.createElement(this.options.block?`div`:`span`);return e.className=this.options.block?`cm-rich-widget cm-rich-block`:`cm-rich-widget cm-rich-inline`,e.dataset.richWidgetId=this.options.id,e.dataset.richWidgetKind=this.options.kind,this.options.registerWidget({id:this.options.id,kind:this.options.kind,markdown:this.options.markdown,shell:e}),queueMicrotask(this.options.requestMeasure),e}updateDOM(e){return this.options.registerWidget({id:this.options.id,kind:this.options.kind,markdown:this.options.markdown,shell:e}),queueMicrotask(this.options.requestMeasure),!0}destroy(){this.options.unregisterWidget(this.options.id)}get estimatedHeight(){return this.options.block?96:20}ignoreEvent(){return!1}},_p=50,vp=100,yp=5e4,bp=5,xp=1e6,Sp=/^([ \t]*[-*+][ \t]+)\[([ xX])\]([ \t]*)(.*)$/,Cp=class e extends le{constructor(e){super(),this.range=e}eq(t){return t instanceof e&&t.range.markerFrom===this.range.markerFrom&&t.range.checked===this.range.checked&&t.range.text===this.range.text}toDOM(e){let t=document.createElement(`label`);t.className=`cm-rich-task-widget`;let n=document.createElement(`input`);n.type=`checkbox`;let r=document.createElement(`span`);return t.append(n,r),this.syncDOM(t,e),t}updateDOM(e,t){return e.classList.contains(`cm-rich-task-widget`)?(this.syncDOM(e,t),!0):!1}destroy(e){let t=e.querySelector(`input[type="checkbox"]`);t&&(t.onchange=null)}ignoreEvent(e){return e.type===`mousedown`||e.type===`click`||e.type===`change`||e.type===`input`||e.type===`keydown`}syncDOM(e,t){let n=e.querySelector(`input[type="checkbox"]`),r=e.querySelector(`span`);!n||!r||(n.checked=this.range.checked,n.setAttribute(`aria-label`,this.range.text||(this.range.checked?`Checked task`:`Unchecked task`)),n.setAttribute(`aria-checked`,this.range.checked?`true`:`false`),n.onchange=()=>{t.dispatch({changes:{from:this.range.markerFrom,to:this.range.markerFrom+3,insert:n.checked?`[x]`:`[ ]`},userEvent:`input.task-toggle`})},r.textContent=this.range.text||`Task`)}};function wp(e){return`rich-${e.kind}-${e.from}-${e.to}-${e.markdown.length}`}function Tp(e){let t=[],n=e.selection.main,r=!1;for(let i=1;i<=e.doc.lines&&!(t.length>=vp);i+=1){let a=e.doc.line(i);if(/^```/.test(a.text.trim())){r=!r;continue}if(r||n.from<=a.to&&n.to>=a.from)continue;let o=a.text.match(Sp);o&&t.push({from:a.from,to:a.to,markerFrom:a.from+o[1].length,checked:o[2].toLowerCase()===`x`,text:o[4].trim()})}return t}function Ep(e,t){if(!t.enabled||!t.active)return j.none;let n=e.selection.main,r=hp(e.doc.toString(),{selectionFrom:n.from,selectionTo:n.to,maxWidgets:_p,maxSnippetBytes:yp,maxMermaidWidgets:bp,largeNoteDisableThreshold:xp}),i=[];for(let t of Tp(e))i.push({from:t.from,to:t.to,decoration:j.replace({widget:new Cp(t)})});for(let e of r)i.push({from:e.from,to:e.to,decoration:j.replace({block:e.block,widget:new gp({id:wp(e),kind:e.kind,markdown:e.markdown,block:e.block,registerWidget:t.registerWidget,unregisterWidget:t.unregisterWidget,requestMeasure:t.requestMeasure})})});i.sort((e,t)=>{let n=e.from-t.from;if(n!==0)return n;let r=e.decoration.startSide-t.decoration.startSide;return r===0?e.to-t.to:r});let a=new m;for(let e of i)a.add(e.from,e.to,e.decoration);return a.finish()}function Dp(e){return d.define({create(t){return Ep(t,e)},update(t,n){return n.docChanged||n.selection?Ep(n.state,e):t.map(n.changes)},provide(e){return[E.decorations.from(e),E.atomicRanges.of(t=>t.state.field(e,!1)??j.none)]}})}function Op(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content.textContent||``}function kp(){return E.domEventHandlers({paste(e,t){if(e.clipboardData?.getData(`text/plain`))return!1;let n=e.clipboardData?.getData(`text/html`);return n?(e.preventDefault(),t.dispatch(t.state.replaceSelection(Op(n))),!0):!1}})}var Ap=(0,P.lazy)(async()=>({default:(await i(()=>import(`./MilkdownWysiwygEditor-B7k9bAey.js`),__vite__mapDeps([0]))).MilkdownWysiwygEditor}));function jp(e){let[t,n]=(0,P.useState)(()=>new Map),r=e.authoringMode===`wysiwyg`,i=(0,P.useCallback)(e=>{n(t=>{let n=new Map(t);return n.set(e.id,e),n})},[]),a=(0,P.useCallback)(e=>{n(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),o=(0,P.useCallback)(()=>{window.dispatchEvent(new Event(`resize`))},[]),s=(0,P.useMemo)(()=>{let t=[ce.highest(ke.of(ol)),rl,il,Re({codeLanguages:nl}),kp(),Dp({enabled:e.authoringMode===`rich`||e.authoringMode===`wysiwyg`,active:e.active,registerWidget:i,unregisterWidget:a,requestMeasure:o})];return e.wordWrap&&t.push(E.lineWrapping),t},[e.active,e.authoringMode,e.wordWrap,i,o,a]);return r?(0,F.jsx)(`div`,{className:`notes-editor notes-wysiwyg-editor`,children:(0,F.jsx)(P.Suspense,{fallback:(0,F.jsx)(`div`,{className:`notes-wysiwyg-loading`,children:`Loading WYSIWYG editor...`}),children:(0,F.jsx)(Ap,{active:e.active,content:e.content,onChange:e.onChange})})}):(0,F.jsxs)(`div`,{className:`notes-editor`,children:[(0,F.jsx)(dp,{widgets:[...t.values()]}),(0,F.jsx)(el,{value:e.content,extensions:s,onChange:e.onChange,height:`100%`,basicSetup:{lineNumbers:!0,foldGutter:!0,highlightActiveLine:!0}})]})}function Mp(e){return(0,F.jsx)(`article`,{className:`notes-preview`,children:(0,F.jsx)(up,{markdown:e.markdown})})}function Np(){return(0,F.jsxs)(`section`,{className:`notes-empty-state`,children:[(0,F.jsx)(`strong`,{children:`No notes yet`}),(0,F.jsx)(`span`,{children:`Create a markdown note from the file tree.`})]})}function Pp(e){return e instanceof lt&&e.status===409&&e.code===`note_revision_conflict`}function Fp(e){return e?e.split(`/`).filter(Boolean).at(-1)||e:`No note selected`}function Ip(e,t,n){return!!e&&t&&!n}var Lp=[`raw`,`split`,`preview`,`wysiwyg`];function Rp(e){return e===`raw`?`Raw`:e===`split`?`Split`:e===`preview`?`Preview`:`WYSIWYG`}function zp(e,t){return e===`settings`?null:e===`split`?`split`:e===`preview`?`preview`:t===`wysiwyg`?`wysiwyg`:`raw`}function Bp(e){function t(t){if(t===`split`){e.onViewModeChange(`split`),e.onAuthoringModeChange(`plain`);return}if(t===`preview`){e.onViewModeChange(`preview`);return}e.onViewModeChange(`raw`),e.onAuthoringModeChange(t===`wysiwyg`?`wysiwyg`:`plain`)}let n=zp(e.viewMode,e.authoringMode);return(0,F.jsxs)(`div`,{className:`notes-toolbar`,children:[(0,F.jsxs)(`div`,{className:`notes-toolbar-title`,children:[(0,F.jsx)(`strong`,{children:Fp(e.selectedPath)}),(0,F.jsx)(`span`,{children:e.conflict?`Conflict`:e.dirty?`Unsaved`:`Saved`})]}),(0,F.jsxs)(`div`,{className:`notes-toolbar-actions`,children:[(0,F.jsx)(`div`,{className:`notes-view-tabs`,role:`tablist`,"aria-label":`Notes view`,children:Lp.map(r=>(0,F.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":n===r,className:n===r?`is-active`:``,disabled:!e.selectedPath,onClick:()=>t(r),children:Rp(r)},r))}),(0,F.jsx)(`button`,{type:`button`,className:e.viewMode===`settings`?`is-active`:``,onClick:()=>e.onViewModeChange(`settings`),children:`Settings`}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onReload,disabled:!e.selectedPath||e.loading,children:`Refresh`}),(0,F.jsx)(`button`,{type:`button`,className:`notes-save-button`,onClick:e.onSave,disabled:!Ip(e.selectedPath,e.dirty,e.saving),children:e.saving?`Saving`:`Save`})]})]})}function Vp(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(``),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(null),[f,p]=(0,P.useState)(null),m=(0,P.useRef)(``),h=(0,P.useRef)(!1),g=(0,P.useCallback)(async e=>{s(!0),d(null),p(null);try{let n=await St(e);t(n),m.current=n.content,r(n.content),a(!1)}catch(e){d(e.message)}finally{s(!1)}},[]);function _(e){m.current=e,r(e),a(!0)}return{file:e,content:n,dirty:i,loading:o,saving:c,error:u,conflict:f,setContent:_,load:g,save:(0,P.useCallback)(async()=>{if(!e||!i||h.current)return;let n=m.current;h.current=!0,l(!0),d(null),p(null);try{let i=await wt({path:e.path,content:n,baseRevision:e.revision});t(i),m.current===n&&(m.current=i.content,r(i.content),a(!1))}catch(r){if(Pp(r)){let i=e.revision;try{let n=await St(e.path);i=n.revision,t(n)}catch{i=e.revision}p({localContent:n,remoteRevision:i,message:r.message})}else d(r.message)}finally{h.current=!1,l(!1)}},[i,e]),reloadFromDisk:(0,P.useCallback)(async()=>{e&&await g(e.path)},[e,g]),overwrite:(0,P.useCallback)(async()=>{if(!e||h.current)return;let n=m.current;h.current=!0,l(!0),d(null);try{let i=await wt({path:e.path,content:n});t(i),m.current===n&&(m.current=i.content,r(i.content),a(!1)),p(null)}catch(e){d(e.message)}finally{h.current=!1,l(!1)}},[e]),clearConflict:()=>p(null)}}var Hp=[`raw`,`preview`,`wysiwyg`];function Up(e,t){return e===`preview`?`preview`:t===`wysiwyg`?`wysiwyg`:`raw`}function Wp(e){let t=Vp();(0,P.useEffect)(()=>{e.selectedPath&&t.load(e.selectedPath)},[e.selectedPath]),(0,P.useEffect)(()=>{e.onDirtyPathChange(t.dirty?e.selectedPath:null)},[t.dirty,e.selectedPath]),(0,P.useEffect)(()=>{if(!e.active)return;function n(e){!(e.metaKey||e.ctrlKey)||e.key.toLowerCase()!==`s`||(e.preventDefault(),t.save())}return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[t.save,e.active]),(0,P.useEffect)(()=>{if(!e.active)return;function t(t){if(!(t.metaKey||t.ctrlKey)||t.key.toLowerCase()!==`e`)return;t.preventDefault();let n=Up(e.viewMode,e.authoringMode),r=Hp[(Hp.indexOf(n)+1)%Hp.length];if(r===`preview`){e.onViewModeChange(`preview`);return}e.onViewModeChange(`raw`),e.onAuthoringModeChange(r===`wysiwyg`?`wysiwyg`:`plain`)}return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e.active,e.viewMode,e.authoringMode,e.onViewModeChange,e.onAuthoringModeChange]);let n=e.viewMode===`raw`||e.viewMode===`split`,r=e.viewMode===`preview`||e.viewMode===`split`;return(0,F.jsx)(`section`,{className:`notes-workspace`,"aria-label":`Notes workspace`,children:(0,F.jsxs)(`main`,{className:`notes-main notes-mode-${e.viewMode}`,children:[(0,F.jsx)(Bp,{selectedPath:e.selectedPath,viewMode:e.viewMode,authoringMode:e.authoringMode,dirty:t.dirty,saving:t.saving,loading:t.loading,conflict:!!t.conflict,onViewModeChange:e.onViewModeChange,onAuthoringModeChange:e.onAuthoringModeChange,onSave:()=>void t.save(),onReload:()=>void t.reloadFromDisk()}),(0,F.jsxs)(`div`,{className:`notes-content`,children:[t.error&&(0,F.jsx)(`section`,{className:`state error-state`,children:t.error}),t.conflict&&(0,F.jsxs)(`section`,{className:`notes-conflict`,children:[(0,F.jsx)(`span`,{children:t.conflict.message}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void t.reloadFromDisk(),children:`Reload`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void t.overwrite(),children:`Overwrite`}),(0,F.jsx)(`button`,{type:`button`,onClick:t.clearConflict,children:`Keep local`})]}),e.viewMode===`settings`&&(0,F.jsxs)(`section`,{className:`notes-settings`,children:[(0,F.jsxs)(`label`,{children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:e.wordWrap,onChange:t=>e.onWordWrapChange(t.currentTarget.checked)}),`Word wrap`]}),(0,F.jsxs)(`label`,{children:[`Tree width`,(0,F.jsx)(`input`,{type:`range`,min:`220`,max:`420`,value:e.treeWidth,onChange:t=>e.onTreeWidthChange(Number(t.currentTarget.value))})]})]}),!e.selectedPath&&e.viewMode!==`settings`&&(0,F.jsx)(Np,{}),e.selectedPath&&e.viewMode!==`settings`&&(0,F.jsxs)(`div`,{className:`notes-document-grid`,children:[n&&(0,F.jsx)(`div`,{className:`notes-editor-pane`,children:(0,F.jsx)(jp,{active:e.active&&n,authoringMode:e.authoringMode,content:t.content,wordWrap:e.wordWrap,onChange:t.setContent},e.selectedPath)}),r&&(0,F.jsx)(Mp,{markdown:t.content})]})]})]})})}var Gp=`application/x-jaw-running-chip`;function Kp(e,t,n){let r=[],i=new Set;for(let a of e){if(a.hidden)continue;let e=a.port;if(i.has(e))continue;i.add(e);let o=n.has(e),s=a.status===`online`,c=a.status===`error`;!o&&!s&&!c||r.push({port:e,label:a.label||a.instanceId||`Port ${e}`,activity:t[e]||null,state:o?`busy`:c?`error`:`online`})}return r}function qp(e){return JSON.stringify({port:e.port,label:e.label,activity:e.activity,state:e.state})}function Jp(e){let t=e.dataTransfer.getData(Gp);if(!t)return null;try{let e=JSON.parse(t);return typeof e.port==`number`?{port:e.port,label:typeof e.label==`string`?e.label:`Port ${e.port}`,activity:typeof e.activity==`string`?e.activity:null,state:e.state===`busy`||e.state===`error`?e.state:`online`}:null}catch{return null}}var Yp=[{id:`backlog`,label:`Backlog`,policy:`Options not yet committed`},{id:`ready`,label:`Ready`,policy:`Pullable, clear enough to start`},{id:`active`,label:`In Progress`,policy:`Current WIP, keep starts limited`},{id:`review`,label:`Review`,policy:`Check output before delivery`},{id:`done`,label:`Done`,policy:`Delivered or no longer active`}];function Xp(e){let t=(0,P.useMemo)(()=>Kp(e.instances,e.titlesByPort,e.busyPorts),[e.instances,e.titlesByPort,e.busyPorts]);return(0,F.jsxs)(`nav`,{className:`dashboard-board-sidebar`,"aria-label":`Board lanes`,children:[(0,F.jsxs)(`header`,{className:`dashboard-board-sidebar-header`,children:[(0,F.jsx)(`span`,{className:`dashboard-board-sidebar-title`,children:`Board`}),(0,F.jsxs)(`span`,{className:`dashboard-board-sidebar-count`,children:[t.length,` running`]})]}),(0,F.jsxs)(`section`,{className:`dashboard-board-sidebar-running`,"aria-label":`Running instances`,children:[(0,F.jsx)(`div`,{className:`dashboard-board-sidebar-section-title`,children:`Running`}),t.length===0?(0,F.jsx)(`p`,{className:`dashboard-board-sidebar-empty`,children:`No running instances`}):(0,F.jsx)(`div`,{className:`dashboard-board-sidebar-running-list`,children:t.map(e=>(0,F.jsxs)(`div`,{className:`dashboard-board-running-chip`,"data-state":e.state,draggable:!0,onDragStart:t=>{t.dataTransfer.effectAllowed=`copy`,t.dataTransfer.setData(Gp,qp(e))},title:e.activity?`${e.label} — ${e.activity}`:e.label,children:[(0,F.jsxs)(`span`,{className:`dashboard-board-running-chip-port`,children:[`:`,e.port]}),(0,F.jsx)(`span`,{className:`dashboard-board-running-chip-label`,children:e.label}),e.activity?(0,F.jsx)(`span`,{className:`dashboard-board-running-chip-activity`,children:e.activity}):null,(0,F.jsx)(`span`,{className:`dashboard-board-running-chip-state`,"data-state":e.state,children:e.state})]},e.port))})]}),(0,F.jsx)(`div`,{className:`dashboard-board-sidebar-section-title`,children:`Lanes`}),(0,F.jsxs)(`ul`,{className:`dashboard-board-sidebar-list`,children:[(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-board-sidebar-item${e.view.kind===`overall`?` is-active`:``}`,onClick:()=>e.onViewChange({kind:`overall`}),"aria-pressed":e.view.kind===`overall`,children:[(0,F.jsx)(`span`,{children:`Overall`}),(0,F.jsx)(`small`,{children:`Five-column workflow`})]})}),Yp.map(t=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-board-sidebar-item${e.view.kind===`lane`&&e.view.lane===t.id?` is-active`:``}`,onClick:()=>e.onViewChange({kind:`lane`,lane:t.id}),"aria-pressed":e.view.kind===`lane`&&e.view.lane===t.id,children:[(0,F.jsx)(`span`,{children:t.label}),(0,F.jsx)(`small`,{children:t.policy})]})},t.id))]})]})}function Zp(e,t){if(e.port===null)return`no instance`;let n=t.get(e.port);return n?`:${n.port} ${n.label}`:`:${e.port}`}function Qp(e){let t=Yp.find(t=>t.id===e.lane),n=t?.label??`Lane`,r=t?.policy??``,i=e.cards.filter(e=>e.port!==null).length,a=e.cards.length-i;return(0,F.jsxs)(`div`,{className:`dashboard-board-lane-detail-shell`,"data-lane":e.lane,children:[(0,F.jsxs)(`aside`,{className:`dashboard-board-lane-detail-sidebar`,"aria-label":`${n} filters`,children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`span`,{children:n}),(0,F.jsx)(`small`,{children:r})]}),(0,F.jsxs)(`div`,{className:`dashboard-board-lane-detail-counts`,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`strong`,{children:e.cards.length}),` all`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`strong`,{children:i}),` with instance`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`strong`,{children:a}),` no instance`]})]}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onBackToOverall,children:`Overall`})]}),(0,F.jsxs)(`section`,{className:`dashboard-board-lane-detail-content`,"aria-label":`${n} cards`,children:[(0,F.jsxs)(`header`,{className:`dashboard-board-lane-detail-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h2`,{children:[`Board / `,n]}),(0,F.jsx)(`p`,{children:e.lane===`done`?`Done archive, shown as compact two-line rows.`:`Lane detail, shown as compact rows for scan and reuse.`})]}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onBackToOverall,children:`Close`})]}),e.cards.length===0?(0,F.jsx)(`p`,{className:`dashboard-board-lane-detail-empty`,children:`No items in this lane`}):(0,F.jsx)(`ul`,{className:`dashboard-board-compact-list`,children:e.cards.map(t=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-board-compact-row`,onClick:()=>e.onOpenCard(t.id),children:[(0,F.jsx)(`span`,{className:`dashboard-board-compact-row-title`,children:t.summary||t.title}),(0,F.jsx)(`span`,{className:`dashboard-board-compact-row-instance`,children:Zp(t,e.runningChipByPort)})]})},t.id))})]})]})}var $p=`/api/dashboard/board`;function em(e){return{...e,summary:e.summary??null,detail:e.detail??null}}async function tm(e){if(!e.ok){let t=await e.text().catch(()=>``);throw Error(`${e.status} ${t||e.statusText}`)}return await e.json()}async function nm(){let e=await tm(await fetch(`${$p}/tasks`,{credentials:`same-origin`,cache:`no-store`}));return Array.isArray(e.tasks)?e.tasks.map(em):[]}async function rm(e){return em((await tm(await fetch(`${$p}/tasks`,{method:`POST`,headers:{"content-type":`application/json`},credentials:`same-origin`,body:JSON.stringify(e)}))).task)}async function im(e,t){return em((await tm(await fetch(`${$p}/tasks/${encodeURIComponent(e)}`,{method:`PATCH`,headers:{"content-type":`application/json`},credentials:`same-origin`,body:JSON.stringify(t)}))).task)}async function am(e){await tm(await fetch(`${$p}/tasks/${encodeURIComponent(e)}`,{method:`DELETE`,credentials:`same-origin`}))}function om(e){let[t,n]=(0,P.useState)(``),[r,i]=(0,P.useState)(``),[a,o]=(0,P.useState)(``);if((0,P.useEffect)(()=>{n(e.card?.title??``),i(e.card?.summary??``),o(e.card?.detail??``)},[e.card]),!e.card)return null;function s(n){if(n.preventDefault(),!e.card)return;let i=t.trim();i&&e.onSave(e.card.id,{title:i,summary:r,detail:a})}return(0,F.jsx)(`div`,{className:`dashboard-board-dialog-backdrop`,role:`presentation`,onMouseDown:t=>{t.target===t.currentTarget&&e.onClose()},children:(0,F.jsxs)(`form`,{className:`dashboard-board-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`dashboard-board-dialog-title`,onSubmit:s,onKeyDown:t=>{t.key===`Escape`&&e.onClose()},children:[(0,F.jsxs)(`header`,{className:`dashboard-board-dialog-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`dashboard-board-dialog-kicker`,children:`Kanban block`}),(0,F.jsx)(`h3`,{id:`dashboard-board-dialog-title`,children:`Edit card`})]}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-dialog-icon-button`,onClick:e.onClose,"aria-label":`Close card editor`,children:`×`})]}),(0,F.jsxs)(`label`,{className:`dashboard-board-dialog-field`,children:[(0,F.jsx)(`span`,{children:`Title`}),(0,F.jsx)(`input`,{autoFocus:!0,type:`text`,value:t,onChange:e=>n(e.currentTarget.value),maxLength:500,required:!0})]}),(0,F.jsxs)(`label`,{className:`dashboard-board-dialog-field`,children:[(0,F.jsx)(`span`,{children:`One-line note`}),(0,F.jsx)(`input`,{type:`text`,value:r,onChange:e=>i(e.currentTarget.value),maxLength:500,placeholder:`Short visible memo for the card`})]}),(0,F.jsxs)(`label`,{className:`dashboard-board-dialog-field`,children:[(0,F.jsx)(`span`,{children:`Details`}),(0,F.jsx)(`textarea`,{value:a,onChange:e=>o(e.currentTarget.value),maxLength:2e4,rows:10,placeholder:`Write Markdown here. It is stored as raw text for now.`})]}),(0,F.jsxs)(`footer`,{className:`dashboard-board-dialog-footer`,children:[(0,F.jsx)(`span`,{className:`dashboard-board-dialog-storage`,children:`Markdown`}),(0,F.jsxs)(`div`,{className:`dashboard-board-dialog-actions`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:e.onClose,children:`Cancel`}),(0,F.jsx)(`button`,{type:`submit`,disabled:e.busy||!t.trim(),children:`Save`})]})]})]})})}var sm=`application/x-jaw-board-task`;function cm(e){return e.kind===`open`?(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`path`,{d:`M7 4h-2.5a1.5 1.5 0 0 0-1.5 1.5v10a1.5 1.5 0 0 0 1.5 1.5h10a1.5 1.5 0 0 0 1.5-1.5V13`}),(0,F.jsx)(`path`,{d:`M10 3h7v7`}),(0,F.jsx)(`path`,{d:`M9 11 17 3`})]}):e.kind===`move`?(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`path`,{d:`M10 2v16`}),(0,F.jsx)(`path`,{d:`M6 6 10 2l4 4`}),(0,F.jsx)(`path`,{d:`m6 14 4 4 4-4`}),(0,F.jsx)(`path`,{d:`M2 10h16`}),(0,F.jsx)(`path`,{d:`m6 6-4 4 4 4`}),(0,F.jsx)(`path`,{d:`m14 6 4 4-4 4`})]}):(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`path`,{d:`M3 5h14`}),(0,F.jsx)(`path`,{d:`M8 5V3h4v2`}),(0,F.jsx)(`path`,{d:`M6 8v8`}),(0,F.jsx)(`path`,{d:`M10 8v8`}),(0,F.jsx)(`path`,{d:`M14 8v8`}),(0,F.jsx)(`path`,{d:`M5 5l1 13h8l1-13`})]})}function lm(e){return JSON.stringify({id:e.id,lane:e.lane})}function um(e){let t=e.dataTransfer.getData(sm);if(!t)return null;try{let e=JSON.parse(t);if(typeof e.id!=`string`)return null;let n=Yp.find(t=>t.id===e.lane)?.id;return n?{id:e.id,lane:n}:null}catch{return null}}function dm(e,t){return Array.from(e.dataTransfer.types).includes(t)}function fm(e){return{id:e.id,title:e.title,summary:e.summary??null,detail:e.detail??null,lane:e.lane,port:e.port,source:e.source,persisted:!0}}function pm(e){return e==null?null:e.trim()||null}function mm(e){let[t,n]=(0,P.useState)([]),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(``),[s,c]=(0,P.useState)(!1),[l,u]=(0,P.useState)(null),[d,f]=(0,P.useState)(null),[p,m]=(0,P.useState)(null),[h,g]=(0,P.useState)(null),[_,v]=(0,P.useState)(!1),y=(0,P.useRef)(null),b=(0,P.useCallback)(async()=>{try{n(await nm())}catch{}},[]);(0,P.useEffect)(()=>{e.active&&b()},[e.active,b]),(0,P.useEffect)(()=>{if(!l)return;let e=e=>{y.current&&(y.current.contains(e.target)||u(null))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[l]);let x=(0,P.useCallback)(async e=>{let t=a.trim();if(!(!t||s)){c(!0);try{await rm({title:t,lane:e}),o(``),i(null),await b()}catch{}finally{c(!1)}}},[a,s,b]),S=(0,P.useCallback)(async(e,t)=>{u(null);try{await im(e,{lane:t}),await b()}catch{}},[b]),ee=(0,P.useCallback)(async e=>{try{await am(e),await b()}catch{}},[b]),te=(0,P.useCallback)(async(e,t)=>{if(!_){v(!0);try{let r=await im(e,t);n(n=>n.map(n=>n.id===e?{...n,...r,summary:t.summary===void 0?r.summary??n.summary:pm(t.summary),detail:t.detail===void 0?r.detail??n.detail:pm(t.detail)}:n)),g(null)}catch{}finally{v(!1)}}},[_]),C=(0,P.useCallback)(async(e,t)=>{try{await im(e,{port:t}),await b()}catch{}},[b]),ne=(0,P.useCallback)(async e=>{try{await im(e,{port:null}),await b()}catch{}},[b]),re=(0,P.useCallback)((e,t)=>{t.preventDefault(),f(null);let n=um(t);!n||n.lane===e||S(n.id,e)},[S]),w=(0,P.useCallback)((e,t)=>{if(!dm(t,`application/x-jaw-running-chip`))return;t.preventDefault(),t.stopPropagation(),m(null);let n=Jp(t);n&&C(e,n.port)},[C]),ie=(0,P.useMemo)(()=>t.map(fm),[t]),ae=(0,P.useMemo)(()=>{let e=h?ie.find(e=>e.id===h):null;return e?{id:e.id,title:e.title,summary:e.summary,detail:e.detail}:null},[ie,h]),oe=(0,P.useMemo)(()=>Kp(e.instances,e.titlesByPort,e.busyPorts),[e.instances,e.titlesByPort,e.busyPorts]),se=(0,P.useMemo)(()=>new Map(oe.map(e=>[e.port,e])),[oe]),ce=e.view.kind===`lane`?e.view.lane:null;return(0,F.jsxs)(`section`,{className:`dashboard-board-workspace`,"aria-hidden":!e.active,children:[(0,F.jsx)(`header`,{className:`dashboard-board-workspace-header`,children:(0,F.jsxs)(`div`,{className:`dashboard-board-workspace-header-text`,children:[(0,F.jsx)(`h2`,{children:`Board`}),(0,F.jsx)(`p`,{className:`dashboard-board-workspace-subtitle`,children:`Create human-owned kanban blocks, then drag running instance blocks into a card to attach context without touching the instance itself.`})]})}),ce===null?(0,F.jsx)(`div`,{className:`dashboard-board-lanes`,children:Yp.map(t=>{let n=ie.filter(e=>e.lane===t.id),c=t.id===`done`?n.slice(0,4):n,h=t.id===`done`?Math.max(0,n.length-4):0,_=r===t.id;return(0,F.jsxs)(`div`,{className:`dashboard-board-lane${d===t.id?` is-drop-target`:``}`,"data-lane":t.id,onDragOver:e=>{dm(e,sm)&&(e.preventDefault(),e.dataTransfer.dropEffect=`move`,d!==t.id&&f(t.id))},onDragLeave:()=>{d===t.id&&f(null)},onDrop:e=>re(t.id,e),children:[(0,F.jsxs)(`header`,{className:`dashboard-board-lane-header`,children:[(0,F.jsx)(`span`,{className:`dashboard-board-lane-title`,children:t.label}),(0,F.jsx)(`span`,{className:`dashboard-board-lane-policy`,children:t.policy}),(0,F.jsx)(`span`,{className:`dashboard-board-lane-count`,children:n.length})]}),(0,F.jsxs)(`ul`,{className:`dashboard-board-lane-cards`,children:[n.length===0?(0,F.jsx)(`li`,{className:`dashboard-board-lane-empty`,children:`No items`}):c.map(e=>{let t=e.port===null?null:se.get(e.port)??null;return(0,F.jsxs)(`li`,{className:`dashboard-board-card${p===e.id?` is-instance-drop-target`:``}`,"data-lane":e.lane,"data-source":e.source,"data-persisted":e.persisted?`true`:`false`,draggable:!0,onDragStart:t=>{t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(sm,lm(e))},onDragOver:t=>{dm(t,`application/x-jaw-running-chip`)&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect=`copy`,p!==e.id&&m(e.id))},onDragLeave:()=>{p===e.id&&m(null)},onDrop:t=>w(e.id,t),children:[(0,F.jsx)(`span`,{className:`dashboard-board-card-title`,children:e.title}),e.summary?(0,F.jsx)(`span`,{className:`dashboard-board-card-summary`,title:e.summary,children:e.summary}):null,(0,F.jsx)(`div`,{className:`dashboard-board-card-instance-slot`,"data-empty":t?`false`:`true`,children:t?(0,F.jsxs)(`div`,{className:`dashboard-board-card-instance`,"data-state":t.state,draggable:!0,onDragStart:e=>{e.stopPropagation(),e.dataTransfer.effectAllowed=`copy`,e.dataTransfer.setData(Gp,qp(t))},title:t.activity?`${t.label} — ${t.activity}`:t.label,children:[(0,F.jsxs)(`span`,{className:`dashboard-board-card-instance-port`,children:[`:`,t.port]}),(0,F.jsx)(`span`,{className:`dashboard-board-card-instance-label`,children:t.label}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-card-instance-detach`,onClick:()=>void ne(e.id),"aria-label":`Detach :${t.port} from card`,title:`Detach instance`,children:`-`}),t.activity?(0,F.jsx)(`span`,{className:`dashboard-board-card-instance-activity`,title:t.activity,children:t.activity}):null]}):(0,F.jsx)(`span`,{className:`dashboard-board-card-instance-empty`,children:`Drop a running instance here`})}),e.persisted?(0,F.jsxs)(`span`,{className:`dashboard-board-card-actions`,"data-open":l===e.id?`true`:`false`,children:[(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-card-action`,onMouseDown:e=>e.stopPropagation(),onClick:()=>g(e.id),"aria-label":`Open card details`,title:`Open`,children:(0,F.jsx)(cm,{kind:`open`})}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-card-action`,onMouseDown:e=>e.stopPropagation(),onClick:()=>u(t=>t===e.id?null:e.id),"aria-haspopup":`menu`,"aria-expanded":l===e.id,"aria-label":`Move card`,title:`Move`,children:(0,F.jsx)(cm,{kind:`move`})}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-card-action`,"data-danger":`true`,onClick:()=>void ee(e.id),"aria-label":`Delete card`,title:`Delete`,children:(0,F.jsx)(cm,{kind:`delete`})}),l===e.id&&(0,F.jsx)(`div`,{ref:y,className:`dashboard-board-popover`,role:`menu`,children:Yp.map(t=>(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-board-popover-item${t.id===e.lane?` is-current`:``}`,role:`menuitem`,disabled:t.id===e.lane,onClick:()=>void S(e.id,t.id),children:[t.label,t.id===e.lane?` ✓`:``]},t.id))})]}):null]},e.id)}),h>0?(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-board-done-more`,onClick:()=>e.onViewChange({kind:`lane`,lane:`done`}),children:[(0,F.jsxs)(`span`,{children:[`+ `,h,` more done`]}),(0,F.jsx)(`small`,{children:`Open archive`})]})}):null]}),(0,F.jsx)(`div`,{className:`dashboard-board-lane-add`,children:_?(0,F.jsxs)(`form`,{className:`dashboard-board-add-composer`,onSubmit:e=>{e.preventDefault(),x(t.id)},children:[(0,F.jsx)(`input`,{autoFocus:!0,type:`text`,value:a,onChange:e=>o(e.target.value),placeholder:`New ${t.label} task`,disabled:s,"aria-label":`New task for ${t.label}`,onKeyDown:e=>{e.key===`Escape`&&(i(null),o(``))}}),(0,F.jsx)(`button`,{type:`submit`,disabled:s||!a.trim(),children:`Add`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{i(null),o(``)},"aria-label":`Cancel`,children:`×`})]}):(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-add-trigger`,onClick:()=>{i(t.id),o(``)},children:`+ Add task`})})]},t.id)})}):(0,F.jsx)(Qp,{lane:ce,cards:ie.filter(e=>e.lane===ce),runningChipByPort:se,onBackToOverall:()=>e.onViewChange({kind:`overall`}),onOpenCard:g}),(0,F.jsx)(om,{card:ae,busy:_,onClose:()=>g(null),onSave:te})]})}var hm=new Set([`schedule`]);function gm(e){return hm.has(e)}function _m(e){return gm(e)?`instances`:e}function vm(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(null),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(null),c=(0,P.useCallback)(e=>(t(e.registry),r(e.status),s(e.status.error),e),[]);return{registry:e,status:n,saving:i,error:o,apply:c,refresh:(0,P.useCallback)(async()=>{try{return c(await dt())}catch(e){throw s(e.message),e}},[c]),save:(0,P.useCallback)(async e=>{a(!0);try{return c(await ft(e))}catch(e){return s(e.message),null}finally{a(!1)}},[c])}}function ym(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(`overview`),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(150),[f,p]=(0,P.useState)(`instances`),[m,h]=(0,P.useState)(null),[g,_]=(0,P.useState)(`raw`),[v,y]=(0,P.useState)(`plain`),[b,x]=(0,P.useState)(!0),[S,ee]=(0,P.useState)(280),[te,C]=(0,P.useState)(!0),[ne,re]=(0,P.useState)(!0),[w,ie]=(0,P.useState)(!0),[ae,oe]=(0,P.useState)(!0),[se,ce]=(0,P.useState)(`ko`);return{selectedPort:e,setSelectedPort:t,activeDetailTab:n,setActiveDetailTab:r,drawerOpen:i,setDrawerOpen:a,sidebarCollapsed:o,setSidebarCollapsed:s,activityDockCollapsed:c,setActivityDockCollapsed:l,activityDockHeight:u,setActivityDockHeight:d,sidebarMode:f,setSidebarMode:p,notesSelectedPath:m,setNotesSelectedPath:h,notesViewMode:g,setNotesViewMode:_,notesAuthoringMode:v,setNotesAuthoringMode:y,notesWordWrap:b,setNotesWordWrap:x,notesTreeWidth:S,setNotesTreeWidth:ee,showLatestActivityTitles:te,setShowLatestActivityTitles:C,showInlineLabelEditor:ne,setShowInlineLabelEditor:re,showSidebarRuntimeLine:w,setShowSidebarRuntimeLine:ie,showSelectedRowActions:ae,setShowSelectedRowActions:oe,locale:se,setLocale:ce}}function bm(e){return e.kind===`instance-message`&&e.role===`assistant`}function xm(e){if(e.kind===`instance-message`)return[e.kind,e.port,e.messageId].join(`|`);let t=`port`in e?String(e.port):``,n=`message`in e?e.message:`reason`in e&&typeof e.reason==`string`?e.reason:``;return[e.kind,t,e.at,n].join(`|`)}function Sm(e){return e.reduce((e,t)=>e?Date.parse(t.at)>Date.parse(e)?t.at:e:t.at,null)}function Cm(e,t){return Sm(e.filter(e=>`port`in e&&e.port===t))}function wm(e,t,n={},r=null){let i=new Set,a={};for(let t of e){if(!(`port`in t)||r!=null&&t.port===r||!bm(t))continue;let e=n[t.port]||null;if(e&&Date.parse(t.at)<=Date.parse(e))continue;let o=xm(t);i.has(o)||(i.add(o),a[t.port]=(a[t.port]||0)+1)}return a}function Tm(e){let[t,n]=(0,P.useState)(null),[r,i]=(0,P.useState)({}),a=(0,P.useMemo)(()=>wm(e.events,t,r,e.activePreviewPort),[e.events,t,r,e.activePreviewPort]);function o(e,t){n(e),i(Object.fromEntries(Object.entries(t).map(([e,t])=>[Number(e),t])))}function s(t){let n=Cm(e.events,t);if(!n)return;let a=r[t]||null;if(a&&Date.parse(n)<=Date.parse(a))return;let o={...r,[t]:n};i(o),e.saveUi({activitySeenByPort:Object.fromEntries(Object.entries(o).map(([e,t])=>[String(e),t]))})}function c(){let t=Sm(e.events),a={...r};for(let t of e.events){if(!(`port`in t))continue;let e=a[t.port];(!e||Date.parse(t.at)>Date.parse(e))&&(a[t.port]=t.at)}n(t),i(a),e.setActivityDockCollapsed(!1),e.saveUi({activityDockCollapsed:!1,activitySeenAt:t,activitySeenByPort:Object.fromEntries(Object.entries(a).map(([e,t])=>[String(e),t]))})}function l(){e.setActivityDockCollapsed(!0),e.saveUi({activityDockCollapsed:!0,activitySeenAt:t,activitySeenByPort:Object.fromEntries(Object.entries(r).map(([e,t])=>[String(e),t]))})}return{unreadByPort:a,hydrateSeenAt:o,markPortSeen:s,openAndMarkSeen:c,closeAndPersistSeen:l}}var Em=[`auto`,`dark`,`light`];function Dm(e){return typeof e==`string`&&Em.includes(e)}function Om(){if(typeof document>`u`)return`auto`;let e=document.documentElement.getAttribute(`data-theme`);return Dm(e)?e:`auto`}var km=`jaw.uiTheme`;function Am(e){if(!(typeof document>`u`)){document.documentElement.setAttribute(`data-theme`,e);try{typeof localStorage<`u`&&localStorage.setItem(km,e)}catch{}}}function jm(e){let[t,n]=(0,P.useState)(Om),[r,i]=(0,P.useState)(()=>Mm(t));return(0,P.useEffect)(()=>{Am(t),i(Mm(t))},[t]),(0,P.useEffect)(()=>{if(t!==`auto`||typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(prefers-color-scheme: light)`),n=()=>i(e.matches?`light`:`dark`);return typeof e.addEventListener==`function`?(e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)):(e.addListener(n),()=>e.removeListener(n))},[t]),{theme:t,resolved:r,setTheme:(0,P.useCallback)(t=>{Dm(t)&&(n(t),Am(t),i(Mm(t)),e(t))},[e]),syncFromRegistry:(0,P.useCallback)(e=>{Dm(e)&&(n(e),Am(e),i(Mm(e)))},[])}}function Mm(e){return e===`dark`?`dark`:e===`light`||typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`}function Nm(){return typeof navigator>`u`?!1:/Mac|iPod|iPhone|iPad/.test(navigator.platform||``)}function Pm(e){return e.key!==`k`&&e.key!==`K`?!1:Nm()?e.metaKey:e.ctrlKey}function Fm(){let[e,t]=(0,P.useState)(!1),n=(0,P.useCallback)(()=>t(e=>!e),[]),r=(0,P.useCallback)(()=>t(!1),[]);return(0,P.useEffect)(()=>{function e(e){Pm(e)&&(e.preventDefault(),t(e=>!e))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),{open:e,setOpen:t,toggle:n,close:r}}function Im(e,t){let[n,r]=(0,P.useState)(null);return{error:n,saveInstanceLabel:(0,P.useCallback)(async(n,i)=>{let a=i?.trim()||null;if(!await e({instances:{[String(n)]:{label:a}}})){let e=`instance label save failed`;throw r(e),Error(e)}r(null),t(e=>e&&{...e,instances:e.instances.map(e=>e.port===n?{...e,label:a}:e)})},[e,t])}}var Lm=5e3,Rm=200;function zm(e){if(!e)return null;if(`latestAssistant`in e){let t=e.latestAssistant,n=e.activity;return!t||!n||n.role!==`assistant`||n.messageId!==t.id?null:t}return e.role===`assistant`&&Number.isInteger(e.id)?e:null}function Bm(e){return!e||!(`activity`in e)?null:e.activity?.title||null}function Vm(e){return e&&(`activity`in e||`latestAssistant`in e)?`ready`:`legacy`}var Hm=120*6e4;function Um(e){let t=e.includes(`T`)?e:e.replace(` `,`T`);return Date.parse(t.endsWith(`Z`)?t:t+`Z`)}function Wm(e){if(!e||!(`activity`in e))return!1;let t=e.activity;if(!t||t.role!==`user`)return!1;let n=Um(t.updatedAt);return Number.isNaN(n)?!1:Date.now()-n<Hm}async function Gm(e){let t=await fetch(`/i/${e}/api/messages/latest`);if(!t.ok)return{latest:null,title:null,support:`offline`,busy:!1};let n=await t.json();return{latest:zm(n.data),title:Bm(n.data),support:Vm(n.data),busy:Wm(n.data)}}function Km(e){let[t,n]=(0,P.useState)([]),[r,i]=(0,P.useState)({}),[a,o]=(0,P.useState)({}),[s,c]=(0,P.useState)(new Set),l=(0,P.useRef)({}),u=(0,P.useMemo)(()=>e.filter(e=>e.ok).map(e=>e.port).sort((e,t)=>e-t),[e]);return(0,P.useEffect)(()=>{let t=!1,r=null;async function a(){if(t)return;let r=new Set(e.map(e=>e.port)),a={};for(let t of e)t.ok||(a[t.port]=`offline`);if(u.length===0){o(a),i(e=>Object.fromEntries(Object.entries(e).filter(([e])=>r.has(Number(e)))));return}let s=await Promise.allSettled(u.map(async e=>({port:e,...await Gm(e)}))),d=[],f={},p=new Set;for(let e of s){if(e.status!==`fulfilled`)continue;let{port:t,latest:n,title:r,support:i,busy:o}=e.value;if(o&&p.add(t),a[t]=i,r&&(f[t]=r),!n)continue;let s=l.current[t];l.current[t]=n.id,!(s==null||n.id<=s)&&d.push({kind:`instance-message`,port:t,messageId:n.id,role:n.role,at:n.created_at&&!Number.isNaN(Date.parse(n.created_at))?n.created_at:new Date().toISOString()})}if(!t){for(let e of u)a[e]||(a[e]=`offline`);o(a),c(p),i(e=>{let t={};for(let[n,i]of Object.entries(e)){let e=Number(n);r.has(e)&&a[e]===`ready`&&(t[e]=i)}return{...t,...f}}),d.length>0&&n(e=>{let t=[...e,...d];return t.length>Rm&&t.splice(0,t.length-Rm),t})}}function s(){r||=setInterval(()=>{a()},Lm)}function d(){r&&clearInterval(r),r=null}function f(){document.visibilityState===`visible`?(a(),s()):d()}return a(),s(),document.addEventListener(`visibilitychange`,f),()=>{t=!0,d(),document.removeEventListener(`visibilitychange`,f)}},[u.join(`,`),(0,P.useMemo)(()=>e.map(e=>`${e.port}:${e.ok?`online`:`offline`}`).sort().join(`,`),[e])]),{events:t,titlesByPort:r,titleSupportByPort:a,busyPorts:s}}var qm=1e4,Jm=200;function Ym(){let[e,t]=(0,P.useState)([]),[n,r]=(0,P.useState)(null),i=(0,P.useRef)(null);async function a(){try{let e=await vt(i.current);if(r(null),e.length===0)return;i.current=e[e.length-1].at,t(t=>{let n=[...t,...e];return n.length>Jm&&n.splice(0,n.length-Jm),n})}catch(e){r(e.message)}}return(0,P.useEffect)(()=>{let e=!1,t=null;async function n(){e||await a()}function r(){t||=setInterval(()=>{n()},qm)}function i(){t&&clearInterval(t),t=null}function o(){document.visibilityState===`visible`?(n(),r()):i()}return n(),r(),document.addEventListener(`visibilitychange`,o),()=>{e=!0,i(),document.removeEventListener(`visibilitychange`,o)}},[]),{events:e,error:n,refresh:a}}function Xm(e,t){if(e.length===0)return e;let n=new Set(t.map(e=>e.profileId)),r=e.filter(e=>n.has(e));return r.length===e.length?e:r}function Zm(e){return(0,F.jsx)(`section`,{className:`workspace-surface${e.active?` is-active`:``}`,hidden:!e.active,"aria-hidden":!e.active,children:e.children})}function Qm(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(!0),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(`all`),[u,d]=(0,P.useState)(``),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(null),[v,y]=(0,P.useState)(null),[b,x]=(0,P.useState)(null),[S,ee]=(0,P.useState)(null),[te,C]=(0,P.useState)([]),[ne,re]=(0,P.useState)(!1),[w,ie]=(0,P.useState)(null),[ae,oe]=(0,P.useState)(`display`),[se,ce]=(0,P.useState)({kind:`overall`}),[T,E]=(0,P.useState)(`today`),[le,ue]=(0,P.useState)(()=>Tr()),[de,fe]=(0,P.useState)(0),[pe,D]=(0,P.useState)(!1),[me,he]=(0,P.useState)(!1);(0,P.useEffect)(()=>{Er(le)},[le]),kr({enabled:le,onUnload:()=>{ue(!1),D(!0)}}),(0,P.useEffect)(()=>{if(!pe||typeof document>`u`||document.hidden)return;let e=setTimeout(()=>D(!1),8e3);return()=>clearTimeout(e)},[pe]);let ge=vm(),O=ym(),_e=jm(e=>{m&&ge.save({ui:{uiTheme:e}})}),ve=Fm(),k=Ym(),ye=e?.instances||[],be=Km(ye),xe=Im(ge.save,t),Se=(0,P.useMemo)(()=>e?.manager.profiles||[],[e]),A=(0,P.useMemo)(()=>{let e=new Set(Se.map(e=>e.profileId));return te.filter(t=>e.has(t))},[te,Se]),Ce=(0,P.useMemo)(()=>{let e=o.trim().toLowerCase();return ye.filter(t=>c!==`all`&&t.status!==c||A.length>0&&(!t.profileId||!A.includes(t.profileId))?!1:e?[String(t.port),t.url,ir(t),t.version,t.workingDir,t.currentCli,t.currentModel,t.healthReason,t.label,t.group,t.profileId].some(t=>String(t||``).toLowerCase().includes(e)):!0)},[A,ye,o,c]),we=(0,P.useMemo)(()=>O.selectedPort==null?Ce.find(e=>e.ok)||null:ye.find(e=>e.port===O.selectedPort)||null,[Ce,ye,O.selectedPort]),Te=O.activeDetailTab===`preview`&&O.sidebarMode===`instances`?we?.port??null:null,Ee=Tm({events:[...k.events,...be.events],activityDockCollapsed:O.activityDockCollapsed,setActivityDockCollapsed:O.setActivityDockCollapsed,saveUi:M,activePreviewPort:Te});function De(){let e=[`auto`,`light`,`dark`],t=e[(e.indexOf(_e.theme)+1)%e.length];_e.setTheme(t)}function j(){we&&window.open(we.url,`_blank`,`noopener,noreferrer`)}(0,P.useEffect)(()=>{document.documentElement.lang=O.locale},[O.locale]);async function Oe(e=f){r(!0),a(null);try{let n=await ut(e),r=Xm(te,n.manager.profiles||[]);r!==te&&(C(r),ge.save({activeProfileFilter:r})),t(n)}catch(e){a(e.message)}finally{r(!1)}}async function ke(e){let n=await _t(e);n&&t(t=>t&&{...t,instances:t.instances.map(t=>t.port===e?n:t)})}(0,P.useEffect)(()=>{async function e(){try{let e=await ge.refresh(),t=e.registry.ui;O.setSelectedPort(t.selectedPort),O.setActiveDetailTab(t.selectedTab),O.setSidebarCollapsed(t.sidebarCollapsed),O.setActivityDockCollapsed(t.activityDockCollapsed),O.setActivityDockHeight(t.activityDockHeight);let n=_m(t.sidebarMode);O.setSidebarMode(n),n!==t.sidebarMode&&M({sidebarMode:n}),O.setNotesSelectedPath(t.notesSelectedPath),O.setNotesViewMode(t.notesViewMode),O.setNotesAuthoringMode(t.notesAuthoringMode??`plain`),O.setNotesWordWrap(t.notesWordWrap),O.setNotesTreeWidth(t.notesTreeWidth),O.setShowLatestActivityTitles(t.showLatestActivityTitles),O.setShowInlineLabelEditor(t.showInlineLabelEditor),O.setShowSidebarRuntimeLine(t.showSidebarRuntimeLine),O.setShowSelectedRowActions(t.showSelectedRowActions),O.setLocale(t.locale),Ee.hydrateSeenAt(t.activitySeenAt??null,t.activitySeenByPort||{}),C(e.registry.activeProfileFilter||[]),_e.syncFromRegistry(t.uiTheme)}finally{h(!0),await Oe()}}e()},[]);async function M(e){m&&await ge.save({ui:e})}let Ae=(0,P.useMemo)(()=>ye.reduce((e,t)=>(t.profileId&&(e[t.profileId]=(e[t.profileId]||0)+1),e),{}),[ye]),je=(0,P.useMemo)(()=>ye.reduce((e,t)=>(e.total+=1,e[t.status]=(e[t.status]||0)+1,e),{total:0}),[ye]);function Me(e){let t=te.includes(e)?te.filter(t=>t!==e):[...te,e];C(t),ge.save({activeProfileFilter:t})}function N(){return O.activeDetailTab!==`settings`||!ne?!0:window.confirm(`Discard unsaved Settings changes?`)}function Ne(e){N()&&(re(!1),Ee.markPortSeen(e.port),O.setSelectedPort(e.port),O.setActiveDetailTab(`preview`),O.setActivityDockCollapsed(!0),O.setDrawerOpen(!1),M({selectedPort:e.port,selectedTab:`preview`,activityDockCollapsed:!0}))}function Pe(e){N()&&(re(!1),Ee.markPortSeen(e.port),O.setSelectedPort(e.port),O.setDrawerOpen(!1),M({selectedPort:e.port}))}function Fe(e){if(!(e!==`settings`&&!N())){if(e!==`settings`&&re(!1),O.setActiveDetailTab(e),e===`preview`){let t=O.selectedPort;t!=null&&Ee.markPortSeen(t),O.setActivityDockCollapsed(!0),M({selectedTab:e,activityDockCollapsed:!0});return}M({selectedTab:e})}}function Ie(){let e=!O.sidebarCollapsed;O.setSidebarCollapsed(e),M({sidebarCollapsed:e})}function Le(){if(O.activityDockCollapsed){Ee.openAndMarkSeen();return}Ee.closeAndPersistSeen()}function Re(e){O.setActivityDockHeight(e),M({activityDockHeight:e})}function ze(e){let t=_m(e);O.setSidebarMode(t),M({sidebarMode:t})}function Be(e){O.setNotesSelectedPath(e),M({notesSelectedPath:e})}function Ve(e){O.setNotesViewMode(e),M({notesViewMode:e})}function He(e){O.setNotesAuthoringMode(e),M({notesAuthoringMode:e})}function Ue(e){O.setNotesWordWrap(e),M({notesWordWrap:e})}function We(e){O.setNotesTreeWidth(e),M({notesTreeWidth:e})}function Ge(e){e.showLatestActivityTitles!==void 0&&O.setShowLatestActivityTitles(e.showLatestActivityTitles),e.showInlineLabelEditor!==void 0&&O.setShowInlineLabelEditor(e.showInlineLabelEditor),e.showSidebarRuntimeLine!==void 0&&O.setShowSidebarRuntimeLine(e.showSidebarRuntimeLine),e.showSelectedRowActions!==void 0&&O.setShowSelectedRowActions(e.showSelectedRowActions),e.locale!==void 0&&O.setLocale(e.locale),M(e)}async function Ke(e,t){let n=t.lifecycle;if(!n||e===`perm`&&!window.confirm(`Register :${t.port} as a persistent system service? It will auto-start on login and auto-restart on crash.`)||e===`unperm`&&!window.confirm(`Remove persistent service for :${t.port}? The instance will stop and won't auto-start.`))return;if(e===`stop`&&n.owner===`service`){if(!window.confirm(`Stop :${t.port}? This will also remove the persistent service.`))return}else if((e===`stop`||e===`restart`)&&!window.confirm(`${e} :${t.port}?`))return;if(!N())return;re(!1);let r=t.uptime;_(t.port),y(null),x(t.port),ee(e);try{let n=e===`start`?u:void 0,i=await pt(e,t.port,n),a=i.expectedStateAfter||(e===`start`||e===`perm`?`online`:e===`stop`||e===`unperm`?`offline`:`restart-detected`);(await Ot({port:t.port,expected:a,previousUptime:r,fetchOnce:(e,t)=>_t(e,{signal:t})})).settled||y(`${i.message} (not yet reachable, refresh manually if needed)`),await Oe(),O.setSelectedPort(t.port)}catch(e){y(e.message)}finally{_(null),x(null),ee(null)}}let qe=(0,F.jsx)(Pn,{error:i,loading:n,instances:ye,filtered:Ce,selectedInstance:we,data:e,lifecycleBusyPort:g,transitioningPort:b,transitionAction:S,activityUnreadByPort:Ee.unreadByPort,latestTitleByPort:be.titlesByPort,busyPorts:be.busyPorts,showLatestActivityTitles:O.showLatestActivityTitles,showInlineLabelEditor:O.showInlineLabelEditor,showSidebarRuntimeLine:O.showSidebarRuntimeLine,showSelectedRowActions:O.showSelectedRowActions,profiles:Se,getLabel:ir,formatUptime:ar,onSelect:Pe,onPreview:Ne,onMarkActivitySeen:Ee.markPortSeen,onInstanceLabelSave:xe.saveInstanceLabel,onLifecycle:(e,t)=>void Ke(e,t)}),Je=(0,F.jsx)(or,{instance:we,previewEnabled:le,onPreviewEnabledChange:ue,onPreviewRefresh:()=>fe(e=>e+1)}),Ye=Hr(O,_e.theme),Xe=Vr(be.titleSupportByPort),Ze=e=>e.length>0?(0,F.jsx)(`div`,{className:`profile-chip-strip drawer-chip-strip`,"aria-label":`Profile filters`,children:e.map(e=>(0,F.jsx)(Rn,{profile:e,active:te.includes(e.profileId),count:Ae[e.profileId]||0,onToggle:Me},e.profileId))}):null,Qe=t=>(0,F.jsx)(xn,{instance:we,data:e,activeTab:t,onSettingsDirtyChange:re,onSettingsSaved:()=>{we&&ke(we.port)},onRegistryPatch:(e,t)=>{ge.save({instances:{[String(e)]:t}}).then(()=>Oe())}});return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(In,{sidebarCollapsed:O.sidebarCollapsed,commandBar:(0,F.jsx)(Xt,{query:o,loading:n,onQueryChange:s,onRefresh:()=>void Oe(),onOpenDrawer:()=>O.setDrawerOpen(!0),theme:_e.theme,onThemeChange:_e.setTheme,onOpenPalette:ve.toggle}),workspace:(0,F.jsx)(sr,{sidebarCollapsed:O.sidebarCollapsed,inspectorCollapsed:O.activityDockCollapsed,inspectorHeight:O.activityDockCollapsed?48:O.activityDockHeight,drawerOpen:O.drawerOpen,onCloseDrawer:()=>O.setDrawerOpen(!1),navigator:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Kn,{onlineCount:je.online||0,collapsed:O.sidebarCollapsed,mode:O.sidebarMode,scheduleWorkspaceEnabled:!1,onModeChange:ze,onToggleSidebar:Ie,helpOpen:me,onToggleHelp:()=>he(e=>!e)}),(0,F.jsx)(`div`,{id:`manager-sidebar-list`,className:`manager-sidebar-list`,children:O.sidebarMode===`settings`?(0,F.jsx)(Mr,{activeSection:ae,locale:O.locale,onSectionChange:oe}):O.sidebarMode===`notes`?(0,F.jsx)(gi,{selectedPath:O.notesSelectedPath,dirtyPath:w,treeWidth:O.notesTreeWidth,onSelectedPathChange:Be}):O.sidebarMode===`board`?(0,F.jsx)(Xp,{view:se,onViewChange:ce,instances:ye,titlesByPort:be.titlesByPort,busyPorts:be.busyPorts}):(0,F.jsx)(Fn,{active:we,hiddenCount:ye.filter(e=>e.hidden).length,collapsed:O.sidebarCollapsed,children:qe})})]}),workbench:(0,F.jsxs)(`div`,{className:`workspace-surface-stack`,children:[v&&(0,F.jsxs)(`section`,{className:`state lifecycle-state`,role:`status`,children:[(0,F.jsx)(`span`,{children:v}),(0,F.jsx)(`button`,{type:`button`,className:`state-dismiss`,"aria-label":`Dismiss lifecycle message`,onClick:()=>y(null),children:`X`})]}),(0,F.jsxs)(`div`,{className:`workspace-surface-layer`,children:[(0,F.jsx)(Zm,{active:O.sidebarMode===`instances`,children:(0,F.jsx)(nr,{mode:O.activeDetailTab,onModeChange:Fe,header:Je,overview:Qe(`overview`),preview:(0,F.jsx)(pr,{instance:we,data:e,enabled:le,refreshKey:de,theme:_e.resolved}),logs:Qe(`logs`),settings:Qe(`settings`)})}),(0,F.jsx)(Zm,{active:O.sidebarMode===`notes`,children:(0,F.jsx)(Wp,{active:O.sidebarMode===`notes`,selectedPath:O.notesSelectedPath,viewMode:O.notesViewMode,authoringMode:O.notesAuthoringMode,wordWrap:O.notesWordWrap,treeWidth:O.notesTreeWidth,onSelectedPathChange:Be,onDirtyPathChange:ie,onViewModeChange:Ve,onAuthoringModeChange:He,onWordWrapChange:Ue,onTreeWidthChange:We})}),(0,F.jsx)(Zm,{active:O.sidebarMode===`settings`,children:(0,F.jsx)(Br,{activeSection:ae,ui:Ye,titleSupport:Xe,onUiPatch:Ge})}),(0,F.jsx)(Zm,{active:O.sidebarMode===`board`,children:(0,F.jsx)(mm,{active:O.sidebarMode===`board`,view:se,onViewChange:ce,instances:ye,selectedPort:we?.port??null,titlesByPort:be.titlesByPort,busyPorts:be.busyPorts})}),null]})]}),inspector:(0,F.jsx)(Ht,{collapsed:O.activityDockCollapsed,height:O.activityDockHeight,loading:n,error:i,lifecycleMessage:v,selectedInstance:we,registryMessage:ge.error||xe.error||k.error,events:k.events,onToggle:Le,onHeightChange:Re}),mobileNav:(0,F.jsx)(Ln,{activeTab:O.activeDetailTab,onOpenInstances:()=>O.setDrawerOpen(!0),onSelectTab:Fe,onToggleActivity:Ee.openAndMarkSeen}),drawer:(0,F.jsx)(Sn,{open:O.drawerOpen,profileFilters:Ze(Se),onClose:()=>O.setDrawerOpen(!1),children:qe})}),activityHeight:O.activityDockCollapsed?48:O.activityDockHeight}),(0,F.jsx)(tn,{open:ve.open,onClose:ve.close,instances:ye,getLabel:ir,onSelectInstance:Pe,theme:_e.theme,onCycleTheme:De,onRefresh:()=>void Oe(),onToggleHidden:()=>{let e=!f;p(e),Oe(e)},showHidden:f,onOpenSelected:j,selectedInstance:we}),(0,F.jsx)(Cr,{onUnloadPreview:()=>ue(!1)}),(0,F.jsx)($n,{open:me,mode:O.sidebarMode,onClose:()=>he(!1)}),pe&&(0,F.jsxs)(`div`,{className:`preview-auto-unload-notice`,role:`status`,children:[`Preview was unloaded after 5 minutes of inactivity. Toggle the preview switch to re-enable.`,(0,F.jsx)(`button`,{type:`button`,className:`preview-auto-unload-dismiss`,"aria-label":`Dismiss preview auto-unload notice`,onClick:()=>D(!1),children:`×`})]})]})}var $m=document.getElementById(`manager-root`);if(!$m)throw Error(`manager-root not found`);(0,ct.createRoot)($m).render((0,F.jsx)(Qm,{}));