pythinker-code 2.0.0__py3-none-any.whl

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 (731) hide show
  1. pythinker_code/CHANGELOG.md +16 -0
  2. pythinker_code/__init__.py +0 -0
  3. pythinker_code/__main__.py +92 -0
  4. pythinker_code/acp/AGENTS.md +93 -0
  5. pythinker_code/acp/__init__.py +13 -0
  6. pythinker_code/acp/convert.py +128 -0
  7. pythinker_code/acp/host.py +298 -0
  8. pythinker_code/acp/mcp.py +46 -0
  9. pythinker_code/acp/server.py +497 -0
  10. pythinker_code/acp/session.py +496 -0
  11. pythinker_code/acp/tools.py +167 -0
  12. pythinker_code/acp/types.py +13 -0
  13. pythinker_code/acp/version.py +45 -0
  14. pythinker_code/agents/default/agent.yaml +36 -0
  15. pythinker_code/agents/default/coder.yaml +25 -0
  16. pythinker_code/agents/default/explore.yaml +46 -0
  17. pythinker_code/agents/default/plan.yaml +30 -0
  18. pythinker_code/agents/default/system.md +164 -0
  19. pythinker_code/agents/okabe/agent.yaml +22 -0
  20. pythinker_code/agentspec.py +163 -0
  21. pythinker_code/app.py +820 -0
  22. pythinker_code/approval_runtime/__init__.py +29 -0
  23. pythinker_code/approval_runtime/models.py +42 -0
  24. pythinker_code/approval_runtime/runtime.py +235 -0
  25. pythinker_code/auth/__init__.py +25 -0
  26. pythinker_code/auth/anthropic_direct.py +207 -0
  27. pythinker_code/auth/deepseek.py +192 -0
  28. pythinker_code/auth/lm_studio.py +418 -0
  29. pythinker_code/auth/minimax.py +203 -0
  30. pythinker_code/auth/oauth.py +1122 -0
  31. pythinker_code/auth/ollama.py +293 -0
  32. pythinker_code/auth/openai.py +771 -0
  33. pythinker_code/auth/opencode_go.py +203 -0
  34. pythinker_code/auth/openrouter.py +225 -0
  35. pythinker_code/auth/platforms.py +466 -0
  36. pythinker_code/background/__init__.py +36 -0
  37. pythinker_code/background/agent_runner.py +231 -0
  38. pythinker_code/background/ids.py +19 -0
  39. pythinker_code/background/manager.py +650 -0
  40. pythinker_code/background/models.py +105 -0
  41. pythinker_code/background/store.py +237 -0
  42. pythinker_code/background/summary.py +66 -0
  43. pythinker_code/background/worker.py +209 -0
  44. pythinker_code/cli/__init__.py +1326 -0
  45. pythinker_code/cli/__main__.py +19 -0
  46. pythinker_code/cli/_lazy_group.py +238 -0
  47. pythinker_code/cli/export.py +322 -0
  48. pythinker_code/cli/info.py +62 -0
  49. pythinker_code/cli/mcp.py +349 -0
  50. pythinker_code/cli/plugin.py +351 -0
  51. pythinker_code/cli/toad.py +74 -0
  52. pythinker_code/cli/vis.py +38 -0
  53. pythinker_code/cli/web.py +80 -0
  54. pythinker_code/config.py +453 -0
  55. pythinker_code/constant.py +33 -0
  56. pythinker_code/exception.py +43 -0
  57. pythinker_code/hooks/__init__.py +4 -0
  58. pythinker_code/hooks/config.py +34 -0
  59. pythinker_code/hooks/engine.py +371 -0
  60. pythinker_code/hooks/events.py +190 -0
  61. pythinker_code/hooks/runner.py +89 -0
  62. pythinker_code/llm.py +412 -0
  63. pythinker_code/metadata.py +79 -0
  64. pythinker_code/notifications/__init__.py +33 -0
  65. pythinker_code/notifications/llm.py +77 -0
  66. pythinker_code/notifications/manager.py +145 -0
  67. pythinker_code/notifications/models.py +50 -0
  68. pythinker_code/notifications/notifier.py +41 -0
  69. pythinker_code/notifications/store.py +118 -0
  70. pythinker_code/notifications/wire.py +21 -0
  71. pythinker_code/plugin/__init__.py +124 -0
  72. pythinker_code/plugin/manager.py +153 -0
  73. pythinker_code/plugin/tool.py +173 -0
  74. pythinker_code/prompts/__init__.py +6 -0
  75. pythinker_code/prompts/compact.md +73 -0
  76. pythinker_code/prompts/init.md +21 -0
  77. pythinker_code/py.typed +0 -0
  78. pythinker_code/session.py +319 -0
  79. pythinker_code/session_fork.py +325 -0
  80. pythinker_code/session_state.py +132 -0
  81. pythinker_code/share.py +14 -0
  82. pythinker_code/skill/__init__.py +727 -0
  83. pythinker_code/skill/flow/__init__.py +99 -0
  84. pythinker_code/skill/flow/d2.py +482 -0
  85. pythinker_code/skill/flow/mermaid.py +266 -0
  86. pythinker_code/skills/pythinker-code-help/SKILL.md +54 -0
  87. pythinker_code/skills/skill-creator/SKILL.md +367 -0
  88. pythinker_code/soul/__init__.py +304 -0
  89. pythinker_code/soul/agent.py +520 -0
  90. pythinker_code/soul/approval.py +267 -0
  91. pythinker_code/soul/btw.py +214 -0
  92. pythinker_code/soul/compaction.py +189 -0
  93. pythinker_code/soul/context.py +339 -0
  94. pythinker_code/soul/denwarenji.py +39 -0
  95. pythinker_code/soul/dynamic_injection.py +84 -0
  96. pythinker_code/soul/dynamic_injections/__init__.py +0 -0
  97. pythinker_code/soul/dynamic_injections/auto_mode.py +72 -0
  98. pythinker_code/soul/dynamic_injections/plan_mode.py +239 -0
  99. pythinker_code/soul/message.py +92 -0
  100. pythinker_code/soul/pythinkersoul.py +1613 -0
  101. pythinker_code/soul/slash.py +340 -0
  102. pythinker_code/soul/toolset.py +788 -0
  103. pythinker_code/subagents/__init__.py +21 -0
  104. pythinker_code/subagents/builder.py +42 -0
  105. pythinker_code/subagents/core.py +86 -0
  106. pythinker_code/subagents/git_context.py +172 -0
  107. pythinker_code/subagents/models.py +54 -0
  108. pythinker_code/subagents/output.py +71 -0
  109. pythinker_code/subagents/registry.py +28 -0
  110. pythinker_code/subagents/runner.py +428 -0
  111. pythinker_code/subagents/store.py +196 -0
  112. pythinker_code/telemetry/__init__.py +211 -0
  113. pythinker_code/telemetry/config.py +54 -0
  114. pythinker_code/telemetry/crash.py +157 -0
  115. pythinker_code/telemetry/metrics.py +208 -0
  116. pythinker_code/telemetry/otel.py +240 -0
  117. pythinker_code/telemetry/sentry.py +167 -0
  118. pythinker_code/telemetry/sink.py +189 -0
  119. pythinker_code/tools/AGENTS.md +6 -0
  120. pythinker_code/tools/__init__.py +105 -0
  121. pythinker_code/tools/agent/__init__.py +277 -0
  122. pythinker_code/tools/agent/description.md +41 -0
  123. pythinker_code/tools/ask_user/__init__.py +159 -0
  124. pythinker_code/tools/ask_user/description.md +19 -0
  125. pythinker_code/tools/background/__init__.py +318 -0
  126. pythinker_code/tools/background/list.md +10 -0
  127. pythinker_code/tools/background/output.md +11 -0
  128. pythinker_code/tools/background/stop.md +8 -0
  129. pythinker_code/tools/display.py +46 -0
  130. pythinker_code/tools/dmail/__init__.py +38 -0
  131. pythinker_code/tools/dmail/dmail.md +17 -0
  132. pythinker_code/tools/file/__init__.py +30 -0
  133. pythinker_code/tools/file/glob.md +17 -0
  134. pythinker_code/tools/file/glob.py +160 -0
  135. pythinker_code/tools/file/grep.md +6 -0
  136. pythinker_code/tools/file/grep_local.py +589 -0
  137. pythinker_code/tools/file/plan_mode.py +45 -0
  138. pythinker_code/tools/file/read.md +16 -0
  139. pythinker_code/tools/file/read.py +300 -0
  140. pythinker_code/tools/file/read_media.md +24 -0
  141. pythinker_code/tools/file/read_media.py +217 -0
  142. pythinker_code/tools/file/replace.md +7 -0
  143. pythinker_code/tools/file/replace.py +195 -0
  144. pythinker_code/tools/file/utils.py +257 -0
  145. pythinker_code/tools/file/write.md +5 -0
  146. pythinker_code/tools/file/write.py +177 -0
  147. pythinker_code/tools/plan/__init__.py +327 -0
  148. pythinker_code/tools/plan/description.md +29 -0
  149. pythinker_code/tools/plan/enter.py +190 -0
  150. pythinker_code/tools/plan/enter_description.md +35 -0
  151. pythinker_code/tools/plan/heroes.py +277 -0
  152. pythinker_code/tools/shell/__init__.py +253 -0
  153. pythinker_code/tools/shell/bash.md +35 -0
  154. pythinker_code/tools/shell/powershell.md +30 -0
  155. pythinker_code/tools/test.py +55 -0
  156. pythinker_code/tools/think/__init__.py +21 -0
  157. pythinker_code/tools/think/think.md +1 -0
  158. pythinker_code/tools/todo/__init__.py +168 -0
  159. pythinker_code/tools/todo/set_todo_list.md +23 -0
  160. pythinker_code/tools/utils.py +199 -0
  161. pythinker_code/tools/web/__init__.py +4 -0
  162. pythinker_code/tools/web/fetch.md +1 -0
  163. pythinker_code/tools/web/fetch.py +189 -0
  164. pythinker_code/tools/web/search.md +1 -0
  165. pythinker_code/tools/web/search.py +163 -0
  166. pythinker_code/ui/__init__.py +0 -0
  167. pythinker_code/ui/acp/__init__.py +99 -0
  168. pythinker_code/ui/print/__init__.py +474 -0
  169. pythinker_code/ui/print/visualize.py +185 -0
  170. pythinker_code/ui/shell/__init__.py +1696 -0
  171. pythinker_code/ui/shell/console.py +109 -0
  172. pythinker_code/ui/shell/debug.py +190 -0
  173. pythinker_code/ui/shell/echo.py +17 -0
  174. pythinker_code/ui/shell/export_import.py +117 -0
  175. pythinker_code/ui/shell/keyboard.py +300 -0
  176. pythinker_code/ui/shell/mcp_status.py +113 -0
  177. pythinker_code/ui/shell/model_picker.py +318 -0
  178. pythinker_code/ui/shell/oauth.py +272 -0
  179. pythinker_code/ui/shell/placeholders.py +531 -0
  180. pythinker_code/ui/shell/prompt.py +2278 -0
  181. pythinker_code/ui/shell/replay.py +215 -0
  182. pythinker_code/ui/shell/session_picker.py +227 -0
  183. pythinker_code/ui/shell/setup.py +212 -0
  184. pythinker_code/ui/shell/slash.py +898 -0
  185. pythinker_code/ui/shell/startup.py +32 -0
  186. pythinker_code/ui/shell/task_browser.py +486 -0
  187. pythinker_code/ui/shell/update.py +350 -0
  188. pythinker_code/ui/shell/usage.py +291 -0
  189. pythinker_code/ui/shell/usage_adapters/__init__.py +50 -0
  190. pythinker_code/ui/shell/usage_adapters/anthropic_admin.py +233 -0
  191. pythinker_code/ui/shell/usage_adapters/base.py +72 -0
  192. pythinker_code/ui/shell/usage_adapters/deepseek.py +137 -0
  193. pythinker_code/ui/shell/usage_adapters/minimax.py +236 -0
  194. pythinker_code/ui/shell/usage_adapters/openai_admin.py +225 -0
  195. pythinker_code/ui/shell/usage_adapters/openai_chatgpt.py +241 -0
  196. pythinker_code/ui/shell/usage_adapters/opencode_go.py +232 -0
  197. pythinker_code/ui/shell/usage_adapters/openrouter.py +105 -0
  198. pythinker_code/ui/shell/usage_adapters/pythinker.py +189 -0
  199. pythinker_code/ui/shell/usage_adapters/pythinker_ai.py +50 -0
  200. pythinker_code/ui/shell/usage_render.py +150 -0
  201. pythinker_code/ui/shell/visualize/__init__.py +165 -0
  202. pythinker_code/ui/shell/visualize/_approval_panel.py +505 -0
  203. pythinker_code/ui/shell/visualize/_blocks.py +629 -0
  204. pythinker_code/ui/shell/visualize/_btw_panel.py +224 -0
  205. pythinker_code/ui/shell/visualize/_input_router.py +48 -0
  206. pythinker_code/ui/shell/visualize/_interactive.py +523 -0
  207. pythinker_code/ui/shell/visualize/_live_view.py +826 -0
  208. pythinker_code/ui/shell/visualize/_question_panel.py +586 -0
  209. pythinker_code/ui/theme.py +241 -0
  210. pythinker_code/usage_ratelimit_cache.py +175 -0
  211. pythinker_code/utils/__init__.py +0 -0
  212. pythinker_code/utils/aiohttp.py +24 -0
  213. pythinker_code/utils/aioqueue.py +72 -0
  214. pythinker_code/utils/broadcast.py +37 -0
  215. pythinker_code/utils/changelog.py +108 -0
  216. pythinker_code/utils/clipboard.py +246 -0
  217. pythinker_code/utils/datetime.py +64 -0
  218. pythinker_code/utils/diff.py +135 -0
  219. pythinker_code/utils/editor.py +91 -0
  220. pythinker_code/utils/environment.py +73 -0
  221. pythinker_code/utils/envvar.py +22 -0
  222. pythinker_code/utils/export.py +696 -0
  223. pythinker_code/utils/file_filter.py +375 -0
  224. pythinker_code/utils/frontmatter.py +70 -0
  225. pythinker_code/utils/io.py +27 -0
  226. pythinker_code/utils/logging.py +146 -0
  227. pythinker_code/utils/media_tags.py +29 -0
  228. pythinker_code/utils/message.py +24 -0
  229. pythinker_code/utils/path.py +199 -0
  230. pythinker_code/utils/proctitle.py +33 -0
  231. pythinker_code/utils/proxy.py +31 -0
  232. pythinker_code/utils/pyinstaller.py +45 -0
  233. pythinker_code/utils/rich/__init__.py +33 -0
  234. pythinker_code/utils/rich/columns.py +99 -0
  235. pythinker_code/utils/rich/diff_render.py +481 -0
  236. pythinker_code/utils/rich/markdown.py +900 -0
  237. pythinker_code/utils/rich/markdown_sample.md +108 -0
  238. pythinker_code/utils/rich/markdown_sample_short.md +2 -0
  239. pythinker_code/utils/rich/syntax.py +114 -0
  240. pythinker_code/utils/sensitive.py +54 -0
  241. pythinker_code/utils/server.py +121 -0
  242. pythinker_code/utils/signals.py +43 -0
  243. pythinker_code/utils/slashcmd.py +124 -0
  244. pythinker_code/utils/string.py +41 -0
  245. pythinker_code/utils/subprocess_env.py +73 -0
  246. pythinker_code/utils/term.py +168 -0
  247. pythinker_code/utils/typing.py +20 -0
  248. pythinker_code/vis/__init__.py +0 -0
  249. pythinker_code/vis/api/__init__.py +5 -0
  250. pythinker_code/vis/api/sessions.py +687 -0
  251. pythinker_code/vis/api/statistics.py +209 -0
  252. pythinker_code/vis/api/system.py +19 -0
  253. pythinker_code/vis/app.py +175 -0
  254. pythinker_code/vis/static/assets/highlighted-body-B3W2YXNL-D2MTYyJz.js +1 -0
  255. pythinker_code/vis/static/assets/index-CezafTt_.js +185 -0
  256. pythinker_code/vis/static/assets/index-DSRInNnm.css +1 -0
  257. pythinker_code/vis/static/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  258. pythinker_code/vis/static/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  259. pythinker_code/vis/static/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  260. pythinker_code/vis/static/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  261. pythinker_code/vis/static/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  262. pythinker_code/vis/static/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  263. pythinker_code/vis/static/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  264. pythinker_code/vis/static/index.html +17 -0
  265. pythinker_code/web/__init__.py +5 -0
  266. pythinker_code/web/api/__init__.py +15 -0
  267. pythinker_code/web/api/config.py +208 -0
  268. pythinker_code/web/api/open_in.py +199 -0
  269. pythinker_code/web/api/sessions.py +1225 -0
  270. pythinker_code/web/app.py +451 -0
  271. pythinker_code/web/auth.py +191 -0
  272. pythinker_code/web/models.py +98 -0
  273. pythinker_code/web/runner/__init__.py +5 -0
  274. pythinker_code/web/runner/messages.py +57 -0
  275. pythinker_code/web/runner/process.py +754 -0
  276. pythinker_code/web/runner/worker.py +97 -0
  277. pythinker_code/web/static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  278. pythinker_code/web/static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  279. pythinker_code/web/static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  280. pythinker_code/web/static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  281. pythinker_code/web/static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  282. pythinker_code/web/static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  283. pythinker_code/web/static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  284. pythinker_code/web/static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  285. pythinker_code/web/static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  286. pythinker_code/web/static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  287. pythinker_code/web/static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  288. pythinker_code/web/static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  289. pythinker_code/web/static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  290. pythinker_code/web/static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  291. pythinker_code/web/static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  292. pythinker_code/web/static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  293. pythinker_code/web/static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  294. pythinker_code/web/static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  295. pythinker_code/web/static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  296. pythinker_code/web/static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  297. pythinker_code/web/static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  298. pythinker_code/web/static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  299. pythinker_code/web/static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  300. pythinker_code/web/static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  301. pythinker_code/web/static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  302. pythinker_code/web/static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  303. pythinker_code/web/static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  304. pythinker_code/web/static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  305. pythinker_code/web/static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  306. pythinker_code/web/static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  307. pythinker_code/web/static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  308. pythinker_code/web/static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  309. pythinker_code/web/static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  310. pythinker_code/web/static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  311. pythinker_code/web/static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  312. pythinker_code/web/static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  313. pythinker_code/web/static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  314. pythinker_code/web/static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  315. pythinker_code/web/static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  316. pythinker_code/web/static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  317. pythinker_code/web/static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  318. pythinker_code/web/static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  319. pythinker_code/web/static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  320. pythinker_code/web/static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  321. pythinker_code/web/static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  322. pythinker_code/web/static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  323. pythinker_code/web/static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  324. pythinker_code/web/static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  325. pythinker_code/web/static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  326. pythinker_code/web/static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  327. pythinker_code/web/static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  328. pythinker_code/web/static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  329. pythinker_code/web/static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  330. pythinker_code/web/static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  331. pythinker_code/web/static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  332. pythinker_code/web/static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  333. pythinker_code/web/static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  334. pythinker_code/web/static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  335. pythinker_code/web/static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  336. pythinker_code/web/static/assets/_baseUniq--dyU3g5v.js +1 -0
  337. pythinker_code/web/static/assets/abap-BdImnpbu.js +1 -0
  338. pythinker_code/web/static/assets/actionscript-3-CfeIJUat.js +1 -0
  339. pythinker_code/web/static/assets/ada-bCR0ucgS.js +1 -0
  340. pythinker_code/web/static/assets/andromeeda-C-Jbm3Hp.js +1 -0
  341. pythinker_code/web/static/assets/angular-html-CU67Zn6k.js +1 -0
  342. pythinker_code/web/static/assets/angular-ts-BwZT4LLn.js +1 -0
  343. pythinker_code/web/static/assets/apache-Pmp26Uib.js +1 -0
  344. pythinker_code/web/static/assets/apex-D8_7TLub.js +1 -0
  345. pythinker_code/web/static/assets/apl-dKokRX4l.js +1 -0
  346. pythinker_code/web/static/assets/applescript-Co6uUVPk.js +1 -0
  347. pythinker_code/web/static/assets/ara-BRHolxvo.js +1 -0
  348. pythinker_code/web/static/assets/arc-DkMjLpYa.js +1 -0
  349. pythinker_code/web/static/assets/architectureDiagram-VXUJARFQ-CHWVaGo9.js +36 -0
  350. pythinker_code/web/static/assets/asciidoc-Dv7Oe6Be.js +1 -0
  351. pythinker_code/web/static/assets/asm-D_Q5rh1f.js +1 -0
  352. pythinker_code/web/static/assets/astro-CbQHKStN.js +1 -0
  353. pythinker_code/web/static/assets/aurora-x-D-2ljcwZ.js +1 -0
  354. pythinker_code/web/static/assets/awk-DMzUqQB5.js +1 -0
  355. pythinker_code/web/static/assets/ayu-dark-CmMr59Fi.js +1 -0
  356. pythinker_code/web/static/assets/ballerina-BFfxhgS-.js +1 -0
  357. pythinker_code/web/static/assets/bat-BkioyH1T.js +1 -0
  358. pythinker_code/web/static/assets/beancount-k_qm7-4y.js +1 -0
  359. pythinker_code/web/static/assets/berry-uYugtg8r.js +1 -0
  360. pythinker_code/web/static/assets/bibtex-CHM0blh-.js +1 -0
  361. pythinker_code/web/static/assets/bicep-Bmn6On1c.js +1 -0
  362. pythinker_code/web/static/assets/blade-D4QpJJKB.js +1 -0
  363. pythinker_code/web/static/assets/blockDiagram-VD42YOAC-DzdKe497.js +122 -0
  364. pythinker_code/web/static/assets/bsl-BO_Y6i37.js +1 -0
  365. pythinker_code/web/static/assets/c-BIGW1oBm.js +1 -0
  366. pythinker_code/web/static/assets/c3-VCDPK7BO.js +1 -0
  367. pythinker_code/web/static/assets/c4Diagram-YG6GDRKO-D84Blotg.js +10 -0
  368. pythinker_code/web/static/assets/cadence-Bv_4Rxtq.js +1 -0
  369. pythinker_code/web/static/assets/cairo-KRGpt6FW.js +1 -0
  370. pythinker_code/web/static/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  371. pythinker_code/web/static/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  372. pythinker_code/web/static/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  373. pythinker_code/web/static/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  374. pythinker_code/web/static/assets/channel-CllSjjdl.js +1 -0
  375. pythinker_code/web/static/assets/chunk-4BX2VUAB-C9w8wleE.js +1 -0
  376. pythinker_code/web/static/assets/chunk-55IACEB6-YlYJ8HnF.js +1 -0
  377. pythinker_code/web/static/assets/chunk-B4BG7PRW-Bwtz_AHU.js +165 -0
  378. pythinker_code/web/static/assets/chunk-DI55MBZ5-BbEHkl8h.js +220 -0
  379. pythinker_code/web/static/assets/chunk-FMBD7UC4-BKPbvjLC.js +15 -0
  380. pythinker_code/web/static/assets/chunk-QN33PNHL-D73dQvKf.js +1 -0
  381. pythinker_code/web/static/assets/chunk-QZHKN3VN-zGiLKes_.js +1 -0
  382. pythinker_code/web/static/assets/chunk-TZMSLE5B-LHJCi2fy.js +1 -0
  383. pythinker_code/web/static/assets/clarity-D53aC0YG.js +1 -0
  384. pythinker_code/web/static/assets/classDiagram-2ON5EDUG-vX27iZwa.js +1 -0
  385. pythinker_code/web/static/assets/classDiagram-v2-WZHVMYZB-vX27iZwa.js +1 -0
  386. pythinker_code/web/static/assets/clojure-P80f7IUj.js +1 -0
  387. pythinker_code/web/static/assets/clone-DYBkaPm2.js +1 -0
  388. pythinker_code/web/static/assets/cmake-D1j8_8rp.js +1 -0
  389. pythinker_code/web/static/assets/cobol-nwyudZeR.js +1 -0
  390. pythinker_code/web/static/assets/code-block-IT6T5CEO-NtKViZGl.js +2 -0
  391. pythinker_code/web/static/assets/codeowners-Bp6g37R7.js +1 -0
  392. pythinker_code/web/static/assets/codeql-DsOJ9woJ.js +1 -0
  393. pythinker_code/web/static/assets/coffee-Ch7k5sss.js +1 -0
  394. pythinker_code/web/static/assets/common-lisp-Cg-RD9OK.js +1 -0
  395. pythinker_code/web/static/assets/coq-DkFqJrB1.js +1 -0
  396. pythinker_code/web/static/assets/cose-bilkent-S5V4N54A-DialjZpd.js +1 -0
  397. pythinker_code/web/static/assets/cpp-CofmeUqb.js +1 -0
  398. pythinker_code/web/static/assets/crystal-tKQVLTB8.js +1 -0
  399. pythinker_code/web/static/assets/csharp-K5feNrxe.js +1 -0
  400. pythinker_code/web/static/assets/css-DPfMkruS.js +1 -0
  401. pythinker_code/web/static/assets/csv-fuZLfV_i.js +1 -0
  402. pythinker_code/web/static/assets/cue-D82EKSYY.js +1 -0
  403. pythinker_code/web/static/assets/cypher-COkxafJQ.js +1 -0
  404. pythinker_code/web/static/assets/cytoscape.esm-C_Fzpdck.js +321 -0
  405. pythinker_code/web/static/assets/d-85-TOEBH.js +1 -0
  406. pythinker_code/web/static/assets/dagre-6UL2VRFP-DfuvkZZ7.js +4 -0
  407. pythinker_code/web/static/assets/dark-plus-C3mMm8J8.js +1 -0
  408. pythinker_code/web/static/assets/dart-CF10PKvl.js +1 -0
  409. pythinker_code/web/static/assets/dax-CEL-wOlO.js +1 -0
  410. pythinker_code/web/static/assets/defaultLocale-DX6XiGOO.js +1 -0
  411. pythinker_code/web/static/assets/desktop-BmXAJ9_W.js +1 -0
  412. pythinker_code/web/static/assets/diagram-PSM6KHXK-DLGctX3v.js +24 -0
  413. pythinker_code/web/static/assets/diagram-QEK2KX5R-DnxN6S0F.js +43 -0
  414. pythinker_code/web/static/assets/diagram-S2PKOQOG-Caq_Set9.js +24 -0
  415. pythinker_code/web/static/assets/diff-D97Zzqfu.js +1 -0
  416. pythinker_code/web/static/assets/docker-BcOcwvcX.js +1 -0
  417. pythinker_code/web/static/assets/dotenv-Da5cRb03.js +1 -0
  418. pythinker_code/web/static/assets/dracula-BzJJZx-M.js +1 -0
  419. pythinker_code/web/static/assets/dracula-soft-BXkSAIEj.js +1 -0
  420. pythinker_code/web/static/assets/dream-maker-BtqSS_iP.js +1 -0
  421. pythinker_code/web/static/assets/edge-BkV0erSs.js +1 -0
  422. pythinker_code/web/static/assets/elixir-CDX3lj18.js +1 -0
  423. pythinker_code/web/static/assets/elm-DbKCFpqz.js +1 -0
  424. pythinker_code/web/static/assets/emacs-lisp-C9XAeP06.js +1 -0
  425. pythinker_code/web/static/assets/erDiagram-Q2GNP2WA-BgTfALoK.js +60 -0
  426. pythinker_code/web/static/assets/erb-BOJIQeun.js +1 -0
  427. pythinker_code/web/static/assets/erlang-DsQrWhSR.js +1 -0
  428. pythinker_code/web/static/assets/everforest-dark-BgDCqdQA.js +1 -0
  429. pythinker_code/web/static/assets/everforest-light-C8M2exoo.js +1 -0
  430. pythinker_code/web/static/assets/fennel-BYunw83y.js +1 -0
  431. pythinker_code/web/static/assets/fish-BvzEVeQv.js +1 -0
  432. pythinker_code/web/static/assets/flowDiagram-NV44I4VS-QjW_fnGi.js +162 -0
  433. pythinker_code/web/static/assets/fluent-C4IJs8-o.js +1 -0
  434. pythinker_code/web/static/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
  435. pythinker_code/web/static/assets/fortran-free-form-BxgE0vQu.js +1 -0
  436. pythinker_code/web/static/assets/fsharp-CXgrBDvD.js +1 -0
  437. pythinker_code/web/static/assets/ganttDiagram-JELNMOA3-fqi8JFof.js +267 -0
  438. pythinker_code/web/static/assets/gdresource-B7Tvp0Sc.js +1 -0
  439. pythinker_code/web/static/assets/gdscript-DTMYz4Jt.js +1 -0
  440. pythinker_code/web/static/assets/gdshader-DkwncUOv.js +1 -0
  441. pythinker_code/web/static/assets/genie-D0YGMca9.js +1 -0
  442. pythinker_code/web/static/assets/gherkin-DyxjwDmM.js +1 -0
  443. pythinker_code/web/static/assets/git-commit-F4YmCXRG.js +1 -0
  444. pythinker_code/web/static/assets/git-rebase-r7XF79zn.js +1 -0
  445. pythinker_code/web/static/assets/gitGraphDiagram-NY62KEGX-i7o6VQ8x.js +65 -0
  446. pythinker_code/web/static/assets/github-dark-DHJKELXO.js +1 -0
  447. pythinker_code/web/static/assets/github-dark-default-Cuk6v7N8.js +1 -0
  448. pythinker_code/web/static/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  449. pythinker_code/web/static/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  450. pythinker_code/web/static/assets/github-light-DAi9KRSo.js +1 -0
  451. pythinker_code/web/static/assets/github-light-default-D7oLnXFd.js +1 -0
  452. pythinker_code/web/static/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
  453. pythinker_code/web/static/assets/gleam-BspZqrRM.js +1 -0
  454. pythinker_code/web/static/assets/glimmer-js-Rg0-pVw9.js +1 -0
  455. pythinker_code/web/static/assets/glimmer-ts-U6CK756n.js +1 -0
  456. pythinker_code/web/static/assets/glsl-DplSGwfg.js +1 -0
  457. pythinker_code/web/static/assets/gn-n2N0HUVH.js +1 -0
  458. pythinker_code/web/static/assets/gnuplot-DdkO51Og.js +1 -0
  459. pythinker_code/web/static/assets/go-Dn2_MT6a.js +1 -0
  460. pythinker_code/web/static/assets/graph-C0vZK2pT.js +1 -0
  461. pythinker_code/web/static/assets/graphql-ChdNCCLP.js +1 -0
  462. pythinker_code/web/static/assets/groovy-gcz8RCvz.js +1 -0
  463. pythinker_code/web/static/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  464. pythinker_code/web/static/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  465. pythinker_code/web/static/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  466. pythinker_code/web/static/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  467. pythinker_code/web/static/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  468. pythinker_code/web/static/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  469. pythinker_code/web/static/assets/hack-CaT9iCJl.js +1 -0
  470. pythinker_code/web/static/assets/haml-B8DHNrY2.js +1 -0
  471. pythinker_code/web/static/assets/handlebars-BL8al0AC.js +1 -0
  472. pythinker_code/web/static/assets/haskell-Df6bDoY_.js +1 -0
  473. pythinker_code/web/static/assets/haxe-CzTSHFRz.js +1 -0
  474. pythinker_code/web/static/assets/hcl-BWvSN4gD.js +1 -0
  475. pythinker_code/web/static/assets/hjson-D5-asLiD.js +1 -0
  476. pythinker_code/web/static/assets/hlsl-D3lLCCz7.js +1 -0
  477. pythinker_code/web/static/assets/houston-DnULxvSX.js +1 -0
  478. pythinker_code/web/static/assets/html-GMplVEZG.js +1 -0
  479. pythinker_code/web/static/assets/html-derivative-BFtXZ54Q.js +1 -0
  480. pythinker_code/web/static/assets/http-jrhK8wxY.js +1 -0
  481. pythinker_code/web/static/assets/hurl-irOxFIW8.js +1 -0
  482. pythinker_code/web/static/assets/hxml-Bvhsp5Yf.js +1 -0
  483. pythinker_code/web/static/assets/hy-DFXneXwc.js +1 -0
  484. pythinker_code/web/static/assets/imba-DGztddWO.js +1 -0
  485. pythinker_code/web/static/assets/index-BYCCk6-K.js +153 -0
  486. pythinker_code/web/static/assets/index-BpoLgcEt.js +1 -0
  487. pythinker_code/web/static/assets/index-Cpy4G3uJ.js +2 -0
  488. pythinker_code/web/static/assets/index-CzV_vCfu.css +1 -0
  489. pythinker_code/web/static/assets/index-DI2oedCt.js +19 -0
  490. pythinker_code/web/static/assets/index-DdIkp80K.js +5 -0
  491. pythinker_code/web/static/assets/infoDiagram-WHAUD3N6-BMPpeZSM.js +2 -0
  492. pythinker_code/web/static/assets/ini-BEwlwnbL.js +1 -0
  493. pythinker_code/web/static/assets/init-Gi6I4Gst.js +1 -0
  494. pythinker_code/web/static/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
  495. pythinker_code/web/static/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
  496. pythinker_code/web/static/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
  497. pythinker_code/web/static/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
  498. pythinker_code/web/static/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
  499. pythinker_code/web/static/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
  500. pythinker_code/web/static/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
  501. pythinker_code/web/static/assets/java-CylS5w8V.js +1 -0
  502. pythinker_code/web/static/assets/javascript-wDzz0qaB.js +1 -0
  503. pythinker_code/web/static/assets/jinja-4LBKfQ-Z.js +1 -0
  504. pythinker_code/web/static/assets/jison-wvAkD_A8.js +1 -0
  505. pythinker_code/web/static/assets/journeyDiagram-XKPGCS4Q-DAM7gngo.js +139 -0
  506. pythinker_code/web/static/assets/json-Cp-IABpG.js +1 -0
  507. pythinker_code/web/static/assets/json5-C9tS-k6U.js +1 -0
  508. pythinker_code/web/static/assets/jsonc-Des-eS-w.js +1 -0
  509. pythinker_code/web/static/assets/jsonl-DcaNXYhu.js +1 -0
  510. pythinker_code/web/static/assets/jsonnet-DFQXde-d.js +1 -0
  511. pythinker_code/web/static/assets/jssm-C2t-YnRu.js +1 -0
  512. pythinker_code/web/static/assets/jsx-g9-lgVsj.js +1 -0
  513. pythinker_code/web/static/assets/julia-CxzCAyBv.js +1 -0
  514. pythinker_code/web/static/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  515. pythinker_code/web/static/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  516. pythinker_code/web/static/assets/kanagawa-wave-DWedfzmr.js +1 -0
  517. pythinker_code/web/static/assets/kanban-definition-3W4ZIXB7-ChpBpV0k.js +89 -0
  518. pythinker_code/web/static/assets/katex-D2lIc1rk.css +1 -0
  519. pythinker_code/web/static/assets/kdl-DV7GczEv.js +1 -0
  520. pythinker_code/web/static/assets/kotlin-BdnUsdx6.js +1 -0
  521. pythinker_code/web/static/assets/kusto-DZf3V79B.js +1 -0
  522. pythinker_code/web/static/assets/laserwave-DUszq2jm.js +1 -0
  523. pythinker_code/web/static/assets/latex-B4uzh10-.js +1 -0
  524. pythinker_code/web/static/assets/layout-C3Jp1gKO.js +1 -0
  525. pythinker_code/web/static/assets/lean-BZvkOJ9d.js +1 -0
  526. pythinker_code/web/static/assets/less-B1dDrJ26.js +1 -0
  527. pythinker_code/web/static/assets/light-plus-B7mTdjB0.js +1 -0
  528. pythinker_code/web/static/assets/linear-BGHtL1N4.js +1 -0
  529. pythinker_code/web/static/assets/liquid-DYVedYrR.js +1 -0
  530. pythinker_code/web/static/assets/llvm-BtvRca6l.js +1 -0
  531. pythinker_code/web/static/assets/log-2UxHyX5q.js +1 -0
  532. pythinker_code/web/static/assets/logo-BtOb2qkB.js +1 -0
  533. pythinker_code/web/static/assets/lua-BbnMAYS6.js +1 -0
  534. pythinker_code/web/static/assets/luau-C-HG3fhB.js +1 -0
  535. pythinker_code/web/static/assets/make-CHLpvVh8.js +1 -0
  536. pythinker_code/web/static/assets/markdown-Cvjx9yec.js +1 -0
  537. pythinker_code/web/static/assets/marko-DZsq8hO1.js +1 -0
  538. pythinker_code/web/static/assets/material-theme-D5KoaKCx.js +1 -0
  539. pythinker_code/web/static/assets/material-theme-darker-BfHTSMKl.js +1 -0
  540. pythinker_code/web/static/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  541. pythinker_code/web/static/assets/material-theme-ocean-CyktbL80.js +1 -0
  542. pythinker_code/web/static/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  543. pythinker_code/web/static/assets/matlab-D7o27uSR.js +1 -0
  544. pythinker_code/web/static/assets/mdc-DUICxH0z.js +1 -0
  545. pythinker_code/web/static/assets/mdx-Cmh6b_Ma.js +1 -0
  546. pythinker_code/web/static/assets/mermaid-VLURNSYL-B2P5VJ9v.css +1 -0
  547. pythinker_code/web/static/assets/mermaid-VLURNSYL-C_HW6koB.js +465 -0
  548. pythinker_code/web/static/assets/mermaid-mWjccvbQ.js +1 -0
  549. pythinker_code/web/static/assets/mermaid.core-CnT4VrPC.js +191 -0
  550. pythinker_code/web/static/assets/min-Dn5VRVmX.js +1 -0
  551. pythinker_code/web/static/assets/min-dark-CafNBF8u.js +1 -0
  552. pythinker_code/web/static/assets/min-light-CTRr51gU.js +1 -0
  553. pythinker_code/web/static/assets/mindmap-definition-VGOIOE7T-x8EwhfIt.js +68 -0
  554. pythinker_code/web/static/assets/mipsasm-CKIfxQSi.js +1 -0
  555. pythinker_code/web/static/assets/mojo-B93PlW-d.js +1 -0
  556. pythinker_code/web/static/assets/monokai-D4h5O-jR.js +1 -0
  557. pythinker_code/web/static/assets/moonbit-Ba13S78F.js +1 -0
  558. pythinker_code/web/static/assets/move-Bu9oaDYs.js +1 -0
  559. pythinker_code/web/static/assets/narrat-DRg8JJMk.js +1 -0
  560. pythinker_code/web/static/assets/nextflow-BrzmwbiE.js +1 -0
  561. pythinker_code/web/static/assets/nginx-DknmC5AR.js +1 -0
  562. pythinker_code/web/static/assets/night-owl-C39BiMTA.js +1 -0
  563. pythinker_code/web/static/assets/nim-CVrawwO9.js +1 -0
  564. pythinker_code/web/static/assets/nix-CwoSXNpI.js +1 -0
  565. pythinker_code/web/static/assets/nord-Ddv68eIx.js +1 -0
  566. pythinker_code/web/static/assets/nushell-C-sUppwS.js +1 -0
  567. pythinker_code/web/static/assets/objective-c-DXmwc3jG.js +1 -0
  568. pythinker_code/web/static/assets/objective-cpp-CLxacb5B.js +1 -0
  569. pythinker_code/web/static/assets/ocaml-C0hk2d4L.js +1 -0
  570. pythinker_code/web/static/assets/one-dark-pro-DVMEJ2y_.js +1 -0
  571. pythinker_code/web/static/assets/one-light-PoHY5YXO.js +1 -0
  572. pythinker_code/web/static/assets/openscad-C4EeE6gA.js +1 -0
  573. pythinker_code/web/static/assets/ordinal-Cboi1Yqb.js +1 -0
  574. pythinker_code/web/static/assets/pascal-D93ZcfNL.js +1 -0
  575. pythinker_code/web/static/assets/perl-C0TMdlhV.js +1 -0
  576. pythinker_code/web/static/assets/php-CDn_0X-4.js +1 -0
  577. pythinker_code/web/static/assets/pieDiagram-ADFJNKIX-DgxBKGz2.js +30 -0
  578. pythinker_code/web/static/assets/pkl-u5AG7uiY.js +1 -0
  579. pythinker_code/web/static/assets/plastic-3e1v2bzS.js +1 -0
  580. pythinker_code/web/static/assets/plsql-ChMvpjG-.js +1 -0
  581. pythinker_code/web/static/assets/po-BTJTHyun.js +1 -0
  582. pythinker_code/web/static/assets/poimandres-CS3Unz2-.js +1 -0
  583. pythinker_code/web/static/assets/polar-C0HS_06l.js +1 -0
  584. pythinker_code/web/static/assets/postcss-CXtECtnM.js +1 -0
  585. pythinker_code/web/static/assets/powerquery-CEu0bR-o.js +1 -0
  586. pythinker_code/web/static/assets/powershell-Dpen1YoG.js +1 -0
  587. pythinker_code/web/static/assets/prisma-Dd19v3D-.js +1 -0
  588. pythinker_code/web/static/assets/prolog-CbFg5uaA.js +1 -0
  589. pythinker_code/web/static/assets/proto-C7zT0LnQ.js +1 -0
  590. pythinker_code/web/static/assets/pug-CGlum2m_.js +1 -0
  591. pythinker_code/web/static/assets/puppet-BMWR74SV.js +1 -0
  592. pythinker_code/web/static/assets/purescript-CklMAg4u.js +1 -0
  593. pythinker_code/web/static/assets/python-B6aJPvgy.js +1 -0
  594. pythinker_code/web/static/assets/qml-3beO22l8.js +1 -0
  595. pythinker_code/web/static/assets/qmldir-C8lEn-DE.js +1 -0
  596. pythinker_code/web/static/assets/qss-IeuSbFQv.js +1 -0
  597. pythinker_code/web/static/assets/quadrantDiagram-AYHSOK5B-DSpe_dqk.js +7 -0
  598. pythinker_code/web/static/assets/r-Dspwwk_N.js +1 -0
  599. pythinker_code/web/static/assets/racket-BqYA7rlc.js +1 -0
  600. pythinker_code/web/static/assets/raku-DXvB9xmW.js +1 -0
  601. pythinker_code/web/static/assets/razor-C1TweQQi.js +1 -0
  602. pythinker_code/web/static/assets/red-bN70gL4F.js +1 -0
  603. pythinker_code/web/static/assets/reg-C-SQnVFl.js +1 -0
  604. pythinker_code/web/static/assets/regexp-CDVJQ6XC.js +1 -0
  605. pythinker_code/web/static/assets/rel-C3B-1QV4.js +1 -0
  606. pythinker_code/web/static/assets/requirementDiagram-UZGBJVZJ-8o9hozL-.js +64 -0
  607. pythinker_code/web/static/assets/riscv-BM1_JUlF.js +1 -0
  608. pythinker_code/web/static/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  609. pythinker_code/web/static/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  610. pythinker_code/web/static/assets/rose-pine-qdsjHGoJ.js +1 -0
  611. pythinker_code/web/static/assets/rosmsg-BJDFO7_C.js +1 -0
  612. pythinker_code/web/static/assets/rst-B0xPkSld.js +1 -0
  613. pythinker_code/web/static/assets/ruby-BvKwtOVI.js +1 -0
  614. pythinker_code/web/static/assets/rust-B1yitclQ.js +1 -0
  615. pythinker_code/web/static/assets/sankeyDiagram-TZEHDZUN-BLOSUixH.js +10 -0
  616. pythinker_code/web/static/assets/sas-cz2c8ADy.js +1 -0
  617. pythinker_code/web/static/assets/sass-Cj5Yp3dK.js +1 -0
  618. pythinker_code/web/static/assets/scala-C151Ov-r.js +1 -0
  619. pythinker_code/web/static/assets/scheme-C98Dy4si.js +1 -0
  620. pythinker_code/web/static/assets/scss-OYdSNvt2.js +1 -0
  621. pythinker_code/web/static/assets/sdbl-DVxCFoDh.js +1 -0
  622. pythinker_code/web/static/assets/sequenceDiagram-WL72ISMW-6F2G8JTU.js +145 -0
  623. pythinker_code/web/static/assets/shaderlab-Dg9Lc6iA.js +1 -0
  624. pythinker_code/web/static/assets/shellscript-Yzrsuije.js +1 -0
  625. pythinker_code/web/static/assets/shellsession-BADoaaVG.js +1 -0
  626. pythinker_code/web/static/assets/slack-dark-BthQWCQV.js +1 -0
  627. pythinker_code/web/static/assets/slack-ochin-DqwNpetd.js +1 -0
  628. pythinker_code/web/static/assets/smalltalk-BERRCDM3.js +1 -0
  629. pythinker_code/web/static/assets/snazzy-light-Bw305WKR.js +1 -0
  630. pythinker_code/web/static/assets/solarized-dark-DXbdFlpD.js +1 -0
  631. pythinker_code/web/static/assets/solarized-light-L9t79GZl.js +1 -0
  632. pythinker_code/web/static/assets/solidity-rGO070M0.js +1 -0
  633. pythinker_code/web/static/assets/soy-Brmx7dQM.js +1 -0
  634. pythinker_code/web/static/assets/sparql-rVzFXLq3.js +1 -0
  635. pythinker_code/web/static/assets/splunk-BtCnVYZw.js +1 -0
  636. pythinker_code/web/static/assets/sql-BLtJtn59.js +1 -0
  637. pythinker_code/web/static/assets/ssh-config-_ykCGR6B.js +1 -0
  638. pythinker_code/web/static/assets/stata-BH5u7GGu.js +1 -0
  639. pythinker_code/web/static/assets/stateDiagram-FKZM4ZOC-DP8xP0iJ.js +1 -0
  640. pythinker_code/web/static/assets/stateDiagram-v2-4FDKWEC3-1l6-EZNX.js +1 -0
  641. pythinker_code/web/static/assets/stylus-BEDo0Tqx.js +1 -0
  642. pythinker_code/web/static/assets/svelte-zxCyuUbr.js +1 -0
  643. pythinker_code/web/static/assets/swift-Dg5xB15N.js +1 -0
  644. pythinker_code/web/static/assets/synthwave-84-CbfX1IO0.js +1 -0
  645. pythinker_code/web/static/assets/system-verilog-CnnmHF94.js +1 -0
  646. pythinker_code/web/static/assets/systemd-4A_iFExJ.js +1 -0
  647. pythinker_code/web/static/assets/talonscript-CkByrt1z.js +1 -0
  648. pythinker_code/web/static/assets/tasl-QIJgUcNo.js +1 -0
  649. pythinker_code/web/static/assets/tcl-dwOrl1Do.js +1 -0
  650. pythinker_code/web/static/assets/templ-W15q3VgB.js +1 -0
  651. pythinker_code/web/static/assets/terraform-BETggiCN.js +1 -0
  652. pythinker_code/web/static/assets/tex-CvyZ59Mk.js +1 -0
  653. pythinker_code/web/static/assets/timeline-definition-IT6M3QCI-DMgruDfK.js +61 -0
  654. pythinker_code/web/static/assets/tokyo-night-hegEt444.js +1 -0
  655. pythinker_code/web/static/assets/toml-vGWfd6FD.js +1 -0
  656. pythinker_code/web/static/assets/treemap-KMMF4GRG-Bo9ZkrAK.js +128 -0
  657. pythinker_code/web/static/assets/ts-tags-zn1MmPIZ.js +1 -0
  658. pythinker_code/web/static/assets/tsv-B_m7g4N7.js +1 -0
  659. pythinker_code/web/static/assets/tsx-COt5Ahok.js +1 -0
  660. pythinker_code/web/static/assets/turtle-BsS91CYL.js +1 -0
  661. pythinker_code/web/static/assets/twig-CO9l9SDP.js +1 -0
  662. pythinker_code/web/static/assets/typescript-BPQ3VLAy.js +1 -0
  663. pythinker_code/web/static/assets/typespec-BGHnOYBU.js +1 -0
  664. pythinker_code/web/static/assets/typst-DHCkPAjA.js +1 -0
  665. pythinker_code/web/static/assets/v-BcVCzyr7.js +1 -0
  666. pythinker_code/web/static/assets/vala-CsfeWuGM.js +1 -0
  667. pythinker_code/web/static/assets/vb-D17OF-Vu.js +1 -0
  668. pythinker_code/web/static/assets/verilog-BQ8w6xss.js +1 -0
  669. pythinker_code/web/static/assets/vesper-DU1UobuO.js +1 -0
  670. pythinker_code/web/static/assets/vhdl-CeAyd5Ju.js +1 -0
  671. pythinker_code/web/static/assets/viml-CJc9bBzg.js +1 -0
  672. pythinker_code/web/static/assets/vitesse-black-Bkuqu6BP.js +1 -0
  673. pythinker_code/web/static/assets/vitesse-dark-D0r3Knsf.js +1 -0
  674. pythinker_code/web/static/assets/vitesse-light-CVO1_9PV.js +1 -0
  675. pythinker_code/web/static/assets/vue-DN_0RTcg.js +1 -0
  676. pythinker_code/web/static/assets/vue-html-AaS7Mt5G.js +1 -0
  677. pythinker_code/web/static/assets/vue-vine-CQOfvN7w.js +1 -0
  678. pythinker_code/web/static/assets/vyper-CDx5xZoG.js +1 -0
  679. pythinker_code/web/static/assets/wasm-CG6Dc4jp.js +1 -0
  680. pythinker_code/web/static/assets/wasm-MzD3tlZU.js +1 -0
  681. pythinker_code/web/static/assets/wenyan-BV7otONQ.js +1 -0
  682. pythinker_code/web/static/assets/wgsl-Dx-B1_4e.js +1 -0
  683. pythinker_code/web/static/assets/wikitext-BhOHFoWU.js +1 -0
  684. pythinker_code/web/static/assets/wit-5i3qLPDT.js +1 -0
  685. pythinker_code/web/static/assets/wolfram-lXgVvXCa.js +1 -0
  686. pythinker_code/web/static/assets/xml-sdJ4AIDG.js +1 -0
  687. pythinker_code/web/static/assets/xsl-CtQFsRM5.js +1 -0
  688. pythinker_code/web/static/assets/xychartDiagram-PRI3JC2R-GeF2johi.js +7 -0
  689. pythinker_code/web/static/assets/yaml-Buea-lGh.js +1 -0
  690. pythinker_code/web/static/assets/zenscript-DVFEvuxE.js +1 -0
  691. pythinker_code/web/static/assets/zig-VOosw3JB.js +1 -0
  692. pythinker_code/web/static/brand/apple-touch-icon.png +0 -0
  693. pythinker_code/web/static/brand/arctecture.webp +0 -0
  694. pythinker_code/web/static/brand/bimi-logo.svg +46 -0
  695. pythinker_code/web/static/brand/favicon.ico +0 -0
  696. pythinker_code/web/static/brand/fonts/dm-sans-latin-ext.woff2 +0 -0
  697. pythinker_code/web/static/brand/fonts/dm-sans-latin.woff2 +0 -0
  698. pythinker_code/web/static/brand/fonts/instrument-sans-latin-ext.woff2 +0 -0
  699. pythinker_code/web/static/brand/fonts/instrument-sans-latin.woff2 +0 -0
  700. pythinker_code/web/static/brand/fonts/instrument-serif-latin-ext.woff2 +0 -0
  701. pythinker_code/web/static/brand/fonts/instrument-serif-latin.woff2 +0 -0
  702. pythinker_code/web/static/brand/fonts/libre-baskerville-italic-latin-ext.woff2 +0 -0
  703. pythinker_code/web/static/brand/fonts/libre-baskerville-italic-latin.woff2 +0 -0
  704. pythinker_code/web/static/brand/fonts/libre-baskerville-latin-ext.woff2 +0 -0
  705. pythinker_code/web/static/brand/fonts/libre-baskerville-latin.woff2 +0 -0
  706. pythinker_code/web/static/brand/fonts/roboto-latin-ext.woff2 +0 -0
  707. pythinker_code/web/static/brand/fonts/roboto-latin.woff2 +0 -0
  708. pythinker_code/web/static/brand/icon-192.png +0 -0
  709. pythinker_code/web/static/brand/icon-512.png +0 -0
  710. pythinker_code/web/static/brand/icon.svg +1 -0
  711. pythinker_code/web/static/brand/logo.png +0 -0
  712. pythinker_code/web/static/brand/pythinker_animated.svg +79 -0
  713. pythinker_code/web/static/brand/robots.txt +4 -0
  714. pythinker_code/web/static/index.html +15 -0
  715. pythinker_code/web/static/logo.png +0 -0
  716. pythinker_code/web/store/__init__.py +1 -0
  717. pythinker_code/web/store/sessions.py +432 -0
  718. pythinker_code/wire/__init__.py +148 -0
  719. pythinker_code/wire/file.py +151 -0
  720. pythinker_code/wire/jsonrpc.py +263 -0
  721. pythinker_code/wire/protocol.py +2 -0
  722. pythinker_code/wire/root_hub.py +27 -0
  723. pythinker_code/wire/serde.py +26 -0
  724. pythinker_code/wire/server.py +1069 -0
  725. pythinker_code/wire/types.py +698 -0
  726. pythinker_code-2.0.0.dist-info/METADATA +660 -0
  727. pythinker_code-2.0.0.dist-info/RECORD +731 -0
  728. pythinker_code-2.0.0.dist-info/WHEEL +4 -0
  729. pythinker_code-2.0.0.dist-info/entry_points.txt +4 -0
  730. pythinker_code-2.0.0.dist-info/licenses/LICENSE +202 -0
  731. pythinker_code-2.0.0.dist-info/licenses/NOTICE +14 -0
@@ -0,0 +1,185 @@
1
+ function u5(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in e)){const l=Object.getOwnPropertyDescriptor(a,s);l&&Object.defineProperty(e,s,l.get?l:{enumerable:!0,get:()=>a[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const l of s)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(s){if(s.ep)return;s.ep=!0;const l=n(s);fetch(s.href,l)}})();function tf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var em={exports:{}},Ro={};var yE;function c5(){if(yE)return Ro;yE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,l){var u=null;if(l!==void 0&&(u=""+l),s.key!==void 0&&(u=""+s.key),"key"in s){l={};for(var f in s)f!=="key"&&(l[f]=s[f])}else l=s;return s=l.ref,{$$typeof:e,type:a,key:u,ref:s!==void 0?s:null,props:l}}return Ro.Fragment=t,Ro.jsx=n,Ro.jsxs=n,Ro}var EE;function d5(){return EE||(EE=1,em.exports=c5()),em.exports}var c=d5(),tm={exports:{}},Xe={};var TE;function f5(){if(TE)return Xe;TE=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),y=Symbol.iterator;function T(H){return H===null||typeof H!="object"?null:(H=y&&H[y]||H["@@iterator"],typeof H=="function"?H:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,N={};function _(H,Z,L){this.props=H,this.context=Z,this.refs=N,this.updater=L||S}_.prototype.isReactComponent={},_.prototype.setState=function(H,Z){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,Z,"setState")},_.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function A(){}A.prototype=_.prototype;function w(H,Z,L){this.props=H,this.context=Z,this.refs=N,this.updater=L||S}var P=w.prototype=new A;P.constructor=w,k(P,_.prototype),P.isPureReactComponent=!0;var F=Array.isArray;function M(){}var I={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function G(H,Z,L){var fe=L.ref;return{$$typeof:e,type:H,key:Z,ref:fe!==void 0?fe:null,props:L}}function B(H,Z){return G(H.type,Z,H.props)}function Q(H){return typeof H=="object"&&H!==null&&H.$$typeof===e}function V(H){var Z={"=":"=0",":":"=2"};return"$"+H.replace(/[=:]/g,function(L){return Z[L]})}var te=/\/+/g;function ee(H,Z){return typeof H=="object"&&H!==null&&H.key!=null?V(""+H.key):Z.toString(36)}function U(H){switch(H.status){case"fulfilled":return H.value;case"rejected":throw H.reason;default:switch(typeof H.status=="string"?H.then(M,M):(H.status="pending",H.then(function(Z){H.status==="pending"&&(H.status="fulfilled",H.value=Z)},function(Z){H.status==="pending"&&(H.status="rejected",H.reason=Z)})),H.status){case"fulfilled":return H.value;case"rejected":throw H.reason}}throw H}function R(H,Z,L,fe,Ne){var ve=typeof H;(ve==="undefined"||ve==="boolean")&&(H=null);var ge=!1;if(H===null)ge=!0;else switch(ve){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(H.$$typeof){case e:case t:ge=!0;break;case p:return ge=H._init,R(ge(H._payload),Z,L,fe,Ne)}}if(ge)return Ne=Ne(H),ge=fe===""?"."+ee(H,0):fe,F(Ne)?(L="",ge!=null&&(L=ge.replace(te,"$&/")+"/"),R(Ne,Z,L,"",function(Ae){return Ae})):Ne!=null&&(Q(Ne)&&(Ne=B(Ne,L+(Ne.key==null||H&&H.key===Ne.key?"":(""+Ne.key).replace(te,"$&/")+"/")+ge)),Z.push(Ne)),1;ge=0;var ue=fe===""?".":fe+":";if(F(H))for(var xe=0;xe<H.length;xe++)fe=H[xe],ve=ue+ee(fe,xe),ge+=R(fe,Z,L,ve,Ne);else if(xe=T(H),typeof xe=="function")for(H=xe.call(H),xe=0;!(fe=H.next()).done;)fe=fe.value,ve=ue+ee(fe,xe++),ge+=R(fe,Z,L,ve,Ne);else if(ve==="object"){if(typeof H.then=="function")return R(U(H),Z,L,fe,Ne);throw Z=String(H),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(H).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return ge}function q(H,Z,L){if(H==null)return H;var fe=[],Ne=0;return R(H,fe,"","",function(ve){return Z.call(L,ve,Ne++)}),fe}function W(H){if(H._status===-1){var Z=H._result;Z=Z(),Z.then(function(L){(H._status===0||H._status===-1)&&(H._status=1,H._result=L)},function(L){(H._status===0||H._status===-1)&&(H._status=2,H._result=L)}),H._status===-1&&(H._status=0,H._result=Z)}if(H._status===1)return H._result.default;throw H._result}var he=typeof reportError=="function"?reportError:function(H){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof H=="object"&&H!==null&&typeof H.message=="string"?String(H.message):String(H),error:H});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",H);return}console.error(H)},O={map:q,forEach:function(H,Z,L){q(H,function(){Z.apply(this,arguments)},L)},count:function(H){var Z=0;return q(H,function(){Z++}),Z},toArray:function(H){return q(H,function(Z){return Z})||[]},only:function(H){if(!Q(H))throw Error("React.Children.only expected to receive a single React element child.");return H}};return Xe.Activity=g,Xe.Children=O,Xe.Component=_,Xe.Fragment=n,Xe.Profiler=s,Xe.PureComponent=w,Xe.StrictMode=a,Xe.Suspense=h,Xe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Xe.__COMPILER_RUNTIME={__proto__:null,c:function(H){return I.H.useMemoCache(H)}},Xe.cache=function(H){return function(){return H.apply(null,arguments)}},Xe.cacheSignal=function(){return null},Xe.cloneElement=function(H,Z,L){if(H==null)throw Error("The argument must be a React element, but you passed "+H+".");var fe=k({},H.props),Ne=H.key;if(Z!=null)for(ve in Z.key!==void 0&&(Ne=""+Z.key),Z)!j.call(Z,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&Z.ref===void 0||(fe[ve]=Z[ve]);var ve=arguments.length-2;if(ve===1)fe.children=L;else if(1<ve){for(var ge=Array(ve),ue=0;ue<ve;ue++)ge[ue]=arguments[ue+2];fe.children=ge}return G(H.type,Ne,fe)},Xe.createContext=function(H){return H={$$typeof:u,_currentValue:H,_currentValue2:H,_threadCount:0,Provider:null,Consumer:null},H.Provider=H,H.Consumer={$$typeof:l,_context:H},H},Xe.createElement=function(H,Z,L){var fe,Ne={},ve=null;if(Z!=null)for(fe in Z.key!==void 0&&(ve=""+Z.key),Z)j.call(Z,fe)&&fe!=="key"&&fe!=="__self"&&fe!=="__source"&&(Ne[fe]=Z[fe]);var ge=arguments.length-2;if(ge===1)Ne.children=L;else if(1<ge){for(var ue=Array(ge),xe=0;xe<ge;xe++)ue[xe]=arguments[xe+2];Ne.children=ue}if(H&&H.defaultProps)for(fe in ge=H.defaultProps,ge)Ne[fe]===void 0&&(Ne[fe]=ge[fe]);return G(H,ve,Ne)},Xe.createRef=function(){return{current:null}},Xe.forwardRef=function(H){return{$$typeof:f,render:H}},Xe.isValidElement=Q,Xe.lazy=function(H){return{$$typeof:p,_payload:{_status:-1,_result:H},_init:W}},Xe.memo=function(H,Z){return{$$typeof:m,type:H,compare:Z===void 0?null:Z}},Xe.startTransition=function(H){var Z=I.T,L={};I.T=L;try{var fe=H(),Ne=I.S;Ne!==null&&Ne(L,fe),typeof fe=="object"&&fe!==null&&typeof fe.then=="function"&&fe.then(M,he)}catch(ve){he(ve)}finally{Z!==null&&L.types!==null&&(Z.types=L.types),I.T=Z}},Xe.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Xe.use=function(H){return I.H.use(H)},Xe.useActionState=function(H,Z,L){return I.H.useActionState(H,Z,L)},Xe.useCallback=function(H,Z){return I.H.useCallback(H,Z)},Xe.useContext=function(H){return I.H.useContext(H)},Xe.useDebugValue=function(){},Xe.useDeferredValue=function(H,Z){return I.H.useDeferredValue(H,Z)},Xe.useEffect=function(H,Z){return I.H.useEffect(H,Z)},Xe.useEffectEvent=function(H){return I.H.useEffectEvent(H)},Xe.useId=function(){return I.H.useId()},Xe.useImperativeHandle=function(H,Z,L){return I.H.useImperativeHandle(H,Z,L)},Xe.useInsertionEffect=function(H,Z){return I.H.useInsertionEffect(H,Z)},Xe.useLayoutEffect=function(H,Z){return I.H.useLayoutEffect(H,Z)},Xe.useMemo=function(H,Z){return I.H.useMemo(H,Z)},Xe.useOptimistic=function(H,Z){return I.H.useOptimistic(H,Z)},Xe.useReducer=function(H,Z,L){return I.H.useReducer(H,Z,L)},Xe.useRef=function(H){return I.H.useRef(H)},Xe.useState=function(H){return I.H.useState(H)},Xe.useSyncExternalStore=function(H,Z,L){return I.H.useSyncExternalStore(H,Z,L)},Xe.useTransition=function(){return I.H.useTransition()},Xe.version="19.2.4",Xe}var vE;function Kp(){return vE||(vE=1,tm.exports=f5()),tm.exports}var v=Kp();const Re=tf(v),Lv=u5({__proto__:null,default:Re},[v]);var nm={exports:{}},Oo={},rm={exports:{}},am={};var SE;function h5(){return SE||(SE=1,(function(e){function t(R,q){var W=R.length;R.push(q);e:for(;0<W;){var he=W-1>>>1,O=R[he];if(0<s(O,q))R[he]=q,R[W]=O,W=he;else break e}}function n(R){return R.length===0?null:R[0]}function a(R){if(R.length===0)return null;var q=R[0],W=R.pop();if(W!==q){R[0]=W;e:for(var he=0,O=R.length,H=O>>>1;he<H;){var Z=2*(he+1)-1,L=R[Z],fe=Z+1,Ne=R[fe];if(0>s(L,W))fe<O&&0>s(Ne,L)?(R[he]=Ne,R[fe]=W,he=fe):(R[he]=L,R[Z]=W,he=Z);else if(fe<O&&0>s(Ne,W))R[he]=Ne,R[fe]=W,he=fe;else break e}}return q}function s(R,q){var W=R.sortIndex-q.sortIndex;return W!==0?W:R.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var h=[],m=[],p=1,g=null,y=3,T=!1,S=!1,k=!1,N=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function P(R){for(var q=n(m);q!==null;){if(q.callback===null)a(m);else if(q.startTime<=R)a(m),q.sortIndex=q.expirationTime,t(h,q);else break;q=n(m)}}function F(R){if(k=!1,P(R),!S)if(n(h)!==null)S=!0,M||(M=!0,V());else{var q=n(m);q!==null&&U(F,q.startTime-R)}}var M=!1,I=-1,j=5,G=-1;function B(){return N?!0:!(e.unstable_now()-G<j)}function Q(){if(N=!1,M){var R=e.unstable_now();G=R;var q=!0;try{e:{S=!1,k&&(k=!1,A(I),I=-1),T=!0;var W=y;try{t:{for(P(R),g=n(h);g!==null&&!(g.expirationTime>R&&B());){var he=g.callback;if(typeof he=="function"){g.callback=null,y=g.priorityLevel;var O=he(g.expirationTime<=R);if(R=e.unstable_now(),typeof O=="function"){g.callback=O,P(R),q=!0;break t}g===n(h)&&a(h),P(R)}else a(h);g=n(h)}if(g!==null)q=!0;else{var H=n(m);H!==null&&U(F,H.startTime-R),q=!1}}break e}finally{g=null,y=W,T=!1}q=void 0}}finally{q?V():M=!1}}}var V;if(typeof w=="function")V=function(){w(Q)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ee=te.port2;te.port1.onmessage=Q,V=function(){ee.postMessage(null)}}else V=function(){_(Q,0)};function U(R,q){I=_(function(){R(e.unstable_now())},q)}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(R){R.callback=null},e.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<R?Math.floor(1e3/R):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(R){switch(y){case 1:case 2:case 3:var q=3;break;default:q=y}var W=y;y=q;try{return R()}finally{y=W}},e.unstable_requestPaint=function(){N=!0},e.unstable_runWithPriority=function(R,q){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var W=y;y=R;try{return q()}finally{y=W}},e.unstable_scheduleCallback=function(R,q,W){var he=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?he+W:he):W=he,R){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=W+O,R={id:p++,callback:q,priorityLevel:R,startTime:W,expirationTime:O,sortIndex:-1},W>he?(R.sortIndex=W,t(m,R),n(h)===null&&R===n(m)&&(k?(A(I),I=-1):k=!0,U(F,W-he))):(R.sortIndex=O,t(h,R),S||T||(S=!0,M||(M=!0,V()))),R},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(R){var q=y;return function(){var W=y;y=q;try{return R.apply(this,arguments)}finally{y=W}}}})(am)),am}var kE;function m5(){return kE||(kE=1,rm.exports=h5()),rm.exports}var im={exports:{}},Sn={};var NE;function p5(){if(NE)return Sn;NE=1;var e=Kp();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)m+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function l(h,m,p){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:h,containerInfo:m,implementation:p}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Sn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,Sn.createPortal=function(h,m){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return l(h,m,null,p)},Sn.flushSync=function(h){var m=u.T,p=a.p;try{if(u.T=null,a.p=2,h)return h()}finally{u.T=m,a.p=p,a.d.f()}},Sn.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(h,m))},Sn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},Sn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var p=m.as,g=f(p,m.crossOrigin),y=typeof m.integrity=="string"?m.integrity:void 0,T=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;p==="style"?a.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:y,fetchPriority:T}):p==="script"&&a.d.X(h,{crossOrigin:g,integrity:y,fetchPriority:T,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Sn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var p=f(m.as,m.crossOrigin);a.d.M(h,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(h)},Sn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var p=m.as,g=f(p,m.crossOrigin);a.d.L(h,p,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Sn.preloadModule=function(h,m){if(typeof h=="string")if(m){var p=f(m.as,m.crossOrigin);a.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(h)},Sn.requestFormReset=function(h){a.d.r(h)},Sn.unstable_batchedUpdates=function(h,m){return h(m)},Sn.useFormState=function(h,m,p){return u.H.useFormState(h,m,p)},Sn.useFormStatus=function(){return u.H.useHostTransitionStatus()},Sn.version="19.2.4",Sn}var CE;function jv(){if(CE)return im.exports;CE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),im.exports=p5(),im.exports}var _E;function g5(){if(_E)return Oo;_E=1;var e=m5(),t=Kp(),n=jv();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+r+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function l(r){var i=r,o=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(o=i.return),r=i.return;while(r)}return i.tag===3?o:null}function u(r){if(r.tag===13){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function f(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function h(r){if(l(r)!==r)throw Error(a(188))}function m(r){var i=r.alternate;if(!i){if(i=l(r),i===null)throw Error(a(188));return i!==r?null:r}for(var o=r,d=i;;){var x=o.return;if(x===null)break;var b=x.alternate;if(b===null){if(d=x.return,d!==null){o=d;continue}break}if(x.child===b.child){for(b=x.child;b;){if(b===o)return h(x),r;if(b===d)return h(x),i;b=b.sibling}throw Error(a(188))}if(o.return!==d.return)o=x,d=b;else{for(var C=!1,D=x.child;D;){if(D===o){C=!0,o=x,d=b;break}if(D===d){C=!0,d=x,o=b;break}D=D.sibling}if(!C){for(D=b.child;D;){if(D===o){C=!0,o=b,d=x;break}if(D===d){C=!0,d=b,o=x;break}D=D.sibling}if(!C)throw Error(a(189))}}if(o.alternate!==d)throw Error(a(190))}if(o.tag!==3)throw Error(a(188));return o.stateNode.current===o?r:i}function p(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=p(r),i!==null)return i;r=r.sibling}return null}var g=Object.assign,y=Symbol.for("react.element"),T=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),w=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function V(r){return r===null||typeof r!="object"?null:(r=Q&&r[Q]||r["@@iterator"],typeof r=="function"?r:null)}var te=Symbol.for("react.client.reference");function ee(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===te?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case k:return"Fragment";case _:return"Profiler";case N:return"StrictMode";case F:return"Suspense";case M:return"SuspenseList";case G:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case S:return"Portal";case w:return r.displayName||"Context";case A:return(r._context.displayName||"Context")+".Consumer";case P:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case I:return i=r.displayName||null,i!==null?i:ee(r.type)||"Memo";case j:i=r._payload,r=r._init;try{return ee(r(i))}catch{}}return null}var U=Array.isArray,R=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},he=[],O=-1;function H(r){return{current:r}}function Z(r){0>O||(r.current=he[O],he[O]=null,O--)}function L(r,i){O++,he[O]=r.current,r.current=i}var fe=H(null),Ne=H(null),ve=H(null),ge=H(null);function ue(r,i){switch(L(ve,i),L(Ne,r),L(fe,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?Fy(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=Fy(i),r=$y(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}Z(fe),L(fe,r)}function xe(){Z(fe),Z(Ne),Z(ve)}function Ae(r){r.memoizedState!==null&&L(ge,r);var i=fe.current,o=$y(i,r.type);i!==o&&(L(Ne,r),L(fe,o))}function Le(r){Ne.current===r&&(Z(fe),Z(Ne)),ge.current===r&&(Z(ge),Co._currentValue=W)}var Fe,$e;function pe(r){if(Fe===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);Fe=i&&i[1]||"",$e=-1<o.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Fe+r+$e}var Ee=!1;function we(r,i){if(!r||Ee)return"";Ee=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(i){var me=function(){throw Error()};if(Object.defineProperty(me.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(me,[])}catch(se){var ie=se}Reflect.construct(r,[],me)}else{try{me.call()}catch(se){ie=se}r.call(me.prototype)}}else{try{throw Error()}catch(se){ie=se}(me=r())&&typeof me.catch=="function"&&me.catch(function(){})}}catch(se){if(se&&ie&&typeof se.stack=="string")return[se.stack,ie.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=d.DetermineComponentFrameRoot(),C=b[0],D=b[1];if(C&&D){var X=C.split(`
4
+ `),ae=D.split(`
5
+ `);for(x=d=0;d<X.length&&!X[d].includes("DetermineComponentFrameRoot");)d++;for(;x<ae.length&&!ae[x].includes("DetermineComponentFrameRoot");)x++;if(d===X.length||x===ae.length)for(d=X.length-1,x=ae.length-1;1<=d&&0<=x&&X[d]!==ae[x];)x--;for(;1<=d&&0<=x;d--,x--)if(X[d]!==ae[x]){if(d!==1||x!==1)do if(d--,x--,0>x||X[d]!==ae[x]){var oe=`
6
+ `+X[d].replace(" at new "," at ");return r.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",r.displayName)),oe}while(1<=d&&0<=x);break}}}finally{Ee=!1,Error.prepareStackTrace=o}return(o=r?r.displayName||r.name:"")?pe(o):""}function qe(r,i){switch(r.tag){case 26:case 27:case 5:return pe(r.type);case 16:return pe("Lazy");case 13:return r.child!==i&&i!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return we(r.type,!1);case 11:return we(r.type.render,!1);case 1:return we(r.type,!0);case 31:return pe("Activity");default:return""}}function dt(r){try{var i="",o=null;do i+=qe(r,o),o=r,r=r.return;while(r);return i}catch(d){return`
7
+ Error generating stack: `+d.message+`
8
+ `+d.stack}}var an=Object.prototype.hasOwnProperty,Pt=e.unstable_scheduleCallback,sa=e.unstable_cancelCallback,ps=e.unstable_shouldYield,Ia=e.unstable_requestPaint,qt=e.unstable_now,Nr=e.unstable_getCurrentPriorityLevel,ce=e.unstable_ImmediatePriority,Ce=e.unstable_UserBlockingPriority,He=e.unstable_NormalPriority,et=e.unstable_LowPriority,mt=e.unstable_IdlePriority,vn=e.log,Cr=e.unstable_setDisableYieldValue,Rn=null,sn=null;function jn(r){if(typeof vn=="function"&&Cr(r),sn&&typeof sn.setStrictMode=="function")try{sn.setStrictMode(Rn,r)}catch{}}var At=Math.clz32?Math.clz32:Q_,Da=Math.log,_r=Math.LN2;function Q_(r){return r>>>=0,r===0?32:31-(Da(r)/_r|0)|0}var Bu=256,Pu=262144,zu=4194304;function Ci(r){var i=r&42;if(i!==0)return i;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Hu(r,i,o){var d=r.pendingLanes;if(d===0)return 0;var x=0,b=r.suspendedLanes,C=r.pingedLanes;r=r.warmLanes;var D=d&134217727;return D!==0?(d=D&~b,d!==0?x=Ci(d):(C&=D,C!==0?x=Ci(C):o||(o=D&~r,o!==0&&(x=Ci(o))))):(D=d&~b,D!==0?x=Ci(D):C!==0?x=Ci(C):o||(o=d&~r,o!==0&&(x=Ci(o)))),x===0?0:i!==0&&i!==x&&(i&b)===0&&(b=x&-x,o=i&-i,b>=o||b===32&&(o&4194048)!==0)?i:x}function Pl(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function W_(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 S1(){var r=zu;return zu<<=1,(zu&62914560)===0&&(zu=4194304),r}function Ff(r){for(var i=[],o=0;31>o;o++)i.push(r);return i}function zl(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function K_(r,i,o,d,x,b){var C=r.pendingLanes;r.pendingLanes=o,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=o,r.entangledLanes&=o,r.errorRecoveryDisabledLanes&=o,r.shellSuspendCounter=0;var D=r.entanglements,X=r.expirationTimes,ae=r.hiddenUpdates;for(o=C&~o;0<o;){var oe=31-At(o),me=1<<oe;D[oe]=0,X[oe]=-1;var ie=ae[oe];if(ie!==null)for(ae[oe]=null,oe=0;oe<ie.length;oe++){var se=ie[oe];se!==null&&(se.lane&=-536870913)}o&=~me}d!==0&&k1(r,d,0),b!==0&&x===0&&r.tag!==0&&(r.suspendedLanes|=b&~(C&~i))}function k1(r,i,o){r.pendingLanes|=i,r.suspendedLanes&=~i;var d=31-At(i);r.entangledLanes|=i,r.entanglements[d]=r.entanglements[d]|1073741824|o&261930}function N1(r,i){var o=r.entangledLanes|=i;for(r=r.entanglements;o;){var d=31-At(o),x=1<<d;x&i|r[d]&i&&(r[d]|=i),o&=~x}}function C1(r,i){var o=i&-i;return o=(o&42)!==0?1:$f(o),(o&(r.suspendedLanes|i))!==0?0:o}function $f(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function qf(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function _1(){var r=q.p;return r!==0?r:(r=window.event,r===void 0?32:fE(r.type))}function A1(r,i){var o=q.p;try{return q.p=r,i()}finally{q.p=o}}var La=Math.random().toString(36).slice(2),gn="__reactFiber$"+La,Mn="__reactProps$"+La,gs="__reactContainer$"+La,Vf="__reactEvents$"+La,Z_="__reactListeners$"+La,J_="__reactHandles$"+La,w1="__reactResources$"+La,Hl="__reactMarker$"+La;function Yf(r){delete r[gn],delete r[Mn],delete r[Vf],delete r[Z_],delete r[J_]}function xs(r){var i=r[gn];if(i)return i;for(var o=r.parentNode;o;){if(i=o[gs]||o[gn]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(r=Wy(r);r!==null;){if(o=r[gn])return o;r=Wy(r)}return i}r=o,o=r.parentNode}return null}function bs(r){if(r=r[gn]||r[gs]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function Ul(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function ys(r){var i=r[w1];return i||(i=r[w1]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function dn(r){r[Hl]=!0}var R1=new Set,O1={};function _i(r,i){Es(r,i),Es(r+"Capture",i)}function Es(r,i){for(O1[r]=i,r=0;r<i.length;r++)R1.add(i[r])}var eA=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]*$"),I1={},D1={};function tA(r){return an.call(D1,r)?!0:an.call(I1,r)?!1:eA.test(r)?D1[r]=!0:(I1[r]=!0,!1)}function Uu(r,i,o){if(tA(i))if(o===null)r.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var d=i.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+o)}}function Fu(r,i,o){if(o===null)r.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+o)}}function la(r,i,o,d){if(d===null)r.removeAttribute(o);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(o);return}r.setAttributeNS(i,o,""+d)}}function or(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function L1(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function nA(r,i,o){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,b=d.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return x.call(this)},set:function(C){o=""+C,b.call(this,C)}}),Object.defineProperty(r,i,{enumerable:d.enumerable}),{getValue:function(){return o},setValue:function(C){o=""+C},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function Gf(r){if(!r._valueTracker){var i=L1(r)?"checked":"value";r._valueTracker=nA(r,i,""+r[i])}}function j1(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var o=i.getValue(),d="";return r&&(d=L1(r)?r.checked?"true":"false":r.value),r=d,r!==o?(i.setValue(r),!0):!1}function $u(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var rA=/[\n"\\]/g;function ur(r){return r.replace(rA,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Xf(r,i,o,d,x,b,C,D){r.name="",C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"?r.type=C:r.removeAttribute("type"),i!=null?C==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+or(i)):r.value!==""+or(i)&&(r.value=""+or(i)):C!=="submit"&&C!=="reset"||r.removeAttribute("value"),i!=null?Qf(r,C,or(i)):o!=null?Qf(r,C,or(o)):d!=null&&r.removeAttribute("value"),x==null&&b!=null&&(r.defaultChecked=!!b),x!=null&&(r.checked=x&&typeof x!="function"&&typeof x!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?r.name=""+or(D):r.removeAttribute("name")}function M1(r,i,o,d,x,b,C,D){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(r.type=b),i!=null||o!=null){if(!(b!=="submit"&&b!=="reset"||i!=null)){Gf(r);return}o=o!=null?""+or(o):"",i=i!=null?""+or(i):o,D||i===r.value||(r.value=i),r.defaultValue=i}d=d??x,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=D?r.checked:!!d,r.defaultChecked=!!d,C!=null&&typeof C!="function"&&typeof C!="symbol"&&typeof C!="boolean"&&(r.name=C),Gf(r)}function Qf(r,i,o){i==="number"&&$u(r.ownerDocument)===r||r.defaultValue===""+o||(r.defaultValue=""+o)}function Ts(r,i,o,d){if(r=r.options,i){i={};for(var x=0;x<o.length;x++)i["$"+o[x]]=!0;for(o=0;o<r.length;o++)x=i.hasOwnProperty("$"+r[o].value),r[o].selected!==x&&(r[o].selected=x),x&&d&&(r[o].defaultSelected=!0)}else{for(o=""+or(o),i=null,x=0;x<r.length;x++){if(r[x].value===o){r[x].selected=!0,d&&(r[x].defaultSelected=!0);return}i!==null||r[x].disabled||(i=r[x])}i!==null&&(i.selected=!0)}}function B1(r,i,o){if(i!=null&&(i=""+or(i),i!==r.value&&(r.value=i),o==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=o!=null?""+or(o):""}function P1(r,i,o,d){if(i==null){if(d!=null){if(o!=null)throw Error(a(92));if(U(d)){if(1<d.length)throw Error(a(93));d=d[0]}o=d}o==null&&(o=""),i=o}o=or(i),r.defaultValue=o,d=r.textContent,d===o&&d!==""&&d!==null&&(r.value=d),Gf(r)}function vs(r,i){if(i){var o=r.firstChild;if(o&&o===r.lastChild&&o.nodeType===3){o.nodeValue=i;return}}r.textContent=i}var aA=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 z1(r,i,o){var d=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?d?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":d?r.setProperty(i,o):typeof o!="number"||o===0||aA.has(i)?i==="float"?r.cssFloat=o:r[i]=(""+o).trim():r[i]=o+"px"}function H1(r,i,o){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,o!=null){for(var d in o)!o.hasOwnProperty(d)||i!=null&&i.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var x in i)d=i[x],i.hasOwnProperty(x)&&o[x]!==d&&z1(r,x,d)}else for(var b in i)i.hasOwnProperty(b)&&z1(r,b,i[b])}function Wf(r){if(r.indexOf("-")===-1)return!1;switch(r){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 iA=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"]]),sA=/^[\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 qu(r){return sA.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function oa(){}var Kf=null;function Zf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Ss=null,ks=null;function U1(r){var i=bs(r);if(i&&(r=i.stateNode)){var o=r[Mn]||null;e:switch(r=i.stateNode,i.type){case"input":if(Xf(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),i=o.name,o.type==="radio"&&i!=null){for(o=r;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+ur(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var d=o[i];if(d!==r&&d.form===r.form){var x=d[Mn]||null;if(!x)throw Error(a(90));Xf(d,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(i=0;i<o.length;i++)d=o[i],d.form===r.form&&j1(d)}break e;case"textarea":B1(r,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&Ts(r,!!o.multiple,i,!1)}}}var Jf=!1;function F1(r,i,o){if(Jf)return r(i,o);Jf=!0;try{var d=r(i);return d}finally{if(Jf=!1,(Ss!==null||ks!==null)&&(Oc(),Ss&&(i=Ss,r=ks,ks=Ss=null,U1(i),r)))for(i=0;i<r.length;i++)U1(r[i])}}function Fl(r,i){var o=r.stateNode;if(o===null)return null;var d=o[Mn]||null;if(d===null)return null;o=d[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(o&&typeof o!="function")throw Error(a(231,i,typeof o));return o}var ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eh=!1;if(ua)try{var $l={};Object.defineProperty($l,"passive",{get:function(){eh=!0}}),window.addEventListener("test",$l,$l),window.removeEventListener("test",$l,$l)}catch{eh=!1}var ja=null,th=null,Vu=null;function $1(){if(Vu)return Vu;var r,i=th,o=i.length,d,x="value"in ja?ja.value:ja.textContent,b=x.length;for(r=0;r<o&&i[r]===x[r];r++);var C=o-r;for(d=1;d<=C&&i[o-d]===x[b-d];d++);return Vu=x.slice(r,1<d?1-d:void 0)}function Yu(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Gu(){return!0}function q1(){return!1}function Bn(r){function i(o,d,x,b,C){this._reactName=o,this._targetInst=x,this.type=d,this.nativeEvent=b,this.target=C,this.currentTarget=null;for(var D in r)r.hasOwnProperty(D)&&(o=r[D],this[D]=o?o(b):b[D]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Gu:q1,this.isPropagationStopped=q1,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Gu)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Gu)},persist:function(){},isPersistent:Gu}),i}var Ai={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xu=Bn(Ai),ql=g({},Ai,{view:0,detail:0}),lA=Bn(ql),nh,rh,Vl,Qu=g({},ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ih,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==Vl&&(Vl&&r.type==="mousemove"?(nh=r.screenX-Vl.screenX,rh=r.screenY-Vl.screenY):rh=nh=0,Vl=r),nh)},movementY:function(r){return"movementY"in r?r.movementY:rh}}),V1=Bn(Qu),oA=g({},Qu,{dataTransfer:0}),uA=Bn(oA),cA=g({},ql,{relatedTarget:0}),ah=Bn(cA),dA=g({},Ai,{animationName:0,elapsedTime:0,pseudoElement:0}),fA=Bn(dA),hA=g({},Ai,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),mA=Bn(hA),pA=g({},Ai,{data:0}),Y1=Bn(pA),gA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xA={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"},bA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function yA(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=bA[r])?!!i[r]:!1}function ih(){return yA}var EA=g({},ql,{key:function(r){if(r.key){var i=gA[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Yu(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?xA[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ih,charCode:function(r){return r.type==="keypress"?Yu(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Yu(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),TA=Bn(EA),vA=g({},Qu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),G1=Bn(vA),SA=g({},ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ih}),kA=Bn(SA),NA=g({},Ai,{propertyName:0,elapsedTime:0,pseudoElement:0}),CA=Bn(NA),_A=g({},Qu,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),AA=Bn(_A),wA=g({},Ai,{newState:0,oldState:0}),RA=Bn(wA),OA=[9,13,27,32],sh=ua&&"CompositionEvent"in window,Yl=null;ua&&"documentMode"in document&&(Yl=document.documentMode);var IA=ua&&"TextEvent"in window&&!Yl,X1=ua&&(!sh||Yl&&8<Yl&&11>=Yl),Q1=" ",W1=!1;function K1(r,i){switch(r){case"keyup":return OA.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Z1(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Ns=!1;function DA(r,i){switch(r){case"compositionend":return Z1(i);case"keypress":return i.which!==32?null:(W1=!0,Q1);case"textInput":return r=i.data,r===Q1&&W1?null:r;default:return null}}function LA(r,i){if(Ns)return r==="compositionend"||!sh&&K1(r,i)?(r=$1(),Vu=th=ja=null,Ns=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return X1&&i.locale!=="ko"?null:i.data;default:return null}}var jA={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 J1(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!jA[r.type]:i==="textarea"}function ex(r,i,o,d){Ss?ks?ks.push(d):ks=[d]:Ss=d,i=Pc(i,"onChange"),0<i.length&&(o=new Xu("onChange","change",null,o,d),r.push({event:o,listeners:i}))}var Gl=null,Xl=null;function MA(r){My(r,0)}function Wu(r){var i=Ul(r);if(j1(i))return r}function tx(r,i){if(r==="change")return i}var nx=!1;if(ua){var lh;if(ua){var oh="oninput"in document;if(!oh){var rx=document.createElement("div");rx.setAttribute("oninput","return;"),oh=typeof rx.oninput=="function"}lh=oh}else lh=!1;nx=lh&&(!document.documentMode||9<document.documentMode)}function ax(){Gl&&(Gl.detachEvent("onpropertychange",ix),Xl=Gl=null)}function ix(r){if(r.propertyName==="value"&&Wu(Xl)){var i=[];ex(i,Xl,r,Zf(r)),F1(MA,i)}}function BA(r,i,o){r==="focusin"?(ax(),Gl=i,Xl=o,Gl.attachEvent("onpropertychange",ix)):r==="focusout"&&ax()}function PA(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Wu(Xl)}function zA(r,i){if(r==="click")return Wu(i)}function HA(r,i){if(r==="input"||r==="change")return Wu(i)}function UA(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var Xn=typeof Object.is=="function"?Object.is:UA;function Ql(r,i){if(Xn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var o=Object.keys(r),d=Object.keys(i);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var x=o[d];if(!an.call(i,x)||!Xn(r[x],i[x]))return!1}return!0}function sx(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function lx(r,i){var o=sx(r);r=0;for(var d;o;){if(o.nodeType===3){if(d=r+o.textContent.length,r<=i&&d>=i)return{node:o,offset:i-r};r=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=sx(o)}}function ox(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?ox(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function ux(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=$u(r.document);i instanceof r.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)r=i.contentWindow;else break;i=$u(r.document)}return i}function uh(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var FA=ua&&"documentMode"in document&&11>=document.documentMode,Cs=null,ch=null,Wl=null,dh=!1;function cx(r,i,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;dh||Cs==null||Cs!==$u(d)||(d=Cs,"selectionStart"in d&&uh(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Wl&&Ql(Wl,d)||(Wl=d,d=Pc(ch,"onSelect"),0<d.length&&(i=new Xu("onSelect","select",null,i,o),r.push({event:i,listeners:d}),i.target=Cs)))}function wi(r,i){var o={};return o[r.toLowerCase()]=i.toLowerCase(),o["Webkit"+r]="webkit"+i,o["Moz"+r]="moz"+i,o}var _s={animationend:wi("Animation","AnimationEnd"),animationiteration:wi("Animation","AnimationIteration"),animationstart:wi("Animation","AnimationStart"),transitionrun:wi("Transition","TransitionRun"),transitionstart:wi("Transition","TransitionStart"),transitioncancel:wi("Transition","TransitionCancel"),transitionend:wi("Transition","TransitionEnd")},fh={},dx={};ua&&(dx=document.createElement("div").style,"AnimationEvent"in window||(delete _s.animationend.animation,delete _s.animationiteration.animation,delete _s.animationstart.animation),"TransitionEvent"in window||delete _s.transitionend.transition);function Ri(r){if(fh[r])return fh[r];if(!_s[r])return r;var i=_s[r],o;for(o in i)if(i.hasOwnProperty(o)&&o in dx)return fh[r]=i[o];return r}var fx=Ri("animationend"),hx=Ri("animationiteration"),mx=Ri("animationstart"),$A=Ri("transitionrun"),qA=Ri("transitionstart"),VA=Ri("transitioncancel"),px=Ri("transitionend"),gx=new Map,hh="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(" ");hh.push("scrollEnd");function Ar(r,i){gx.set(r,i),_i(i,[r])}var Ku=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},cr=[],As=0,mh=0;function Zu(){for(var r=As,i=mh=As=0;i<r;){var o=cr[i];cr[i++]=null;var d=cr[i];cr[i++]=null;var x=cr[i];cr[i++]=null;var b=cr[i];if(cr[i++]=null,d!==null&&x!==null){var C=d.pending;C===null?x.next=x:(x.next=C.next,C.next=x),d.pending=x}b!==0&&xx(o,x,b)}}function Ju(r,i,o,d){cr[As++]=r,cr[As++]=i,cr[As++]=o,cr[As++]=d,mh|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function ph(r,i,o,d){return Ju(r,i,o,d),ec(r)}function Oi(r,i){return Ju(r,null,null,i),ec(r)}function xx(r,i,o){r.lanes|=o;var d=r.alternate;d!==null&&(d.lanes|=o);for(var x=!1,b=r.return;b!==null;)b.childLanes|=o,d=b.alternate,d!==null&&(d.childLanes|=o),b.tag===22&&(r=b.stateNode,r===null||r._visibility&1||(x=!0)),r=b,b=b.return;return r.tag===3?(b=r.stateNode,x&&i!==null&&(x=31-At(o),r=b.hiddenUpdates,d=r[x],d===null?r[x]=[i]:d.push(i),i.lane=o|536870912),b):null}function ec(r){if(50<yo)throw yo=0,k0=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var ws={};function YA(r,i,o,d){this.tag=r,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qn(r,i,o,d){return new YA(r,i,o,d)}function gh(r){return r=r.prototype,!(!r||!r.isReactComponent)}function ca(r,i){var o=r.alternate;return o===null?(o=Qn(r.tag,i,r.key,r.mode),o.elementType=r.elementType,o.type=r.type,o.stateNode=r.stateNode,o.alternate=r,r.alternate=o):(o.pendingProps=i,o.type=r.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=r.flags&65011712,o.childLanes=r.childLanes,o.lanes=r.lanes,o.child=r.child,o.memoizedProps=r.memoizedProps,o.memoizedState=r.memoizedState,o.updateQueue=r.updateQueue,i=r.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=r.sibling,o.index=r.index,o.ref=r.ref,o.refCleanup=r.refCleanup,o}function bx(r,i){r.flags&=65011714;var o=r.alternate;return o===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=o.childLanes,r.lanes=o.lanes,r.child=o.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=o.memoizedProps,r.memoizedState=o.memoizedState,r.updateQueue=o.updateQueue,r.type=o.type,i=o.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function tc(r,i,o,d,x,b){var C=0;if(d=r,typeof r=="function")gh(r)&&(C=1);else if(typeof r=="string")C=Kw(r,o,fe.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case G:return r=Qn(31,o,i,x),r.elementType=G,r.lanes=b,r;case k:return Ii(o.children,x,b,i);case N:C=8,x|=24;break;case _:return r=Qn(12,o,i,x|2),r.elementType=_,r.lanes=b,r;case F:return r=Qn(13,o,i,x),r.elementType=F,r.lanes=b,r;case M:return r=Qn(19,o,i,x),r.elementType=M,r.lanes=b,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case w:C=10;break e;case A:C=9;break e;case P:C=11;break e;case I:C=14;break e;case j:C=16,d=null;break e}C=29,o=Error(a(130,r===null?"null":typeof r,"")),d=null}return i=Qn(C,o,i,x),i.elementType=r,i.type=d,i.lanes=b,i}function Ii(r,i,o,d){return r=Qn(7,r,d,i),r.lanes=o,r}function xh(r,i,o){return r=Qn(6,r,null,i),r.lanes=o,r}function yx(r){var i=Qn(18,null,null,0);return i.stateNode=r,i}function bh(r,i,o){return i=Qn(4,r.children!==null?r.children:[],r.key,i),i.lanes=o,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var Ex=new WeakMap;function dr(r,i){if(typeof r=="object"&&r!==null){var o=Ex.get(r);return o!==void 0?o:(i={value:r,source:i,stack:dt(i)},Ex.set(r,i),i)}return{value:r,source:i,stack:dt(i)}}var Rs=[],Os=0,nc=null,Kl=0,fr=[],hr=0,Ma=null,Fr=1,$r="";function da(r,i){Rs[Os++]=Kl,Rs[Os++]=nc,nc=r,Kl=i}function Tx(r,i,o){fr[hr++]=Fr,fr[hr++]=$r,fr[hr++]=Ma,Ma=r;var d=Fr;r=$r;var x=32-At(d)-1;d&=~(1<<x),o+=1;var b=32-At(i)+x;if(30<b){var C=x-x%5;b=(d&(1<<C)-1).toString(32),d>>=C,x-=C,Fr=1<<32-At(i)+x|o<<x|d,$r=b+r}else Fr=1<<b|o<<x|d,$r=r}function yh(r){r.return!==null&&(da(r,1),Tx(r,1,0))}function Eh(r){for(;r===nc;)nc=Rs[--Os],Rs[Os]=null,Kl=Rs[--Os],Rs[Os]=null;for(;r===Ma;)Ma=fr[--hr],fr[hr]=null,$r=fr[--hr],fr[hr]=null,Fr=fr[--hr],fr[hr]=null}function vx(r,i){fr[hr++]=Fr,fr[hr++]=$r,fr[hr++]=Ma,Fr=i.id,$r=i.overflow,Ma=r}var xn=null,Dt=null,ut=!1,Ba=null,mr=!1,Th=Error(a(519));function Pa(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zl(dr(i,r)),Th}function Sx(r){var i=r.stateNode,o=r.type,d=r.memoizedProps;switch(i[gn]=r,i[Mn]=d,o){case"dialog":it("cancel",i),it("close",i);break;case"iframe":case"object":case"embed":it("load",i);break;case"video":case"audio":for(o=0;o<To.length;o++)it(To[o],i);break;case"source":it("error",i);break;case"img":case"image":case"link":it("error",i),it("load",i);break;case"details":it("toggle",i);break;case"input":it("invalid",i),M1(i,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":it("invalid",i);break;case"textarea":it("invalid",i),P1(i,d.value,d.defaultValue,d.children)}o=d.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||d.suppressHydrationWarning===!0||Hy(i.textContent,o)?(d.popover!=null&&(it("beforetoggle",i),it("toggle",i)),d.onScroll!=null&&it("scroll",i),d.onScrollEnd!=null&&it("scrollend",i),d.onClick!=null&&(i.onclick=oa),i=!0):i=!1,i||Pa(r,!0)}function kx(r){for(xn=r.return;xn;)switch(xn.tag){case 5:case 31:case 13:mr=!1;return;case 27:case 3:mr=!0;return;default:xn=xn.return}}function Is(r){if(r!==xn)return!1;if(!ut)return kx(r),ut=!0,!1;var i=r.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=r.type,o=!(o!=="form"&&o!=="button")||z0(r.type,r.memoizedProps)),o=!o),o&&Dt&&Pa(r),kx(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Dt=Qy(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Dt=Qy(r)}else i===27?(i=Dt,Za(r.type)?(r=q0,q0=null,Dt=r):Dt=i):Dt=xn?gr(r.stateNode.nextSibling):null;return!0}function Di(){Dt=xn=null,ut=!1}function vh(){var r=Ba;return r!==null&&(Un===null?Un=r:Un.push.apply(Un,r),Ba=null),r}function Zl(r){Ba===null?Ba=[r]:Ba.push(r)}var Sh=H(null),Li=null,fa=null;function za(r,i,o){L(Sh,i._currentValue),i._currentValue=o}function ha(r){r._currentValue=Sh.current,Z(Sh)}function kh(r,i,o){for(;r!==null;){var d=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),r===o)break;r=r.return}}function Nh(r,i,o,d){var x=r.child;for(x!==null&&(x.return=r);x!==null;){var b=x.dependencies;if(b!==null){var C=x.child;b=b.firstContext;e:for(;b!==null;){var D=b;b=x;for(var X=0;X<i.length;X++)if(D.context===i[X]){b.lanes|=o,D=b.alternate,D!==null&&(D.lanes|=o),kh(b.return,o,r),d||(C=null);break e}b=D.next}}else if(x.tag===18){if(C=x.return,C===null)throw Error(a(341));C.lanes|=o,b=C.alternate,b!==null&&(b.lanes|=o),kh(C,o,r),C=null}else C=x.child;if(C!==null)C.return=x;else for(C=x;C!==null;){if(C===r){C=null;break}if(x=C.sibling,x!==null){x.return=C.return,C=x;break}C=C.return}x=C}}function Ds(r,i,o,d){r=null;for(var x=i,b=!1;x!==null;){if(!b){if((x.flags&524288)!==0)b=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var C=x.alternate;if(C===null)throw Error(a(387));if(C=C.memoizedProps,C!==null){var D=x.type;Xn(x.pendingProps.value,C.value)||(r!==null?r.push(D):r=[D])}}else if(x===ge.current){if(C=x.alternate,C===null)throw Error(a(387));C.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(r!==null?r.push(Co):r=[Co])}x=x.return}r!==null&&Nh(i,r,o,d),i.flags|=262144}function rc(r){for(r=r.firstContext;r!==null;){if(!Xn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function ji(r){Li=r,fa=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function bn(r){return Nx(Li,r)}function ac(r,i){return Li===null&&ji(r),Nx(r,i)}function Nx(r,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},fa===null){if(r===null)throw Error(a(308));fa=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else fa=fa.next=i;return o}var GA=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(o,d){r.push(d)}};this.abort=function(){i.aborted=!0,r.forEach(function(o){return o()})}},XA=e.unstable_scheduleCallback,QA=e.unstable_NormalPriority,Zt={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ch(){return{controller:new GA,data:new Map,refCount:0}}function Jl(r){r.refCount--,r.refCount===0&&XA(QA,function(){r.controller.abort()})}var eo=null,_h=0,Ls=0,js=null;function WA(r,i){if(eo===null){var o=eo=[];_h=0,Ls=R0(),js={status:"pending",value:void 0,then:function(d){o.push(d)}}}return _h++,i.then(Cx,Cx),i}function Cx(){if(--_h===0&&eo!==null){js!==null&&(js.status="fulfilled");var r=eo;eo=null,Ls=0,js=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function KA(r,i){var o=[],d={status:"pending",value:null,reason:null,then:function(x){o.push(x)}};return r.then(function(){d.status="fulfilled",d.value=i;for(var x=0;x<o.length;x++)(0,o[x])(i)},function(x){for(d.status="rejected",d.reason=x,x=0;x<o.length;x++)(0,o[x])(void 0)}),d}var _x=R.S;R.S=function(r,i){cy=qt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&WA(r,i),_x!==null&&_x(r,i)};var Mi=H(null);function Ah(){var r=Mi.current;return r!==null?r:wt.pooledCache}function ic(r,i){i===null?L(Mi,Mi.current):L(Mi,i.pool)}function Ax(){var r=Ah();return r===null?null:{parent:Zt._currentValue,pool:r}}var Ms=Error(a(460)),wh=Error(a(474)),sc=Error(a(542)),lc={then:function(){}};function wx(r){return r=r.status,r==="fulfilled"||r==="rejected"}function Rx(r,i,o){switch(o=r[o],o===void 0?r.push(i):o!==i&&(i.then(oa,oa),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Ix(r),r;default:if(typeof i.status=="string")i.then(oa,oa);else{if(r=wt,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(d){if(i.status==="pending"){var x=i;x.status="fulfilled",x.value=d}},function(d){if(i.status==="pending"){var x=i;x.status="rejected",x.reason=d}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,Ix(r),r}throw Pi=i,Ms}}function Bi(r){try{var i=r._init;return i(r._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(Pi=o,Ms):o}}var Pi=null;function Ox(){if(Pi===null)throw Error(a(459));var r=Pi;return Pi=null,r}function Ix(r){if(r===Ms||r===sc)throw Error(a(483))}var Bs=null,to=0;function oc(r){var i=to;return to+=1,Bs===null&&(Bs=[]),Rx(Bs,r,i)}function no(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function uc(r,i){throw i.$$typeof===y?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function Dx(r){function i(J,K){if(r){var re=J.deletions;re===null?(J.deletions=[K],J.flags|=16):re.push(K)}}function o(J,K){if(!r)return null;for(;K!==null;)i(J,K),K=K.sibling;return null}function d(J){for(var K=new Map;J!==null;)J.key!==null?K.set(J.key,J):K.set(J.index,J),J=J.sibling;return K}function x(J,K){return J=ca(J,K),J.index=0,J.sibling=null,J}function b(J,K,re){return J.index=re,r?(re=J.alternate,re!==null?(re=re.index,re<K?(J.flags|=67108866,K):re):(J.flags|=67108866,K)):(J.flags|=1048576,K)}function C(J){return r&&J.alternate===null&&(J.flags|=67108866),J}function D(J,K,re,de){return K===null||K.tag!==6?(K=xh(re,J.mode,de),K.return=J,K):(K=x(K,re),K.return=J,K)}function X(J,K,re,de){var Pe=re.type;return Pe===k?oe(J,K,re.props.children,de,re.key):K!==null&&(K.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===j&&Bi(Pe)===K.type)?(K=x(K,re.props),no(K,re),K.return=J,K):(K=tc(re.type,re.key,re.props,null,J.mode,de),no(K,re),K.return=J,K)}function ae(J,K,re,de){return K===null||K.tag!==4||K.stateNode.containerInfo!==re.containerInfo||K.stateNode.implementation!==re.implementation?(K=bh(re,J.mode,de),K.return=J,K):(K=x(K,re.children||[]),K.return=J,K)}function oe(J,K,re,de,Pe){return K===null||K.tag!==7?(K=Ii(re,J.mode,de,Pe),K.return=J,K):(K=x(K,re),K.return=J,K)}function me(J,K,re){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return K=xh(""+K,J.mode,re),K.return=J,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case T:return re=tc(K.type,K.key,K.props,null,J.mode,re),no(re,K),re.return=J,re;case S:return K=bh(K,J.mode,re),K.return=J,K;case j:return K=Bi(K),me(J,K,re)}if(U(K)||V(K))return K=Ii(K,J.mode,re,null),K.return=J,K;if(typeof K.then=="function")return me(J,oc(K),re);if(K.$$typeof===w)return me(J,ac(J,K),re);uc(J,K)}return null}function ie(J,K,re,de){var Pe=K!==null?K.key:null;if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Pe!==null?null:D(J,K,""+re,de);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case T:return re.key===Pe?X(J,K,re,de):null;case S:return re.key===Pe?ae(J,K,re,de):null;case j:return re=Bi(re),ie(J,K,re,de)}if(U(re)||V(re))return Pe!==null?null:oe(J,K,re,de,null);if(typeof re.then=="function")return ie(J,K,oc(re),de);if(re.$$typeof===w)return ie(J,K,ac(J,re),de);uc(J,re)}return null}function se(J,K,re,de,Pe){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return J=J.get(re)||null,D(K,J,""+de,Pe);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case T:return J=J.get(de.key===null?re:de.key)||null,X(K,J,de,Pe);case S:return J=J.get(de.key===null?re:de.key)||null,ae(K,J,de,Pe);case j:return de=Bi(de),se(J,K,re,de,Pe)}if(U(de)||V(de))return J=J.get(re)||null,oe(K,J,de,Pe,null);if(typeof de.then=="function")return se(J,K,re,oc(de),Pe);if(de.$$typeof===w)return se(J,K,re,ac(K,de),Pe);uc(K,de)}return null}function Oe(J,K,re,de){for(var Pe=null,pt=null,Me=K,Ke=K=0,ot=null;Me!==null&&Ke<re.length;Ke++){Me.index>Ke?(ot=Me,Me=null):ot=Me.sibling;var gt=ie(J,Me,re[Ke],de);if(gt===null){Me===null&&(Me=ot);break}r&&Me&&gt.alternate===null&&i(J,Me),K=b(gt,K,Ke),pt===null?Pe=gt:pt.sibling=gt,pt=gt,Me=ot}if(Ke===re.length)return o(J,Me),ut&&da(J,Ke),Pe;if(Me===null){for(;Ke<re.length;Ke++)Me=me(J,re[Ke],de),Me!==null&&(K=b(Me,K,Ke),pt===null?Pe=Me:pt.sibling=Me,pt=Me);return ut&&da(J,Ke),Pe}for(Me=d(Me);Ke<re.length;Ke++)ot=se(Me,J,Ke,re[Ke],de),ot!==null&&(r&&ot.alternate!==null&&Me.delete(ot.key===null?Ke:ot.key),K=b(ot,K,Ke),pt===null?Pe=ot:pt.sibling=ot,pt=ot);return r&&Me.forEach(function(ri){return i(J,ri)}),ut&&da(J,Ke),Pe}function Ue(J,K,re,de){if(re==null)throw Error(a(151));for(var Pe=null,pt=null,Me=K,Ke=K=0,ot=null,gt=re.next();Me!==null&&!gt.done;Ke++,gt=re.next()){Me.index>Ke?(ot=Me,Me=null):ot=Me.sibling;var ri=ie(J,Me,gt.value,de);if(ri===null){Me===null&&(Me=ot);break}r&&Me&&ri.alternate===null&&i(J,Me),K=b(ri,K,Ke),pt===null?Pe=ri:pt.sibling=ri,pt=ri,Me=ot}if(gt.done)return o(J,Me),ut&&da(J,Ke),Pe;if(Me===null){for(;!gt.done;Ke++,gt=re.next())gt=me(J,gt.value,de),gt!==null&&(K=b(gt,K,Ke),pt===null?Pe=gt:pt.sibling=gt,pt=gt);return ut&&da(J,Ke),Pe}for(Me=d(Me);!gt.done;Ke++,gt=re.next())gt=se(Me,J,Ke,gt.value,de),gt!==null&&(r&&gt.alternate!==null&&Me.delete(gt.key===null?Ke:gt.key),K=b(gt,K,Ke),pt===null?Pe=gt:pt.sibling=gt,pt=gt);return r&&Me.forEach(function(o5){return i(J,o5)}),ut&&da(J,Ke),Pe}function Nt(J,K,re,de){if(typeof re=="object"&&re!==null&&re.type===k&&re.key===null&&(re=re.props.children),typeof re=="object"&&re!==null){switch(re.$$typeof){case T:e:{for(var Pe=re.key;K!==null;){if(K.key===Pe){if(Pe=re.type,Pe===k){if(K.tag===7){o(J,K.sibling),de=x(K,re.props.children),de.return=J,J=de;break e}}else if(K.elementType===Pe||typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===j&&Bi(Pe)===K.type){o(J,K.sibling),de=x(K,re.props),no(de,re),de.return=J,J=de;break e}o(J,K);break}else i(J,K);K=K.sibling}re.type===k?(de=Ii(re.props.children,J.mode,de,re.key),de.return=J,J=de):(de=tc(re.type,re.key,re.props,null,J.mode,de),no(de,re),de.return=J,J=de)}return C(J);case S:e:{for(Pe=re.key;K!==null;){if(K.key===Pe)if(K.tag===4&&K.stateNode.containerInfo===re.containerInfo&&K.stateNode.implementation===re.implementation){o(J,K.sibling),de=x(K,re.children||[]),de.return=J,J=de;break e}else{o(J,K);break}else i(J,K);K=K.sibling}de=bh(re,J.mode,de),de.return=J,J=de}return C(J);case j:return re=Bi(re),Nt(J,K,re,de)}if(U(re))return Oe(J,K,re,de);if(V(re)){if(Pe=V(re),typeof Pe!="function")throw Error(a(150));return re=Pe.call(re),Ue(J,K,re,de)}if(typeof re.then=="function")return Nt(J,K,oc(re),de);if(re.$$typeof===w)return Nt(J,K,ac(J,re),de);uc(J,re)}return typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint"?(re=""+re,K!==null&&K.tag===6?(o(J,K.sibling),de=x(K,re),de.return=J,J=de):(o(J,K),de=xh(re,J.mode,de),de.return=J,J=de),C(J)):o(J,K)}return function(J,K,re,de){try{to=0;var Pe=Nt(J,K,re,de);return Bs=null,Pe}catch(Me){if(Me===Ms||Me===sc)throw Me;var pt=Qn(29,Me,null,J.mode);return pt.lanes=de,pt.return=J,pt}}}var zi=Dx(!0),Lx=Dx(!1),Ha=!1;function Rh(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Oh(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Ua(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Fa(r,i,o){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(yt&2)!==0){var x=d.pending;return x===null?i.next=i:(i.next=x.next,x.next=i),d.pending=i,i=ec(r),xx(r,null,o),i}return Ju(r,d,i,o),ec(r)}function ro(r,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var d=i.lanes;d&=r.pendingLanes,o|=d,i.lanes=o,N1(r,o)}}function Ih(r,i){var o=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var x=null,b=null;if(o=o.firstBaseUpdate,o!==null){do{var C={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};b===null?x=b=C:b=b.next=C,o=o.next}while(o!==null);b===null?x=b=i:b=b.next=i}else x=b=i;o={baseState:d.baseState,firstBaseUpdate:x,lastBaseUpdate:b,shared:d.shared,callbacks:d.callbacks},r.updateQueue=o;return}r=o.lastBaseUpdate,r===null?o.firstBaseUpdate=i:r.next=i,o.lastBaseUpdate=i}var Dh=!1;function ao(){if(Dh){var r=js;if(r!==null)throw r}}function io(r,i,o,d){Dh=!1;var x=r.updateQueue;Ha=!1;var b=x.firstBaseUpdate,C=x.lastBaseUpdate,D=x.shared.pending;if(D!==null){x.shared.pending=null;var X=D,ae=X.next;X.next=null,C===null?b=ae:C.next=ae,C=X;var oe=r.alternate;oe!==null&&(oe=oe.updateQueue,D=oe.lastBaseUpdate,D!==C&&(D===null?oe.firstBaseUpdate=ae:D.next=ae,oe.lastBaseUpdate=X))}if(b!==null){var me=x.baseState;C=0,oe=ae=X=null,D=b;do{var ie=D.lane&-536870913,se=ie!==D.lane;if(se?(lt&ie)===ie:(d&ie)===ie){ie!==0&&ie===Ls&&(Dh=!0),oe!==null&&(oe=oe.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var Oe=r,Ue=D;ie=i;var Nt=o;switch(Ue.tag){case 1:if(Oe=Ue.payload,typeof Oe=="function"){me=Oe.call(Nt,me,ie);break e}me=Oe;break e;case 3:Oe.flags=Oe.flags&-65537|128;case 0:if(Oe=Ue.payload,ie=typeof Oe=="function"?Oe.call(Nt,me,ie):Oe,ie==null)break e;me=g({},me,ie);break e;case 2:Ha=!0}}ie=D.callback,ie!==null&&(r.flags|=64,se&&(r.flags|=8192),se=x.callbacks,se===null?x.callbacks=[ie]:se.push(ie))}else se={lane:ie,tag:D.tag,payload:D.payload,callback:D.callback,next:null},oe===null?(ae=oe=se,X=me):oe=oe.next=se,C|=ie;if(D=D.next,D===null){if(D=x.shared.pending,D===null)break;se=D,D=se.next,se.next=null,x.lastBaseUpdate=se,x.shared.pending=null}}while(!0);oe===null&&(X=me),x.baseState=X,x.firstBaseUpdate=ae,x.lastBaseUpdate=oe,b===null&&(x.shared.lanes=0),Ga|=C,r.lanes=C,r.memoizedState=me}}function jx(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function Mx(r,i){var o=r.callbacks;if(o!==null)for(r.callbacks=null,r=0;r<o.length;r++)jx(o[r],i)}var Ps=H(null),cc=H(0);function Bx(r,i){r=va,L(cc,r),L(Ps,i),va=r|i.baseLanes}function Lh(){L(cc,va),L(Ps,Ps.current)}function jh(){va=cc.current,Z(Ps),Z(cc)}var Wn=H(null),pr=null;function $a(r){var i=r.alternate;L(Qt,Qt.current&1),L(Wn,r),pr===null&&(i===null||Ps.current!==null||i.memoizedState!==null)&&(pr=r)}function Mh(r){L(Qt,Qt.current),L(Wn,r),pr===null&&(pr=r)}function Px(r){r.tag===22?(L(Qt,Qt.current),L(Wn,r),pr===null&&(pr=r)):qa()}function qa(){L(Qt,Qt.current),L(Wn,Wn.current)}function Kn(r){Z(Wn),pr===r&&(pr=null),Z(Qt)}var Qt=H(0);function dc(r){for(var i=r;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||F0(o)||$0(o)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var ma=0,We=null,St=null,Jt=null,fc=!1,zs=!1,Hi=!1,hc=0,so=0,Hs=null,ZA=0;function Vt(){throw Error(a(321))}function Bh(r,i){if(i===null)return!1;for(var o=0;o<i.length&&o<r.length;o++)if(!Xn(r[o],i[o]))return!1;return!0}function Ph(r,i,o,d,x,b){return ma=b,We=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,R.H=r===null||r.memoizedState===null?Tb:Jh,Hi=!1,b=o(d,x),Hi=!1,zs&&(b=Hx(i,o,d,x)),zx(r),b}function zx(r){R.H=uo;var i=St!==null&&St.next!==null;if(ma=0,Jt=St=We=null,fc=!1,so=0,Hs=null,i)throw Error(a(300));r===null||en||(r=r.dependencies,r!==null&&rc(r)&&(en=!0))}function Hx(r,i,o,d){We=r;var x=0;do{if(zs&&(Hs=null),so=0,zs=!1,25<=x)throw Error(a(301));if(x+=1,Jt=St=null,r.updateQueue!=null){var b=r.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}R.H=vb,b=i(o,d)}while(zs);return b}function JA(){var r=R.H,i=r.useState()[0];return i=typeof i.then=="function"?lo(i):i,r=r.useState()[0],(St!==null?St.memoizedState:null)!==r&&(We.flags|=1024),i}function zh(){var r=hc!==0;return hc=0,r}function Hh(r,i,o){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~o}function Uh(r){if(fc){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}fc=!1}ma=0,Jt=St=We=null,zs=!1,so=hc=0,Hs=null}function On(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?We.memoizedState=Jt=r:Jt=Jt.next=r,Jt}function Wt(){if(St===null){var r=We.alternate;r=r!==null?r.memoizedState:null}else r=St.next;var i=Jt===null?We.memoizedState:Jt.next;if(i!==null)Jt=i,St=r;else{if(r===null)throw We.alternate===null?Error(a(467)):Error(a(310));St=r,r={memoizedState:St.memoizedState,baseState:St.baseState,baseQueue:St.baseQueue,queue:St.queue,next:null},Jt===null?We.memoizedState=Jt=r:Jt=Jt.next=r}return Jt}function mc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function lo(r){var i=so;return so+=1,Hs===null&&(Hs=[]),r=Rx(Hs,r,i),i=We,(Jt===null?i.memoizedState:Jt.next)===null&&(i=i.alternate,R.H=i===null||i.memoizedState===null?Tb:Jh),r}function pc(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return lo(r);if(r.$$typeof===w)return bn(r)}throw Error(a(438,String(r)))}function Fh(r){var i=null,o=We.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var d=We.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(i={data:d.data.map(function(x){return x.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=mc(),We.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(r),d=0;d<r;d++)o[d]=B;return i.index++,o}function pa(r,i){return typeof i=="function"?i(r):i}function gc(r){var i=Wt();return $h(i,St,r)}function $h(r,i,o){var d=r.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=o;var x=r.baseQueue,b=d.pending;if(b!==null){if(x!==null){var C=x.next;x.next=b.next,b.next=C}i.baseQueue=x=b,d.pending=null}if(b=r.baseState,x===null)r.memoizedState=b;else{i=x.next;var D=C=null,X=null,ae=i,oe=!1;do{var me=ae.lane&-536870913;if(me!==ae.lane?(lt&me)===me:(ma&me)===me){var ie=ae.revertLane;if(ie===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),me===Ls&&(oe=!0);else if((ma&ie)===ie){ae=ae.next,ie===Ls&&(oe=!0);continue}else me={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},X===null?(D=X=me,C=b):X=X.next=me,We.lanes|=ie,Ga|=ie;me=ae.action,Hi&&o(b,me),b=ae.hasEagerState?ae.eagerState:o(b,me)}else ie={lane:me,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},X===null?(D=X=ie,C=b):X=X.next=ie,We.lanes|=me,Ga|=me;ae=ae.next}while(ae!==null&&ae!==i);if(X===null?C=b:X.next=D,!Xn(b,r.memoizedState)&&(en=!0,oe&&(o=js,o!==null)))throw o;r.memoizedState=b,r.baseState=C,r.baseQueue=X,d.lastRenderedState=b}return x===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function qh(r){var i=Wt(),o=i.queue;if(o===null)throw Error(a(311));o.lastRenderedReducer=r;var d=o.dispatch,x=o.pending,b=i.memoizedState;if(x!==null){o.pending=null;var C=x=x.next;do b=r(b,C.action),C=C.next;while(C!==x);Xn(b,i.memoizedState)||(en=!0),i.memoizedState=b,i.baseQueue===null&&(i.baseState=b),o.lastRenderedState=b}return[b,d]}function Ux(r,i,o){var d=We,x=Wt(),b=ut;if(b){if(o===void 0)throw Error(a(407));o=o()}else o=i();var C=!Xn((St||x).memoizedState,o);if(C&&(x.memoizedState=o,en=!0),x=x.queue,Gh(qx.bind(null,d,x,r),[r]),x.getSnapshot!==i||C||Jt!==null&&Jt.memoizedState.tag&1){if(d.flags|=2048,Us(9,{destroy:void 0},$x.bind(null,d,x,o,i),null),wt===null)throw Error(a(349));b||(ma&127)!==0||Fx(d,i,o)}return o}function Fx(r,i,o){r.flags|=16384,r={getSnapshot:i,value:o},i=We.updateQueue,i===null?(i=mc(),We.updateQueue=i,i.stores=[r]):(o=i.stores,o===null?i.stores=[r]:o.push(r))}function $x(r,i,o,d){i.value=o,i.getSnapshot=d,Vx(i)&&Yx(r)}function qx(r,i,o){return o(function(){Vx(i)&&Yx(r)})}function Vx(r){var i=r.getSnapshot;r=r.value;try{var o=i();return!Xn(r,o)}catch{return!0}}function Yx(r){var i=Oi(r,2);i!==null&&Fn(i,r,2)}function Vh(r){var i=On();if(typeof r=="function"){var o=r;if(r=o(),Hi){jn(!0);try{o()}finally{jn(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:r},i}function Gx(r,i,o,d){return r.baseState=o,$h(r,St,typeof d=="function"?d:pa)}function ew(r,i,o,d,x){if(yc(r))throw Error(a(485));if(r=i.action,r!==null){var b={payload:x,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(C){b.listeners.push(C)}};R.T!==null?o(!0):b.isTransition=!1,d(b),o=i.pending,o===null?(b.next=i.pending=b,Xx(i,b)):(b.next=o.next,i.pending=o.next=b)}}function Xx(r,i){var o=i.action,d=i.payload,x=r.state;if(i.isTransition){var b=R.T,C={};R.T=C;try{var D=o(x,d),X=R.S;X!==null&&X(C,D),Qx(r,i,D)}catch(ae){Yh(r,i,ae)}finally{b!==null&&C.types!==null&&(b.types=C.types),R.T=b}}else try{b=o(x,d),Qx(r,i,b)}catch(ae){Yh(r,i,ae)}}function Qx(r,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(d){Wx(r,i,d)},function(d){return Yh(r,i,d)}):Wx(r,i,o)}function Wx(r,i,o){i.status="fulfilled",i.value=o,Kx(i),r.state=o,i=r.pending,i!==null&&(o=i.next,o===i?r.pending=null:(o=o.next,i.next=o,Xx(r,o)))}function Yh(r,i,o){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=o,Kx(i),i=i.next;while(i!==d)}r.action=null}function Kx(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function Zx(r,i){return i}function Jx(r,i){if(ut){var o=wt.formState;if(o!==null){e:{var d=We;if(ut){if(Dt){t:{for(var x=Dt,b=mr;x.nodeType!==8;){if(!b){x=null;break t}if(x=gr(x.nextSibling),x===null){x=null;break t}}b=x.data,x=b==="F!"||b==="F"?x:null}if(x){Dt=gr(x.nextSibling),d=x.data==="F!";break e}}Pa(d)}d=!1}d&&(i=o[0])}}return o=On(),o.memoizedState=o.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zx,lastRenderedState:i},o.queue=d,o=bb.bind(null,We,d),d.dispatch=o,d=Vh(!1),b=Zh.bind(null,We,!1,d.queue),d=On(),x={state:i,dispatch:null,action:r,pending:null},d.queue=x,o=ew.bind(null,We,x,b,o),x.dispatch=o,d.memoizedState=r,[i,o,!1]}function eb(r){var i=Wt();return tb(i,St,r)}function tb(r,i,o){if(i=$h(r,i,Zx)[0],r=gc(pa)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var d=lo(i)}catch(C){throw C===Ms?sc:C}else d=i;i=Wt();var x=i.queue,b=x.dispatch;return o!==i.memoizedState&&(We.flags|=2048,Us(9,{destroy:void 0},tw.bind(null,x,o),null)),[d,b,r]}function tw(r,i){r.action=i}function nb(r){var i=Wt(),o=St;if(o!==null)return tb(i,o,r);Wt(),i=i.memoizedState,o=Wt();var d=o.queue.dispatch;return o.memoizedState=r,[i,d,!1]}function Us(r,i,o,d){return r={tag:r,create:o,deps:d,inst:i,next:null},i=We.updateQueue,i===null&&(i=mc(),We.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=r.next=r:(d=o.next,o.next=r,r.next=d,i.lastEffect=r),r}function rb(){return Wt().memoizedState}function xc(r,i,o,d){var x=On();We.flags|=r,x.memoizedState=Us(1|i,{destroy:void 0},o,d===void 0?null:d)}function bc(r,i,o,d){var x=Wt();d=d===void 0?null:d;var b=x.memoizedState.inst;St!==null&&d!==null&&Bh(d,St.memoizedState.deps)?x.memoizedState=Us(i,b,o,d):(We.flags|=r,x.memoizedState=Us(1|i,b,o,d))}function ab(r,i){xc(8390656,8,r,i)}function Gh(r,i){bc(2048,8,r,i)}function nw(r){We.flags|=4;var i=We.updateQueue;if(i===null)i=mc(),We.updateQueue=i,i.events=[r];else{var o=i.events;o===null?i.events=[r]:o.push(r)}}function ib(r){var i=Wt().memoizedState;return nw({ref:i,nextImpl:r}),function(){if((yt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function sb(r,i){return bc(4,2,r,i)}function lb(r,i){return bc(4,4,r,i)}function ob(r,i){if(typeof i=="function"){r=r();var o=i(r);return function(){typeof o=="function"?o():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function ub(r,i,o){o=o!=null?o.concat([r]):null,bc(4,4,ob.bind(null,i,r),o)}function Xh(){}function cb(r,i){var o=Wt();i=i===void 0?null:i;var d=o.memoizedState;return i!==null&&Bh(i,d[1])?d[0]:(o.memoizedState=[r,i],r)}function db(r,i){var o=Wt();i=i===void 0?null:i;var d=o.memoizedState;if(i!==null&&Bh(i,d[1]))return d[0];if(d=r(),Hi){jn(!0);try{r()}finally{jn(!1)}}return o.memoizedState=[d,i],d}function Qh(r,i,o){return o===void 0||(ma&1073741824)!==0&&(lt&261930)===0?r.memoizedState=i:(r.memoizedState=o,r=fy(),We.lanes|=r,Ga|=r,o)}function fb(r,i,o,d){return Xn(o,i)?o:Ps.current!==null?(r=Qh(r,o,d),Xn(r,i)||(en=!0),r):(ma&42)===0||(ma&1073741824)!==0&&(lt&261930)===0?(en=!0,r.memoizedState=o):(r=fy(),We.lanes|=r,Ga|=r,i)}function hb(r,i,o,d,x){var b=q.p;q.p=b!==0&&8>b?b:8;var C=R.T,D={};R.T=D,Zh(r,!1,i,o);try{var X=x(),ae=R.S;if(ae!==null&&ae(D,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var oe=KA(X,d);oo(r,i,oe,er(r))}else oo(r,i,d,er(r))}catch(me){oo(r,i,{then:function(){},status:"rejected",reason:me},er())}finally{q.p=b,C!==null&&D.types!==null&&(C.types=D.types),R.T=C}}function rw(){}function Wh(r,i,o,d){if(r.tag!==5)throw Error(a(476));var x=mb(r).queue;hb(r,x,i,W,o===null?rw:function(){return pb(r),o(d)})}function mb(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:W},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:o},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function pb(r){var i=mb(r);i.next===null&&(i=r.alternate.memoizedState),oo(r,i.next.queue,{},er())}function Kh(){return bn(Co)}function gb(){return Wt().memoizedState}function xb(){return Wt().memoizedState}function aw(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var o=er();r=Ua(o);var d=Fa(i,r,o);d!==null&&(Fn(d,i,o),ro(d,i,o)),i={cache:Ch()},r.payload=i;return}i=i.return}}function iw(r,i,o){var d=er();o={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},yc(r)?yb(i,o):(o=ph(r,i,o,d),o!==null&&(Fn(o,r,d),Eb(o,i,d)))}function bb(r,i,o){var d=er();oo(r,i,o,d)}function oo(r,i,o,d){var x={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(yc(r))yb(i,x);else{var b=r.alternate;if(r.lanes===0&&(b===null||b.lanes===0)&&(b=i.lastRenderedReducer,b!==null))try{var C=i.lastRenderedState,D=b(C,o);if(x.hasEagerState=!0,x.eagerState=D,Xn(D,C))return Ju(r,i,x,0),wt===null&&Zu(),!1}catch{}if(o=ph(r,i,x,d),o!==null)return Fn(o,r,d),Eb(o,i,d),!0}return!1}function Zh(r,i,o,d){if(d={lane:2,revertLane:R0(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},yc(r)){if(i)throw Error(a(479))}else i=ph(r,o,d,2),i!==null&&Fn(i,r,2)}function yc(r){var i=r.alternate;return r===We||i!==null&&i===We}function yb(r,i){zs=fc=!0;var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}function Eb(r,i,o){if((o&4194048)!==0){var d=i.lanes;d&=r.pendingLanes,o|=d,i.lanes=o,N1(r,o)}}var uo={readContext:bn,use:pc,useCallback:Vt,useContext:Vt,useEffect:Vt,useImperativeHandle:Vt,useLayoutEffect:Vt,useInsertionEffect:Vt,useMemo:Vt,useReducer:Vt,useRef:Vt,useState:Vt,useDebugValue:Vt,useDeferredValue:Vt,useTransition:Vt,useSyncExternalStore:Vt,useId:Vt,useHostTransitionStatus:Vt,useFormState:Vt,useActionState:Vt,useOptimistic:Vt,useMemoCache:Vt,useCacheRefresh:Vt};uo.useEffectEvent=Vt;var Tb={readContext:bn,use:pc,useCallback:function(r,i){return On().memoizedState=[r,i===void 0?null:i],r},useContext:bn,useEffect:ab,useImperativeHandle:function(r,i,o){o=o!=null?o.concat([r]):null,xc(4194308,4,ob.bind(null,i,r),o)},useLayoutEffect:function(r,i){return xc(4194308,4,r,i)},useInsertionEffect:function(r,i){xc(4,2,r,i)},useMemo:function(r,i){var o=On();i=i===void 0?null:i;var d=r();if(Hi){jn(!0);try{r()}finally{jn(!1)}}return o.memoizedState=[d,i],d},useReducer:function(r,i,o){var d=On();if(o!==void 0){var x=o(i);if(Hi){jn(!0);try{o(i)}finally{jn(!1)}}}else x=i;return d.memoizedState=d.baseState=x,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:x},d.queue=r,r=r.dispatch=iw.bind(null,We,r),[d.memoizedState,r]},useRef:function(r){var i=On();return r={current:r},i.memoizedState=r},useState:function(r){r=Vh(r);var i=r.queue,o=bb.bind(null,We,i);return i.dispatch=o,[r.memoizedState,o]},useDebugValue:Xh,useDeferredValue:function(r,i){var o=On();return Qh(o,r,i)},useTransition:function(){var r=Vh(!1);return r=hb.bind(null,We,r.queue,!0,!1),On().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,o){var d=We,x=On();if(ut){if(o===void 0)throw Error(a(407));o=o()}else{if(o=i(),wt===null)throw Error(a(349));(lt&127)!==0||Fx(d,i,o)}x.memoizedState=o;var b={value:o,getSnapshot:i};return x.queue=b,ab(qx.bind(null,d,b,r),[r]),d.flags|=2048,Us(9,{destroy:void 0},$x.bind(null,d,b,o,i),null),o},useId:function(){var r=On(),i=wt.identifierPrefix;if(ut){var o=$r,d=Fr;o=(d&~(1<<32-At(d)-1)).toString(32)+o,i="_"+i+"R_"+o,o=hc++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=ZA++,i="_"+i+"r_"+o.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:Kh,useFormState:Jx,useActionState:Jx,useOptimistic:function(r){var i=On();i.memoizedState=i.baseState=r;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=Zh.bind(null,We,!0,o),o.dispatch=i,[r,i]},useMemoCache:Fh,useCacheRefresh:function(){return On().memoizedState=aw.bind(null,We)},useEffectEvent:function(r){var i=On(),o={impl:r};return i.memoizedState=o,function(){if((yt&2)!==0)throw Error(a(440));return o.impl.apply(void 0,arguments)}}},Jh={readContext:bn,use:pc,useCallback:cb,useContext:bn,useEffect:Gh,useImperativeHandle:ub,useInsertionEffect:sb,useLayoutEffect:lb,useMemo:db,useReducer:gc,useRef:rb,useState:function(){return gc(pa)},useDebugValue:Xh,useDeferredValue:function(r,i){var o=Wt();return fb(o,St.memoizedState,r,i)},useTransition:function(){var r=gc(pa)[0],i=Wt().memoizedState;return[typeof r=="boolean"?r:lo(r),i]},useSyncExternalStore:Ux,useId:gb,useHostTransitionStatus:Kh,useFormState:eb,useActionState:eb,useOptimistic:function(r,i){var o=Wt();return Gx(o,St,r,i)},useMemoCache:Fh,useCacheRefresh:xb};Jh.useEffectEvent=ib;var vb={readContext:bn,use:pc,useCallback:cb,useContext:bn,useEffect:Gh,useImperativeHandle:ub,useInsertionEffect:sb,useLayoutEffect:lb,useMemo:db,useReducer:qh,useRef:rb,useState:function(){return qh(pa)},useDebugValue:Xh,useDeferredValue:function(r,i){var o=Wt();return St===null?Qh(o,r,i):fb(o,St.memoizedState,r,i)},useTransition:function(){var r=qh(pa)[0],i=Wt().memoizedState;return[typeof r=="boolean"?r:lo(r),i]},useSyncExternalStore:Ux,useId:gb,useHostTransitionStatus:Kh,useFormState:nb,useActionState:nb,useOptimistic:function(r,i){var o=Wt();return St!==null?Gx(o,St,r,i):(o.baseState=r,[r,o.queue.dispatch])},useMemoCache:Fh,useCacheRefresh:xb};vb.useEffectEvent=ib;function e0(r,i,o,d){i=r.memoizedState,o=o(d,i),o=o==null?i:g({},i,o),r.memoizedState=o,r.lanes===0&&(r.updateQueue.baseState=o)}var t0={enqueueSetState:function(r,i,o){r=r._reactInternals;var d=er(),x=Ua(d);x.payload=i,o!=null&&(x.callback=o),i=Fa(r,x,d),i!==null&&(Fn(i,r,d),ro(i,r,d))},enqueueReplaceState:function(r,i,o){r=r._reactInternals;var d=er(),x=Ua(d);x.tag=1,x.payload=i,o!=null&&(x.callback=o),i=Fa(r,x,d),i!==null&&(Fn(i,r,d),ro(i,r,d))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var o=er(),d=Ua(o);d.tag=2,i!=null&&(d.callback=i),i=Fa(r,d,o),i!==null&&(Fn(i,r,o),ro(i,r,o))}};function Sb(r,i,o,d,x,b,C){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,b,C):i.prototype&&i.prototype.isPureReactComponent?!Ql(o,d)||!Ql(x,b):!0}function kb(r,i,o,d){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,d),i.state!==r&&t0.enqueueReplaceState(i,i.state,null)}function Ui(r,i){var o=i;if("ref"in i){o={};for(var d in i)d!=="ref"&&(o[d]=i[d])}if(r=r.defaultProps){o===i&&(o=g({},o));for(var x in r)o[x]===void 0&&(o[x]=r[x])}return o}function Nb(r){Ku(r)}function Cb(r){console.error(r)}function _b(r){Ku(r)}function Ec(r,i){try{var o=r.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}function Ab(r,i,o){try{var d=r.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function n0(r,i,o){return o=Ua(o),o.tag=3,o.payload={element:null},o.callback=function(){Ec(r,i)},o}function wb(r){return r=Ua(r),r.tag=3,r}function Rb(r,i,o,d){var x=o.type.getDerivedStateFromError;if(typeof x=="function"){var b=d.value;r.payload=function(){return x(b)},r.callback=function(){Ab(i,o,d)}}var C=o.stateNode;C!==null&&typeof C.componentDidCatch=="function"&&(r.callback=function(){Ab(i,o,d),typeof x!="function"&&(Xa===null?Xa=new Set([this]):Xa.add(this));var D=d.stack;this.componentDidCatch(d.value,{componentStack:D!==null?D:""})})}function sw(r,i,o,d,x){if(o.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(i=o.alternate,i!==null&&Ds(i,o,x,!0),o=Wn.current,o!==null){switch(o.tag){case 31:case 13:return pr===null?Ic():o.alternate===null&&Yt===0&&(Yt=3),o.flags&=-257,o.flags|=65536,o.lanes=x,d===lc?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([d]):i.add(d),_0(r,d,x)),!1;case 22:return o.flags|=65536,d===lc?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([d]):o.add(d)),_0(r,d,x)),!1}throw Error(a(435,o.tag))}return _0(r,d,x),Ic(),!1}if(ut)return i=Wn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=x,d!==Th&&(r=Error(a(422),{cause:d}),Zl(dr(r,o)))):(d!==Th&&(i=Error(a(423),{cause:d}),Zl(dr(i,o))),r=r.current.alternate,r.flags|=65536,x&=-x,r.lanes|=x,d=dr(d,o),x=n0(r.stateNode,d,x),Ih(r,x),Yt!==4&&(Yt=2)),!1;var b=Error(a(520),{cause:d});if(b=dr(b,o),bo===null?bo=[b]:bo.push(b),Yt!==4&&(Yt=2),i===null)return!0;d=dr(d,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,r=x&-x,o.lanes|=r,r=n0(o.stateNode,d,r),Ih(o,r),!1;case 1:if(i=o.type,b=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Xa===null||!Xa.has(b))))return o.flags|=65536,x&=-x,o.lanes|=x,x=wb(x),Rb(x,r,o,d),Ih(o,x),!1}o=o.return}while(o!==null);return!1}var r0=Error(a(461)),en=!1;function yn(r,i,o,d){i.child=r===null?Lx(i,null,o,d):zi(i,r.child,o,d)}function Ob(r,i,o,d,x){o=o.render;var b=i.ref;if("ref"in d){var C={};for(var D in d)D!=="ref"&&(C[D]=d[D])}else C=d;return ji(i),d=Ph(r,i,o,C,b,x),D=zh(),r!==null&&!en?(Hh(r,i,x),ga(r,i,x)):(ut&&D&&yh(i),i.flags|=1,yn(r,i,d,x),i.child)}function Ib(r,i,o,d,x){if(r===null){var b=o.type;return typeof b=="function"&&!gh(b)&&b.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=b,Db(r,i,b,d,x)):(r=tc(o.type,null,d,i,i.mode,x),r.ref=i.ref,r.return=i,i.child=r)}if(b=r.child,!d0(r,x)){var C=b.memoizedProps;if(o=o.compare,o=o!==null?o:Ql,o(C,d)&&r.ref===i.ref)return ga(r,i,x)}return i.flags|=1,r=ca(b,d),r.ref=i.ref,r.return=i,i.child=r}function Db(r,i,o,d,x){if(r!==null){var b=r.memoizedProps;if(Ql(b,d)&&r.ref===i.ref)if(en=!1,i.pendingProps=d=b,d0(r,x))(r.flags&131072)!==0&&(en=!0);else return i.lanes=r.lanes,ga(r,i,x)}return a0(r,i,o,d,x)}function Lb(r,i,o,d){var x=d.children,b=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((i.flags&128)!==0){if(b=b!==null?b.baseLanes|o:o,r!==null){for(d=i.child=r.child,x=0;d!==null;)x=x|d.lanes|d.childLanes,d=d.sibling;d=x&~b}else d=0,i.child=null;return jb(r,i,b,o,d)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&ic(i,b!==null?b.cachePool:null),b!==null?Bx(i,b):Lh(),Px(i);else return d=i.lanes=536870912,jb(r,i,b!==null?b.baseLanes|o:o,o,d)}else b!==null?(ic(i,b.cachePool),Bx(i,b),qa(),i.memoizedState=null):(r!==null&&ic(i,null),Lh(),qa());return yn(r,i,x,o),i.child}function co(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function jb(r,i,o,d,x){var b=Ah();return b=b===null?null:{parent:Zt._currentValue,pool:b},i.memoizedState={baseLanes:o,cachePool:b},r!==null&&ic(i,null),Lh(),Px(i),r!==null&&Ds(r,i,d,!0),i.childLanes=x,null}function Tc(r,i){return i=Sc({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function Mb(r,i,o){return zi(i,r.child,null,o),r=Tc(i,i.pendingProps),r.flags|=2,Kn(i),i.memoizedState=null,r}function lw(r,i,o){var d=i.pendingProps,x=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(ut){if(d.mode==="hidden")return r=Tc(i,d),i.lanes=536870912,co(null,r);if(Mh(i),(r=Dt)?(r=Xy(r,mr),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Ma!==null?{id:Fr,overflow:$r}:null,retryLane:536870912,hydrationErrors:null},o=yx(r),o.return=i,i.child=o,xn=i,Dt=null)):r=null,r===null)throw Pa(i);return i.lanes=536870912,null}return Tc(i,d)}var b=r.memoizedState;if(b!==null){var C=b.dehydrated;if(Mh(i),x)if(i.flags&256)i.flags&=-257,i=Mb(r,i,o);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(en||Ds(r,i,o,!1),x=(o&r.childLanes)!==0,en||x){if(d=wt,d!==null&&(C=C1(d,o),C!==0&&C!==b.retryLane))throw b.retryLane=C,Oi(r,C),Fn(d,r,C),r0;Ic(),i=Mb(r,i,o)}else r=b.treeContext,Dt=gr(C.nextSibling),xn=i,ut=!0,Ba=null,mr=!1,r!==null&&vx(i,r),i=Tc(i,d),i.flags|=4096;return i}return r=ca(r.child,{mode:d.mode,children:d.children}),r.ref=i.ref,i.child=r,r.return=i,r}function vc(r,i){var o=i.ref;if(o===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(a(284));(r===null||r.ref!==o)&&(i.flags|=4194816)}}function a0(r,i,o,d,x){return ji(i),o=Ph(r,i,o,d,void 0,x),d=zh(),r!==null&&!en?(Hh(r,i,x),ga(r,i,x)):(ut&&d&&yh(i),i.flags|=1,yn(r,i,o,x),i.child)}function Bb(r,i,o,d,x,b){return ji(i),i.updateQueue=null,o=Hx(i,d,o,x),zx(r),d=zh(),r!==null&&!en?(Hh(r,i,b),ga(r,i,b)):(ut&&d&&yh(i),i.flags|=1,yn(r,i,o,b),i.child)}function Pb(r,i,o,d,x){if(ji(i),i.stateNode===null){var b=ws,C=o.contextType;typeof C=="object"&&C!==null&&(b=bn(C)),b=new o(d,b),i.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=t0,i.stateNode=b,b._reactInternals=i,b=i.stateNode,b.props=d,b.state=i.memoizedState,b.refs={},Rh(i),C=o.contextType,b.context=typeof C=="object"&&C!==null?bn(C):ws,b.state=i.memoizedState,C=o.getDerivedStateFromProps,typeof C=="function"&&(e0(i,o,C,d),b.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(C=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),C!==b.state&&t0.enqueueReplaceState(b,b.state,null),io(i,d,b,x),ao(),b.state=i.memoizedState),typeof b.componentDidMount=="function"&&(i.flags|=4194308),d=!0}else if(r===null){b=i.stateNode;var D=i.memoizedProps,X=Ui(o,D);b.props=X;var ae=b.context,oe=o.contextType;C=ws,typeof oe=="object"&&oe!==null&&(C=bn(oe));var me=o.getDerivedStateFromProps;oe=typeof me=="function"||typeof b.getSnapshotBeforeUpdate=="function",D=i.pendingProps!==D,oe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(D||ae!==C)&&kb(i,b,d,C),Ha=!1;var ie=i.memoizedState;b.state=ie,io(i,d,b,x),ao(),ae=i.memoizedState,D||ie!==ae||Ha?(typeof me=="function"&&(e0(i,o,me,d),ae=i.memoizedState),(X=Ha||Sb(i,o,X,d,ie,ae,C))?(oe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(i.flags|=4194308)):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=ae),b.props=d,b.state=ae,b.context=C,d=X):(typeof b.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{b=i.stateNode,Oh(r,i),C=i.memoizedProps,oe=Ui(o,C),b.props=oe,me=i.pendingProps,ie=b.context,ae=o.contextType,X=ws,typeof ae=="object"&&ae!==null&&(X=bn(ae)),D=o.getDerivedStateFromProps,(ae=typeof D=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(C!==me||ie!==X)&&kb(i,b,d,X),Ha=!1,ie=i.memoizedState,b.state=ie,io(i,d,b,x),ao();var se=i.memoizedState;C!==me||ie!==se||Ha||r!==null&&r.dependencies!==null&&rc(r.dependencies)?(typeof D=="function"&&(e0(i,o,D,d),se=i.memoizedState),(oe=Ha||Sb(i,o,oe,d,ie,se,X)||r!==null&&r.dependencies!==null&&rc(r.dependencies))?(ae||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(d,se,X),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(d,se,X)),typeof b.componentDidUpdate=="function"&&(i.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof b.componentDidUpdate!="function"||C===r.memoizedProps&&ie===r.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||C===r.memoizedProps&&ie===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=se),b.props=d,b.state=se,b.context=X,d=oe):(typeof b.componentDidUpdate!="function"||C===r.memoizedProps&&ie===r.memoizedState||(i.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||C===r.memoizedProps&&ie===r.memoizedState||(i.flags|=1024),d=!1)}return b=d,vc(r,i),d=(i.flags&128)!==0,b||d?(b=i.stateNode,o=d&&typeof o.getDerivedStateFromError!="function"?null:b.render(),i.flags|=1,r!==null&&d?(i.child=zi(i,r.child,null,x),i.child=zi(i,null,o,x)):yn(r,i,o,x),i.memoizedState=b.state,r=i.child):r=ga(r,i,x),r}function zb(r,i,o,d){return Di(),i.flags|=256,yn(r,i,o,d),i.child}var i0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function s0(r){return{baseLanes:r,cachePool:Ax()}}function l0(r,i,o){return r=r!==null?r.childLanes&~o:0,i&&(r|=Jn),r}function Hb(r,i,o){var d=i.pendingProps,x=!1,b=(i.flags&128)!==0,C;if((C=b)||(C=r!==null&&r.memoizedState===null?!1:(Qt.current&2)!==0),C&&(x=!0,i.flags&=-129),C=(i.flags&32)!==0,i.flags&=-33,r===null){if(ut){if(x?$a(i):qa(),(r=Dt)?(r=Xy(r,mr),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Ma!==null?{id:Fr,overflow:$r}:null,retryLane:536870912,hydrationErrors:null},o=yx(r),o.return=i,i.child=o,xn=i,Dt=null)):r=null,r===null)throw Pa(i);return $0(r)?i.lanes=32:i.lanes=536870912,null}var D=d.children;return d=d.fallback,x?(qa(),x=i.mode,D=Sc({mode:"hidden",children:D},x),d=Ii(d,x,o,null),D.return=i,d.return=i,D.sibling=d,i.child=D,d=i.child,d.memoizedState=s0(o),d.childLanes=l0(r,C,o),i.memoizedState=i0,co(null,d)):($a(i),o0(i,D))}var X=r.memoizedState;if(X!==null&&(D=X.dehydrated,D!==null)){if(b)i.flags&256?($a(i),i.flags&=-257,i=u0(r,i,o)):i.memoizedState!==null?(qa(),i.child=r.child,i.flags|=128,i=null):(qa(),D=d.fallback,x=i.mode,d=Sc({mode:"visible",children:d.children},x),D=Ii(D,x,o,null),D.flags|=2,d.return=i,D.return=i,d.sibling=D,i.child=d,zi(i,r.child,null,o),d=i.child,d.memoizedState=s0(o),d.childLanes=l0(r,C,o),i.memoizedState=i0,i=co(null,d));else if($a(i),$0(D)){if(C=D.nextSibling&&D.nextSibling.dataset,C)var ae=C.dgst;C=ae,d=Error(a(419)),d.stack="",d.digest=C,Zl({value:d,source:null,stack:null}),i=u0(r,i,o)}else if(en||Ds(r,i,o,!1),C=(o&r.childLanes)!==0,en||C){if(C=wt,C!==null&&(d=C1(C,o),d!==0&&d!==X.retryLane))throw X.retryLane=d,Oi(r,d),Fn(C,r,d),r0;F0(D)||Ic(),i=u0(r,i,o)}else F0(D)?(i.flags|=192,i.child=r.child,i=null):(r=X.treeContext,Dt=gr(D.nextSibling),xn=i,ut=!0,Ba=null,mr=!1,r!==null&&vx(i,r),i=o0(i,d.children),i.flags|=4096);return i}return x?(qa(),D=d.fallback,x=i.mode,X=r.child,ae=X.sibling,d=ca(X,{mode:"hidden",children:d.children}),d.subtreeFlags=X.subtreeFlags&65011712,ae!==null?D=ca(ae,D):(D=Ii(D,x,o,null),D.flags|=2),D.return=i,d.return=i,d.sibling=D,i.child=d,co(null,d),d=i.child,D=r.child.memoizedState,D===null?D=s0(o):(x=D.cachePool,x!==null?(X=Zt._currentValue,x=x.parent!==X?{parent:X,pool:X}:x):x=Ax(),D={baseLanes:D.baseLanes|o,cachePool:x}),d.memoizedState=D,d.childLanes=l0(r,C,o),i.memoizedState=i0,co(r.child,d)):($a(i),o=r.child,r=o.sibling,o=ca(o,{mode:"visible",children:d.children}),o.return=i,o.sibling=null,r!==null&&(C=i.deletions,C===null?(i.deletions=[r],i.flags|=16):C.push(r)),i.child=o,i.memoizedState=null,o)}function o0(r,i){return i=Sc({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function Sc(r,i){return r=Qn(22,r,null,i),r.lanes=0,r}function u0(r,i,o){return zi(i,r.child,null,o),r=o0(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function Ub(r,i,o){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),kh(r.return,i,o)}function c0(r,i,o,d,x,b){var C=r.memoizedState;C===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:x,treeForkCount:b}:(C.isBackwards=i,C.rendering=null,C.renderingStartTime=0,C.last=d,C.tail=o,C.tailMode=x,C.treeForkCount=b)}function Fb(r,i,o){var d=i.pendingProps,x=d.revealOrder,b=d.tail;d=d.children;var C=Qt.current,D=(C&2)!==0;if(D?(C=C&1|2,i.flags|=128):C&=1,L(Qt,C),yn(r,i,d,o),d=ut?Kl:0,!D&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Ub(r,o,i);else if(r.tag===19)Ub(r,o,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(x){case"forwards":for(o=i.child,x=null;o!==null;)r=o.alternate,r!==null&&dc(r)===null&&(x=o),o=o.sibling;o=x,o===null?(x=i.child,i.child=null):(x=o.sibling,o.sibling=null),c0(i,!1,x,o,b,d);break;case"backwards":case"unstable_legacy-backwards":for(o=null,x=i.child,i.child=null;x!==null;){if(r=x.alternate,r!==null&&dc(r)===null){i.child=x;break}r=x.sibling,x.sibling=o,o=x,x=r}c0(i,!0,o,null,b,d);break;case"together":c0(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}function ga(r,i,o){if(r!==null&&(i.dependencies=r.dependencies),Ga|=i.lanes,(o&i.childLanes)===0)if(r!==null){if(Ds(r,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,o=ca(r,r.pendingProps),i.child=o,o.return=i;r.sibling!==null;)r=r.sibling,o=o.sibling=ca(r,r.pendingProps),o.return=i;o.sibling=null}return i.child}function d0(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&rc(r)))}function ow(r,i,o){switch(i.tag){case 3:ue(i,i.stateNode.containerInfo),za(i,Zt,r.memoizedState.cache),Di();break;case 27:case 5:Ae(i);break;case 4:ue(i,i.stateNode.containerInfo);break;case 10:za(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Mh(i),null;break;case 13:var d=i.memoizedState;if(d!==null)return d.dehydrated!==null?($a(i),i.flags|=128,null):(o&i.child.childLanes)!==0?Hb(r,i,o):($a(i),r=ga(r,i,o),r!==null?r.sibling:null);$a(i);break;case 19:var x=(r.flags&128)!==0;if(d=(o&i.childLanes)!==0,d||(Ds(r,i,o,!1),d=(o&i.childLanes)!==0),x){if(d)return Fb(r,i,o);i.flags|=128}if(x=i.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),L(Qt,Qt.current),d)break;return null;case 22:return i.lanes=0,Lb(r,i,o,i.pendingProps);case 24:za(i,Zt,r.memoizedState.cache)}return ga(r,i,o)}function $b(r,i,o){if(r!==null)if(r.memoizedProps!==i.pendingProps)en=!0;else{if(!d0(r,o)&&(i.flags&128)===0)return en=!1,ow(r,i,o);en=(r.flags&131072)!==0}else en=!1,ut&&(i.flags&1048576)!==0&&Tx(i,Kl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var d=i.pendingProps;if(r=Bi(i.elementType),i.type=r,typeof r=="function")gh(r)?(d=Ui(r,d),i.tag=1,i=Pb(null,i,r,d,o)):(i.tag=0,i=a0(null,i,r,d,o));else{if(r!=null){var x=r.$$typeof;if(x===P){i.tag=11,i=Ob(null,i,r,d,o);break e}else if(x===I){i.tag=14,i=Ib(null,i,r,d,o);break e}}throw i=ee(r)||r,Error(a(306,i,""))}}return i;case 0:return a0(r,i,i.type,i.pendingProps,o);case 1:return d=i.type,x=Ui(d,i.pendingProps),Pb(r,i,d,x,o);case 3:e:{if(ue(i,i.stateNode.containerInfo),r===null)throw Error(a(387));d=i.pendingProps;var b=i.memoizedState;x=b.element,Oh(r,i),io(i,d,null,o);var C=i.memoizedState;if(d=C.cache,za(i,Zt,d),d!==b.cache&&Nh(i,[Zt],o,!0),ao(),d=C.element,b.isDehydrated)if(b={element:d,isDehydrated:!1,cache:C.cache},i.updateQueue.baseState=b,i.memoizedState=b,i.flags&256){i=zb(r,i,d,o);break e}else if(d!==x){x=dr(Error(a(424)),i),Zl(x),i=zb(r,i,d,o);break e}else for(r=i.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,Dt=gr(r.firstChild),xn=i,ut=!0,Ba=null,mr=!0,o=Lx(i,null,d,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(Di(),d===x){i=ga(r,i,o);break e}yn(r,i,d,o)}i=i.child}return i;case 26:return vc(r,i),r===null?(o=eE(i.type,null,i.pendingProps,null))?i.memoizedState=o:ut||(o=i.type,r=i.pendingProps,d=zc(ve.current).createElement(o),d[gn]=i,d[Mn]=r,En(d,o,r),dn(d),i.stateNode=d):i.memoizedState=eE(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return Ae(i),r===null&&ut&&(d=i.stateNode=Ky(i.type,i.pendingProps,ve.current),xn=i,mr=!0,x=Dt,Za(i.type)?(q0=x,Dt=gr(d.firstChild)):Dt=x),yn(r,i,i.pendingProps.children,o),vc(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&ut&&((x=d=Dt)&&(d=Pw(d,i.type,i.pendingProps,mr),d!==null?(i.stateNode=d,xn=i,Dt=gr(d.firstChild),mr=!1,x=!0):x=!1),x||Pa(i)),Ae(i),x=i.type,b=i.pendingProps,C=r!==null?r.memoizedProps:null,d=b.children,z0(x,b)?d=null:C!==null&&z0(x,C)&&(i.flags|=32),i.memoizedState!==null&&(x=Ph(r,i,JA,null,null,o),Co._currentValue=x),vc(r,i),yn(r,i,d,o),i.child;case 6:return r===null&&ut&&((r=o=Dt)&&(o=zw(o,i.pendingProps,mr),o!==null?(i.stateNode=o,xn=i,Dt=null,r=!0):r=!1),r||Pa(i)),null;case 13:return Hb(r,i,o);case 4:return ue(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=zi(i,null,d,o):yn(r,i,d,o),i.child;case 11:return Ob(r,i,i.type,i.pendingProps,o);case 7:return yn(r,i,i.pendingProps,o),i.child;case 8:return yn(r,i,i.pendingProps.children,o),i.child;case 12:return yn(r,i,i.pendingProps.children,o),i.child;case 10:return d=i.pendingProps,za(i,i.type,d.value),yn(r,i,d.children,o),i.child;case 9:return x=i.type._context,d=i.pendingProps.children,ji(i),x=bn(x),d=d(x),i.flags|=1,yn(r,i,d,o),i.child;case 14:return Ib(r,i,i.type,i.pendingProps,o);case 15:return Db(r,i,i.type,i.pendingProps,o);case 19:return Fb(r,i,o);case 31:return lw(r,i,o);case 22:return Lb(r,i,o,i.pendingProps);case 24:return ji(i),d=bn(Zt),r===null?(x=Ah(),x===null&&(x=wt,b=Ch(),x.pooledCache=b,b.refCount++,b!==null&&(x.pooledCacheLanes|=o),x=b),i.memoizedState={parent:d,cache:x},Rh(i),za(i,Zt,x)):((r.lanes&o)!==0&&(Oh(r,i),io(i,null,null,o),ao()),x=r.memoizedState,b=i.memoizedState,x.parent!==d?(x={parent:d,cache:d},i.memoizedState=x,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=x),za(i,Zt,d)):(d=b.cache,za(i,Zt,d),d!==x.cache&&Nh(i,[Zt],o,!0))),yn(r,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function xa(r){r.flags|=4}function f0(r,i,o,d,x){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(x&335544128)===x)if(r.stateNode.complete)r.flags|=8192;else if(gy())r.flags|=8192;else throw Pi=lc,wh}else r.flags&=-16777217}function qb(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!iE(i))if(gy())r.flags|=8192;else throw Pi=lc,wh}function kc(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?S1():536870912,r.lanes|=i,Vs|=i)}function fo(r,i){if(!ut)switch(r.tailMode){case"hidden":i=r.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?r.tail=null:o.sibling=null;break;case"collapsed":o=r.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function Lt(r){var i=r.alternate!==null&&r.alternate.child===r.child,o=0,d=0;if(i)for(var x=r.child;x!==null;)o|=x.lanes|x.childLanes,d|=x.subtreeFlags&65011712,d|=x.flags&65011712,x.return=r,x=x.sibling;else for(x=r.child;x!==null;)o|=x.lanes|x.childLanes,d|=x.subtreeFlags,d|=x.flags,x.return=r,x=x.sibling;return r.subtreeFlags|=d,r.childLanes=o,i}function uw(r,i,o){var d=i.pendingProps;switch(Eh(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lt(i),null;case 1:return Lt(i),null;case 3:return o=i.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),ha(Zt),xe(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(r===null||r.child===null)&&(Is(i)?xa(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,vh())),Lt(i),null;case 26:var x=i.type,b=i.memoizedState;return r===null?(xa(i),b!==null?(Lt(i),qb(i,b)):(Lt(i),f0(i,x,null,d,o))):b?b!==r.memoizedState?(xa(i),Lt(i),qb(i,b)):(Lt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==d&&xa(i),Lt(i),f0(i,x,r,d,o)),null;case 27:if(Le(i),o=ve.current,x=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&xa(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return Lt(i),null}r=fe.current,Is(i)?Sx(i):(r=Ky(x,d,o),i.stateNode=r,xa(i))}return Lt(i),null;case 5:if(Le(i),x=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&xa(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return Lt(i),null}if(b=fe.current,Is(i))Sx(i);else{var C=zc(ve.current);switch(b){case 1:b=C.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:b=C.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":b=C.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":b=C.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":b=C.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof d.is=="string"?C.createElement("select",{is:d.is}):C.createElement("select"),d.multiple?b.multiple=!0:d.size&&(b.size=d.size);break;default:b=typeof d.is=="string"?C.createElement(x,{is:d.is}):C.createElement(x)}}b[gn]=i,b[Mn]=d;e:for(C=i.child;C!==null;){if(C.tag===5||C.tag===6)b.appendChild(C.stateNode);else if(C.tag!==4&&C.tag!==27&&C.child!==null){C.child.return=C,C=C.child;continue}if(C===i)break e;for(;C.sibling===null;){if(C.return===null||C.return===i)break e;C=C.return}C.sibling.return=C.return,C=C.sibling}i.stateNode=b;e:switch(En(b,x,d),x){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&xa(i)}}return Lt(i),f0(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,o),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==d&&xa(i);else{if(typeof d!="string"&&i.stateNode===null)throw Error(a(166));if(r=ve.current,Is(i)){if(r=i.stateNode,o=i.memoizedProps,d=null,x=xn,x!==null)switch(x.tag){case 27:case 5:d=x.memoizedProps}r[gn]=i,r=!!(r.nodeValue===o||d!==null&&d.suppressHydrationWarning===!0||Hy(r.nodeValue,o)),r||Pa(i,!0)}else r=zc(r).createTextNode(d),r[gn]=i,i.stateNode=r}return Lt(i),null;case 31:if(o=i.memoizedState,r===null||r.memoizedState!==null){if(d=Is(i),o!==null){if(r===null){if(!d)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[gn]=i}else Di(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Lt(i),r=!1}else o=vh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=o),r=!0;if(!r)return i.flags&256?(Kn(i),i):(Kn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Lt(i),null;case 13:if(d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(x=Is(i),d!==null&&d.dehydrated!==null){if(r===null){if(!x)throw Error(a(318));if(x=i.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(a(317));x[gn]=i}else Di(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Lt(i),x=!1}else x=vh(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=x),x=!0;if(!x)return i.flags&256?(Kn(i),i):(Kn(i),null)}return Kn(i),(i.flags&128)!==0?(i.lanes=o,i):(o=d!==null,r=r!==null&&r.memoizedState!==null,o&&(d=i.child,x=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(x=d.alternate.memoizedState.cachePool.pool),b=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),b!==x&&(d.flags|=2048)),o!==r&&o&&(i.child.flags|=8192),kc(i,i.updateQueue),Lt(i),null);case 4:return xe(),r===null&&L0(i.stateNode.containerInfo),Lt(i),null;case 10:return ha(i.type),Lt(i),null;case 19:if(Z(Qt),d=i.memoizedState,d===null)return Lt(i),null;if(x=(i.flags&128)!==0,b=d.rendering,b===null)if(x)fo(d,!1);else{if(Yt!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(b=dc(r),b!==null){for(i.flags|=128,fo(d,!1),r=b.updateQueue,i.updateQueue=r,kc(i,r),i.subtreeFlags=0,r=o,o=i.child;o!==null;)bx(o,r),o=o.sibling;return L(Qt,Qt.current&1|2),ut&&da(i,d.treeForkCount),i.child}r=r.sibling}d.tail!==null&&qt()>wc&&(i.flags|=128,x=!0,fo(d,!1),i.lanes=4194304)}else{if(!x)if(r=dc(b),r!==null){if(i.flags|=128,x=!0,r=r.updateQueue,i.updateQueue=r,kc(i,r),fo(d,!0),d.tail===null&&d.tailMode==="hidden"&&!b.alternate&&!ut)return Lt(i),null}else 2*qt()-d.renderingStartTime>wc&&o!==536870912&&(i.flags|=128,x=!0,fo(d,!1),i.lanes=4194304);d.isBackwards?(b.sibling=i.child,i.child=b):(r=d.last,r!==null?r.sibling=b:i.child=b,d.last=b)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=qt(),r.sibling=null,o=Qt.current,L(Qt,x?o&1|2:o&1),ut&&da(i,d.treeForkCount),r):(Lt(i),null);case 22:case 23:return Kn(i),jh(),d=i.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(i.flags|=8192):d&&(i.flags|=8192),d?(o&536870912)!==0&&(i.flags&128)===0&&(Lt(i),i.subtreeFlags&6&&(i.flags|=8192)):Lt(i),o=i.updateQueue,o!==null&&kc(i,o.retryQueue),o=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==o&&(i.flags|=2048),r!==null&&Z(Mi),null;case 24:return o=null,r!==null&&(o=r.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),ha(Zt),Lt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function cw(r,i){switch(Eh(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return ha(Zt),xe(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return Le(i),null;case 31:if(i.memoizedState!==null){if(Kn(i),i.alternate===null)throw Error(a(340));Di()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Kn(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Di()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Z(Qt),null;case 4:return xe(),null;case 10:return ha(i.type),null;case 22:case 23:return Kn(i),jh(),r!==null&&Z(Mi),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return ha(Zt),null;case 25:return null;default:return null}}function Vb(r,i){switch(Eh(i),i.tag){case 3:ha(Zt),xe();break;case 26:case 27:case 5:Le(i);break;case 4:xe();break;case 31:i.memoizedState!==null&&Kn(i);break;case 13:Kn(i);break;case 19:Z(Qt);break;case 10:ha(i.type);break;case 22:case 23:Kn(i),jh(),r!==null&&Z(Mi);break;case 24:ha(Zt)}}function ho(r,i){try{var o=i.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var x=d.next;o=x;do{if((o.tag&r)===r){d=void 0;var b=o.create,C=o.inst;d=b(),C.destroy=d}o=o.next}while(o!==x)}}catch(D){vt(i,i.return,D)}}function Va(r,i,o){try{var d=i.updateQueue,x=d!==null?d.lastEffect:null;if(x!==null){var b=x.next;d=b;do{if((d.tag&r)===r){var C=d.inst,D=C.destroy;if(D!==void 0){C.destroy=void 0,x=i;var X=o,ae=D;try{ae()}catch(oe){vt(x,X,oe)}}}d=d.next}while(d!==b)}}catch(oe){vt(i,i.return,oe)}}function Yb(r){var i=r.updateQueue;if(i!==null){var o=r.stateNode;try{Mx(i,o)}catch(d){vt(r,r.return,d)}}}function Gb(r,i,o){o.props=Ui(r.type,r.memoizedProps),o.state=r.memoizedState;try{o.componentWillUnmount()}catch(d){vt(r,i,d)}}function mo(r,i){try{var o=r.ref;if(o!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof o=="function"?r.refCleanup=o(d):o.current=d}}catch(x){vt(r,i,x)}}function qr(r,i){var o=r.ref,d=r.refCleanup;if(o!==null)if(typeof d=="function")try{d()}catch(x){vt(r,i,x)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(x){vt(r,i,x)}else o.current=null}function Xb(r){var i=r.type,o=r.memoizedProps,d=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&d.focus();break e;case"img":o.src?d.src=o.src:o.srcSet&&(d.srcset=o.srcSet)}}catch(x){vt(r,r.return,x)}}function h0(r,i,o){try{var d=r.stateNode;Iw(d,r.type,o,i),d[Mn]=i}catch(x){vt(r,r.return,x)}}function Qb(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&Za(r.type)||r.tag===4}function m0(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Qb(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&Za(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function p0(r,i,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(r,i):(i=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,i.appendChild(r),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=oa));else if(d!==4&&(d===27&&Za(r.type)&&(o=r.stateNode,i=null),r=r.child,r!==null))for(p0(r,i,o),r=r.sibling;r!==null;)p0(r,i,o),r=r.sibling}function Nc(r,i,o){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?o.insertBefore(r,i):o.appendChild(r);else if(d!==4&&(d===27&&Za(r.type)&&(o=r.stateNode),r=r.child,r!==null))for(Nc(r,i,o),r=r.sibling;r!==null;)Nc(r,i,o),r=r.sibling}function Wb(r){var i=r.stateNode,o=r.memoizedProps;try{for(var d=r.type,x=i.attributes;x.length;)i.removeAttributeNode(x[0]);En(i,d,o),i[gn]=r,i[Mn]=o}catch(b){vt(r,r.return,b)}}var ba=!1,tn=!1,g0=!1,Kb=typeof WeakSet=="function"?WeakSet:Set,fn=null;function dw(r,i){if(r=r.containerInfo,B0=Yc,r=ux(r),uh(r)){if("selectionStart"in r)var o={start:r.selectionStart,end:r.selectionEnd};else e:{o=(o=r.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var x=d.anchorOffset,b=d.focusNode;d=d.focusOffset;try{o.nodeType,b.nodeType}catch{o=null;break e}var C=0,D=-1,X=-1,ae=0,oe=0,me=r,ie=null;t:for(;;){for(var se;me!==o||x!==0&&me.nodeType!==3||(D=C+x),me!==b||d!==0&&me.nodeType!==3||(X=C+d),me.nodeType===3&&(C+=me.nodeValue.length),(se=me.firstChild)!==null;)ie=me,me=se;for(;;){if(me===r)break t;if(ie===o&&++ae===x&&(D=C),ie===b&&++oe===d&&(X=C),(se=me.nextSibling)!==null)break;me=ie,ie=me.parentNode}me=se}o=D===-1||X===-1?null:{start:D,end:X}}else o=null}o=o||{start:0,end:0}}else o=null;for(P0={focusedElem:r,selectionRange:o},Yc=!1,fn=i;fn!==null;)if(i=fn,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,fn=r;else for(;fn!==null;){switch(i=fn,b=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(o=0;o<r.length;o++)x=r[o],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&b!==null){r=void 0,o=i,x=b.memoizedProps,b=b.memoizedState,d=o.stateNode;try{var Oe=Ui(o.type,x);r=d.getSnapshotBeforeUpdate(Oe,b),d.__reactInternalSnapshotBeforeUpdate=r}catch(Ue){vt(o,o.return,Ue)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,o=r.nodeType,o===9)U0(r);else if(o===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":U0(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,fn=r;break}fn=i.return}}function Zb(r,i,o){var d=o.flags;switch(o.tag){case 0:case 11:case 15:Ea(r,o),d&4&&ho(5,o);break;case 1:if(Ea(r,o),d&4)if(r=o.stateNode,i===null)try{r.componentDidMount()}catch(C){vt(o,o.return,C)}else{var x=Ui(o.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(x,i,r.__reactInternalSnapshotBeforeUpdate)}catch(C){vt(o,o.return,C)}}d&64&&Yb(o),d&512&&mo(o,o.return);break;case 3:if(Ea(r,o),d&64&&(r=o.updateQueue,r!==null)){if(i=null,o.child!==null)switch(o.child.tag){case 27:case 5:i=o.child.stateNode;break;case 1:i=o.child.stateNode}try{Mx(r,i)}catch(C){vt(o,o.return,C)}}break;case 27:i===null&&d&4&&Wb(o);case 26:case 5:Ea(r,o),i===null&&d&4&&Xb(o),d&512&&mo(o,o.return);break;case 12:Ea(r,o);break;case 31:Ea(r,o),d&4&&ty(r,o);break;case 13:Ea(r,o),d&4&&ny(r,o),d&64&&(r=o.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(o=Ew.bind(null,o),Hw(r,o))));break;case 22:if(d=o.memoizedState!==null||ba,!d){i=i!==null&&i.memoizedState!==null||tn,x=ba;var b=tn;ba=d,(tn=i)&&!b?Ta(r,o,(o.subtreeFlags&8772)!==0):Ea(r,o),ba=x,tn=b}break;case 30:break;default:Ea(r,o)}}function Jb(r){var i=r.alternate;i!==null&&(r.alternate=null,Jb(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&Yf(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var zt=null,Pn=!1;function ya(r,i,o){for(o=o.child;o!==null;)ey(r,i,o),o=o.sibling}function ey(r,i,o){if(sn&&typeof sn.onCommitFiberUnmount=="function")try{sn.onCommitFiberUnmount(Rn,o)}catch{}switch(o.tag){case 26:tn||qr(o,i),ya(r,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:tn||qr(o,i);var d=zt,x=Pn;Za(o.type)&&(zt=o.stateNode,Pn=!1),ya(r,i,o),So(o.stateNode),zt=d,Pn=x;break;case 5:tn||qr(o,i);case 6:if(d=zt,x=Pn,zt=null,ya(r,i,o),zt=d,Pn=x,zt!==null)if(Pn)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(o.stateNode)}catch(b){vt(o,i,b)}else try{zt.removeChild(o.stateNode)}catch(b){vt(o,i,b)}break;case 18:zt!==null&&(Pn?(r=zt,Yy(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,o.stateNode),Js(r)):Yy(zt,o.stateNode));break;case 4:d=zt,x=Pn,zt=o.stateNode.containerInfo,Pn=!0,ya(r,i,o),zt=d,Pn=x;break;case 0:case 11:case 14:case 15:Va(2,o,i),tn||Va(4,o,i),ya(r,i,o);break;case 1:tn||(qr(o,i),d=o.stateNode,typeof d.componentWillUnmount=="function"&&Gb(o,i,d)),ya(r,i,o);break;case 21:ya(r,i,o);break;case 22:tn=(d=tn)||o.memoizedState!==null,ya(r,i,o),tn=d;break;default:ya(r,i,o)}}function ty(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{Js(r)}catch(o){vt(i,i.return,o)}}}function ny(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{Js(r)}catch(o){vt(i,i.return,o)}}function fw(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new Kb),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new Kb),i;default:throw Error(a(435,r.tag))}}function Cc(r,i){var o=fw(r);i.forEach(function(d){if(!o.has(d)){o.add(d);var x=Tw.bind(null,r,d);d.then(x,x)}})}function zn(r,i){var o=i.deletions;if(o!==null)for(var d=0;d<o.length;d++){var x=o[d],b=r,C=i,D=C;e:for(;D!==null;){switch(D.tag){case 27:if(Za(D.type)){zt=D.stateNode,Pn=!1;break e}break;case 5:zt=D.stateNode,Pn=!1;break e;case 3:case 4:zt=D.stateNode.containerInfo,Pn=!0;break e}D=D.return}if(zt===null)throw Error(a(160));ey(b,C,x),zt=null,Pn=!1,b=x.alternate,b!==null&&(b.return=null),x.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)ry(i,r),i=i.sibling}var wr=null;function ry(r,i){var o=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:zn(i,r),Hn(r),d&4&&(Va(3,r,r.return),ho(3,r),Va(5,r,r.return));break;case 1:zn(i,r),Hn(r),d&512&&(tn||o===null||qr(o,o.return)),d&64&&ba&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(o=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=o===null?d:o.concat(d))));break;case 26:var x=wr;if(zn(i,r),Hn(r),d&512&&(tn||o===null||qr(o,o.return)),d&4){var b=o!==null?o.memoizedState:null;if(d=r.memoizedState,o===null)if(d===null)if(r.stateNode===null){e:{d=r.type,o=r.memoizedProps,x=x.ownerDocument||x;t:switch(d){case"title":b=x.getElementsByTagName("title")[0],(!b||b[Hl]||b[gn]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=x.createElement(d),x.head.insertBefore(b,x.querySelector("head > title"))),En(b,d,o),b[gn]=r,dn(b),d=b;break e;case"link":var C=rE("link","href",x).get(d+(o.href||""));if(C){for(var D=0;D<C.length;D++)if(b=C[D],b.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&b.getAttribute("rel")===(o.rel==null?null:o.rel)&&b.getAttribute("title")===(o.title==null?null:o.title)&&b.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){C.splice(D,1);break t}}b=x.createElement(d),En(b,d,o),x.head.appendChild(b);break;case"meta":if(C=rE("meta","content",x).get(d+(o.content||""))){for(D=0;D<C.length;D++)if(b=C[D],b.getAttribute("content")===(o.content==null?null:""+o.content)&&b.getAttribute("name")===(o.name==null?null:o.name)&&b.getAttribute("property")===(o.property==null?null:o.property)&&b.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&b.getAttribute("charset")===(o.charSet==null?null:o.charSet)){C.splice(D,1);break t}}b=x.createElement(d),En(b,d,o),x.head.appendChild(b);break;default:throw Error(a(468,d))}b[gn]=r,dn(b),d=b}r.stateNode=d}else aE(x,r.type,r.stateNode);else r.stateNode=nE(x,d,r.memoizedProps);else b!==d?(b===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):b.count--,d===null?aE(x,r.type,r.stateNode):nE(x,d,r.memoizedProps)):d===null&&r.stateNode!==null&&h0(r,r.memoizedProps,o.memoizedProps)}break;case 27:zn(i,r),Hn(r),d&512&&(tn||o===null||qr(o,o.return)),o!==null&&d&4&&h0(r,r.memoizedProps,o.memoizedProps);break;case 5:if(zn(i,r),Hn(r),d&512&&(tn||o===null||qr(o,o.return)),r.flags&32){x=r.stateNode;try{vs(x,"")}catch(Oe){vt(r,r.return,Oe)}}d&4&&r.stateNode!=null&&(x=r.memoizedProps,h0(r,x,o!==null?o.memoizedProps:x)),d&1024&&(g0=!0);break;case 6:if(zn(i,r),Hn(r),d&4){if(r.stateNode===null)throw Error(a(162));d=r.memoizedProps,o=r.stateNode;try{o.nodeValue=d}catch(Oe){vt(r,r.return,Oe)}}break;case 3:if(Fc=null,x=wr,wr=Hc(i.containerInfo),zn(i,r),wr=x,Hn(r),d&4&&o!==null&&o.memoizedState.isDehydrated)try{Js(i.containerInfo)}catch(Oe){vt(r,r.return,Oe)}g0&&(g0=!1,ay(r));break;case 4:d=wr,wr=Hc(r.stateNode.containerInfo),zn(i,r),Hn(r),wr=d;break;case 12:zn(i,r),Hn(r);break;case 31:zn(i,r),Hn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Cc(r,d)));break;case 13:zn(i,r),Hn(r),r.child.flags&8192&&r.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(Ac=qt()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Cc(r,d)));break;case 22:x=r.memoizedState!==null;var X=o!==null&&o.memoizedState!==null,ae=ba,oe=tn;if(ba=ae||x,tn=oe||X,zn(i,r),tn=oe,ba=ae,Hn(r),d&8192)e:for(i=r.stateNode,i._visibility=x?i._visibility&-2:i._visibility|1,x&&(o===null||X||ba||tn||Fi(r)),o=null,i=r;;){if(i.tag===5||i.tag===26){if(o===null){X=o=i;try{if(b=X.stateNode,x)C=b.style,typeof C.setProperty=="function"?C.setProperty("display","none","important"):C.display="none";else{D=X.stateNode;var me=X.memoizedProps.style,ie=me!=null&&me.hasOwnProperty("display")?me.display:null;D.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(Oe){vt(X,X.return,Oe)}}}else if(i.tag===6){if(o===null){X=i;try{X.stateNode.nodeValue=x?"":X.memoizedProps}catch(Oe){vt(X,X.return,Oe)}}}else if(i.tag===18){if(o===null){X=i;try{var se=X.stateNode;x?Gy(se,!0):Gy(X.stateNode,!1)}catch(Oe){vt(X,X.return,Oe)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;o===i&&(o=null),i=i.return}o===i&&(o=null),i.sibling.return=i.return,i=i.sibling}d&4&&(d=r.updateQueue,d!==null&&(o=d.retryQueue,o!==null&&(d.retryQueue=null,Cc(r,o))));break;case 19:zn(i,r),Hn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,Cc(r,d)));break;case 30:break;case 21:break;default:zn(i,r),Hn(r)}}function Hn(r){var i=r.flags;if(i&2){try{for(var o,d=r.return;d!==null;){if(Qb(d)){o=d;break}d=d.return}if(o==null)throw Error(a(160));switch(o.tag){case 27:var x=o.stateNode,b=m0(r);Nc(r,b,x);break;case 5:var C=o.stateNode;o.flags&32&&(vs(C,""),o.flags&=-33);var D=m0(r);Nc(r,D,C);break;case 3:case 4:var X=o.stateNode.containerInfo,ae=m0(r);p0(r,ae,X);break;default:throw Error(a(161))}}catch(oe){vt(r,r.return,oe)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function ay(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;ay(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Ea(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Zb(r,i.alternate,i),i=i.sibling}function Fi(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:Va(4,i,i.return),Fi(i);break;case 1:qr(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&Gb(i,i.return,o),Fi(i);break;case 27:So(i.stateNode);case 26:case 5:qr(i,i.return),Fi(i);break;case 22:i.memoizedState===null&&Fi(i);break;case 30:Fi(i);break;default:Fi(i)}r=r.sibling}}function Ta(r,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,x=r,b=i,C=b.flags;switch(b.tag){case 0:case 11:case 15:Ta(x,b,o),ho(4,b);break;case 1:if(Ta(x,b,o),d=b,x=d.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(ae){vt(d,d.return,ae)}if(d=b,x=d.updateQueue,x!==null){var D=d.stateNode;try{var X=x.shared.hiddenCallbacks;if(X!==null)for(x.shared.hiddenCallbacks=null,x=0;x<X.length;x++)jx(X[x],D)}catch(ae){vt(d,d.return,ae)}}o&&C&64&&Yb(b),mo(b,b.return);break;case 27:Wb(b);case 26:case 5:Ta(x,b,o),o&&d===null&&C&4&&Xb(b),mo(b,b.return);break;case 12:Ta(x,b,o);break;case 31:Ta(x,b,o),o&&C&4&&ty(x,b);break;case 13:Ta(x,b,o),o&&C&4&&ny(x,b);break;case 22:b.memoizedState===null&&Ta(x,b,o),mo(b,b.return);break;case 30:break;default:Ta(x,b,o)}i=i.sibling}}function x0(r,i){var o=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==o&&(r!=null&&r.refCount++,o!=null&&Jl(o))}function b0(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Jl(r))}function Rr(r,i,o,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)iy(r,i,o,d),i=i.sibling}function iy(r,i,o,d){var x=i.flags;switch(i.tag){case 0:case 11:case 15:Rr(r,i,o,d),x&2048&&ho(9,i);break;case 1:Rr(r,i,o,d);break;case 3:Rr(r,i,o,d),x&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&Jl(r)));break;case 12:if(x&2048){Rr(r,i,o,d),r=i.stateNode;try{var b=i.memoizedProps,C=b.id,D=b.onPostCommit;typeof D=="function"&&D(C,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(X){vt(i,i.return,X)}}else Rr(r,i,o,d);break;case 31:Rr(r,i,o,d);break;case 13:Rr(r,i,o,d);break;case 23:break;case 22:b=i.stateNode,C=i.alternate,i.memoizedState!==null?b._visibility&2?Rr(r,i,o,d):po(r,i):b._visibility&2?Rr(r,i,o,d):(b._visibility|=2,Fs(r,i,o,d,(i.subtreeFlags&10256)!==0||!1)),x&2048&&x0(C,i);break;case 24:Rr(r,i,o,d),x&2048&&b0(i.alternate,i);break;default:Rr(r,i,o,d)}}function Fs(r,i,o,d,x){for(x=x&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var b=r,C=i,D=o,X=d,ae=C.flags;switch(C.tag){case 0:case 11:case 15:Fs(b,C,D,X,x),ho(8,C);break;case 23:break;case 22:var oe=C.stateNode;C.memoizedState!==null?oe._visibility&2?Fs(b,C,D,X,x):po(b,C):(oe._visibility|=2,Fs(b,C,D,X,x)),x&&ae&2048&&x0(C.alternate,C);break;case 24:Fs(b,C,D,X,x),x&&ae&2048&&b0(C.alternate,C);break;default:Fs(b,C,D,X,x)}i=i.sibling}}function po(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=r,d=i,x=d.flags;switch(d.tag){case 22:po(o,d),x&2048&&x0(d.alternate,d);break;case 24:po(o,d),x&2048&&b0(d.alternate,d);break;default:po(o,d)}i=i.sibling}}var go=8192;function $s(r,i,o){if(r.subtreeFlags&go)for(r=r.child;r!==null;)sy(r,i,o),r=r.sibling}function sy(r,i,o){switch(r.tag){case 26:$s(r,i,o),r.flags&go&&r.memoizedState!==null&&Zw(o,wr,r.memoizedState,r.memoizedProps);break;case 5:$s(r,i,o);break;case 3:case 4:var d=wr;wr=Hc(r.stateNode.containerInfo),$s(r,i,o),wr=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=go,go=16777216,$s(r,i,o),go=d):$s(r,i,o));break;default:$s(r,i,o)}}function ly(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function xo(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var d=i[o];fn=d,uy(d,r)}ly(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)oy(r),r=r.sibling}function oy(r){switch(r.tag){case 0:case 11:case 15:xo(r),r.flags&2048&&Va(9,r,r.return);break;case 3:xo(r);break;case 12:xo(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,_c(r)):xo(r);break;default:xo(r)}}function _c(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var d=i[o];fn=d,uy(d,r)}ly(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:Va(8,i,i.return),_c(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,_c(i));break;default:_c(i)}r=r.sibling}}function uy(r,i){for(;fn!==null;){var o=fn;switch(o.tag){case 0:case 11:case 15:Va(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var d=o.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:Jl(o.memoizedState.cache)}if(d=o.child,d!==null)d.return=o,fn=d;else e:for(o=r;fn!==null;){d=fn;var x=d.sibling,b=d.return;if(Jb(d),d===o){fn=null;break e}if(x!==null){x.return=b,fn=x;break e}fn=b}}}var hw={getCacheForType:function(r){var i=bn(Zt),o=i.data.get(r);return o===void 0&&(o=r(),i.data.set(r,o)),o},cacheSignal:function(){return bn(Zt).controller.signal}},mw=typeof WeakMap=="function"?WeakMap:Map,yt=0,wt=null,at=null,lt=0,Tt=0,Zn=null,Ya=!1,qs=!1,y0=!1,va=0,Yt=0,Ga=0,$i=0,E0=0,Jn=0,Vs=0,bo=null,Un=null,T0=!1,Ac=0,cy=0,wc=1/0,Rc=null,Xa=null,ln=0,Qa=null,Ys=null,Sa=0,v0=0,S0=null,dy=null,yo=0,k0=null;function er(){return(yt&2)!==0&&lt!==0?lt&-lt:R.T!==null?R0():_1()}function fy(){if(Jn===0)if((lt&536870912)===0||ut){var r=Pu;Pu<<=1,(Pu&3932160)===0&&(Pu=262144),Jn=r}else Jn=536870912;return r=Wn.current,r!==null&&(r.flags|=32),Jn}function Fn(r,i,o){(r===wt&&(Tt===2||Tt===9)||r.cancelPendingCommit!==null)&&(Gs(r,0),Wa(r,lt,Jn,!1)),zl(r,o),((yt&2)===0||r!==wt)&&(r===wt&&((yt&2)===0&&($i|=o),Yt===4&&Wa(r,lt,Jn,!1)),Vr(r))}function hy(r,i,o){if((yt&6)!==0)throw Error(a(327));var d=!o&&(i&127)===0&&(i&r.expiredLanes)===0||Pl(r,i),x=d?xw(r,i):C0(r,i,!0),b=d;do{if(x===0){qs&&!d&&Wa(r,i,0,!1);break}else{if(o=r.current.alternate,b&&!pw(o)){x=C0(r,i,!1),b=!1;continue}if(x===2){if(b=i,r.errorRecoveryDisabledLanes&b)var C=0;else C=r.pendingLanes&-536870913,C=C!==0?C:C&536870912?536870912:0;if(C!==0){i=C;e:{var D=r;x=bo;var X=D.current.memoizedState.isDehydrated;if(X&&(Gs(D,C).flags|=256),C=C0(D,C,!1),C!==2){if(y0&&!X){D.errorRecoveryDisabledLanes|=b,$i|=b,x=4;break e}b=Un,Un=x,b!==null&&(Un===null?Un=b:Un.push.apply(Un,b))}x=C}if(b=!1,x!==2)continue}}if(x===1){Gs(r,0),Wa(r,i,0,!0);break}e:{switch(d=r,b=x,b){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:Wa(d,i,Jn,!Ya);break e;case 2:Un=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(x=Ac+300-qt(),10<x)){if(Wa(d,i,Jn,!Ya),Hu(d,0,!0)!==0)break e;Sa=i,d.timeoutHandle=qy(my.bind(null,d,o,Un,Rc,T0,i,Jn,$i,Vs,Ya,b,"Throttled",-0,0),x);break e}my(d,o,Un,Rc,T0,i,Jn,$i,Vs,Ya,b,null,-0,0)}}break}while(!0);Vr(r)}function my(r,i,o,d,x,b,C,D,X,ae,oe,me,ie,se){if(r.timeoutHandle=-1,me=i.subtreeFlags,me&8192||(me&16785408)===16785408){me={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:oa},sy(i,b,me);var Oe=(b&62914560)===b?Ac-qt():(b&4194048)===b?cy-qt():0;if(Oe=Jw(me,Oe),Oe!==null){Sa=b,r.cancelPendingCommit=Oe(vy.bind(null,r,i,b,o,d,x,C,D,X,oe,me,null,ie,se)),Wa(r,b,C,!ae);return}}vy(r,i,b,o,d,x,C,D,X)}function pw(r){for(var i=r;;){var o=i.tag;if((o===0||o===11||o===15)&&i.flags&16384&&(o=i.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var x=o[d],b=x.getSnapshot;x=x.value;try{if(!Xn(b(),x))return!1}catch{return!1}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Wa(r,i,o,d){i&=~E0,i&=~$i,r.suspendedLanes|=i,r.pingedLanes&=~i,d&&(r.warmLanes|=i),d=r.expirationTimes;for(var x=i;0<x;){var b=31-At(x),C=1<<b;d[b]=-1,x&=~C}o!==0&&k1(r,o,i)}function Oc(){return(yt&6)===0?(Eo(0),!1):!0}function N0(){if(at!==null){if(Tt===0)var r=at.return;else r=at,fa=Li=null,Uh(r),Bs=null,to=0,r=at;for(;r!==null;)Vb(r.alternate,r),r=r.return;at=null}}function Gs(r,i){var o=r.timeoutHandle;o!==-1&&(r.timeoutHandle=-1,jw(o)),o=r.cancelPendingCommit,o!==null&&(r.cancelPendingCommit=null,o()),Sa=0,N0(),wt=r,at=o=ca(r.current,null),lt=i,Tt=0,Zn=null,Ya=!1,qs=Pl(r,i),y0=!1,Vs=Jn=E0=$i=Ga=Yt=0,Un=bo=null,T0=!1,(i&8)!==0&&(i|=i&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=i;0<d;){var x=31-At(d),b=1<<x;i|=r[x],d&=~b}return va=i,Zu(),o}function py(r,i){We=null,R.H=uo,i===Ms||i===sc?(i=Ox(),Tt=3):i===wh?(i=Ox(),Tt=4):Tt=i===r0?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Zn=i,at===null&&(Yt=1,Ec(r,dr(i,r.current)))}function gy(){var r=Wn.current;return r===null?!0:(lt&4194048)===lt?pr===null:(lt&62914560)===lt||(lt&536870912)!==0?r===pr:!1}function xy(){var r=R.H;return R.H=uo,r===null?uo:r}function by(){var r=R.A;return R.A=hw,r}function Ic(){Yt=4,Ya||(lt&4194048)!==lt&&Wn.current!==null||(qs=!0),(Ga&134217727)===0&&($i&134217727)===0||wt===null||Wa(wt,lt,Jn,!1)}function C0(r,i,o){var d=yt;yt|=2;var x=xy(),b=by();(wt!==r||lt!==i)&&(Rc=null,Gs(r,i)),i=!1;var C=Yt;e:do try{if(Tt!==0&&at!==null){var D=at,X=Zn;switch(Tt){case 8:N0(),C=6;break e;case 3:case 2:case 9:case 6:Wn.current===null&&(i=!0);var ae=Tt;if(Tt=0,Zn=null,Xs(r,D,X,ae),o&&qs){C=0;break e}break;default:ae=Tt,Tt=0,Zn=null,Xs(r,D,X,ae)}}gw(),C=Yt;break}catch(oe){py(r,oe)}while(!0);return i&&r.shellSuspendCounter++,fa=Li=null,yt=d,R.H=x,R.A=b,at===null&&(wt=null,lt=0,Zu()),C}function gw(){for(;at!==null;)yy(at)}function xw(r,i){var o=yt;yt|=2;var d=xy(),x=by();wt!==r||lt!==i?(Rc=null,wc=qt()+500,Gs(r,i)):qs=Pl(r,i);e:do try{if(Tt!==0&&at!==null){i=at;var b=Zn;t:switch(Tt){case 1:Tt=0,Zn=null,Xs(r,i,b,1);break;case 2:case 9:if(wx(b)){Tt=0,Zn=null,Ey(i);break}i=function(){Tt!==2&&Tt!==9||wt!==r||(Tt=7),Vr(r)},b.then(i,i);break e;case 3:Tt=7;break e;case 4:Tt=5;break e;case 7:wx(b)?(Tt=0,Zn=null,Ey(i)):(Tt=0,Zn=null,Xs(r,i,b,7));break;case 5:var C=null;switch(at.tag){case 26:C=at.memoizedState;case 5:case 27:var D=at;if(C?iE(C):D.stateNode.complete){Tt=0,Zn=null;var X=D.sibling;if(X!==null)at=X;else{var ae=D.return;ae!==null?(at=ae,Dc(ae)):at=null}break t}}Tt=0,Zn=null,Xs(r,i,b,5);break;case 6:Tt=0,Zn=null,Xs(r,i,b,6);break;case 8:N0(),Yt=6;break e;default:throw Error(a(462))}}bw();break}catch(oe){py(r,oe)}while(!0);return fa=Li=null,R.H=d,R.A=x,yt=o,at!==null?0:(wt=null,lt=0,Zu(),Yt)}function bw(){for(;at!==null&&!ps();)yy(at)}function yy(r){var i=$b(r.alternate,r,va);r.memoizedProps=r.pendingProps,i===null?Dc(r):at=i}function Ey(r){var i=r,o=i.alternate;switch(i.tag){case 15:case 0:i=Bb(o,i,i.pendingProps,i.type,void 0,lt);break;case 11:i=Bb(o,i,i.pendingProps,i.type.render,i.ref,lt);break;case 5:Uh(i);default:Vb(o,i),i=at=bx(i,va),i=$b(o,i,va)}r.memoizedProps=r.pendingProps,i===null?Dc(r):at=i}function Xs(r,i,o,d){fa=Li=null,Uh(i),Bs=null,to=0;var x=i.return;try{if(sw(r,x,i,o,lt)){Yt=1,Ec(r,dr(o,r.current)),at=null;return}}catch(b){if(x!==null)throw at=x,b;Yt=1,Ec(r,dr(o,r.current)),at=null;return}i.flags&32768?(ut||d===1?r=!0:qs||(lt&536870912)!==0?r=!1:(Ya=r=!0,(d===2||d===9||d===3||d===6)&&(d=Wn.current,d!==null&&d.tag===13&&(d.flags|=16384))),Ty(i,r)):Dc(i)}function Dc(r){var i=r;do{if((i.flags&32768)!==0){Ty(i,Ya);return}r=i.return;var o=uw(i.alternate,i,va);if(o!==null){at=o;return}if(i=i.sibling,i!==null){at=i;return}at=i=r}while(i!==null);Yt===0&&(Yt=5)}function Ty(r,i){do{var o=cw(r.alternate,r);if(o!==null){o.flags&=32767,at=o;return}if(o=r.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(r=r.sibling,r!==null)){at=r;return}at=r=o}while(r!==null);Yt=6,at=null}function vy(r,i,o,d,x,b,C,D,X){r.cancelPendingCommit=null;do Lc();while(ln!==0);if((yt&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(b=i.lanes|i.childLanes,b|=mh,K_(r,o,b,C,D,X),r===wt&&(at=wt=null,lt=0),Ys=i,Qa=r,Sa=o,v0=b,S0=x,dy=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,vw(He,function(){return _y(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||d){d=R.T,R.T=null,x=q.p,q.p=2,C=yt,yt|=4;try{dw(r,i,o)}finally{yt=C,q.p=x,R.T=d}}ln=1,Sy(),ky(),Ny()}}function Sy(){if(ln===1){ln=0;var r=Qa,i=Ys,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=R.T,R.T=null;var d=q.p;q.p=2;var x=yt;yt|=4;try{ry(i,r);var b=P0,C=ux(r.containerInfo),D=b.focusedElem,X=b.selectionRange;if(C!==D&&D&&D.ownerDocument&&ox(D.ownerDocument.documentElement,D)){if(X!==null&&uh(D)){var ae=X.start,oe=X.end;if(oe===void 0&&(oe=ae),"selectionStart"in D)D.selectionStart=ae,D.selectionEnd=Math.min(oe,D.value.length);else{var me=D.ownerDocument||document,ie=me&&me.defaultView||window;if(ie.getSelection){var se=ie.getSelection(),Oe=D.textContent.length,Ue=Math.min(X.start,Oe),Nt=X.end===void 0?Ue:Math.min(X.end,Oe);!se.extend&&Ue>Nt&&(C=Nt,Nt=Ue,Ue=C);var J=lx(D,Ue),K=lx(D,Nt);if(J&&K&&(se.rangeCount!==1||se.anchorNode!==J.node||se.anchorOffset!==J.offset||se.focusNode!==K.node||se.focusOffset!==K.offset)){var re=me.createRange();re.setStart(J.node,J.offset),se.removeAllRanges(),Ue>Nt?(se.addRange(re),se.extend(K.node,K.offset)):(re.setEnd(K.node,K.offset),se.addRange(re))}}}}for(me=[],se=D;se=se.parentNode;)se.nodeType===1&&me.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<me.length;D++){var de=me[D];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}Yc=!!B0,P0=B0=null}finally{yt=x,q.p=d,R.T=o}}r.current=i,ln=2}}function ky(){if(ln===2){ln=0;var r=Qa,i=Ys,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=R.T,R.T=null;var d=q.p;q.p=2;var x=yt;yt|=4;try{Zb(r,i.alternate,i)}finally{yt=x,q.p=d,R.T=o}}ln=3}}function Ny(){if(ln===4||ln===3){ln=0,Ia();var r=Qa,i=Ys,o=Sa,d=dy;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?ln=5:(ln=0,Ys=Qa=null,Cy(r,r.pendingLanes));var x=r.pendingLanes;if(x===0&&(Xa=null),qf(o),i=i.stateNode,sn&&typeof sn.onCommitFiberRoot=="function")try{sn.onCommitFiberRoot(Rn,i,void 0,(i.current.flags&128)===128)}catch{}if(d!==null){i=R.T,x=q.p,q.p=2,R.T=null;try{for(var b=r.onRecoverableError,C=0;C<d.length;C++){var D=d[C];b(D.value,{componentStack:D.stack})}}finally{R.T=i,q.p=x}}(Sa&3)!==0&&Lc(),Vr(r),x=r.pendingLanes,(o&261930)!==0&&(x&42)!==0?r===k0?yo++:(yo=0,k0=r):yo=0,Eo(0)}}function Cy(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,Jl(i)))}function Lc(){return Sy(),ky(),Ny(),_y()}function _y(){if(ln!==5)return!1;var r=Qa,i=v0;v0=0;var o=qf(Sa),d=R.T,x=q.p;try{q.p=32>o?32:o,R.T=null,o=S0,S0=null;var b=Qa,C=Sa;if(ln=0,Ys=Qa=null,Sa=0,(yt&6)!==0)throw Error(a(331));var D=yt;if(yt|=4,oy(b.current),iy(b,b.current,C,o),yt=D,Eo(0,!1),sn&&typeof sn.onPostCommitFiberRoot=="function")try{sn.onPostCommitFiberRoot(Rn,b)}catch{}return!0}finally{q.p=x,R.T=d,Cy(r,i)}}function Ay(r,i,o){i=dr(o,i),i=n0(r.stateNode,i,2),r=Fa(r,i,2),r!==null&&(zl(r,2),Vr(r))}function vt(r,i,o){if(r.tag===3)Ay(r,r,o);else for(;i!==null;){if(i.tag===3){Ay(i,r,o);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Xa===null||!Xa.has(d))){r=dr(o,r),o=wb(2),d=Fa(i,o,2),d!==null&&(Rb(o,d,i,r),zl(d,2),Vr(d));break}}i=i.return}}function _0(r,i,o){var d=r.pingCache;if(d===null){d=r.pingCache=new mw;var x=new Set;d.set(i,x)}else x=d.get(i),x===void 0&&(x=new Set,d.set(i,x));x.has(o)||(y0=!0,x.add(o),r=yw.bind(null,r,i,o),i.then(r,r))}function yw(r,i,o){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&o,r.warmLanes&=~o,wt===r&&(lt&o)===o&&(Yt===4||Yt===3&&(lt&62914560)===lt&&300>qt()-Ac?(yt&2)===0&&Gs(r,0):E0|=o,Vs===lt&&(Vs=0)),Vr(r)}function wy(r,i){i===0&&(i=S1()),r=Oi(r,i),r!==null&&(zl(r,i),Vr(r))}function Ew(r){var i=r.memoizedState,o=0;i!==null&&(o=i.retryLane),wy(r,o)}function Tw(r,i){var o=0;switch(r.tag){case 31:case 13:var d=r.stateNode,x=r.memoizedState;x!==null&&(o=x.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(a(314))}d!==null&&d.delete(i),wy(r,o)}function vw(r,i){return Pt(r,i)}var jc=null,Qs=null,A0=!1,Mc=!1,w0=!1,Ka=0;function Vr(r){r!==Qs&&r.next===null&&(Qs===null?jc=Qs=r:Qs=Qs.next=r),Mc=!0,A0||(A0=!0,kw())}function Eo(r,i){if(!w0&&Mc){w0=!0;do for(var o=!1,d=jc;d!==null;){if(r!==0){var x=d.pendingLanes;if(x===0)var b=0;else{var C=d.suspendedLanes,D=d.pingedLanes;b=(1<<31-At(42|r)+1)-1,b&=x&~(C&~D),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(o=!0,Dy(d,b))}else b=lt,b=Hu(d,d===wt?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(b&3)===0||Pl(d,b)||(o=!0,Dy(d,b));d=d.next}while(o);w0=!1}}function Sw(){Ry()}function Ry(){Mc=A0=!1;var r=0;Ka!==0&&Lw()&&(r=Ka);for(var i=qt(),o=null,d=jc;d!==null;){var x=d.next,b=Oy(d,i);b===0?(d.next=null,o===null?jc=x:o.next=x,x===null&&(Qs=o)):(o=d,(r!==0||(b&3)!==0)&&(Mc=!0)),d=x}ln!==0&&ln!==5||Eo(r),Ka!==0&&(Ka=0)}function Oy(r,i){for(var o=r.suspendedLanes,d=r.pingedLanes,x=r.expirationTimes,b=r.pendingLanes&-62914561;0<b;){var C=31-At(b),D=1<<C,X=x[C];X===-1?((D&o)===0||(D&d)!==0)&&(x[C]=W_(D,i)):X<=i&&(r.expiredLanes|=D),b&=~D}if(i=wt,o=lt,o=Hu(r,r===i?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,o===0||r===i&&(Tt===2||Tt===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&sa(d),r.callbackNode=null,r.callbackPriority=0;if((o&3)===0||Pl(r,o)){if(i=o&-o,i===r.callbackPriority)return i;switch(d!==null&&sa(d),qf(o)){case 2:case 8:o=Ce;break;case 32:o=He;break;case 268435456:o=mt;break;default:o=He}return d=Iy.bind(null,r),o=Pt(o,d),r.callbackPriority=i,r.callbackNode=o,i}return d!==null&&d!==null&&sa(d),r.callbackPriority=2,r.callbackNode=null,2}function Iy(r,i){if(ln!==0&&ln!==5)return r.callbackNode=null,r.callbackPriority=0,null;var o=r.callbackNode;if(Lc()&&r.callbackNode!==o)return null;var d=lt;return d=Hu(r,r===wt?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(hy(r,d,i),Oy(r,qt()),r.callbackNode!=null&&r.callbackNode===o?Iy.bind(null,r):null)}function Dy(r,i){if(Lc())return null;hy(r,i,!0)}function kw(){Mw(function(){(yt&6)!==0?Pt(ce,Sw):Ry()})}function R0(){if(Ka===0){var r=Ls;r===0&&(r=Bu,Bu<<=1,(Bu&261888)===0&&(Bu=256)),Ka=r}return Ka}function Ly(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:qu(""+r)}function jy(r,i){var o=i.ownerDocument.createElement("input");return o.name=i.name,o.value=i.value,r.id&&o.setAttribute("form",r.id),i.parentNode.insertBefore(o,i),r=new FormData(r),o.parentNode.removeChild(o),r}function Nw(r,i,o,d,x){if(i==="submit"&&o&&o.stateNode===x){var b=Ly((x[Mn]||null).action),C=d.submitter;C&&(i=(i=C[Mn]||null)?Ly(i.formAction):C.getAttribute("formAction"),i!==null&&(b=i,C=null));var D=new Xu("action","action",null,d,x);r.push({event:D,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Ka!==0){var X=C?jy(x,C):new FormData(x);Wh(o,{pending:!0,data:X,method:x.method,action:b},null,X)}}else typeof b=="function"&&(D.preventDefault(),X=C?jy(x,C):new FormData(x),Wh(o,{pending:!0,data:X,method:x.method,action:b},b,X))},currentTarget:x}]})}}for(var O0=0;O0<hh.length;O0++){var I0=hh[O0],Cw=I0.toLowerCase(),_w=I0[0].toUpperCase()+I0.slice(1);Ar(Cw,"on"+_w)}Ar(fx,"onAnimationEnd"),Ar(hx,"onAnimationIteration"),Ar(mx,"onAnimationStart"),Ar("dblclick","onDoubleClick"),Ar("focusin","onFocus"),Ar("focusout","onBlur"),Ar($A,"onTransitionRun"),Ar(qA,"onTransitionStart"),Ar(VA,"onTransitionCancel"),Ar(px,"onTransitionEnd"),Es("onMouseEnter",["mouseout","mouseover"]),Es("onMouseLeave",["mouseout","mouseover"]),Es("onPointerEnter",["pointerout","pointerover"]),Es("onPointerLeave",["pointerout","pointerover"]),_i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),_i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),_i("onBeforeInput",["compositionend","keypress","textInput","paste"]),_i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),_i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),_i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var To="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(" "),Aw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(To));function My(r,i){i=(i&4)!==0;for(var o=0;o<r.length;o++){var d=r[o],x=d.event;d=d.listeners;e:{var b=void 0;if(i)for(var C=d.length-1;0<=C;C--){var D=d[C],X=D.instance,ae=D.currentTarget;if(D=D.listener,X!==b&&x.isPropagationStopped())break e;b=D,x.currentTarget=ae;try{b(x)}catch(oe){Ku(oe)}x.currentTarget=null,b=X}else for(C=0;C<d.length;C++){if(D=d[C],X=D.instance,ae=D.currentTarget,D=D.listener,X!==b&&x.isPropagationStopped())break e;b=D,x.currentTarget=ae;try{b(x)}catch(oe){Ku(oe)}x.currentTarget=null,b=X}}}}function it(r,i){var o=i[Vf];o===void 0&&(o=i[Vf]=new Set);var d=r+"__bubble";o.has(d)||(By(i,r,2,!1),o.add(d))}function D0(r,i,o){var d=0;i&&(d|=4),By(o,r,d,i)}var Bc="_reactListening"+Math.random().toString(36).slice(2);function L0(r){if(!r[Bc]){r[Bc]=!0,R1.forEach(function(o){o!=="selectionchange"&&(Aw.has(o)||D0(o,!1,r),D0(o,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[Bc]||(i[Bc]=!0,D0("selectionchange",!1,i))}}function By(r,i,o,d){switch(fE(i)){case 2:var x=n5;break;case 8:x=r5;break;default:x=Q0}o=x.bind(null,i,o,r),x=void 0,!eh||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(x=!0),d?x!==void 0?r.addEventListener(i,o,{capture:!0,passive:x}):r.addEventListener(i,o,!0):x!==void 0?r.addEventListener(i,o,{passive:x}):r.addEventListener(i,o,!1)}function j0(r,i,o,d,x){var b=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var C=d.tag;if(C===3||C===4){var D=d.stateNode.containerInfo;if(D===x)break;if(C===4)for(C=d.return;C!==null;){var X=C.tag;if((X===3||X===4)&&C.stateNode.containerInfo===x)return;C=C.return}for(;D!==null;){if(C=xs(D),C===null)return;if(X=C.tag,X===5||X===6||X===26||X===27){d=b=C;continue e}D=D.parentNode}}d=d.return}F1(function(){var ae=b,oe=Zf(o),me=[];e:{var ie=gx.get(r);if(ie!==void 0){var se=Xu,Oe=r;switch(r){case"keypress":if(Yu(o)===0)break e;case"keydown":case"keyup":se=TA;break;case"focusin":Oe="focus",se=ah;break;case"focusout":Oe="blur",se=ah;break;case"beforeblur":case"afterblur":se=ah;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=V1;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=uA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=kA;break;case fx:case hx:case mx:se=fA;break;case px:se=CA;break;case"scroll":case"scrollend":se=lA;break;case"wheel":se=AA;break;case"copy":case"cut":case"paste":se=mA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=G1;break;case"toggle":case"beforetoggle":se=RA}var Ue=(i&4)!==0,Nt=!Ue&&(r==="scroll"||r==="scrollend"),J=Ue?ie!==null?ie+"Capture":null:ie;Ue=[];for(var K=ae,re;K!==null;){var de=K;if(re=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||re===null||J===null||(de=Fl(K,J),de!=null&&Ue.push(vo(K,de,re))),Nt)break;K=K.return}0<Ue.length&&(ie=new se(ie,Oe,null,o,oe),me.push({event:ie,listeners:Ue}))}}if((i&7)===0){e:{if(ie=r==="mouseover"||r==="pointerover",se=r==="mouseout"||r==="pointerout",ie&&o!==Kf&&(Oe=o.relatedTarget||o.fromElement)&&(xs(Oe)||Oe[gs]))break e;if((se||ie)&&(ie=oe.window===oe?oe:(ie=oe.ownerDocument)?ie.defaultView||ie.parentWindow:window,se?(Oe=o.relatedTarget||o.toElement,se=ae,Oe=Oe?xs(Oe):null,Oe!==null&&(Nt=l(Oe),Ue=Oe.tag,Oe!==Nt||Ue!==5&&Ue!==27&&Ue!==6)&&(Oe=null)):(se=null,Oe=ae),se!==Oe)){if(Ue=V1,de="onMouseLeave",J="onMouseEnter",K="mouse",(r==="pointerout"||r==="pointerover")&&(Ue=G1,de="onPointerLeave",J="onPointerEnter",K="pointer"),Nt=se==null?ie:Ul(se),re=Oe==null?ie:Ul(Oe),ie=new Ue(de,K+"leave",se,o,oe),ie.target=Nt,ie.relatedTarget=re,de=null,xs(oe)===ae&&(Ue=new Ue(J,K+"enter",Oe,o,oe),Ue.target=re,Ue.relatedTarget=Nt,de=Ue),Nt=de,se&&Oe)t:{for(Ue=ww,J=se,K=Oe,re=0,de=J;de;de=Ue(de))re++;de=0;for(var Pe=K;Pe;Pe=Ue(Pe))de++;for(;0<re-de;)J=Ue(J),re--;for(;0<de-re;)K=Ue(K),de--;for(;re--;){if(J===K||K!==null&&J===K.alternate){Ue=J;break t}J=Ue(J),K=Ue(K)}Ue=null}else Ue=null;se!==null&&Py(me,ie,se,Ue,!1),Oe!==null&&Nt!==null&&Py(me,Nt,Oe,Ue,!0)}}e:{if(ie=ae?Ul(ae):window,se=ie.nodeName&&ie.nodeName.toLowerCase(),se==="select"||se==="input"&&ie.type==="file")var pt=tx;else if(J1(ie))if(nx)pt=HA;else{pt=PA;var Me=BA}else se=ie.nodeName,!se||se.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?ae&&Wf(ae.elementType)&&(pt=tx):pt=zA;if(pt&&(pt=pt(r,ae))){ex(me,pt,o,oe);break e}Me&&Me(r,ie,ae),r==="focusout"&&ae&&ie.type==="number"&&ae.memoizedProps.value!=null&&Qf(ie,"number",ie.value)}switch(Me=ae?Ul(ae):window,r){case"focusin":(J1(Me)||Me.contentEditable==="true")&&(Cs=Me,ch=ae,Wl=null);break;case"focusout":Wl=ch=Cs=null;break;case"mousedown":dh=!0;break;case"contextmenu":case"mouseup":case"dragend":dh=!1,cx(me,o,oe);break;case"selectionchange":if(FA)break;case"keydown":case"keyup":cx(me,o,oe)}var Ke;if(sh)e:{switch(r){case"compositionstart":var ot="onCompositionStart";break e;case"compositionend":ot="onCompositionEnd";break e;case"compositionupdate":ot="onCompositionUpdate";break e}ot=void 0}else Ns?K1(r,o)&&(ot="onCompositionEnd"):r==="keydown"&&o.keyCode===229&&(ot="onCompositionStart");ot&&(X1&&o.locale!=="ko"&&(Ns||ot!=="onCompositionStart"?ot==="onCompositionEnd"&&Ns&&(Ke=$1()):(ja=oe,th="value"in ja?ja.value:ja.textContent,Ns=!0)),Me=Pc(ae,ot),0<Me.length&&(ot=new Y1(ot,r,null,o,oe),me.push({event:ot,listeners:Me}),Ke?ot.data=Ke:(Ke=Z1(o),Ke!==null&&(ot.data=Ke)))),(Ke=IA?DA(r,o):LA(r,o))&&(ot=Pc(ae,"onBeforeInput"),0<ot.length&&(Me=new Y1("onBeforeInput","beforeinput",null,o,oe),me.push({event:Me,listeners:ot}),Me.data=Ke)),Nw(me,r,ae,o,oe)}My(me,i)})}function vo(r,i,o){return{instance:r,listener:i,currentTarget:o}}function Pc(r,i){for(var o=i+"Capture",d=[];r!==null;){var x=r,b=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||b===null||(x=Fl(r,o),x!=null&&d.unshift(vo(r,x,b)),x=Fl(r,i),x!=null&&d.push(vo(r,x,b))),r.tag===3)return d;r=r.return}return[]}function ww(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Py(r,i,o,d,x){for(var b=i._reactName,C=[];o!==null&&o!==d;){var D=o,X=D.alternate,ae=D.stateNode;if(D=D.tag,X!==null&&X===d)break;D!==5&&D!==26&&D!==27||ae===null||(X=ae,x?(ae=Fl(o,b),ae!=null&&C.unshift(vo(o,ae,X))):x||(ae=Fl(o,b),ae!=null&&C.push(vo(o,ae,X)))),o=o.return}C.length!==0&&r.push({event:i,listeners:C})}var Rw=/\r\n?/g,Ow=/\u0000|\uFFFD/g;function zy(r){return(typeof r=="string"?r:""+r).replace(Rw,`
9
+ `).replace(Ow,"")}function Hy(r,i){return i=zy(i),zy(r)===i}function kt(r,i,o,d,x,b){switch(o){case"children":typeof d=="string"?i==="body"||i==="textarea"&&d===""||vs(r,d):(typeof d=="number"||typeof d=="bigint")&&i!=="body"&&vs(r,""+d);break;case"className":Fu(r,"class",d);break;case"tabIndex":Fu(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Fu(r,o,d);break;case"style":H1(r,d,b);break;case"data":if(i!=="object"){Fu(r,"data",d);break}case"src":case"href":if(d===""&&(i!=="a"||o!=="href")){r.removeAttribute(o);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=qu(""+d),r.setAttribute(o,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(o,"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 b=="function"&&(o==="formAction"?(i!=="input"&&kt(r,i,"name",x.name,x,null),kt(r,i,"formEncType",x.formEncType,x,null),kt(r,i,"formMethod",x.formMethod,x,null),kt(r,i,"formTarget",x.formTarget,x,null)):(kt(r,i,"encType",x.encType,x,null),kt(r,i,"method",x.method,x,null),kt(r,i,"target",x.target,x,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(o);break}d=qu(""+d),r.setAttribute(o,d);break;case"onClick":d!=null&&(r.onclick=oa);break;case"onScroll":d!=null&&it("scroll",r);break;case"onScrollEnd":d!=null&&it("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(o=d.__html,o!=null){if(x.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}o=qu(""+d),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""+d):r.removeAttribute(o);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":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,""):r.removeAttribute(o);break;case"capture":case"download":d===!0?r.setAttribute(o,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(o,d):r.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(o,d):r.removeAttribute(o);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(o):r.setAttribute(o,d);break;case"popover":it("beforetoggle",r),it("toggle",r),Uu(r,"popover",d);break;case"xlinkActuate":la(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":la(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":la(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":la(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":la(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":la(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":la(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":la(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":la(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Uu(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=iA.get(o)||o,Uu(r,o,d))}}function M0(r,i,o,d,x,b){switch(o){case"style":H1(r,d,b);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(o=d.__html,o!=null){if(x.children!=null)throw Error(a(60));r.innerHTML=o}}break;case"children":typeof d=="string"?vs(r,d):(typeof d=="number"||typeof d=="bigint")&&vs(r,""+d);break;case"onScroll":d!=null&&it("scroll",r);break;case"onScrollEnd":d!=null&&it("scrollend",r);break;case"onClick":d!=null&&(r.onclick=oa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!O1.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(x=o.endsWith("Capture"),i=o.slice(2,x?o.length-7:void 0),b=r[Mn]||null,b=b!=null?b[o]:null,typeof b=="function"&&r.removeEventListener(i,b,x),typeof d=="function")){typeof b!="function"&&b!==null&&(o in r?r[o]=null:r.hasAttribute(o)&&r.removeAttribute(o)),r.addEventListener(i,d,x);break e}o in r?r[o]=d:d===!0?r.setAttribute(o,""):Uu(r,o,d)}}}function En(r,i,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":it("error",r),it("load",r);var d=!1,x=!1,b;for(b in o)if(o.hasOwnProperty(b)){var C=o[b];if(C!=null)switch(b){case"src":d=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:kt(r,i,b,C,o,null)}}x&&kt(r,i,"srcSet",o.srcSet,o,null),d&&kt(r,i,"src",o.src,o,null);return;case"input":it("invalid",r);var D=b=C=x=null,X=null,ae=null;for(d in o)if(o.hasOwnProperty(d)){var oe=o[d];if(oe!=null)switch(d){case"name":x=oe;break;case"type":C=oe;break;case"checked":X=oe;break;case"defaultChecked":ae=oe;break;case"value":b=oe;break;case"defaultValue":D=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(a(137,i));break;default:kt(r,i,d,oe,o,null)}}M1(r,b,D,X,ae,C,x,!1);return;case"select":it("invalid",r),d=C=b=null;for(x in o)if(o.hasOwnProperty(x)&&(D=o[x],D!=null))switch(x){case"value":b=D;break;case"defaultValue":C=D;break;case"multiple":d=D;default:kt(r,i,x,D,o,null)}i=b,o=C,r.multiple=!!d,i!=null?Ts(r,!!d,i,!1):o!=null&&Ts(r,!!d,o,!0);return;case"textarea":it("invalid",r),b=x=d=null;for(C in o)if(o.hasOwnProperty(C)&&(D=o[C],D!=null))switch(C){case"value":d=D;break;case"defaultValue":x=D;break;case"children":b=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(a(91));break;default:kt(r,i,C,D,o,null)}P1(r,d,x,b);return;case"option":for(X in o)o.hasOwnProperty(X)&&(d=o[X],d!=null)&&(X==="selected"?r.selected=d&&typeof d!="function"&&typeof d!="symbol":kt(r,i,X,d,o,null));return;case"dialog":it("beforetoggle",r),it("toggle",r),it("cancel",r),it("close",r);break;case"iframe":case"object":it("load",r);break;case"video":case"audio":for(d=0;d<To.length;d++)it(To[d],r);break;case"image":it("error",r),it("load",r);break;case"details":it("toggle",r);break;case"embed":case"source":case"link":it("error",r),it("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ae in o)if(o.hasOwnProperty(ae)&&(d=o[ae],d!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:kt(r,i,ae,d,o,null)}return;default:if(Wf(i)){for(oe in o)o.hasOwnProperty(oe)&&(d=o[oe],d!==void 0&&M0(r,i,oe,d,o,void 0));return}}for(D in o)o.hasOwnProperty(D)&&(d=o[D],d!=null&&kt(r,i,D,d,o,null))}function Iw(r,i,o,d){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,b=null,C=null,D=null,X=null,ae=null,oe=null;for(se in o){var me=o[se];if(o.hasOwnProperty(se)&&me!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":X=me;default:d.hasOwnProperty(se)||kt(r,i,se,null,d,me)}}for(var ie in d){var se=d[ie];if(me=o[ie],d.hasOwnProperty(ie)&&(se!=null||me!=null))switch(ie){case"type":b=se;break;case"name":x=se;break;case"checked":ae=se;break;case"defaultChecked":oe=se;break;case"value":C=se;break;case"defaultValue":D=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(a(137,i));break;default:se!==me&&kt(r,i,ie,se,d,me)}}Xf(r,C,D,X,ae,oe,b,x);return;case"select":se=C=D=ie=null;for(b in o)if(X=o[b],o.hasOwnProperty(b)&&X!=null)switch(b){case"value":break;case"multiple":se=X;default:d.hasOwnProperty(b)||kt(r,i,b,null,d,X)}for(x in d)if(b=d[x],X=o[x],d.hasOwnProperty(x)&&(b!=null||X!=null))switch(x){case"value":ie=b;break;case"defaultValue":D=b;break;case"multiple":C=b;default:b!==X&&kt(r,i,x,b,d,X)}i=D,o=C,d=se,ie!=null?Ts(r,!!o,ie,!1):!!d!=!!o&&(i!=null?Ts(r,!!o,i,!0):Ts(r,!!o,o?[]:"",!1));return;case"textarea":se=ie=null;for(D in o)if(x=o[D],o.hasOwnProperty(D)&&x!=null&&!d.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:kt(r,i,D,null,d,x)}for(C in d)if(x=d[C],b=o[C],d.hasOwnProperty(C)&&(x!=null||b!=null))switch(C){case"value":ie=x;break;case"defaultValue":se=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(a(91));break;default:x!==b&&kt(r,i,C,x,d,b)}B1(r,ie,se);return;case"option":for(var Oe in o)ie=o[Oe],o.hasOwnProperty(Oe)&&ie!=null&&!d.hasOwnProperty(Oe)&&(Oe==="selected"?r.selected=!1:kt(r,i,Oe,null,d,ie));for(X in d)ie=d[X],se=o[X],d.hasOwnProperty(X)&&ie!==se&&(ie!=null||se!=null)&&(X==="selected"?r.selected=ie&&typeof ie!="function"&&typeof ie!="symbol":kt(r,i,X,ie,d,se));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 Ue in o)ie=o[Ue],o.hasOwnProperty(Ue)&&ie!=null&&!d.hasOwnProperty(Ue)&&kt(r,i,Ue,null,d,ie);for(ae in d)if(ie=d[ae],se=o[ae],d.hasOwnProperty(ae)&&ie!==se&&(ie!=null||se!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,i));break;default:kt(r,i,ae,ie,d,se)}return;default:if(Wf(i)){for(var Nt in o)ie=o[Nt],o.hasOwnProperty(Nt)&&ie!==void 0&&!d.hasOwnProperty(Nt)&&M0(r,i,Nt,void 0,d,ie);for(oe in d)ie=d[oe],se=o[oe],!d.hasOwnProperty(oe)||ie===se||ie===void 0&&se===void 0||M0(r,i,oe,ie,d,se);return}}for(var J in o)ie=o[J],o.hasOwnProperty(J)&&ie!=null&&!d.hasOwnProperty(J)&&kt(r,i,J,null,d,ie);for(me in d)ie=d[me],se=o[me],!d.hasOwnProperty(me)||ie===se||ie==null&&se==null||kt(r,i,me,ie,d,se)}function Uy(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Dw(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,o=performance.getEntriesByType("resource"),d=0;d<o.length;d++){var x=o[d],b=x.transferSize,C=x.initiatorType,D=x.duration;if(b&&D&&Uy(C)){for(C=0,D=x.responseEnd,d+=1;d<o.length;d++){var X=o[d],ae=X.startTime;if(ae>D)break;var oe=X.transferSize,me=X.initiatorType;oe&&Uy(me)&&(X=X.responseEnd,C+=oe*(X<D?1:(D-ae)/(X-ae)))}if(--d,i+=8*(b+C)/(x.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var B0=null,P0=null;function zc(r){return r.nodeType===9?r:r.ownerDocument}function Fy(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function $y(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function z0(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var H0=null;function Lw(){var r=window.event;return r&&r.type==="popstate"?r===H0?!1:(H0=r,!0):(H0=null,!1)}var qy=typeof setTimeout=="function"?setTimeout:void 0,jw=typeof clearTimeout=="function"?clearTimeout:void 0,Vy=typeof Promise=="function"?Promise:void 0,Mw=typeof queueMicrotask=="function"?queueMicrotask:typeof Vy<"u"?function(r){return Vy.resolve(null).then(r).catch(Bw)}:qy;function Bw(r){setTimeout(function(){throw r})}function Za(r){return r==="head"}function Yy(r,i){var o=i,d=0;do{var x=o.nextSibling;if(r.removeChild(o),x&&x.nodeType===8)if(o=x.data,o==="/$"||o==="/&"){if(d===0){r.removeChild(x),Js(i);return}d--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")d++;else if(o==="html")So(r.ownerDocument.documentElement);else if(o==="head"){o=r.ownerDocument.head,So(o);for(var b=o.firstChild;b;){var C=b.nextSibling,D=b.nodeName;b[Hl]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&b.rel.toLowerCase()==="stylesheet"||o.removeChild(b),b=C}}else o==="body"&&So(r.ownerDocument.body);o=x}while(o);Js(i)}function Gy(r,i){var o=r;r=0;do{var d=o.nextSibling;if(o.nodeType===1?i?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(i?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(r===0)break;r--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||r++;o=d}while(o)}function U0(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var o=i;switch(i=i.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":U0(o),Yf(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}r.removeChild(o)}}function Pw(r,i,o,d){for(;r.nodeType===1;){var x=o;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[Hl])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(b=r.getAttribute("rel"),b==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(b!==x.rel||r.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||r.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||r.getAttribute("title")!==(x.title==null?null:x.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(b=r.getAttribute("src"),(b!==(x.src==null?null:x.src)||r.getAttribute("type")!==(x.type==null?null:x.type)||r.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&b&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var b=x.name==null?null:""+x.name;if(x.type==="hidden"&&r.getAttribute("name")===b)return r}else return r;if(r=gr(r.nextSibling),r===null)break}return null}function zw(r,i,o){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!o||(r=gr(r.nextSibling),r===null))return null;return r}function Xy(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=gr(r.nextSibling),r===null))return null;return r}function F0(r){return r.data==="$?"||r.data==="$~"}function $0(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function Hw(r,i){var o=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||o.readyState!=="loading")i();else{var d=function(){i(),o.removeEventListener("DOMContentLoaded",d)};o.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function gr(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var q0=null;function Qy(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var o=r.data;if(o==="/$"||o==="/&"){if(i===0)return gr(r.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}r=r.nextSibling}return null}function Wy(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var o=r.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(i===0)return r;i--}else o!=="/$"&&o!=="/&"||i++}r=r.previousSibling}return null}function Ky(r,i,o){switch(i=zc(o),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function So(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);Yf(r)}var xr=new Map,Zy=new Set;function Hc(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var ka=q.d;q.d={f:Uw,r:Fw,D:$w,C:qw,L:Vw,m:Yw,X:Xw,S:Gw,M:Qw};function Uw(){var r=ka.f(),i=Oc();return r||i}function Fw(r){var i=bs(r);i!==null&&i.tag===5&&i.type==="form"?pb(i):ka.r(r)}var Ws=typeof document>"u"?null:document;function Jy(r,i,o){var d=Ws;if(d&&typeof i=="string"&&i){var x=ur(i);x='link[rel="'+r+'"][href="'+x+'"]',typeof o=="string"&&(x+='[crossorigin="'+o+'"]'),Zy.has(x)||(Zy.add(x),r={rel:r,crossOrigin:o,href:i},d.querySelector(x)===null&&(i=d.createElement("link"),En(i,"link",r),dn(i),d.head.appendChild(i)))}}function $w(r){ka.D(r),Jy("dns-prefetch",r,null)}function qw(r,i){ka.C(r,i),Jy("preconnect",r,i)}function Vw(r,i,o){ka.L(r,i,o);var d=Ws;if(d&&r&&i){var x='link[rel="preload"][as="'+ur(i)+'"]';i==="image"&&o&&o.imageSrcSet?(x+='[imagesrcset="'+ur(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(x+='[imagesizes="'+ur(o.imageSizes)+'"]')):x+='[href="'+ur(r)+'"]';var b=x;switch(i){case"style":b=Ks(r);break;case"script":b=Zs(r)}xr.has(b)||(r=g({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:r,as:i},o),xr.set(b,r),d.querySelector(x)!==null||i==="style"&&d.querySelector(ko(b))||i==="script"&&d.querySelector(No(b))||(i=d.createElement("link"),En(i,"link",r),dn(i),d.head.appendChild(i)))}}function Yw(r,i){ka.m(r,i);var o=Ws;if(o&&r){var d=i&&typeof i.as=="string"?i.as:"script",x='link[rel="modulepreload"][as="'+ur(d)+'"][href="'+ur(r)+'"]',b=x;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Zs(r)}if(!xr.has(b)&&(r=g({rel:"modulepreload",href:r},i),xr.set(b,r),o.querySelector(x)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(No(b)))return}d=o.createElement("link"),En(d,"link",r),dn(d),o.head.appendChild(d)}}}function Gw(r,i,o){ka.S(r,i,o);var d=Ws;if(d&&r){var x=ys(d).hoistableStyles,b=Ks(r);i=i||"default";var C=x.get(b);if(!C){var D={loading:0,preload:null};if(C=d.querySelector(ko(b)))D.loading=5;else{r=g({rel:"stylesheet",href:r,"data-precedence":i},o),(o=xr.get(b))&&V0(r,o);var X=C=d.createElement("link");dn(X),En(X,"link",r),X._p=new Promise(function(ae,oe){X.onload=ae,X.onerror=oe}),X.addEventListener("load",function(){D.loading|=1}),X.addEventListener("error",function(){D.loading|=2}),D.loading|=4,Uc(C,i,d)}C={type:"stylesheet",instance:C,count:1,state:D},x.set(b,C)}}}function Xw(r,i){ka.X(r,i);var o=Ws;if(o&&r){var d=ys(o).hoistableScripts,x=Zs(r),b=d.get(x);b||(b=o.querySelector(No(x)),b||(r=g({src:r,async:!0},i),(i=xr.get(x))&&Y0(r,i),b=o.createElement("script"),dn(b),En(b,"link",r),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(x,b))}}function Qw(r,i){ka.M(r,i);var o=Ws;if(o&&r){var d=ys(o).hoistableScripts,x=Zs(r),b=d.get(x);b||(b=o.querySelector(No(x)),b||(r=g({src:r,async:!0,type:"module"},i),(i=xr.get(x))&&Y0(r,i),b=o.createElement("script"),dn(b),En(b,"link",r),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(x,b))}}function eE(r,i,o,d){var x=(x=ve.current)?Hc(x):null;if(!x)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=Ks(o.href),o=ys(x).hoistableStyles,d=o.get(i),d||(d={type:"style",instance:null,count:0,state:null},o.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){r=Ks(o.href);var b=ys(x).hoistableStyles,C=b.get(r);if(C||(x=x.ownerDocument||x,C={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(r,C),(b=x.querySelector(ko(r)))&&!b._p&&(C.instance=b,C.state.loading=5),xr.has(r)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},xr.set(r,o),b||Ww(x,r,o,C.state))),i&&d===null)throw Error(a(528,""));return C}if(i&&d!==null)throw Error(a(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Zs(o),o=ys(x).hoistableScripts,d=o.get(i),d||(d={type:"script",instance:null,count:0,state:null},o.set(i,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Ks(r){return'href="'+ur(r)+'"'}function ko(r){return'link[rel="stylesheet"]['+r+"]"}function tE(r){return g({},r,{"data-precedence":r.precedence,precedence:null})}function Ww(r,i,o,d){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?d.loading=1:(i=r.createElement("link"),d.preload=i,i.addEventListener("load",function(){return d.loading|=1}),i.addEventListener("error",function(){return d.loading|=2}),En(i,"link",o),dn(i),r.head.appendChild(i))}function Zs(r){return'[src="'+ur(r)+'"]'}function No(r){return"script[async]"+r}function nE(r,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+ur(o.href)+'"]');if(d)return i.instance=d,dn(d),d;var x=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),dn(d),En(d,"style",x),Uc(d,o.precedence,r),i.instance=d;case"stylesheet":x=Ks(o.href);var b=r.querySelector(ko(x));if(b)return i.state.loading|=4,i.instance=b,dn(b),b;d=tE(o),(x=xr.get(x))&&V0(d,x),b=(r.ownerDocument||r).createElement("link"),dn(b);var C=b;return C._p=new Promise(function(D,X){C.onload=D,C.onerror=X}),En(b,"link",d),i.state.loading|=4,Uc(b,o.precedence,r),i.instance=b;case"script":return b=Zs(o.src),(x=r.querySelector(No(b)))?(i.instance=x,dn(x),x):(d=o,(x=xr.get(b))&&(d=g({},o),Y0(d,x)),r=r.ownerDocument||r,x=r.createElement("script"),dn(x),En(x,"link",d),r.head.appendChild(x),i.instance=x);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(d=i.instance,i.state.loading|=4,Uc(d,o.precedence,r));return i.instance}function Uc(r,i,o){for(var d=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=d.length?d[d.length-1]:null,b=x,C=0;C<d.length;C++){var D=d[C];if(D.dataset.precedence===i)b=D;else if(b!==x)break}b?b.parentNode.insertBefore(r,b.nextSibling):(i=o.nodeType===9?o.head:o,i.insertBefore(r,i.firstChild))}function V0(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function Y0(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Fc=null;function rE(r,i,o){if(Fc===null){var d=new Map,x=Fc=new Map;x.set(o,d)}else x=Fc,d=x.get(o),d||(d=new Map,x.set(o,d));if(d.has(r))return d;for(d.set(r,null),o=o.getElementsByTagName(r),x=0;x<o.length;x++){var b=o[x];if(!(b[Hl]||b[gn]||r==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var C=b.getAttribute(i)||"";C=r+C;var D=d.get(C);D?D.push(b):d.set(C,[b])}}return d}function aE(r,i,o){r=r.ownerDocument||r,r.head.insertBefore(o,i==="title"?r.querySelector("head > title"):null)}function Kw(r,i,o){if(o===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(r=i.disabled,typeof i.precedence=="string"&&r==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function iE(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function Zw(r,i,o,d){if(o.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var x=Ks(d.href),b=i.querySelector(ko(x));if(b){i=b._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=$c.bind(r),i.then(r,r)),o.state.loading|=4,o.instance=b,dn(b);return}b=i.ownerDocument||i,d=tE(d),(x=xr.get(x))&&V0(d,x),b=b.createElement("link"),dn(b);var C=b;C._p=new Promise(function(D,X){C.onload=D,C.onerror=X}),En(b,"link",d),o.instance=b}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(r.count++,o=$c.bind(r),i.addEventListener("load",o),i.addEventListener("error",o))}}var G0=0;function Jw(r,i){return r.stylesheets&&r.count===0&&Vc(r,r.stylesheets),0<r.count||0<r.imgCount?function(o){var d=setTimeout(function(){if(r.stylesheets&&Vc(r,r.stylesheets),r.unsuspend){var b=r.unsuspend;r.unsuspend=null,b()}},6e4+i);0<r.imgBytes&&G0===0&&(G0=62500*Dw());var x=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Vc(r,r.stylesheets),r.unsuspend)){var b=r.unsuspend;r.unsuspend=null,b()}},(r.imgBytes>G0?50:800)+i);return r.unsuspend=o,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(x)}}:null}function $c(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vc(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var qc=null;function Vc(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,qc=new Map,i.forEach(e5,r),qc=null,$c.call(r))}function e5(r,i){if(!(i.state.loading&4)){var o=qc.get(r);if(o)var d=o.get(null);else{o=new Map,qc.set(r,o);for(var x=r.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<x.length;b++){var C=x[b];(C.nodeName==="LINK"||C.getAttribute("media")!=="not all")&&(o.set(C.dataset.precedence,C),d=C)}d&&o.set(null,d)}x=i.instance,C=x.getAttribute("data-precedence"),b=o.get(C)||d,b===d&&o.set(null,x),o.set(C,x),this.count++,d=$c.bind(this),x.addEventListener("load",d),x.addEventListener("error",d),b?b.parentNode.insertBefore(x,b.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(x,r.firstChild)),i.state.loading|=4}}var Co={$$typeof:w,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function t5(r,i,o,d,x,b,C,D,X){this.tag=1,this.containerInfo=r,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=Ff(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ff(0),this.hiddenUpdates=Ff(null),this.identifierPrefix=d,this.onUncaughtError=x,this.onCaughtError=b,this.onRecoverableError=C,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function sE(r,i,o,d,x,b,C,D,X,ae,oe,me){return r=new t5(r,i,o,C,X,ae,oe,me,D),i=1,b===!0&&(i|=24),b=Qn(3,null,null,i),r.current=b,b.stateNode=r,i=Ch(),i.refCount++,r.pooledCache=i,i.refCount++,b.memoizedState={element:d,isDehydrated:o,cache:i},Rh(b),r}function lE(r){return r?(r=ws,r):ws}function oE(r,i,o,d,x,b){x=lE(x),d.context===null?d.context=x:d.pendingContext=x,d=Ua(i),d.payload={element:o},b=b===void 0?null:b,b!==null&&(d.callback=b),o=Fa(r,d,i),o!==null&&(Fn(o,r,i),ro(o,r,i))}function uE(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var o=r.retryLane;r.retryLane=o!==0&&o<i?o:i}}function X0(r,i){uE(r,i),(r=r.alternate)&&uE(r,i)}function cE(r){if(r.tag===13||r.tag===31){var i=Oi(r,67108864);i!==null&&Fn(i,r,67108864),X0(r,67108864)}}function dE(r){if(r.tag===13||r.tag===31){var i=er();i=$f(i);var o=Oi(r,i);o!==null&&Fn(o,r,i),X0(r,i)}}var Yc=!0;function n5(r,i,o,d){var x=R.T;R.T=null;var b=q.p;try{q.p=2,Q0(r,i,o,d)}finally{q.p=b,R.T=x}}function r5(r,i,o,d){var x=R.T;R.T=null;var b=q.p;try{q.p=8,Q0(r,i,o,d)}finally{q.p=b,R.T=x}}function Q0(r,i,o,d){if(Yc){var x=W0(d);if(x===null)j0(r,i,d,Gc,o),hE(r,d);else if(i5(x,r,i,o,d))d.stopPropagation();else if(hE(r,d),i&4&&-1<a5.indexOf(r)){for(;x!==null;){var b=bs(x);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var C=Ci(b.pendingLanes);if(C!==0){var D=b;for(D.pendingLanes|=2,D.entangledLanes|=2;C;){var X=1<<31-At(C);D.entanglements[1]|=X,C&=~X}Vr(b),(yt&6)===0&&(wc=qt()+500,Eo(0))}}break;case 31:case 13:D=Oi(b,2),D!==null&&Fn(D,b,2),Oc(),X0(b,2)}if(b=W0(d),b===null&&j0(r,i,d,Gc,o),b===x)break;x=b}x!==null&&d.stopPropagation()}else j0(r,i,d,null,o)}}function W0(r){return r=Zf(r),K0(r)}var Gc=null;function K0(r){if(Gc=null,r=xs(r),r!==null){var i=l(r);if(i===null)r=null;else{var o=i.tag;if(o===13){if(r=u(i),r!==null)return r;r=null}else if(o===31){if(r=f(i),r!==null)return r;r=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Gc=r,null}function fE(r){switch(r){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(Nr()){case ce:return 2;case Ce:return 8;case He:case et:return 32;case mt:return 268435456;default:return 32}default:return 32}}var Z0=!1,Ja=null,ei=null,ti=null,_o=new Map,Ao=new Map,ni=[],a5="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 hE(r,i){switch(r){case"focusin":case"focusout":Ja=null;break;case"dragenter":case"dragleave":ei=null;break;case"mouseover":case"mouseout":ti=null;break;case"pointerover":case"pointerout":_o.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ao.delete(i.pointerId)}}function wo(r,i,o,d,x,b){return r===null||r.nativeEvent!==b?(r={blockedOn:i,domEventName:o,eventSystemFlags:d,nativeEvent:b,targetContainers:[x]},i!==null&&(i=bs(i),i!==null&&cE(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,x!==null&&i.indexOf(x)===-1&&i.push(x),r)}function i5(r,i,o,d,x){switch(i){case"focusin":return Ja=wo(Ja,r,i,o,d,x),!0;case"dragenter":return ei=wo(ei,r,i,o,d,x),!0;case"mouseover":return ti=wo(ti,r,i,o,d,x),!0;case"pointerover":var b=x.pointerId;return _o.set(b,wo(_o.get(b)||null,r,i,o,d,x)),!0;case"gotpointercapture":return b=x.pointerId,Ao.set(b,wo(Ao.get(b)||null,r,i,o,d,x)),!0}return!1}function mE(r){var i=xs(r.target);if(i!==null){var o=l(i);if(o!==null){if(i=o.tag,i===13){if(i=u(o),i!==null){r.blockedOn=i,A1(r.priority,function(){dE(o)});return}}else if(i===31){if(i=f(o),i!==null){r.blockedOn=i,A1(r.priority,function(){dE(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){r.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Xc(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var o=W0(r.nativeEvent);if(o===null){o=r.nativeEvent;var d=new o.constructor(o.type,o);Kf=d,o.target.dispatchEvent(d),Kf=null}else return i=bs(o),i!==null&&cE(i),r.blockedOn=o,!1;i.shift()}return!0}function pE(r,i,o){Xc(r)&&o.delete(i)}function s5(){Z0=!1,Ja!==null&&Xc(Ja)&&(Ja=null),ei!==null&&Xc(ei)&&(ei=null),ti!==null&&Xc(ti)&&(ti=null),_o.forEach(pE),Ao.forEach(pE)}function Qc(r,i){r.blockedOn===i&&(r.blockedOn=null,Z0||(Z0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,s5)))}var Wc=null;function gE(r){Wc!==r&&(Wc=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Wc===r&&(Wc=null);for(var i=0;i<r.length;i+=3){var o=r[i],d=r[i+1],x=r[i+2];if(typeof d!="function"){if(K0(d||o)===null)continue;break}var b=bs(o);b!==null&&(r.splice(i,3),i-=3,Wh(b,{pending:!0,data:x,method:o.method,action:d},d,x))}}))}function Js(r){function i(X){return Qc(X,r)}Ja!==null&&Qc(Ja,r),ei!==null&&Qc(ei,r),ti!==null&&Qc(ti,r),_o.forEach(i),Ao.forEach(i);for(var o=0;o<ni.length;o++){var d=ni[o];d.blockedOn===r&&(d.blockedOn=null)}for(;0<ni.length&&(o=ni[0],o.blockedOn===null);)mE(o),o.blockedOn===null&&ni.shift();if(o=(r.ownerDocument||r).$$reactFormReplay,o!=null)for(d=0;d<o.length;d+=3){var x=o[d],b=o[d+1],C=x[Mn]||null;if(typeof b=="function")C||gE(o);else if(C){var D=null;if(b&&b.hasAttribute("formAction")){if(x=b,C=b[Mn]||null)D=C.formAction;else if(K0(x)!==null)continue}else D=C.action;typeof D=="function"?o[d+1]=D:(o.splice(d,3),d-=3),gE(o)}}}function xE(){function r(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(C){return x=C})},focusReset:"manual",scroll:"manual"})}function i(){x!==null&&(x(),x=null),d||setTimeout(o,20)}function o(){if(!d&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,x=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),x!==null&&(x(),x=null)}}}function J0(r){this._internalRoot=r}Kc.prototype.render=J0.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var o=i.current,d=er();oE(o,d,r,i,null,null)},Kc.prototype.unmount=J0.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;oE(r.current,2,null,r,null,null),Oc(),i[gs]=null}};function Kc(r){this._internalRoot=r}Kc.prototype.unstable_scheduleHydration=function(r){if(r){var i=_1();r={blockedOn:null,target:r,priority:i};for(var o=0;o<ni.length&&i!==0&&i<ni[o].priority;o++);ni.splice(o,0,r),o===0&&mE(r)}};var bE=t.version;if(bE!=="19.2.4")throw Error(a(527,bE,"19.2.4"));q.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=m(i),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var l5={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zc.isDisabled&&Zc.supportsFiber)try{Rn=Zc.inject(l5),sn=Zc}catch{}}return Oo.createRoot=function(r,i){if(!s(r))throw Error(a(299));var o=!1,d="",x=Nb,b=Cb,C=_b;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(x=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(C=i.onRecoverableError)),i=sE(r,1,!1,null,null,o,d,null,x,b,C,xE),r[gs]=i.current,L0(r),new J0(i)},Oo.hydrateRoot=function(r,i,o){if(!s(r))throw Error(a(299));var d=!1,x="",b=Nb,C=Cb,D=_b,X=null;return o!=null&&(o.unstable_strictMode===!0&&(d=!0),o.identifierPrefix!==void 0&&(x=o.identifierPrefix),o.onUncaughtError!==void 0&&(b=o.onUncaughtError),o.onCaughtError!==void 0&&(C=o.onCaughtError),o.onRecoverableError!==void 0&&(D=o.onRecoverableError),o.formState!==void 0&&(X=o.formState)),i=sE(r,1,!0,i,o??null,d,x,X,b,C,D,xE),i.context=lE(null),o=i.current,d=er(),d=$f(d),x=Ua(d),x.callback=null,Fa(o,x,d),o=d,i.current.lanes=o,zl(i,o),Vr(i),r[gs]=i.current,L0(r),new Kc(i)},Oo.version="19.2.4",Oo}var AE;function x5(){if(AE)return nm.exports;AE=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),nm.exports=g5(),nm.exports}var b5=x5();const y5=3e5,wE=100;class E5{store=new Map;evictIfNeeded(){if(this.store.size<=wE)return;const t=this.store.size-wE;let n=0;for(const[a,s]of this.store)if(!s.promise&&(this.store.delete(a),n++,n>=t))break}async get(t,n,a=y5){const s=this.store.get(t);if(s&&Date.now()-s.timestamp<a)return s.promise?s.promise:s.data;if(s?.promise)return s.promise;const l=n().then(u=>(this.store.set(t,{data:u,timestamp:Date.now()}),this.evictIfNeeded(),u),u=>{throw this.store.get(t)?.promise===l&&this.store.delete(t),u});return this.store.set(t,{data:void 0,timestamp:Date.now(),promise:l}),l}invalidate(t){this.store.delete(t)}clear(){this.store.clear()}}const Gt=new E5,nf="/api/vis";class T5{constructor(t){this.maxConcurrent=t}running=0;queue=[];async run(t){for(;this.running>=this.maxConcurrent;)await new Promise(n=>this.queue.push(n));this.running++;try{return await t()}finally{this.running--,this.queue.shift()?.()}}}const v5=new T5(3);async function ta(e,t=3e4){const n=new AbortController,a=setTimeout(()=>n.abort(),t);try{const s=await fetch(`${nf}${e}`,{signal:n.signal});if(!s.ok)throw new Error(`API error: ${s.status} ${s.statusText}`);return await s.json()}catch(s){throw s instanceof DOMException&&s.name==="AbortError"?new Error("Request timed out"):s}finally{clearTimeout(a)}}function Sr(e){return e?typeof e=="string"?[{type:"text",text:e}]:Array.isArray(e)?e:[]:[]}function Od(e=!1){return e&&Gt.invalidate("sessions"),Gt.get("sessions",()=>ta("/sessions",12e4),3e4)}const RE={text:"TextPart",think:"ThinkPart"};function Mv(e){return{...e,events:e.events.map(t=>{if(t.type==="ContentPart"&&typeof t.payload.type=="string"){const n=RE[t.payload.type];if(n)return{...t,type:n}}if(t.type==="SubagentEvent"&&t.payload.event&&typeof t.payload.event=="object"){const n=t.payload.event;if(n.type==="ContentPart"&&n.payload&&typeof n.payload=="object"){const a=n.payload,s=RE[a.type];if(s)return{...t,payload:{...t.payload,event:{...n,type:s}}}}}return t})}}function Zp(e,t=!1){const n=`wire:${e}`;return t&&Gt.invalidate(n),Gt.get(n,()=>ta(`/sessions/${e}/wire`).then(Mv))}function Bv(e,t=!1){const n=`context:${e}`;return t&&Gt.invalidate(n),Gt.get(n,()=>ta(`/sessions/${e}/context`))}function S5(e,t=!1){const n=`state:${e}`;return t&&Gt.invalidate(n),Gt.get(n,()=>ta(`/sessions/${e}/state`))}function k5(e=!1){const t="aggregate-stats";return e&&Gt.invalidate(t),Gt.get(t,()=>ta("/statistics"),6e4)}function N5(e=!1){const t="vis-capabilities";return e&&Gt.invalidate(t),Gt.get(t,()=>ta("/capabilities"),6e4)}function Pv(e){return`${nf}/sessions/${e}/download`}async function C5(e,t){const n=new AbortController,a=setTimeout(()=>n.abort(),3e4);try{const s=await fetch("/api/open-in",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app:e,path:t}),signal:n.signal});if(!s.ok){const l=await s.json().catch(()=>({}));throw new Error(l.detail||`Open failed: ${s.status}`)}}catch(s){throw s instanceof DOMException&&s.name==="AbortError"?new Error("Open request timed out"):s}finally{clearTimeout(a)}}function _5(e,t=!1){const n=`summary:${e}`;return t&&Gt.invalidate(n),Gt.get(n,()=>v5.run(()=>ta(`/sessions/${e}/summary`)))}async function A5(e){const t=new AbortController,n=setTimeout(()=>t.abort(),12e4);try{const a=new FormData;a.append("file",e);const s=await fetch(`${nf}/sessions/import`,{method:"POST",body:a,signal:t.signal});if(!s.ok){const l=await s.json().catch(()=>({}));throw new Error(l.detail||`Import failed: ${s.status}`)}return Gt.invalidate("sessions"),s.json()}catch(a){throw a instanceof DOMException&&a.name==="AbortError"?new Error("Import request timed out"):a}finally{clearTimeout(n)}}function Jp(e,t=!1){const n=`subagents:${e}`;return t&&Gt.invalidate(n),Gt.get(n,()=>ta(`/sessions/${e}/subagents`))}function zv(e,t,n=!1){const a=`subagent-wire:${e}:${t}`;return n&&Gt.invalidate(a),Gt.get(a,()=>ta(`/sessions/${e}/subagents/${t}/wire`).then(Mv))}function Hv(e,t,n=!1){const a=`subagent-context:${e}:${t}`;return n&&Gt.invalidate(a),Gt.get(a,()=>ta(`/sessions/${e}/subagents/${t}/context`))}async function w5(e){const t=new AbortController,n=setTimeout(()=>t.abort(),3e4);try{const a=await fetch(`${nf}/sessions/${e}`,{method:"DELETE",signal:t.signal});if(!a.ok){const s=await a.json().catch(()=>({}));throw new Error(s.detail||`Delete failed: ${a.status}`)}Gt.invalidate("sessions")}catch(a){throw a instanceof DOMException&&a.name==="AbortError"?new Error("Delete request timed out"):a}finally{clearTimeout(n)}}const R5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),O5=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),OE=e=>{const t=O5(e);return t.charAt(0).toUpperCase()+t.slice(1)},Uv=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),I5=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var D5={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const L5=v.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:l,iconNode:u,...f},h)=>v.createElement("svg",{ref:h,...D5,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:Uv("lucide",s),...!l&&!I5(f)&&{"aria-hidden":"true"},...f},[...u.map(([m,p])=>v.createElement(m,p)),...Array.isArray(l)?l:[l]]));const De=(e,t)=>{const n=v.forwardRef(({className:a,...s},l)=>v.createElement(L5,{ref:l,iconNode:t,className:Uv(`lucide-${R5(OE(e))}`,`lucide-${e}`,a),...s}));return n.displayName=OE(e),n};const j5=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Fv=De("activity",j5);const M5=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h4",key:"6d7r33"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h10",key:"1438ji"}]],B5=De("arrow-down-narrow-wide",M5);const P5=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],z5=De("arrow-left",P5);const H5=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],eg=De("arrow-right",H5);const U5=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],F5=De("arrow-up-down",U5);const $5=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],q5=De("bookmark",$5);const V5=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Mr=De("bot",V5);const Y5=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],tg=De("brain",Y5);const G5=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],ng=De("chart-column",G5);const X5=[["path",{d:"M6 5h12",key:"fvfigv"}],["path",{d:"M4 12h10",key:"oujl3d"}],["path",{d:"M12 19h8",key:"baeox8"}]],Q5=De("chart-no-axes-gantt",X5);const W5=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],vu=De("check",W5);const K5=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],$t=De("chevron-down",K5);const Z5=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],cn=De("chevron-right",Z5);const J5=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],rg=De("chevron-up",J5);const e6=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],t6=De("chevrons-down-up",e6);const n6=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],r6=De("chevrons-up-down",n6);const a6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],fi=De("circle-alert",a6);const i6=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],s6=De("circle-check-big",i6);const l6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],o6=De("circle-check",l6);const u6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],$v=De("circle-x",u6);const c6=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],rf=De("clock",c6);const d6=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],f6=De("code",d6);const h6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],m6=De("columns-2",h6);const p6=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],af=De("copy",p6);const g6=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Xm=De("cpu",g6);const x6=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Qm=De("download",x6);const b6=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],y6=De("eye-off",b6);const E6=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],T6=De("eye",E6);const v6=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],S6=De("file-pen",v6);const k6=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],ag=De("file-text",k6);const N6=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],sf=De("folder-open",N6);const C6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],qv=De("image",C6);const _6=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m8 11 4 4 4-4",key:"1dohi6"}],["path",{d:"M8 5H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-4",key:"1ywtjm"}]],IE=De("import",_6);const A6=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],w6=De("layers",A6);const R6=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],O6=De("layout-grid",R6);const I6=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],D6=De("link",I6);const L6=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],j6=De("list-todo",L6);const M6=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],ig=De("list",M6);const B6=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Id=De("loader-circle",B6);const P6=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],z6=De("moon",P6);const H6=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],Vv=De("music",H6);const U6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],F6=De("panel-left-close",U6);const $6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],q6=De("panel-left",$6);const V6=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],Y6=De("pause",V6);const G6=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],sg=De("refresh-cw",G6);const X6=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lg=De("search",X6);const Q6=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],Yv=De("shield-alert",Q6);const W6=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Wm=De("shield-check",W6);const K6=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],Z6=De("shield",K6);const J6=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],e4=De("skull",J6);const t4=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],n4=De("sun",t4);const r4=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Gv=De("terminal",r4);const a4=[["path",{d:"m16 16-3 3 3 3",key:"117b85"}],["path",{d:"M3 12h14.5a1 1 0 0 1 0 7H13",key:"18xa6z"}],["path",{d:"M3 19h6",key:"1ygdsz"}],["path",{d:"M3 5h18",key:"1u36vt"}]],i4=De("text-wrap",a4);const s4=[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]],Xv=De("timer",s4);const l4=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],DE=De("trash-2",l4);const o4=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],LE=De("triangle-alert",o4);const u4=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],c4=De("user",u4);const d4=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],f4=De("users",d4);const h4=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Qv=De("video",h4);const m4=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Wv=De("wrench",m4);const p4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Su=De("x",p4);const g4=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],og=De("zap",g4);const x4=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],b4=De("zoom-in",x4);const y4=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],E4=De("zoom-out",y4);var Nl=jv();const Kv=tf(Nl);function jE(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Zv(...e){return t=>{let n=!1;const a=e.map(s=>{const l=jE(s,t);return!n&&typeof l=="function"&&(n=!0),l});if(n)return()=>{for(let s=0;s<a.length;s++){const l=a[s];typeof l=="function"?l():jE(e[s],null)}}}}function Mt(...e){return v.useCallback(Zv(...e),e)}function su(e){const t=T4(e),n=v.forwardRef((a,s)=>{const{children:l,...u}=a,f=v.Children.toArray(l),h=f.find(v4);if(h){const m=h.props.children,p=f.map(g=>g===h?v.Children.count(m)>1?v.Children.only(null):v.isValidElement(m)?m.props.children:null:g);return c.jsx(t,{...u,ref:s,children:v.isValidElement(m)?v.cloneElement(m,void 0,p):null})}return c.jsx(t,{...u,ref:s,children:l})});return n.displayName=`${e}.Slot`,n}function T4(e){const t=v.forwardRef((n,a)=>{const{children:s,...l}=n;if(v.isValidElement(s)){const u=k4(s),f=S4(l,s.props);return s.type!==v.Fragment&&(f.ref=a?Zv(a,u):u),v.cloneElement(s,f)}return v.Children.count(s)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jv=Symbol("radix.slottable");function eS(e){const t=({children:n})=>c.jsx(c.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Jv,t}function v4(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jv}function S4(e,t){const n={...t};for(const a in t){const s=e[a],l=t[a];/^on[A-Z]/.test(a)?s&&l?n[a]=(...f)=>{const h=l(...f);return s(...f),h}:s&&(n[a]=s):a==="style"?n[a]={...s,...l}:a==="className"&&(n[a]=[s,l].filter(Boolean).join(" "))}return{...e,...n}}function k4(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var N4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ot=N4.reduce((e,t)=>{const n=su(`Primitive.${t}`),a=v.forwardRef((s,l)=>{const{asChild:u,...f}=s,h=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(h,{...f,ref:l})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function C4(e,t){e&&Nl.flushSync(()=>e.dispatchEvent(t))}var tS=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),_4="VisuallyHidden",nS=v.forwardRef((e,t)=>c.jsx(Ot.span,{...e,ref:t,style:{...tS,...e.style}}));nS.displayName=_4;var A4=nS;function w4(e,t){const n=v.createContext(t),a=l=>{const{children:u,...f}=l,h=v.useMemo(()=>f,Object.values(f));return c.jsx(n.Provider,{value:h,children:u})};a.displayName=e+"Provider";function s(l){const u=v.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${l}\` must be used within \`${e}\``)}return[a,s]}function Cl(e,t=[]){let n=[];function a(l,u){const f=v.createContext(u),h=n.length;n=[...n,u];const m=g=>{const{scope:y,children:T,...S}=g,k=y?.[e]?.[h]||f,N=v.useMemo(()=>S,Object.values(S));return c.jsx(k.Provider,{value:N,children:T})};m.displayName=l+"Provider";function p(g,y){const T=y?.[e]?.[h]||f,S=v.useContext(T);if(S)return S;if(u!==void 0)return u;throw new Error(`\`${g}\` must be used within \`${l}\``)}return[m,p]}const s=()=>{const l=n.map(u=>v.createContext(u));return function(f){const h=f?.[e]||l;return v.useMemo(()=>({[`__scope${e}`]:{...f,[e]:h}}),[f,h])}};return s.scopeName=e,[a,R4(s,...t)]}function R4(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(l){const u=a.reduce((f,{useScope:h,scopeName:m})=>{const g=h(l)[`__scope${m}`];return{...f,...g}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])}};return n.scopeName=t.scopeName,n}function O4(e){const t=e+"CollectionProvider",[n,a]=Cl(t),[s,l]=n(t,{collectionRef:{current:null},itemMap:new Map}),u=k=>{const{scope:N,children:_}=k,A=Re.useRef(null),w=Re.useRef(new Map).current;return c.jsx(s,{scope:N,itemMap:w,collectionRef:A,children:_})};u.displayName=t;const f=e+"CollectionSlot",h=su(f),m=Re.forwardRef((k,N)=>{const{scope:_,children:A}=k,w=l(f,_),P=Mt(N,w.collectionRef);return c.jsx(h,{ref:P,children:A})});m.displayName=f;const p=e+"CollectionItemSlot",g="data-radix-collection-item",y=su(p),T=Re.forwardRef((k,N)=>{const{scope:_,children:A,...w}=k,P=Re.useRef(null),F=Mt(N,P),M=l(p,_);return Re.useEffect(()=>(M.itemMap.set(P,{ref:P,...w}),()=>{M.itemMap.delete(P)})),c.jsx(y,{[g]:"",ref:F,children:A})});T.displayName=p;function S(k){const N=l(e+"CollectionConsumer",k);return Re.useCallback(()=>{const A=N.collectionRef.current;if(!A)return[];const w=Array.from(A.querySelectorAll(`[${g}]`));return Array.from(N.itemMap.values()).sort((M,I)=>w.indexOf(M.ref.current)-w.indexOf(I.ref.current))},[N.collectionRef,N.itemMap])}return[{Provider:u,Slot:m,ItemSlot:T},S,a]}function xt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(s){if(e?.(s),n===!1||!s.defaultPrevented)return t?.(s)}}var _n=globalThis?.document?v.useLayoutEffect:()=>{},I4=Lv[" useInsertionEffect ".trim().toString()]||_n;function Dd({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[s,l,u]=D4({defaultProp:t,onChange:n}),f=e!==void 0,h=f?e:s;{const p=v.useRef(e!==void 0);v.useEffect(()=>{const g=p.current;g!==f&&console.warn(`${a} is changing from ${g?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=f},[f,a])}const m=v.useCallback(p=>{if(f){const g=L4(p)?p(e):p;g!==e&&u.current?.(g)}else l(p)},[f,e,l,u]);return[h,m]}function D4({defaultProp:e,onChange:t}){const[n,a]=v.useState(e),s=v.useRef(n),l=v.useRef(t);return I4(()=>{l.current=t},[t]),v.useEffect(()=>{s.current!==n&&(l.current?.(n),s.current=n)},[n,s]),[n,a,l]}function L4(e){return typeof e=="function"}function j4(e,t){return v.useReducer((n,a)=>t[n][a]??n,e)}var _l=e=>{const{present:t,children:n}=e,a=M4(t),s=typeof n=="function"?n({present:a.isPresent}):v.Children.only(n),l=Mt(a.ref,B4(s));return typeof n=="function"||a.isPresent?v.cloneElement(s,{ref:l}):null};_l.displayName="Presence";function M4(e){const[t,n]=v.useState(),a=v.useRef(null),s=v.useRef(e),l=v.useRef("none"),u=e?"mounted":"unmounted",[f,h]=j4(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const m=Jc(a.current);l.current=f==="mounted"?m:"none"},[f]),_n(()=>{const m=a.current,p=s.current;if(p!==e){const y=l.current,T=Jc(m);e?h("MOUNT"):T==="none"||m?.display==="none"?h("UNMOUNT"):h(p&&y!==T?"ANIMATION_OUT":"UNMOUNT"),s.current=e}},[e,h]),_n(()=>{if(t){let m;const p=t.ownerDocument.defaultView??window,g=T=>{const k=Jc(a.current).includes(CSS.escape(T.animationName));if(T.target===t&&k&&(h("ANIMATION_END"),!s.current)){const N=t.style.animationFillMode;t.style.animationFillMode="forwards",m=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=N)})}},y=T=>{T.target===t&&(l.current=Jc(a.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",g),t.addEventListener("animationend",g),()=>{p.clearTimeout(m),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",g),t.removeEventListener("animationend",g)}}else h("ANIMATION_END")},[t,h]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:v.useCallback(m=>{a.current=m?getComputedStyle(m):null,n(m)},[])}}function Jc(e){return e?.animationName||"none"}function B4(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var P4=Lv[" useId ".trim().toString()]||(()=>{}),z4=0;function Wi(e){const[t,n]=v.useState(P4());return _n(()=>{n(a=>a??String(z4++))},[e]),t?`radix-${t}`:""}var H4=v.createContext(void 0);function U4(e){const t=v.useContext(H4);return e||t||"ltr"}function Ji(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>t.current?.(...n),[])}function F4(e,t=globalThis?.document){const n=Ji(e);v.useEffect(()=>{const a=s=>{s.key==="Escape"&&n(s)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var $4="DismissableLayer",Km="dismissableLayer.update",q4="dismissableLayer.pointerDownOutside",V4="dismissableLayer.focusOutside",ME,rS=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),lf=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:l,onInteractOutside:u,onDismiss:f,...h}=e,m=v.useContext(rS),[p,g]=v.useState(null),y=p?.ownerDocument??globalThis?.document,[,T]=v.useState({}),S=Mt(t,I=>g(I)),k=Array.from(m.layers),[N]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),_=k.indexOf(N),A=p?k.indexOf(p):-1,w=m.layersWithOutsidePointerEventsDisabled.size>0,P=A>=_,F=X4(I=>{const j=I.target,G=[...m.branches].some(B=>B.contains(j));!P||G||(s?.(I),u?.(I),I.defaultPrevented||f?.())},y),M=Q4(I=>{const j=I.target;[...m.branches].some(B=>B.contains(j))||(l?.(I),u?.(I),I.defaultPrevented||f?.())},y);return F4(I=>{A===m.layers.size-1&&(a?.(I),!I.defaultPrevented&&f&&(I.preventDefault(),f()))},y),v.useEffect(()=>{if(p)return n&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(ME=y.body.style.pointerEvents,y.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(p)),m.layers.add(p),BE(),()=>{n&&m.layersWithOutsidePointerEventsDisabled.size===1&&(y.body.style.pointerEvents=ME)}},[p,y,n,m]),v.useEffect(()=>()=>{p&&(m.layers.delete(p),m.layersWithOutsidePointerEventsDisabled.delete(p),BE())},[p,m]),v.useEffect(()=>{const I=()=>T({});return document.addEventListener(Km,I),()=>document.removeEventListener(Km,I)},[]),c.jsx(Ot.div,{...h,ref:S,style:{pointerEvents:w?P?"auto":"none":void 0,...e.style},onFocusCapture:xt(e.onFocusCapture,M.onFocusCapture),onBlurCapture:xt(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:xt(e.onPointerDownCapture,F.onPointerDownCapture)})});lf.displayName=$4;var Y4="DismissableLayerBranch",G4=v.forwardRef((e,t)=>{const n=v.useContext(rS),a=v.useRef(null),s=Mt(t,a);return v.useEffect(()=>{const l=a.current;if(l)return n.branches.add(l),()=>{n.branches.delete(l)}},[n.branches]),c.jsx(Ot.div,{...e,ref:s})});G4.displayName=Y4;function X4(e,t=globalThis?.document){const n=Ji(e),a=v.useRef(!1),s=v.useRef(()=>{});return v.useEffect(()=>{const l=f=>{if(f.target&&!a.current){let h=function(){aS(q4,n,m,{discrete:!0})};const m={originalEvent:f};f.pointerType==="touch"?(t.removeEventListener("click",s.current),s.current=h,t.addEventListener("click",s.current,{once:!0})):h()}else t.removeEventListener("click",s.current);a.current=!1},u=window.setTimeout(()=>{t.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",l),t.removeEventListener("click",s.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function Q4(e,t=globalThis?.document){const n=Ji(e),a=v.useRef(!1);return v.useEffect(()=>{const s=l=>{l.target&&!a.current&&aS(V4,n,{originalEvent:l},{discrete:!1})};return t.addEventListener("focusin",s),()=>t.removeEventListener("focusin",s)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function BE(){const e=new CustomEvent(Km);document.dispatchEvent(e)}function aS(e,t,n,{discrete:a}){const s=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),a?C4(s,l):s.dispatchEvent(l)}var sm="focusScope.autoFocusOnMount",lm="focusScope.autoFocusOnUnmount",PE={bubbles:!1,cancelable:!0},W4="FocusScope",ug=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:s,onUnmountAutoFocus:l,...u}=e,[f,h]=v.useState(null),m=Ji(s),p=Ji(l),g=v.useRef(null),y=Mt(t,k=>h(k)),T=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(a){let k=function(w){if(T.paused||!f)return;const P=w.target;f.contains(P)?g.current=P:li(g.current,{select:!0})},N=function(w){if(T.paused||!f)return;const P=w.relatedTarget;P!==null&&(f.contains(P)||li(g.current,{select:!0}))},_=function(w){if(document.activeElement===document.body)for(const F of w)F.removedNodes.length>0&&li(f)};document.addEventListener("focusin",k),document.addEventListener("focusout",N);const A=new MutationObserver(_);return f&&A.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",N),A.disconnect()}}},[a,f,T.paused]),v.useEffect(()=>{if(f){HE.add(T);const k=document.activeElement;if(!f.contains(k)){const _=new CustomEvent(sm,PE);f.addEventListener(sm,m),f.dispatchEvent(_),_.defaultPrevented||(K4(nR(iS(f)),{select:!0}),document.activeElement===k&&li(f))}return()=>{f.removeEventListener(sm,m),setTimeout(()=>{const _=new CustomEvent(lm,PE);f.addEventListener(lm,p),f.dispatchEvent(_),_.defaultPrevented||li(k??document.body,{select:!0}),f.removeEventListener(lm,p),HE.remove(T)},0)}}},[f,m,p,T]);const S=v.useCallback(k=>{if(!n&&!a||T.paused)return;const N=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,_=document.activeElement;if(N&&_){const A=k.currentTarget,[w,P]=Z4(A);w&&P?!k.shiftKey&&_===P?(k.preventDefault(),n&&li(w,{select:!0})):k.shiftKey&&_===w&&(k.preventDefault(),n&&li(P,{select:!0})):_===A&&k.preventDefault()}},[n,a,T.paused]);return c.jsx(Ot.div,{tabIndex:-1,...u,ref:y,onKeyDown:S})});ug.displayName=W4;function K4(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(li(a,{select:t}),document.activeElement!==n)return}function Z4(e){const t=iS(e),n=zE(t,e),a=zE(t.reverse(),e);return[n,a]}function iS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const s=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||s?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function zE(e,t){for(const n of e)if(!J4(n,{upTo:t}))return n}function J4(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function eR(e){return e instanceof HTMLInputElement&&"select"in e}function li(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&eR(e)&&t&&e.select()}}var HE=tR();function tR(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=UE(e,t),e.unshift(t)},remove(t){e=UE(e,t),e[0]?.resume()}}}function UE(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function nR(e){return e.filter(t=>t.tagName!=="A")}var rR="Portal",of=v.forwardRef((e,t)=>{const{container:n,...a}=e,[s,l]=v.useState(!1);_n(()=>l(!0),[]);const u=n||s&&globalThis?.document?.body;return u?Kv.createPortal(c.jsx(Ot.div,{...a,ref:t}),u):null});of.displayName=rR;var om=0;function sS(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??FE()),document.body.insertAdjacentElement("beforeend",e[1]??FE()),om++,()=>{om===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),om--}},[])}function FE(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Wr=function(){return Wr=Object.assign||function(t){for(var n,a=1,s=arguments.length;a<s;a++){n=arguments[a];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(t[l]=n[l])}return t},Wr.apply(this,arguments)};function lS(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(e);s<a.length;s++)t.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(e,a[s])&&(n[a[s]]=e[a[s]]);return n}function aR(e,t,n){if(n||arguments.length===2)for(var a=0,s=t.length,l;a<s;a++)(l||!(a in t))&&(l||(l=Array.prototype.slice.call(t,0,a)),l[a]=t[a]);return e.concat(l||Array.prototype.slice.call(t))}var vd="right-scroll-bar-position",Sd="width-before-scroll-bar",iR="with-scroll-bars-hidden",sR="--removed-body-scroll-bar-size";function um(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lR(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(a){var s=n.value;s!==a&&(n.value=a,n.callback(a,s))}}}})[0];return n.callback=t,n.facade}var oR=typeof window<"u"?v.useLayoutEffect:v.useEffect,$E=new WeakMap;function uR(e,t){var n=lR(null,function(a){return e.forEach(function(s){return um(s,a)})});return oR(function(){var a=$E.get(n);if(a){var s=new Set(a),l=new Set(e),u=n.current;s.forEach(function(f){l.has(f)||um(f,null)}),l.forEach(function(f){s.has(f)||um(f,u)})}$E.set(n,e)},[e]),n}function cR(e){return e}function dR(e,t){t===void 0&&(t=cR);var n=[],a=!1,s={read:function(){if(a)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(l){var u=t(l,a);return n.push(u),function(){n=n.filter(function(f){return f!==u})}},assignSyncMedium:function(l){for(a=!0;n.length;){var u=n;n=[],u.forEach(l)}n={push:function(f){return l(f)},filter:function(){return n}}},assignMedium:function(l){a=!0;var u=[];if(n.length){var f=n;n=[],f.forEach(l),u=n}var h=function(){var p=u;u=[],p.forEach(l)},m=function(){return Promise.resolve().then(h)};m(),n={push:function(p){u.push(p),m()},filter:function(p){return u=u.filter(p),n}}}};return s}function fR(e){e===void 0&&(e={});var t=dR(null);return t.options=Wr({async:!0,ssr:!1},e),t}var oS=function(e){var t=e.sideCar,n=lS(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return v.createElement(a,Wr({},n))};oS.isSideCarExport=!0;function hR(e,t){return e.useMedium(t),oS}var uS=fR(),cm=function(){},uf=v.forwardRef(function(e,t){var n=v.useRef(null),a=v.useState({onScrollCapture:cm,onWheelCapture:cm,onTouchMoveCapture:cm}),s=a[0],l=a[1],u=e.forwardProps,f=e.children,h=e.className,m=e.removeScrollBar,p=e.enabled,g=e.shards,y=e.sideCar,T=e.noRelative,S=e.noIsolation,k=e.inert,N=e.allowPinchZoom,_=e.as,A=_===void 0?"div":_,w=e.gapMode,P=lS(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),F=y,M=uR([n,t]),I=Wr(Wr({},P),s);return v.createElement(v.Fragment,null,p&&v.createElement(F,{sideCar:uS,removeScrollBar:m,shards:g,noRelative:T,noIsolation:S,inert:k,setCallbacks:l,allowPinchZoom:!!N,lockRef:n,gapMode:w}),u?v.cloneElement(v.Children.only(f),Wr(Wr({},I),{ref:M})):v.createElement(A,Wr({},I,{className:h,ref:M}),f))});uf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};uf.classNames={fullWidth:Sd,zeroRight:vd};var mR=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function pR(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=mR();return t&&e.setAttribute("nonce",t),e}function gR(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function xR(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bR=function(){var e=0,t=null;return{add:function(n){e==0&&(t=pR())&&(gR(t,n),xR(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},yR=function(){var e=bR();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},cS=function(){var e=yR(),t=function(n){var a=n.styles,s=n.dynamic;return e(a,s),null};return t},ER={left:0,top:0,right:0,gap:0},dm=function(e){return parseInt(e||"",10)||0},TR=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],s=t[e==="padding"?"paddingRight":"marginRight"];return[dm(n),dm(a),dm(s)]},vR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ER;var t=TR(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},SR=cS(),fl="data-scroll-locked",kR=function(e,t,n,a){var s=e.left,l=e.top,u=e.right,f=e.gap;return n===void 0&&(n="margin"),`
10
+ .`.concat(iR,` {
11
+ overflow: hidden `).concat(a,`;
12
+ padding-right: `).concat(f,"px ").concat(a,`;
13
+ }
14
+ body[`).concat(fl,`] {
15
+ overflow: hidden `).concat(a,`;
16
+ overscroll-behavior: contain;
17
+ `).concat([t&&"position: relative ".concat(a,";"),n==="margin"&&`
18
+ padding-left: `.concat(s,`px;
19
+ padding-top: `).concat(l,`px;
20
+ padding-right: `).concat(u,`px;
21
+ margin-left:0;
22
+ margin-top:0;
23
+ margin-right: `).concat(f,"px ").concat(a,`;
24
+ `),n==="padding"&&"padding-right: ".concat(f,"px ").concat(a,";")].filter(Boolean).join(""),`
25
+ }
26
+
27
+ .`).concat(vd,` {
28
+ right: `).concat(f,"px ").concat(a,`;
29
+ }
30
+
31
+ .`).concat(Sd,` {
32
+ margin-right: `).concat(f,"px ").concat(a,`;
33
+ }
34
+
35
+ .`).concat(vd," .").concat(vd,` {
36
+ right: 0 `).concat(a,`;
37
+ }
38
+
39
+ .`).concat(Sd," .").concat(Sd,` {
40
+ margin-right: 0 `).concat(a,`;
41
+ }
42
+
43
+ body[`).concat(fl,`] {
44
+ `).concat(sR,": ").concat(f,`px;
45
+ }
46
+ `)},qE=function(){var e=parseInt(document.body.getAttribute(fl)||"0",10);return isFinite(e)?e:0},NR=function(){v.useEffect(function(){return document.body.setAttribute(fl,(qE()+1).toString()),function(){var e=qE()-1;e<=0?document.body.removeAttribute(fl):document.body.setAttribute(fl,e.toString())}},[])},CR=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,s=a===void 0?"margin":a;NR();var l=v.useMemo(function(){return vR(s)},[s]);return v.createElement(SR,{styles:kR(l,!t,s,n?"":"!important")})},Zm=!1;if(typeof window<"u")try{var ed=Object.defineProperty({},"passive",{get:function(){return Zm=!0,!0}});window.addEventListener("test",ed,ed),window.removeEventListener("test",ed,ed)}catch{Zm=!1}var el=Zm?{passive:!1}:!1,_R=function(e){return e.tagName==="TEXTAREA"},dS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!_R(e)&&n[t]==="visible")},AR=function(e){return dS(e,"overflowY")},wR=function(e){return dS(e,"overflowX")},VE=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var s=fS(e,a);if(s){var l=hS(e,a),u=l[1],f=l[2];if(u>f)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},RR=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},OR=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},fS=function(e,t){return e==="v"?AR(t):wR(t)},hS=function(e,t){return e==="v"?RR(t):OR(t)},IR=function(e,t){return e==="h"&&t==="rtl"?-1:1},DR=function(e,t,n,a,s){var l=IR(e,window.getComputedStyle(t).direction),u=l*a,f=n.target,h=t.contains(f),m=!1,p=u>0,g=0,y=0;do{if(!f)break;var T=hS(e,f),S=T[0],k=T[1],N=T[2],_=k-N-l*S;(S||_)&&fS(e,f)&&(g+=_,y+=S);var A=f.parentNode;f=A&&A.nodeType===Node.DOCUMENT_FRAGMENT_NODE?A.host:A}while(!h&&f!==document.body||h&&(t.contains(f)||t===f));return(p&&Math.abs(g)<1||!p&&Math.abs(y)<1)&&(m=!0),m},td=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},YE=function(e){return[e.deltaX,e.deltaY]},GE=function(e){return e&&"current"in e?e.current:e},LR=function(e,t){return e[0]===t[0]&&e[1]===t[1]},jR=function(e){return`
47
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
48
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
49
+ `)},MR=0,tl=[];function BR(e){var t=v.useRef([]),n=v.useRef([0,0]),a=v.useRef(),s=v.useState(MR++)[0],l=v.useState(cS)[0],u=v.useRef(e);v.useEffect(function(){u.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(s));var k=aR([e.lockRef.current],(e.shards||[]).map(GE),!0).filter(Boolean);return k.forEach(function(N){return N.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),k.forEach(function(N){return N.classList.remove("allow-interactivity-".concat(s))})}}},[e.inert,e.lockRef.current,e.shards]);var f=v.useCallback(function(k,N){if("touches"in k&&k.touches.length===2||k.type==="wheel"&&k.ctrlKey)return!u.current.allowPinchZoom;var _=td(k),A=n.current,w="deltaX"in k?k.deltaX:A[0]-_[0],P="deltaY"in k?k.deltaY:A[1]-_[1],F,M=k.target,I=Math.abs(w)>Math.abs(P)?"h":"v";if("touches"in k&&I==="h"&&M.type==="range")return!1;var j=window.getSelection(),G=j&&j.anchorNode,B=G?G===M||G.contains(M):!1;if(B)return!1;var Q=VE(I,M);if(!Q)return!0;if(Q?F=I:(F=I==="v"?"h":"v",Q=VE(I,M)),!Q)return!1;if(!a.current&&"changedTouches"in k&&(w||P)&&(a.current=F),!F)return!0;var V=a.current||F;return DR(V,N,k,V==="h"?w:P)},[]),h=v.useCallback(function(k){var N=k;if(!(!tl.length||tl[tl.length-1]!==l)){var _="deltaY"in N?YE(N):td(N),A=t.current.filter(function(F){return F.name===N.type&&(F.target===N.target||N.target===F.shadowParent)&&LR(F.delta,_)})[0];if(A&&A.should){N.cancelable&&N.preventDefault();return}if(!A){var w=(u.current.shards||[]).map(GE).filter(Boolean).filter(function(F){return F.contains(N.target)}),P=w.length>0?f(N,w[0]):!u.current.noIsolation;P&&N.cancelable&&N.preventDefault()}}},[]),m=v.useCallback(function(k,N,_,A){var w={name:k,delta:N,target:_,should:A,shadowParent:PR(_)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(P){return P!==w})},1)},[]),p=v.useCallback(function(k){n.current=td(k),a.current=void 0},[]),g=v.useCallback(function(k){m(k.type,YE(k),k.target,f(k,e.lockRef.current))},[]),y=v.useCallback(function(k){m(k.type,td(k),k.target,f(k,e.lockRef.current))},[]);v.useEffect(function(){return tl.push(l),e.setCallbacks({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:y}),document.addEventListener("wheel",h,el),document.addEventListener("touchmove",h,el),document.addEventListener("touchstart",p,el),function(){tl=tl.filter(function(k){return k!==l}),document.removeEventListener("wheel",h,el),document.removeEventListener("touchmove",h,el),document.removeEventListener("touchstart",p,el)}},[]);var T=e.removeScrollBar,S=e.inert;return v.createElement(v.Fragment,null,S?v.createElement(l,{styles:jR(s)}):null,T?v.createElement(CR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function PR(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const zR=hR(uS,BR);var cg=v.forwardRef(function(e,t){return v.createElement(uf,Wr({},e,{ref:t,sideCar:zR}))});cg.classNames=uf.classNames;var HR=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},nl=new WeakMap,nd=new WeakMap,rd={},fm=0,mS=function(e){return e&&(e.host||mS(e.parentNode))},UR=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=mS(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},FR=function(e,t,n,a){var s=UR(t,Array.isArray(e)?e:[e]);rd[n]||(rd[n]=new WeakMap);var l=rd[n],u=[],f=new Set,h=new Set(s),m=function(g){!g||f.has(g)||(f.add(g),m(g.parentNode))};s.forEach(m);var p=function(g){!g||h.has(g)||Array.prototype.forEach.call(g.children,function(y){if(f.has(y))p(y);else try{var T=y.getAttribute(a),S=T!==null&&T!=="false",k=(nl.get(y)||0)+1,N=(l.get(y)||0)+1;nl.set(y,k),l.set(y,N),u.push(y),k===1&&S&&nd.set(y,!0),N===1&&y.setAttribute(n,"true"),S||y.setAttribute(a,"true")}catch(_){console.error("aria-hidden: cannot operate on ",y,_)}})};return p(t),f.clear(),fm++,function(){u.forEach(function(g){var y=nl.get(g)-1,T=l.get(g)-1;nl.set(g,y),l.set(g,T),y||(nd.has(g)||g.removeAttribute(a),nd.delete(g)),T||g.removeAttribute(n)}),fm--,fm||(nl=new WeakMap,nl=new WeakMap,nd=new WeakMap,rd={})}},pS=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),s=HR(e);return s?(a.push.apply(a,Array.from(s.querySelectorAll("[aria-live], script"))),FR(a,s,n,"aria-hidden")):function(){return null}},cf="Dialog",[gS,xS]=Cl(cf),[$R,Hr]=gS(cf),bS=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:s,onOpenChange:l,modal:u=!0}=e,f=v.useRef(null),h=v.useRef(null),[m,p]=Dd({prop:a,defaultProp:s??!1,onChange:l,caller:cf});return c.jsx($R,{scope:t,triggerRef:f,contentRef:h,contentId:Wi(),titleId:Wi(),descriptionId:Wi(),open:m,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(g=>!g),[p]),modal:u,children:n})};bS.displayName=cf;var yS="DialogTrigger",ES=v.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Hr(yS,n),l=Mt(t,s.triggerRef);return c.jsx(Ot.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":hg(s.open),...a,ref:l,onClick:xt(e.onClick,s.onOpenToggle)})});ES.displayName=yS;var dg="DialogPortal",[qR,TS]=gS(dg,{forceMount:void 0}),vS=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:s}=e,l=Hr(dg,t);return c.jsx(qR,{scope:t,forceMount:n,children:v.Children.map(a,u=>c.jsx(_l,{present:n||l.open,children:c.jsx(of,{asChild:!0,container:s,children:u})}))})};vS.displayName=dg;var Ld="DialogOverlay",SS=v.forwardRef((e,t)=>{const n=TS(Ld,e.__scopeDialog),{forceMount:a=n.forceMount,...s}=e,l=Hr(Ld,e.__scopeDialog);return l.modal?c.jsx(_l,{present:a||l.open,children:c.jsx(YR,{...s,ref:t})}):null});SS.displayName=Ld;var VR=su("DialogOverlay.RemoveScroll"),YR=v.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Hr(Ld,n);return c.jsx(cg,{as:VR,allowPinchZoom:!0,shards:[s.contentRef],children:c.jsx(Ot.div,{"data-state":hg(s.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),es="DialogContent",kS=v.forwardRef((e,t)=>{const n=TS(es,e.__scopeDialog),{forceMount:a=n.forceMount,...s}=e,l=Hr(es,e.__scopeDialog);return c.jsx(_l,{present:a||l.open,children:l.modal?c.jsx(GR,{...s,ref:t}):c.jsx(XR,{...s,ref:t})})});kS.displayName=es;var GR=v.forwardRef((e,t)=>{const n=Hr(es,e.__scopeDialog),a=v.useRef(null),s=Mt(t,n.contentRef,a);return v.useEffect(()=>{const l=a.current;if(l)return pS(l)},[]),c.jsx(NS,{...e,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xt(e.onCloseAutoFocus,l=>{l.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:xt(e.onPointerDownOutside,l=>{const u=l.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0;(u.button===2||f)&&l.preventDefault()}),onFocusOutside:xt(e.onFocusOutside,l=>l.preventDefault())})}),XR=v.forwardRef((e,t)=>{const n=Hr(es,e.__scopeDialog),a=v.useRef(!1),s=v.useRef(!1);return c.jsx(NS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{e.onCloseAutoFocus?.(l),l.defaultPrevented||(a.current||n.triggerRef.current?.focus(),l.preventDefault()),a.current=!1,s.current=!1},onInteractOutside:l=>{e.onInteractOutside?.(l),l.defaultPrevented||(a.current=!0,l.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const u=l.target;n.triggerRef.current?.contains(u)&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&s.current&&l.preventDefault()}})}),NS=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,...u}=e,f=Hr(es,n),h=v.useRef(null),m=Mt(t,h);return sS(),c.jsxs(c.Fragment,{children:[c.jsx(ug,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:s,onUnmountAutoFocus:l,children:c.jsx(lf,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":hg(f.open),...u,ref:m,onDismiss:()=>f.onOpenChange(!1)})}),c.jsxs(c.Fragment,{children:[c.jsx(WR,{titleId:f.titleId}),c.jsx(ZR,{contentRef:h,descriptionId:f.descriptionId})]})]})}),fg="DialogTitle",CS=v.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Hr(fg,n);return c.jsx(Ot.h2,{id:s.titleId,...a,ref:t})});CS.displayName=fg;var _S="DialogDescription",AS=v.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Hr(_S,n);return c.jsx(Ot.p,{id:s.descriptionId,...a,ref:t})});AS.displayName=_S;var wS="DialogClose",RS=v.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,s=Hr(wS,n);return c.jsx(Ot.button,{type:"button",...a,ref:t,onClick:xt(e.onClick,()=>s.onOpenChange(!1))})});RS.displayName=wS;function hg(e){return e?"open":"closed"}var OS="DialogTitleWarning",[QR,IS]=w4(OS,{contentName:es,titleName:fg,docsSlug:"dialog"}),WR=({titleId:e})=>{const t=IS(OS),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
50
+
51
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
52
+
53
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},KR="DialogDescriptionWarning",ZR=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${IS(KR).contentName}}.`;return v.useEffect(()=>{const s=e.current?.getAttribute("aria-describedby");t&&s&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},JR=bS,eO=ES,tO=vS,nO=SS,rO=kS,aO=CS,iO=AS,DS=RS,LS="AlertDialog",[sO]=Cl(LS,[xS]),Ra=xS(),jS=e=>{const{__scopeAlertDialog:t,...n}=e,a=Ra(t);return c.jsx(JR,{...a,...n,modal:!0})};jS.displayName=LS;var lO="AlertDialogTrigger",oO=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,s=Ra(n);return c.jsx(eO,{...s,...a,ref:t})});oO.displayName=lO;var uO="AlertDialogPortal",MS=e=>{const{__scopeAlertDialog:t,...n}=e,a=Ra(t);return c.jsx(tO,{...a,...n})};MS.displayName=uO;var cO="AlertDialogOverlay",BS=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,s=Ra(n);return c.jsx(nO,{...s,...a,ref:t})});BS.displayName=cO;var hl="AlertDialogContent",[dO,fO]=sO(hl),hO=eS("AlertDialogContent"),PS=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:a,...s}=e,l=Ra(n),u=v.useRef(null),f=Mt(t,u),h=v.useRef(null);return c.jsx(QR,{contentName:hl,titleName:zS,docsSlug:"alert-dialog",children:c.jsx(dO,{scope:n,cancelRef:h,children:c.jsxs(rO,{role:"alertdialog",...l,...s,ref:f,onOpenAutoFocus:xt(s.onOpenAutoFocus,m=>{m.preventDefault(),h.current?.focus({preventScroll:!0})}),onPointerDownOutside:m=>m.preventDefault(),onInteractOutside:m=>m.preventDefault(),children:[c.jsx(hO,{children:a}),c.jsx(pO,{contentRef:u})]})})})});PS.displayName=hl;var zS="AlertDialogTitle",HS=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,s=Ra(n);return c.jsx(aO,{...s,...a,ref:t})});HS.displayName=zS;var US="AlertDialogDescription",FS=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,s=Ra(n);return c.jsx(iO,{...s,...a,ref:t})});FS.displayName=US;var mO="AlertDialogAction",$S=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,s=Ra(n);return c.jsx(DS,{...s,...a,ref:t})});$S.displayName=mO;var qS="AlertDialogCancel",VS=v.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,{cancelRef:s}=fO(qS,n),l=Ra(n),u=Mt(t,s);return c.jsx(DS,{...l,...a,ref:u})});VS.displayName=qS;var pO=({contentRef:e})=>{const t=`\`${hl}\` requires a description for the component to be accessible for screen reader users.
54
+
55
+ You can add a description to the \`${hl}\` by passing a \`${US}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
56
+
57
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${hl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
58
+
59
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return v.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},gO=jS,xO=MS,bO=BS,yO=PS,EO=$S,TO=VS,vO=HS,SO=FS;function kO(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function NO(e){const[t,n]=v.useState(void 0);return _n(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const l=s[0];let u,f;if("borderBoxSize"in l){const h=l.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,f=m.blockSize}else u=e.offsetWidth,f=e.offsetHeight;n({width:u,height:f})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}const CO=["top","right","bottom","left"],hi=Math.min,rr=Math.max,jd=Math.round,ad=Math.floor,Jr=e=>({x:e,y:e}),_O={left:"right",right:"left",bottom:"top",top:"bottom"},AO={start:"end",end:"start"};function Jm(e,t,n){return rr(e,hi(t,n))}function Aa(e,t){return typeof e=="function"?e(t):e}function wa(e){return e.split("-")[0]}function Al(e){return e.split("-")[1]}function mg(e){return e==="x"?"y":"x"}function pg(e){return e==="y"?"height":"width"}const wO=new Set(["top","bottom"]);function Kr(e){return wO.has(wa(e))?"y":"x"}function gg(e){return mg(Kr(e))}function RO(e,t,n){n===void 0&&(n=!1);const a=Al(e),s=gg(e),l=pg(s);let u=s==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=Md(u)),[u,Md(u)]}function OO(e){const t=Md(e);return[ep(e),t,ep(t)]}function ep(e){return e.replace(/start|end/g,t=>AO[t])}const XE=["left","right"],QE=["right","left"],IO=["top","bottom"],DO=["bottom","top"];function LO(e,t,n){switch(e){case"top":case"bottom":return n?t?QE:XE:t?XE:QE;case"left":case"right":return t?IO:DO;default:return[]}}function jO(e,t,n,a){const s=Al(e);let l=LO(wa(e),n==="start",a);return s&&(l=l.map(u=>u+"-"+s),t&&(l=l.concat(l.map(ep)))),l}function Md(e){return e.replace(/left|right|bottom|top/g,t=>_O[t])}function MO(e){return{top:0,right:0,bottom:0,left:0,...e}}function YS(e){return typeof e!="number"?MO(e):{top:e,right:e,bottom:e,left:e}}function Bd(e){const{x:t,y:n,width:a,height:s}=e;return{width:a,height:s,top:n,left:t,right:t+a,bottom:n+s,x:t,y:n}}function WE(e,t,n){let{reference:a,floating:s}=e;const l=Kr(t),u=gg(t),f=pg(u),h=wa(t),m=l==="y",p=a.x+a.width/2-s.width/2,g=a.y+a.height/2-s.height/2,y=a[f]/2-s[f]/2;let T;switch(h){case"top":T={x:p,y:a.y-s.height};break;case"bottom":T={x:p,y:a.y+a.height};break;case"right":T={x:a.x+a.width,y:g};break;case"left":T={x:a.x-s.width,y:g};break;default:T={x:a.x,y:a.y}}switch(Al(t)){case"start":T[u]-=y*(n&&m?-1:1);break;case"end":T[u]+=y*(n&&m?-1:1);break}return T}async function BO(e,t){var n;t===void 0&&(t={});const{x:a,y:s,platform:l,rects:u,elements:f,strategy:h}=e,{boundary:m="clippingAncestors",rootBoundary:p="viewport",elementContext:g="floating",altBoundary:y=!1,padding:T=0}=Aa(t,e),S=YS(T),N=f[y?g==="floating"?"reference":"floating":g],_=Bd(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(N)))==null||n?N:N.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(f.floating)),boundary:m,rootBoundary:p,strategy:h})),A=g==="floating"?{x:a,y:s,width:u.floating.width,height:u.floating.height}:u.reference,w=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f.floating)),P=await(l.isElement==null?void 0:l.isElement(w))?await(l.getScale==null?void 0:l.getScale(w))||{x:1,y:1}:{x:1,y:1},F=Bd(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:A,offsetParent:w,strategy:h}):A);return{top:(_.top-F.top+S.top)/P.y,bottom:(F.bottom-_.bottom+S.bottom)/P.y,left:(_.left-F.left+S.left)/P.x,right:(F.right-_.right+S.right)/P.x}}const PO=async(e,t,n)=>{const{placement:a="bottom",strategy:s="absolute",middleware:l=[],platform:u}=n,f=l.filter(Boolean),h=await(u.isRTL==null?void 0:u.isRTL(t));let m=await u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:g}=WE(m,a,h),y=a,T={},S=0;for(let N=0;N<f.length;N++){var k;const{name:_,fn:A}=f[N],{x:w,y:P,data:F,reset:M}=await A({x:p,y:g,initialPlacement:a,placement:y,strategy:s,middlewareData:T,rects:m,platform:{...u,detectOverflow:(k=u.detectOverflow)!=null?k:BO},elements:{reference:e,floating:t}});p=w??p,g=P??g,T={...T,[_]:{...T[_],...F}},M&&S<=50&&(S++,typeof M=="object"&&(M.placement&&(y=M.placement),M.rects&&(m=M.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:s}):M.rects),{x:p,y:g}=WE(m,y,h)),N=-1)}return{x:p,y:g,placement:y,strategy:s,middlewareData:T}},zO=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:s,rects:l,platform:u,elements:f,middlewareData:h}=t,{element:m,padding:p=0}=Aa(e,t)||{};if(m==null)return{};const g=YS(p),y={x:n,y:a},T=gg(s),S=pg(T),k=await u.getDimensions(m),N=T==="y",_=N?"top":"left",A=N?"bottom":"right",w=N?"clientHeight":"clientWidth",P=l.reference[S]+l.reference[T]-y[T]-l.floating[S],F=y[T]-l.reference[T],M=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let I=M?M[w]:0;(!I||!await(u.isElement==null?void 0:u.isElement(M)))&&(I=f.floating[w]||l.floating[S]);const j=P/2-F/2,G=I/2-k[S]/2-1,B=hi(g[_],G),Q=hi(g[A],G),V=B,te=I-k[S]-Q,ee=I/2-k[S]/2+j,U=Jm(V,ee,te),R=!h.arrow&&Al(s)!=null&&ee!==U&&l.reference[S]/2-(ee<V?B:Q)-k[S]/2<0,q=R?ee<V?ee-V:ee-te:0;return{[T]:y[T]+q,data:{[T]:U,centerOffset:ee-U-q,...R&&{alignmentOffset:q}},reset:R}}}),HO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:s,middlewareData:l,rects:u,initialPlacement:f,platform:h,elements:m}=t,{mainAxis:p=!0,crossAxis:g=!0,fallbackPlacements:y,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0,...N}=Aa(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const _=wa(s),A=Kr(f),w=wa(f)===f,P=await(h.isRTL==null?void 0:h.isRTL(m.floating)),F=y||(w||!k?[Md(f)]:OO(f)),M=S!=="none";!y&&M&&F.push(...jO(f,k,S,P));const I=[f,...F],j=await h.detectOverflow(t,N),G=[];let B=((a=l.flip)==null?void 0:a.overflows)||[];if(p&&G.push(j[_]),g){const ee=RO(s,u,P);G.push(j[ee[0]],j[ee[1]])}if(B=[...B,{placement:s,overflows:G}],!G.every(ee=>ee<=0)){var Q,V;const ee=(((Q=l.flip)==null?void 0:Q.index)||0)+1,U=I[ee];if(U&&(!(g==="alignment"?A!==Kr(U):!1)||B.every(W=>Kr(W.placement)===A?W.overflows[0]>0:!0)))return{data:{index:ee,overflows:B},reset:{placement:U}};let R=(V=B.filter(q=>q.overflows[0]<=0).sort((q,W)=>q.overflows[1]-W.overflows[1])[0])==null?void 0:V.placement;if(!R)switch(T){case"bestFit":{var te;const q=(te=B.filter(W=>{if(M){const he=Kr(W.placement);return he===A||he==="y"}return!0}).map(W=>[W.placement,W.overflows.filter(he=>he>0).reduce((he,O)=>he+O,0)]).sort((W,he)=>W[1]-he[1])[0])==null?void 0:te[0];q&&(R=q);break}case"initialPlacement":R=f;break}if(s!==R)return{reset:{placement:R}}}return{}}}};function KE(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ZE(e){return CO.some(t=>e[t]>=0)}const UO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:a}=t,{strategy:s="referenceHidden",...l}=Aa(e,t);switch(s){case"referenceHidden":{const u=await a.detectOverflow(t,{...l,elementContext:"reference"}),f=KE(u,n.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:ZE(f)}}}case"escaped":{const u=await a.detectOverflow(t,{...l,altBoundary:!0}),f=KE(u,n.floating);return{data:{escapedOffsets:f,escaped:ZE(f)}}}default:return{}}}}},GS=new Set(["left","top"]);async function FO(e,t){const{placement:n,platform:a,elements:s}=e,l=await(a.isRTL==null?void 0:a.isRTL(s.floating)),u=wa(n),f=Al(n),h=Kr(n)==="y",m=GS.has(u)?-1:1,p=l&&h?-1:1,g=Aa(t,e);let{mainAxis:y,crossAxis:T,alignmentAxis:S}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return f&&typeof S=="number"&&(T=f==="end"?S*-1:S),h?{x:T*p,y:y*m}:{x:y*m,y:T*p}}const $O=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:s,y:l,placement:u,middlewareData:f}=t,h=await FO(t,e);return u===((n=f.offset)==null?void 0:n.placement)&&(a=f.arrow)!=null&&a.alignmentOffset?{}:{x:s+h.x,y:l+h.y,data:{...h,placement:u}}}}},qO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:s,platform:l}=t,{mainAxis:u=!0,crossAxis:f=!1,limiter:h={fn:_=>{let{x:A,y:w}=_;return{x:A,y:w}}},...m}=Aa(e,t),p={x:n,y:a},g=await l.detectOverflow(t,m),y=Kr(wa(s)),T=mg(y);let S=p[T],k=p[y];if(u){const _=T==="y"?"top":"left",A=T==="y"?"bottom":"right",w=S+g[_],P=S-g[A];S=Jm(w,S,P)}if(f){const _=y==="y"?"top":"left",A=y==="y"?"bottom":"right",w=k+g[_],P=k-g[A];k=Jm(w,k,P)}const N=h.fn({...t,[T]:S,[y]:k});return{...N,data:{x:N.x-n,y:N.y-a,enabled:{[T]:u,[y]:f}}}}}},VO=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:s,rects:l,middlewareData:u}=t,{offset:f=0,mainAxis:h=!0,crossAxis:m=!0}=Aa(e,t),p={x:n,y:a},g=Kr(s),y=mg(g);let T=p[y],S=p[g];const k=Aa(f,t),N=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(h){const w=y==="y"?"height":"width",P=l.reference[y]-l.floating[w]+N.mainAxis,F=l.reference[y]+l.reference[w]-N.mainAxis;T<P?T=P:T>F&&(T=F)}if(m){var _,A;const w=y==="y"?"width":"height",P=GS.has(wa(s)),F=l.reference[g]-l.floating[w]+(P&&((_=u.offset)==null?void 0:_[g])||0)+(P?0:N.crossAxis),M=l.reference[g]+l.reference[w]+(P?0:((A=u.offset)==null?void 0:A[g])||0)-(P?N.crossAxis:0);S<F?S=F:S>M&&(S=M)}return{[y]:T,[g]:S}}}},YO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:s,rects:l,platform:u,elements:f}=t,{apply:h=()=>{},...m}=Aa(e,t),p=await u.detectOverflow(t,m),g=wa(s),y=Al(s),T=Kr(s)==="y",{width:S,height:k}=l.floating;let N,_;g==="top"||g==="bottom"?(N=g,_=y===(await(u.isRTL==null?void 0:u.isRTL(f.floating))?"start":"end")?"left":"right"):(_=g,N=y==="end"?"top":"bottom");const A=k-p.top-p.bottom,w=S-p.left-p.right,P=hi(k-p[N],A),F=hi(S-p[_],w),M=!t.middlewareData.shift;let I=P,j=F;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=w),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(I=A),M&&!y){const B=rr(p.left,0),Q=rr(p.right,0),V=rr(p.top,0),te=rr(p.bottom,0);T?j=S-2*(B!==0||Q!==0?B+Q:rr(p.left,p.right)):I=k-2*(V!==0||te!==0?V+te:rr(p.top,p.bottom))}await h({...t,availableWidth:j,availableHeight:I});const G=await u.getDimensions(f.floating);return S!==G.width||k!==G.height?{reset:{rects:!0}}:{}}}};function df(){return typeof window<"u"}function wl(e){return XS(e)?(e.nodeName||"").toLowerCase():"#document"}function ir(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function na(e){var t;return(t=(XS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function XS(e){return df()?e instanceof Node||e instanceof ir(e).Node:!1}function Br(e){return df()?e instanceof Element||e instanceof ir(e).Element:!1}function ea(e){return df()?e instanceof HTMLElement||e instanceof ir(e).HTMLElement:!1}function JE(e){return!df()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ir(e).ShadowRoot}const GO=new Set(["inline","contents"]);function ku(e){const{overflow:t,overflowX:n,overflowY:a,display:s}=Pr(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!GO.has(s)}const XO=new Set(["table","td","th"]);function QO(e){return XO.has(wl(e))}const WO=[":popover-open",":modal"];function ff(e){return WO.some(t=>{try{return e.matches(t)}catch{return!1}})}const KO=["transform","translate","scale","rotate","perspective"],ZO=["transform","translate","scale","rotate","perspective","filter"],JO=["paint","layout","strict","content"];function xg(e){const t=bg(),n=Br(e)?Pr(e):e;return KO.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ZO.some(a=>(n.willChange||"").includes(a))||JO.some(a=>(n.contain||"").includes(a))}function eI(e){let t=mi(e);for(;ea(t)&&!yl(t);){if(xg(t))return t;if(ff(t))return null;t=mi(t)}return null}function bg(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tI=new Set(["html","body","#document"]);function yl(e){return tI.has(wl(e))}function Pr(e){return ir(e).getComputedStyle(e)}function hf(e){return Br(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mi(e){if(wl(e)==="html")return e;const t=e.assignedSlot||e.parentNode||JE(e)&&e.host||na(e);return JE(t)?t.host:t}function QS(e){const t=mi(e);return yl(t)?e.ownerDocument?e.ownerDocument.body:e.body:ea(t)&&ku(t)?t:QS(t)}function lu(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=QS(e),l=s===((a=e.ownerDocument)==null?void 0:a.body),u=ir(s);if(l){const f=tp(u);return t.concat(u,u.visualViewport||[],ku(s)?s:[],f&&n?lu(f):[])}return t.concat(s,lu(s,[],n))}function tp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function WS(e){const t=Pr(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const s=ea(e),l=s?e.offsetWidth:n,u=s?e.offsetHeight:a,f=jd(n)!==l||jd(a)!==u;return f&&(n=l,a=u),{width:n,height:a,$:f}}function yg(e){return Br(e)?e:e.contextElement}function ml(e){const t=yg(e);if(!ea(t))return Jr(1);const n=t.getBoundingClientRect(),{width:a,height:s,$:l}=WS(t);let u=(l?jd(n.width):n.width)/a,f=(l?jd(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!f||!Number.isFinite(f))&&(f=1),{x:u,y:f}}const nI=Jr(0);function KS(e){const t=ir(e);return!bg()||!t.visualViewport?nI:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rI(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ir(e)?!1:t}function ts(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),l=yg(e);let u=Jr(1);t&&(a?Br(a)&&(u=ml(a)):u=ml(e));const f=rI(l,n,a)?KS(l):Jr(0);let h=(s.left+f.x)/u.x,m=(s.top+f.y)/u.y,p=s.width/u.x,g=s.height/u.y;if(l){const y=ir(l),T=a&&Br(a)?ir(a):a;let S=y,k=tp(S);for(;k&&a&&T!==S;){const N=ml(k),_=k.getBoundingClientRect(),A=Pr(k),w=_.left+(k.clientLeft+parseFloat(A.paddingLeft))*N.x,P=_.top+(k.clientTop+parseFloat(A.paddingTop))*N.y;h*=N.x,m*=N.y,p*=N.x,g*=N.y,h+=w,m+=P,S=ir(k),k=tp(S)}}return Bd({width:p,height:g,x:h,y:m})}function mf(e,t){const n=hf(e).scrollLeft;return t?t.left+n:ts(na(e)).left+n}function ZS(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-mf(e,n),s=n.top+t.scrollTop;return{x:a,y:s}}function aI(e){let{elements:t,rect:n,offsetParent:a,strategy:s}=e;const l=s==="fixed",u=na(a),f=t?ff(t.floating):!1;if(a===u||f&&l)return n;let h={scrollLeft:0,scrollTop:0},m=Jr(1);const p=Jr(0),g=ea(a);if((g||!g&&!l)&&((wl(a)!=="body"||ku(u))&&(h=hf(a)),ea(a))){const T=ts(a);m=ml(a),p.x=T.x+a.clientLeft,p.y=T.y+a.clientTop}const y=u&&!g&&!l?ZS(u,h):Jr(0);return{width:n.width*m.x,height:n.height*m.y,x:n.x*m.x-h.scrollLeft*m.x+p.x+y.x,y:n.y*m.y-h.scrollTop*m.y+p.y+y.y}}function iI(e){return Array.from(e.getClientRects())}function sI(e){const t=na(e),n=hf(e),a=e.ownerDocument.body,s=rr(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),l=rr(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let u=-n.scrollLeft+mf(e);const f=-n.scrollTop;return Pr(a).direction==="rtl"&&(u+=rr(t.clientWidth,a.clientWidth)-s),{width:s,height:l,x:u,y:f}}const e2=25;function lI(e,t){const n=ir(e),a=na(e),s=n.visualViewport;let l=a.clientWidth,u=a.clientHeight,f=0,h=0;if(s){l=s.width,u=s.height;const p=bg();(!p||p&&t==="fixed")&&(f=s.offsetLeft,h=s.offsetTop)}const m=mf(a);if(m<=0){const p=a.ownerDocument,g=p.body,y=getComputedStyle(g),T=p.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,S=Math.abs(a.clientWidth-g.clientWidth-T);S<=e2&&(l-=S)}else m<=e2&&(l+=m);return{width:l,height:u,x:f,y:h}}const oI=new Set(["absolute","fixed"]);function uI(e,t){const n=ts(e,!0,t==="fixed"),a=n.top+e.clientTop,s=n.left+e.clientLeft,l=ea(e)?ml(e):Jr(1),u=e.clientWidth*l.x,f=e.clientHeight*l.y,h=s*l.x,m=a*l.y;return{width:u,height:f,x:h,y:m}}function t2(e,t,n){let a;if(t==="viewport")a=lI(e,n);else if(t==="document")a=sI(na(e));else if(Br(t))a=uI(t,n);else{const s=KS(e);a={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Bd(a)}function JS(e,t){const n=mi(e);return n===t||!Br(n)||yl(n)?!1:Pr(n).position==="fixed"||JS(n,t)}function cI(e,t){const n=t.get(e);if(n)return n;let a=lu(e,[],!1).filter(f=>Br(f)&&wl(f)!=="body"),s=null;const l=Pr(e).position==="fixed";let u=l?mi(e):e;for(;Br(u)&&!yl(u);){const f=Pr(u),h=xg(u);!h&&f.position==="fixed"&&(s=null),(l?!h&&!s:!h&&f.position==="static"&&!!s&&oI.has(s.position)||ku(u)&&!h&&JS(e,u))?a=a.filter(p=>p!==u):s=f,u=mi(u)}return t.set(e,a),a}function dI(e){let{element:t,boundary:n,rootBoundary:a,strategy:s}=e;const u=[...n==="clippingAncestors"?ff(t)?[]:cI(t,this._c):[].concat(n),a],f=u[0],h=u.reduce((m,p)=>{const g=t2(t,p,s);return m.top=rr(g.top,m.top),m.right=hi(g.right,m.right),m.bottom=hi(g.bottom,m.bottom),m.left=rr(g.left,m.left),m},t2(t,f,s));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function fI(e){const{width:t,height:n}=WS(e);return{width:t,height:n}}function hI(e,t,n){const a=ea(t),s=na(t),l=n==="fixed",u=ts(e,!0,l,t);let f={scrollLeft:0,scrollTop:0};const h=Jr(0);function m(){h.x=mf(s)}if(a||!a&&!l)if((wl(t)!=="body"||ku(s))&&(f=hf(t)),a){const T=ts(t,!0,l,t);h.x=T.x+t.clientLeft,h.y=T.y+t.clientTop}else s&&m();l&&!a&&s&&m();const p=s&&!a&&!l?ZS(s,f):Jr(0),g=u.left+f.scrollLeft-h.x-p.x,y=u.top+f.scrollTop-h.y-p.y;return{x:g,y,width:u.width,height:u.height}}function hm(e){return Pr(e).position==="static"}function n2(e,t){if(!ea(e)||Pr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return na(e)===n&&(n=n.ownerDocument.body),n}function e3(e,t){const n=ir(e);if(ff(e))return n;if(!ea(e)){let s=mi(e);for(;s&&!yl(s);){if(Br(s)&&!hm(s))return s;s=mi(s)}return n}let a=n2(e,t);for(;a&&QO(a)&&hm(a);)a=n2(a,t);return a&&yl(a)&&hm(a)&&!xg(a)?n:a||eI(e)||n}const mI=async function(e){const t=this.getOffsetParent||e3,n=this.getDimensions,a=await n(e.floating);return{reference:hI(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function pI(e){return Pr(e).direction==="rtl"}const gI={convertOffsetParentRelativeRectToViewportRelativeRect:aI,getDocumentElement:na,getClippingRect:dI,getOffsetParent:e3,getElementRects:mI,getClientRects:iI,getDimensions:fI,getScale:ml,isElement:Br,isRTL:pI};function t3(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xI(e,t){let n=null,a;const s=na(e);function l(){var f;clearTimeout(a),(f=n)==null||f.disconnect(),n=null}function u(f,h){f===void 0&&(f=!1),h===void 0&&(h=1),l();const m=e.getBoundingClientRect(),{left:p,top:g,width:y,height:T}=m;if(f||t(),!y||!T)return;const S=ad(g),k=ad(s.clientWidth-(p+y)),N=ad(s.clientHeight-(g+T)),_=ad(p),w={rootMargin:-S+"px "+-k+"px "+-N+"px "+-_+"px",threshold:rr(0,hi(1,h))||1};let P=!0;function F(M){const I=M[0].intersectionRatio;if(I!==h){if(!P)return u();I?u(!1,I):a=setTimeout(()=>{u(!1,1e-7)},1e3)}I===1&&!t3(m,e.getBoundingClientRect())&&u(),P=!1}try{n=new IntersectionObserver(F,{...w,root:s.ownerDocument})}catch{n=new IntersectionObserver(F,w)}n.observe(e)}return u(!0),l}function bI(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:h=!1}=a,m=yg(e),p=s||l?[...m?lu(m):[],...lu(t)]:[];p.forEach(_=>{s&&_.addEventListener("scroll",n,{passive:!0}),l&&_.addEventListener("resize",n)});const g=m&&f?xI(m,n):null;let y=-1,T=null;u&&(T=new ResizeObserver(_=>{let[A]=_;A&&A.target===m&&T&&(T.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var w;(w=T)==null||w.observe(t)})),n()}),m&&!h&&T.observe(m),T.observe(t));let S,k=h?ts(e):null;h&&N();function N(){const _=ts(e);k&&!t3(k,_)&&n(),k=_,S=requestAnimationFrame(N)}return n(),()=>{var _;p.forEach(A=>{s&&A.removeEventListener("scroll",n),l&&A.removeEventListener("resize",n)}),g?.(),(_=T)==null||_.disconnect(),T=null,h&&cancelAnimationFrame(S)}}const yI=$O,EI=qO,TI=HO,vI=YO,SI=UO,r2=zO,kI=VO,NI=(e,t,n)=>{const a=new Map,s={platform:gI,...n},l={...s.platform,_c:a};return PO(e,t,{...s,platform:l})};var CI=typeof document<"u",_I=function(){},kd=CI?v.useLayoutEffect:_I;function Pd(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,a,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!Pd(e[a],t[a]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){const l=s[a];if(!(l==="_owner"&&e.$$typeof)&&!Pd(e[l],t[l]))return!1}return!0}return e!==e&&t!==t}function n3(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function a2(e,t){const n=n3(e);return Math.round(t*n)/n}function mm(e){const t=v.useRef(e);return kd(()=>{t.current=e}),t}function AI(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:s,elements:{reference:l,floating:u}={},transform:f=!0,whileElementsMounted:h,open:m}=e,[p,g]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,T]=v.useState(a);Pd(y,a)||T(a);const[S,k]=v.useState(null),[N,_]=v.useState(null),A=v.useCallback(W=>{W!==M.current&&(M.current=W,k(W))},[]),w=v.useCallback(W=>{W!==I.current&&(I.current=W,_(W))},[]),P=l||S,F=u||N,M=v.useRef(null),I=v.useRef(null),j=v.useRef(p),G=h!=null,B=mm(h),Q=mm(s),V=mm(m),te=v.useCallback(()=>{if(!M.current||!I.current)return;const W={placement:t,strategy:n,middleware:y};Q.current&&(W.platform=Q.current),NI(M.current,I.current,W).then(he=>{const O={...he,isPositioned:V.current!==!1};ee.current&&!Pd(j.current,O)&&(j.current=O,Nl.flushSync(()=>{g(O)}))})},[y,t,n,Q,V]);kd(()=>{m===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,g(W=>({...W,isPositioned:!1})))},[m]);const ee=v.useRef(!1);kd(()=>(ee.current=!0,()=>{ee.current=!1}),[]),kd(()=>{if(P&&(M.current=P),F&&(I.current=F),P&&F){if(B.current)return B.current(P,F,te);te()}},[P,F,te,B,G]);const U=v.useMemo(()=>({reference:M,floating:I,setReference:A,setFloating:w}),[A,w]),R=v.useMemo(()=>({reference:P,floating:F}),[P,F]),q=v.useMemo(()=>{const W={position:n,left:0,top:0};if(!R.floating)return W;const he=a2(R.floating,p.x),O=a2(R.floating,p.y);return f?{...W,transform:"translate("+he+"px, "+O+"px)",...n3(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:he,top:O}},[n,f,R.floating,p.x,p.y]);return v.useMemo(()=>({...p,update:te,refs:U,elements:R,floatingStyles:q}),[p,te,U,R,q])}const wI=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:s}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?r2({element:a.current,padding:s}).fn(n):{}:a?r2({element:a,padding:s}).fn(n):{}}}},RI=(e,t)=>({...yI(e),options:[e,t]}),OI=(e,t)=>({...EI(e),options:[e,t]}),II=(e,t)=>({...kI(e),options:[e,t]}),DI=(e,t)=>({...TI(e),options:[e,t]}),LI=(e,t)=>({...vI(e),options:[e,t]}),jI=(e,t)=>({...SI(e),options:[e,t]}),MI=(e,t)=>({...wI(e),options:[e,t]});var BI="Arrow",r3=v.forwardRef((e,t)=>{const{children:n,width:a=10,height:s=5,...l}=e;return c.jsx(Ot.svg,{...l,ref:t,width:a,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});r3.displayName=BI;var PI=r3,Eg="Popper",[a3,pf]=Cl(Eg),[zI,i3]=a3(Eg),s3=e=>{const{__scopePopper:t,children:n}=e,[a,s]=v.useState(null);return c.jsx(zI,{scope:t,anchor:a,onAnchorChange:s,children:n})};s3.displayName=Eg;var l3="PopperAnchor",o3=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...s}=e,l=i3(l3,n),u=v.useRef(null),f=Mt(t,u),h=v.useRef(null);return v.useEffect(()=>{const m=h.current;h.current=a?.current||u.current,m!==h.current&&l.onAnchorChange(h.current)}),a?null:c.jsx(Ot.div,{...s,ref:f})});o3.displayName=l3;var Tg="PopperContent",[HI,UI]=a3(Tg),u3=v.forwardRef((e,t)=>{const{__scopePopper:n,side:a="bottom",sideOffset:s=0,align:l="center",alignOffset:u=0,arrowPadding:f=0,avoidCollisions:h=!0,collisionBoundary:m=[],collisionPadding:p=0,sticky:g="partial",hideWhenDetached:y=!1,updatePositionStrategy:T="optimized",onPlaced:S,...k}=e,N=i3(Tg,n),[_,A]=v.useState(null),w=Mt(t,ge=>A(ge)),[P,F]=v.useState(null),M=NO(P),I=M?.width??0,j=M?.height??0,G=a+(l!=="center"?"-"+l:""),B=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},Q=Array.isArray(m)?m:[m],V=Q.length>0,te={padding:B,boundary:Q.filter($I),altBoundary:V},{refs:ee,floatingStyles:U,placement:R,isPositioned:q,middlewareData:W}=AI({strategy:"fixed",placement:G,whileElementsMounted:(...ge)=>bI(...ge,{animationFrame:T==="always"}),elements:{reference:N.anchor},middleware:[RI({mainAxis:s+j,alignmentAxis:u}),h&&OI({mainAxis:!0,crossAxis:!1,limiter:g==="partial"?II():void 0,...te}),h&&DI({...te}),LI({...te,apply:({elements:ge,rects:ue,availableWidth:xe,availableHeight:Ae})=>{const{width:Le,height:Fe}=ue.reference,$e=ge.floating.style;$e.setProperty("--radix-popper-available-width",`${xe}px`),$e.setProperty("--radix-popper-available-height",`${Ae}px`),$e.setProperty("--radix-popper-anchor-width",`${Le}px`),$e.setProperty("--radix-popper-anchor-height",`${Fe}px`)}}),P&&MI({element:P,padding:f}),qI({arrowWidth:I,arrowHeight:j}),y&&jI({strategy:"referenceHidden",...te})]}),[he,O]=f3(R),H=Ji(S);_n(()=>{q&&H?.()},[q,H]);const Z=W.arrow?.x,L=W.arrow?.y,fe=W.arrow?.centerOffset!==0,[Ne,ve]=v.useState();return _n(()=>{_&&ve(window.getComputedStyle(_).zIndex)},[_]),c.jsx("div",{ref:ee.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:q?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ne,"--radix-popper-transform-origin":[W.transformOrigin?.x,W.transformOrigin?.y].join(" "),...W.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(HI,{scope:n,placedSide:he,onArrowChange:F,arrowX:Z,arrowY:L,shouldHideArrow:fe,children:c.jsx(Ot.div,{"data-side":he,"data-align":O,...k,ref:w,style:{...k.style,animation:q?void 0:"none"}})})})});u3.displayName=Tg;var c3="PopperArrow",FI={top:"bottom",right:"left",bottom:"top",left:"right"},d3=v.forwardRef(function(t,n){const{__scopePopper:a,...s}=t,l=UI(c3,a),u=FI[l.placedSide];return c.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:c.jsx(PI,{...s,ref:n,style:{...s.style,display:"block"}})})});d3.displayName=c3;function $I(e){return e!==null}var qI=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:a,middlewareData:s}=t,u=s.arrow?.centerOffset!==0,f=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[m,p]=f3(n),g={start:"0%",center:"50%",end:"100%"}[p],y=(s.arrow?.x??0)+f/2,T=(s.arrow?.y??0)+h/2;let S="",k="";return m==="bottom"?(S=u?g:`${y}px`,k=`${-h}px`):m==="top"?(S=u?g:`${y}px`,k=`${a.floating.height+h}px`):m==="right"?(S=`${-h}px`,k=u?g:`${T}px`):m==="left"&&(S=`${a.floating.width+h}px`,k=u?g:`${T}px`),{data:{x:S,y:k}}}});function f3(e){const[t,n="center"]=e.split("-");return[t,n]}var h3=s3,m3=o3,p3=u3,g3=d3;function i2(e,[t,n]){return Math.min(n,Math.max(t,e))}var VI=[" ","Enter","ArrowUp","ArrowDown"],YI=[" ","Enter"],ns="Select",[gf,xf,GI]=O4(ns),[Rl]=Cl(ns,[GI,pf]),bf=pf(),[XI,bi]=Rl(ns),[QI,WI]=Rl(ns),x3=e=>{const{__scopeSelect:t,children:n,open:a,defaultOpen:s,onOpenChange:l,value:u,defaultValue:f,onValueChange:h,dir:m,name:p,autoComplete:g,disabled:y,required:T,form:S}=e,k=bf(t),[N,_]=v.useState(null),[A,w]=v.useState(null),[P,F]=v.useState(!1),M=U4(m),[I,j]=Dd({prop:a,defaultProp:s??!1,onChange:l,caller:ns}),[G,B]=Dd({prop:u,defaultProp:f,onChange:h,caller:ns}),Q=v.useRef(null),V=N?S||!!N.closest("form"):!0,[te,ee]=v.useState(new Set),U=Array.from(te).map(R=>R.props.value).join(";");return c.jsx(h3,{...k,children:c.jsxs(XI,{required:T,scope:t,trigger:N,onTriggerChange:_,valueNode:A,onValueNodeChange:w,valueNodeHasChildren:P,onValueNodeHasChildrenChange:F,contentId:Wi(),value:G,onValueChange:B,open:I,onOpenChange:j,dir:M,triggerPointerDownPosRef:Q,disabled:y,children:[c.jsx(gf.Provider,{scope:t,children:c.jsx(QI,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback(R=>{ee(q=>new Set(q).add(R))},[]),onNativeOptionRemove:v.useCallback(R=>{ee(q=>{const W=new Set(q);return W.delete(R),W})},[]),children:n})}),V?c.jsxs(z3,{"aria-hidden":!0,required:T,tabIndex:-1,name:p,autoComplete:g,value:G,onChange:R=>B(R.target.value),disabled:y,form:S,children:[G===void 0?c.jsx("option",{value:""}):null,Array.from(te)]},U):null]})})};x3.displayName=ns;var b3="SelectTrigger",y3=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...s}=e,l=bf(n),u=bi(b3,n),f=u.disabled||a,h=Mt(t,u.onTriggerChange),m=xf(n),p=v.useRef("touch"),[g,y,T]=U3(k=>{const N=m().filter(w=>!w.disabled),_=N.find(w=>w.value===u.value),A=F3(N,k,_);A!==void 0&&u.onValueChange(A.value)}),S=k=>{f||(u.onOpenChange(!0),T()),k&&(u.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})};return c.jsx(m3,{asChild:!0,...l,children:c.jsx(Ot.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":H3(u.value)?"":void 0,...s,ref:h,onClick:xt(s.onClick,k=>{k.currentTarget.focus(),p.current!=="mouse"&&S(k)}),onPointerDown:xt(s.onPointerDown,k=>{p.current=k.pointerType;const N=k.target;N.hasPointerCapture(k.pointerId)&&N.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(S(k),k.preventDefault())}),onKeyDown:xt(s.onKeyDown,k=>{const N=g.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&y(k.key),!(N&&k.key===" ")&&VI.includes(k.key)&&(S(),k.preventDefault())})})})});y3.displayName=b3;var E3="SelectValue",T3=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,children:l,placeholder:u="",...f}=e,h=bi(E3,n),{onValueNodeHasChildrenChange:m}=h,p=l!==void 0,g=Mt(t,h.onValueNodeChange);return _n(()=>{m(p)},[m,p]),c.jsx(Ot.span,{...f,ref:g,style:{pointerEvents:"none"},children:H3(h.value)?c.jsx(c.Fragment,{children:u}):l})});T3.displayName=E3;var KI="SelectIcon",v3=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...s}=e;return c.jsx(Ot.span,{"aria-hidden":!0,...s,ref:t,children:a||"▼"})});v3.displayName=KI;var ZI="SelectPortal",S3=e=>c.jsx(of,{asChild:!0,...e});S3.displayName=ZI;var rs="SelectContent",k3=v.forwardRef((e,t)=>{const n=bi(rs,e.__scopeSelect),[a,s]=v.useState();if(_n(()=>{s(new DocumentFragment)},[]),!n.open){const l=a;return l?Nl.createPortal(c.jsx(N3,{scope:e.__scopeSelect,children:c.jsx(gf.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),l):null}return c.jsx(C3,{...e,ref:t})});k3.displayName=rs;var Ir=10,[N3,yi]=Rl(rs),JI="SelectContentImpl",eD=su("SelectContent.RemoveScroll"),C3=v.forwardRef((e,t)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:l,onPointerDownOutside:u,side:f,sideOffset:h,align:m,alignOffset:p,arrowPadding:g,collisionBoundary:y,collisionPadding:T,sticky:S,hideWhenDetached:k,avoidCollisions:N,..._}=e,A=bi(rs,n),[w,P]=v.useState(null),[F,M]=v.useState(null),I=Mt(t,ge=>P(ge)),[j,G]=v.useState(null),[B,Q]=v.useState(null),V=xf(n),[te,ee]=v.useState(!1),U=v.useRef(!1);v.useEffect(()=>{if(w)return pS(w)},[w]),sS();const R=v.useCallback(ge=>{const[ue,...xe]=V().map(Fe=>Fe.ref.current),[Ae]=xe.slice(-1),Le=document.activeElement;for(const Fe of ge)if(Fe===Le||(Fe?.scrollIntoView({block:"nearest"}),Fe===ue&&F&&(F.scrollTop=0),Fe===Ae&&F&&(F.scrollTop=F.scrollHeight),Fe?.focus(),document.activeElement!==Le))return},[V,F]),q=v.useCallback(()=>R([j,w]),[R,j,w]);v.useEffect(()=>{te&&q()},[te,q]);const{onOpenChange:W,triggerPointerDownPosRef:he}=A;v.useEffect(()=>{if(w){let ge={x:0,y:0};const ue=Ae=>{ge={x:Math.abs(Math.round(Ae.pageX)-(he.current?.x??0)),y:Math.abs(Math.round(Ae.pageY)-(he.current?.y??0))}},xe=Ae=>{ge.x<=10&&ge.y<=10?Ae.preventDefault():w.contains(Ae.target)||W(!1),document.removeEventListener("pointermove",ue),he.current=null};return he.current!==null&&(document.addEventListener("pointermove",ue),document.addEventListener("pointerup",xe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ue),document.removeEventListener("pointerup",xe,{capture:!0})}}},[w,W,he]),v.useEffect(()=>{const ge=()=>W(!1);return window.addEventListener("blur",ge),window.addEventListener("resize",ge),()=>{window.removeEventListener("blur",ge),window.removeEventListener("resize",ge)}},[W]);const[O,H]=U3(ge=>{const ue=V().filter(Le=>!Le.disabled),xe=ue.find(Le=>Le.ref.current===document.activeElement),Ae=F3(ue,ge,xe);Ae&&setTimeout(()=>Ae.ref.current.focus())}),Z=v.useCallback((ge,ue,xe)=>{const Ae=!U.current&&!xe;(A.value!==void 0&&A.value===ue||Ae)&&(G(ge),Ae&&(U.current=!0))},[A.value]),L=v.useCallback(()=>w?.focus(),[w]),fe=v.useCallback((ge,ue,xe)=>{const Ae=!U.current&&!xe;(A.value!==void 0&&A.value===ue||Ae)&&Q(ge)},[A.value]),Ne=a==="popper"?np:_3,ve=Ne===np?{side:f,sideOffset:h,align:m,alignOffset:p,arrowPadding:g,collisionBoundary:y,collisionPadding:T,sticky:S,hideWhenDetached:k,avoidCollisions:N}:{};return c.jsx(N3,{scope:n,content:w,viewport:F,onViewportChange:M,itemRefCallback:Z,selectedItem:j,onItemLeave:L,itemTextRefCallback:fe,focusSelectedItem:q,selectedItemText:B,position:a,isPositioned:te,searchRef:O,children:c.jsx(cg,{as:eD,allowPinchZoom:!0,children:c.jsx(ug,{asChild:!0,trapped:A.open,onMountAutoFocus:ge=>{ge.preventDefault()},onUnmountAutoFocus:xt(s,ge=>{A.trigger?.focus({preventScroll:!0}),ge.preventDefault()}),children:c.jsx(lf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:ge=>ge.preventDefault(),onDismiss:()=>A.onOpenChange(!1),children:c.jsx(Ne,{role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:ge=>ge.preventDefault(),..._,...ve,onPlaced:()=>ee(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",..._.style},onKeyDown:xt(_.onKeyDown,ge=>{const ue=ge.ctrlKey||ge.altKey||ge.metaKey;if(ge.key==="Tab"&&ge.preventDefault(),!ue&&ge.key.length===1&&H(ge.key),["ArrowUp","ArrowDown","Home","End"].includes(ge.key)){let Ae=V().filter(Le=>!Le.disabled).map(Le=>Le.ref.current);if(["ArrowUp","End"].includes(ge.key)&&(Ae=Ae.slice().reverse()),["ArrowUp","ArrowDown"].includes(ge.key)){const Le=ge.target,Fe=Ae.indexOf(Le);Ae=Ae.slice(Fe+1)}setTimeout(()=>R(Ae)),ge.preventDefault()}})})})})})})});C3.displayName=JI;var tD="SelectItemAlignedPosition",_3=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...s}=e,l=bi(rs,n),u=yi(rs,n),[f,h]=v.useState(null),[m,p]=v.useState(null),g=Mt(t,I=>p(I)),y=xf(n),T=v.useRef(!1),S=v.useRef(!0),{viewport:k,selectedItem:N,selectedItemText:_,focusSelectedItem:A}=u,w=v.useCallback(()=>{if(l.trigger&&l.valueNode&&f&&m&&k&&N&&_){const I=l.trigger.getBoundingClientRect(),j=m.getBoundingClientRect(),G=l.valueNode.getBoundingClientRect(),B=_.getBoundingClientRect();if(l.dir!=="rtl"){const Le=B.left-j.left,Fe=G.left-Le,$e=I.left-Fe,pe=I.width+$e,Ee=Math.max(pe,j.width),we=window.innerWidth-Ir,qe=i2(Fe,[Ir,Math.max(Ir,we-Ee)]);f.style.minWidth=pe+"px",f.style.left=qe+"px"}else{const Le=j.right-B.right,Fe=window.innerWidth-G.right-Le,$e=window.innerWidth-I.right-Fe,pe=I.width+$e,Ee=Math.max(pe,j.width),we=window.innerWidth-Ir,qe=i2(Fe,[Ir,Math.max(Ir,we-Ee)]);f.style.minWidth=pe+"px",f.style.right=qe+"px"}const Q=y(),V=window.innerHeight-Ir*2,te=k.scrollHeight,ee=window.getComputedStyle(m),U=parseInt(ee.borderTopWidth,10),R=parseInt(ee.paddingTop,10),q=parseInt(ee.borderBottomWidth,10),W=parseInt(ee.paddingBottom,10),he=U+R+te+W+q,O=Math.min(N.offsetHeight*5,he),H=window.getComputedStyle(k),Z=parseInt(H.paddingTop,10),L=parseInt(H.paddingBottom,10),fe=I.top+I.height/2-Ir,Ne=V-fe,ve=N.offsetHeight/2,ge=N.offsetTop+ve,ue=U+R+ge,xe=he-ue;if(ue<=fe){const Le=Q.length>0&&N===Q[Q.length-1].ref.current;f.style.bottom="0px";const Fe=m.clientHeight-k.offsetTop-k.offsetHeight,$e=Math.max(Ne,ve+(Le?L:0)+Fe+q),pe=ue+$e;f.style.height=pe+"px"}else{const Le=Q.length>0&&N===Q[0].ref.current;f.style.top="0px";const $e=Math.max(fe,U+k.offsetTop+(Le?Z:0)+ve)+xe;f.style.height=$e+"px",k.scrollTop=ue-fe+k.offsetTop}f.style.margin=`${Ir}px 0`,f.style.minHeight=O+"px",f.style.maxHeight=V+"px",a?.(),requestAnimationFrame(()=>T.current=!0)}},[y,l.trigger,l.valueNode,f,m,k,N,_,l.dir,a]);_n(()=>w(),[w]);const[P,F]=v.useState();_n(()=>{m&&F(window.getComputedStyle(m).zIndex)},[m]);const M=v.useCallback(I=>{I&&S.current===!0&&(w(),A?.(),S.current=!1)},[w,A]);return c.jsx(rD,{scope:n,contentWrapper:f,shouldExpandOnScrollRef:T,onScrollButtonChange:M,children:c.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:c.jsx(Ot.div,{...s,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});_3.displayName=tD;var nD="SelectPopperPosition",np=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:s=Ir,...l}=e,u=bf(n);return c.jsx(p3,{...u,...l,ref:t,align:a,collisionPadding:s,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});np.displayName=nD;var[rD,vg]=Rl(rs,{}),rp="SelectViewport",A3=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...s}=e,l=yi(rp,n),u=vg(rp,n),f=Mt(t,l.onViewportChange),h=v.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),c.jsx(gf.Slot,{scope:n,children:c.jsx(Ot.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:xt(s.onScroll,m=>{const p=m.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:y}=u;if(y?.current&&g){const T=Math.abs(h.current-p.scrollTop);if(T>0){const S=window.innerHeight-Ir*2,k=parseFloat(g.style.minHeight),N=parseFloat(g.style.height),_=Math.max(k,N);if(_<S){const A=_+T,w=Math.min(S,A),P=A-w;g.style.height=w+"px",g.style.bottom==="0px"&&(p.scrollTop=P>0?P:0,g.style.justifyContent="flex-end")}}}h.current=p.scrollTop})})})]})});A3.displayName=rp;var w3="SelectGroup",[aD,iD]=Rl(w3),sD=v.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=Wi();return c.jsx(aD,{scope:n,id:s,children:c.jsx(Ot.div,{role:"group","aria-labelledby":s,...a,ref:t})})});sD.displayName=w3;var R3="SelectLabel",lD=v.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=iD(R3,n);return c.jsx(Ot.div,{id:s.id,...a,ref:t})});lD.displayName=R3;var zd="SelectItem",[oD,O3]=Rl(zd),I3=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:s=!1,textValue:l,...u}=e,f=bi(zd,n),h=yi(zd,n),m=f.value===a,[p,g]=v.useState(l??""),[y,T]=v.useState(!1),S=Mt(t,A=>h.itemRefCallback?.(A,a,s)),k=Wi(),N=v.useRef("touch"),_=()=>{s||(f.onValueChange(a),f.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(oD,{scope:n,value:a,disabled:s,textId:k,isSelected:m,onItemTextChange:v.useCallback(A=>{g(w=>w||(A?.textContent??"").trim())},[]),children:c.jsx(gf.ItemSlot,{scope:n,value:a,disabled:s,textValue:p,children:c.jsx(Ot.div,{role:"option","aria-labelledby":k,"data-highlighted":y?"":void 0,"aria-selected":m&&y,"data-state":m?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...u,ref:S,onFocus:xt(u.onFocus,()=>T(!0)),onBlur:xt(u.onBlur,()=>T(!1)),onClick:xt(u.onClick,()=>{N.current!=="mouse"&&_()}),onPointerUp:xt(u.onPointerUp,()=>{N.current==="mouse"&&_()}),onPointerDown:xt(u.onPointerDown,A=>{N.current=A.pointerType}),onPointerMove:xt(u.onPointerMove,A=>{N.current=A.pointerType,s?h.onItemLeave?.():N.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:xt(u.onPointerLeave,A=>{A.currentTarget===document.activeElement&&h.onItemLeave?.()}),onKeyDown:xt(u.onKeyDown,A=>{h.searchRef?.current!==""&&A.key===" "||(YI.includes(A.key)&&_(),A.key===" "&&A.preventDefault())})})})})});I3.displayName=zd;var $o="SelectItemText",D3=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:s,...l}=e,u=bi($o,n),f=yi($o,n),h=O3($o,n),m=WI($o,n),[p,g]=v.useState(null),y=Mt(t,_=>g(_),h.onItemTextChange,_=>f.itemTextRefCallback?.(_,h.value,h.disabled)),T=p?.textContent,S=v.useMemo(()=>c.jsx("option",{value:h.value,disabled:h.disabled,children:T},h.value),[h.disabled,h.value,T]),{onNativeOptionAdd:k,onNativeOptionRemove:N}=m;return _n(()=>(k(S),()=>N(S)),[k,N,S]),c.jsxs(c.Fragment,{children:[c.jsx(Ot.span,{id:h.textId,...l,ref:y}),h.isSelected&&u.valueNode&&!u.valueNodeHasChildren?Nl.createPortal(l.children,u.valueNode):null]})});D3.displayName=$o;var L3="SelectItemIndicator",j3=v.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return O3(L3,n).isSelected?c.jsx(Ot.span,{"aria-hidden":!0,...a,ref:t}):null});j3.displayName=L3;var ap="SelectScrollUpButton",M3=v.forwardRef((e,t)=>{const n=yi(ap,e.__scopeSelect),a=vg(ap,e.__scopeSelect),[s,l]=v.useState(!1),u=Mt(t,a.onScrollButtonChange);return _n(()=>{if(n.viewport&&n.isPositioned){let f=function(){const m=h.scrollTop>0;l(m)};const h=n.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),s?c.jsx(P3,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=n;f&&h&&(f.scrollTop=f.scrollTop-h.offsetHeight)}}):null});M3.displayName=ap;var ip="SelectScrollDownButton",B3=v.forwardRef((e,t)=>{const n=yi(ip,e.__scopeSelect),a=vg(ip,e.__scopeSelect),[s,l]=v.useState(!1),u=Mt(t,a.onScrollButtonChange);return _n(()=>{if(n.viewport&&n.isPositioned){let f=function(){const m=h.scrollHeight-h.clientHeight,p=Math.ceil(h.scrollTop)<m;l(p)};const h=n.viewport;return f(),h.addEventListener("scroll",f),()=>h.removeEventListener("scroll",f)}},[n.viewport,n.isPositioned]),s?c.jsx(P3,{...e,ref:u,onAutoScroll:()=>{const{viewport:f,selectedItem:h}=n;f&&h&&(f.scrollTop=f.scrollTop+h.offsetHeight)}}):null});B3.displayName=ip;var P3=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...s}=e,l=yi("SelectScrollButton",n),u=v.useRef(null),f=xf(n),h=v.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return v.useEffect(()=>()=>h(),[h]),_n(()=>{f().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),c.jsx(Ot.div,{"aria-hidden":!0,...s,ref:t,style:{flexShrink:0,...s.style},onPointerDown:xt(s.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(a,50))}),onPointerMove:xt(s.onPointerMove,()=>{l.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(a,50))}),onPointerLeave:xt(s.onPointerLeave,()=>{h()})})}),uD="SelectSeparator",cD=v.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return c.jsx(Ot.div,{"aria-hidden":!0,...a,ref:t})});cD.displayName=uD;var sp="SelectArrow",dD=v.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,s=bf(n),l=bi(sp,n),u=yi(sp,n);return l.open&&u.position==="popper"?c.jsx(g3,{...s,...a,ref:t}):null});dD.displayName=sp;var fD="SelectBubbleInput",z3=v.forwardRef(({__scopeSelect:e,value:t,...n},a)=>{const s=v.useRef(null),l=Mt(a,s),u=kO(t);return v.useEffect(()=>{const f=s.current;if(!f)return;const h=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(h,"value").set;if(u!==t&&p){const g=new Event("change",{bubbles:!0});p.call(f,t),f.dispatchEvent(g)}},[u,t]),c.jsx(Ot.select,{...n,style:{...tS,...n.style},ref:l,defaultValue:t})});z3.displayName=fD;function H3(e){return e===""||e===void 0}function U3(e){const t=Ji(e),n=v.useRef(""),a=v.useRef(0),s=v.useCallback(u=>{const f=n.current+u;t(f),(function h(m){n.current=m,window.clearTimeout(a.current),m!==""&&(a.current=window.setTimeout(()=>h(""),1e3))})(f)},[t]),l=v.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,s,l]}function F3(e,t,n){const s=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,l=n?e.indexOf(n):-1;let u=hD(e,Math.max(l,0));s.length===1&&(u=u.filter(m=>m!==n));const h=u.find(m=>m.textValue.toLowerCase().startsWith(s.toLowerCase()));return h!==n?h:void 0}function hD(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var mD=x3,pD=y3,gD=T3,xD=v3,bD=S3,yD=k3,ED=A3,TD=I3,vD=D3,SD=j3,kD=M3,ND=B3,[yf]=Cl("Tooltip",[pf]),Ef=pf(),$3="TooltipProvider",CD=700,lp="tooltip.open",[_D,Sg]=yf($3),q3=e=>{const{__scopeTooltip:t,delayDuration:n=CD,skipDelayDuration:a=300,disableHoverableContent:s=!1,children:l}=e,u=v.useRef(!0),f=v.useRef(!1),h=v.useRef(0);return v.useEffect(()=>{const m=h.current;return()=>window.clearTimeout(m)},[]),c.jsx(_D,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:v.useCallback(()=>{window.clearTimeout(h.current),u.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.current=!0,a)},[a]),isPointerInTransitRef:f,onPointerInTransitChange:v.useCallback(m=>{f.current=m},[]),disableHoverableContent:s,children:l})};q3.displayName=$3;var ou="Tooltip",[AD,Nu]=yf(ou),V3=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:s,onOpenChange:l,disableHoverableContent:u,delayDuration:f}=e,h=Sg(ou,e.__scopeTooltip),m=Ef(t),[p,g]=v.useState(null),y=Wi(),T=v.useRef(0),S=u??h.disableHoverableContent,k=f??h.delayDuration,N=v.useRef(!1),[_,A]=Dd({prop:a,defaultProp:s??!1,onChange:I=>{I?(h.onOpen(),document.dispatchEvent(new CustomEvent(lp))):h.onClose(),l?.(I)},caller:ou}),w=v.useMemo(()=>_?N.current?"delayed-open":"instant-open":"closed",[_]),P=v.useCallback(()=>{window.clearTimeout(T.current),T.current=0,N.current=!1,A(!0)},[A]),F=v.useCallback(()=>{window.clearTimeout(T.current),T.current=0,A(!1)},[A]),M=v.useCallback(()=>{window.clearTimeout(T.current),T.current=window.setTimeout(()=>{N.current=!0,A(!0),T.current=0},k)},[k,A]);return v.useEffect(()=>()=>{T.current&&(window.clearTimeout(T.current),T.current=0)},[]),c.jsx(h3,{...m,children:c.jsx(AD,{scope:t,contentId:y,open:_,stateAttribute:w,trigger:p,onTriggerChange:g,onTriggerEnter:v.useCallback(()=>{h.isOpenDelayedRef.current?M():P()},[h.isOpenDelayedRef,M,P]),onTriggerLeave:v.useCallback(()=>{S?F():(window.clearTimeout(T.current),T.current=0)},[F,S]),onOpen:P,onClose:F,disableHoverableContent:S,children:n})})};V3.displayName=ou;var op="TooltipTrigger",Y3=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=Nu(op,n),l=Sg(op,n),u=Ef(n),f=v.useRef(null),h=Mt(t,f,s.onTriggerChange),m=v.useRef(!1),p=v.useRef(!1),g=v.useCallback(()=>m.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",g),[g]),c.jsx(m3,{asChild:!0,...u,children:c.jsx(Ot.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...a,ref:h,onPointerMove:xt(e.onPointerMove,y=>{y.pointerType!=="touch"&&!p.current&&!l.isPointerInTransitRef.current&&(s.onTriggerEnter(),p.current=!0)}),onPointerLeave:xt(e.onPointerLeave,()=>{s.onTriggerLeave(),p.current=!1}),onPointerDown:xt(e.onPointerDown,()=>{s.open&&s.onClose(),m.current=!0,document.addEventListener("pointerup",g,{once:!0})}),onFocus:xt(e.onFocus,()=>{m.current||s.onOpen()}),onBlur:xt(e.onBlur,s.onClose),onClick:xt(e.onClick,s.onClose)})})});Y3.displayName=op;var kg="TooltipPortal",[wD,RD]=yf(kg,{forceMount:void 0}),G3=e=>{const{__scopeTooltip:t,forceMount:n,children:a,container:s}=e,l=Nu(kg,t);return c.jsx(wD,{scope:t,forceMount:n,children:c.jsx(_l,{present:n||l.open,children:c.jsx(of,{asChild:!0,container:s,children:a})})})};G3.displayName=kg;var El="TooltipContent",X3=v.forwardRef((e,t)=>{const n=RD(El,e.__scopeTooltip),{forceMount:a=n.forceMount,side:s="top",...l}=e,u=Nu(El,e.__scopeTooltip);return c.jsx(_l,{present:a||u.open,children:u.disableHoverableContent?c.jsx(Q3,{side:s,...l,ref:t}):c.jsx(OD,{side:s,...l,ref:t})})}),OD=v.forwardRef((e,t)=>{const n=Nu(El,e.__scopeTooltip),a=Sg(El,e.__scopeTooltip),s=v.useRef(null),l=Mt(t,s),[u,f]=v.useState(null),{trigger:h,onClose:m}=n,p=s.current,{onPointerInTransitChange:g}=a,y=v.useCallback(()=>{f(null),g(!1)},[g]),T=v.useCallback((S,k)=>{const N=S.currentTarget,_={x:S.clientX,y:S.clientY},A=jD(_,N.getBoundingClientRect()),w=MD(_,A),P=BD(k.getBoundingClientRect()),F=zD([...w,...P]);f(F),g(!0)},[g]);return v.useEffect(()=>()=>y(),[y]),v.useEffect(()=>{if(h&&p){const S=N=>T(N,p),k=N=>T(N,h);return h.addEventListener("pointerleave",S),p.addEventListener("pointerleave",k),()=>{h.removeEventListener("pointerleave",S),p.removeEventListener("pointerleave",k)}}},[h,p,T,y]),v.useEffect(()=>{if(u){const S=k=>{const N=k.target,_={x:k.clientX,y:k.clientY},A=h?.contains(N)||p?.contains(N),w=!PD(_,u);A?y():w&&(y(),m())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[h,p,u,m,y]),c.jsx(Q3,{...e,ref:l})}),[ID,DD]=yf(ou,{isInside:!1}),LD=eS("TooltipContent"),Q3=v.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":s,onEscapeKeyDown:l,onPointerDownOutside:u,...f}=e,h=Nu(El,n),m=Ef(n),{onClose:p}=h;return v.useEffect(()=>(document.addEventListener(lp,p),()=>document.removeEventListener(lp,p)),[p]),v.useEffect(()=>{if(h.trigger){const g=y=>{y.target?.contains(h.trigger)&&p()};return window.addEventListener("scroll",g,{capture:!0}),()=>window.removeEventListener("scroll",g,{capture:!0})}},[h.trigger,p]),c.jsx(lf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:g=>g.preventDefault(),onDismiss:p,children:c.jsxs(p3,{"data-state":h.stateAttribute,...m,...f,ref:t,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(LD,{children:a}),c.jsx(ID,{scope:n,isInside:!0,children:c.jsx(A4,{id:h.contentId,role:"tooltip",children:s||a})})]})})});X3.displayName=El;var W3="TooltipArrow",K3=v.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,s=Ef(n);return DD(W3,n).isInside?null:c.jsx(g3,{...s,...a,ref:t})});K3.displayName=W3;function jD(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),s=Math.abs(t.right-e.x),l=Math.abs(t.left-e.x);switch(Math.min(n,a,s,l)){case l:return"left";case s:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function MD(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function BD(e){const{top:t,right:n,bottom:a,left:s}=e;return[{x:s,y:t},{x:n,y:t},{x:n,y:a},{x:s,y:a}]}function PD(e,t){const{x:n,y:a}=e;let s=!1;for(let l=0,u=t.length-1;l<t.length;u=l++){const f=t[l],h=t[u],m=f.x,p=f.y,g=h.x,y=h.y;p>a!=y>a&&n<(g-m)*(a-p)/(y-p)+m&&(s=!s)}return s}function zD(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),HD(t)}function HD(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const s=e[a];for(;t.length>=2;){const l=t[t.length-1],u=t[t.length-2];if((l.x-u.x)*(s.y-u.y)>=(l.y-u.y)*(s.x-u.x))t.pop();else break}t.push(s)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const s=e[a];for(;n.length>=2;){const l=n[n.length-1],u=n[n.length-2];if((l.x-u.x)*(s.y-u.y)>=(l.y-u.y)*(s.x-u.x))n.pop();else break}n.push(s)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Z3=q3,up=V3,cp=Y3,dp=G3,fp=X3,UD=K3;function J3(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=J3(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function ek(){for(var e,t,n=0,a="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=J3(e))&&(a&&(a+=" "),a+=t);return a}const FD=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},$D=(e,t)=>({classGroupId:e,validator:t}),tk=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Hd="-",s2=[],qD="arbitrary..",VD=e=>{const t=GD(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return YD(u);const f=u.split(Hd),h=f[0]===""&&f.length>1?1:0;return nk(f,h,t)},getConflictingClassGroupIds:(u,f)=>{if(f){const h=a[u],m=n[u];return h?m?FD(m,h):h:m||s2}return n[u]||s2}}},nk=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],l=n.nextPart.get(s);if(l){const m=nk(e,t+1,l);if(m)return m}const u=n.validators;if(u===null)return;const f=t===0?e.join(Hd):e.slice(t).join(Hd),h=u.length;for(let m=0;m<h;m++){const p=u[m];if(p.validator(f))return p.classGroupId}},YD=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?qD+a:void 0})(),GD=e=>{const{theme:t,classGroups:n}=e;return XD(n,t)},XD=(e,t)=>{const n=tk();for(const a in e){const s=e[a];Ng(s,n,a,t)}return n},Ng=(e,t,n,a)=>{const s=e.length;for(let l=0;l<s;l++){const u=e[l];QD(u,t,n,a)}},QD=(e,t,n,a)=>{if(typeof e=="string"){WD(e,t,n);return}if(typeof e=="function"){KD(e,t,n,a);return}ZD(e,t,n,a)},WD=(e,t,n)=>{const a=e===""?t:rk(t,e);a.classGroupId=n},KD=(e,t,n,a)=>{if(JD(e)){Ng(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push($D(n,e))},ZD=(e,t,n,a)=>{const s=Object.entries(e),l=s.length;for(let u=0;u<l;u++){const[f,h]=s[u];Ng(h,rk(t,f),n,a)}},rk=(e,t)=>{let n=e;const a=t.split(Hd),s=a.length;for(let l=0;l<s;l++){const u=a[l];let f=n.nextPart.get(u);f||(f=tk(),n.nextPart.set(u,f)),n=f}return n},JD=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,eL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const s=(l,u)=>{n[l]=u,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(l){let u=n[l];if(u!==void 0)return u;if((u=a[l])!==void 0)return s(l,u),u},set(l,u){l in n?n[l]=u:s(l,u)}}},hp="!",l2=":",tL=[],o2=(e,t,n,a,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:s}),nL=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=s=>{const l=[];let u=0,f=0,h=0,m;const p=s.length;for(let k=0;k<p;k++){const N=s[k];if(u===0&&f===0){if(N===l2){l.push(s.slice(h,k)),h=k+1;continue}if(N==="/"){m=k;continue}}N==="["?u++:N==="]"?u--:N==="("?f++:N===")"&&f--}const g=l.length===0?s:s.slice(h);let y=g,T=!1;g.endsWith(hp)?(y=g.slice(0,-1),T=!0):g.startsWith(hp)&&(y=g.slice(1),T=!0);const S=m&&m>h?m-h:void 0;return o2(l,T,y,S)};if(t){const s=t+l2,l=a;a=u=>u.startsWith(s)?l(u.slice(s.length)):o2(tL,!1,u,void 0,!0)}if(n){const s=a;a=l=>n({className:l,parseClassName:s})}return a},rL=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let s=[];for(let l=0;l<n.length;l++){const u=n[l],f=u[0]==="[",h=t.has(u);f||h?(s.length>0&&(s.sort(),a.push(...s),s=[]),a.push(u)):s.push(u)}return s.length>0&&(s.sort(),a.push(...s)),a}},aL=e=>({cache:eL(e.cacheSize),parseClassName:nL(e),sortModifiers:rL(e),...VD(e)}),iL=/\s+/,sL=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:l}=t,u=[],f=e.trim().split(iL);let h="";for(let m=f.length-1;m>=0;m-=1){const p=f[m],{isExternal:g,modifiers:y,hasImportantModifier:T,baseClassName:S,maybePostfixModifierPosition:k}=n(p);if(g){h=p+(h.length>0?" "+h:h);continue}let N=!!k,_=a(N?S.substring(0,k):S);if(!_){if(!N){h=p+(h.length>0?" "+h:h);continue}if(_=a(S),!_){h=p+(h.length>0?" "+h:h);continue}N=!1}const A=y.length===0?"":y.length===1?y[0]:l(y).join(":"),w=T?A+hp:A,P=w+_;if(u.indexOf(P)>-1)continue;u.push(P);const F=s(_,N);for(let M=0;M<F.length;++M){const I=F[M];u.push(w+I)}h=p+(h.length>0?" "+h:h)}return h},lL=(...e)=>{let t=0,n,a,s="";for(;t<e.length;)(n=e[t++])&&(a=ak(n))&&(s&&(s+=" "),s+=a);return s},ak=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=ak(e[a]))&&(n&&(n+=" "),n+=t);return n},oL=(e,...t)=>{let n,a,s,l;const u=h=>{const m=t.reduce((p,g)=>g(p),e());return n=aL(m),a=n.cache.get,s=n.cache.set,l=f,f(h)},f=h=>{const m=a(h);if(m)return m;const p=sL(h,n);return s(h,p),p};return l=u,(...h)=>l(lL(...h))},uL=[],on=e=>{const t=n=>n[e]||uL;return t.isThemeGetter=!0,t},ik=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,sk=/^\((?:(\w[\w-]*):)?(.+)\)$/i,cL=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,dL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fL=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,hL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,mL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,pL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ai=e=>cL.test(e),nt=e=>!!e&&!Number.isNaN(Number(e)),ii=e=>!!e&&Number.isInteger(Number(e)),pm=e=>e.endsWith("%")&&nt(e.slice(0,-1)),Na=e=>dL.test(e),lk=()=>!0,gL=e=>fL.test(e)&&!hL.test(e),Cg=()=>!1,xL=e=>mL.test(e),bL=e=>pL.test(e),yL=e=>!Ie(e)&&!je(e),EL=e=>Ei(e,ck,Cg),Ie=e=>ik.test(e),qi=e=>Ei(e,dk,gL),u2=e=>Ei(e,AL,nt),TL=e=>Ei(e,hk,lk),vL=e=>Ei(e,fk,Cg),c2=e=>Ei(e,ok,Cg),SL=e=>Ei(e,uk,bL),id=e=>Ei(e,mk,xL),je=e=>sk.test(e),Io=e=>os(e,dk),kL=e=>os(e,fk),d2=e=>os(e,ok),NL=e=>os(e,ck),CL=e=>os(e,uk),sd=e=>os(e,mk,!0),_L=e=>os(e,hk,!0),Ei=(e,t,n)=>{const a=ik.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},os=(e,t,n=!1)=>{const a=sk.exec(e);return a?a[1]?t(a[1]):n:!1},ok=e=>e==="position"||e==="percentage",uk=e=>e==="image"||e==="url",ck=e=>e==="length"||e==="size"||e==="bg-size",dk=e=>e==="length",AL=e=>e==="number",fk=e=>e==="family-name",hk=e=>e==="number"||e==="weight",mk=e=>e==="shadow",wL=()=>{const e=on("color"),t=on("font"),n=on("text"),a=on("font-weight"),s=on("tracking"),l=on("leading"),u=on("breakpoint"),f=on("container"),h=on("spacing"),m=on("radius"),p=on("shadow"),g=on("inset-shadow"),y=on("text-shadow"),T=on("drop-shadow"),S=on("blur"),k=on("perspective"),N=on("aspect"),_=on("ease"),A=on("animate"),w=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...P(),je,Ie],M=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],j=()=>[je,Ie,h],G=()=>[ai,"full","auto",...j()],B=()=>[ii,"none","subgrid",je,Ie],Q=()=>["auto",{span:["full",ii,je,Ie]},ii,je,Ie],V=()=>[ii,"auto",je,Ie],te=()=>["auto","min","max","fr",je,Ie],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...j()],q=()=>[ai,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],W=()=>[ai,"screen","full","dvw","lvw","svw","min","max","fit",...j()],he=()=>[ai,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],O=()=>[e,je,Ie],H=()=>[...P(),d2,c2,{position:[je,Ie]}],Z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],L=()=>["auto","cover","contain",NL,EL,{size:[je,Ie]}],fe=()=>[pm,Io,qi],Ne=()=>["","none","full",m,je,Ie],ve=()=>["",nt,Io,qi],ge=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[nt,pm,d2,c2],Ae=()=>["","none",S,je,Ie],Le=()=>["none",nt,je,Ie],Fe=()=>["none",nt,je,Ie],$e=()=>[nt,je,Ie],pe=()=>[ai,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Na],breakpoint:[Na],color:[lk],container:[Na],"drop-shadow":[Na],ease:["in","out","in-out"],font:[yL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Na],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Na],shadow:[Na],spacing:["px",nt],text:[Na],"text-shadow":[Na],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ai,Ie,je,N]}],container:["container"],columns:[{columns:[nt,Ie,je,f]}],"break-after":[{"break-after":w()}],"break-before":[{"break-before":w()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:G()}],"inset-x":[{"inset-x":G()}],"inset-y":[{"inset-y":G()}],start:[{"inset-s":G(),start:G()}],end:[{"inset-e":G(),end:G()}],"inset-bs":[{"inset-bs":G()}],"inset-be":[{"inset-be":G()}],top:[{top:G()}],right:[{right:G()}],bottom:[{bottom:G()}],left:[{left:G()}],visibility:["visible","invisible","collapse"],z:[{z:[ii,"auto",je,Ie]}],basis:[{basis:[ai,"full","auto",f,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[nt,ai,"auto","initial","none",Ie]}],grow:[{grow:["",nt,je,Ie]}],shrink:[{shrink:["",nt,je,Ie]}],order:[{order:[ii,"first","last","none",je,Ie]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:Q()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:Q()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mbs:[{mbs:R()}],mbe:[{mbe:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...W()]}],"min-inline-size":[{"min-inline":["auto",...W()]}],"max-inline-size":[{"max-inline":["none",...W()]}],"block-size":[{block:["auto",...he()]}],"min-block-size":[{"min-block":["auto",...he()]}],"max-block-size":[{"max-block":["none",...he()]}],w:[{w:[f,"screen",...q()]}],"min-w":[{"min-w":[f,"screen","none",...q()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[u]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,Io,qi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,_L,TL]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",pm,Ie]}],"font-family":[{font:[kL,vL,t]}],"font-features":[{"font-features":[Ie]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,je,Ie]}],"line-clamp":[{"line-clamp":[nt,"none",je,u2]}],leading:[{leading:[l,...j()]}],"list-image":[{"list-image":["none",je,Ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[nt,"from-font","auto",je,qi]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[nt,"auto",je,Ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",je,Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:H()}],"bg-repeat":[{bg:Z()}],"bg-size":[{bg:L()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ii,je,Ie],radial:["",je,Ie],conic:[ii,je,Ie]},CL,SL]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:fe()}],"gradient-via-pos":[{via:fe()}],"gradient-to-pos":[{to:fe()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:Ne()}],"rounded-s":[{"rounded-s":Ne()}],"rounded-e":[{"rounded-e":Ne()}],"rounded-t":[{"rounded-t":Ne()}],"rounded-r":[{"rounded-r":Ne()}],"rounded-b":[{"rounded-b":Ne()}],"rounded-l":[{"rounded-l":Ne()}],"rounded-ss":[{"rounded-ss":Ne()}],"rounded-se":[{"rounded-se":Ne()}],"rounded-ee":[{"rounded-ee":Ne()}],"rounded-es":[{"rounded-es":Ne()}],"rounded-tl":[{"rounded-tl":Ne()}],"rounded-tr":[{"rounded-tr":Ne()}],"rounded-br":[{"rounded-br":Ne()}],"rounded-bl":[{"rounded-bl":Ne()}],"border-w":[{border:ve()}],"border-w-x":[{"border-x":ve()}],"border-w-y":[{"border-y":ve()}],"border-w-s":[{"border-s":ve()}],"border-w-e":[{"border-e":ve()}],"border-w-bs":[{"border-bs":ve()}],"border-w-be":[{"border-be":ve()}],"border-w-t":[{"border-t":ve()}],"border-w-r":[{"border-r":ve()}],"border-w-b":[{"border-b":ve()}],"border-w-l":[{"border-l":ve()}],"divide-x":[{"divide-x":ve()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ve()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[nt,je,Ie]}],"outline-w":[{outline:["",nt,Io,qi]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",p,sd,id]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",g,sd,id]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:ve()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[nt,qi]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":ve()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",y,sd,id]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[nt,je,Ie]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[nt]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[je,Ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":P()}],"mask-image-conic-pos":[{"mask-conic":[nt]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:H()}],"mask-repeat":[{mask:Z()}],"mask-size":[{mask:L()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Ie]}],filter:[{filter:["","none",je,Ie]}],blur:[{blur:Ae()}],brightness:[{brightness:[nt,je,Ie]}],contrast:[{contrast:[nt,je,Ie]}],"drop-shadow":[{"drop-shadow":["","none",T,sd,id]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",nt,je,Ie]}],"hue-rotate":[{"hue-rotate":[nt,je,Ie]}],invert:[{invert:["",nt,je,Ie]}],saturate:[{saturate:[nt,je,Ie]}],sepia:[{sepia:["",nt,je,Ie]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Ie]}],"backdrop-blur":[{"backdrop-blur":Ae()}],"backdrop-brightness":[{"backdrop-brightness":[nt,je,Ie]}],"backdrop-contrast":[{"backdrop-contrast":[nt,je,Ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",nt,je,Ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[nt,je,Ie]}],"backdrop-invert":[{"backdrop-invert":["",nt,je,Ie]}],"backdrop-opacity":[{"backdrop-opacity":[nt,je,Ie]}],"backdrop-saturate":[{"backdrop-saturate":[nt,je,Ie]}],"backdrop-sepia":[{"backdrop-sepia":["",nt,je,Ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,Ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[nt,"initial",je,Ie]}],ease:[{ease:["linear","initial",_,je,Ie]}],delay:[{delay:[nt,je,Ie]}],animate:[{animate:["none",A,je,Ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,je,Ie]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:Le()}],"rotate-x":[{"rotate-x":Le()}],"rotate-y":[{"rotate-y":Le()}],"rotate-z":[{"rotate-z":Le()}],scale:[{scale:Fe()}],"scale-x":[{"scale-x":Fe()}],"scale-y":[{"scale-y":Fe()}],"scale-z":[{"scale-z":Fe()}],"scale-3d":["scale-3d"],skew:[{skew:$e()}],"skew-x":[{"skew-x":$e()}],"skew-y":[{"skew-y":$e()}],transform:[{transform:[je,Ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",je,Ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",je,Ie]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[nt,Io,qi,u2]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},pk=oL(wL);function pn(...e){return pk(ek(e))}function RL({...e}){return c.jsx(mD,{"data-slot":"select",...e})}function OL({...e}){return c.jsx(gD,{"data-slot":"select-value",...e})}function IL({className:e,size:t="default",children:n,...a}){return c.jsxs(pD,{"data-slot":"select-trigger","data-size":t,className:pn("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...a,children:[n,c.jsx(xD,{asChild:!0,children:c.jsx($t,{className:"size-4 opacity-50"})})]})}function DL({className:e,children:t,position:n="item-aligned",align:a="center",...s}){return c.jsx(bD,{children:c.jsxs(yD,{"data-slot":"select-content",className:pn("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:a,...s,children:[c.jsx(jL,{}),c.jsx(ED,{className:pn("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),c.jsx(ML,{})]})})}function LL({className:e,children:t,...n}){return c.jsxs(TD,{"data-slot":"select-item",className:pn("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[c.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:c.jsx(SD,{children:c.jsx(vu,{className:"size-4"})})}),c.jsx(vD,{children:t})]})}function jL({className:e,...t}){return c.jsx(kD,{"data-slot":"select-scroll-up-button",className:pn("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx(rg,{className:"size-4"})})}function ML({className:e,...t}){return c.jsx(ND,{"data-slot":"select-scroll-down-button",className:pn("flex cursor-default items-center justify-center py-1",e),...t,children:c.jsx($t,{className:"size-4"})})}const BL=[{value:"time",label:"Recent"},{value:"turns",label:"Turns"},{value:"name",label:"Name"}];function PL({search:e,onSearchChange:t,sortMode:n,onSortChange:a,grouped:s,onToggleGrouped:l,viewMode:u,onViewModeChange:f,filterMode:h,onFilterModeChange:m,totalCount:p,filteredCount:g,onImport:y,importing:T}){const S=v.useRef(null);return c.jsx("div",{className:"border-b px-4 py-2",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"relative flex-1 max-w-sm",children:[c.jsx(lg,{size:13,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),c.jsx("input",{value:e,onChange:k=>t(k.target.value),placeholder:"Search sessions...","data-session-search":!0,className:"w-full rounded border bg-background pl-7 pr-7 py-1 text-xs placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),e&&c.jsx("button",{onClick:()=>t(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:c.jsx(Su,{size:12})})]}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs("div",{className:"flex items-center gap-1 text-muted-foreground",children:[c.jsx(F5,{size:12,className:"shrink-0"}),c.jsxs(RL,{value:n,onValueChange:k=>a(k),children:[c.jsx(IL,{size:"sm",className:"h-6 min-w-[5rem] border-none shadow-none px-1.5 py-0 text-[11px] gap-1",children:c.jsx(OL,{})}),c.jsx(DL,{children:BL.map(k=>c.jsx(LL,{value:k.value,className:"text-xs",children:k.label},k.value))})]})]}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs("button",{onClick:()=>m(h==="all"?"imported":"all"),className:`flex items-center gap-1 rounded border px-1.5 py-0.5 text-[11px] transition-colors ${h==="imported"?"bg-orange-500/10 text-orange-600 dark:text-orange-400 border-orange-500/30":"text-muted-foreground hover:bg-muted"}`,title:"Show imported sessions only",children:[c.jsx(IE,{size:12}),"Imported"]}),c.jsxs("button",{onClick:l,className:`flex items-center gap-1 rounded border px-1.5 py-0.5 text-[11px] transition-colors ${s?"bg-primary/10 text-primary border-primary/30":"text-muted-foreground hover:bg-muted"}`,title:"Group by project",children:[c.jsx(sf,{size:12}),"Group"]}),c.jsx("button",{onClick:()=>f(u==="cards"?"compact":"cards"),className:"flex items-center gap-1 rounded border px-1.5 py-0.5 text-[11px] text-muted-foreground hover:bg-muted transition-colors",title:u==="cards"?"Switch to list":"Switch to cards",children:u==="cards"?c.jsx(ig,{size:12}):c.jsx(O6,{size:12})}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs("button",{onClick:()=>S.current?.click(),disabled:T,className:"flex items-center gap-1 rounded border px-1.5 py-0.5 text-[11px] text-muted-foreground hover:bg-muted transition-colors disabled:opacity-50",title:"Import session from ZIP",children:[T?c.jsx(Id,{size:12,className:"animate-spin"}):c.jsx(IE,{size:12}),T?"Importing...":"Import"]}),c.jsx("input",{ref:S,type:"file",accept:".zip",className:"hidden",onChange:k=>{const N=k.target.files?.[0];N&&y(N),k.target.value=""}}),c.jsx("span",{className:"text-[11px] text-muted-foreground ml-auto shrink-0",children:g===p?`${p} sessions`:`${g} / ${p}`})]})})}function zL({...e}){return c.jsx(gO,{"data-slot":"alert-dialog",...e})}function HL({...e}){return c.jsx(xO,{"data-slot":"alert-dialog-portal",...e})}function UL({className:e,...t}){return c.jsx(bO,{"data-slot":"alert-dialog-overlay",className:pn("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t})}function FL({className:e,...t}){return c.jsxs(HL,{children:[c.jsx(UL,{}),c.jsx(yO,{"data-slot":"alert-dialog-content",className:pn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...t})]})}function $L({className:e,...t}){return c.jsx("div",{"data-slot":"alert-dialog-header",className:pn("flex flex-col gap-2 text-center sm:text-left",e),...t})}function qL({className:e,...t}){return c.jsx("div",{"data-slot":"alert-dialog-footer",className:pn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function VL({className:e,...t}){return c.jsx(vO,{"data-slot":"alert-dialog-title",className:pn("text-lg font-semibold",e),...t})}function YL({className:e,...t}){return c.jsx(SO,{"data-slot":"alert-dialog-description",className:pn("text-sm text-muted-foreground",e),...t})}function GL({className:e,...t}){return c.jsx(EO,{"data-slot":"alert-dialog-action",className:pn("inline-flex h-9 items-center justify-center rounded-md bg-destructive px-4 text-sm font-medium text-destructive-foreground ring-offset-background transition-colors hover:bg-destructive/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t})}function XL({className:e,...t}){return c.jsx(TO,{"data-slot":"alert-dialog-cancel",className:pn("inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-4 text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t})}function f2(e){if(!e)return"";const t=Date.now()/1e3-e;return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:new Date(e*1e3).toLocaleDateString()}function h2(e){return e===0?"0 B":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function m2(e){return e<1?`${(e*1e3).toFixed(0)}ms`:e<60?`${e.toFixed(1)}s`:`${(e/60).toFixed(1)}min`}function gm(e){return e===0?"0":e<1e3?`${e}`:`${(e/1e3).toFixed(1)}k`}function p2({text:e,query:t}){if(!t||!e)return c.jsx(c.Fragment,{children:e});const n=e.toLowerCase(),a=t.toLowerCase(),s=n.indexOf(a);return s===-1?c.jsx(c.Fragment,{children:e}):c.jsxs(c.Fragment,{children:[e.slice(0,s),c.jsx("mark",{className:"bg-yellow-300/40 rounded px-0.5",children:e.slice(s,s+t.length)}),e.slice(s+t.length)]})}function mp({session:e,onSelect:t,compact:n,searchQuery:a,onDeleted:s}){const[l,u]=v.useState(!1),[f,h]=v.useState(!1),m=e.metadata?.title&&e.metadata.title!=="Untitled Session"?e.metadata.title:e.title||"Untitled Session",p=`${e.work_dir_hash}/${e.session_id}`,g=Pv(p),y=N=>{N.stopPropagation(),window.open(g,"_blank","noopener,noreferrer")},T=N=>{N.stopPropagation(),u(!0)},S=()=>{h(!0),w5(p).then(()=>{u(!1),s?.(e.session_id)}).catch(N=>alert(N instanceof Error?N.message:"Delete failed")).finally(()=>h(!1))},k=e.imported?c.jsx(zL,{open:l,onOpenChange:u,children:c.jsxs(FL,{onClick:N=>N.stopPropagation(),children:[c.jsxs($L,{children:[c.jsx(VL,{children:"Delete imported session?"}),c.jsxs(YL,{children:['This will permanently delete the imported session "',m,'". This action cannot be undone.']})]}),c.jsxs(qL,{children:[c.jsx(XL,{disabled:f,children:"Cancel"}),c.jsx(GL,{onClick:S,disabled:f,children:f?"Deleting...":"Delete"})]})]})}):null;return n?c.jsxs(c.Fragment,{children:[c.jsxs("button",{onClick:t,className:"flex items-center gap-3 w-full border-b px-3 py-2 text-left hover:bg-accent/50 transition-colors",children:[c.jsx("span",{className:"font-mono text-[10px] text-muted-foreground w-16 shrink-0",children:e.session_id.slice(0,8)}),e.imported&&c.jsx("span",{className:"rounded bg-orange-500/10 text-orange-600 dark:text-orange-400 px-1 py-0 text-[9px] border border-orange-500/20 shrink-0",children:"imported"}),c.jsx("span",{className:"text-xs truncate flex-1",children:c.jsx(p2,{text:m,query:a})}),c.jsx(g2,{sessionId:p,hasWire:e.has_wire,inline:!0}),c.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0 w-14 text-right",children:h2(e.total_size)}),c.jsx("span",{className:"text-[10px] text-muted-foreground shrink-0 w-16 text-right",children:f2(e.last_updated)}),c.jsx("span",{role:"button",tabIndex:0,onClick:y,onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&y(N)},className:"rounded p-0.5 hover:bg-accent text-muted-foreground hover:text-foreground transition-colors shrink-0",title:"Download session files",children:c.jsx(Qm,{size:11})}),e.imported&&c.jsx("span",{role:"button",tabIndex:0,onClick:T,onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&T(N)},className:"rounded p-0.5 hover:bg-red-500/10 text-muted-foreground hover:text-red-500 transition-colors shrink-0",title:"Delete imported session",children:c.jsx(DE,{size:11})})]}),k]}):c.jsxs(c.Fragment,{children:[c.jsxs("button",{onClick:t,className:"rounded-lg border bg-card p-3 text-left hover:bg-accent/50 hover:border-primary/30 transition-colors w-full",children:[c.jsxs("div",{className:"flex items-center justify-between mb-1",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:e.session_id.slice(0,8)}),e.imported&&c.jsx("span",{className:"rounded bg-orange-500/10 text-orange-600 dark:text-orange-400 px-1 py-0 text-[9px] border border-orange-500/20",children:"imported"})]}),c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{role:"button",tabIndex:0,onClick:y,onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&y(N)},className:"rounded p-0.5 hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"Download session files",children:c.jsx(Qm,{size:12})}),e.imported&&c.jsx("span",{role:"button",tabIndex:0,onClick:T,onKeyDown:N=>{(N.key==="Enter"||N.key===" ")&&T(N)},className:"rounded p-0.5 hover:bg-red-500/10 text-muted-foreground hover:text-red-500 transition-colors",title:"Delete imported session",children:c.jsx(DE,{size:12})}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:f2(e.last_updated)})]})]}),c.jsx("div",{className:"text-sm font-medium truncate mb-1.5",title:m,children:c.jsx(p2,{text:m,query:a})}),c.jsxs("div",{className:"flex items-center gap-1 mb-2",children:[e.has_wire&&c.jsx("span",{className:"rounded bg-blue-500/10 text-blue-600 dark:text-blue-400 px-1.5 py-0 text-[10px] border border-blue-500/20",children:"wire"}),e.has_context&&c.jsx("span",{className:"rounded bg-green-500/10 text-green-600 dark:text-green-400 px-1.5 py-0 text-[10px] border border-green-500/20",children:"context"}),e.has_state&&c.jsx("span",{className:"rounded bg-purple-500/10 text-purple-600 dark:text-purple-400 px-1.5 py-0 text-[10px] border border-purple-500/20",children:"state"}),(e.subagent_count??0)>0&&c.jsxs("span",{className:"flex items-center gap-0.5 rounded bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 px-1.5 py-0 text-[10px] border border-indigo-500/20",children:[c.jsx(Mr,{size:9}),e.subagent_count]}),c.jsx("span",{className:"text-[10px] text-muted-foreground ml-auto",children:h2(e.total_size)})]}),c.jsx(g2,{sessionId:p,hasWire:e.has_wire})]}),k]})}function g2({sessionId:e,hasWire:t,inline:n}){const[a,s]=v.useState(null),[l,u]=v.useState(!1),f=v.useRef(null);return v.useEffect(()=>{if(!t||!f.current)return;const h=f.current,m=new IntersectionObserver(([p])=>{p.isIntersecting&&(u(!0),_5(e).then(s).catch(g=>{console.warn(`Failed to load summary for ${e}:`,g)}).finally(()=>u(!1)),m.disconnect())},{threshold:.1});return m.observe(h),()=>m.disconnect()},[e,t]),t?a?n?c.jsxs("div",{ref:f,className:"flex items-center gap-2 text-[10px] text-muted-foreground shrink-0",children:[c.jsxs("span",{className:"text-blue-600 dark:text-blue-400",children:[a.turns,"T"]}),c.jsxs("span",{className:"text-green-600 dark:text-green-400",children:[a.steps,"S"]}),c.jsxs("span",{className:"text-purple-600 dark:text-purple-400",children:[a.tool_calls,"TC"]}),a.errors>0&&c.jsxs("span",{className:"text-red-500 font-medium",children:[a.errors,"E"]}),c.jsx("span",{children:gm(a.input_tokens+a.output_tokens)}),c.jsx("span",{children:m2(a.duration_sec)})]}):c.jsxs("div",{ref:f,className:"border-t border-dashed pt-2 mt-1",children:[c.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground flex-wrap",children:[c.jsxs("span",{className:"text-blue-600 dark:text-blue-400",children:[a.turns," turn",a.turns!==1?"s":""]}),c.jsx("span",{className:"opacity-30",children:"·"}),c.jsxs("span",{className:"text-green-600 dark:text-green-400",children:[a.steps," step",a.steps!==1?"s":""]}),c.jsx("span",{className:"opacity-30",children:"·"}),c.jsxs("span",{className:"text-purple-600 dark:text-purple-400",children:[a.tool_calls," tool",a.tool_calls!==1?"s":""]}),a.compactions>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"opacity-30",children:"·"}),c.jsxs("span",{className:"text-orange-600 dark:text-orange-400 inline-flex items-center gap-0.5",children:[c.jsx(sg,{size:9}),a.compactions]})]})]}),c.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-muted-foreground mt-1",children:[c.jsxs("span",{className:"inline-flex items-center gap-0.5",children:[c.jsx(rf,{size:9}),m2(a.duration_sec)]}),(a.input_tokens>0||a.output_tokens>0)&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"opacity-30",children:"·"}),c.jsxs("span",{className:"inline-flex items-center gap-0.5",children:[c.jsx(og,{size:9}),gm(a.input_tokens)," in / ",gm(a.output_tokens)," out"]})]}),a.errors>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"opacity-30",children:"·"}),c.jsxs("span",{className:"text-red-500 font-medium inline-flex items-center gap-0.5",children:[c.jsx(fi,{size:9}),a.errors," error",a.errors!==1?"s":""]})]})]})]}):c.jsx("div",{ref:f,children:l?n?c.jsx("div",{className:"flex items-center gap-2 shrink-0",children:c.jsx("div",{className:"h-3 w-32 rounded bg-muted animate-pulse"})}):c.jsxs("div",{className:"border-t border-dashed pt-2 mt-1 space-y-1",children:[c.jsx("div",{className:"h-3 w-full rounded bg-muted animate-pulse"}),c.jsx("div",{className:"h-3 w-2/3 rounded bg-muted animate-pulse"})]}):c.jsx("div",{className:"h-4"})}):c.jsx("div",{ref:f,className:"text-[10px] text-muted-foreground",children:"No wire data"})}function QL(e){if(!e)return"Unknown";const t=e.replace(/\/$/,"").split("/");return t[t.length-1]||e}function WL({workDir:e,sessions:t,onSelectSession:n,compact:a,searchQuery:s,onSessionDeleted:l}){const[u,f]=v.useState(!1);return c.jsxs("div",{className:"mb-4",children:[c.jsxs("button",{onClick:()=>f(h=>!h),className:"flex items-center gap-2 w-full px-2 py-1.5 rounded-md hover:bg-muted transition-colors",children:[u?c.jsx(cn,{size:14,className:"shrink-0 text-muted-foreground"}):c.jsx($t,{size:14,className:"shrink-0 text-muted-foreground"}),c.jsx(sf,{size:14,className:"shrink-0 text-muted-foreground"}),c.jsx("span",{className:"text-sm font-medium truncate",children:QL(e)}),c.jsxs("span",{className:"text-[11px] text-muted-foreground shrink-0",children:["(",t.length,")"]}),c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground ml-auto truncate max-w-[300px] hidden md:block",children:e})]}),!u&&c.jsx("div",{className:a?"mt-1 ml-6":"mt-2 grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3 ml-6",children:t.map(h=>c.jsx(mp,{session:h,onSelect:()=>n(`${h.work_dir_hash}/${h.session_id}`),compact:a,searchQuery:s,onDeleted:l},`${h.session_id}-${h.work_dir_hash}`))})]})}const ld=30;function KL(e){return e===0?"0 B":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function ZL({onSelectSession:e}){const[t,n]=v.useState([]),[a,s]=v.useState(!0),[l,u]=v.useState(""),[f,h]=v.useState("time"),[m,p]=v.useState(!0),[g,y]=v.useState("cards"),[T,S]=v.useState("all"),[k,N]=v.useState(!1),[_,A]=v.useState(ld),w=v.useRef(null);v.useEffect(()=>{A(ld)},[l,f,T,m]);const P=async()=>{try{const R=await Od(!0);n(R)}catch(R){console.error(R)}};v.useEffect(()=>{Od().then(n).catch(console.error).finally(()=>s(!1))},[]),v.useEffect(()=>{const R=q=>{const W=q.target?.tagName;W==="INPUT"||W==="TEXTAREA"||W==="SELECT"||q.key==="/"&&(q.preventDefault(),document.querySelector("[data-session-search]")?.focus())};return window.addEventListener("keydown",R),()=>window.removeEventListener("keydown",R)},[]);const F=async R=>{N(!0);try{await A5(R),await P()}catch(q){console.error("Import failed:",q),alert(q instanceof Error?q.message:"Import failed")}finally{N(!1)}},M=R=>{n(q=>q.filter(W=>W.session_id!==R)),P()},I=v.useMemo(()=>{let R=t;if(T==="imported"&&(R=R.filter(q=>q.imported)),l.trim()){const q=l.trim().toLowerCase();R=R.filter(W=>W.session_id.toLowerCase().includes(q)||W.title.toLowerCase().includes(q)||W.work_dir&&W.work_dir.toLowerCase().includes(q))}return R},[t,l,T]),j=v.useMemo(()=>{const R=[...I];return f==="time"?R.sort((q,W)=>W.last_updated-q.last_updated):f==="turns"?R.sort((q,W)=>W.turns-q.turns):f==="name"&&R.sort((q,W)=>(q.title||"").localeCompare(W.title||"")),R},[I,f]);v.useEffect(()=>{const R=w.current;!R||_>=j.length||R.scrollHeight<=R.clientHeight&&A(q=>Math.min(q+ld,j.length))},[_,j.length]);const G=v.useMemo(()=>{if(!m)return[];const R=new Map;for(const q of j){const W=q.imported?"Imported":q.work_dir??"Unknown",he=R.get(W);he?he.push(q):R.set(W,[q])}return Array.from(R.entries()).map(([q,W])=>({workDir:q,sessions:W}))},[j,m]),B=v.useMemo(()=>{const R=new Set;for(const q of t)R.add(q.work_dir??"Unknown");return R.size},[t]),Q=v.useMemo(()=>t.reduce((R,q)=>R+q.total_size,0),[t]),V=R=>{if(_>=j.length)return;const q=R.currentTarget;q.scrollHeight-q.scrollTop-q.clientHeight<300&&A(W=>Math.min(W+ld,j.length))},te=v.useMemo(()=>j.slice(0,_),[j,_]),ee=v.useMemo(()=>{if(!m)return[];let R=_;const q=[];for(const W of G){if(R<=0)break;const he=W.sessions.slice(0,R);q.push({workDir:W.workDir,sessions:he}),R-=he.length}return q},[G,m,_]),U=j.length>_;return a?c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsx("div",{className:"border-b px-4 py-2",children:c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"h-6 w-48 rounded bg-muted animate-pulse"}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsx("div",{className:"h-6 w-20 rounded bg-muted animate-pulse"}),c.jsx("div",{className:"h-6 w-16 rounded bg-muted animate-pulse"})]})}),c.jsxs("div",{className:"flex-1 overflow-auto p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 px-2 py-1.5 mb-2",children:[c.jsx("div",{className:"h-4 w-4 rounded bg-muted animate-pulse"}),c.jsx("div",{className:"h-4 w-32 rounded bg-muted animate-pulse"}),c.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})]}),c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3 ml-6",children:[0,1,2,3,4,5].map(R=>c.jsx(JL,{delay:R*75},R))})]})]}):c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsx(PL,{search:l,onSearchChange:u,sortMode:f,onSortChange:h,grouped:m,onToggleGrouped:()=>p(R=>!R),viewMode:g,onViewModeChange:y,filterMode:T,onFilterModeChange:S,totalCount:t.length,filteredCount:I.length,onImport:F,importing:k}),c.jsxs("div",{ref:w,className:"flex-1 overflow-auto p-4",onScroll:V,children:[m?ee.map(R=>c.jsx(WL,{workDir:R.workDir,sessions:R.sessions,onSelectSession:e,compact:g==="compact",searchQuery:l,onSessionDeleted:M},R.workDir)):g==="compact"?c.jsx("div",{children:te.map(R=>c.jsx(mp,{session:R,onSelect:()=>e(`${R.work_dir_hash}/${R.session_id}`),compact:!0,searchQuery:l,onDeleted:M},`${R.session_id}-${R.work_dir_hash}`))}):c.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3",children:te.map(R=>c.jsx(mp,{session:R,onSelect:()=>e(`${R.work_dir_hash}/${R.session_id}`),searchQuery:l,onDeleted:M},`${R.session_id}-${R.work_dir_hash}`))}),U&&c.jsxs("div",{className:"flex justify-center py-4 text-xs text-muted-foreground",children:["Loading more sessions... (",_," / ",j.length,")"]}),I.length===0&&l&&c.jsxs("div",{className:"flex items-center justify-center text-muted-foreground text-sm py-12",children:['No sessions matching "',l,'"']}),I.length===0&&!l&&T==="imported"&&c.jsxs("div",{className:"flex flex-col items-center justify-center text-muted-foreground text-sm py-12 gap-2",children:[c.jsx("span",{children:"No imported sessions"}),c.jsx("span",{className:"text-xs",children:"Import a session ZIP to get started."})]}),t.length===0&&!l&&T==="all"&&c.jsxs("div",{className:"flex flex-col items-center justify-center text-muted-foreground py-12 gap-2",children:[c.jsx("span",{className:"text-lg",children:"No sessions found"}),c.jsxs("span",{className:"text-sm",children:["Run ",c.jsx("code",{className:"font-mono bg-muted px-1.5 py-0.5 rounded",children:"pythinker"})," to create your first session, or import a session ZIP."]})]})]}),c.jsxs("div",{className:"border-t px-4 py-1.5 text-[11px] text-muted-foreground flex items-center gap-2",children:[c.jsxs("span",{children:[t.length," sessions"]}),c.jsx("span",{className:"opacity-30",children:"·"}),c.jsxs("span",{children:[B," project",B!==1?"s":""]}),Q>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"opacity-30",children:"·"}),c.jsxs("span",{children:[KL(Q)," total"]})]})]})]})}function JL({delay:e=0}){return c.jsxs("div",{className:"rounded-lg border bg-card p-3 space-y-2",style:{animationDelay:`${e}ms`},children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"}),c.jsx("div",{className:"h-3 w-12 rounded bg-muted animate-pulse"})]}),c.jsx("div",{className:"h-4 w-3/4 rounded bg-muted animate-pulse"}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"}),c.jsx("div",{className:"h-4 w-14 rounded bg-muted animate-pulse"}),c.jsx("div",{className:"h-4 w-10 rounded bg-muted animate-pulse"})]}),c.jsxs("div",{className:"border-t border-dashed pt-2",children:[c.jsx("div",{className:"h-3 w-full rounded bg-muted animate-pulse"}),c.jsx("div",{className:"h-3 w-2/3 rounded bg-muted animate-pulse mt-1"})]})]})}function xm(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function ej(e){return e<60?`${e.toFixed(0)}s`:e<3600?`${(e/60).toFixed(1)}min`:`${(e/3600).toFixed(1)}h`}function od({label:e,value:t}){return c.jsxs("div",{className:"rounded-lg border p-4 flex flex-col gap-1",children:[c.jsx("span",{className:"text-2xl font-bold tabular-nums",children:t}),c.jsx("span",{className:"text-xs text-muted-foreground",children:e})]})}const x2=600,ud=120,cd=40,Do=12,tj=24;function nj({daily:e}){if(e.length===0)return null;const t=Math.max(1,...e.map(T=>T.sessions)),n=Math.max(1,...e.map(T=>T.turns)),a=x2-cd*2,s=ud-Do-tj,l=T=>cd+(e.length>1?T/(e.length-1)*a:a/2),u=T=>Do+(1-T/t)*s,f=T=>Do+(1-T/n)*s,h=e.map((T,S)=>`${S===0?"M":"L"} ${l(S)} ${u(T.sessions)}`).join(" "),m=e.map((T,S)=>`${S===0?"M":"L"} ${l(S)} ${f(T.turns)}`).join(" "),p=h+` L ${l(e.length-1)} ${u(0)} L ${l(0)} ${u(0)} Z`,g=Math.min(5,e.length),y=[];if(g<=1)e.length>0&&y.push(0);else for(let T=0;T<g;T++)y.push(Math.round(T/(g-1)*(e.length-1)));return c.jsxs("div",{className:"rounded-lg border p-4",children:[c.jsx("div",{className:"flex items-center gap-2 mb-2",children:c.jsx("span",{className:"text-sm font-medium",children:"Daily Usage (Last 30 Days)"})}),c.jsxs("svg",{viewBox:`0 0 ${x2} ${ud}`,className:"w-full",style:{maxHeight:ud},children:[c.jsx("path",{d:p,className:"fill-blue-500/10"}),c.jsx("path",{d:h,className:"stroke-blue-500",strokeWidth:1.5,fill:"none"}),c.jsx("path",{d:m,className:"stroke-green-500",strokeWidth:1.5,fill:"none",strokeDasharray:"4 2"}),c.jsx("text",{x:cd-4,y:Do+4,className:"fill-muted-foreground",fontSize:8,textAnchor:"end",children:t}),c.jsx("text",{x:cd-4,y:Do+s+3,className:"fill-muted-foreground",fontSize:8,textAnchor:"end",children:"0"}),y.map(T=>c.jsx("text",{x:l(T),y:ud-4,className:"fill-muted-foreground",fontSize:8,textAnchor:"middle",children:e[T].date.slice(5)},T)),e.map((T,S)=>T.sessions>0?c.jsx("circle",{cx:l(S),cy:u(T.sessions),r:2,className:"fill-blue-500"},S):null)]}),c.jsxs("div",{className:"flex items-center gap-4 mt-2",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:"w-3 h-0.5 bg-blue-500 rounded"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Sessions"})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:"w-3 h-0.5 bg-green-500 rounded border-dashed"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Turns"})]})]})]})}function rj({tools:e}){if(e.length===0)return null;const t=e[0].count;return c.jsxs("div",{className:"rounded-lg border p-4",children:[c.jsx("div",{className:"flex items-center gap-2 mb-2",children:c.jsx("span",{className:"text-sm font-medium",children:"Tool Usage (Top 20)"})}),c.jsx("div",{className:"flex flex-col gap-1",children:e.map(n=>{const a=t>0?n.count/t*100:0,s=n.count>0?n.error_count/n.count*100:0,l=100-s;return c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"w-[140px] shrink-0 text-right pr-1",children:c.jsx("span",{className:"text-[11px] text-foreground truncate",children:n.name})}),c.jsx("div",{className:"flex-1 h-3 bg-muted/30 rounded-sm overflow-hidden",children:c.jsxs("div",{className:"h-full flex rounded-sm",style:{width:`${a}%`},children:[c.jsx("div",{className:"h-full bg-blue-500/70",style:{width:`${l}%`}}),n.error_count>0&&c.jsx("div",{className:"h-full bg-red-500/70",style:{width:`${s}%`}})]})}),c.jsxs("span",{className:"w-[64px] shrink-0 text-[10px] text-muted-foreground text-right tabular-nums",children:[n.count,n.error_count>0&&c.jsxs("span",{className:"text-red-500 ml-1",children:["(",n.error_count,")"]})]})]},n.name)})}),c.jsxs("div",{className:"flex items-center gap-3 mt-2",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:"w-2 h-2 rounded-sm bg-blue-500/70"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Success"})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:"w-2 h-2 rounded-sm bg-red-500/70"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Error"})]})]})]})}function aj({projects:e}){return e.length===0?null:c.jsxs("div",{className:"rounded-lg border p-4",children:[c.jsx("div",{className:"flex items-center gap-2 mb-2",children:c.jsx("span",{className:"text-sm font-medium",children:"Top Projects"})}),c.jsxs("table",{className:"w-full text-sm",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"border-b text-xs text-muted-foreground",children:[c.jsx("th",{className:"text-left py-1.5 font-medium",children:"Project"}),c.jsx("th",{className:"text-right py-1.5 font-medium w-[80px]",children:"Sessions"}),c.jsx("th",{className:"text-right py-1.5 font-medium w-[80px]",children:"Turns"})]})}),c.jsx("tbody",{children:e.map(t=>{const n=t.work_dir.split("/"),a=n[n.length-1]||t.work_dir;return c.jsxs("tr",{className:"border-b last:border-b-0",children:[c.jsx("td",{className:"py-1.5 truncate max-w-[300px]",title:t.work_dir,children:a}),c.jsx("td",{className:"py-1.5 text-right tabular-nums",children:t.sessions}),c.jsx("td",{className:"py-1.5 text-right tabular-nums",children:t.turns})]},t.work_dir)})})]})]})}function ij(){const[e,t]=v.useState(null),[n,a]=v.useState(!0),[s,l]=v.useState(null);if(v.useEffect(()=>{a(!0),l(null),k5().then(t).catch(f=>l(f instanceof Error?f.message:String(f))).finally(()=>a(!1))},[]),n)return c.jsxs("div",{className:"flex-1 overflow-auto p-4 space-y-4",children:[c.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[0,1,2,3].map(f=>c.jsxs("div",{className:"rounded-lg border p-4 space-y-2",children:[c.jsx("div",{className:"h-7 w-20 rounded bg-muted animate-pulse"}),c.jsx("div",{className:"h-3 w-16 rounded bg-muted animate-pulse"})]},f))}),c.jsx("div",{className:"h-[160px] rounded-lg border bg-muted/30 animate-pulse"}),c.jsx("div",{className:"h-[200px] rounded-lg border bg-muted/30 animate-pulse"})]});if(s)return c.jsxs("div",{className:"flex-1 flex items-center justify-center text-red-500 text-sm",children:["Failed to load statistics: ",s]});if(!e)return null;const u=e.total_tokens.input+e.total_tokens.output;return c.jsxs("div",{className:"flex-1 overflow-auto p-4 space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[c.jsx(od,{label:"Total Sessions",value:String(e.total_sessions)}),c.jsx(od,{label:"Total Turns",value:String(e.total_turns)}),c.jsx(od,{label:"Total Tokens",value:xm(u)}),c.jsx(od,{label:"Total Duration",value:ej(e.total_duration_sec)})]}),c.jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["Tokens: ",xm(e.total_tokens.input)," input / ",xm(e.total_tokens.output)," output"]}),c.jsx(nj,{daily:e.daily_usage}),c.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[c.jsx(rj,{tools:e.tool_usage}),c.jsx(aj,{projects:e.per_project})]})]})}function Tl(e){return e.type==="ToolResult"?e.payload.return_value?.is_error===!0:e.type==="StepInterrupted"?!0:e.type==="ApprovalResponse"?e.payload.response==="reject":!1}const sj={TurnBegin:"bg-blue-500/15 text-blue-700 dark:text-blue-300 border-blue-500/30",TurnEnd:"bg-blue-500/15 text-blue-700 dark:text-blue-300 border-blue-500/30",SteerInput:"bg-blue-500/15 text-blue-700 dark:text-blue-300 border-blue-500/30",StepBegin:"bg-green-500/15 text-green-700 dark:text-green-300 border-green-500/30",StepInterrupted:"bg-yellow-500/15 text-yellow-700 dark:text-yellow-300 border-yellow-500/30",CompactionBegin:"bg-orange-500/15 text-orange-700 dark:text-orange-300 border-orange-500/30",CompactionEnd:"bg-orange-500/15 text-orange-700 dark:text-orange-300 border-orange-500/30",MCPLoadingBegin:"bg-cyan-500/15 text-cyan-700 dark:text-cyan-300 border-cyan-500/30",MCPLoadingEnd:"bg-cyan-500/15 text-cyan-700 dark:text-cyan-300 border-cyan-500/30",StatusUpdate:"bg-gray-500/15 text-gray-700 dark:text-gray-300 border-gray-500/30",Notification:"bg-yellow-500/15 text-yellow-700 dark:text-yellow-300 border-yellow-500/30",TextPart:"bg-gray-500/15 text-gray-700 dark:text-gray-300 border-gray-500/30",ThinkPart:"bg-gray-500/15 text-gray-700 dark:text-gray-300 border-gray-500/30",PlanDisplay:"bg-teal-500/15 text-teal-700 dark:text-teal-300 border-teal-500/30",ToolCall:"bg-purple-500/15 text-purple-700 dark:text-purple-300 border-purple-500/30",ToolResult:"bg-purple-500/15 text-purple-700 dark:text-purple-300 border-purple-500/30",ToolCallPart:"bg-purple-500/15 text-purple-700 dark:text-purple-300 border-purple-500/30",ToolCallRequest:"bg-purple-500/15 text-purple-700 dark:text-purple-300 border-purple-500/30",QuestionRequest:"bg-amber-500/15 text-amber-700 dark:text-amber-300 border-amber-500/30",ApprovalRequest:"bg-amber-500/15 text-amber-700 dark:text-amber-300 border-amber-500/30",ApprovalResponse:"bg-amber-500/15 text-amber-700 dark:text-amber-300 border-amber-500/30",SubagentEvent:"bg-indigo-500/15 text-indigo-700 dark:text-indigo-300 border-indigo-500/30",ImageURLPart:"bg-pink-500/15 text-pink-700 dark:text-pink-300 border-pink-500/30",VideoURLPart:"bg-pink-500/15 text-pink-700 dark:text-pink-300 border-pink-500/30",AudioURLPart:"bg-pink-500/15 text-pink-700 dark:text-pink-300 border-pink-500/30"};function gk(e){return sj[e]??"bg-secondary text-secondary-foreground border-border"}function Ud(e){return new Date(e*1e3).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function lj(e,t){const n=e-t;return n<.001?"":n<1?`+${(n*1e3).toFixed(0)}ms`:n<60?`+${n.toFixed(2)}s`:`+${(n/60).toFixed(1)}min`}function b2(e){return e>60?"text-red-500 font-medium":e>10?"text-amber-600 dark:text-amber-400 font-medium":"text-muted-foreground"}function y2(e){return e>60?"bg-red-300 dark:bg-red-700":e>10?"bg-amber-300 dark:bg-amber-700":"bg-border"}function Tn(e,t){return e.length>t?e.slice(0,t)+"…":e}function E2(e){if(typeof e=="string")return Tn(e,120);if(Array.isArray(e)&&e.length>0){const t=e[0];return Tn(String(t.text??""),120)}return""}function xk(e){const t=e.payload;switch(e.type){case"TurnBegin":return E2(t.user_input);case"SteerInput":return E2(t.user_input);case"StepBegin":return`Step ${t.n}`;case"TextPart":return Tn(String(t.text??""),120);case"ThinkPart":return Tn(String(t.think??t.thinking??""),120);case"ToolCall":{const n=t.function;if(!n)return"";const a=n.name;let s="";try{const l=JSON.parse(n.arguments);if(a==="ReadFile"||a==="ReadMediaFile"||a==="PlanModeReadFile")s=` ${l.path}`,(l.line_offset||l.n_lines)&&(s+=` [${l.line_offset??1}:${l.n_lines??""}]`);else if(a==="WriteFile")s=` ${l.path}`;else if(a==="StrReplaceFile")s=` ${l.path}`;else if(a==="Shell"){const u=String(l.command??"");s=` ${Tn(u,80)}`,l.run_in_background&&(s+=" [bg]")}else if(a==="Glob")s=` ${l.pattern}`,l.directory&&(s+=` in ${l.directory}`);else if(a==="Grep")s=` /${l.pattern}/`,l.path&&(s+=` in ${l.path}`);else if(a==="Agent")s=` ${Tn(String(l.description??""),60)}`,l.subagent_type&&(s+=` [${l.subagent_type}]`);else if(a==="SearchWeb"||a==="FetchURL")s=` ${Tn(String(l.query??l.url??""),80)}`;else if(a==="SetTodoList"){const u=l.items;s=u?` (${u.length} items)`:""}else a==="AskUserQuestion"&&(s=` ${Tn(String(l.question??""),60)}`)}catch{}return`${a}()${s}`}case"ToolCallPart":return Tn(String(t.arguments_part??""),80);case"ToolResult":{const n=t.return_value;if(n){const a=n.is_error?"[error] ":"",s=n.message,l=n.output;return s&&s.length>0?`${a}${Tn(s,120)}`:typeof l=="string"?`${a}${Tn(l,120)}`:Array.isArray(l)?`${a}${l.length} part(s)`:a||"result"}return`tool_call_id: ${t.tool_call_id}`}case"StatusUpdate":{const n=[];if(t.context_usage!=null&&n.push(`ctx: ${(t.context_usage*100).toFixed(1)}%`),t.context_tokens!=null&&t.max_context_tokens!=null){const l=t.context_tokens,u=t.max_context_tokens;n.push(`${(l/1e3).toFixed(1)}k / ${(u/1e3).toFixed(0)}k tokens`)}const a=t.token_usage;if(a){const l=Number(a.input_other??0),u=Number(a.input_cache_read??0),f=Number(a.input_cache_creation??0),h=Number(a.output??0),m=l+u+f;if(m>0){const p=m>0?(u/m*100).toFixed(0):"0";n.push(`in: ${(m/1e3).toFixed(1)}k (${p}% cache)`)}h>0&&n.push(`out: ${(h/1e3).toFixed(1)}k`)}const s=t.mcp_status;return s&&s.connected!=null&&n.push(`MCP: ${s.connected}/${s.total} (${s.tools} tools)`),n.join(" · ")}case"Notification":{const n=t.severity,a=String(t.title??"");return`${n?`[${n}] `:""}${Tn(a,100)}`}case"PlanDisplay":{const n=String(t.content??""),a=t.file_path;return a?`${a}: ${Tn(n,80)}`:Tn(n,120)}case"ToolCallRequest":{const n=t.name;return n?`${n}()`:""}case"QuestionRequest":{const n=t.questions;if(n&&n.length>0){const a=String(n[0].text??n[0].question??"");return`${n.length} question(s): ${Tn(a,80)}`}return""}case"ApprovalRequest":return`${t.sender}: ${t.action}`;case"ApprovalResponse":{const n=String(t.response??""),a=t.feedback;return a?`${n}: ${Tn(a,80)}`:n}case"SubagentEvent":{const n=t.event,a=n?.type,s=n?.payload,l=t.subagent_type,u=t.agent_id;let f="";if(a==="ToolCall"&&s){const p=s.function;f=p?` ${p.name}()`:""}else if(a==="TurnBegin"&&s){const p=s.user_input;f=typeof p=="string"?` "${Tn(p,60)}"`:""}else a&&(f=` ${a}`);const h=l?`[${l}]`:`task:${String(t.parent_tool_call_id??"").slice(0,8)}`,m=u?` (${u.slice(0,6)})`:"";return`${h}${m}${f}`}default:return""}}function oj({event:e,expanded:t,onToggle:n,onSelect:a,selected:s,prevEvent:l,nestLevel:u=0,linkedToolName:f,linkedToolCallId:h,searchMatch:m}){const p=xk(e),g=l?lj(e.timestamp,l.timestamp):"",y=e.type==="TurnBegin"||e.type==="TurnEnd",T=u>0,S=Tl(e),k=e.type==="ToolCall"||e.type==="ToolResult";return c.jsxs("div",{className:`border-b py-1.5 ${y?"bg-muted/30":""} ${T?"border-l-2 border-l-purple-400/50 dark:border-l-purple-500/40":""} ${S?"bg-red-500/8 border-l-2 border-l-red-500/70":""} ${m?"bg-yellow-500/10":""} ${s?"ring-1 ring-primary/50 bg-primary/5":""}`,style:{paddingLeft:`${16+u*20}px`,paddingRight:16},children:[g&&l&&e.timestamp-l.timestamp>1&&c.jsxs("div",{className:"flex items-center gap-2 py-1 mb-1",children:[c.jsx("div",{className:`h-px flex-1 ${y2(e.timestamp-l.timestamp)}`}),c.jsx("span",{className:`text-[10px] ${b2(e.timestamp-l.timestamp)}`,children:g}),c.jsx("div",{className:`h-px flex-1 ${y2(e.timestamp-l.timestamp)}`})]}),c.jsxs("button",{onClick:n,className:"flex w-full items-start gap-2 text-left",children:[c.jsx("span",{className:"mt-0.5 text-muted-foreground",children:t?c.jsx($t,{size:14}):c.jsx(cn,{size:14})}),c.jsx("span",{className:"mt-0.5 shrink-0 font-mono text-[11px] text-muted-foreground w-[90px]",children:Ud(e.timestamp)}),S&&c.jsx(fi,{size:13,className:"mt-0.5 shrink-0 text-red-500"}),c.jsx("span",{className:`mt-0.5 shrink-0 rounded border px-1.5 py-0 text-[11px] font-medium ${S?"bg-red-500/15 text-red-700 dark:text-red-300 border-red-500/30":gk(e.type)}`,children:e.type}),T&&f&&c.jsxs("span",{className:"mt-0.5 flex items-center gap-0.5 shrink-0",children:[c.jsx(D6,{size:9,className:"text-purple-500/60"}),c.jsx("span",{className:"text-[10px] font-mono text-purple-600 dark:text-purple-400",children:f})]}),h&&c.jsx("span",{className:"mt-0.5 shrink-0 text-[9px] font-mono text-muted-foreground bg-purple-500/10 px-1 py-0 rounded",children:h.slice(0,12)}),p&&c.jsx("span",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:p}),k&&a&&c.jsx("span",{role:"button",tabIndex:0,onClick:N=>{N.stopPropagation(),a()},onKeyDown:N=>{N.key==="Enter"&&(N.stopPropagation(),a())},className:"mt-0.5 shrink-0 text-[10px] text-blue-600 dark:text-blue-400 hover:underline cursor-pointer",title:"Show tool call details",children:"detail"}),g&&e.timestamp-(l?.timestamp??0)<=1&&c.jsx("span",{className:`mt-0.5 ml-auto shrink-0 text-[10px] ${b2(e.timestamp-(l?.timestamp??0))}`,children:g})]}),t&&e.type==="SubagentEvent"&&c.jsx(bk,{payload:e.payload,depth:u+1}),t&&e.type==="ApprovalRequest"&&c.jsx(dj,{payload:e.payload}),t&&e.type!=="SubagentEvent"&&e.type!=="ApprovalRequest"&&c.jsx(Ki,{payload:e.payload})]})}function Ki({payload:e}){const[t,n]=v.useState(!1),[a,s]=v.useState(!0),l=JSON.stringify(e,null,2),u=async()=>{await navigator.clipboard.writeText(l),n(!0),setTimeout(()=>n(!1),2e3)};return c.jsxs("div",{className:"mt-2 ml-6 mb-2 rounded-md border bg-card relative group/payload",children:[c.jsxs("div",{className:"absolute top-1.5 right-1.5 flex items-center gap-1 opacity-0 group-hover/payload:opacity-100 transition-opacity z-10",children:[c.jsx("button",{onClick:()=>s(!a),className:`rounded p-1 hover:bg-muted ${a?"text-foreground bg-muted/60":"text-muted-foreground"}`,title:a?"No wrap":"Wrap lines",children:c.jsx(i4,{size:14})}),c.jsx("button",{onClick:u,className:"rounded p-1 hover:bg-muted text-muted-foreground hover:text-foreground",title:"Copy JSON",children:t?c.jsx(vu,{size:14}):c.jsx(af,{size:14})})]}),c.jsx("pre",{className:`overflow-auto text-xs font-mono leading-relaxed text-card-foreground max-h-[500px] p-3 ${a?"whitespace-pre-wrap break-all":"whitespace-pre"}`,children:l})]})}const uj=5;function bk({payload:e,depth:t}){const[n,a]=v.useState(!1),s=String(e.parent_tool_call_id??"").slice(0,12),l=e.subagent_type,u=e.agent_id,f=e.event;if(!f)return c.jsx(Ki,{payload:e});const h=f.type,m=f.payload??{};if(t>uj)return c.jsxs("div",{className:"mt-2 ml-6 mb-2",children:[c.jsx("div",{className:"text-[10px] text-muted-foreground italic mb-1",children:"Max nesting depth reached — showing raw JSON"}),c.jsx(Ki,{payload:e})]});const p=h?xk({type:h,payload:m}):"",g=h==="SubagentEvent",y=h?Tl({type:h,payload:m}):!1;return c.jsxs("div",{className:"mt-2 ml-4 mb-2 border-l-2 border-l-indigo-400/50 dark:border-l-indigo-500/40 pl-3",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[c.jsx(Mr,{size:12,className:"text-indigo-500 shrink-0"}),l&&c.jsx("span",{className:"text-[9px] font-medium rounded border px-1 py-0 bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 border-indigo-500/20",children:l}),c.jsx("span",{className:"text-[10px] font-mono text-indigo-600 dark:text-indigo-400",children:u?u.slice(0,8):`task:${s}`}),c.jsx("button",{onClick:()=>a(T=>!T),className:"text-[10px] text-muted-foreground hover:text-foreground",children:n?"hide raw":"raw"})]}),n&&c.jsx(Ki,{payload:e}),h&&c.jsxs("div",{className:`rounded border px-3 py-1.5 ${y?"bg-red-500/5 border-red-500/20":"bg-indigo-500/5 border-indigo-500/15"}`,children:[c.jsxs("div",{className:"flex items-center gap-2",children:[y&&c.jsx(fi,{size:11,className:"shrink-0 text-red-500"}),c.jsx("span",{className:`shrink-0 rounded border px-1.5 py-0 text-[10px] font-medium ${y?"bg-red-500/15 text-red-700 dark:text-red-300 border-red-500/30":gk(h)}`,children:h}),p&&c.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:p})]}),g?c.jsx(bk,{payload:m,depth:t+1}):c.jsx(cj,{type:h,payload:m})]})]})}function cj({type:e,payload:t}){const[n,a]=v.useState(!1);if(e==="TextPart"&&t.text)return c.jsx("div",{className:"mt-1 text-xs text-muted-foreground whitespace-pre-wrap max-h-32 overflow-auto",children:String(t.text).slice(0,500)});if(e==="ToolCall"){const s=t.function;return c.jsxs("div",{className:"mt-1",children:[c.jsxs("span",{className:"text-[10px] font-mono text-purple-600 dark:text-purple-400",children:[s?.name,"()"]}),n&&c.jsx("pre",{className:"mt-1 overflow-auto whitespace-pre-wrap text-[10px] font-mono text-muted-foreground max-h-32",children:(()=>{if(!s?.arguments)return"{}";try{return JSON.stringify(JSON.parse(s.arguments),null,2)}catch{return String(s.arguments)}})()}),c.jsx("button",{onClick:()=>a(l=>!l),className:"text-[9px] text-muted-foreground hover:text-foreground ml-1",children:n?"hide args":"show args"})]})}if(e==="ToolResult"){const s=t.return_value,l=s?.is_error===!0,u=s?.output;return c.jsxs("div",{className:"mt-1",children:[l&&c.jsx("span",{className:"text-[10px] text-red-500 font-medium",children:"[error] "}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:typeof u=="string"?u.slice(0,200):JSON.stringify(u).slice(0,200)}),n&&c.jsx(Ki,{payload:t}),c.jsx("button",{onClick:()=>a(f=>!f),className:"text-[9px] text-muted-foreground hover:text-foreground ml-1",children:n?"hide":"more"})]})}return c.jsxs("div",{className:"mt-1",children:[c.jsx("button",{onClick:()=>a(s=>!s),className:"text-[9px] text-muted-foreground hover:text-foreground",children:n?"hide payload":"show payload"}),n&&c.jsx(Ki,{payload:t})]})}function dj({payload:e}){const[t,n]=v.useState(!1),a=e.display??[];return c.jsxs("div",{className:"mt-2 ml-6 mb-2 space-y-2",children:[c.jsxs("div",{className:"rounded border bg-amber-500/5 border-amber-500/15 px-3 py-2",children:[c.jsxs("div",{className:"flex items-center gap-2 text-[11px]",children:[c.jsx("span",{className:"font-medium text-amber-700 dark:text-amber-300",children:String(e.sender??"")}),c.jsx("span",{className:"text-muted-foreground",children:"wants to"}),c.jsx("span",{className:"font-mono font-medium text-foreground",children:String(e.action??"")})]}),e.description!=null&&c.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:String(e.description)}),c.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[c.jsxs("span",{className:"text-[9px] font-mono text-muted-foreground",children:["id: ",String(e.id??"").slice(0,12)]}),c.jsx("button",{onClick:()=>n(s=>!s),className:"text-[9px] text-muted-foreground hover:text-foreground",children:t?"hide raw":"raw"})]})]}),t&&c.jsx(Ki,{payload:e}),a.map((s,l)=>c.jsx(fj,{block:s},l))]})}function fj({block:e}){const t=e.type;return t==="diff"?c.jsx(hj,{block:e}):t==="shell"?c.jsx(mj,{block:e}):t==="todo"?c.jsx(pj,{block:e}):t==="brief"?c.jsx(gj,{block:e}):t==="background_task"?c.jsx(xj,{block:e}):c.jsxs("div",{className:"rounded border bg-muted/20 px-3 py-2",children:[c.jsxs("div",{className:"text-[10px] font-mono text-muted-foreground mb-1",children:["[",t??"unknown","]"]}),c.jsx("pre",{className:"overflow-auto whitespace-pre-wrap text-[10px] font-mono text-muted-foreground max-h-32",children:JSON.stringify(e,null,2)})]})}function hj({block:e}){const[t,n]=v.useState(!0),a=String(e.path??""),s=String(e.old_text??""),l=String(e.new_text??""),u=s.split(`
60
+ `),f=l.split(`
61
+ `);return c.jsxs("div",{className:"rounded border bg-card overflow-hidden",children:[c.jsxs("button",{onClick:()=>n(h=>!h),className:"flex items-center gap-1.5 w-full px-3 py-1.5 text-left hover:bg-muted/50 text-[11px]",children:[c.jsx(S6,{size:12,className:"text-blue-500 shrink-0"}),c.jsx("span",{className:"font-mono truncate",children:a}),t?c.jsx($t,{size:11}):c.jsx(cn,{size:11})]}),t&&c.jsxs("div",{className:"border-t max-h-64 overflow-auto",children:[u.length>0&&s&&c.jsx("div",{children:u.map((h,m)=>c.jsxs("div",{className:"px-3 py-0 bg-red-500/10 text-red-700 dark:text-red-300 font-mono text-[10px] leading-5",children:[c.jsx("span",{className:"select-none text-red-500/60 mr-2",children:"-"}),h]},`old-${m}`))}),f.length>0&&l&&c.jsx("div",{children:f.map((h,m)=>c.jsxs("div",{className:"px-3 py-0 bg-green-500/10 text-green-700 dark:text-green-300 font-mono text-[10px] leading-5",children:[c.jsx("span",{className:"select-none text-green-500/60 mr-2",children:"+"}),h]},`new-${m}`))})]})]})}function mj({block:e}){const t=String(e.command??""),n=String(e.language??"bash");return c.jsxs("div",{className:"rounded border bg-zinc-900 dark:bg-zinc-950 overflow-hidden",children:[c.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 border-b border-zinc-700",children:[c.jsx(Gv,{size:11,className:"text-green-400"}),c.jsx("span",{className:"text-[10px] text-zinc-400",children:n})]}),c.jsx("pre",{className:"px-3 py-2 overflow-auto whitespace-pre-wrap text-[11px] font-mono text-green-300 max-h-48",children:t})]})}function pj({block:e}){const t=e.items??[];return c.jsxs("div",{className:"rounded border bg-card px-3 py-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[c.jsx(j6,{size:12,className:"text-blue-500"}),c.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:"Todo"})]}),c.jsx("div",{className:"space-y-0.5",children:t.map((n,a)=>{const s=n.status,l=s==="done"?"✓":s==="in_progress"?"▶":"○",u=s==="done"?"text-green-600":s==="in_progress"?"text-blue-600":"text-muted-foreground";return c.jsxs("div",{className:`flex items-center gap-1.5 text-[11px] ${u}`,children:[c.jsx("span",{className:"shrink-0 w-3 text-center",children:l}),c.jsx("span",{children:String(n.title??"")})]},a)})})]})}function gj({block:e}){return c.jsx("div",{className:"rounded border bg-card px-3 py-2 text-xs text-muted-foreground",children:String(e.text??"")})}function xj({block:e}){const t=String(e.status??"unknown"),n=String(e.description??""),a=String(e.task_id??"").slice(0,12),s=String(e.kind??""),l=t==="running"?"text-blue-600 dark:text-blue-400":t==="completed"?"text-green-600 dark:text-green-400":t==="failed"?"text-red-500":"text-muted-foreground";return c.jsxs("div",{className:"rounded border bg-card px-3 py-2",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(rf,{size:12,className:"text-blue-500 shrink-0"}),c.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:"Background Task"}),s&&c.jsx("span",{className:"text-[9px] font-mono bg-muted px-1 rounded",children:s}),c.jsx("span",{className:`text-[10px] font-medium ${l}`,children:t}),c.jsx("span",{className:"text-[9px] font-mono text-muted-foreground ml-auto",children:a})]}),n&&c.jsx("div",{className:"mt-1 text-xs text-muted-foreground",children:n})]})}const T2=[{label:"All Events",types:new Set,errorsOnly:!1},{label:"Errors Only",types:new Set,errorsOnly:!0},{label:"Tool Calls",types:new Set(["ToolCall","ToolResult","ToolCallPart"]),errorsOnly:!1},{label:"Thinking",types:new Set(["ThinkPart","TextPart"]),errorsOnly:!1},{label:"Approvals",types:new Set(["ApprovalRequest","ApprovalResponse"]),errorsOnly:!1},{label:"Sub-agents",types:new Set(["SubagentEvent"]),errorsOnly:!1}];function bj(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const yj={TurnBegin:"bg-blue-500/20 border-blue-500/40 text-blue-700 dark:text-blue-300",TurnEnd:"bg-blue-500/20 border-blue-500/40 text-blue-700 dark:text-blue-300",SteerInput:"bg-blue-500/20 border-blue-500/40 text-blue-700 dark:text-blue-300",StepBegin:"bg-green-500/20 border-green-500/40 text-green-700 dark:text-green-300",StepInterrupted:"bg-yellow-500/20 border-yellow-500/40 text-yellow-700 dark:text-yellow-300",CompactionBegin:"bg-orange-500/20 border-orange-500/40 text-orange-700 dark:text-orange-300",CompactionEnd:"bg-orange-500/20 border-orange-500/40 text-orange-700 dark:text-orange-300",MCPLoadingBegin:"bg-cyan-500/20 border-cyan-500/40 text-cyan-700 dark:text-cyan-300",MCPLoadingEnd:"bg-cyan-500/20 border-cyan-500/40 text-cyan-700 dark:text-cyan-300",StatusUpdate:"bg-gray-500/20 border-gray-500/40 text-gray-700 dark:text-gray-300",Notification:"bg-yellow-500/20 border-yellow-500/40 text-yellow-700 dark:text-yellow-300",TextPart:"bg-gray-500/20 border-gray-500/40 text-gray-700 dark:text-gray-300",ThinkPart:"bg-gray-500/20 border-gray-500/40 text-gray-700 dark:text-gray-300",PlanDisplay:"bg-teal-500/20 border-teal-500/40 text-teal-700 dark:text-teal-300",ToolCall:"bg-purple-500/20 border-purple-500/40 text-purple-700 dark:text-purple-300",ToolResult:"bg-purple-500/20 border-purple-500/40 text-purple-700 dark:text-purple-300",ToolCallPart:"bg-purple-500/20 border-purple-500/40 text-purple-700 dark:text-purple-300",ToolCallRequest:"bg-purple-500/20 border-purple-500/40 text-purple-700 dark:text-purple-300",QuestionRequest:"bg-amber-500/20 border-amber-500/40 text-amber-700 dark:text-amber-300",ApprovalRequest:"bg-amber-500/20 border-amber-500/40 text-amber-700 dark:text-amber-300",ApprovalResponse:"bg-amber-500/20 border-amber-500/40 text-amber-700 dark:text-amber-300",SubagentEvent:"bg-indigo-500/20 border-indigo-500/40 text-indigo-700 dark:text-indigo-300"};function Ej({allTypes:e,selectedTypes:t,onToggle:n,total:a,filteredCount:s,allExpanded:l,onExpandAll:u,onCollapseAll:f,searchQuery:h,onSearchChange:m,searchMatchCount:p,errorCount:g,errorsOnly:y,onToggleErrorsOnly:T,onNextError:S,onPrevError:k,viewMode:N="events",onViewModeChange:_,showUsageChart:A,onToggleUsageChart:w,onApplyPreset:P,integrityScore:F,onToggleIntegrity:M}){const I=T2.findIndex(j=>bj(j.types,t)&&j.errorsOnly===y);return c.jsxs("div",{className:"border-b px-4 py-2 space-y-2",children:[P&&c.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[c.jsx(og,{size:12,className:"text-muted-foreground mr-0.5"}),T2.map((j,G)=>c.jsx("button",{onClick:()=>P(j.types,j.errorsOnly),className:`rounded-full border px-2 py-0.5 text-[11px] font-medium transition-colors ${I===G?"bg-primary/15 border-primary/40 text-foreground":"bg-muted/50 border-border text-muted-foreground hover:text-foreground hover:bg-muted"}`,children:j.label},j.label))]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"relative flex-1 max-w-xs",children:[c.jsx(lg,{size:13,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),c.jsx("input",{type:"text",value:h,onChange:j=>m(j.target.value),placeholder:"Search events...","data-wire-search":!0,className:"w-full rounded border bg-background pl-7 pr-7 py-1 text-xs focus:outline-none focus:ring-1 focus:ring-ring"}),h&&c.jsx("button",{onClick:()=>m(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:c.jsx(Su,{size:12})})]}),h&&c.jsxs("span",{className:"text-[11px] text-muted-foreground shrink-0",children:[p," matches"]}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs("button",{onClick:T,className:`flex items-center gap-1 rounded border px-1.5 py-0.5 text-[11px] transition-colors ${y?"bg-red-500/15 border-red-500/30 text-red-700 dark:text-red-300":"text-muted-foreground hover:text-foreground hover:bg-muted"}`,title:"Show errors only",children:[c.jsx(fi,{size:12}),g," errors"]}),g>0&&c.jsxs(c.Fragment,{children:[c.jsx("button",{onClick:k,className:"rounded border p-0.5 text-muted-foreground hover:text-foreground hover:bg-muted",title:"Previous error",children:c.jsx(rg,{size:14})}),c.jsx("button",{onClick:S,className:"rounded border p-0.5 text-muted-foreground hover:text-foreground hover:bg-muted",title:"Next error",children:c.jsx($t,{size:14})})]}),c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:t.size>0||y||h?`${s} / ${a}`:`${a}`}),c.jsxs("button",{onClick:l?f:u,className:"flex items-center gap-1 rounded border px-1.5 py-0.5 text-[11px] text-muted-foreground hover:text-foreground hover:bg-muted transition-colors",title:l?"Collapse all":"Expand all",children:[l?c.jsx(t6,{size:12}):c.jsx(r6,{size:12}),l?"Collapse":"Expand"]}),w&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs("button",{onClick:w,className:`flex items-center gap-1 rounded border px-1.5 py-0.5 text-[11px] transition-colors ${A?"bg-primary/10 text-foreground border-primary/30":"text-muted-foreground hover:text-foreground hover:bg-muted"}`,title:"Toggle context usage chart",children:[c.jsx(ng,{size:12}),"Chart"]})]}),_&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs("div",{className:"flex items-center rounded border overflow-hidden",children:[c.jsxs("button",{onClick:()=>_("events"),className:`flex items-center gap-1 px-1.5 py-0.5 text-[11px] transition-colors ${N==="events"?"bg-primary/10 text-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"}`,title:"Events view",children:[c.jsx(ig,{size:12}),"Events"]}),c.jsx("div",{className:"w-px h-4 bg-border"}),c.jsxs("button",{onClick:()=>_("timeline"),className:`flex items-center gap-1 px-1.5 py-0.5 text-[11px] transition-colors ${N==="timeline"?"bg-primary/10 text-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"}`,title:"Timeline view",children:[c.jsx(Q5,{size:12}),"Timeline"]}),c.jsx("div",{className:"w-px h-4 bg-border"}),c.jsxs("button",{onClick:()=>_("decisions"),className:`flex items-center gap-1 px-1.5 py-0.5 text-[11px] transition-colors ${N==="decisions"?"bg-primary/10 text-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted"}`,title:"Decisions view",children:[c.jsx(tg,{size:12}),"Decisions"]})]})]}),F!=null&&M&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"h-4 w-px bg-border"}),c.jsxs("button",{onClick:M,className:`flex items-center gap-0.5 rounded border px-1.5 py-0.5 text-[10px] font-medium transition-colors ${F===100?"bg-green-500/15 border-green-500/30 text-green-700 dark:text-green-300":F>=80?"bg-amber-500/15 border-amber-500/30 text-amber-700 dark:text-amber-300":"bg-red-500/15 border-red-500/30 text-red-700 dark:text-red-300"}`,title:"Toggle integrity panel",children:[F===100?c.jsx(Wm,{size:11}):c.jsx(Yv,{size:11}),F===100?"✓ 100%":`${F}%`]})]})]}),c.jsx("div",{className:"flex items-center gap-1.5 flex-wrap",children:e.map(j=>{const G=t.has(j),B=yj[j]??"bg-secondary border-border text-secondary-foreground";return c.jsx("button",{onClick:()=>n(j),className:`rounded-full border px-2 py-0.5 text-[11px] font-medium transition-opacity ${B} ${G||t.size===0?"opacity-100":"opacity-40"}`,children:j},j)})})]})}function Tj(e){const t=[],n=new Map,a=new Map;let s=null,l=null;for(const u of e)if(u.type==="TurnBegin"){const f=u.payload;let h="";if(typeof f.user_input=="string")h=f.user_input.slice(0,60);else if(Array.isArray(f.user_input)&&f.user_input.length>0){const m=f.user_input[0];h=String(m.text??"").slice(0,60)}s={eventIndex:u.index,turnNumber:t.length+1,userInput:h,steps:[],hasCompaction:!1,hasError:!1},t.push(s),l=null}else if(u.type==="StepBegin"&&s)l={eventIndex:u.index,stepNumber:s.steps.length+1,toolCalls:[],subagents:[],hasError:!1},s.steps.push(l),a.clear();else if(u.type==="ToolCall"&&l){const h=u.payload.function?.name??"tool",m=u.payload.id;l.toolCalls.push({eventIndex:u.index,name:h,hasError:!1}),m&&n.set(m,l.toolCalls[l.toolCalls.length-1])}else if(u.type==="ToolResult"){const f=u.payload.tool_call_id,h=u.payload.return_value;if(f&&h?.is_error===!0){const m=n.get(f);m&&(m.hasError=!0)}}else if(u.type==="SubagentEvent"&&l){const f=u.payload.parent_tool_call_id??"",h=u.payload.event,m=h?.type??"",p=h?.payload??{};let g=m;m==="ToolCall"?g=p.function?.name??"tool":m==="TurnBegin"&&(g="TurnBegin");let y=a.get(f);y||(y={eventIndex:u.index,taskToolCallId:f,agentType:u.payload.subagent_type,agentId:u.payload.agent_id,innerEvents:[]},a.set(f,y),l.subagents.push(y)),y.innerEvents.push({type:m,summary:g})}else u.type==="CompactionBegin"&&s?s.hasCompaction=!0:Tl(u)&&(l&&(l.hasError=!0),s&&(s.hasError=!0));return t}function vj({events:e,collapsed:t,onToggleCollapse:n,onScrollToIndex:a,visibleRange:s}){const l=v.useMemo(()=>Tj(e),[e]);return t?c.jsx("div",{className:"flex flex-col items-center border-r py-2 px-1",children:c.jsx("button",{onClick:n,className:"rounded p-1 hover:bg-muted text-muted-foreground",title:"Show navigation",children:c.jsx(q6,{size:14})})}):c.jsxs("div",{className:"flex flex-col border-r w-56 shrink-0 overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b",children:[c.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:"Navigation"}),c.jsx("button",{onClick:n,className:"rounded p-0.5 hover:bg-muted text-muted-foreground",title:"Hide navigation",children:c.jsx(F6,{size:13})})]}),c.jsx("div",{className:"flex-1 overflow-auto py-1",children:l.map(u=>c.jsx(Sj,{turn:u,onScrollToIndex:a,visibleRange:s},u.eventIndex))})]})}function Sj({turn:e,onScrollToIndex:t,visibleRange:n}){const[a,s]=v.useState(!0),l=n&&e.eventIndex>=n[0]&&e.eventIndex<=n[1];return c.jsxs("div",{className:"text-[11px]",children:[c.jsxs("button",{onClick:()=>s(u=>!u),className:`flex items-center gap-1 w-full px-2 py-1 text-left hover:bg-muted/50 transition-colors ${l?"bg-muted/40 text-foreground":"text-muted-foreground"} ${e.hasError?"text-red-600 dark:text-red-400":""}`,children:[a?c.jsx($t,{size:10,className:"shrink-0 opacity-60"}):c.jsx(cn,{size:10,className:"shrink-0 opacity-60"}),c.jsxs("span",{className:"font-medium shrink-0",children:["Turn ",e.turnNumber]}),e.hasError&&c.jsx(fi,{size:10,className:"shrink-0 text-red-500"}),e.hasCompaction&&c.jsx(sg,{size:9,className:"shrink-0 text-orange-500"})]}),a&&c.jsxs(c.Fragment,{children:[e.userInput&&c.jsxs("div",{className:"pl-6 pr-2 py-0.5 text-[10px] text-muted-foreground truncate cursor-pointer hover:bg-muted/30",onClick:()=>t(e.eventIndex),title:e.userInput,children:['"',e.userInput,'"']}),e.steps.map(u=>c.jsx(kj,{step:u,onScrollToIndex:t,visibleRange:n},u.eventIndex))]})]})}function kj({step:e,onScrollToIndex:t,visibleRange:n}){const[a,s]=v.useState(!1),l=e.toolCalls.length>0||e.subagents.length>0,u=n&&e.eventIndex>=n[0]&&e.eventIndex<=n[1];return c.jsxs("div",{children:[c.jsxs("button",{onClick:()=>{l?s(f=>!f):t(e.eventIndex)},className:`flex items-center gap-1 w-full pl-6 pr-2 py-0.5 text-left hover:bg-muted/50 transition-colors text-[11px] ${u?"bg-muted/30 text-foreground":"text-muted-foreground"} ${e.hasError?"text-red-600 dark:text-red-400":""}`,children:[l?a?c.jsx($t,{size:9,className:"shrink-0 opacity-60"}):c.jsx(cn,{size:9,className:"shrink-0 opacity-60"}):c.jsx("span",{className:"shrink-0 w-[9px]"}),c.jsxs("span",{children:["Step ",e.stepNumber]}),l&&c.jsxs("span",{className:"text-[10px] opacity-60",children:["(",e.toolCalls.length," tool",e.toolCalls.length>1?"s":"",")"]}),e.hasError&&c.jsx(fi,{size:9,className:"shrink-0 text-red-500"})]}),a&&c.jsxs(c.Fragment,{children:[e.toolCalls.map(f=>c.jsxs("button",{onClick:()=>t(f.eventIndex),className:`flex items-center gap-1 w-full pl-10 pr-2 py-0.5 text-left hover:bg-muted/50 transition-colors text-[10px] text-muted-foreground ${f.hasError?"text-red-600 dark:text-red-400":""}`,children:[c.jsx("span",{className:"truncate",children:f.name}),f.hasError&&c.jsx(fi,{size:8,className:"shrink-0 text-red-500"})]},f.eventIndex)),e.subagents.map(f=>c.jsx(Nj,{node:f,onScrollToIndex:t},f.eventIndex))]})]})}function Nj({node:e,onScrollToIndex:t}){const[n,a]=v.useState(!1),s=e.innerEvents.filter(u=>u.type==="ToolCall"),l=e.innerEvents.filter(u=>u.type==="TurnBegin").length;return c.jsxs("div",{children:[c.jsxs("button",{onClick:()=>{s.length>0?a(u=>!u):t(e.eventIndex)},className:"flex items-center gap-1 w-full pl-10 pr-2 py-0.5 text-left hover:bg-muted/50 transition-colors text-[10px] text-indigo-600 dark:text-indigo-400",children:[s.length>0?n?c.jsx($t,{size:8,className:"shrink-0 opacity-60"}):c.jsx(cn,{size:8,className:"shrink-0 opacity-60"}):c.jsx("span",{className:"shrink-0 w-[8px]"}),c.jsx(Mr,{size:9,className:"shrink-0"}),c.jsx("span",{className:"truncate",children:e.agentType?`[${e.agentType}]`:`task:${e.taskToolCallId.slice(0,8)}`}),c.jsxs("span",{className:"opacity-60 shrink-0",children:[l>0&&`${l}T `,s.length>0&&`${s.length}TC`]})]}),n&&s.map((u,f)=>c.jsx("button",{onClick:()=>t(e.eventIndex),className:"flex items-center gap-1 w-full pl-14 pr-2 py-0.5 text-left hover:bg-muted/50 transition-colors text-[9px] text-muted-foreground truncate",children:u.summary},f))]})}function Cj(e,t){let n,a,s;if(e.type==="ToolCall"?(n=e.payload.id,a=e):e.type==="ToolResult"&&(n=e.payload.tool_call_id,s=e),!n)return null;for(const p of t)p.type==="ToolCall"&&p.payload.id===n&&!a&&(a=p),p.type==="ToolResult"&&p.payload.tool_call_id===n&&!s&&(s=p);if(!a)return null;const u=a.payload.function?.name??"unknown",f=a&&s?s.timestamp-a.timestamp:null,m=s?.payload.return_value?.is_error===!0;return{toolCall:a,toolResult:s??null,toolName:u,toolCallId:n,durationSec:f,isError:m}}function _j(e){return e<.001?"<1ms":e<1?`${(e*1e3).toFixed(0)}ms`:e<60?`${e.toFixed(2)}s`:`${(e/60).toFixed(1)}min`}function Aj({selectedEvent:e,allEvents:t,onClose:n,onNavigateToContext:a}){const s=v.useMemo(()=>Cj(e,t),[e,t]);return s?c.jsxs("div",{className:"border-t bg-background flex flex-col max-h-[40vh] shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 border-b bg-muted/20 shrink-0",children:[c.jsx("span",{className:"text-xs font-medium text-purple-600 dark:text-purple-400",children:s.toolName}),c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground bg-purple-500/10 px-1 rounded",children:s.toolCallId.slice(0,16)}),s.durationSec!=null&&c.jsxs("span",{className:"flex items-center gap-0.5 text-[10px] text-muted-foreground",children:[c.jsx(rf,{size:10}),_j(s.durationSec)]}),s.isError&&c.jsxs("span",{className:"flex items-center gap-0.5 text-[10px] text-red-500",children:[c.jsx(fi,{size:10}),"Error"]}),a&&c.jsxs("button",{onClick:()=>a(s.toolCallId),className:"flex items-center gap-0.5 text-[10px] text-blue-600 dark:text-blue-400 hover:underline ml-1",title:"View in Context Messages",children:[c.jsx(eg,{size:10}),"Context"]}),c.jsx("button",{onClick:n,className:"ml-auto rounded p-0.5 hover:bg-muted text-muted-foreground",children:c.jsx(Su,{size:14})})]}),c.jsxs("div",{className:"flex flex-1 overflow-hidden min-h-0",children:[c.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden border-r",children:[c.jsxs("div",{className:"px-2 py-1 border-b text-[10px] font-medium text-muted-foreground bg-muted/10 shrink-0",children:["ToolCall · ",Ud(s.toolCall.timestamp)]}),c.jsx(v2,{data:wj(s.toolCall)})]}),c.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[c.jsx("div",{className:`px-2 py-1 border-b text-[10px] font-medium bg-muted/10 shrink-0 ${s.isError?"text-red-600 dark:text-red-400":"text-muted-foreground"}`,children:s.toolResult?`ToolResult · ${Ud(s.toolResult.timestamp)}`:"ToolResult · (pending)"}),s.toolResult?c.jsx(v2,{data:Rj(s.toolResult)}):c.jsx("div",{className:"flex items-center justify-center flex-1 text-xs text-muted-foreground",children:"No result yet"})]})]})]}):null}function wj(e){const t=e.payload.function;if(!t)return e.payload;const n=t.arguments;if(n)try{return JSON.parse(n)}catch{return n}return t}function Rj(e){const t=e.payload.return_value;return t||e.payload}function v2({data:e}){const[t,n]=v.useState(!1),a=typeof e=="string"?e:JSON.stringify(e,null,2),s=async()=>{await navigator.clipboard.writeText(a),n(!0),setTimeout(()=>n(!1),2e3)};return c.jsxs("div",{className:"relative flex-1 overflow-auto group/json",children:[c.jsx("button",{onClick:s,className:"absolute top-1 right-1 rounded p-1 hover:bg-muted text-muted-foreground opacity-0 group-hover/json:opacity-100 transition-opacity z-10",title:"Copy",children:t?c.jsx(vu,{size:12}):c.jsx(af,{size:12})}),c.jsx("pre",{className:"p-2 text-[11px] font-mono leading-relaxed whitespace-pre-wrap break-all",children:a})]})}function S2(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function Oj({events:e}){const t=v.useMemo(()=>{const s=new Map;let l=0,u=0;const f=new Map;for(const m of e)if(m.type==="StatusUpdate"){const p=m.payload.token_usage;p&&(l+=(p.input_other??0)+(p.input_cache_read??0)+(p.input_cache_creation??0),u+=p.output??0)}else if(m.type==="ToolCall"){const p=m.payload.id,g=m.payload.function;p&&g?.name&&f.set(p,{name:g.name,inputAtStart:l,outputAtStart:u})}else if(m.type==="ToolResult"){const p=m.payload.tool_call_id,g=f.get(p);if(g){const y=Math.max(0,l-g.inputAtStart),T=Math.max(0,u-g.outputAtStart),S=s.get(g.name)||{input:0,output:0,calls:0};S.input+=y,S.output+=T,S.calls+=1,s.set(g.name,S),f.delete(p)}}return Array.from(s.entries()).map(([m,p])=>({name:m,...p,total:p.input+p.output})).sort((m,p)=>p.total-m.total)},[e]);if(t.length===0)return null;const n=t.reduce((s,l)=>s+l.total,0),a=t[0].total;return c.jsxs("div",{className:"border-b px-4 py-2 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[c.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:"Token Usage by Tool"}),c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["(",S2(n)," total)"]})]}),c.jsx("div",{className:"flex flex-col gap-1",children:t.map(s=>{const l=a>0?s.total/a*100:0,u=s.total>0?s.input/s.total*100:0,f=s.total>0?s.output/s.total*100:0;return c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsxs("div",{className:"w-[140px] shrink-0 text-right pr-1",children:[c.jsx("span",{className:"text-[11px] text-foreground truncate",children:s.name}),c.jsxs("span",{className:"text-[10px] text-muted-foreground ml-1",children:["x",s.calls]})]}),c.jsx("div",{className:"flex-1 h-3 bg-muted/30 rounded-sm overflow-hidden",children:c.jsxs("div",{className:"h-full flex rounded-sm",style:{width:`${l}%`},children:[c.jsx("div",{className:"h-full bg-blue-500/70",style:{width:`${u}%`}}),c.jsx("div",{className:"h-full bg-green-500/70",style:{width:`${f}%`}})]})}),c.jsx("span",{className:"w-[56px] shrink-0 text-[10px] text-muted-foreground text-right tabular-nums",children:S2(s.total)})]},s.name)})}),c.jsxs("div",{className:"flex items-center gap-3 mt-1.5",children:[c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:"w-2 h-2 rounded-sm bg-blue-500/70"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Input"})]}),c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:"w-2 h-2 rounded-sm bg-green-500/70"}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:"Output"})]})]})]})}const dd=80,Or=32,rl=8,k2=16;function Ij({events:e,onScrollToIndex:t}){const n=v.useRef(null),{dataPoints:a,compactions:s}=v.useMemo(()=>{const S=[],k=[],N=e.length;if(N===0)return{dataPoints:S,compactions:k};for(let _=0;_<e.length;_++){const A=e[_];A.type==="StatusUpdate"&&A.payload.context_usage!=null&&S.push({eventIndex:A.index,x:N>1?_/(N-1):.5,contextUsage:A.payload.context_usage}),A.type==="CompactionBegin"&&k.push({eventIndex:A.index,x:N>1?_/(N-1):.5})}return{dataPoints:S,compactions:k}},[e]);if(a.length<2)return null;const l=600,u=l-Or*2,f=dd-rl-k2,h=S=>Or+S*u,m=S=>rl+(1-S)*f,p=a.map((S,k)=>{const N=h(S.x),_=m(S.contextUsage);return`${k===0?"M":"L"} ${N} ${_}`}).join(" "),g=p+` L ${h(a[a.length-1].x)} ${m(0)} L ${h(a[0].x)} ${m(0)} Z`,y=m(.8),T=S=>{const k=n.current;if(!k)return;const N=k.getBoundingClientRect(),_=N.width,A=S.clientX-N.left,w=l/_,F=(A*w-Or)/u;if(F<0||F>1)return;let M=a[0],I=Math.abs(M.x-F);for(const j of a){const G=Math.abs(j.x-F);G<I&&(I=G,M=j)}t(M.eventIndex)};return c.jsxs("div",{className:"border-b px-4 py-2 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:"Context Usage"}),c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["(",a.length," data points)"]})]}),c.jsxs("svg",{ref:n,viewBox:`0 0 ${l} ${dd}`,className:"w-full cursor-crosshair",style:{maxHeight:dd},onClick:T,children:[c.jsx("rect",{x:Or,y:rl,width:u,height:y-rl,className:"fill-red-500/5"}),c.jsx("line",{x1:Or,y1:y,x2:Or+u,y2:y,className:"stroke-red-500/30",strokeDasharray:"4 3",strokeWidth:.5}),c.jsx("line",{x1:Or,y1:m(.5),x2:Or+u,y2:m(.5),className:"stroke-border",strokeDasharray:"2 3",strokeWidth:.3}),c.jsx("path",{d:g,className:"fill-primary/10"}),c.jsx("path",{d:p,className:"stroke-primary",strokeWidth:1.5,fill:"none"}),s.map(S=>c.jsx("line",{x1:h(S.x),y1:rl,x2:h(S.x),y2:dd-k2,className:"stroke-orange-500",strokeWidth:1.5,strokeDasharray:"3 2"},S.eventIndex)),c.jsx("text",{x:Or-4,y:rl+4,className:"fill-muted-foreground",fontSize:8,textAnchor:"end",children:"100%"}),c.jsx("text",{x:Or-4,y:y+3,className:"fill-red-500/60",fontSize:8,textAnchor:"end",children:"80%"}),c.jsx("text",{x:Or-4,y:m(0)+3,className:"fill-muted-foreground",fontSize:8,textAnchor:"end",children:"0%"}),a.map(S=>c.jsx("circle",{cx:h(S.x),cy:m(S.contextUsage),r:1.5,className:`${S.contextUsage>.8?"fill-red-500":"fill-primary"} opacity-40 hover:opacity-100 hover:r-3`},S.eventIndex))]})]})}function bm(e){return e<.001?"<1ms":e<1?`${Math.round(e*1e3)}ms`:e<60?`${e.toFixed(1)}s`:`${(e/60).toFixed(1)}min`}function Dj(e){return e>80?"text-green-500":e>=50?"text-amber-500":"text-red-500"}function Lj({events:e,onScrollToIndex:t}){const[n,a]=v.useState("failureRate"),s=v.useMemo(()=>{const u=new Map,f=new Map;for(const m of e)if(m.type==="ToolCall"){const p=m.payload.id,g=m.payload.function;p&&g?.name&&u.set(p,{name:g.name,startTimestamp:m.timestamp,eventIndex:m.index})}else if(m.type==="ToolResult"){const p=m.payload.tool_call_id;if(!p)continue;const g=u.get(p);if(!g)continue;const y=Math.max(0,m.timestamp-g.startTimestamp),S=m.payload.return_value?.is_error===!0;let k=f.get(g.name);k||(k={totalCalls:0,successCount:0,failureCount:0,durations:[]},f.set(g.name,k)),k.totalCalls++,S?k.failureCount++:k.successCount++,k.durations.push(y),u.delete(p)}const h=[];for(const[m,p]of f){const g=p.durations,y=g.length>0?g.reduce((k,N)=>k+N,0)/g.length:0,T=g.length>0?Math.min(...g):0,S=g.length>0?Math.max(...g):0;h.push({name:m,totalCalls:p.totalCalls,successCount:p.successCount,failureCount:p.failureCount,successRate:p.totalCalls>0?p.successCount/p.totalCalls*100:0,avgDurationSec:y,minDurationSec:T,maxDurationSec:S})}return h},[e]),l=v.useMemo(()=>{const u=[...s];return n==="failureRate"?u.sort((f,h)=>{const m=f.totalCalls>0?f.failureCount/f.totalCalls:0;return(h.totalCalls>0?h.failureCount/h.totalCalls:0)-m}):u.sort((f,h)=>h.totalCalls-f.totalCalls),u},[s,n]);return l.length===0?null:c.jsxs("div",{className:"border-b px-4 py-2 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[c.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:"Tool Call Success Rates"}),c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["(",l.length," tools)"]}),c.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[c.jsx("button",{onClick:()=>a("failureRate"),className:`text-[10px] px-1.5 py-0.5 rounded border transition-colors ${n==="failureRate"?"bg-primary/10 text-primary border-primary/30":"text-muted-foreground border-transparent hover:text-foreground"}`,children:"By Failure"}),c.jsx("button",{onClick:()=>a("callCount"),className:`text-[10px] px-1.5 py-0.5 rounded border transition-colors ${n==="callCount"?"bg-primary/10 text-primary border-primary/30":"text-muted-foreground border-transparent hover:text-foreground"}`,children:"By Count"})]})]}),c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-[11px]",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"text-muted-foreground text-left",children:[c.jsx("th",{className:"font-medium pr-3 py-0.5",children:"Tool Name"}),c.jsx("th",{className:"font-medium px-2 py-0.5 text-right",children:"Calls"}),c.jsx("th",{className:"font-medium px-2 py-0.5 text-right",children:"Success"}),c.jsx("th",{className:"font-medium px-2 py-0.5 text-right",children:"Fail"}),c.jsx("th",{className:"font-medium px-2 py-0.5 text-right",children:"Rate"}),c.jsx("th",{className:"font-medium px-2 py-0.5 text-right",children:"Avg"}),c.jsx("th",{className:"font-medium px-2 py-0.5 text-right",children:"Min"}),c.jsx("th",{className:"font-medium pl-2 py-0.5 text-right",children:"Max"})]})}),c.jsx("tbody",{children:l.map(u=>{const h=(u.totalCalls>0?u.failureCount/u.totalCalls*100:0)>20?"bg-red-500/10":"";return c.jsxs("tr",{className:`${h} hover:bg-muted/30 transition-colors`,children:[c.jsx("td",{className:"pr-3 py-0.5 text-foreground truncate max-w-[180px]",children:u.name}),c.jsx("td",{className:"px-2 py-0.5 text-right tabular-nums text-muted-foreground",children:u.totalCalls}),c.jsx("td",{className:"px-2 py-0.5 text-right tabular-nums text-green-500",children:u.successCount}),c.jsx("td",{className:"px-2 py-0.5 text-right tabular-nums text-red-500",children:u.failureCount}),c.jsxs("td",{className:`px-2 py-0.5 text-right tabular-nums font-medium ${Dj(u.successRate)}`,children:[u.successRate.toFixed(0),"%"]}),c.jsx("td",{className:"px-2 py-0.5 text-right tabular-nums text-muted-foreground",children:bm(u.avgDurationSec)}),c.jsx("td",{className:"px-2 py-0.5 text-right tabular-nums text-muted-foreground",children:bm(u.minDurationSec)}),c.jsx("td",{className:"pl-2 py-0.5 text-right tabular-nums text-muted-foreground",children:bm(u.maxDurationSec)})]},u.name)})})]})})]})}function jj(e){return e<.001?"<1ms":e<1?`${(e*1e3).toFixed(0)}ms`:e<60?`${e.toFixed(2)}s`:`${(e/60).toFixed(1)}min`}function N2(e){return e.length===0?0:e.reduce((t,n)=>t+n,0)/e.length}function C2(e,t){if(e.length===0)return 0;const n=e.reduce((a,s)=>a+(s-t)**2,0)/e.length;return Math.sqrt(n)}function Mj(e){const t=[];let n=0,a=-1,s=0,l=0,u=0,f=0,h=0,m=!1;for(const A of e){if(A.type==="StatusUpdate"&&m){const w=A.payload.token_usage;w&&(f+=(w.input_other??0)+(w.input_cache_read??0)+(w.input_cache_creation??0),h+=w.output??0)}if(A.type==="SubagentEvent"&&m){const w=A.payload.event;if(w?.type==="StatusUpdate"){const F=w.payload?.token_usage;F&&(f+=(F.input_other??0)+(F.input_cache_read??0)+(F.input_cache_creation??0),h+=F.output??0)}}if(A.type==="TurnBegin")n++,a=A.index,s=A.timestamp,l=0,u=0,f=0,h=0,m=!0;else if(A.type==="StepBegin"&&m)l++;else if(A.type==="ToolCall"&&m)u++;else if(A.type==="TurnEnd"&&m){const w=A.timestamp-s;t.push({turnNumber:n,eventIndex:a,stepCount:l,toolCallCount:u,inputTokensDelta:f,outputTokensDelta:h,durationSec:w>0?w:0}),m=!1}}if(m){const A=e[e.length-1],w=A?A.timestamp-s:0;t.push({turnNumber:n,eventIndex:a,stepCount:l,toolCallCount:u,inputTokensDelta:f,outputTokensDelta:h,durationSec:w>0?w:0})}if(t.length===0)return[];const p=t.map(A=>A.stepCount),g=t.map(A=>A.inputTokensDelta+A.outputTokensDelta),y=N2(p),T=C2(p,y),S=y+2*T,k=N2(g),N=C2(g,k),_=k+2*N;return t.map(A=>{const w=[],P=A.inputTokensDelta+A.outputTokensDelta;return T>0&&A.stepCount>S&&w.push(`Steps (${A.stepCount}) > μ+2σ (${S.toFixed(1)})`),N>0&&P>_&&w.push(`Tokens (${P.toLocaleString()}) > μ+2σ (${_.toFixed(0)})`),{...A,isAnomaly:w.length>0,anomalyReasons:w}})}function Bj({events:e,onScrollToIndex:t}){const n=v.useMemo(()=>Mj(e),[e]);if(n.length===0)return c.jsx("div",{className:"border-t px-3 py-2 text-xs text-muted-foreground",children:"No turn data available."});const a=n.filter(s=>s.isAnomaly).length;return c.jsxs("div",{className:"border-t",children:[c.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs text-muted-foreground border-b bg-muted/30",children:[c.jsx("span",{className:"font-medium text-foreground",children:"Turn Efficiency"}),c.jsxs("span",{children:[n.length," turn",n.length!==1&&"s"]}),a>0&&c.jsxs("span",{className:"flex items-center gap-1 text-amber-500",children:[c.jsx(LE,{className:"h-3 w-3"}),a," anomal",a!==1?"ies":"y"]})]}),c.jsx("div",{className:"max-h-[240px] overflow-auto",children:c.jsxs("table",{className:"w-full text-[11px]",children:[c.jsx("thead",{className:"sticky top-0 bg-background",children:c.jsxs("tr",{className:"text-left text-muted-foreground",children:[c.jsx("th",{className:"px-2 py-1 font-medium",children:"Turn"}),c.jsx("th",{className:"px-2 py-1 font-medium text-right",children:"Steps"}),c.jsx("th",{className:"px-2 py-1 font-medium text-right",children:"Tools"}),c.jsx("th",{className:"px-2 py-1 font-medium text-right",children:"Input Tokens"}),c.jsx("th",{className:"px-2 py-1 font-medium text-right",children:"Output Tokens"}),c.jsx("th",{className:"px-2 py-1 font-medium text-right",children:"Duration"}),c.jsx("th",{className:"px-2 py-1 font-medium",children:"Status"})]})}),c.jsx("tbody",{children:n.map(s=>c.jsxs("tr",{className:`cursor-pointer border-t border-border/50 hover:bg-muted/50 transition-colors ${s.isAnomaly?"bg-amber-500/10":""}`,onClick:()=>t(s.eventIndex),children:[c.jsxs("td",{className:"px-2 py-1 font-mono text-xs",children:["#",s.turnNumber]}),c.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:s.stepCount}),c.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:s.toolCallCount}),c.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:s.inputTokensDelta.toLocaleString()}),c.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:s.outputTokensDelta.toLocaleString()}),c.jsx("td",{className:"px-2 py-1 text-right tabular-nums",children:jj(s.durationSec)}),c.jsx("td",{className:"px-2 py-1",children:s.isAnomaly?c.jsxs("span",{className:"group relative inline-flex items-center gap-1 text-amber-500",children:[c.jsx(LE,{className:"h-3 w-3"}),c.jsx("span",{className:"text-[10px]",children:"anomaly"}),c.jsx("span",{className:"pointer-events-none absolute bottom-full left-0 z-10 mb-1 hidden w-48 rounded border bg-popover p-1.5 text-[10px] text-popover-foreground shadow-md group-hover:block",children:s.anomalyReasons.map((l,u)=>c.jsx("div",{children:l},u))})]}):c.jsx("span",{className:"text-muted-foreground",children:"ok"})})]},s.turnNumber))})]})})]})}function Pj(e){if(e.length===0)return{bars:[],totalSec:0,compactionMarkers:[],tokenData:[],gaps:[]};const t=[],n=[],a=[],s=e[0].timestamp;let l=null,u=0,f=0,h=null,m=0,p=0,g=0,y=0,T=0,S="";const k=new Map,N=new Map;let _=null,A=0,w=null,P=0,F=0,M=!1;const I=new Map,j=U=>{if(w!==null){const R=U-w;R>.001&&t.push({label:M?"Thinking":"Generation",eventIndex:P,startSec:w,endSec:U,durationSec:R,depth:2,color:"cyan",dashed:!0,tooltipData:{kind:"thinking",isThinking:M,charCount:F}}),w=null,F=0}},G=U=>{l!=null&&(t.push({label:`Turn ${f}`,eventIndex:u,startSec:l,endSec:U,durationSec:U-l,depth:0,color:"blue",tooltipData:{kind:"turn",turnNumber:f,userInput:S,stepCount:g,toolCallCount:y}}),l=null)},B=U=>{h!=null&&t.push({label:`Step ${p}`,eventIndex:m,startSec:h,endSec:U,durationSec:U-h,depth:1,color:"green",tooltipData:{kind:"step",stepNumber:p,turnNumber:f,toolCallCount:T}})};for(const U of e){const R=U.timestamp-s;if(U.type==="TurnBegin"){j(R),f++,l=R,u=U.index,p=0,g=0,y=0;const q=U.payload.user_input;if(typeof q=="string")S=q.slice(0,120);else if(Array.isArray(q)){const W=q.find(he=>he.type==="text");S=W?String(W.text??"").slice(0,120):"(multipart)"}else S=""}else if(U.type==="TurnEnd")j(R),B(R),G(R),h=null;else if(U.type==="StepBegin")j(R),B(R),p++,g++,h=R,m=U.index,T=0;else if(U.type==="ToolCall"){j(R);const q=U.payload.id,W=U.payload.function,he=W?.name??"tool",O=W?.arguments??"";let H="";try{const Z=JSON.parse(O),L=Object.keys(Z);if(L.length>0){const fe=String(Z[L[0]]??"");H=`${L[0]}=${fe.slice(0,60)}`}}catch{H=O.slice(0,60)}q&&(k.set(q,{name:he,startTime:R,eventIndex:U.index,argsSummary:H}),y++,T++)}else if(U.type==="ToolResult"){j(R);const q=U.payload.tool_call_id;if(q&&k.has(q)){const W=k.get(q),O=U.payload.return_value?.is_error===!0;t.push({label:W.name,eventIndex:W.eventIndex,startSec:W.startTime,endSec:R,durationSec:R-W.startTime,depth:2,color:"purple",hasError:O,tooltipData:{kind:"tool",toolName:W.name,toolCallId:q,hasError:O,argsSummary:W.argsSummary}}),k.delete(q)}}else if(U.type==="ApprovalRequest"){const q=U.payload.id;q&&N.set(q,{startTime:R,eventIndex:U.index,sender:U.payload.sender??"",action:U.payload.action??""})}else if(U.type==="ApprovalResponse"){const q=U.payload.request_id;if(q&&N.has(q)){const W=N.get(q),he=U.payload.response??"";t.push({label:`Approval: ${W.action||W.sender||"wait"}`,eventIndex:W.eventIndex,startSec:W.startTime,endSec:R,durationSec:R-W.startTime,depth:2,color:"amber",hasError:he==="reject",striped:!0,tooltipData:{kind:"approval",sender:W.sender,action:W.action,response:he}}),N.delete(q)}}else if(U.type==="CompactionBegin")_=R,A=U.index;else if(U.type==="CompactionEnd")_!==null&&(n.push({startSec:_,endSec:R,eventIndex:A}),_=null);else if(U.type==="StatusUpdate"){const q=U.payload.context_usage,W=U.payload.token_usage;(q!==void 0||W)&&a.push({timeSec:R,inputTokens:W?(W.input_other??0)+(W.input_cache_read??0)+(W.input_cache_creation??0):0,outputTokens:W?.output??0,contextUsage:q??0,eventIndex:U.index})}else if(U.type==="TextPart"||U.type==="ThinkPart"){w===null&&(w=R,P=U.index,F=0,M=U.type==="ThinkPart");const q=U.type==="TextPart"?U.payload.text??"":U.payload.thinking??U.payload.think??"";F+=q.length}else if(U.type==="SubagentEvent"){const q=U.payload.parent_tool_call_id;if(q){I.has(q)||I.set(q,{startTime:R,endTime:R,eventIndex:U.index,eventCount:0,subagentType:U.payload.subagent_type??void 0,agentId:U.payload.agent_id??void 0});const W=I.get(q);W.endTime=Math.max(W.endTime,R),W.startTime=Math.min(W.startTime,R),W.eventCount++}}}const Q=e.length>0?e[e.length-1].timestamp-s:0;j(Q),B(Q),G(Q),_!==null&&n.push({startSec:_,endSec:Q,eventIndex:A});for(const[,U]of N)t.push({label:`Approval: ${U.action||U.sender||"wait"}`,eventIndex:U.eventIndex,startSec:U.startTime,endSec:Q,durationSec:Q-U.startTime,depth:2,color:"amber",striped:!0,tooltipData:{kind:"approval",sender:U.sender,action:U.action,response:"(pending)"}});const V={coder:"violet",explore:"cyan",plan:"amber","general-purpose":"blue"};for(const[U,R]of I){if(R.eventCount===0)continue;const q=R.subagentType?` [${R.subagentType}]`:"";t.push({label:`Sub-agent${q}`,eventIndex:R.eventIndex,startSec:R.startTime,endSec:R.endTime,durationSec:R.endTime-R.startTime,depth:3,color:R.subagentType&&V[R.subagentType]||"indigo",tooltipData:{kind:"subagent",taskToolCallId:U.slice(0,12),eventCount:R.eventCount,subagentType:R.subagentType,agentId:R.agentId?.slice(0,8)}})}const te=e.length>=2?e[e.length-1].timestamp-e[0].timestamp:0,ee=[];if(te>0){const U=t.filter(R=>R.depth===2).sort((R,q)=>R.startSec-q.startSec);for(let R=1;R<U.length;R++){const q=U[R-1],W=U[R],he=W.startSec-q.endSec;he>2&&ee.push({startSec:q.endSec,endSec:W.startSec,durationSec:he,depth:2})}}return t.sort((U,R)=>U.depth-R.depth||U.startSec-R.startSec),{bars:t,totalSec:te,compactionMarkers:n,tokenData:a,gaps:ee}}function ul(e){return e<.001?"<1ms":e<1?`${(e*1e3).toFixed(0)}ms`:e<60?`${e.toFixed(2)}s`:`${(e/60).toFixed(1)}min`}function zj(e,t){const n=t-e;if(n<=0)return[];let a;n<5?a=.5:n<15?a=1:n<60?a=5:n<300?a=30:n<1800?a=60:a=300;const s=[],l=Math.ceil(e/a)*a;for(let u=l;u<=t;u+=a)s.push({sec:u,label:ul(u)});return s}const Fd={blue:{bg:"bg-blue-500/20",text:"text-blue-700 dark:text-blue-300",border:"border-blue-500/30"},purple:{bg:"bg-purple-500/20",text:"text-purple-700 dark:text-purple-300",border:"border-purple-500/30"},amber:{bg:"bg-amber-500/20",text:"text-amber-700 dark:text-amber-300",border:"border-amber-500/30"},green:{bg:"bg-green-500/20",text:"text-green-700 dark:text-green-300",border:"border-green-500/30"},cyan:{bg:"bg-cyan-500/20",text:"text-cyan-700 dark:text-cyan-300",border:"border-cyan-500/30"},indigo:{bg:"bg-indigo-500/20",text:"text-indigo-700 dark:text-indigo-300",border:"border-indigo-500/30"},violet:{bg:"bg-violet-500/20",text:"text-violet-700 dark:text-violet-300",border:"border-violet-500/30"}};function Hj({bar:e}){const t=e.tooltipData;return t?c.jsxs("div",{className:"space-y-1",children:[c.jsx("div",{className:"font-medium text-foreground",children:e.label}),c.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[c.jsx(Xv,{className:"w-3 h-3"}),c.jsx("span",{children:ul(e.durationSec)})]}),t.kind==="turn"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"text-muted-foreground",children:[t.stepCount," step",t.stepCount!==1?"s":"",", ",t.toolCallCount," ","tool call",t.toolCallCount!==1?"s":""]}),t.userInput&&c.jsxs("div",{className:"text-muted-foreground/80 italic truncate max-w-[240px]",children:["“",t.userInput,"”"]})]}),t.kind==="step"&&c.jsxs("div",{className:"text-muted-foreground",children:["Turn ",t.turnNumber," · ",t.toolCallCount," tool call",t.toolCallCount!==1?"s":""]}),t.kind==="tool"&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"font-mono text-[10px] text-muted-foreground/70",children:t.toolCallId.slice(0,16)}),t.argsSummary&&c.jsx("div",{className:"text-muted-foreground/80 truncate max-w-[240px] font-mono text-[10px]",children:t.argsSummary}),t.hasError&&c.jsx("div",{className:"text-red-500 font-medium",children:"Error"})]}),t.kind==="thinking"&&c.jsxs("div",{className:"text-muted-foreground",children:[t.isThinking?"Extended thinking":"Text generation"," ·"," ",t.charCount.toLocaleString()," chars"]}),t.kind==="approval"&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"text-muted-foreground",children:[t.sender,": ",t.action]}),c.jsx("div",{className:t.response==="reject"?"text-red-500 font-medium":"text-green-500 font-medium",children:t.response==="approve"?"Approved":t.response==="approve_for_session"?"Approved (session)":t.response==="reject"?"Rejected":t.response})]}),t.kind==="subagent"&&c.jsxs(c.Fragment,{children:[t.subagentType&&c.jsxs("div",{className:"font-medium text-indigo-600 dark:text-indigo-400",children:[t.subagentType,t.agentId?` (${t.agentId})`:""]}),c.jsxs("div",{className:"font-mono text-[10px] text-muted-foreground/70",children:["task: ",t.taskToolCallId]}),c.jsxs("div",{className:"text-muted-foreground",children:[t.eventCount," event",t.eventCount!==1?"s":""]})]})]}):null}function Uj({tokenData:e,rangeStart:t,rangeDuration:n}){if(e.length<2)return null;const a=1e3,s=24,l=2,u=Math.max(...e.map(y=>y.inputTokens+y.outputTokens),1),f=e.filter(y=>y.timeSec>=t&&y.timeSec<=t+n).map(y=>{const T=(y.timeSec-t)/n*a,S=s-l-(y.inputTokens+y.outputTokens)/u*(s-l*2);return{x:T,y:S}});if(f.length<2)return null;const h=f.map((y,T)=>`${T===0?"M":"L"}${y.x},${y.y}`).join(" "),m=`${h} L${f[f.length-1].x},${s} L${f[0].x},${s} Z`,p=e.filter(y=>y.timeSec>=t&&y.timeSec<=t+n&&y.contextUsage>0).map(y=>{const T=(y.timeSec-t)/n*a,S=s-l-y.contextUsage*(s-l*2);return{x:T,y:S}}),g=p.length>=2?p.map((y,T)=>`${T===0?"M":"L"}${y.x},${y.y}`).join(" "):null;return c.jsxs("div",{className:"flex items-center gap-2 h-6 mb-1",children:[c.jsx("div",{className:"shrink-0 w-32"}),c.jsx("div",{className:"flex-1 relative",children:c.jsxs("svg",{viewBox:`0 0 ${a} ${s}`,className:"w-full h-6",preserveAspectRatio:"none",children:[c.jsx("path",{d:m,className:"fill-primary/8"}),c.jsx("path",{d:h,className:"stroke-primary/40 fill-none",strokeWidth:1.5}),g&&c.jsx("path",{d:g,className:"stroke-orange-400/50 fill-none",strokeWidth:1,strokeDasharray:"3,2"})]})}),c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground w-16 shrink-0 text-right",children:"tokens"})]})}function Fj({events:e,onScrollToIndex:t}){const n=v.useMemo(()=>Pj(e),[e]),{totalSec:a,compactionMarkers:s,tokenData:l,gaps:u}=n,[f,h]=v.useState("hierarchy"),[m,p]=v.useState(null),[g,y]=v.useState(!1),[T,S]=v.useState(!1),[k,N]=v.useState(null),[_,A]=v.useState(null),w=v.useRef(null),P=m?m[0]:0,F=m?m[1]:a,M=F-P,I=m!==null,j=128,G=v.useMemo(()=>{const O=[...n.bars];return f==="chronological"&&O.sort((H,Z)=>H.startSec-Z.startSec||H.depth-Z.depth),O},[n.bars,f]),B=v.useMemo(()=>I?G.filter(O=>O.endSec>P&&O.startSec<F):G,[G,I,P,F]),Q=v.useMemo(()=>zj(P,F),[P,F]),V=v.useCallback(O=>{const H=w.current;if(!H)return null;const Z=H.querySelector("[data-bar-track]");if(!Z)return null;const L=Z.getBoundingClientRect(),fe=Math.max(0,Math.min(1,(O.clientX-L.left)/L.width));return P+fe*M},[P,M]),te=v.useCallback(O=>{if(O.button!==0)return;const H=V(O);H!==null&&(N(H),A(H))},[V]),ee=v.useCallback(O=>{if(k===null)return;const H=V(O);H!==null&&A(H)},[k,V]),U=v.useCallback(()=>{if(k!==null&&_!==null){const O=Math.min(k,_),H=Math.max(k,_);H-O>M*.01&&p([O,H])}N(null),A(null)},[k,_,M]),R=v.useCallback(O=>{const H=P+M/2,Z=Math.min(a,M*O);if(Z<.01)return;const L=Math.max(0,H-Z/2),fe=Math.min(a,L+Z);fe-L>=a*.99?p(null):p([L,fe])},[P,M,a]),q=v.useCallback(()=>p(null),[]);if(n.bars.length===0||a===0)return c.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground text-sm",children:"Not enough data for timeline"});const W=k!==null&&_!==null?(Math.min(k,_)-P)/M*100:0,he=k!==null&&_!==null?Math.abs(_-k)/M*100:0;return c.jsx(Z3,{delayDuration:200,children:c.jsxs("div",{className:"h-full overflow-auto p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[c.jsxs("span",{className:"text-xs font-medium text-muted-foreground",children:["Total: ",ul(a)]}),c.jsxs("div",{className:"flex items-center border rounded-md overflow-hidden ml-3",children:[c.jsxs("button",{onClick:()=>h("hierarchy"),className:`px-2 py-1 text-xs flex items-center gap-1 transition-colors ${f==="hierarchy"?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted"}`,title:"Group by hierarchy (Turn > Step > Tool)",children:[c.jsx(w6,{className:"w-3 h-3"}),"Hierarchy"]}),c.jsxs("button",{onClick:()=>h("chronological"),className:`px-2 py-1 text-xs flex items-center gap-1 transition-colors ${f==="chronological"?"bg-primary/10 text-primary":"text-muted-foreground hover:bg-muted"}`,title:"Sort by start time",children:[c.jsx(B5,{className:"w-3 h-3"}),"Timeline"]})]}),u.length>0&&c.jsxs("button",{onClick:()=>y(O=>!O),className:`px-2 py-1 text-xs rounded-md border flex items-center gap-1 transition-colors ${g?"bg-red-500/10 text-red-600 dark:text-red-400 border-red-500/30":"text-muted-foreground hover:bg-muted"}`,title:`Show idle gaps (${u.length})`,children:[c.jsx(Xv,{className:"w-3 h-3"}),"Gaps (",u.length,")"]}),l.length>=2&&c.jsxs("button",{onClick:()=>S(O=>!O),className:`px-2 py-1 text-xs rounded-md border flex items-center gap-1 transition-colors ${T?"bg-primary/10 text-primary border-primary/30":"text-muted-foreground hover:bg-muted"}`,title:"Show token usage",children:[c.jsx(Fv,{className:"w-3 h-3"}),"Tokens"]}),c.jsxs("div",{className:"flex items-center border rounded-md overflow-hidden ml-1",children:[c.jsx("button",{onClick:()=>R(.5),className:"px-1.5 py-1 text-xs text-muted-foreground hover:bg-muted transition-colors",title:"Zoom in",children:c.jsx(b4,{className:"w-3 h-3"})}),c.jsx("button",{onClick:()=>R(2),className:"px-1.5 py-1 text-xs text-muted-foreground hover:bg-muted transition-colors border-l",title:"Zoom out",children:c.jsx(E4,{className:"w-3 h-3"})}),I&&c.jsx("button",{onClick:q,className:"px-2 py-1 text-xs text-muted-foreground hover:bg-muted transition-colors border-l",title:"Reset zoom",children:"Reset"})]}),c.jsxs("div",{className:"flex items-center gap-3 ml-auto",children:[c.jsx(al,{color:"blue",label:"Turn"}),c.jsx(al,{color:"green",label:"Step"}),c.jsx(al,{color:"purple",label:"Tool"}),c.jsx(al,{color:"cyan",label:"Generation"}),c.jsx(al,{color:"amber",label:"Approval"}),n.bars.some(O=>O.color==="indigo")&&c.jsx(al,{color:"indigo",label:"Sub-agent"})]})]}),T&&c.jsx(Uj,{tokenData:l,rangeStart:P,rangeDuration:M}),c.jsxs("div",{className:"flex items-center h-4 mb-1",children:[c.jsx("div",{className:"shrink-0 w-32"}),c.jsx("div",{className:"flex-1 relative h-full border-b border-muted/30",children:Q.map(O=>{const H=(O.sec-P)/M*100;return H<0||H>100?null:c.jsxs("div",{className:"absolute top-0 h-full",style:{left:`${H}%`},children:[c.jsx("div",{className:"w-px h-full bg-muted-foreground/15"}),c.jsx("span",{className:"absolute top-0 ml-1 text-[8px] text-muted-foreground/60 whitespace-nowrap",children:O.label})]},O.sec)})}),c.jsx("div",{className:"shrink-0 w-16"})]}),c.jsxs("div",{ref:w,className:"relative select-none",onMouseDown:te,onMouseMove:ee,onMouseUp:U,onMouseLeave:()=>{k!==null&&U()},children:[s.map(O=>{const H=(O.startSec-P)/M*100,Z=Math.max((O.endSec-O.startSec)/M*100,.3);return H>100||H+Z<0?null:c.jsxs(up,{children:[c.jsx(cp,{asChild:!0,children:c.jsx("div",{className:"absolute top-0 bottom-0 bg-orange-500/8 border-l border-dashed border-orange-500/40 z-10 cursor-pointer hover:bg-orange-500/15 transition-colors",style:{left:`calc(${j}px + (100% - ${j}px - 72px) * ${H/100})`,width:`calc((100% - ${j}px - 72px) * ${Z/100})`},onClick:()=>t(O.eventIndex)})}),c.jsx(dp,{children:c.jsxs(fp,{className:"rounded-md border bg-popover px-3 py-2 text-xs shadow-md z-50",sideOffset:5,children:[c.jsx("div",{className:"font-medium text-orange-600 dark:text-orange-400",children:"Compaction"}),c.jsx("div",{className:"text-muted-foreground",children:ul(O.endSec-O.startSec)})]})})]},`c-${O.eventIndex}`)}),Q.map(O=>{const H=(O.sec-P)/M*100;return H<0||H>100?null:c.jsx("div",{className:"absolute top-0 bottom-0 pointer-events-none z-0",style:{left:`calc(${j}px + (100% - ${j}px - 72px) * ${H/100})`},children:c.jsx("div",{className:"w-px h-full bg-muted-foreground/5"})},`grid-${O.sec}`)}),k!==null&&_!==null&&he>.5&&c.jsx("div",{className:"absolute top-0 bottom-0 bg-blue-500/10 border border-blue-500/30 rounded-sm pointer-events-none z-20",style:{left:`calc(${j}px + (100% - ${j}px - 72px) * ${W/100})`,width:`calc((100% - ${j}px - 72px) * ${he/100})`}}),c.jsx("div",{className:"space-y-0.5",children:B.map((O,H)=>{const Z=Math.max(0,(O.startSec-P)/M*100),L=Math.min(O.endSec,F),fe=Math.max(O.startSec,P),Ne=Math.max((L-fe)/M*100,.5),ve=Fd[O.color]??Fd.blue,ge=f==="hierarchy"?O.depth*16:O.depth*8;return c.jsxs(up,{children:[c.jsx(cp,{asChild:!0,children:c.jsxs("div",{className:"flex items-center gap-2 h-6 group cursor-pointer",style:{paddingLeft:`${ge}px`},onClick:()=>t(O.eventIndex),children:[c.jsx("span",{className:`text-[11px] font-mono shrink-0 truncate ${ve.text} ${O.hasError?"text-red-600 dark:text-red-400":""}`,style:{width:`${j-ge}px`},children:O.label}),c.jsx("div",{className:"flex-1 relative h-4 bg-muted/20 rounded-sm overflow-hidden","data-bar-track":!0,children:c.jsx("div",{className:`absolute top-0 h-full rounded-sm border ${ve.bg} ${ve.border} ${O.hasError?"bg-red-500/20 border-red-500/30":""} ${O.dashed?"border-dashed":""} group-hover:brightness-125 transition-all`,style:{left:`${Z}%`,width:`${Ne}%`,minWidth:"2px",...O.striped?{backgroundImage:"repeating-linear-gradient(135deg, transparent, transparent 3px, rgba(245,158,11,0.15) 3px, rgba(245,158,11,0.15) 6px)"}:{}}})}),c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground w-16 shrink-0 text-right",children:ul(O.durationSec)})]})}),c.jsx(dp,{children:c.jsx(fp,{className:"rounded-md border bg-popover px-3 py-2 text-xs shadow-md z-50 max-w-xs",sideOffset:5,children:c.jsx(Hj,{bar:O})})})]},`${O.eventIndex}-${H}`)})}),g&&u.map((O,H)=>{const Z=Math.max(0,(O.startSec-P)/M*100),L=Math.max(O.durationSec/M*100,.5);if(Z>100)return null;const fe=f==="hierarchy"?O.depth*16:O.depth*8;return c.jsxs("div",{className:"flex items-center gap-2 h-5",style:{paddingLeft:`${fe}px`},children:[c.jsx("div",{className:"shrink-0",style:{width:`${j-fe}px`}}),c.jsx("div",{className:"flex-1 relative h-3",children:c.jsx("div",{className:"absolute top-0 h-full rounded-sm border border-dashed border-red-400/30 bg-red-500/5 flex items-center justify-center",style:{left:`${Z}%`,width:`${L}%`,minWidth:"20px"},children:c.jsxs("span",{className:"text-[8px] font-mono text-red-400/70 px-1",children:["idle ",ul(O.durationSec)]})})}),c.jsx("div",{className:"shrink-0 w-16"})]},`gap-${H}`)})]}),!I&&c.jsx("div",{className:"text-[10px] text-muted-foreground/40 mt-2 text-center",children:"Drag to zoom · Click bar to jump to event"})]})})}function al({color:e,label:t}){const n=Fd[e]??Fd.blue;return c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:`w-3 h-2 rounded-sm ${n.bg} border ${n.border}`}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:t})]})}function $j(e){const t=[],n=new Map;for(const u of e)if(u.type==="ToolResult"){const f=u.payload.tool_call_id;f&&n.set(f,u)}let a=null,s=0,l=[];for(const u of e){if(u.type==="TurnBegin"){a&&a.steps.length>0&&t.push(a),s++;let f="";const h=u.payload.user_input;if(typeof h=="string")f=h;else if(Array.isArray(h)){for(const m of h)if(typeof m=="object"&&m!==null){const p=m;typeof p.text=="string"&&(f+=p.text)}}a={turnNumber:s,turnEventIndex:u.index,userInput:f,steps:[]},l=[];continue}if(u.type==="ThinkPart"){const f=u.payload.text??u.payload.think??"";f&&l.push({index:u.index,text:f});continue}if(u.type==="ToolCall"){const f=u.payload.function,h=f?.name??"unknown",m=f?.arguments??"",p=u.payload.id,g=p?n.get(p)??null:null;let y=!1;g&&(y=g.payload.return_value?.is_error===!0);let T=0;g&&(T=Math.max(0,g.timestamp-u.timestamp));const S=l.map(P=>P.text).join(" ");let k="";try{k=JSON.stringify(JSON.parse(m))}catch{k=m}let N=!1,_,A;if(h==="Agent"){N=!0;try{const P=JSON.parse(m);_=P.description,A=P.subagent_type}catch{}}const w={thinkingEventIndices:l.map(P=>P.index),thinkingSummary:S,toolCallEvent:u,toolCallName:h,toolCallArgsSummary:k,toolResultEvent:g,isError:y,durationSec:T,isAgentCall:N,agentDescription:_,agentType:A};a&&a.steps.push(w),l=[];continue}}return a&&a.steps.length>0&&t.push(a),t}function qj({events:e,onScrollToIndex:t}){const n=v.useMemo(()=>$j(e),[e]);return n.length===0?c.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground text-sm",children:"No decision chains found"}):c.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-4",children:n.map(a=>c.jsx(Vj,{chain:a,onScrollToIndex:t},a.turnEventIndex))})}function Vj({chain:e,onScrollToIndex:t}){const[n,a]=v.useState(!1);return c.jsxs("div",{className:"rounded-lg border bg-card",children:[c.jsxs("button",{onClick:()=>a(s=>!s),className:"flex items-center gap-2 w-full px-3 py-2 text-left hover:bg-muted/50 transition-colors rounded-t-lg",children:[n?c.jsx(cn,{size:14}):c.jsx($t,{size:14}),c.jsxs("span",{className:"text-xs font-semibold text-foreground",children:["Turn ",e.turnNumber]}),e.userInput&&c.jsx("span",{className:"text-[11px] text-muted-foreground flex-1 break-words",children:e.userInput}),c.jsxs("span",{className:"text-[10px] text-muted-foreground shrink-0",children:[e.steps.length," step",e.steps.length!==1?"s":""]})]}),!n&&c.jsx("div",{className:"px-3 pb-3 space-y-0",children:e.steps.map((s,l)=>c.jsx(Yj,{step:s,isLast:l===e.steps.length-1,onScrollToIndex:t},s.toolCallEvent.index))})]})}function Yj({step:e,isLast:t,onScrollToIndex:n}){return c.jsxs("div",{className:`relative ${t?"":"pb-2"}`,children:[c.jsx("div",{className:"absolute left-[11px] top-0 bottom-0 w-px bg-border"}),e.thinkingEventIndices.length>0&&c.jsxs("div",{className:"relative ml-6 mb-1",children:[c.jsx("div",{className:"absolute -left-[17px] top-[7px] w-[7px] h-[7px] rounded-full bg-cyan-500 border border-background z-10"}),c.jsxs("button",{onClick:()=>{e.thinkingEventIndices.length>0&&n(e.thinkingEventIndices[0])},className:"group flex items-start gap-1.5 w-full text-left border-l-2 border-cyan-500/40 pl-2 py-1 hover:bg-cyan-500/5 rounded-r transition-colors",children:[c.jsx(tg,{size:12,className:"text-cyan-500 shrink-0 mt-0.5"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("div",{className:"text-[10px] font-medium text-cyan-600 dark:text-cyan-400",children:"Thinking"}),c.jsx("div",{className:"text-[11px] text-muted-foreground leading-tight whitespace-pre-wrap break-words",children:e.thinkingSummary})]})]})]}),e.thinkingEventIndices.length>0&&c.jsx("div",{className:"relative ml-6 flex items-center h-3",children:c.jsx("div",{className:"absolute -left-[14px] w-px h-full bg-border"})}),c.jsxs("div",{className:"relative ml-6 mb-1",children:[c.jsx("div",{className:"absolute -left-[17px] top-[7px] w-[7px] h-[7px] rounded-full bg-purple-500 border border-background z-10"}),c.jsxs("button",{onClick:()=>n(e.toolCallEvent.index),className:`group flex items-start gap-1.5 w-full text-left border-l-2 pl-2 py-1 rounded-r transition-colors ${e.isAgentCall?"border-indigo-500/40 hover:bg-indigo-500/5":"border-purple-500/40 hover:bg-purple-500/5"}`,children:[e.isAgentCall?c.jsx(Mr,{size:12,className:"text-indigo-500 shrink-0 mt-0.5"}):c.jsx(Wv,{size:12,className:"text-purple-500 shrink-0 mt-0.5"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:`text-[10px] font-medium ${e.isAgentCall?"text-indigo-600 dark:text-indigo-400":"text-purple-600 dark:text-purple-400"}`,children:[e.isAgentCall?`Agent${e.agentType?` [${e.agentType}]`:""}`:e.toolCallName,e.isAgentCall&&e.agentDescription&&c.jsx("span",{className:"ml-1 font-normal text-muted-foreground",children:e.agentDescription.slice(0,40)})]}),c.jsx("div",{className:"text-[11px] text-muted-foreground font-mono whitespace-pre-wrap break-all leading-tight",children:e.toolCallArgsSummary})]})]})]}),c.jsx("div",{className:"relative ml-6 flex items-center h-3",children:c.jsx("div",{className:"absolute -left-[14px] w-px h-full bg-border"})}),c.jsxs("div",{className:"relative ml-6",children:[c.jsx("div",{className:`absolute -left-[17px] top-[7px] w-[7px] h-[7px] rounded-full border border-background z-10 ${e.isError?"bg-red-500":"bg-green-500"}`}),c.jsxs("button",{onClick:()=>{e.toolResultEvent&&n(e.toolResultEvent.index)},disabled:!e.toolResultEvent,className:`group flex items-start gap-1.5 w-full text-left border-l-2 pl-2 py-1 rounded-r transition-colors ${e.isError?"border-red-500/40 hover:bg-red-500/5":"border-green-500/40 hover:bg-green-500/5"} ${e.toolResultEvent?"":"opacity-50 cursor-default"}`,children:[e.isError?c.jsx($v,{size:12,className:"text-red-500 shrink-0 mt-0.5"}):c.jsx(s6,{size:12,className:"text-green-500 shrink-0 mt-0.5"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:`text-[10px] font-medium ${e.isError?"text-red-600 dark:text-red-400":"text-green-600 dark:text-green-400"}`,children:[e.isError?"Error":"Success",e.durationSec>0&&c.jsxs("span",{className:"ml-1 text-muted-foreground font-normal",children:[e.durationSec.toFixed(1),"s"]})]}),e.toolResultEvent&&c.jsx("div",{className:"text-[11px] text-muted-foreground whitespace-pre-wrap break-words leading-tight",children:(()=>{const a=e.toolResultEvent.payload.return_value;return typeof a=="string"?a:a&&typeof a=="object"?JSON.stringify(a):""})()})]})]})]})]})}function Gj(e){const t=[];let n=0,a=0;const s=[];for(const p of e)p.type==="TurnBegin"?(n++,a++,s.push(p)):p.type==="TurnEnd"&&(n++,a--,a<0?(t.push({event:p,reason:"TurnEnd without matching TurnBegin"}),a=0):s.pop());for(const p of s)t.push({event:p,reason:"TurnBegin without matching TurnEnd"});let l=0;const u=[];for(const p of e)p.type==="CompactionBegin"?(n++,l++,u.push(p)):p.type==="CompactionEnd"&&(n++,l--,l<0?(t.push({event:p,reason:"CompactionEnd without matching CompactionBegin"}),l=0):u.pop());for(const p of u)t.push({event:p,reason:"CompactionBegin without matching CompactionEnd"});const f=new Map;for(const p of e)if(p.type==="ToolCall"){n++;const g=p.payload.function,y=p.payload.id??g?.id??"";y&&f.set(y,p)}else if(p.type==="ToolResult"){n++;const g=p.payload.tool_call_id;g&&f.has(g)?f.delete(g):t.push({event:p,reason:`ToolResult references unknown tool_call_id: ${g??"(none)"}`})}for(const p of f.values())t.push({event:p,reason:"ToolCall without matching ToolResult"});const h=new Map;for(const p of e)if(p.type==="ApprovalRequest"){n++;const g=p.payload.id;g&&h.set(g,p)}else if(p.type==="ApprovalResponse"){n++;const g=p.payload.request_id;g&&h.has(g)?h.delete(g):t.push({event:p,reason:`ApprovalResponse references unknown request id: ${g??"(none)"}`})}for(const p of h.values())t.push({event:p,reason:"ApprovalRequest without matching ApprovalResponse"});return{score:Math.round((1-t.length/Math.max(n,1))*100),totalPairable:n,orphans:t}}const Xj={TurnBegin:"bg-blue-500/15 text-blue-700 dark:text-blue-300 border-blue-500/30",TurnEnd:"bg-blue-500/15 text-blue-700 dark:text-blue-300 border-blue-500/30",CompactionBegin:"bg-orange-500/15 text-orange-700 dark:text-orange-300 border-orange-500/30",CompactionEnd:"bg-orange-500/15 text-orange-700 dark:text-orange-300 border-orange-500/30",ToolCall:"bg-purple-500/15 text-purple-700 dark:text-purple-300 border-purple-500/30",ToolResult:"bg-purple-500/15 text-purple-700 dark:text-purple-300 border-purple-500/30",ApprovalRequest:"bg-amber-500/15 text-amber-700 dark:text-amber-300 border-amber-500/30",ApprovalResponse:"bg-amber-500/15 text-amber-700 dark:text-amber-300 border-amber-500/30"};function Qj(e){return Xj[e]??"bg-secondary text-secondary-foreground border-border"}function Wj({result:e,onScrollToIndex:t}){const{score:n,totalPairable:a,orphans:s}=e,l=n===100?Wm:Yv,u=n===100?"text-green-600 dark:text-green-400":n>=80?"text-amber-600 dark:text-amber-400":"text-red-600 dark:text-red-400";return c.jsxs("div",{className:"border rounded-md bg-card p-3 space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(l,{size:16,className:u}),c.jsxs("span",{className:`text-sm font-semibold ${u}`,children:[n,"%"]}),c.jsxs("span",{className:"text-xs text-muted-foreground",children:["integrity · ",a," pairable events · ",s.length," orphan",s.length!==1?"s":""]})]}),s.length>0&&c.jsx("div",{className:"space-y-1 max-h-48 overflow-y-auto",children:s.map((f,h)=>c.jsxs("button",{onClick:()=>t(f.event.index),className:"flex items-center gap-2 w-full text-left rounded px-2 py-1 hover:bg-muted/60 transition-colors group",children:[c.jsx("span",{className:`shrink-0 rounded border px-1.5 py-0 text-[10px] font-medium ${Qj(f.event.type)}`,children:f.event.type}),c.jsx("span",{className:"truncate text-[11px] text-muted-foreground group-hover:text-foreground",children:f.reason}),c.jsxs("span",{className:"ml-auto shrink-0 text-[10px] font-mono text-muted-foreground",children:["#",f.event.index]})]},h))}),s.length===0&&c.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-green-600 dark:text-green-400",children:[c.jsx(Wm,{size:13}),"All pairable events are properly matched."]})]})}const Tf=0,Ti=1,Ol=2,yk=4;function _2(e){return()=>e}function Kj(e){e()}function Ek(e,t){return n=>e(t(n))}function A2(e,t){return()=>e(t)}function Zj(e,t){return n=>e(t,n)}function _g(e){return e!==void 0}function Jj(...e){return()=>{e.map(Kj)}}function Il(){}function vf(e,t){return t(e),e}function eM(e,t){return t(e)}function Bt(...e){return e}function Et(e,t){return e(Ti,t)}function Je(e,t){e(Tf,t)}function Ag(e){e(Ol)}function Ft(e){return e(yk)}function Be(e,t){return Et(e,Zj(t,Tf))}function Lr(e,t){const n=e(Ti,a=>{n(),t(a)});return n}function w2(e){let t,n;return a=>s=>{t=s,n&&clearTimeout(n),n=setTimeout(()=>{a(t)},e)}}function Tk(e,t){return e===t}function jt(e=Tk){let t;return n=>a=>{e(t,a)||(t=a,n(a))}}function Ye(e){return t=>n=>{e(n)&&t(n)}}function _e(e){return t=>Ek(t,e)}function Xr(e){return t=>()=>{t(e)}}function ye(e,...t){const n=tM(...t);return(a,s)=>{switch(a){case Ol:Ag(e);return;case Ti:return Et(e,n(s))}}}function Zr(e,t){return n=>a=>{n(t=e(t,a))}}function as(e){return t=>n=>{e>0?e--:t(n)}}function _a(e){let t=null,n;return a=>s=>{t=s,!n&&(n=setTimeout(()=>{n=void 0,a(t)},e))}}function tt(...e){const t=new Array(e.length);let n=0,a=null;const s=Math.pow(2,e.length)-1;return e.forEach((l,u)=>{const f=Math.pow(2,u);Et(l,h=>{const m=n;n=n|f,t[u]=h,m!==s&&n===s&&a&&(a(),a=null)})}),l=>u=>{const f=()=>{l([u].concat(t))};n===s?f():a=f}}function tM(...e){return t=>e.reduceRight(eM,t)}function nM(e){let t,n;const a=()=>t?.();return function(s,l){switch(s){case Ti:return l?n===l?void 0:(a(),n=l,t=Et(e,l),t):(a(),Il);case Ol:a(),n=null;return}}}function ke(e){let t=e;const n=ct();return(a,s)=>{switch(a){case Tf:t=s;break;case Ti:{s(t);break}case yk:return t}return n(a,s)}}function Nn(e,t){return vf(ke(t),n=>Be(e,n))}function ct(){const e=[];return(t,n)=>{switch(t){case Tf:e.slice().forEach(a=>{a(n)});return;case Ol:e.splice(0,e.length);return;case Ti:return e.push(n),()=>{const a=e.indexOf(n);a>-1&&e.splice(a,1)}}}}function sr(e){return vf(ct(),t=>Be(e,t))}function bt(e,t=[],{singleton:n}={singleton:!0}){return{constructor:e,dependencies:t,id:rM(),singleton:n}}const rM=()=>Symbol();function aM(e){const t=new Map,n=({constructor:a,dependencies:s,id:l,singleton:u})=>{if(u&&t.has(l))return t.get(l);const f=a(s.map(h=>n(h)));return u&&t.set(l,f),f};return n(e)}function rn(...e){const t=ct(),n=new Array(e.length);let a=0;const s=Math.pow(2,e.length)-1;return e.forEach((l,u)=>{const f=Math.pow(2,u);Et(l,h=>{n[u]=h,a=a|f,a===s&&Je(t,n)})}),function(l,u){switch(l){case Ol:{Ag(t);return}case Ti:return a===s&&u(n),Et(t,u)}}}function Ve(e,t=Tk){return ye(e,jt(t))}function pp(...e){return function(t,n){switch(t){case Ol:return;case Ti:return Jj(...e.map(a=>Et(a,n)))}}}var Yn=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(Yn||{});const iM={0:"debug",3:"error",1:"log",2:"warn"},sM=()=>typeof globalThis>"u"?window:globalThis,vi=bt(()=>{const e=ke(3);return{log:ke((t,n,a=1)=>{var s;const l=(s=sM().VIRTUOSO_LOG_LEVEL)!=null?s:Ft(e);a>=l&&console[iM[a]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,n)}),logLevel:e}},[],{singleton:!0});function us(e,t,n){return wg(e,t,n).callbackRef}function wg(e,t,n){const a=Re.useRef(null);let s=u=>{};const l=Re.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(u=>{const f=()=>{const h=u[0].target;h.offsetParent!==null&&e(h)};n?f():requestAnimationFrame(f)}):null,[e,n]);return s=u=>{u&&t?(l?.observe(u),a.current=u):(a.current&&l?.unobserve(a.current),a.current=null)},{callbackRef:s,ref:a}}function lM(e,t,n,a,s,l,u,f,h){const m=Re.useCallback(p=>{const g=oM(p.children,t,f?"offsetWidth":"offsetHeight",s);let y=p.parentElement;for(;!y.dataset.virtuosoScroller;)y=y.parentElement;const T=y.lastElementChild.dataset.viewportType==="window";let S;T&&(S=y.ownerDocument.defaultView);const k=u?f?u.scrollLeft:u.scrollTop:T?f?S.scrollX||S.document.documentElement.scrollLeft:S.scrollY||S.document.documentElement.scrollTop:f?y.scrollLeft:y.scrollTop,N=u?f?u.scrollWidth:u.scrollHeight:T?f?S.document.documentElement.scrollWidth:S.document.documentElement.scrollHeight:f?y.scrollWidth:y.scrollHeight,_=u?f?u.offsetWidth:u.offsetHeight:T?f?S.innerWidth:S.innerHeight:f?y.offsetWidth:y.offsetHeight;a({scrollHeight:N,scrollTop:Math.max(k,0),viewportHeight:_}),l?.(f?R2("column-gap",getComputedStyle(p).columnGap,s):R2("row-gap",getComputedStyle(p).rowGap,s)),g!==null&&e(g)},[e,t,s,l,u,a,f]);return wg(m,n,h)}function oM(e,t,n,a){const s=e.length;if(s===0)return null;const l=[];for(let u=0;u<s;u++){const f=e.item(u);if(f.dataset.index===void 0)continue;const h=parseInt(f.dataset.index),m=parseFloat(f.dataset.knownSize),p=t(f,n);if(p===0&&a("Zero-sized element, this should not happen",{child:f},Yn.ERROR),p===m)continue;const g=l[l.length-1];l.length===0||g.size!==p||g.endIndex!==h-1?l.push({endIndex:h,size:p,startIndex:h}):l[l.length-1].endIndex++}return l}function R2(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Yn.WARN),t==="normal"?0:parseInt(t??"0",10)}function vk(e,t,n){const a=Re.useRef(null),s=Re.useCallback(h=>{if(!(h!=null&&h.offsetParent))return;const m=h.getBoundingClientRect(),p=m.width;let g,y;if(t){const T=t.getBoundingClientRect(),S=m.top-T.top;y=T.height-Math.max(0,S),g=S+t.scrollTop}else{const T=u.current.ownerDocument.defaultView;y=T.innerHeight-Math.max(0,m.top),g=m.top+T.scrollY}a.current={offsetTop:g,visibleHeight:y,visibleWidth:p},e(a.current)},[e,t]),{callbackRef:l,ref:u}=wg(s,!0,n),f=Re.useCallback(()=>{s(u.current)},[s,u]);return Re.useEffect(()=>{var h;if(t){t.addEventListener("scroll",f);const m=new ResizeObserver(()=>{requestAnimationFrame(f)});return m.observe(t),()=>{t.removeEventListener("scroll",f),m.unobserve(t)}}else{const m=(h=u.current)==null?void 0:h.ownerDocument.defaultView;return m?.addEventListener("scroll",f),m?.addEventListener("resize",f),()=>{m?.removeEventListener("scroll",f),m?.removeEventListener("resize",f)}}},[f,t,u]),l}const Ln=bt(()=>{const e=ct(),t=ct(),n=ke(0),a=ct(),s=ke(0),l=ct(),u=ct(),f=ke(0),h=ke(0),m=ke(0),p=ke(0),g=ct(),y=ct(),T=ke(!1),S=ke(!1),k=ke(!1);return Be(ye(e,_e(({scrollTop:N})=>N)),t),Be(ye(e,_e(({scrollHeight:N})=>N)),u),Be(t,s),{deviation:n,fixedFooterHeight:m,fixedHeaderHeight:h,footerHeight:p,headerHeight:f,horizontalDirection:S,scrollBy:y,scrollContainerState:e,scrollHeight:u,scrollingInProgress:T,scrollTo:g,scrollTop:t,skipAnimationFrameInResizeObserver:k,smoothScrollTargetReached:a,statefulScrollTop:s,viewportHeight:l}},[],{singleton:!0}),uu={lvl:0};function Sk(e,t){const n=e.length;if(n===0)return[];let{index:a,value:s}=t(e[0]);const l=[];for(let u=1;u<n;u++){const{index:f,value:h}=t(e[u]);l.push({end:f-1,start:a,value:s}),a=f,s=h}return l.push({end:1/0,start:a,value:s}),l}function _t(e){return e===uu}function cu(e,t){if(!_t(e))return t===e.k?e.v:t<e.k?cu(e.l,t):cu(e.r,t)}function zr(e,t,n="k"){if(_t(e))return[-1/0,void 0];if(Number(e[n])===t)return[e.k,e.v];if(Number(e[n])<t){const a=zr(e.r,t,n);return a[0]===-1/0?[e.k,e.v]:a}return zr(e.l,t,n)}function ar(e,t,n){return _t(e)?Ck(t,n,1):t===e.k?un(e,{k:t,v:n}):t<e.k?O2(un(e,{l:ar(e.l,t,n)})):O2(un(e,{r:ar(e.r,t,n)}))}function pl(){return uu}function gl(e,t,n){if(_t(e))return[];const a=zr(e,t)[0];return uM(xp(e,a,n))}function gp(e,t){if(_t(e))return uu;const{k:n,l:a,r:s}=e;if(t===n){if(_t(a))return s;if(_t(s))return a;{const[l,u]=Nk(a);return Nd(un(e,{k:l,l:kk(a),v:u}))}}else return t<n?Nd(un(e,{l:gp(a,t)})):Nd(un(e,{r:gp(s,t)}))}function Xi(e){return _t(e)?[]:[...Xi(e.l),{k:e.k,v:e.v},...Xi(e.r)]}function xp(e,t,n){if(_t(e))return[];const{k:a,l:s,r:l,v:u}=e;let f=[];return a>t&&(f=f.concat(xp(s,t,n))),a>=t&&a<=n&&f.push({k:a,v:u}),a<=n&&(f=f.concat(xp(l,t,n))),f}function Nd(e){const{l:t,lvl:n,r:a}=e;if(a.lvl>=n-1&&t.lvl>=n-1)return e;if(n>a.lvl+1){if(ym(t))return _k(un(e,{lvl:n-1}));if(!_t(t)&&!_t(t.r))return un(t.r,{l:un(t,{r:t.r.l}),lvl:n,r:un(e,{l:t.r.r,lvl:n-1})});throw new Error("Unexpected empty nodes")}else{if(ym(e))return bp(un(e,{lvl:n-1}));if(!_t(a)&&!_t(a.l)){const s=a.l,l=ym(s)?a.lvl-1:a.lvl;return un(s,{l:un(e,{lvl:n-1,r:s.l}),lvl:s.lvl+1,r:bp(un(a,{l:s.r,lvl:l}))})}else throw new Error("Unexpected empty nodes")}}function un(e,t){return Ck(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function kk(e){return _t(e.r)?e.l:Nd(un(e,{r:kk(e.r)}))}function ym(e){return _t(e)||e.lvl>e.r.lvl}function Nk(e){return _t(e.r)?[e.k,e.v]:Nk(e.r)}function Ck(e,t,n,a=uu,s=uu){return{k:e,l:a,lvl:n,r:s,v:t}}function O2(e){return bp(_k(e))}function _k(e){const{l:t}=e;return!_t(t)&&t.lvl===e.lvl?un(t,{r:un(e,{l:t.r})}):e}function bp(e){const{lvl:t,r:n}=e;return!_t(n)&&!_t(n.r)&&n.lvl===t&&n.r.lvl===t?un(n,{l:un(e,{r:n.l}),lvl:t+1}):e}function uM(e){return Sk(e,({k:t,v:n})=>({index:t,value:n}))}function Ak(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function du(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Rg=bt(()=>({recalcInProgress:ke(!1)}),[],{singleton:!0});function wk(e,t,n){return e[$d(e,t,n)]}function $d(e,t,n,a=0){let s=e.length-1;for(;a<=s;){const l=Math.floor((a+s)/2),u=e[l],f=n(u,t);if(f===0)return l;if(f===-1){if(s-a<2)return l-1;s=l-1}else{if(s===a)return l;a=l+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function cM(e,t,n,a){const s=$d(e,t,a),l=$d(e,n,a,s);return e.slice(s,l+1)}function pi(e,t){return Math.round(e.getBoundingClientRect()[t])}function Sf(e){return!_t(e.groupOffsetTree)}function Og({index:e},t){return t===e?0:t<e?-1:1}function dM(){return{groupIndices:[],groupOffsetTree:pl(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:pl()}}function fM(e,t){let n=_t(e)?0:1/0;for(const a of t){const{endIndex:s,size:l,startIndex:u}=a;if(n=Math.min(n,u),_t(e)){e=ar(e,0,l);continue}const f=gl(e,u-1,s+1);if(f.some(yM(a)))continue;let h=!1,m=!1;for(const{end:p,start:g,value:y}of f)h?(s>=g||l===y)&&(e=gp(e,g)):(m=y!==l,h=!0),p>s&&s>=g&&y!==l&&(e=ar(e,s+1,y));m&&(e=ar(e,u,l))}return[e,n]}function hM(e){return typeof e.groupIndex<"u"}function mM({offset:e},t){return t===e?0:t<e?-1:1}function fu(e,t,n){if(t.length===0)return 0;const{index:a,offset:s,size:l}=wk(t,e,Og),u=e-a,f=l*u+(u-1)*n+s;return f>0?f+n:f}function Rk(e,t){if(!Sf(t))return e;let n=0;for(;t.groupIndices[n]<=e+n;)n++;return e+n}function Ok(e,t,n){if(hM(e))return t.groupIndices[e.groupIndex]+1;{const a=e.index==="LAST"?n:e.index;let s=Rk(a,t);return s=Math.max(0,s,Math.min(n,s)),s}}function pM(e,t,n,a=0){return a>0&&(t=Math.max(t,wk(e,a,Og).offset)),Sk(cM(e,t,n,mM),bM)}function gM(e,[t,n,a,s]){t.length>0&&a("received item sizes",t,Yn.DEBUG);const l=e.sizeTree;let u=l,f=0;if(n.length>0&&_t(l)&&t.length===2){const y=t[0].size,T=t[1].size;u=n.reduce((S,k)=>ar(ar(S,k,y),k+1,T),u)}else[u,f]=fM(u,t);if(u===l)return e;const{lastIndex:h,lastOffset:m,lastSize:p,offsetTree:g}=yp(e.offsetTree,f,u,s);return{groupIndices:n,groupOffsetTree:n.reduce((y,T)=>ar(y,T,fu(T,g,s)),pl()),lastIndex:h,lastOffset:m,lastSize:p,offsetTree:g,sizeTree:u}}function xM(e){return Xi(e).map(({k:t,v:n},a,s)=>{const l=s[a+1];return{endIndex:l?l.k-1:1/0,size:n,startIndex:t}})}function I2(e,t){let n=0,a=0;for(;n<e;)n+=t[a+1]-t[a]-1,a++;return a-(n===e?0:1)}function yp(e,t,n,a){let s=e,l=0,u=0,f=0,h=0;if(t!==0){h=$d(s,t-1,Og),f=s[h].offset;const m=zr(n,t-1);l=m[0],u=m[1],s.length&&s[h].size===zr(n,t)[1]&&(h-=1),s=s.slice(0,h+1)}else s=[];for(const{start:m,value:p}of gl(n,t,1/0)){const g=m-l,y=g*u+f+g*a;s.push({index:m,offset:y,size:p}),l=m,f=y,u=p}return{lastIndex:l,lastOffset:f,lastSize:u,offsetTree:s}}function bM(e){return{index:e.index,value:e}}function yM(e){const{endIndex:t,size:n,startIndex:a}=e;return s=>s.start===a&&(s.end===t||s.end===1/0)&&s.value===n}const EM={offsetHeight:"height",offsetWidth:"width"},ra=bt(([{log:e},{recalcInProgress:t}])=>{const n=ct(),a=ct(),s=Nn(a,0),l=ct(),u=ct(),f=ke(0),h=ke([]),m=ke(void 0),p=ke(void 0),g=ke(void 0),y=ke(void 0),T=ke((I,j)=>pi(I,EM[j])),S=ke(void 0),k=ke(0),N=dM(),_=Nn(ye(n,tt(h,e,k),Zr(gM,N),jt()),N),A=Nn(ye(h,jt(),Zr((I,j)=>({current:j,prev:I.current}),{current:[],prev:[]}),_e(({prev:I})=>I)),[]);Be(ye(h,Ye(I=>I.length>0),tt(_,k),_e(([I,j,G])=>{const B=I.reduce((Q,V,te)=>ar(Q,V,fu(V,j.offsetTree,G)||te),pl());return{...j,groupIndices:I,groupOffsetTree:B}})),_),Be(ye(a,tt(_),Ye(([I,{lastIndex:j}])=>I<j),_e(([I,{lastIndex:j,lastSize:G}])=>[{endIndex:j,size:G,startIndex:I}])),n),Be(m,p);const w=Nn(ye(m,_e(I=>I===void 0)),!0);Be(ye(p,Ye(I=>I!==void 0&&_t(Ft(_).sizeTree)),_e(I=>{const j=Ft(g),G=Ft(h).length>0;return j?G?[{endIndex:0,size:j,startIndex:0},{endIndex:1,size:I,startIndex:1}]:[]:[{endIndex:0,size:I,startIndex:0}]})),n),Be(ye(y,Ye(I=>I!==void 0&&I.length>0&&_t(Ft(_).sizeTree)),_e(I=>{const j=[];let G=I[0],B=0;for(let Q=1;Q<I.length;Q++){const V=I[Q];V!==G&&(j.push({endIndex:Q-1,size:G,startIndex:B}),G=V,B=Q)}return j.push({endIndex:I.length-1,size:G,startIndex:B}),j})),n),Be(ye(h,tt(g,p),Ye(([,I,j])=>I!==void 0&&j!==void 0),_e(([I,j,G])=>{const B=[];for(let Q=0;Q<I.length;Q++){const V=I[Q],te=I[Q+1];B.push({startIndex:V,endIndex:V,size:j}),te!==void 0&&B.push({startIndex:V+1,endIndex:te-1,size:G})}return B})),n);const P=sr(ye(n,tt(_),Zr(({sizes:I},[j,G])=>({changed:G!==I,sizes:G}),{changed:!1,sizes:N}),_e(I=>I.changed)));Et(ye(f,Zr((I,j)=>({diff:I.prev-j,prev:j}),{diff:0,prev:0}),_e(I=>I.diff)),I=>{const{groupIndices:j}=Ft(_);if(I>0)Je(t,!0),Je(l,I+I2(I,j));else if(I<0){const G=Ft(A);G.length>0&&(I-=I2(-I,G)),Je(u,I)}}),Et(ye(f,tt(e)),([I,j])=>{I<0&&j("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:f},Yn.ERROR)});const F=sr(l);Be(ye(l,tt(_),_e(([I,j])=>{const G=j.groupIndices.length>0,B=[],Q=j.lastSize;if(G){const V=cu(j.sizeTree,0);let te=0,ee=0;for(;te<I;){const R=j.groupIndices[ee],q=j.groupIndices.length===ee+1?1/0:j.groupIndices[ee+1]-R-1;B.push({endIndex:R,size:V,startIndex:R}),B.push({endIndex:R+1+q-1,size:Q,startIndex:R+1}),ee++,te+=q+1}const U=Xi(j.sizeTree);return te!==I&&U.shift(),U.reduce((R,{k:q,v:W})=>{let he=R.ranges;return R.prevSize!==0&&(he=[...R.ranges,{endIndex:q+I-1,size:R.prevSize,startIndex:R.prevIndex}]),{prevIndex:q+I,prevSize:W,ranges:he}},{prevIndex:I,prevSize:0,ranges:B}).ranges}return Xi(j.sizeTree).reduce((V,{k:te,v:ee})=>({prevIndex:te+I,prevSize:ee,ranges:[...V.ranges,{endIndex:te+I-1,size:V.prevSize,startIndex:V.prevIndex}]}),{prevIndex:0,prevSize:Q,ranges:[]}).ranges})),n);const M=sr(ye(u,tt(_,k),_e(([I,{offsetTree:j},G])=>{const B=-I;return fu(B,j,G)})));return Be(ye(u,tt(_,k),_e(([I,j,G])=>{if(j.groupIndices.length>0){if(_t(j.sizeTree))return j;let B=pl();const Q=Ft(A);let V=0,te=0,ee=0;for(;V<-I;){ee=Q[te];const U=Q[te+1]-ee-1;te++,V+=U+1}if(B=Xi(j.sizeTree).reduce((U,{k:R,v:q})=>ar(U,Math.max(0,R+I),q),B),V!==-I){const U=cu(j.sizeTree,ee);B=ar(B,0,U);const R=zr(j.sizeTree,-I+1)[1];B=ar(B,1,R)}return{...j,sizeTree:B,...yp(j.offsetTree,0,B,G)}}else{const B=Xi(j.sizeTree).reduce((Q,{k:V,v:te})=>ar(Q,Math.max(0,V+I),te),pl());return{...j,sizeTree:B,...yp(j.offsetTree,0,B,G)}}})),_),{beforeUnshiftWith:F,data:S,defaultItemSize:p,firstItemIndex:f,fixedItemSize:m,fixedGroupSize:g,gap:k,groupIndices:h,heightEstimates:y,itemSize:T,listRefresh:P,shiftWith:u,shiftWithOffset:M,sizeRanges:n,sizes:_,statefulTotalCount:s,totalCount:a,trackItemSizes:w,unshiftWith:l}},Bt(vi,Rg),{singleton:!0});function TM(e){return e.reduce((t,n)=>(t.groupIndices.push(t.totalCount),t.totalCount+=n+1,t),{groupIndices:[],totalCount:0})}const Ik=bt(([{groupIndices:e,sizes:t,totalCount:n},{headerHeight:a,scrollTop:s}])=>{const l=ct(),u=ct(),f=sr(ye(l,_e(TM)));return Be(ye(f,_e(h=>h.totalCount)),n),Be(ye(f,_e(h=>h.groupIndices)),e),Be(ye(rn(s,t,a),Ye(([h,m])=>Sf(m)),_e(([h,m,p])=>zr(m.groupOffsetTree,Math.max(h-p,0),"v")[0]),jt(),_e(h=>[h])),u),{groupCounts:l,topItemsIndexes:u}},Bt(ra,Ln)),Si=bt(([{log:e}])=>{const t=ke(!1),n=sr(ye(t,Ye(a=>a),jt()));return Et(t,a=>{a&&Ft(e)("props updated",{},Yn.DEBUG)}),{didMount:n,propsReady:t}},Bt(vi),{singleton:!0}),vM=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Dk(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!vM)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const Cu=bt(([{gap:e,listRefresh:t,sizes:n,totalCount:a},{fixedFooterHeight:s,fixedHeaderHeight:l,footerHeight:u,headerHeight:f,scrollingInProgress:h,scrollTo:m,smoothScrollTargetReached:p,viewportHeight:g},{log:y}])=>{const T=ct(),S=ct(),k=ke(0);let N=null,_=null,A=null;function w(){N&&(N(),N=null),A&&(A(),A=null),_&&(clearTimeout(_),_=null),Je(h,!1)}return Be(ye(T,tt(n,g,a,k,f,u,y),tt(e,l,s),_e(([[P,F,M,I,j,G,B,Q],V,te,ee])=>{const U=Dk(P),{align:R,behavior:q,offset:W}=U,he=I-1,O=Ok(U,F,he);let H=fu(O,F.offsetTree,V)+G;R==="end"?(H+=te+zr(F.sizeTree,O)[1]-M+ee,O===he&&(H+=B)):R==="center"?H+=(te+zr(F.sizeTree,O)[1]-M+ee)/2:H-=j,W&&(H+=W);const Z=L=>{w(),L?(Q("retrying to scroll to",{location:P},Yn.DEBUG),Je(T,P)):(Je(S,!0),Q("list did not change, scroll successful",{},Yn.DEBUG))};if(w(),q==="smooth"){let L=!1;A=Et(t,fe=>{L=L||fe}),N=Lr(p,()=>{Z(L)})}else N=Lr(ye(t,SM(150)),Z);return _=setTimeout(()=>{w()},1200),Je(h,!0),Q("scrolling from index to",{behavior:q,index:O,top:H},Yn.DEBUG),{behavior:q,top:H}})),m),{scrollTargetReached:S,scrollToIndex:T,topListHeight:k}},Bt(ra,Ln,vi),{singleton:!0});function SM(e){return t=>{const n=setTimeout(()=>{t(!1)},e);return a=>{a&&(t(!0),clearTimeout(n))}}}function Ig(e,t){e==0?t():requestAnimationFrame(()=>{Ig(e-1,t)})}function Dg(e,t){const n=t-1;return typeof e=="number"?e:e.index==="LAST"?n:e.index}const _u=bt(([{defaultItemSize:e,listRefresh:t,sizes:n},{scrollTop:a},{scrollTargetReached:s,scrollToIndex:l},{didMount:u}])=>{const f=ke(!0),h=ke(0),m=ke(!0);return Be(ye(u,tt(h),Ye(([p,g])=>!!g),Xr(!1)),f),Be(ye(u,tt(h),Ye(([p,g])=>!!g),Xr(!1)),m),Et(ye(rn(t,u),tt(f,n,e,m),Ye(([[,p],g,{sizeTree:y},T,S])=>p&&(!_t(y)||_g(T))&&!g&&!S),tt(h)),([,p])=>{Lr(s,()=>{Je(m,!0)}),Ig(4,()=>{Lr(a,()=>{Je(f,!0)}),Je(l,p)})}),{initialItemFinalLocationReached:m,initialTopMostItemIndex:h,scrolledToInitialItem:f}},Bt(ra,Ln,Cu,Si),{singleton:!0});function Lk(e,t){return Math.abs(e-t)<1.01}const hu="up",Go="down",kM="none",NM={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},CM=0,Au=bt(([{footerHeight:e,headerHeight:t,scrollBy:n,scrollContainerState:a,scrollTop:s,viewportHeight:l}])=>{const u=ke(!1),f=ke(!0),h=ct(),m=ct(),p=ke(4),g=ke(CM),y=Nn(ye(pp(ye(Ve(s),as(1),Xr(!0)),ye(Ve(s),as(1),Xr(!1),w2(100))),jt()),!1),T=Nn(ye(pp(ye(n,Xr(!0)),ye(n,Xr(!1),w2(200))),jt()),!1);Be(ye(rn(Ve(s),Ve(g)),_e(([A,w])=>A<=w),jt()),f),Be(ye(f,_a(50)),m);const S=sr(ye(rn(a,Ve(l),Ve(t),Ve(e),Ve(p)),Zr((A,[{scrollHeight:w,scrollTop:P},F,M,I,j])=>{const G=P+F-w>-j,B={scrollHeight:w,scrollTop:P,viewportHeight:F};if(G){let V,te;return P>A.state.scrollTop?(V="SCROLLED_DOWN",te=A.state.scrollTop-P):(V="SIZE_DECREASED",te=A.state.scrollTop-P||A.scrollTopDelta),{atBottom:!0,atBottomBecause:V,scrollTopDelta:te,state:B}}let Q;return B.scrollHeight>A.state.scrollHeight?Q="SIZE_INCREASED":F<A.state.viewportHeight?Q="VIEWPORT_HEIGHT_DECREASING":P<A.state.scrollTop?Q="SCROLLING_UPWARDS":Q="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:Q,state:B}},NM),jt((A,w)=>A&&A.atBottom===w.atBottom))),k=Nn(ye(a,Zr((A,{scrollHeight:w,scrollTop:P,viewportHeight:F})=>{if(Lk(A.scrollHeight,w))return{changed:!1,jump:0,scrollHeight:w,scrollTop:P};{const M=w-(P+F)<1;return A.scrollTop!==P&&M?{changed:!0,jump:A.scrollTop-P,scrollHeight:w,scrollTop:P}:{changed:!0,jump:0,scrollHeight:w,scrollTop:P}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),Ye(A=>A.changed),_e(A=>A.jump)),0);Be(ye(S,_e(A=>A.atBottom)),u),Be(ye(u,_a(50)),h);const N=ke(Go);Be(ye(a,_e(({scrollTop:A})=>A),jt(),Zr((A,w)=>Ft(T)?{direction:A.direction,prevScrollTop:w}:{direction:w<A.prevScrollTop?hu:Go,prevScrollTop:w},{direction:Go,prevScrollTop:0}),_e(A=>A.direction)),N),Be(ye(a,_a(50),Xr(kM)),N);const _=ke(0);return Be(ye(y,Ye(A=>!A),Xr(0)),_),Be(ye(s,_a(100),tt(y),Ye(([A,w])=>!!w),Zr(([A,w],[P])=>[w,P],[0,0]),_e(([A,w])=>w-A)),_),{atBottomState:S,atBottomStateChange:h,atBottomThreshold:p,atTopStateChange:m,atTopThreshold:g,isAtBottom:u,isAtTop:f,isScrolling:y,lastJumpDueToItemResize:k,scrollDirection:N,scrollVelocity:_}},Bt(Ln)),mu="top",pu="bottom",D2="none";function L2(e,t,n){return typeof e=="number"?n===hu&&t===mu||n===Go&&t===pu?e:0:n===hu?t===mu?e.main:e.reverse:t===pu?e.main:e.reverse}function j2(e,t){var n;return typeof e=="number"?e:(n=e[t])!=null?n:0}const Lg=bt(([{deviation:e,fixedHeaderHeight:t,headerHeight:n,scrollTop:a,viewportHeight:s}])=>{const l=ct(),u=ke(0),f=ke(0),h=ke(0),m=Nn(ye(rn(Ve(a),Ve(s),Ve(n),Ve(l,du),Ve(h),Ve(u),Ve(t),Ve(e),Ve(f)),_e(([p,g,y,[T,S],k,N,_,A,w])=>{const P=p-A,F=N+_,M=Math.max(y-P,0);let I=D2;const j=j2(w,mu),G=j2(w,pu);return T-=A,T+=y+_,S+=y+_,S-=A,T>p+F-j&&(I=hu),S<p-M+g+G&&(I=Go),I!==D2?[Math.max(P-y-L2(k,mu,I)-j,0),P-M-_+g+L2(k,pu,I)+G]:null}),Ye(p=>p!=null),jt(du)),[0,0]);return{increaseViewportBy:f,listBoundary:l,overscan:h,topListHeight:u,visibleRange:m}},Bt(Ln),{singleton:!0});function _M(e,t,n){if(Sf(t)){const a=Rk(e,t);return[{index:zr(t.groupOffsetTree,a)[0],offset:0,size:0},{data:n?.[0],index:a,offset:0,size:0}]}return[{data:n?.[0],index:e,offset:0,size:0}]}const Em={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function Cd(e,t,n,a,s,l){const{lastIndex:u,lastOffset:f,lastSize:h}=s;let m=0,p=0;if(e.length>0){m=e[0].offset;const k=e[e.length-1];p=k.offset+k.size}const g=n-u,y=f+g*h+(g-1)*a,T=m,S=y-p;return{bottom:p,firstItemIndex:l,items:M2(e,s,l),offsetBottom:S,offsetTop:m,top:T,topItems:M2(t,s,l),topListHeight:t.reduce((k,N)=>N.size+k,0),totalCount:n}}function jk(e,t,n,a,s,l){let u=0;if(n.groupIndices.length>0)for(const p of n.groupIndices){if(p-u>=e)break;u++}const f=e+u,h=Dg(t,f),m=Array.from({length:f}).map((p,g)=>({data:l[g+h],index:g+h,offset:0,size:0}));return Cd(m,[],f,s,n,a)}function M2(e,t,n){if(e.length===0)return[];if(!Sf(t))return e.map(m=>({...m,index:m.index+n,originalIndex:m.index}));const a=e[0].index,s=e[e.length-1].index,l=[],u=gl(t.groupOffsetTree,a,s);let f,h=0;for(const m of e){(!f||f.end<m.index)&&(f=u.shift(),h=t.groupIndices.indexOf(f.start));let p;m.index===f.start?p={index:h,type:"group"}:p={groupIndex:h,index:m.index-(h+1)+n},l.push({...p,data:m.data,offset:m.offset,originalIndex:m.index,size:m.size})}return l}function B2(e,t){var n;return e===void 0?0:typeof e=="number"?e:(n=e[t])!=null?n:0}const cs=bt(([{data:e,firstItemIndex:t,gap:n,sizes:a,totalCount:s},l,{listBoundary:u,topListHeight:f,visibleRange:h},{initialTopMostItemIndex:m,scrolledToInitialItem:p},{topListHeight:g},y,{didMount:T},{recalcInProgress:S}])=>{const k=ke([]),N=ke(0),_=ct(),A=ke(0);Be(l.topItemsIndexes,k);const w=Nn(ye(rn(T,S,Ve(h,du),Ve(s),Ve(a),Ve(m),p,Ve(k),Ve(t),Ve(n),Ve(A),e),Ye(([I,j,,G,,,,,,,,B])=>{const Q=B&&B.length!==G;return I&&!j&&!Q}),_e(([,,[I,j],G,B,Q,V,te,ee,U,R,q])=>{var W,he,O,H;const Z=B,{offsetTree:L,sizeTree:fe}=Z,Ne=Ft(N);if(G===0)return{...Em,totalCount:G};if(I===0&&j===0)return Ne===0?{...Em,totalCount:G}:jk(Ne,Q,B,ee,U,q||[]);if(_t(fe))return Ne>0?null:Cd(_M(Dg(Q,G),Z,q),[],G,U,Z,ee);const ve=[];if(te.length>0){const $e=te[0],pe=te[te.length-1];let Ee=0;for(const we of gl(fe,$e,pe)){const qe=we.value,dt=Math.max(we.start,$e),an=Math.min(we.end,pe);for(let Pt=dt;Pt<=an;Pt++)ve.push({data:q?.[Pt],index:Pt,offset:Ee,size:qe}),Ee+=qe}}if(!V)return Cd([],ve,G,U,Z,ee);const ge=te.length>0?te[te.length-1]+1:0,ue=pM(L,I,j,ge);if(ue.length===0)return null;const xe=G-1,Ae=vf([],$e=>{for(const pe of ue){const Ee=pe.value;let we=Ee.offset,qe=pe.start;const dt=Ee.size;if(Ee.offset<I){qe+=Math.floor((I-Ee.offset+U)/(dt+U));const Pt=qe-pe.start;we+=Pt*dt+Pt*U}qe<ge&&(we+=(ge-qe)*dt,qe=ge);const an=Math.min(pe.end,xe);for(let Pt=qe;Pt<=an&&!(we>=j);Pt++)$e.push({data:q?.[Pt],index:Pt,offset:we,size:dt}),we+=dt+U}}),Le=B2(R,mu),Fe=B2(R,pu);if(Ae.length>0&&(Le>0||Fe>0)){const $e=Ae[0],pe=Ae[Ae.length-1];if(Le>0&&$e.index>ge){const Ee=Math.min(Le,$e.index-ge),we=[];let qe=$e.offset;for(let dt=$e.index-1;dt>=$e.index-Ee;dt--){const an=(he=(W=gl(fe,dt,dt)[0])==null?void 0:W.value)!=null?he:$e.size;qe-=an+U,we.unshift({data:q?.[dt],index:dt,offset:qe,size:an})}Ae.unshift(...we)}if(Fe>0&&pe.index<xe){const Ee=Math.min(Fe,xe-pe.index);let we=pe.offset+pe.size+U;for(let qe=pe.index+1;qe<=pe.index+Ee;qe++){const dt=(H=(O=gl(fe,qe,qe)[0])==null?void 0:O.value)!=null?H:pe.size;Ae.push({data:q?.[qe],index:qe,offset:we,size:dt}),we+=dt+U}}}return Cd(Ae,ve,G,U,Z,ee)}),Ye(I=>I!==null),jt()),Em);Be(ye(e,Ye(_g),_e(I=>I?.length)),s),Be(ye(w,_e(I=>I.topListHeight)),g),Be(g,f),Be(ye(w,_e(I=>[I.top,I.bottom])),u),Be(ye(w,_e(I=>I.items)),_);const P=sr(ye(w,Ye(({items:I})=>I.length>0),tt(s,e),Ye(([{items:I},j])=>I[I.length-1].originalIndex===j-1),_e(([,I,j])=>[I-1,j]),jt(du),_e(([I])=>I))),F=sr(ye(w,_a(200),Ye(({items:I,topItems:j})=>I.length>0&&I[0].originalIndex===j.length),_e(({items:I})=>I[0].index),jt())),M=sr(ye(w,Ye(({items:I})=>I.length>0),_e(({items:I})=>{let j=0,G=I.length-1;for(;I[j].type==="group"&&j<G;)j++;for(;I[G].type==="group"&&G>j;)G--;return{endIndex:I[G].index,startIndex:I[j].index}}),jt(Ak)));return{endReached:P,initialItemCount:N,itemsRendered:_,listState:w,minOverscanItemCount:A,rangeChanged:M,startReached:F,topItemsIndexes:k,...y}},Bt(ra,Ik,Lg,_u,Cu,Au,Si,Rg),{singleton:!0}),Mk=bt(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:n,headerHeight:a},{listState:s}])=>{const l=ct(),u=Nn(ye(rn(n,e,a,t,s),_e(([f,h,m,p,g])=>f+h+m+p+g.offsetBottom+g.bottom)),0);return Be(Ve(u),l),{totalListHeight:u,totalListHeightChanged:l}},Bt(Ln,cs),{singleton:!0}),AM=bt(([{viewportHeight:e},{totalListHeight:t}])=>{const n=ke(!1),a=Nn(ye(rn(n,e,t),Ye(([s])=>s),_e(([,s,l])=>Math.max(0,s-l)),_a(0),jt()),0);return{alignToBottom:n,paddingTopAddition:a}},Bt(Ln,Mk),{singleton:!0}),Bk=bt(()=>({context:ke(null)})),wM=({itemBottom:e,itemTop:t,locationParams:{align:n,behavior:a,...s},viewportBottom:l,viewportTop:u})=>t<u?{...s,align:n??"start",behavior:a}:e>l?{...s,align:n??"end",behavior:a}:null,Pk=bt(([{gap:e,sizes:t,totalCount:n},{fixedFooterHeight:a,fixedHeaderHeight:s,headerHeight:l,scrollingInProgress:u,scrollTop:f,viewportHeight:h},{scrollToIndex:m}])=>{const p=ct();return Be(ye(p,tt(t,h,n,l,s,a,f),tt(e),_e(([[g,y,T,S,k,N,_,A],w])=>{const{align:P,behavior:F,calculateViewLocation:M=wM,done:I,...j}=g,G=Ok(g,y,S-1),B=fu(G,y.offsetTree,w)+k+N,Q=B+zr(y.sizeTree,G)[1],V=A+N,te=A+T-_,ee=M({itemBottom:Q,itemTop:B,locationParams:{align:P,behavior:F,...j},viewportBottom:te,viewportTop:V});return ee?I&&Lr(ye(u,Ye(U=>!U),as(Ft(u)?1:2)),I):I&&I(),ee}),Ye(g=>g!==null)),m),{scrollIntoView:p}},Bt(ra,Ln,Cu,cs,vi),{singleton:!0});function P2(e){return e?e==="smooth"?"smooth":"auto":!1}const RM=(e,t)=>typeof e=="function"?P2(e(t)):t&&P2(e),OM=bt(([{listRefresh:e,totalCount:t,fixedItemSize:n,data:a},{atBottomState:s,isAtBottom:l},{scrollToIndex:u},{scrolledToInitialItem:f},{didMount:h,propsReady:m},{log:p},{scrollingInProgress:g},{context:y},{scrollIntoView:T}])=>{const S=ke(!1),k=ct();let N=null;function _(F){Je(u,{align:"end",behavior:F,index:"LAST"})}Et(ye(rn(ye(Ve(t),as(1)),h),tt(Ve(S),l,f,g),_e(([[F,M],I,j,G,B])=>{let Q=M&&G,V="auto";return Q&&(V=RM(I,j||B),Q=Q&&!!V),{followOutputBehavior:V,shouldFollow:Q,totalCount:F}}),Ye(({shouldFollow:F})=>F)),({followOutputBehavior:F,totalCount:M})=>{N&&(N(),N=null),Ft(n)?requestAnimationFrame(()=>{Ft(p)("following output to ",{totalCount:M},Yn.DEBUG),_(F)}):N=Lr(e,()=>{Ft(p)("following output to ",{totalCount:M},Yn.DEBUG),_(F),N=null})});function A(F){const M=Lr(s,I=>{F&&!I.atBottom&&I.notAtBottomBecause==="SIZE_INCREASED"&&!N&&(Ft(p)("scrolling to bottom due to increased size",{},Yn.DEBUG),_("auto"))});setTimeout(M,100)}Et(ye(rn(Ve(S),t,m),Ye(([F,,M])=>F&&M),Zr(({value:F},[,M])=>({refreshed:F===M,value:M}),{refreshed:!1,value:0}),Ye(({refreshed:F})=>F),tt(S,t)),([,F])=>{Ft(f)&&A(F!==!1)}),Et(k,()=>{A(Ft(S)!==!1)}),Et(rn(Ve(S),s),([F,M])=>{F&&!M.atBottom&&M.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&_("auto")});const w=ke(null),P=ct();return Be(pp(ye(Ve(a),_e(F=>{var M;return(M=F?.length)!=null?M:0})),ye(Ve(t))),P),Et(ye(rn(ye(P,as(1)),h),tt(Ve(w),f,g,y),_e(([[F,M],I,j,G,B])=>M&&j&&I?.({context:B,totalCount:F,scrollingInProgress:G})),Ye(F=>!!F),_a(0)),F=>{N&&(N(),N=null),Ft(n)?requestAnimationFrame(()=>{Ft(p)("scrolling into view",{}),Je(T,F)}):N=Lr(e,()=>{Ft(p)("scrolling into view",{}),Je(T,F),N=null})}),{autoscrollToBottom:k,followOutput:S,scrollIntoViewOnChange:w}},Bt(ra,Au,Cu,_u,Si,vi,Ln,Bk,Pk)),IM=bt(([{data:e,firstItemIndex:t,gap:n,sizes:a},{initialTopMostItemIndex:s},{initialItemCount:l,listState:u},{didMount:f}])=>(Be(ye(f,tt(l),Ye(([,h])=>h!==0),tt(s,a,t,n,e),_e(([[,h],m,p,g,y,T=[]])=>jk(h,m,p,g,y,T))),u),{}),Bt(ra,_u,cs,Si),{singleton:!0}),DM=bt(([{didMount:e},{scrollTo:t},{listState:n}])=>{const a=ke(0);return Et(ye(e,tt(a),Ye(([,s])=>s!==0),_e(([,s])=>({top:s}))),s=>{Lr(ye(n,as(1),Ye(l=>l.items.length>1)),()=>{requestAnimationFrame(()=>{Je(t,s)})})}),{initialScrollTop:a}},Bt(Si,Ln,cs),{singleton:!0}),zk=bt(([{scrollVelocity:e}])=>{const t=ke(!1),n=ct(),a=ke(!1);return Be(ye(e,tt(a,t,n),Ye(([s,l])=>!!l),_e(([s,l,u,f])=>{const{enter:h,exit:m}=l;if(u){if(m(s,f))return!1}else if(h(s,f))return!0;return u}),jt()),t),Et(ye(rn(t,e,n),tt(a)),([[s,l,u],f])=>{s&&f&&f.change&&f.change(l,u)}),{isSeeking:t,scrollSeekConfiguration:a,scrollSeekRangeChanged:n,scrollVelocity:e}},Bt(Au),{singleton:!0}),jg=bt(([{scrollContainerState:e,scrollTo:t}])=>{const n=ct(),a=ct(),s=ct(),l=ke(!1),u=ke(void 0);return Be(ye(rn(n,a),_e(([{scrollHeight:f,scrollTop:h,viewportHeight:m},{offsetTop:p}])=>({scrollHeight:f,scrollTop:Math.max(0,h-p),viewportHeight:m}))),e),Be(ye(t,tt(a),_e(([f,{offsetTop:h}])=>({...f,top:f.top+h}))),s),{customScrollParent:u,useWindowScroll:l,windowScrollContainerState:n,windowScrollTo:s,windowViewportRect:a}},Bt(Ln)),LM=bt(([{sizeRanges:e,sizes:t},{headerHeight:n,scrollTop:a},{initialTopMostItemIndex:s},{didMount:l},{useWindowScroll:u,windowScrollContainerState:f,windowViewportRect:h}])=>{const m=ct(),p=ke(void 0),g=ke(null),y=ke(null);return Be(f,g),Be(h,y),Et(ye(m,tt(t,a,u,g,y,n)),([T,S,k,N,_,A,w])=>{const P=xM(S.sizeTree);N&&_!==null&&A!==null&&(k=_.scrollTop-A.offsetTop),k-=w,T({ranges:P,scrollTop:k})}),Be(ye(p,Ye(_g),_e(jM)),s),Be(ye(l,tt(p),Ye(([,T])=>T!==void 0),jt(),_e(([,T])=>T.ranges)),e),{getState:m,restoreStateFrom:p}},Bt(ra,Ln,_u,Si,jg));function jM(e){return{align:"start",index:0,offset:e.scrollTop}}const MM=bt(([{topItemsIndexes:e}])=>{const t=ke(0);return Be(ye(t,Ye(n=>n>=0),_e(n=>Array.from({length:n}).map((a,s)=>s))),e),{topItemCount:t}},Bt(cs));function Hk(e){let t=!1,n;return()=>(t||(t=!0,n=e()),n)}const BM=Hk(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),PM=bt(([{deviation:e,scrollBy:t,scrollingInProgress:n,scrollTop:a},{isAtBottom:s,isScrolling:l,lastJumpDueToItemResize:u,scrollDirection:f},{listState:h},{beforeUnshiftWith:m,gap:p,shiftWithOffset:g,sizes:y},{log:T},{recalcInProgress:S}])=>{const k=sr(ye(h,tt(u),Zr(([,_,A,w],[{bottom:P,items:F,offsetBottom:M,totalCount:I},j])=>{const G=P+M;let B=0;return A===I&&_.length>0&&F.length>0&&(F[0].originalIndex===0&&_[0].originalIndex===0||(B=G-w,B!==0&&(B+=j))),[B,F,I,G]},[0,[],0,0]),Ye(([_])=>_!==0),tt(a,f,n,s,T,S),Ye(([,_,A,w,,,P])=>!P&&!w&&_!==0&&A===hu),_e(([[_],,,,,A])=>(A("Upward scrolling compensation",{amount:_},Yn.DEBUG),_))));function N(_){_>0?(Je(t,{behavior:"auto",top:-_}),Je(e,0)):(Je(e,0),Je(t,{behavior:"auto",top:-_}))}return Et(ye(k,tt(e,l)),([_,A,w])=>{w&&BM()?Je(e,A-_):N(-_)}),Et(ye(rn(Nn(l,!1),e,S),Ye(([_,A,w])=>!_&&!w&&A!==0),_e(([_,A])=>A),_a(1)),N),Be(ye(g,_e(_=>({top:-_}))),t),Et(ye(m,tt(y,p),_e(([_,{groupIndices:A,lastSize:w,sizeTree:P},F])=>{function M(I){return I*(w+F)}if(A.length===0)return M(_);{let I=0;const j=cu(P,0);let G=0,B=0;for(;G<_;){G++,I+=j;let Q=A.length===B+1?1/0:A[B+1]-A[B]-1;G+Q>_&&(I-=j,Q=_-G+1),G+=Q,I+=M(Q),B++}return I}})),_=>{Je(e,_),requestAnimationFrame(()=>{Je(t,{top:_}),requestAnimationFrame(()=>{Je(e,0),Je(S,!1)})})}),{deviation:e}},Bt(Ln,Au,cs,ra,vi,Rg)),zM=bt(([e,t,n,a,s,l,u,f,h,m,p])=>({...e,...t,...n,...a,...s,...l,...u,...f,...h,...m,...p}),Bt(Lg,IM,Si,zk,Mk,DM,AM,jg,Pk,vi,Bk)),Uk=bt(([{data:e,defaultItemSize:t,firstItemIndex:n,fixedItemSize:a,fixedGroupSize:s,gap:l,groupIndices:u,heightEstimates:f,itemSize:h,sizeRanges:m,sizes:p,statefulTotalCount:g,totalCount:y,trackItemSizes:T},{initialItemFinalLocationReached:S,initialTopMostItemIndex:k,scrolledToInitialItem:N},_,A,w,P,{scrollToIndex:F},M,{topItemCount:I},{groupCounts:j},G])=>{const{listState:B,minOverscanItemCount:Q,topItemsIndexes:V,rangeChanged:te,...ee}=P;return Be(te,G.scrollSeekRangeChanged),Be(ye(G.windowViewportRect,_e(U=>U.visibleHeight)),_.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:n,fixedItemHeight:a,fixedGroupHeight:s,gap:l,groupCounts:j,heightEstimates:f,initialItemFinalLocationReached:S,initialTopMostItemIndex:k,scrolledToInitialItem:N,sizeRanges:m,topItemCount:I,topItemsIndexes:V,totalCount:y,...w,groupIndices:u,itemSize:h,listState:B,minOverscanItemCount:Q,scrollToIndex:F,statefulTotalCount:g,trackItemSizes:T,rangeChanged:te,...ee,...G,..._,sizes:p,...A}},Bt(ra,_u,Ln,LM,OM,cs,Cu,PM,MM,Ik,zM));function HM(e,t){const n={},a={};let s=0;const l=e.length;for(;s<l;)a[e[s]]=1,s+=1;for(const u in t)Object.hasOwn(a,u)||(n[u]=t[u]);return n}const fd=typeof document<"u"?Re.useLayoutEffect:Re.useEffect;function Fk(e,t,n){const a=Object.keys(t.required||{}),s=Object.keys(t.optional||{}),l=Object.keys(t.methods||{}),u=Object.keys(t.events||{}),f=Re.createContext({});function h(N,_){N.propsReady&&Je(N.propsReady,!1);for(const A of a){const w=N[t.required[A]];Je(w,_[A])}for(const A of s)if(A in _){const w=N[t.optional[A]];Je(w,_[A])}N.propsReady&&Je(N.propsReady,!0)}function m(N){return l.reduce((_,A)=>(_[A]=w=>{const P=N[t.methods[A]];Je(P,w)},_),{})}function p(N){return u.reduce((_,A)=>(_[A]=nM(N[t.events[A]]),_),{})}const g=Re.forwardRef((N,_)=>{const{children:A,...w}=N,[P]=Re.useState(()=>vf(aM(e),I=>{h(I,w)})),[F]=Re.useState(A2(p,P));fd(()=>{for(const I of u)I in w&&Et(F[I],w[I]);return()=>{Object.values(F).map(Ag)}},[w,F,P]),fd(()=>{h(P,w)}),Re.useImperativeHandle(_,_2(m(P)));const M=n;return c.jsx(f.Provider,{value:P,children:n?c.jsx(M,{...HM([...a,...s,...u],w),children:A}):A})}),y=N=>{const _=Re.useContext(f);return Re.useCallback(A=>{Je(_[N],A)},[_,N])},T=N=>{const _=Re.useContext(f)[N],A=Re.useCallback(w=>Et(_,w),[_]);return Re.useSyncExternalStore(A,()=>Ft(_),()=>Ft(_))},S=N=>{const _=Re.useContext(f)[N],[A,w]=Re.useState(A2(Ft,_));return fd(()=>Et(_,P=>{P!==A&&w(_2(P))}),[_,A]),A},k=Re.version.startsWith("18")?T:S;return{Component:g,useEmitter:(N,_)=>{const A=Re.useContext(f)[N];fd(()=>Et(A,_),[_,A])},useEmitterValue:k,usePublisher:y}}const $k=Re.createContext(void 0),qk=Re.createContext(void 0),Vk=typeof document<"u"?Re.useLayoutEffect:Re.useEffect;function Tm(e){return"self"in e}function UM(e){return"body"in e}function Yk(e,t,n,a=Il,s,l){const u=Re.useRef(null),f=Re.useRef(null),h=Re.useRef(null),m=Re.useCallback(y=>{let T,S,k;const N=y.target;if(UM(N)||Tm(N)){const A=Tm(N)?N:N.defaultView;k=l?A.scrollX:A.scrollY,T=l?A.document.documentElement.scrollWidth:A.document.documentElement.scrollHeight,S=l?A.innerWidth:A.innerHeight}else k=l?N.scrollLeft:N.scrollTop,T=l?N.scrollWidth:N.scrollHeight,S=l?N.offsetWidth:N.offsetHeight;const _=()=>{e({scrollHeight:T,scrollTop:Math.max(k,0),viewportHeight:S})};y.suppressFlushSync?_():Kv.flushSync(_),f.current!==null&&(k===f.current||k<=0||k===T-S)&&(f.current=null,t(!0),h.current&&(clearTimeout(h.current),h.current=null))},[e,t,l]);Re.useEffect(()=>{const y=s||u.current;return a(s||u.current),m({suppressFlushSync:!0,target:y}),y.addEventListener("scroll",m,{passive:!0}),()=>{a(null),y.removeEventListener("scroll",m)}},[u,m,n,a,s]);function p(y){const T=u.current;if(!T||(l?"offsetWidth"in T&&T.offsetWidth===0:"offsetHeight"in T&&T.offsetHeight===0))return;const S=y.behavior==="smooth";let k,N,_;Tm(T)?(N=Math.max(pi(T.document.documentElement,l?"width":"height"),l?T.document.documentElement.scrollWidth:T.document.documentElement.scrollHeight),k=l?T.innerWidth:T.innerHeight,_=l?window.scrollX:window.scrollY):(N=T[l?"scrollWidth":"scrollHeight"],k=pi(T,l?"width":"height"),_=T[l?"scrollLeft":"scrollTop"]);const A=N-k;if(y.top=Math.ceil(Math.max(Math.min(A,y.top),0)),Lk(k,N)||y.top===_){e({scrollHeight:N,scrollTop:_,viewportHeight:k}),S&&t(!0);return}S?(f.current=y.top,h.current&&clearTimeout(h.current),h.current=setTimeout(()=>{h.current=null,f.current=null,t(!0)},1e3)):f.current=null,l&&(y={behavior:y.behavior,left:y.top}),T.scrollTo(y)}function g(y){l&&(y={behavior:y.behavior,left:y.top}),u.current.scrollBy(y)}return{scrollByCallback:g,scrollerRef:u,scrollToCallback:p}}const vm="-webkit-sticky",z2="sticky",Mg=Hk(()=>{if(typeof document>"u")return z2;const e=document.createElement("div");return e.style.position=vm,e.style.position===vm?vm:z2});function Bg(e){return e}const FM=bt(()=>{const e=ke(f=>`Item ${f}`),t=ke(f=>`Group ${f}`),n=ke({}),a=ke(Bg),s=ke("div"),l=ke(Il),u=(f,h=null)=>Nn(ye(n,_e(m=>m[f]),jt()),h);return{components:n,computeItemKey:a,EmptyPlaceholder:u("EmptyPlaceholder"),FooterComponent:u("Footer"),GroupComponent:u("Group","div"),groupContent:t,HeaderComponent:u("Header"),HeaderFooterTag:s,ItemComponent:u("Item","div"),itemContent:e,ListComponent:u("List","div"),ScrollerComponent:u("Scroller","div"),scrollerRef:l,ScrollSeekPlaceholder:u("ScrollSeekPlaceholder"),TopItemListComponent:u("TopItemList")}}),$M=bt(([e,t])=>({...e,...t}),Bt(Uk,FM)),qM=({height:e})=>c.jsx("div",{style:{height:e}}),VM={overflowAnchor:"none",position:Mg(),zIndex:1},Gk={overflowAnchor:"none"},YM={...Gk,display:"inline-block",height:"100%"},H2=Re.memo(function({showTopList:e=!1}){const t=Qe("listState"),n=Tr("sizeRanges"),a=Qe("useWindowScroll"),s=Qe("customScrollParent"),l=Tr("windowScrollContainerState"),u=Tr("scrollContainerState"),f=s||a?l:u,h=Qe("itemContent"),m=Qe("context"),p=Qe("groupContent"),g=Qe("trackItemSizes"),y=Qe("itemSize"),T=Qe("log"),S=Tr("gap"),k=Qe("horizontalDirection"),{callbackRef:N}=lM(n,y,g,e?Il:f,T,S,s,k,Qe("skipAnimationFrameInResizeObserver")),[_,A]=Re.useState(0);Pg("deviation",ee=>{_!==ee&&A(ee)});const w=Qe("EmptyPlaceholder"),P=Qe("ScrollSeekPlaceholder")||qM,F=Qe("ListComponent"),M=Qe("ItemComponent"),I=Qe("GroupComponent"),j=Qe("computeItemKey"),G=Qe("isSeeking"),B=Qe("groupIndices").length>0,Q=Qe("alignToBottom"),V=Qe("initialItemFinalLocationReached"),te=e?{}:{boxSizing:"border-box",...k?{display:"inline-block",height:"100%",marginLeft:_!==0?_:Q?"auto":0,paddingLeft:t.offsetTop,paddingRight:t.offsetBottom,whiteSpace:"nowrap"}:{marginTop:_!==0?_:Q?"auto":0,paddingBottom:t.offsetBottom,paddingTop:t.offsetTop},...V?{}:{visibility:"hidden"}};return!e&&t.totalCount===0&&w?c.jsx(w,{...kn(w,m)}):c.jsx(F,{...kn(F,m),"data-testid":e?"virtuoso-top-item-list":"virtuoso-item-list",ref:N,style:te,children:(e?t.topItems:t.items).map(ee=>{const U=ee.originalIndex,R=j(U+t.firstItemIndex,ee.data,m);return G?v.createElement(P,{...kn(P,m),height:ee.size,index:ee.index,key:R,type:ee.type||"item",...ee.type==="group"?{}:{groupIndex:ee.groupIndex}}):ee.type==="group"?v.createElement(I,{...kn(I,m),"data-index":U,"data-item-index":ee.index,"data-known-size":ee.size,key:R,style:VM},p(ee.index,m)):v.createElement(M,{...kn(M,m),...WM(M,ee.data),"data-index":U,"data-item-group-index":ee.groupIndex,"data-item-index":ee.index,"data-known-size":ee.size,key:R,style:k?YM:Gk},B?h(ee.index,ee.groupIndex,ee.data,m):h(ee.index,ee.data,m))})})}),GM={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},XM={outline:"none",overflowX:"auto",position:"relative"},kf=e=>({height:"100%",position:"absolute",top:0,width:"100%",...e?{display:"flex",flexDirection:"column"}:{}}),QM={position:Mg(),top:0,width:"100%",zIndex:1};function kn(e,t){if(typeof e!="string")return{context:t}}function WM(e,t){return{item:typeof e=="string"?void 0:t}}const KM=Re.memo(function(){const e=Qe("HeaderComponent"),t=Tr("headerHeight"),n=Qe("HeaderFooterTag"),a=us(Re.useMemo(()=>l=>{t(pi(l,"height"))},[t]),!0,Qe("skipAnimationFrameInResizeObserver")),s=Qe("context");return e?c.jsx(n,{ref:a,children:c.jsx(e,{...kn(e,s)})}):null}),ZM=Re.memo(function(){const e=Qe("FooterComponent"),t=Tr("footerHeight"),n=Qe("HeaderFooterTag"),a=us(Re.useMemo(()=>l=>{t(pi(l,"height"))},[t]),!0,Qe("skipAnimationFrameInResizeObserver")),s=Qe("context");return e?c.jsx(n,{ref:a,children:c.jsx(e,{...kn(e,s)})}):null});function Xk({useEmitter:e,useEmitterValue:t,usePublisher:n}){return Re.memo(function({children:a,style:s,context:l,...u}){const f=n("scrollContainerState"),h=t("ScrollerComponent"),m=n("smoothScrollTargetReached"),p=t("scrollerRef"),g=t("horizontalDirection")||!1,{scrollByCallback:y,scrollerRef:T,scrollToCallback:S}=Yk(f,m,h,p,void 0,g);return e("scrollTo",S),e("scrollBy",y),c.jsx(h,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:T,style:{...g?XM:GM,...s},tabIndex:0,...u,...kn(h,l),children:a})})}function Qk({useEmitter:e,useEmitterValue:t,usePublisher:n}){return Re.memo(function({children:a,style:s,context:l,...u}){const f=n("windowScrollContainerState"),h=t("ScrollerComponent"),m=n("smoothScrollTargetReached"),p=t("totalListHeight"),g=t("deviation"),y=t("customScrollParent"),T=Re.useRef(null),S=t("scrollerRef"),{scrollByCallback:k,scrollerRef:N,scrollToCallback:_}=Yk(f,m,h,S,y);return Vk(()=>{var A;return N.current=y||((A=T.current)==null?void 0:A.ownerDocument.defaultView),()=>{N.current=null}},[N,y]),e("windowScrollTo",_),e("scrollBy",k),c.jsx(h,{ref:T,"data-virtuoso-scroller":!0,style:{position:"relative",...s,...p!==0?{height:p+g}:{}},...u,...kn(h,l),children:a})})}const JM=({children:e})=>{const t=Re.useContext($k),n=Tr("viewportHeight"),a=Tr("fixedItemHeight"),s=Qe("alignToBottom"),l=Qe("horizontalDirection"),u=Re.useMemo(()=>Ek(n,h=>pi(h,l?"width":"height")),[n,l]),f=us(u,!0,Qe("skipAnimationFrameInResizeObserver"));return Re.useEffect(()=>{t&&(n(t.viewportHeight),a(t.itemHeight))},[t,n,a]),c.jsx("div",{"data-viewport-type":"element",ref:f,style:kf(s),children:e})},e8=({children:e})=>{const t=Re.useContext($k),n=Tr("windowViewportRect"),a=Tr("fixedItemHeight"),s=Qe("customScrollParent"),l=vk(n,s,Qe("skipAnimationFrameInResizeObserver")),u=Qe("alignToBottom");return Re.useEffect(()=>{t&&(a(t.itemHeight),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,n,a]),c.jsx("div",{"data-viewport-type":"window",ref:l,style:kf(u),children:e})},t8=({children:e})=>{const t=Qe("TopItemListComponent")||"div",n=Qe("headerHeight"),a={...QM,marginTop:`${n}px`},s=Qe("context");return c.jsx(t,{style:a,...kn(t,s),children:e})},n8=Re.memo(function(e){const t=Qe("useWindowScroll"),n=Qe("topItemsIndexes").length>0,a=Qe("customScrollParent"),s=Qe("context");return c.jsxs(a||t?i8:a8,{...e,context:s,children:[n&&c.jsx(t8,{children:c.jsx(H2,{showTopList:!0})}),c.jsxs(a||t?e8:JM,{children:[c.jsx(KM,{}),c.jsx(H2,{}),c.jsx(ZM,{})]})]})}),{Component:r8,useEmitter:Pg,useEmitterValue:Qe,usePublisher:Tr}=Fk($M,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",scrollIntoViewOnChange:"scrollIntoViewOnChange",itemContent:"itemContent",groupContent:"groupContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",groupCounts:"groupCounts",topItemCount:"topItemCount",firstItemIndex:"firstItemIndex",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",heightEstimates:"heightEstimates",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"HeaderFooterTag",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",horizontalDirection:"horizontalDirection",skipAnimationFrameInResizeObserver:"skipAnimationFrameInResizeObserver"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",autoscrollToBottom:"autoscrollToBottom",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},n8),a8=Xk({useEmitter:Pg,useEmitterValue:Qe,usePublisher:Tr}),i8=Qk({useEmitter:Pg,useEmitterValue:Qe,usePublisher:Tr}),qd=r8,s8=bt(()=>{const e=ke(m=>c.jsxs("td",{children:["Item $",m]})),t=ke(null),n=ke(m=>c.jsxs("td",{colSpan:1e3,children:["Group ",m]})),a=ke(null),s=ke(null),l=ke({}),u=ke(Bg),f=ke(Il),h=(m,p=null)=>Nn(ye(l,_e(g=>g[m]),jt()),p);return{components:l,computeItemKey:u,context:t,EmptyPlaceholder:h("EmptyPlaceholder"),FillerRow:h("FillerRow"),fixedFooterContent:s,fixedHeaderContent:a,itemContent:e,groupContent:n,ScrollerComponent:h("Scroller","div"),scrollerRef:f,ScrollSeekPlaceholder:h("ScrollSeekPlaceholder"),TableBodyComponent:h("TableBody","tbody"),TableComponent:h("Table","table"),TableFooterComponent:h("TableFoot","tfoot"),TableHeadComponent:h("TableHead","thead"),TableRowComponent:h("TableRow","tr"),GroupComponent:h("Group","tr")}});Bt(Uk,s8);Mg();const U2={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},l8={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:F2,floor:Vd,max:Xo,min:Sm,round:$2}=Math;function q2(e,t,n){return Array.from({length:t-e+1}).map((a,s)=>({data:n===null?null:n[s+e],index:s+e}))}function o8(e){return{...l8,items:e}}function hd(e,t){return e&&e.width===t.width&&e.height===t.height}function u8(e,t){return e&&e.column===t.column&&e.row===t.row}const c8=bt(([{increaseViewportBy:e,listBoundary:t,overscan:n,visibleRange:a},{footerHeight:s,headerHeight:l,scrollBy:u,scrollContainerState:f,scrollTo:h,scrollTop:m,smoothScrollTargetReached:p,viewportHeight:g},y,T,{didMount:S,propsReady:k},{customScrollParent:N,useWindowScroll:_,windowScrollContainerState:A,windowScrollTo:w,windowViewportRect:P},F])=>{const M=ke(0),I=ke(0),j=ke(U2),G=ke({height:0,width:0}),B=ke({height:0,width:0}),Q=ct(),V=ct(),te=ke(0),ee=ke(null),U=ke({column:0,row:0}),R=ct(),q=ct(),W=ke(!1),he=ke(0),O=ke(!0),H=ke(!1),Z=ke(!1);Et(ye(S,tt(he),Ye(([ue,xe])=>!!xe)),()=>{Je(O,!1)}),Et(ye(rn(S,O,B,G,he,H),Ye(([ue,xe,Ae,Le,,Fe])=>ue&&!xe&&Ae.height!==0&&Le.height!==0&&!Fe)),([,,,,ue])=>{Je(H,!0),Ig(1,()=>{Je(Q,ue)}),Lr(ye(m),()=>{Je(t,[0,0]),Je(O,!0)})}),Be(ye(q,Ye(ue=>ue!=null&&ue.scrollTop>0),Xr(0)),I),Et(ye(S,tt(q),Ye(([,ue])=>ue!=null)),([,ue])=>{ue&&(Je(G,ue.viewport),Je(B,ue.item),Je(U,ue.gap),ue.scrollTop>0&&(Je(W,!0),Lr(ye(m,as(1)),xe=>{Je(W,!1)}),Je(h,{top:ue.scrollTop})))}),Be(ye(G,_e(({height:ue})=>ue)),g),Be(ye(rn(Ve(G,hd),Ve(B,hd),Ve(U,(ue,xe)=>ue&&ue.column===xe.column&&ue.row===xe.row),Ve(m)),_e(([ue,xe,Ae,Le])=>({gap:Ae,item:xe,scrollTop:Le,viewport:ue}))),R),Be(ye(rn(Ve(M),a,Ve(U,u8),Ve(B,hd),Ve(G,hd),Ve(ee),Ve(I),Ve(W),Ve(O),Ve(he)),Ye(([,,,,,,,ue])=>!ue),_e(([ue,[xe,Ae],Le,Fe,$e,pe,Ee,,we,qe])=>{const{column:dt,row:an}=Le,{height:Pt,width:sa}=Fe,{width:ps}=$e;if(Ee===0&&(ue===0||ps===0))return U2;if(sa===0){const vn=Dg(qe,ue),Cr=vn+Math.max(Ee-1,0);return o8(q2(vn,Cr,pe))}const Ia=Wk(ps,sa,dt);let qt,Nr;we?xe===0&&Ae===0&&Ee>0?(qt=0,Nr=Ee-1):(qt=Ia*Vd((xe+an)/(Pt+an)),Nr=Ia*F2((Ae+an)/(Pt+an))-1,Nr=Sm(ue-1,Xo(Nr,Ia-1)),qt=Sm(Nr,Xo(0,qt))):(qt=0,Nr=-1);const ce=q2(qt,Nr,pe),{bottom:Ce,top:He}=V2($e,Le,Fe,ce),et=F2(ue/Ia),mt=et*Pt+(et-1)*an-Ce;return{bottom:Ce,itemHeight:Pt,items:ce,itemWidth:sa,offsetBottom:mt,offsetTop:He,top:He}})),j),Be(ye(ee,Ye(ue=>ue!==null),_e(ue=>ue.length)),M),Be(ye(rn(G,B,j,U),Ye(([ue,xe,{items:Ae}])=>Ae.length>0&&xe.height!==0&&ue.height!==0),_e(([ue,xe,{items:Ae},Le])=>{const{bottom:Fe,top:$e}=V2(ue,Le,xe,Ae);return[$e,Fe]}),jt(du)),t);const L=ke(!1);Be(ye(m,tt(L),_e(([ue,xe])=>xe||ue!==0)),L);const fe=sr(ye(rn(j,M),Ye(([{items:ue}])=>ue.length>0),tt(L),Ye(([[ue,xe],Ae])=>{const Le=ue.items[ue.items.length-1].index===xe-1;return(Ae||ue.bottom>0&&ue.itemHeight>0&&ue.offsetBottom===0&&ue.items.length===xe)&&Le}),_e(([[,ue]])=>ue-1),jt())),Ne=sr(ye(Ve(j),Ye(({items:ue})=>ue.length>0&&ue[0].index===0),Xr(0),jt())),ve=sr(ye(Ve(j),tt(W),Ye(([{items:ue},xe])=>ue.length>0&&!xe),_e(([{items:ue}])=>({endIndex:ue[ue.length-1].index,startIndex:ue[0].index})),jt(Ak),_a(0)));Be(ve,T.scrollSeekRangeChanged),Be(ye(Q,tt(G,B,M,U),_e(([ue,xe,Ae,Le,Fe])=>{const $e=Dk(ue),{align:pe,behavior:Ee,offset:we}=$e;let qe=$e.index;qe==="LAST"&&(qe=Le-1),qe=Xo(0,qe,Sm(Le-1,qe));let dt=Ep(xe,Fe,Ae,qe);return pe==="end"?dt=$2(dt-xe.height+Ae.height):pe==="center"&&(dt=$2(dt-xe.height/2+Ae.height/2)),we&&(dt+=we),{behavior:Ee,top:dt}})),h);const ge=Nn(ye(j,_e(ue=>ue.offsetBottom+ue.bottom)),0);return Be(ye(P,_e(ue=>({height:ue.visibleHeight,width:ue.visibleWidth}))),G),{customScrollParent:N,data:ee,deviation:te,footerHeight:s,gap:U,headerHeight:l,increaseViewportBy:e,initialItemCount:I,itemDimensions:B,overscan:n,restoreStateFrom:q,scrollBy:u,scrollContainerState:f,scrollHeight:V,scrollTo:h,scrollToIndex:Q,scrollTop:m,smoothScrollTargetReached:p,totalCount:M,useWindowScroll:_,viewportDimensions:G,windowScrollContainerState:A,windowScrollTo:w,windowViewportRect:P,...T,gridState:j,horizontalDirection:Z,initialTopMostItemIndex:he,totalListHeight:ge,...y,endReached:fe,propsReady:k,rangeChanged:ve,startReached:Ne,stateChanged:R,stateRestoreInProgress:W,...F}},Bt(Lg,Ln,Au,zk,Si,jg,vi));function Wk(e,t,n){return Xo(1,Vd((e+n)/(Vd(t)+n)))}function V2(e,t,n,a){const{height:s}=n;if(s===void 0||a.length===0)return{bottom:0,top:0};const l=Ep(e,t,n,a[0].index);return{bottom:Ep(e,t,n,a[a.length-1].index)+s,top:l}}function Ep(e,t,n,a){const s=Wk(e.width,n.width,t.column),l=Vd(a/s),u=l*n.height+Xo(0,l-1)*t.row;return u>0?u+t.row:u}const d8=bt(()=>{const e=ke(g=>`Item ${g}`),t=ke({}),n=ke(null),a=ke("virtuoso-grid-item"),s=ke("virtuoso-grid-list"),l=ke(Bg),u=ke("div"),f=ke(Il),h=(g,y=null)=>Nn(ye(t,_e(T=>T[g]),jt()),y),m=ke(!1),p=ke(!1);return Be(Ve(p),m),{components:t,computeItemKey:l,context:n,FooterComponent:h("Footer"),HeaderComponent:h("Header"),headerFooterTag:u,itemClassName:a,ItemComponent:h("Item","div"),itemContent:e,listClassName:s,ListComponent:h("List","div"),readyStateChanged:m,reportReadyState:p,ScrollerComponent:h("Scroller","div"),scrollerRef:f,ScrollSeekPlaceholder:h("ScrollSeekPlaceholder","div")}}),f8=bt(([e,t])=>({...e,...t}),Bt(c8,d8)),h8=Re.memo(function(){const e=Ut("gridState"),t=Ut("listClassName"),n=Ut("itemClassName"),a=Ut("itemContent"),s=Ut("computeItemKey"),l=Ut("isSeeking"),u=vr("scrollHeight"),f=Ut("ItemComponent"),h=Ut("ListComponent"),m=Ut("ScrollSeekPlaceholder"),p=Ut("context"),g=vr("itemDimensions"),y=vr("gap"),T=Ut("log"),S=Ut("stateRestoreInProgress"),k=vr("reportReadyState"),N=us(Re.useMemo(()=>_=>{const A=_.parentElement.parentElement.scrollHeight;u(A);const w=_.firstChild;if(w){const{height:P,width:F}=w.getBoundingClientRect();g({height:P,width:F})}y({column:Y2("column-gap",getComputedStyle(_).columnGap,T),row:Y2("row-gap",getComputedStyle(_).rowGap,T)})},[u,g,y,T]),!0,!1);return Vk(()=>{e.itemHeight>0&&e.itemWidth>0&&k(!0)},[e]),S?null:c.jsx(h,{className:t,ref:N,...kn(h,p),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(_=>{const A=s(_.index,_.data,p);return l?c.jsx(m,{...kn(m,p),height:e.itemHeight,index:_.index,width:e.itemWidth},A):v.createElement(f,{...kn(f,p),className:n,"data-index":_.index,key:A},a(_.index,_.data,p))})})}),m8=Re.memo(function(){const e=Ut("HeaderComponent"),t=vr("headerHeight"),n=Ut("headerFooterTag"),a=us(Re.useMemo(()=>l=>{t(pi(l,"height"))},[t]),!0,!1),s=Ut("context");return e?c.jsx(n,{ref:a,children:c.jsx(e,{...kn(e,s)})}):null}),p8=Re.memo(function(){const e=Ut("FooterComponent"),t=vr("footerHeight"),n=Ut("headerFooterTag"),a=us(Re.useMemo(()=>l=>{t(pi(l,"height"))},[t]),!0,!1),s=Ut("context");return e?c.jsx(n,{ref:a,children:c.jsx(e,{...kn(e,s)})}):null}),g8=({children:e})=>{const t=Re.useContext(qk),n=vr("itemDimensions"),a=vr("viewportDimensions"),s=us(Re.useMemo(()=>l=>{a(l.getBoundingClientRect())},[a]),!0,!1);return Re.useEffect(()=>{t&&(a({height:t.viewportHeight,width:t.viewportWidth}),n({height:t.itemHeight,width:t.itemWidth}))},[t,a,n]),c.jsx("div",{ref:s,style:kf(!1),children:e})},x8=({children:e})=>{const t=Re.useContext(qk),n=vr("windowViewportRect"),a=vr("itemDimensions"),s=Ut("customScrollParent"),l=vk(n,s,!1);return Re.useEffect(()=>{t&&(a({height:t.itemHeight,width:t.itemWidth}),n({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,n,a]),c.jsx("div",{ref:l,style:kf(!1),children:e})},b8=Re.memo(function({...e}){const t=Ut("useWindowScroll"),n=Ut("customScrollParent"),a=n||t?E8:y8,s=n||t?x8:g8,l=Ut("context");return c.jsx(a,{...e,...kn(a,l),children:c.jsxs(s,{children:[c.jsx(m8,{}),c.jsx(h8,{}),c.jsx(p8,{})]})})}),{useEmitter:Kk,useEmitterValue:Ut,usePublisher:vr}=Fk(f8,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},b8),y8=Xk({useEmitter:Kk,useEmitterValue:Ut,usePublisher:vr}),E8=Qk({useEmitter:Kk,useEmitterValue:Ut,usePublisher:vr});function Y2(e,t,n){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&n(`${e} was not resolved to pixel value correctly`,t,Yn.WARN),t==="normal"?0:parseInt(t??"0",10)}function T8(e){const t=new Map,n=[],a=new Map,s=()=>n.length>0?n[n.length-1]:void 0;for(const l of e)if(l.type==="ToolCall"){const u=l.payload.id,h=l.payload.function?.name;u&&(n.push({id:u,name:h??""}),a.set(u,h??"")),t.set(l.index,{nestLevel:0,linkedToolCallId:u,linkedToolName:h})}else if(l.type==="ToolCallPart"){const u=s();t.set(l.index,{nestLevel:u?1:0,linkedToolCallId:u?.id,linkedToolName:u?.name})}else if(l.type==="ToolResult"){const u=l.payload.tool_call_id,f=u?a.get(u):void 0;if(u){const h=n.findIndex(m=>m.id===u);h!==-1&&n.splice(h,1)}t.set(l.index,{nestLevel:0,linkedToolCallId:u,linkedToolName:f})}else t.set(l.index,{nestLevel:0});return t}function v8({sessionId:e,refreshKey:t=0,onNavigateToContext:n,scrollToToolCallId:a,onScrollTargetConsumed:s,agentScope:l}){const[u,f]=v.useState([]),[h,m]=v.useState(!0),[p,g]=v.useState(null),[y,T]=v.useState(new Set),[S,k]=v.useState(new Set),[N,_]=v.useState(""),[A,w]=v.useState(!1),[P,F]=v.useState(!1),[M,I]=v.useState(null),[j,G]=v.useState([0,0]),[B,Q]=v.useState("events"),[V,te]=v.useState(!1),[ee,U]=v.useState(!1),R=v.useRef(null);v.useEffect(()=>{m(!0),g(null),t===0&&(k(new Set),_(""),w(!1)),(l?zv(e,l,t>0):Zp(e,t>0)).then(Ee=>f(Ee.events)).catch(Ee=>g(Ee.message)).finally(()=>m(!1))},[e,t,l]);const q=v.useMemo(()=>{const pe=new Set;for(const Ee of u)pe.add(Ee.type);return Array.from(pe).sort()},[u]),W=v.useMemo(()=>T8(u),[u]),he=v.useMemo(()=>{const pe=new Set;if(!N)return pe;const Ee=N.toLowerCase();for(const we of u)(JSON.stringify(we.payload).toLowerCase().includes(Ee)||we.type.toLowerCase().includes(Ee))&&pe.add(we.index);return pe},[u,N]),O=v.useMemo(()=>u.filter(Tl).map(pe=>pe.index),[u]),H=v.useMemo(()=>Gj(u),[u]),Z=v.useMemo(()=>{const pe=new Map;for(const Ee of u)pe.set(Ee.index,Ee);return pe},[u]),L=v.useMemo(()=>{let pe=u;return y.size>0&&(pe=pe.filter(Ee=>y.has(Ee.type))),A&&(pe=pe.filter(Tl)),N&&(pe=pe.filter(Ee=>he.has(Ee.index))),pe},[u,y,A,N,he]);v.useEffect(()=>{if(!a||u.length===0)return;const pe=u.find(Ee=>Ee.type==="ToolCall"&&Ee.payload.id===a||Ee.type==="ToolResult"&&Ee.payload.tool_call_id===a);if(pe){const Ee=L.findIndex(we=>we.index===pe.index);Ee>=0&&R.current&&(setTimeout(()=>{R.current?.scrollToIndex({index:Ee,align:"center",behavior:"smooth"})},100),k(we=>{const qe=new Set(we);return qe.add(pe.index),qe}),I(pe))}s?.()},[a,u,L,s]);const fe=v.useCallback(pe=>{k(Ee=>{const we=new Set(Ee);return we.has(pe)?we.delete(pe):we.add(pe),we})},[]),Ne=L.length>0&&L.every(pe=>S.has(pe.index)),ve=v.useCallback(()=>{k(pe=>{const Ee=new Set(pe);for(const we of L)Ee.add(we.index);return Ee})},[L]),ge=v.useCallback(()=>{k(pe=>{const Ee=new Set(pe);for(const we of L)Ee.delete(we.index);return Ee})},[L]),ue=v.useCallback((pe,Ee)=>{T(pe),w(Ee)},[]),xe=v.useCallback(pe=>{const Ee=L.findIndex(we=>we.index===pe);Ee>=0&&R.current&&R.current.scrollToIndex({index:Ee,align:"center",behavior:"smooth"})},[L]),Ae=v.useCallback(pe=>{(pe.type==="ToolCall"||pe.type==="ToolResult")&&I(Ee=>Ee?.index===pe.index?null:pe)},[]),Le=v.useRef(0),Fe=v.useCallback(pe=>{if(O.length===0)return;pe==="next"?Le.current=(Le.current+1)%O.length:Le.current=(Le.current-1+O.length)%O.length;const Ee=O[Le.current],we=L.findIndex(qe=>qe.index===Ee);we>=0&&R.current&&(R.current.scrollToIndex({index:we,align:"center",behavior:"smooth"}),k(qe=>{const dt=new Set(qe);return dt.add(Ee),dt}))},[O,L]),$e=v.useRef(0);return v.useEffect(()=>{const pe=Ee=>{const we=Ee.target?.tagName;if(!(we==="INPUT"||we==="TEXTAREA"||we==="SELECT")&&B==="events")if(Ee.key==="j")Ee.preventDefault(),$e.current=Math.min($e.current+1,L.length-1),R.current?.scrollToIndex({index:$e.current,align:"center",behavior:"smooth"});else if(Ee.key==="k")Ee.preventDefault(),$e.current=Math.max($e.current-1,0),R.current?.scrollToIndex({index:$e.current,align:"center",behavior:"smooth"});else if(Ee.key==="Enter"){Ee.preventDefault();const qe=L[$e.current];qe&&fe(qe.index)}else Ee.key==="e"?(Ee.preventDefault(),Fe("next")):Ee.key==="/"?(Ee.preventDefault(),document.querySelector("[data-wire-search]")?.focus()):Ee.key==="Escape"&&I(null)};return window.addEventListener("keydown",pe),()=>window.removeEventListener("keydown",pe)},[L,B,fe,Fe]),h?c.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"Loading wire events..."}):p?c.jsxs("div",{className:"flex h-full items-center justify-center text-destructive",children:["Error: ",p]}):u.length===0?c.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"No wire events found"}):c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsx(Ej,{allTypes:q,selectedTypes:y,onToggle:pe=>{T(Ee=>{const we=new Set(Ee);return we.has(pe)?we.delete(pe):we.add(pe),we})},total:u.length,filteredCount:L.length,allExpanded:Ne,onExpandAll:ve,onCollapseAll:ge,searchQuery:N,onSearchChange:_,searchMatchCount:he.size,errorCount:O.length,errorsOnly:A,onToggleErrorsOnly:()=>w(pe=>!pe),onNextError:()=>Fe("next"),onPrevError:()=>Fe("prev"),viewMode:B,onViewModeChange:Q,showUsageChart:V,onToggleUsageChart:()=>te(pe=>!pe),onApplyPreset:ue,integrityScore:H.score,onToggleIntegrity:()=>U(pe=>!pe)}),ee&&B==="events"&&H.orphans.length>0&&c.jsx(Wj,{result:H,onScrollToIndex:xe}),V&&B==="events"&&c.jsxs(c.Fragment,{children:[c.jsx(Ij,{events:u,onScrollToIndex:xe}),c.jsx(Oj,{events:u}),c.jsx(Lj,{events:u,onScrollToIndex:xe}),c.jsx(Bj,{events:u,onScrollToIndex:xe})]}),B==="timeline"?c.jsx(Fj,{events:u,onScrollToIndex:pe=>{Q("events"),setTimeout(()=>xe(pe),100)}}):B==="decisions"?c.jsx(qj,{events:u,onScrollToIndex:pe=>{Q("events"),setTimeout(()=>xe(pe),100)}}):c.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[c.jsx(vj,{events:u,collapsed:P,onToggleCollapse:()=>F(pe=>!pe),onScrollToIndex:xe,visibleRange:j}),c.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[c.jsx("div",{className:"flex-1 overflow-hidden",children:c.jsx(qd,{ref:R,data:L,rangeChanged:pe=>{if(L.length>0){const Ee=L[pe.startIndex]?.index??0,we=L[pe.endIndex]?.index??0;G([Ee,we])}},itemContent:(pe,Ee)=>{const we=W.get(Ee.index);return c.jsx(oj,{event:Ee,expanded:S.has(Ee.index),onToggle:()=>fe(Ee.index),onSelect:()=>Ae(Ee),selected:M?.index===Ee.index,prevEvent:Ee.index>0?Z.get(Ee.index-1):void 0,nestLevel:we?.nestLevel,linkedToolName:we?.linkedToolName,linkedToolCallId:we?.linkedToolCallId,searchMatch:N?he.has(Ee.index):void 0})}})}),M&&c.jsx(Aj,{selectedEvent:M,allEvents:u,onClose:()=>I(null),onNavigateToContext:n})]})]}),c.jsx(S8,{})]})}function S8(){const[e,t]=v.useState(!1);return c.jsxs("div",{className:"fixed bottom-4 right-4 z-50",children:[e&&c.jsxs("div",{className:"mb-2 rounded-lg border bg-popover p-3 shadow-lg text-xs space-y-1 w-52",children:[c.jsx("div",{className:"font-medium text-foreground mb-2",children:"Keyboard Shortcuts"}),c.jsx(il,{keys:"j / k",desc:"Navigate events"}),c.jsx(il,{keys:"Enter",desc:"Expand / collapse"}),c.jsx(il,{keys:"e",desc:"Next error"}),c.jsx(il,{keys:"/",desc:"Focus search"}),c.jsx(il,{keys:"Esc",desc:"Close panel"}),c.jsx(il,{keys:"1 / 2 / 3",desc:"Switch tab"})]}),c.jsx("button",{onClick:()=>t(n=>!n),className:"rounded-full border bg-popover shadow-md w-7 h-7 flex items-center justify-center text-sm text-muted-foreground hover:text-foreground transition-colors",title:"Keyboard shortcuts",children:"?"})]})}function il({keys:e,desc:t}){return c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:t}),c.jsx("kbd",{className:"font-mono text-[10px] bg-muted px-1.5 py-0.5 rounded border",children:e})]})}const k8="modulepreload",N8=function(e,t){return new URL(e,t).href},G2={},Zk=function(t,n,a){let s=Promise.resolve();if(n&&n.length>0){let m=function(p){return Promise.all(p.map(g=>Promise.resolve(g).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};const u=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=f?.nonce||f?.getAttribute("nonce");s=m(n.map(p=>{if(p=N8(p,a),p in G2)return;G2[p]=!0;const g=p.endsWith(".css"),y=g?'[rel="stylesheet"]':"";if(a)for(let S=u.length-1;S>=0;S--){const k=u[S];if(k.href===p&&(!g||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${y}`))return;const T=document.createElement("link");if(T.rel=g?"stylesheet":k8,g||(T.as="script"),T.crossOrigin="",T.href=p,h&&T.setAttribute("nonce",h),document.head.appendChild(T),g)return new Promise((S,k)=>{T.addEventListener("load",S),T.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return s.then(u=>{for(const f of u||[])f.status==="rejected"&&l(f.reason);return t().catch(l)})},Nf=(function(e){if(e==null)return w8;if(typeof e=="function")return Cf(e);if(typeof e=="object")return Array.isArray(e)?C8(e):_8(e);if(typeof e=="string")return A8(e);throw new Error("Expected function, string, or object as test")});function C8(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Nf(e[n]);return Cf(a);function a(...s){let l=-1;for(;++l<t.length;)if(t[l].apply(this,s))return!0;return!1}}function _8(e){const t=e;return Cf(n);function n(a){const s=a;let l;for(l in e)if(s[l]!==t[l])return!1;return!0}}function A8(e){return Cf(t);function t(n){return n&&n.type===e}}function Cf(e){return t;function t(n,a,s){return!!(R8(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function w8(){return!0}function R8(e){return e!==null&&typeof e=="object"&&"type"in e}const Jk=[],qo=!0,Tp=!1,cl="skip";function zg(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const l=Nf(s),u=a?-1:1;f(e,void 0,[])();function f(h,m,p){const g=h&&typeof h=="object"?h:{};if(typeof g.type=="string"){const T=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(h.type+(T?"<"+T+">":""))+")"})}return y;function y(){let T=Jk,S,k,N;if((!t||l(h,m,p[p.length-1]||void 0))&&(T=O8(n(h,p)),T[0]===Tp))return T;if("children"in h&&h.children){const _=h;if(_.children&&T[0]!==cl)for(k=(a?_.children.length:-1)+u,N=p.concat(_);k>-1&&k<_.children.length;){const A=_.children[k];if(S=f(A,k,N)(),S[0]===Tp)return S;k=typeof S[1]=="number"?S[1]:k+u}}return T}}}function O8(e){return Array.isArray(e)?e:typeof e=="number"?[qo,e]:e==null?Jk:[e]}function gi(e,t,n,a){let s,l,u;typeof t=="function"&&typeof n!="function"?(l=void 0,u=t,s=n):(l=t,u=n,s=a),zg(e,l,f,s);function f(h,m){const p=m[m.length-1],g=p?p.children.indexOf(h):void 0;return u(h,g,p)}}const vl={indicator:"indicator",textOnly:"text-only",remove:"remove"};function I8({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:a=!1,allowedProtocols:s=[],blockedImageClass:l="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:u="text-gray-500",linkBlockPolicy:f=vl.indicator,imageBlockPolicy:h=vl.indicator}){const m=t.length&&!t.every(g=>g==="*"),p=n.length&&!n.every(g=>g==="*");if(!e&&(m||p))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return g=>{const y=P8(e,t,n,a,s,l,u,f,h);eN(g),gi(g,y)}}function X2(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function D8(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const L8=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),j8=new Set(["javascript:","data:","file:","vbscript:"]);function Q2(e,t,n,a=!1,s=!1,l=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!s)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return s&&a&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const p=e.substring(5);if(p&&p.length>0&&p!=="invalid")return e}}catch{return null}return null}const u=X2(e,n);if(!u||j8.has(u.protocol)||!(L8.has(u.protocol)||l.includes(u.protocol)||l.includes("*")))return null;if(u.protocol==="mailto:"||!u.protocol.match(/^https?:$/))return u.href;const h=D8(e);return u&&t.some(m=>{const p=X2(m,n);return!p||p.origin!==u.origin?!1:u.href.startsWith(p.href)})?h?u.pathname+u.search+u.hash:u.href:t.includes("*")?u.protocol!=="https:"&&u.protocol!=="http:"?null:h?u.pathname+u.search+u.hash:u.href:null}function eN(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)eN(t)}}const km=Symbol("node-seen");function M8(e,t,n){return t===vl.remove?{type:"remove"}:t===vl.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function B8(e,t,n){if(t===vl.remove)return{type:"remove"};if(t===vl.textOnly){const a=String(e.properties.alt||"");return a?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:a}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const P8=(e,t,n,a,s,l,u,f,h)=>{const m=(p,g,y)=>{if(p.type!=="element"||p[km])return qo;if(p.tagName==="a"){const T=Q2(p.properties.href,t,e,!1,!1,s);if(T===null){if(p[km]=!0,gi(p,m),y&&typeof g=="number"){const S=M8(p,f,u);if(S.type==="remove")return y.children.splice(g,1),[cl,g];y.children[g]=S.element}return cl}else return p.properties.href=T,p.properties.target="_blank",p.properties.rel="noopener noreferrer",qo}if(p.tagName==="img"){const T=Q2(p.properties.src,n,e,a,!0,s);if(T===null){if(p[km]=!0,gi(p,m),y&&typeof g=="number"){const S=B8(p,h,l);if(S.type==="remove")return y.children.splice(g,1),[cl,g];y.children[g]=S.element}return cl}else return p.properties.src=T,qo}return qo};return m},tN=-1,_f=0,Qo=1,Yd=2,Hg=3,Ug=4,Fg=5,$g=6,nN=7,rN=8,W2=typeof self=="object"?self:globalThis,z8=(e,t)=>{const n=(s,l)=>(e.set(l,s),s),a=s=>{if(e.has(s))return e.get(s);const[l,u]=t[s];switch(l){case _f:case tN:return n(u,s);case Qo:{const f=n([],s);for(const h of u)f.push(a(h));return f}case Yd:{const f=n({},s);for(const[h,m]of u)f[a(h)]=a(m);return f}case Hg:return n(new Date(u),s);case Ug:{const{source:f,flags:h}=u;return n(new RegExp(f,h),s)}case Fg:{const f=n(new Map,s);for(const[h,m]of u)f.set(a(h),a(m));return f}case $g:{const f=n(new Set,s);for(const h of u)f.add(a(h));return f}case nN:{const{name:f,message:h}=u;return n(new W2[f](h),s)}case rN:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:f}=new Uint8Array(u);return n(new DataView(f),u)}}return n(new W2[l](u),s)};return a},K2=e=>z8(new Map,e)(0),sl="",{toString:H8}={},{keys:U8}=Object,Lo=e=>{const t=typeof e;if(t!=="object"||!e)return[_f,t];const n=H8.call(e).slice(8,-1);switch(n){case"Array":return[Qo,sl];case"Object":return[Yd,sl];case"Date":return[Hg,sl];case"RegExp":return[Ug,sl];case"Map":return[Fg,sl];case"Set":return[$g,sl];case"DataView":return[Qo,n]}return n.includes("Array")?[Qo,n]:n.includes("Error")?[nN,n]:[Yd,n]},md=([e,t])=>e===_f&&(t==="function"||t==="symbol"),F8=(e,t,n,a)=>{const s=(u,f)=>{const h=a.push(u)-1;return n.set(f,h),h},l=u=>{if(n.has(u))return n.get(u);let[f,h]=Lo(u);switch(f){case _f:{let p=u;switch(h){case"bigint":f=rN,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);p=null;break;case"undefined":return s([tN],u)}return s([f,p],u)}case Qo:{if(h){let y=u;return h==="DataView"?y=new Uint8Array(u.buffer):h==="ArrayBuffer"&&(y=new Uint8Array(u)),s([h,[...y]],u)}const p=[],g=s([f,p],u);for(const y of u)p.push(l(y));return g}case Yd:{if(h)switch(h){case"BigInt":return s([h,u.toString()],u);case"Boolean":case"Number":case"String":return s([h,u.valueOf()],u)}if(t&&"toJSON"in u)return l(u.toJSON());const p=[],g=s([f,p],u);for(const y of U8(u))(e||!md(Lo(u[y])))&&p.push([l(y),l(u[y])]);return g}case Hg:return s([f,u.toISOString()],u);case Ug:{const{source:p,flags:g}=u;return s([f,{source:p,flags:g}],u)}case Fg:{const p=[],g=s([f,p],u);for(const[y,T]of u)(e||!(md(Lo(y))||md(Lo(T))))&&p.push([l(y),l(T)]);return g}case $g:{const p=[],g=s([f,p],u);for(const y of u)(e||!md(Lo(y)))&&p.push(l(y));return g}}const{message:m}=u;return s([f,{name:h,message:m}],u)};return l},Z2=(e,{json:t,lossy:n}={})=>{const a=[];return F8(!(t||n),!!t,new Map,a)(e),a},is=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?K2(Z2(e,t)):structuredClone(e):(e,t)=>K2(Z2(e,t));class wu{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}wu.prototype.normal={};wu.prototype.property={};wu.prototype.space=void 0;function aN(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new wu(n,a,t)}function gu(e){return e.toLowerCase()}class Gn{constructor(t,n){this.attribute=n,this.property=t}}Gn.prototype.attribute="";Gn.prototype.booleanish=!1;Gn.prototype.boolean=!1;Gn.prototype.commaOrSpaceSeparated=!1;Gn.prototype.commaSeparated=!1;Gn.prototype.defined=!1;Gn.prototype.mustUseProperty=!1;Gn.prototype.number=!1;Gn.prototype.overloadedBoolean=!1;Gn.prototype.property="";Gn.prototype.spaceSeparated=!1;Gn.prototype.space=void 0;let $8=0;const Ze=ds(),nn=ds(),vp=ds(),Se=ds(),It=ds(),xl=ds(),tr=ds();function ds(){return 2**++$8}const Sp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ze,booleanish:nn,commaOrSpaceSeparated:tr,commaSeparated:xl,number:Se,overloadedBoolean:vp,spaceSeparated:It},Symbol.toStringTag,{value:"Module"})),Nm=Object.keys(Sp);class qg extends Gn{constructor(t,n,a,s){let l=-1;if(super(t,n),J2(this,"space",s),typeof a=="number")for(;++l<Nm.length;){const u=Nm[l];J2(this,Nm[l],(a&Sp[u])===Sp[u])}}}qg.prototype.defined=!0;function J2(e,t,n){n&&(e[t]=n)}function Dl(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const l=new qg(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(l.mustUseProperty=!0),t[a]=l,n[gu(a)]=a,n[gu(l.attribute)]=a}return new wu(t,n,e.space)}const iN=Dl({properties:{ariaActiveDescendant:null,ariaAtomic:nn,ariaAutoComplete:null,ariaBusy:nn,ariaChecked:nn,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:It,ariaCurrent:null,ariaDescribedBy:It,ariaDetails:null,ariaDisabled:nn,ariaDropEffect:It,ariaErrorMessage:null,ariaExpanded:nn,ariaFlowTo:It,ariaGrabbed:nn,ariaHasPopup:null,ariaHidden:nn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:It,ariaLevel:Se,ariaLive:null,ariaModal:nn,ariaMultiLine:nn,ariaMultiSelectable:nn,ariaOrientation:null,ariaOwns:It,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:nn,ariaReadOnly:nn,ariaRelevant:null,ariaRequired:nn,ariaRoleDescription:It,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:nn,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function sN(e,t){return t in e?e[t]:t}function lN(e,t){return sN(e,t.toLowerCase())}const q8=Dl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:xl,acceptCharset:It,accessKey:It,action:null,allow:null,allowFullScreen:Ze,allowPaymentRequest:Ze,allowUserMedia:Ze,alt:null,as:null,async:Ze,autoCapitalize:null,autoComplete:It,autoFocus:Ze,autoPlay:Ze,blocking:It,capture:null,charSet:null,checked:Ze,cite:null,className:It,cols:Se,colSpan:null,content:null,contentEditable:nn,controls:Ze,controlsList:It,coords:Se|xl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ze,defer:Ze,dir:null,dirName:null,disabled:Ze,download:vp,draggable:nn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ze,formTarget:null,headers:It,height:Se,hidden:vp,high:Se,href:null,hrefLang:null,htmlFor:It,httpEquiv:It,id:null,imageSizes:null,imageSrcSet:null,inert:Ze,inputMode:null,integrity:null,is:null,isMap:Ze,itemId:null,itemProp:It,itemRef:It,itemScope:Ze,itemType:It,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ze,low:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,multiple:Ze,muted:Ze,name:null,nonce:null,noModule:Ze,noValidate:Ze,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:Ze,optimum:Se,pattern:null,ping:It,placeholder:null,playsInline:Ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ze,referrerPolicy:null,rel:It,required:Ze,reversed:Ze,rows:Se,rowSpan:Se,sandbox:It,scope:null,scoped:Ze,seamless:Ze,selected:Ze,shadowRootClonable:Ze,shadowRootDelegatesFocus:Ze,shadowRootMode:null,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:nn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:Ze,useMap:null,value:nn,width:Se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:It,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ze,declare:Ze,event:null,face:null,frame:null,frameBorder:null,hSpace:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:Ze,noHref:Ze,noShade:Ze,noWrap:Ze,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:nn,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ze,disableRemotePlayback:Ze,prefix:null,property:null,results:Se,security:null,unselectable:null},space:"html",transform:lN}),V8=Dl({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:tr,accentHeight:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,className:It,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:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:Ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,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:xl,g2:xl,glyphName:xl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:tr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,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:Se,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:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:It,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tr,rev:tr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tr,requiredFeatures:tr,requiredFonts:tr,requiredFormats:tr,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:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:tr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tr,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:sN}),oN=Dl({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()}}),uN=Dl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:lN}),cN=Dl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Y8={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"},G8=/[A-Z]/g,eT=/-[a-z]/g,X8=/^data[-\w.:]+$/i;function Af(e,t){const n=gu(t);let a=t,s=Gn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&X8.test(t)){if(t.charAt(4)==="-"){const l=t.slice(5).replace(eT,W8);a="data"+l.charAt(0).toUpperCase()+l.slice(1)}else{const l=t.slice(4);if(!eT.test(l)){let u=l.replace(G8,Q8);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=qg}return new s(a,t)}function Q8(e){return"-"+e.toLowerCase()}function W8(e){return e.charAt(1).toUpperCase()}const Ru=aN([iN,q8,oN,uN,cN],"html"),ki=aN([iN,V8,oN,uN,cN],"svg");function tT(e){const t=[],n=String(e||"");let a=n.indexOf(","),s=0,l=!1;for(;!l;){a===-1&&(a=n.length,l=!0);const u=n.slice(s,a).trim();(u||!l)&&t.push(u),s=a+1,a=n.indexOf(",",s)}return t}function dN(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const nT=/[#.]/g;function K8(e,t){const n=e||"",a={};let s=0,l,u;for(;s<n.length;){nT.lastIndex=s;const f=nT.exec(n),h=n.slice(s,f?f.index:n.length);h&&(l?l==="#"?a.id=h:Array.isArray(a.className)?a.className.push(h):a.className=[h]:u=h,s+=h.length),f&&(l=f[0],s++)}return{type:"element",tagName:u||t||"div",properties:a,children:[]}}function rT(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function fN(e){return e.join(" ").trim()}function hN(e,t,n){const a=n?t9(n):void 0;function s(l,u,...f){let h;if(l==null){h={type:"root",children:[]};const m=u;f.unshift(m)}else{h=K8(l,t);const m=h.tagName.toLowerCase(),p=a?a.get(m):void 0;if(h.tagName=p||m,Z8(u))f.unshift(u);else for(const[g,y]of Object.entries(u))J8(e,h.properties,g,y)}for(const m of f)kp(h.children,m);return h.type==="element"&&h.tagName==="template"&&(h.content={type:"root",children:h.children},h.children=[]),h}return s}function Z8(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const a of n){const s=t[a];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const l=s;for(const u of l)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function J8(e,t,n,a){const s=Af(e,n);let l;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;l=a}else typeof a=="boolean"?l=a:typeof a=="string"?s.spaceSeparated?l=rT(a):s.commaSeparated?l=tT(a):s.commaOrSpaceSeparated?l=rT(tT(a).join(" ")):l=aT(s,s.property,a):Array.isArray(a)?l=[...a]:l=s.property==="style"?e9(a):String(a);if(Array.isArray(l)){const u=[];for(const f of l)u.push(aT(s,s.property,f));l=u}s.property==="className"&&Array.isArray(t.className)&&(l=t.className.concat(l)),t[s.property]=l}}function kp(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(const n of t)kp(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?kp(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function aT(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||gu(n)===gu(t)))return!0}return n}function e9(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function t9(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const n9=["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"],r9=hN(Ru,"div"),a9=hN(ki,"g",n9);function i9(e){const t=String(e),n=[];return{toOffset:s,toPoint:a};function a(l){if(typeof l=="number"&&l>-1&&l<=t.length){let u=0;for(;;){let f=n[u];if(f===void 0){const h=iT(t,n[u-1]);f=h===-1?t.length+1:h+1,n[u]=f}if(f>l)return{line:u+1,column:l-(u>0?n[u-1]:0)+1,offset:l};u++}}}function s(l){if(l&&typeof l.line=="number"&&typeof l.column=="number"&&!Number.isNaN(l.line)&&!Number.isNaN(l.column)){for(;n.length<l.line;){const f=n[n.length-1],h=iT(t,f),m=h===-1?t.length+1:h+1;if(f===m)break;n.push(m)}const u=(l.line>1?n[l.line-2]:0)+l.column-1;if(u<n[l.line-1])return u}}}function iT(e,t){const n=e.indexOf("\r",t),a=e.indexOf(`
62
+ `,t);return a===-1?n:n===-1||n+1===a?a:n<a?n:a}const Qi={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/"},mN={}.hasOwnProperty,s9=Object.prototype;function l9(e,t){const n=t||{};return Vg({file:n.file||void 0,location:!1,schema:n.space==="svg"?ki:Ru,verbose:n.verbose||!1},e)}function Vg(e,t){let n;switch(t.nodeName){case"#comment":{const a=t;return n={type:"comment",value:a.data},_d(e,a,n),n}case"#document":case"#document-fragment":{const a=t,s="mode"in a?a.mode==="quirks"||a.mode==="limited-quirks":!1;if(n={type:"root",children:pN(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const l=String(e.file),u=i9(l),f=u.toPoint(0),h=u.toPoint(l.length);n.position={start:f,end:h}}return n}case"#documentType":{const a=t;return n={type:"doctype"},_d(e,a,n),n}case"#text":{const a=t;return n={type:"text",value:a.value},_d(e,a,n),n}default:return n=o9(e,t),n}}function pN(e,t){let n=-1;const a=[];for(;++n<t.length;){const s=Vg(e,t[n]);a.push(s)}return a}function o9(e,t){const n=e.schema;e.schema=t.namespaceURI===Qi.svg?ki:Ru;let a=-1;const s={};for(;++a<t.attrs.length;){const f=t.attrs[a],h=(f.prefix?f.prefix+":":"")+f.name;mN.call(s9,h)||(s[h]=f.value)}const u=(e.schema.space==="svg"?a9:r9)(t.tagName,s,pN(e,t.childNodes));if(_d(e,t,u),u.tagName==="template"){const f=t,h=f.sourceCodeLocation,m=h&&h.startTag&&dl(h.startTag),p=h&&h.endTag&&dl(h.endTag),g=Vg(e,f.content);m&&p&&e.file&&(g.position={start:m.end,end:p.start}),u.content=g}return e.schema=n,u}function _d(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const a=u9(e,n,t.sourceCodeLocation);a&&(e.location=!0,n.position=a)}}function u9(e,t,n){const a=dl(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(a&&!n.endTag&&s&&s.position&&s.position.end&&(a.end=Object.assign({},s.position.end)),e.verbose){const l={};let u;if(n.attrs)for(u in n.attrs)mN.call(n.attrs,u)&&(l[Af(e.schema,u).property]=dl(n.attrs[u]));n.startTag;const f=dl(n.startTag),h=n.endTag?dl(n.endTag):void 0,m={opening:f};h&&(m.closing=h),m.properties=l,t.data={position:m}}}return a}function dl(e){const t=sT({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=sT({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function sT(e){return e.line&&e.column?e:void 0}const lT={}.hasOwnProperty;function gN(e,t){const n=t||{};function a(s,...l){let u=a.invalid;const f=a.handlers;if(s&&lT.call(s,e)){const h=String(s[e]);u=lT.call(f,h)?f[h]:a.unknown}if(u)return u.call(this,s,...l)}return a.handlers=n.handlers||{},a.invalid=n.invalid,a.unknown=n.unknown,a}const c9={},d9={}.hasOwnProperty,xN=gN("type",{handlers:{root:h9,element:b9,text:g9,comment:x9,doctype:p9}});function f9(e,t){const a=(t||c9).space;return xN(e,a==="svg"?ki:Ru)}function h9(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Yg(e.children,n,t),Ll(e,n),n}function m9(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Yg(e.children,n,t),Ll(e,n),n}function p9(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ll(e,t),t}function g9(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ll(e,t),t}function x9(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ll(e,t),t}function b9(e,t){const n=t;let a=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(a=ki);const s=[];let l;if(e.properties){for(l in e.properties)if(l!=="children"&&d9.call(e.properties,l)){const h=y9(a,l,e.properties[l]);h&&s.push(h)}}const u=a.space,f={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:Qi[u],childNodes:[],parentNode:null};return f.childNodes=Yg(e.children,f,a),Ll(e,f),e.tagName==="template"&&e.content&&(f.content=m9(e.content,a)),f}function y9(e,t,n){const a=Af(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&a.boolean)return;Array.isArray(n)&&(n=a.commaSeparated?dN(n):fN(n));const s={name:a.attribute,value:n===!0?"":String(n)};if(a.space&&a.space!=="html"&&a.space!=="svg"){const l=s.name.indexOf(":");l<0?s.prefix="":(s.name=s.name.slice(l+1),s.prefix=a.attribute.slice(0,l)),s.namespace=Qi[a.space]}return s}function Yg(e,t,n){let a=-1;const s=[];if(e)for(;++a<e.length;){const l=xN(e[a],n);l.parentNode=t,s.push(l)}return s}function Ll(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const E9=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],T9=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Ht="�";var z;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(z||(z={}));const $n={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function bN(e){return e>=55296&&e<=57343}function v9(e){return e>=56320&&e<=57343}function S9(e,t){return(e-55296)*1024+9216+t}function yN(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function EN(e){return e>=64976&&e<=65007||T9.has(e)}var le;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(le||(le={}));const k9=65536;class N9{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=k9,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:a,col:s,offset:l}=this,u=s+n,f=l+n;return{code:t,startLine:a,endLine:a,startCol:u,endCol:u,startOffset:f,endOffset:f}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(v9(n))return this.pos++,this._addGap(),S9(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,z.EOF;return this._err(le.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let a=0;a<t.length;a++)if((this.html.charCodeAt(this.pos+a)|32)!==t.charCodeAt(a))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,z.EOF;const a=this.html.charCodeAt(n);return a===z.CARRIAGE_RETURN?z.LINE_FEED:a}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,z.EOF;let t=this.html.charCodeAt(this.pos);return t===z.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,z.LINE_FEED):t===z.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,bN(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===z.LINE_FEED||t===z.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){yN(t)?this._err(le.controlCharacterInInputStream):EN(t)&&this._err(le.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var rt;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(rt||(rt={}));function TN(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const C9=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),_9=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function A9(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=_9.get(e))!==null&&t!==void 0?t:e}var mn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(mn||(mn={}));const w9=32;var di;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(di||(di={}));function Np(e){return e>=mn.ZERO&&e<=mn.NINE}function R9(e){return e>=mn.UPPER_A&&e<=mn.UPPER_F||e>=mn.LOWER_A&&e<=mn.LOWER_F}function O9(e){return e>=mn.UPPER_A&&e<=mn.UPPER_Z||e>=mn.LOWER_A&&e<=mn.LOWER_Z||Np(e)}function I9(e){return e===mn.EQUALS||O9(e)}var hn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(hn||(hn={}));var Ca;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Ca||(Ca={}));class D9{constructor(t,n,a){this.decodeTree=t,this.emitCodePoint=n,this.errors=a,this.state=hn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ca.Strict}startEntity(t){this.decodeMode=t,this.state=hn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case hn.EntityStart:return t.charCodeAt(n)===mn.NUM?(this.state=hn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=hn.NamedEntity,this.stateNamedEntity(t,n));case hn.NumericStart:return this.stateNumericStart(t,n);case hn.NumericDecimal:return this.stateNumericDecimal(t,n);case hn.NumericHex:return this.stateNumericHex(t,n);case hn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|w9)===mn.LOWER_X?(this.state=hn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=hn.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,a,s){if(n!==a){const l=a-n;this.result=this.result*Math.pow(s,l)+Number.parseInt(t.substr(n,l),s),this.consumed+=l}}stateNumericHex(t,n){const a=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Np(s)||R9(s))n+=1;else return this.addToNumericResult(t,a,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,a,n,16),-1}stateNumericDecimal(t,n){const a=n;for(;n<t.length;){const s=t.charCodeAt(n);if(Np(s))n+=1;else return this.addToNumericResult(t,a,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,a,n,10),-1}emitNumericEntity(t,n){var a;if(this.consumed<=n)return(a=this.errors)===null||a===void 0||a.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===mn.SEMI)this.consumed+=1;else if(this.decodeMode===Ca.Strict)return 0;return this.emitCodePoint(A9(this.result),this.consumed),this.errors&&(t!==mn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:a}=this;let s=a[this.treeIndex],l=(s&di.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=L9(a,s,this.treeIndex+Math.max(1,l),u),this.treeIndex<0)return this.result===0||this.decodeMode===Ca.Attribute&&(l===0||I9(u))?0:this.emitNotTerminatedNamedEntity();if(s=a[this.treeIndex],l=(s&di.VALUE_LENGTH)>>14,l!==0){if(u===mn.SEMI)return this.emitNamedEntityData(this.treeIndex,l,this.consumed+this.excess);this.decodeMode!==Ca.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:a}=this,s=(a[n]&di.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,a){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~di.VALUE_LENGTH:s[t+1],a),n===3&&this.emitCodePoint(s[t+2],a),a}end(){var t;switch(this.state){case hn.NamedEntity:return this.result!==0&&(this.decodeMode!==Ca.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case hn.NumericDecimal:return this.emitNumericEntity(0,2);case hn.NumericHex:return this.emitNumericEntity(0,3);case hn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case hn.EntityStart:return 0}}}function L9(e,t,n,a){const s=(t&di.BRANCH_LENGTH)>>7,l=t&di.JUMP_TABLE;if(s===0)return l!==0&&a===l?n:-1;if(l){const h=a-l;return h<0||h>=s?-1:e[n+h]-1}let u=n,f=u+s-1;for(;u<=f;){const h=u+f>>>1,m=e[h];if(m<a)u=h+1;else if(m>a)f=h-1;else return e[h+s]}return-1}var be;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(be||(be={}));var Zi;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Zi||(Zi={}));var br;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(br||(br={}));var ne;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(ne||(ne={}));var E;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(E||(E={}));const j9=new Map([[ne.A,E.A],[ne.ADDRESS,E.ADDRESS],[ne.ANNOTATION_XML,E.ANNOTATION_XML],[ne.APPLET,E.APPLET],[ne.AREA,E.AREA],[ne.ARTICLE,E.ARTICLE],[ne.ASIDE,E.ASIDE],[ne.B,E.B],[ne.BASE,E.BASE],[ne.BASEFONT,E.BASEFONT],[ne.BGSOUND,E.BGSOUND],[ne.BIG,E.BIG],[ne.BLOCKQUOTE,E.BLOCKQUOTE],[ne.BODY,E.BODY],[ne.BR,E.BR],[ne.BUTTON,E.BUTTON],[ne.CAPTION,E.CAPTION],[ne.CENTER,E.CENTER],[ne.CODE,E.CODE],[ne.COL,E.COL],[ne.COLGROUP,E.COLGROUP],[ne.DD,E.DD],[ne.DESC,E.DESC],[ne.DETAILS,E.DETAILS],[ne.DIALOG,E.DIALOG],[ne.DIR,E.DIR],[ne.DIV,E.DIV],[ne.DL,E.DL],[ne.DT,E.DT],[ne.EM,E.EM],[ne.EMBED,E.EMBED],[ne.FIELDSET,E.FIELDSET],[ne.FIGCAPTION,E.FIGCAPTION],[ne.FIGURE,E.FIGURE],[ne.FONT,E.FONT],[ne.FOOTER,E.FOOTER],[ne.FOREIGN_OBJECT,E.FOREIGN_OBJECT],[ne.FORM,E.FORM],[ne.FRAME,E.FRAME],[ne.FRAMESET,E.FRAMESET],[ne.H1,E.H1],[ne.H2,E.H2],[ne.H3,E.H3],[ne.H4,E.H4],[ne.H5,E.H5],[ne.H6,E.H6],[ne.HEAD,E.HEAD],[ne.HEADER,E.HEADER],[ne.HGROUP,E.HGROUP],[ne.HR,E.HR],[ne.HTML,E.HTML],[ne.I,E.I],[ne.IMG,E.IMG],[ne.IMAGE,E.IMAGE],[ne.INPUT,E.INPUT],[ne.IFRAME,E.IFRAME],[ne.KEYGEN,E.KEYGEN],[ne.LABEL,E.LABEL],[ne.LI,E.LI],[ne.LINK,E.LINK],[ne.LISTING,E.LISTING],[ne.MAIN,E.MAIN],[ne.MALIGNMARK,E.MALIGNMARK],[ne.MARQUEE,E.MARQUEE],[ne.MATH,E.MATH],[ne.MENU,E.MENU],[ne.META,E.META],[ne.MGLYPH,E.MGLYPH],[ne.MI,E.MI],[ne.MO,E.MO],[ne.MN,E.MN],[ne.MS,E.MS],[ne.MTEXT,E.MTEXT],[ne.NAV,E.NAV],[ne.NOBR,E.NOBR],[ne.NOFRAMES,E.NOFRAMES],[ne.NOEMBED,E.NOEMBED],[ne.NOSCRIPT,E.NOSCRIPT],[ne.OBJECT,E.OBJECT],[ne.OL,E.OL],[ne.OPTGROUP,E.OPTGROUP],[ne.OPTION,E.OPTION],[ne.P,E.P],[ne.PARAM,E.PARAM],[ne.PLAINTEXT,E.PLAINTEXT],[ne.PRE,E.PRE],[ne.RB,E.RB],[ne.RP,E.RP],[ne.RT,E.RT],[ne.RTC,E.RTC],[ne.RUBY,E.RUBY],[ne.S,E.S],[ne.SCRIPT,E.SCRIPT],[ne.SEARCH,E.SEARCH],[ne.SECTION,E.SECTION],[ne.SELECT,E.SELECT],[ne.SOURCE,E.SOURCE],[ne.SMALL,E.SMALL],[ne.SPAN,E.SPAN],[ne.STRIKE,E.STRIKE],[ne.STRONG,E.STRONG],[ne.STYLE,E.STYLE],[ne.SUB,E.SUB],[ne.SUMMARY,E.SUMMARY],[ne.SUP,E.SUP],[ne.TABLE,E.TABLE],[ne.TBODY,E.TBODY],[ne.TEMPLATE,E.TEMPLATE],[ne.TEXTAREA,E.TEXTAREA],[ne.TFOOT,E.TFOOT],[ne.TD,E.TD],[ne.TH,E.TH],[ne.THEAD,E.THEAD],[ne.TITLE,E.TITLE],[ne.TR,E.TR],[ne.TRACK,E.TRACK],[ne.TT,E.TT],[ne.U,E.U],[ne.UL,E.UL],[ne.SVG,E.SVG],[ne.VAR,E.VAR],[ne.WBR,E.WBR],[ne.XMP,E.XMP]]);function jl(e){var t;return(t=j9.get(e))!==null&&t!==void 0?t:E.UNKNOWN}const Te=E,M9={[be.HTML]:new Set([Te.ADDRESS,Te.APPLET,Te.AREA,Te.ARTICLE,Te.ASIDE,Te.BASE,Te.BASEFONT,Te.BGSOUND,Te.BLOCKQUOTE,Te.BODY,Te.BR,Te.BUTTON,Te.CAPTION,Te.CENTER,Te.COL,Te.COLGROUP,Te.DD,Te.DETAILS,Te.DIR,Te.DIV,Te.DL,Te.DT,Te.EMBED,Te.FIELDSET,Te.FIGCAPTION,Te.FIGURE,Te.FOOTER,Te.FORM,Te.FRAME,Te.FRAMESET,Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6,Te.HEAD,Te.HEADER,Te.HGROUP,Te.HR,Te.HTML,Te.IFRAME,Te.IMG,Te.INPUT,Te.LI,Te.LINK,Te.LISTING,Te.MAIN,Te.MARQUEE,Te.MENU,Te.META,Te.NAV,Te.NOEMBED,Te.NOFRAMES,Te.NOSCRIPT,Te.OBJECT,Te.OL,Te.P,Te.PARAM,Te.PLAINTEXT,Te.PRE,Te.SCRIPT,Te.SECTION,Te.SELECT,Te.SOURCE,Te.STYLE,Te.SUMMARY,Te.TABLE,Te.TBODY,Te.TD,Te.TEMPLATE,Te.TEXTAREA,Te.TFOOT,Te.TH,Te.THEAD,Te.TITLE,Te.TR,Te.TRACK,Te.UL,Te.WBR,Te.XMP]),[be.MATHML]:new Set([Te.MI,Te.MO,Te.MN,Te.MS,Te.MTEXT,Te.ANNOTATION_XML]),[be.SVG]:new Set([Te.TITLE,Te.FOREIGN_OBJECT,Te.DESC]),[be.XLINK]:new Set,[be.XML]:new Set,[be.XMLNS]:new Set},Cp=new Set([Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6]);ne.STYLE,ne.SCRIPT,ne.XMP,ne.IFRAME,ne.NOEMBED,ne.NOFRAMES,ne.PLAINTEXT;var $;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})($||($={}));const Kt={DATA:$.DATA,RCDATA:$.RCDATA,RAWTEXT:$.RAWTEXT,SCRIPT_DATA:$.SCRIPT_DATA,PLAINTEXT:$.PLAINTEXT,CDATA_SECTION:$.CDATA_SECTION};function B9(e){return e>=z.DIGIT_0&&e<=z.DIGIT_9}function Vo(e){return e>=z.LATIN_CAPITAL_A&&e<=z.LATIN_CAPITAL_Z}function P9(e){return e>=z.LATIN_SMALL_A&&e<=z.LATIN_SMALL_Z}function oi(e){return P9(e)||Vo(e)}function oT(e){return oi(e)||B9(e)}function pd(e){return e+32}function vN(e){return e===z.SPACE||e===z.LINE_FEED||e===z.TABULATION||e===z.FORM_FEED}function uT(e){return vN(e)||e===z.SOLIDUS||e===z.GREATER_THAN_SIGN}function z9(e){return e===z.NULL?le.nullCharacterReference:e>1114111?le.characterReferenceOutsideUnicodeRange:bN(e)?le.surrogateCharacterReference:EN(e)?le.noncharacterCharacterReference:yN(e)||e===z.CARRIAGE_RETURN?le.controlCharacterReference:null}class H9{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=$.DATA,this.returnState=$.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new N9(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new D9(C9,(a,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(a)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(le.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:a=>{this._err(le.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+a)},validateNumericCharacterReference:a=>{const s=z9(a);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var a,s;(s=(a=this.handler).onParseError)===null||s===void 0||s.call(a,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,a){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||a?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:rt.START_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:rt.END_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:rt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:rt.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const a=this.currentToken;if(TN(a,this.currentAttr.name)===null){if(a.attrs.push(this.currentAttr),a.location&&this.currentLocation){const s=(t=(n=a.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(le.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=jl(t.tagName),t.type===rt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(le.endTagWithAttributes),t.selfClosing&&this._err(le.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case rt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case rt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case rt.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:rt.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=vN(t)?rt.WHITESPACE_CHARACTER:t===z.NULL?rt.NULL_CHARACTER:rt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(rt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=$.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Ca.Attribute:Ca.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===$.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===$.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===$.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case $.DATA:{this._stateData(t);break}case $.RCDATA:{this._stateRcdata(t);break}case $.RAWTEXT:{this._stateRawtext(t);break}case $.SCRIPT_DATA:{this._stateScriptData(t);break}case $.PLAINTEXT:{this._statePlaintext(t);break}case $.TAG_OPEN:{this._stateTagOpen(t);break}case $.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case $.TAG_NAME:{this._stateTagName(t);break}case $.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case $.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case $.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case $.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case $.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case $.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case $.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case $.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case $.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case $.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case $.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case $.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case $.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case $.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case $.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case $.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case $.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case $.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case $.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case $.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case $.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case $.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case $.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case $.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case $.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case $.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case $.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case $.BOGUS_COMMENT:{this._stateBogusComment(t);break}case $.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case $.COMMENT_START:{this._stateCommentStart(t);break}case $.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case $.COMMENT:{this._stateComment(t);break}case $.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case $.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case $.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case $.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case $.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case $.COMMENT_END:{this._stateCommentEnd(t);break}case $.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case $.DOCTYPE:{this._stateDoctype(t);break}case $.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case $.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case $.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case $.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case $.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case $.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case $.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case $.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case $.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case $.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case $.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case $.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case $.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case $.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case $.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case $.CDATA_SECTION:{this._stateCdataSection(t);break}case $.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case $.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case $.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case $.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case z.LESS_THAN_SIGN:{this.state=$.TAG_OPEN;break}case z.AMPERSAND:{this._startCharacterReference();break}case z.NULL:{this._err(le.unexpectedNullCharacter),this._emitCodePoint(t);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case z.AMPERSAND:{this._startCharacterReference();break}case z.LESS_THAN_SIGN:{this.state=$.RCDATA_LESS_THAN_SIGN;break}case z.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Ht);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case z.LESS_THAN_SIGN:{this.state=$.RAWTEXT_LESS_THAN_SIGN;break}case z.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Ht);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case z.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_LESS_THAN_SIGN;break}case z.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Ht);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case z.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Ht);break}case z.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(oi(t))this._createStartTagToken(),this.state=$.TAG_NAME,this._stateTagName(t);else switch(t){case z.EXCLAMATION_MARK:{this.state=$.MARKUP_DECLARATION_OPEN;break}case z.SOLIDUS:{this.state=$.END_TAG_OPEN;break}case z.QUESTION_MARK:{this._err(le.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=$.BOGUS_COMMENT,this._stateBogusComment(t);break}case z.EOF:{this._err(le.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(le.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=$.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(oi(t))this._createEndTagToken(),this.state=$.TAG_NAME,this._stateTagName(t);else switch(t){case z.GREATER_THAN_SIGN:{this._err(le.missingEndTagName),this.state=$.DATA;break}case z.EOF:{this._err(le.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(le.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=$.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=$.BEFORE_ATTRIBUTE_NAME;break}case z.SOLIDUS:{this.state=$.SELF_CLOSING_START_TAG;break}case z.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentTagToken();break}case z.NULL:{this._err(le.unexpectedNullCharacter),n.tagName+=Ht;break}case z.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Vo(t)?pd(t):t)}}_stateRcdataLessThanSign(t){t===z.SOLIDUS?this.state=$.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=$.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){oi(t)?(this.state=$.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=$.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=$.BEFORE_ATTRIBUTE_NAME,!1;case z.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=$.SELF_CLOSING_START_TAG,!1;case z.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=$.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=$.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===z.SOLIDUS?this.state=$.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=$.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){oi(t)?(this.state=$.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=$.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=$.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case z.SOLIDUS:{this.state=$.SCRIPT_DATA_END_TAG_OPEN;break}case z.EXCLAMATION_MARK:{this.state=$.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=$.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){oi(t)?(this.state=$.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=$.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=$.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===z.HYPHEN_MINUS?(this.state=$.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=$.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===z.HYPHEN_MINUS?(this.state=$.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=$.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case z.HYPHEN_MINUS:{this.state=$.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Ht);break}case z.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case z.HYPHEN_MINUS:{this.state=$.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.NULL:{this._err(le.unexpectedNullCharacter),this.state=$.SCRIPT_DATA_ESCAPED,this._emitChars(Ht);break}case z.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=$.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case z.HYPHEN_MINUS:{this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case z.GREATER_THAN_SIGN:{this.state=$.SCRIPT_DATA,this._emitChars(">");break}case z.NULL:{this._err(le.unexpectedNullCharacter),this.state=$.SCRIPT_DATA_ESCAPED,this._emitChars(Ht);break}case z.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=$.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===z.SOLIDUS?this.state=$.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:oi(t)?(this._emitChars("<"),this.state=$.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=$.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){oi(t)?(this.state=$.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=$.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=$.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith($n.SCRIPT,!1)&&uT(this.preprocessor.peek($n.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<$n.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=$.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case z.HYPHEN_MINUS:{this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Ht);break}case z.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case z.HYPHEN_MINUS:{this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.NULL:{this._err(le.unexpectedNullCharacter),this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ht);break}case z.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case z.HYPHEN_MINUS:{this._emitChars("-");break}case z.LESS_THAN_SIGN:{this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case z.GREATER_THAN_SIGN:{this.state=$.SCRIPT_DATA,this._emitChars(">");break}case z.NULL:{this._err(le.unexpectedNullCharacter),this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ht);break}case z.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===z.SOLIDUS?(this.state=$.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith($n.SCRIPT,!1)&&uT(this.preprocessor.peek($n.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<$n.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=$.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=$.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.SOLIDUS:case z.GREATER_THAN_SIGN:case z.EOF:{this.state=$.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case z.EQUALS_SIGN:{this._err(le.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=$.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=$.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:case z.SOLIDUS:case z.GREATER_THAN_SIGN:case z.EOF:{this._leaveAttrName(),this.state=$.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case z.EQUALS_SIGN:{this._leaveAttrName(),this.state=$.BEFORE_ATTRIBUTE_VALUE;break}case z.QUOTATION_MARK:case z.APOSTROPHE:case z.LESS_THAN_SIGN:{this._err(le.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case z.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.name+=Ht;break}default:this.currentAttr.name+=String.fromCodePoint(Vo(t)?pd(t):t)}}_stateAfterAttributeName(t){switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.SOLIDUS:{this.state=$.SELF_CLOSING_START_TAG;break}case z.EQUALS_SIGN:{this.state=$.BEFORE_ATTRIBUTE_VALUE;break}case z.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=$.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{this.state=$.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this.state=$.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(le.missingAttributeValue),this.state=$.DATA,this.emitCurrentTagToken();break}default:this.state=$.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case z.QUOTATION_MARK:{this.state=$.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case z.AMPERSAND:{this._startCharacterReference();break}case z.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Ht;break}case z.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case z.APOSTROPHE:{this.state=$.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case z.AMPERSAND:{this._startCharacterReference();break}case z.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Ht;break}case z.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this._leaveAttrValue(),this.state=$.BEFORE_ATTRIBUTE_NAME;break}case z.AMPERSAND:{this._startCharacterReference();break}case z.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=$.DATA,this.emitCurrentTagToken();break}case z.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Ht;break}case z.QUOTATION_MARK:case z.APOSTROPHE:case z.LESS_THAN_SIGN:case z.EQUALS_SIGN:case z.GRAVE_ACCENT:{this._err(le.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case z.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this._leaveAttrValue(),this.state=$.BEFORE_ATTRIBUTE_NAME;break}case z.SOLIDUS:{this._leaveAttrValue(),this.state=$.SELF_CLOSING_START_TAG;break}case z.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=$.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._err(le.missingWhitespaceBetweenAttributes),this.state=$.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case z.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=$.DATA,this.emitCurrentTagToken();break}case z.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._err(le.unexpectedSolidusInTag),this.state=$.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case z.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentComment(n);break}case z.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case z.NULL:{this._err(le.unexpectedNullCharacter),n.data+=Ht;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch($n.DASH_DASH,!0)?(this._createCommentToken($n.DASH_DASH.length+1),this.state=$.COMMENT_START):this._consumeSequenceIfMatch($n.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation($n.DOCTYPE.length+1),this.state=$.DOCTYPE):this._consumeSequenceIfMatch($n.CDATA_START,!0)?this.inForeignNode?this.state=$.CDATA_SECTION:(this._err(le.cdataInHtmlContent),this._createCommentToken($n.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=$.BOGUS_COMMENT):this._ensureHibernation()||(this._err(le.incorrectlyOpenedComment),this._createCommentToken(2),this.state=$.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case z.HYPHEN_MINUS:{this.state=$.COMMENT_START_DASH;break}case z.GREATER_THAN_SIGN:{this._err(le.abruptClosingOfEmptyComment),this.state=$.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=$.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case z.HYPHEN_MINUS:{this.state=$.COMMENT_END;break}case z.GREATER_THAN_SIGN:{this._err(le.abruptClosingOfEmptyComment),this.state=$.DATA,this.emitCurrentComment(n);break}case z.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=$.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case z.HYPHEN_MINUS:{this.state=$.COMMENT_END_DASH;break}case z.LESS_THAN_SIGN:{n.data+="<",this.state=$.COMMENT_LESS_THAN_SIGN;break}case z.NULL:{this._err(le.unexpectedNullCharacter),n.data+=Ht;break}case z.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case z.EXCLAMATION_MARK:{n.data+="!",this.state=$.COMMENT_LESS_THAN_SIGN_BANG;break}case z.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=$.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===z.HYPHEN_MINUS?this.state=$.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=$.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===z.HYPHEN_MINUS?this.state=$.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=$.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==z.GREATER_THAN_SIGN&&t!==z.EOF&&this._err(le.nestedComment),this.state=$.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case z.HYPHEN_MINUS:{this.state=$.COMMENT_END;break}case z.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=$.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case z.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentComment(n);break}case z.EXCLAMATION_MARK:{this.state=$.COMMENT_END_BANG;break}case z.HYPHEN_MINUS:{n.data+="-";break}case z.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=$.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case z.HYPHEN_MINUS:{n.data+="--!",this.state=$.COMMENT_END_DASH;break}case z.GREATER_THAN_SIGN:{this._err(le.incorrectlyClosedComment),this.state=$.DATA,this.emitCurrentComment(n);break}case z.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=$.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=$.BEFORE_DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this.state=$.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case z.EOF:{this._err(le.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingWhitespaceBeforeDoctypeName),this.state=$.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Vo(t))this._createDoctypeToken(String.fromCharCode(pd(t))),this.state=$.DOCTYPE_NAME;else switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.NULL:{this._err(le.unexpectedNullCharacter),this._createDoctypeToken(Ht),this.state=$.DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this._err(le.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=$.DATA;break}case z.EOF:{this._err(le.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=$.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=$.AFTER_DOCTYPE_NAME;break}case z.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentDoctype(n);break}case z.NULL:{this._err(le.unexpectedNullCharacter),n.name+=Ht;break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Vo(t)?pd(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentDoctype(n);break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch($n.PUBLIC,!1)?this.state=$.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch($n.SYSTEM,!1)?this.state=$.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(le.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=$.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.QUOTATION_MARK:{this._err(le.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=$.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(le.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=$.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(le.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=$.DATA,this.emitCurrentDoctype(n);break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{n.publicId="",this.state=$.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{n.publicId="",this.state=$.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(le.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=$.DATA,this.emitCurrentDoctype(n);break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case z.QUOTATION_MARK:{this.state=$.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.NULL:{this._err(le.unexpectedNullCharacter),n.publicId+=Ht;break}case z.GREATER_THAN_SIGN:{this._err(le.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=$.DATA;break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case z.APOSTROPHE:{this.state=$.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case z.NULL:{this._err(le.unexpectedNullCharacter),n.publicId+=Ht;break}case z.GREATER_THAN_SIGN:{this._err(le.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=$.DATA;break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=$.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case z.GREATER_THAN_SIGN:{this.state=$.DATA,this.emitCurrentDoctype(n);break}case z.QUOTATION_MARK:{this._err(le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=$.DATA;break}case z.QUOTATION_MARK:{n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:{this.state=$.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.QUOTATION_MARK:{this._err(le.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{this._err(le.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(le.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.DATA,this.emitCurrentDoctype(n);break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.QUOTATION_MARK:{n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case z.APOSTROPHE:{n.systemId="",this.state=$.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case z.GREATER_THAN_SIGN:{this._err(le.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.DATA,this.emitCurrentDoctype(n);break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case z.QUOTATION_MARK:{this.state=$.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.NULL:{this._err(le.unexpectedNullCharacter),n.systemId+=Ht;break}case z.GREATER_THAN_SIGN:{this._err(le.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=$.DATA;break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case z.APOSTROPHE:{this.state=$.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case z.NULL:{this._err(le.unexpectedNullCharacter),n.systemId+=Ht;break}case z.GREATER_THAN_SIGN:{this._err(le.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=$.DATA;break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case z.SPACE:case z.LINE_FEED:case z.TABULATION:case z.FORM_FEED:break;case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=$.DATA;break}case z.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=$.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case z.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=$.DATA;break}case z.NULL:{this._err(le.unexpectedNullCharacter);break}case z.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case z.RIGHT_SQUARE_BRACKET:{this.state=$.CDATA_SECTION_BRACKET;break}case z.EOF:{this._err(le.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===z.RIGHT_SQUARE_BRACKET?this.state=$.CDATA_SECTION_END:(this._emitChars("]"),this.state=$.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case z.GREATER_THAN_SIGN:{this.state=$.DATA;break}case z.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=$.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(z.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&oT(this.preprocessor.peek(1))?$.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){oT(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===z.SEMICOLON&&this._err(le.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const SN=new Set([E.DD,E.DT,E.LI,E.OPTGROUP,E.OPTION,E.P,E.RB,E.RP,E.RT,E.RTC]),cT=new Set([...SN,E.CAPTION,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]),Gd=new Set([E.APPLET,E.CAPTION,E.HTML,E.MARQUEE,E.OBJECT,E.TABLE,E.TD,E.TEMPLATE,E.TH]),U9=new Set([...Gd,E.OL,E.UL]),F9=new Set([...Gd,E.BUTTON]),dT=new Set([E.ANNOTATION_XML,E.MI,E.MN,E.MO,E.MS,E.MTEXT]),fT=new Set([E.DESC,E.FOREIGN_OBJECT,E.TITLE]),$9=new Set([E.TR,E.TEMPLATE,E.HTML]),q9=new Set([E.TBODY,E.TFOOT,E.THEAD,E.TEMPLATE,E.HTML]),V9=new Set([E.TABLE,E.TEMPLATE,E.HTML]),Y9=new Set([E.TD,E.TH]);class G9{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,a){this.treeAdapter=n,this.handler=a,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=E.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===E.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===be.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const a=this._indexOf(t);this.items[a]=n,a===this.stackTop&&(this.current=n)}insertAfter(t,n,a){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,a),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==be.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const a=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(a,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Cp,be.HTML)}popUntilTableCellPopped(){this.popUntilPopped(Y9,be.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let a=this.stackTop;a>=0;a--)if(t.has(this.tagIDs[a])&&this.treeAdapter.getNamespaceURI(this.items[a])===n)return a;return-1}clearBackTo(t,n){const a=this._indexOfTagNames(t,n);this.shortenToLength(a+1)}clearBackToTableContext(){this.clearBackTo(V9,be.HTML)}clearBackToTableBodyContext(){this.clearBackTo(q9,be.HTML)}clearBackToTableRowContext(){this.clearBackTo($9,be.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===E.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===E.HTML}hasInDynamicScope(t,n){for(let a=this.stackTop;a>=0;a--){const s=this.tagIDs[a];switch(this.treeAdapter.getNamespaceURI(this.items[a])){case be.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case be.SVG:{if(fT.has(s))return!1;break}case be.MATHML:{if(dT.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Gd)}hasInListItemScope(t){return this.hasInDynamicScope(t,U9)}hasInButtonScope(t){return this.hasInDynamicScope(t,F9)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case be.HTML:{if(Cp.has(n))return!0;if(Gd.has(n))return!1;break}case be.SVG:{if(fT.has(n))return!1;break}case be.MATHML:{if(dT.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===be.HTML)switch(this.tagIDs[n]){case t:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===be.HTML)switch(this.tagIDs[t]){case E.TBODY:case E.THEAD:case E.TFOOT:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===be.HTML)switch(this.tagIDs[n]){case t:return!0;case E.OPTION:case E.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&SN.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&cT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&cT.has(this.currentTagId);)this.pop()}}const Cm=3;var Qr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Qr||(Qr={}));const hT={type:Qr.Marker};class X9{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const a=[],s=n.length,l=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let f=0;f<this.entries.length;f++){const h=this.entries[f];if(h.type===Qr.Marker)break;const{element:m}=h;if(this.treeAdapter.getTagName(m)===l&&this.treeAdapter.getNamespaceURI(m)===u){const p=this.treeAdapter.getAttrList(m);p.length===s&&a.push({idx:f,attrs:p})}}return a}_ensureNoahArkCondition(t){if(this.entries.length<Cm)return;const n=this.treeAdapter.getAttrList(t),a=this._getNoahArkConditionCandidates(t,n);if(a.length<Cm)return;const s=new Map(n.map(u=>[u.name,u.value]));let l=0;for(let u=0;u<a.length;u++){const f=a[u];f.attrs.every(h=>s.get(h.name)===h.value)&&(l+=1,l>=Cm&&this.entries.splice(f.idx,1))}}insertMarker(){this.entries.unshift(hT)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Qr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const a=this.entries.indexOf(this.bookmark);this.entries.splice(a,0,{type:Qr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(hT);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(a=>a.type===Qr.Marker||this.treeAdapter.getTagName(a.element)===t);return n&&n.type===Qr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Qr.Element&&n.element===t)}}const ui={createDocument(){return{nodeName:"#document",mode:br.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const a=e.childNodes.indexOf(n);e.childNodes.splice(a,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,a){const s=e.childNodes.find(l=>l.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=a;else{const l={nodeName:"#documentType",name:t,publicId:n,systemId:a,parentNode:null};ui.appendChild(e,l)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ui.isTextNode(n)){n.value+=t;return}}ui.appendChild(e,ui.createTextNode(t))},insertTextBefore(e,t,n){const a=e.childNodes[e.childNodes.indexOf(n)-1];a&&ui.isTextNode(a)?a.value+=t:ui.insertBefore(e,ui.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(a=>a.name));for(let a=0;a<t.length;a++)n.has(t[a].name)||e.attrs.push(t[a])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},kN="html",Q9="about:legacy-compat",W9="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",NN=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],K9=[...NN,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],Z9=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),CN=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],J9=[...CN,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function mT(e,t){return t.some(n=>e.startsWith(n))}function e7(e){return e.name===kN&&e.publicId===null&&(e.systemId===null||e.systemId===Q9)}function t7(e){if(e.name!==kN)return br.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===W9)return br.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),Z9.has(n))return br.QUIRKS;let a=t===null?K9:NN;if(mT(n,a))return br.QUIRKS;if(a=t===null?CN:J9,mT(n,a))return br.LIMITED_QUIRKS}return br.NO_QUIRKS}const pT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},n7="definitionurl",r7="definitionURL",a7=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),i7=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:be.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:be.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:be.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:be.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:be.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:be.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:be.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:be.XML}],["xml:space",{prefix:"xml",name:"space",namespace:be.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:be.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:be.XMLNS}]]),s7=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),l7=new Set([E.B,E.BIG,E.BLOCKQUOTE,E.BODY,E.BR,E.CENTER,E.CODE,E.DD,E.DIV,E.DL,E.DT,E.EM,E.EMBED,E.H1,E.H2,E.H3,E.H4,E.H5,E.H6,E.HEAD,E.HR,E.I,E.IMG,E.LI,E.LISTING,E.MENU,E.META,E.NOBR,E.OL,E.P,E.PRE,E.RUBY,E.S,E.SMALL,E.SPAN,E.STRONG,E.STRIKE,E.SUB,E.SUP,E.TABLE,E.TT,E.U,E.UL,E.VAR]);function o7(e){const t=e.tagID;return t===E.FONT&&e.attrs.some(({name:a})=>a===Zi.COLOR||a===Zi.SIZE||a===Zi.FACE)||l7.has(t)}function _N(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===n7){e.attrs[t].name=r7;break}}function AN(e){for(let t=0;t<e.attrs.length;t++){const n=a7.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Gg(e){for(let t=0;t<e.attrs.length;t++){const n=i7.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function u7(e){const t=s7.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=jl(e.tagName))}function c7(e,t){return t===be.MATHML&&(e===E.MI||e===E.MO||e===E.MN||e===E.MS||e===E.MTEXT)}function d7(e,t,n){if(t===be.MATHML&&e===E.ANNOTATION_XML){for(let a=0;a<n.length;a++)if(n[a].name===Zi.ENCODING){const s=n[a].value.toLowerCase();return s===pT.TEXT_HTML||s===pT.APPLICATION_XML}}return t===be.SVG&&(e===E.FOREIGN_OBJECT||e===E.DESC||e===E.TITLE)}function f7(e,t,n,a){return(!a||a===be.HTML)&&d7(e,t,n)||(!a||a===be.MATHML)&&c7(e,t)}const h7="hidden",m7=8,p7=3;var Y;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(Y||(Y={}));const g7={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},wN=new Set([E.TABLE,E.TBODY,E.TFOOT,E.THEAD,E.TR]),gT={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ui,onParseError:null};class xT{constructor(t,n,a=null,s=null){this.fragmentContext=a,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=Y.INITIAL,this.originalInsertionMode=Y.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...gT,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new H9(this.options,this),this.activeFormattingElements=new X9(this.treeAdapter),this.fragmentContextID=a?jl(this.treeAdapter.getTagName(a)):E.UNKNOWN,this._setContextModes(a??this.document,this.fragmentContextID),this.openElements=new G9(this.document,this.treeAdapter,this)}static parse(t,n){const a=new this(n);return a.tokenizer.write(t,!0),a.document}static getFragmentParser(t,n){const a={...gT,...n};t??(t=a.treeAdapter.createElement(ne.TEMPLATE,be.HTML,[]));const s=a.treeAdapter.createElement("documentmock",be.HTML,[]),l=new this(a,s,t);return l.fragmentContextID===E.TEMPLATE&&l.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE),l._initTokenizerForFragmentParsing(),l._insertFakeRootElement(),l._resetInsertionMode(),l._findFormInFragmentContext(),l}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,a){var s;if(!this.onParseError)return;const l=(s=t.location)!==null&&s!==void 0?s:g7,u={code:n,startLine:l.startLine,startCol:l.startCol,startOffset:l.startOffset,endLine:a?l.startLine:l.endLine,endCol:a?l.startCol:l.endCol,endOffset:a?l.startOffset:l.endOffset};this.onParseError(u)}onItemPush(t,n,a){var s,l;(l=(s=this.treeAdapter).onItemPush)===null||l===void 0||l.call(s,t),a&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var a,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(a=this.treeAdapter).onItemPop)===null||s===void 0||s.call(a,t,this.openElements.current),n){let l,u;this.openElements.stackTop===0&&this.fragmentContext?(l=this.fragmentContext,u=this.fragmentContextID):{current:l,currentTagId:u}=this.openElements,this._setContextModes(l,u)}}_setContextModes(t,n){const a=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===be.HTML;this.currentNotInHTML=!a,this.tokenizer.inForeignNode=!a&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,be.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=Y.TEXT}switchToPlaintextParsing(){this.insertionMode=Y.TEXT,this.originalInsertionMode=Y.IN_BODY,this.tokenizer.state=Kt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===ne.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==be.HTML))switch(this.fragmentContextID){case E.TITLE:case E.TEXTAREA:{this.tokenizer.state=Kt.RCDATA;break}case E.STYLE:case E.XMP:case E.IFRAME:case E.NOEMBED:case E.NOFRAMES:case E.NOSCRIPT:{this.tokenizer.state=Kt.RAWTEXT;break}case E.SCRIPT:{this.tokenizer.state=Kt.SCRIPT_DATA;break}case E.PLAINTEXT:{this.tokenizer.state=Kt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",a=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,a,s),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(f=>this.treeAdapter.isDocumentTypeNode(f));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const a=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,a)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const a=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(a??this.document,t)}}_appendElement(t,n){const a=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(a,t.location)}_insertElement(t,n){const a=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID)}_insertFakeElement(t,n){const a=this.treeAdapter.createElement(t,be.HTML,[]);this._attachElementToTree(a,null),this.openElements.push(a,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,be.HTML,t.attrs),a=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,a),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(ne.HTML,be.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,E.HTML)}_appendCommentNode(t,n){const a=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,a),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_insertCharacters(t){let n,a;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:a}=this._findFosterParentingLocation(),a?this.treeAdapter.insertTextBefore(n,t.chars,a):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),l=a?s.lastIndexOf(a):s.length,u=s[l-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:h,endCol:m,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:h,endCol:m,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let a=this.treeAdapter.getFirstChild(t);a;a=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(a),this.treeAdapter.appendChild(n,a)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const a=n.location,s=this.treeAdapter.getTagName(t),l=n.type===rt.END_TAG&&s===n.tagName?{endTag:{...a},endLine:a.endLine,endCol:a.endCol,endOffset:a.endOffset}:{endLine:a.startLine,endCol:a.startCol,endOffset:a.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,l)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,a;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,a=this.fragmentContextID):{current:n,currentTagId:a}=this.openElements,t.tagID===E.SVG&&this.treeAdapter.getTagName(n)===ne.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===be.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===E.MGLYPH||t.tagID===E.MALIGNMARK)&&a!==void 0&&!this._isIntegrationPoint(a,n,be.HTML)}_processToken(t){switch(t.type){case rt.CHARACTER:{this.onCharacter(t);break}case rt.NULL_CHARACTER:{this.onNullCharacter(t);break}case rt.COMMENT:{this.onComment(t);break}case rt.DOCTYPE:{this.onDoctype(t);break}case rt.START_TAG:{this._processStartTag(t);break}case rt.END_TAG:{this.onEndTag(t);break}case rt.EOF:{this.onEof(t);break}case rt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,a){const s=this.treeAdapter.getNamespaceURI(n),l=this.treeAdapter.getAttrList(n);return f7(t,s,l,a)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Qr.Marker||this.openElements.contains(s.element)),a=n===-1?t-1:n-1;for(let s=a;s>=0;s--){const l=this.activeFormattingElements.entries[s];this._insertElement(l.token,this.treeAdapter.getNamespaceURI(l.element)),l.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=Y.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(E.P),this.openElements.popUntilTagNamePopped(E.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case E.TR:{this.insertionMode=Y.IN_ROW;return}case E.TBODY:case E.THEAD:case E.TFOOT:{this.insertionMode=Y.IN_TABLE_BODY;return}case E.CAPTION:{this.insertionMode=Y.IN_CAPTION;return}case E.COLGROUP:{this.insertionMode=Y.IN_COLUMN_GROUP;return}case E.TABLE:{this.insertionMode=Y.IN_TABLE;return}case E.BODY:{this.insertionMode=Y.IN_BODY;return}case E.FRAMESET:{this.insertionMode=Y.IN_FRAMESET;return}case E.SELECT:{this._resetInsertionModeForSelect(t);return}case E.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case E.HTML:{this.insertionMode=this.headElement?Y.AFTER_HEAD:Y.BEFORE_HEAD;return}case E.TD:case E.TH:{if(t>0){this.insertionMode=Y.IN_CELL;return}break}case E.HEAD:{if(t>0){this.insertionMode=Y.IN_HEAD;return}break}}this.insertionMode=Y.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const a=this.openElements.tagIDs[n];if(a===E.TEMPLATE)break;if(a===E.TABLE){this.insertionMode=Y.IN_SELECT_IN_TABLE;return}}this.insertionMode=Y.IN_SELECT}_isElementCausesFosterParenting(t){return wN.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case E.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===be.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case E.TABLE:{const a=this.treeAdapter.getParentNode(n);return a?{parent:a,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const a=this.treeAdapter.getNamespaceURI(t);return M9[a].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){YB(this,t);return}switch(this.insertionMode){case Y.INITIAL:{jo(this,t);break}case Y.BEFORE_HTML:{Wo(this,t);break}case Y.BEFORE_HEAD:{Ko(this,t);break}case Y.IN_HEAD:{Zo(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{Jo(this,t);break}case Y.AFTER_HEAD:{eu(this,t);break}case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:{ON(this,t);break}case Y.TEXT:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{_m(this,t);break}case Y.IN_TABLE_TEXT:{BN(this,t);break}case Y.IN_COLUMN_GROUP:{Xd(this,t);break}case Y.AFTER_BODY:{Qd(this,t);break}case Y.AFTER_AFTER_BODY:{Ad(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){VB(this,t);return}switch(this.insertionMode){case Y.INITIAL:{jo(this,t);break}case Y.BEFORE_HTML:{Wo(this,t);break}case Y.BEFORE_HEAD:{Ko(this,t);break}case Y.IN_HEAD:{Zo(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{Jo(this,t);break}case Y.AFTER_HEAD:{eu(this,t);break}case Y.TEXT:{this._insertCharacters(t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{_m(this,t);break}case Y.IN_COLUMN_GROUP:{Xd(this,t);break}case Y.AFTER_BODY:{Qd(this,t);break}case Y.AFTER_AFTER_BODY:{Ad(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){_p(this,t);return}switch(this.insertionMode){case Y.INITIAL:case Y.BEFORE_HTML:case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_TEMPLATE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:{_p(this,t);break}case Y.IN_TABLE_TEXT:{Mo(this,t);break}case Y.AFTER_BODY:{S7(this,t);break}case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{k7(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case Y.INITIAL:{N7(this,t);break}case Y.BEFORE_HEAD:case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:{this._err(t,le.misplacedDoctype);break}case Y.IN_TABLE_TEXT:{Mo(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,le.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?GB(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case Y.INITIAL:{jo(this,t);break}case Y.BEFORE_HTML:{C7(this,t);break}case Y.BEFORE_HEAD:{A7(this,t);break}case Y.IN_HEAD:{Ur(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{O7(this,t);break}case Y.AFTER_HEAD:{D7(this,t);break}case Y.IN_BODY:{An(this,t);break}case Y.IN_TABLE:{Sl(this,t);break}case Y.IN_TABLE_TEXT:{Mo(this,t);break}case Y.IN_CAPTION:{wB(this,t);break}case Y.IN_COLUMN_GROUP:{Wg(this,t);break}case Y.IN_TABLE_BODY:{Of(this,t);break}case Y.IN_ROW:{If(this,t);break}case Y.IN_CELL:{IB(this,t);break}case Y.IN_SELECT:{HN(this,t);break}case Y.IN_SELECT_IN_TABLE:{LB(this,t);break}case Y.IN_TEMPLATE:{MB(this,t);break}case Y.AFTER_BODY:{PB(this,t);break}case Y.IN_FRAMESET:{zB(this,t);break}case Y.AFTER_FRAMESET:{UB(this,t);break}case Y.AFTER_AFTER_BODY:{$B(this,t);break}case Y.AFTER_AFTER_FRAMESET:{qB(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?XB(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case Y.INITIAL:{jo(this,t);break}case Y.BEFORE_HTML:{_7(this,t);break}case Y.BEFORE_HEAD:{w7(this,t);break}case Y.IN_HEAD:{R7(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{I7(this,t);break}case Y.AFTER_HEAD:{L7(this,t);break}case Y.IN_BODY:{Rf(this,t);break}case Y.TEXT:{yB(this,t);break}case Y.IN_TABLE:{xu(this,t);break}case Y.IN_TABLE_TEXT:{Mo(this,t);break}case Y.IN_CAPTION:{RB(this,t);break}case Y.IN_COLUMN_GROUP:{OB(this,t);break}case Y.IN_TABLE_BODY:{Ap(this,t);break}case Y.IN_ROW:{zN(this,t);break}case Y.IN_CELL:{DB(this,t);break}case Y.IN_SELECT:{UN(this,t);break}case Y.IN_SELECT_IN_TABLE:{jB(this,t);break}case Y.IN_TEMPLATE:{BB(this,t);break}case Y.AFTER_BODY:{$N(this,t);break}case Y.IN_FRAMESET:{HB(this,t);break}case Y.AFTER_FRAMESET:{FB(this,t);break}case Y.AFTER_AFTER_BODY:{Ad(this,t);break}}}onEof(t){switch(this.insertionMode){case Y.INITIAL:{jo(this,t);break}case Y.BEFORE_HTML:{Wo(this,t);break}case Y.BEFORE_HEAD:{Ko(this,t);break}case Y.IN_HEAD:{Zo(this,t);break}case Y.IN_HEAD_NO_SCRIPT:{Jo(this,t);break}case Y.AFTER_HEAD:{eu(this,t);break}case Y.IN_BODY:case Y.IN_TABLE:case Y.IN_CAPTION:case Y.IN_COLUMN_GROUP:case Y.IN_TABLE_BODY:case Y.IN_ROW:case Y.IN_CELL:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:{jN(this,t);break}case Y.TEXT:{EB(this,t);break}case Y.IN_TABLE_TEXT:{Mo(this,t);break}case Y.IN_TEMPLATE:{FN(this,t);break}case Y.AFTER_BODY:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{Qg(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===z.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case Y.IN_HEAD:case Y.IN_HEAD_NO_SCRIPT:case Y.AFTER_HEAD:case Y.TEXT:case Y.IN_COLUMN_GROUP:case Y.IN_SELECT:case Y.IN_SELECT_IN_TABLE:case Y.IN_FRAMESET:case Y.AFTER_FRAMESET:{this._insertCharacters(t);break}case Y.IN_BODY:case Y.IN_CAPTION:case Y.IN_CELL:case Y.IN_TEMPLATE:case Y.AFTER_BODY:case Y.AFTER_AFTER_BODY:case Y.AFTER_AFTER_FRAMESET:{RN(this,t);break}case Y.IN_TABLE:case Y.IN_TABLE_BODY:case Y.IN_ROW:{_m(this,t);break}case Y.IN_TABLE_TEXT:{MN(this,t);break}}}}function x7(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):LN(e,t),n}function b7(e,t){let n=null,a=e.openElements.stackTop;for(;a>=0;a--){const s=e.openElements.items[a];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[a])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(a,0)),e.activeFormattingElements.removeEntry(t)),n}function y7(e,t,n){let a=t,s=e.openElements.getCommonAncestor(t);for(let l=0,u=s;u!==n;l++,u=s){s=e.openElements.getCommonAncestor(u);const f=e.activeFormattingElements.getElementEntry(u),h=f&&l>=p7;!f||h?(h&&e.activeFormattingElements.removeEntry(f),e.openElements.remove(u)):(u=E7(e,f),a===t&&(e.activeFormattingElements.bookmark=f),e.treeAdapter.detachNode(a),e.treeAdapter.appendChild(u,a),a=u)}return a}function E7(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),a=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,a),t.element=a,a}function T7(e,t,n){const a=e.treeAdapter.getTagName(t),s=jl(a);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const l=e.treeAdapter.getNamespaceURI(t);s===E.TEMPLATE&&l===be.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function v7(e,t,n){const a=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,l=e.treeAdapter.createElement(s.tagName,a,s.attrs);e._adoptNodes(t,l),e.treeAdapter.appendChild(t,l),e.activeFormattingElements.insertElementAfterBookmark(l,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,l,s.tagID)}function Xg(e,t){for(let n=0;n<m7;n++){const a=x7(e,t);if(!a)break;const s=b7(e,a);if(!s)break;e.activeFormattingElements.bookmark=a;const l=y7(e,s,a.element),u=e.openElements.getCommonAncestor(a.element);e.treeAdapter.detachNode(l),u&&T7(e,u,l),v7(e,s,a)}}function _p(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function S7(e,t){e._appendCommentNode(t,e.openElements.items[0])}function k7(e,t){e._appendCommentNode(t,e.document)}function Qg(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let a=e.openElements.stackTop;a>=n;a--)e._setEndLocation(e.openElements.items[a],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const a=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(a);if(s&&!s.endTag&&(e._setEndLocation(a,t),e.openElements.stackTop>=1)){const l=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(l);u&&!u.endTag&&e._setEndLocation(l,t)}}}}function N7(e,t){e._setDocumentType(t);const n=t.forceQuirks?br.QUIRKS:t7(t);e7(t)||e._err(t,le.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=Y.BEFORE_HTML}function jo(e,t){e._err(t,le.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,br.QUIRKS),e.insertionMode=Y.BEFORE_HTML,e._processToken(t)}function C7(e,t){t.tagID===E.HTML?(e._insertElement(t,be.HTML),e.insertionMode=Y.BEFORE_HEAD):Wo(e,t)}function _7(e,t){const n=t.tagID;(n===E.HTML||n===E.HEAD||n===E.BODY||n===E.BR)&&Wo(e,t)}function Wo(e,t){e._insertFakeRootElement(),e.insertionMode=Y.BEFORE_HEAD,e._processToken(t)}function A7(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.HEAD:{e._insertElement(t,be.HTML),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD;break}default:Ko(e,t)}}function w7(e,t){const n=t.tagID;n===E.HEAD||n===E.BODY||n===E.HTML||n===E.BR?Ko(e,t):e._err(t,le.endTagWithoutMatchingOpenElement)}function Ko(e,t){e._insertFakeElement(ne.HEAD,E.HEAD),e.headElement=e.openElements.current,e.insertionMode=Y.IN_HEAD,e._processToken(t)}function Ur(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:{e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case E.TITLE:{e._switchToTextParsing(t,Kt.RCDATA);break}case E.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Kt.RAWTEXT):(e._insertElement(t,be.HTML),e.insertionMode=Y.IN_HEAD_NO_SCRIPT);break}case E.NOFRAMES:case E.STYLE:{e._switchToTextParsing(t,Kt.RAWTEXT);break}case E.SCRIPT:{e._switchToTextParsing(t,Kt.SCRIPT_DATA);break}case E.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Y.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(Y.IN_TEMPLATE);break}case E.HEAD:{e._err(t,le.misplacedStartTagForHeadElement);break}default:Zo(e,t)}}function R7(e,t){switch(t.tagID){case E.HEAD:{e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD;break}case E.BODY:case E.BR:case E.HTML:{Zo(e,t);break}case E.TEMPLATE:{fs(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function fs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==E.TEMPLATE&&e._err(t,le.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,le.endTagWithoutMatchingOpenElement)}function Zo(e,t){e.openElements.pop(),e.insertionMode=Y.AFTER_HEAD,e._processToken(t)}function O7(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.BASEFONT:case E.BGSOUND:case E.HEAD:case E.LINK:case E.META:case E.NOFRAMES:case E.STYLE:{Ur(e,t);break}case E.NOSCRIPT:{e._err(t,le.nestedNoscriptInHead);break}default:Jo(e,t)}}function I7(e,t){switch(t.tagID){case E.NOSCRIPT:{e.openElements.pop(),e.insertionMode=Y.IN_HEAD;break}case E.BR:{Jo(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function Jo(e,t){const n=t.type===rt.EOF?le.openElementsLeftAfterEof:le.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=Y.IN_HEAD,e._processToken(t)}function D7(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.BODY:{e._insertElement(t,be.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_BODY;break}case E.FRAMESET:{e._insertElement(t,be.HTML),e.insertionMode=Y.IN_FRAMESET;break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{e._err(t,le.abandonedHeadElementChild),e.openElements.push(e.headElement,E.HEAD),Ur(e,t),e.openElements.remove(e.headElement);break}case E.HEAD:{e._err(t,le.misplacedStartTagForHeadElement);break}default:eu(e,t)}}function L7(e,t){switch(t.tagID){case E.BODY:case E.HTML:case E.BR:{eu(e,t);break}case E.TEMPLATE:{fs(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function eu(e,t){e._insertFakeElement(ne.BODY,E.BODY),e.insertionMode=Y.IN_BODY,wf(e,t)}function wf(e,t){switch(t.type){case rt.CHARACTER:{ON(e,t);break}case rt.WHITESPACE_CHARACTER:{RN(e,t);break}case rt.COMMENT:{_p(e,t);break}case rt.START_TAG:{An(e,t);break}case rt.END_TAG:{Rf(e,t);break}case rt.EOF:{jN(e,t);break}}}function RN(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function ON(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function j7(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function M7(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function B7(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,be.HTML),e.insertionMode=Y.IN_FRAMESET)}function P7(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML)}function z7(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Cp.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,be.HTML)}function H7(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function U7(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML),n||(e.formElement=e.openElements.current))}function F7(e,t){e.framesetOk=!1;const n=t.tagID;for(let a=e.openElements.stackTop;a>=0;a--){const s=e.openElements.tagIDs[a];if(n===E.LI&&s===E.LI||(n===E.DD||n===E.DT)&&(s===E.DD||s===E.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==E.ADDRESS&&s!==E.DIV&&s!==E.P&&e._isSpecialElement(e.openElements.items[a],s))break}e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML)}function $7(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML),e.tokenizer.state=Kt.PLAINTEXT}function q7(e,t){e.openElements.hasInScope(E.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.framesetOk=!1}function V7(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(ne.A);n&&(Xg(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Y7(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function G7(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(E.NOBR)&&(Xg(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,be.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function X7(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function Q7(e,t){e.treeAdapter.getDocumentMode(e.document)!==br.QUIRKS&&e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,be.HTML),e.framesetOk=!1,e.insertionMode=Y.IN_TABLE}function IN(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,be.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function DN(e){const t=TN(e,Zi.TYPE);return t!=null&&t.toLowerCase()===h7}function W7(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,be.HTML),DN(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function K7(e,t){e._appendElement(t,be.HTML),t.ackSelfClosing=!0}function Z7(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._appendElement(t,be.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function J7(e,t){t.tagName=ne.IMG,t.tagID=E.IMG,IN(e,t)}function eB(e,t){e._insertElement(t,be.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Kt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Y.TEXT}function tB(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Kt.RAWTEXT)}function nB(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Kt.RAWTEXT)}function bT(e,t){e._switchToTextParsing(t,Kt.RAWTEXT)}function rB(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===Y.IN_TABLE||e.insertionMode===Y.IN_CAPTION||e.insertionMode===Y.IN_TABLE_BODY||e.insertionMode===Y.IN_ROW||e.insertionMode===Y.IN_CELL?Y.IN_SELECT_IN_TABLE:Y.IN_SELECT}function aB(e,t){e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML)}function iB(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,be.HTML)}function sB(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(E.RTC),e._insertElement(t,be.HTML)}function lB(e,t){e._reconstructActiveFormattingElements(),_N(t),Gg(t),t.selfClosing?e._appendElement(t,be.MATHML):e._insertElement(t,be.MATHML),t.ackSelfClosing=!0}function oB(e,t){e._reconstructActiveFormattingElements(),AN(t),Gg(t),t.selfClosing?e._appendElement(t,be.SVG):e._insertElement(t,be.SVG),t.ackSelfClosing=!0}function yT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,be.HTML)}function An(e,t){switch(t.tagID){case E.I:case E.S:case E.B:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.SMALL:case E.STRIKE:case E.STRONG:{Y7(e,t);break}case E.A:{V7(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{z7(e,t);break}case E.P:case E.DL:case E.OL:case E.UL:case E.DIV:case E.DIR:case E.NAV:case E.MAIN:case E.MENU:case E.ASIDE:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.DETAILS:case E.ADDRESS:case E.ARTICLE:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{P7(e,t);break}case E.LI:case E.DD:case E.DT:{F7(e,t);break}case E.BR:case E.IMG:case E.WBR:case E.AREA:case E.EMBED:case E.KEYGEN:{IN(e,t);break}case E.HR:{Z7(e,t);break}case E.RB:case E.RTC:{iB(e,t);break}case E.RT:case E.RP:{sB(e,t);break}case E.PRE:case E.LISTING:{H7(e,t);break}case E.XMP:{tB(e,t);break}case E.SVG:{oB(e,t);break}case E.HTML:{j7(e,t);break}case E.BASE:case E.LINK:case E.META:case E.STYLE:case E.TITLE:case E.SCRIPT:case E.BGSOUND:case E.BASEFONT:case E.TEMPLATE:{Ur(e,t);break}case E.BODY:{M7(e,t);break}case E.FORM:{U7(e,t);break}case E.NOBR:{G7(e,t);break}case E.MATH:{lB(e,t);break}case E.TABLE:{Q7(e,t);break}case E.INPUT:{W7(e,t);break}case E.PARAM:case E.TRACK:case E.SOURCE:{K7(e,t);break}case E.IMAGE:{J7(e,t);break}case E.BUTTON:{q7(e,t);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{X7(e,t);break}case E.IFRAME:{nB(e,t);break}case E.SELECT:{rB(e,t);break}case E.OPTION:case E.OPTGROUP:{aB(e,t);break}case E.NOEMBED:case E.NOFRAMES:{bT(e,t);break}case E.FRAMESET:{B7(e,t);break}case E.TEXTAREA:{eB(e,t);break}case E.NOSCRIPT:{e.options.scriptingEnabled?bT(e,t):yT(e,t);break}case E.PLAINTEXT:{$7(e,t);break}case E.COL:case E.TH:case E.TD:case E.TR:case E.HEAD:case E.FRAME:case E.TBODY:case E.TFOOT:case E.THEAD:case E.CAPTION:case E.COLGROUP:break;default:yT(e,t)}}function uB(e,t){if(e.openElements.hasInScope(E.BODY)&&(e.insertionMode=Y.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function cB(e,t){e.openElements.hasInScope(E.BODY)&&(e.insertionMode=Y.AFTER_BODY,$N(e,t))}function dB(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function fB(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(E.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(E.FORM):n&&e.openElements.remove(n))}function hB(e){e.openElements.hasInButtonScope(E.P)||e._insertFakeElement(ne.P,E.P),e._closePElement()}function mB(e){e.openElements.hasInListItemScope(E.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(E.LI),e.openElements.popUntilTagNamePopped(E.LI))}function pB(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function gB(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function xB(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function bB(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ne.BR,E.BR),e.openElements.pop(),e.framesetOk=!1}function LN(e,t){const n=t.tagName,a=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const l=e.openElements.items[s],u=e.openElements.tagIDs[s];if(a===u&&(a!==E.UNKNOWN||e.treeAdapter.getTagName(l)===n)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(l,u))break}}function Rf(e,t){switch(t.tagID){case E.A:case E.B:case E.I:case E.S:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.NOBR:case E.SMALL:case E.STRIKE:case E.STRONG:{Xg(e,t);break}case E.P:{hB(e);break}case E.DL:case E.UL:case E.OL:case E.DIR:case E.DIV:case E.NAV:case E.PRE:case E.MAIN:case E.MENU:case E.ASIDE:case E.BUTTON:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.ADDRESS:case E.ARTICLE:case E.DETAILS:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.LISTING:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{dB(e,t);break}case E.LI:{mB(e);break}case E.DD:case E.DT:{pB(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{gB(e);break}case E.BR:{bB(e);break}case E.BODY:{uB(e,t);break}case E.HTML:{cB(e,t);break}case E.FORM:{fB(e);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{xB(e,t);break}case E.TEMPLATE:{fs(e,t);break}default:LN(e,t)}}function jN(e,t){e.tmplInsertionModeStack.length>0?FN(e,t):Qg(e,t)}function yB(e,t){var n;t.tagID===E.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function EB(e,t){e._err(t,le.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function _m(e,t){if(e.openElements.currentTagId!==void 0&&wN.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Y.IN_TABLE_TEXT,t.type){case rt.CHARACTER:{BN(e,t);break}case rt.WHITESPACE_CHARACTER:{MN(e,t);break}}else Ou(e,t)}function TB(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,be.HTML),e.insertionMode=Y.IN_CAPTION}function vB(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,be.HTML),e.insertionMode=Y.IN_COLUMN_GROUP}function SB(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ne.COLGROUP,E.COLGROUP),e.insertionMode=Y.IN_COLUMN_GROUP,Wg(e,t)}function kB(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,be.HTML),e.insertionMode=Y.IN_TABLE_BODY}function NB(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ne.TBODY,E.TBODY),e.insertionMode=Y.IN_TABLE_BODY,Of(e,t)}function CB(e,t){e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function _B(e,t){DN(t)?e._appendElement(t,be.HTML):Ou(e,t),t.ackSelfClosing=!0}function AB(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,be.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Sl(e,t){switch(t.tagID){case E.TD:case E.TH:case E.TR:{NB(e,t);break}case E.STYLE:case E.SCRIPT:case E.TEMPLATE:{Ur(e,t);break}case E.COL:{SB(e,t);break}case E.FORM:{AB(e,t);break}case E.TABLE:{CB(e,t);break}case E.TBODY:case E.TFOOT:case E.THEAD:{kB(e,t);break}case E.INPUT:{_B(e,t);break}case E.CAPTION:{TB(e,t);break}case E.COLGROUP:{vB(e,t);break}default:Ou(e,t)}}function xu(e,t){switch(t.tagID){case E.TABLE:{e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode());break}case E.TEMPLATE:{fs(e,t);break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:Ou(e,t)}}function Ou(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,wf(e,t),e.fosterParentingEnabled=n}function MN(e,t){e.pendingCharacterTokens.push(t)}function BN(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Mo(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ou(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const PN=new Set([E.CAPTION,E.COL,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]);function wB(e,t){const n=t.tagID;PN.has(n)?e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,Sl(e,t)):An(e,t)}function RB(e,t){const n=t.tagID;switch(n){case E.CAPTION:case E.TABLE:{e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_TABLE,n===E.TABLE&&xu(e,t));break}case E.BODY:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:Rf(e,t)}}function Wg(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.COL:{e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case E.TEMPLATE:{Ur(e,t);break}default:Xd(e,t)}}function OB(e,t){switch(t.tagID){case E.COLGROUP:{e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break}case E.TEMPLATE:{fs(e,t);break}case E.COL:break;default:Xd(e,t)}}function Xd(e,t){e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=Y.IN_TABLE,e._processToken(t))}function Of(e,t){switch(t.tagID){case E.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,be.HTML),e.insertionMode=Y.IN_ROW;break}case E.TH:case E.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(ne.TR,E.TR),e.insertionMode=Y.IN_ROW,If(e,t);break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,Sl(e,t));break}default:Sl(e,t)}}function Ap(e,t){const n=t.tagID;switch(t.tagID){case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE);break}case E.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE,xu(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:case E.TR:break;default:xu(e,t)}}function If(e,t){switch(t.tagID){case E.TH:case E.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,be.HTML),e.insertionMode=Y.IN_CELL,e.activeFormattingElements.insertMarker();break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,Of(e,t));break}default:Sl(e,t)}}function zN(e,t){switch(t.tagID){case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY);break}case E.TABLE:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,Ap(e,t));break}case E.TBODY:case E.TFOOT:case E.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(E.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=Y.IN_TABLE_BODY,Ap(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:break;default:xu(e,t)}}function IB(e,t){const n=t.tagID;PN.has(n)?(e.openElements.hasInTableScope(E.TD)||e.openElements.hasInTableScope(E.TH))&&(e._closeTableCell(),If(e,t)):An(e,t)}function DB(e,t){const n=t.tagID;switch(n){case E.TD:case E.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Y.IN_ROW);break}case E.TABLE:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),zN(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:break;default:Rf(e,t)}}function HN(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._insertElement(t,be.HTML);break}case E.OPTGROUP:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._insertElement(t,be.HTML);break}case E.HR:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case E.INPUT:case E.KEYGEN:case E.TEXTAREA:case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),t.tagID!==E.SELECT&&e._processStartTag(t));break}case E.SCRIPT:case E.TEMPLATE:{Ur(e,t);break}}}function UN(e,t){switch(t.tagID){case E.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===E.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===E.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop();break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop();break}case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode());break}case E.TEMPLATE:{fs(e,t);break}}}function LB(e,t){const n=t.tagID;n===E.CAPTION||n===E.TABLE||n===E.TBODY||n===E.TFOOT||n===E.THEAD||n===E.TR||n===E.TD||n===E.TH?(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e._processStartTag(t)):HN(e,t)}function jB(e,t){const n=t.tagID;n===E.CAPTION||n===E.TABLE||n===E.TBODY||n===E.TFOOT||n===E.THEAD||n===E.TR||n===E.TD||n===E.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e.onEndTag(t)):UN(e,t)}function MB(e,t){switch(t.tagID){case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{Ur(e,t);break}case E.CAPTION:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.tmplInsertionModeStack[0]=Y.IN_TABLE,e.insertionMode=Y.IN_TABLE,Sl(e,t);break}case E.COL:{e.tmplInsertionModeStack[0]=Y.IN_COLUMN_GROUP,e.insertionMode=Y.IN_COLUMN_GROUP,Wg(e,t);break}case E.TR:{e.tmplInsertionModeStack[0]=Y.IN_TABLE_BODY,e.insertionMode=Y.IN_TABLE_BODY,Of(e,t);break}case E.TD:case E.TH:{e.tmplInsertionModeStack[0]=Y.IN_ROW,e.insertionMode=Y.IN_ROW,If(e,t);break}default:e.tmplInsertionModeStack[0]=Y.IN_BODY,e.insertionMode=Y.IN_BODY,An(e,t)}}function BB(e,t){t.tagID===E.TEMPLATE&&fs(e,t)}function FN(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Qg(e,t)}function PB(e,t){t.tagID===E.HTML?An(e,t):Qd(e,t)}function $N(e,t){var n;if(t.tagID===E.HTML){if(e.fragmentContext||(e.insertionMode=Y.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===E.HTML){e._setEndLocation(e.openElements.items[0],t);const a=e.openElements.items[1];a&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(a))===null||n===void 0)&&n.endTag)&&e._setEndLocation(a,t)}}else Qd(e,t)}function Qd(e,t){e.insertionMode=Y.IN_BODY,wf(e,t)}function zB(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.FRAMESET:{e._insertElement(t,be.HTML);break}case E.FRAME:{e._appendElement(t,be.HTML),t.ackSelfClosing=!0;break}case E.NOFRAMES:{Ur(e,t);break}}}function HB(e,t){t.tagID===E.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==E.FRAMESET&&(e.insertionMode=Y.AFTER_FRAMESET))}function UB(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.NOFRAMES:{Ur(e,t);break}}}function FB(e,t){t.tagID===E.HTML&&(e.insertionMode=Y.AFTER_AFTER_FRAMESET)}function $B(e,t){t.tagID===E.HTML?An(e,t):Ad(e,t)}function Ad(e,t){e.insertionMode=Y.IN_BODY,wf(e,t)}function qB(e,t){switch(t.tagID){case E.HTML:{An(e,t);break}case E.NOFRAMES:{Ur(e,t);break}}}function VB(e,t){t.chars=Ht,e._insertCharacters(t)}function YB(e,t){e._insertCharacters(t),e.framesetOk=!1}function qN(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==be.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function GB(e,t){if(o7(t))qN(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),a=e.treeAdapter.getNamespaceURI(n);a===be.MATHML?_N(t):a===be.SVG&&(u7(t),AN(t)),Gg(t),t.selfClosing?e._appendElement(t,a):e._insertElement(t,a),t.ackSelfClosing=!0}}function XB(e,t){if(t.tagID===E.P||t.tagID===E.BR){qN(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const a=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(a)===be.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(a);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}ne.AREA,ne.BASE,ne.BASEFONT,ne.BGSOUND,ne.BR,ne.COL,ne.EMBED,ne.FRAME,ne.HR,ne.IMG,ne.INPUT,ne.KEYGEN,ne.LINK,ne.META,ne.PARAM,ne.SOURCE,ne.TRACK,ne.WBR;const Df=VN("end"),aa=VN("start");function VN(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function YN(e){const t=aa(e),n=Df(e);if(t&&n)return{start:t,end:n}}const QB=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,WB=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ET={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function GN(e,t){const n=sP(e),a=gN("type",{handlers:{root:KB,element:ZB,text:JB,comment:QN,doctype:eP,raw:nP},unknown:rP}),s={parser:n?new xT(ET):xT.getFragmentParser(void 0,ET),handle(f){a(f,s)},stitches:!1,options:t||{}};a(e,s),Ml(s,aa());const l=n?s.parser.document:s.parser.getFragment(),u=l9(l,{file:s.options.file});return s.stitches&&gi(u,"comment",function(f,h,m){const p=f;if(p.value.stitch&&m&&h!==void 0){const g=m.children;return g[h]=p.value.stitch,h}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function XN(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function KB(e,t){XN(e.children,t)}function ZB(e,t){aP(e,t),XN(e.children,t),iP(e,t)}function JB(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:rt.CHARACTER,chars:e.value,location:Iu(e)};Ml(t,aa(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function eP(e,t){const n={type:rt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Iu(e)};Ml(t,aa(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function tP(e,t){t.stitches=!0;const n=lP(e);if("children"in e&&"children"in n){const a=GN({type:"root",children:e.children},t.options);n.children=a.children}QN({type:"comment",value:{stitch:n}},t)}function QN(e,t){const n=e.value,a={type:rt.COMMENT,data:n,location:Iu(e)};Ml(t,aa(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function nP(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,WN(t,aa(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(QB,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function rP(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))tP(n,t);else{let a="";throw WB.has(n.type)&&(a=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+a)}}function Ml(e,t){WN(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Kt.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function WN(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function aP(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Kt.PLAINTEXT)return;Ml(t,aa(e));const a=t.parser.openElements.current;let s="namespaceURI"in a?a.namespaceURI:Qi.html;s===Qi.html&&n==="svg"&&(s=Qi.svg);const l=f9({...e,children:[]},{space:s===Qi.svg?"svg":"html"}),u={type:rt.START_TAG,tagName:n,tagID:jl(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in l?l.attrs:[],location:Iu(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function iP(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&E9.includes(n)||t.parser.tokenizer.state===Kt.PLAINTEXT)return;Ml(t,Df(e));const a={type:rt.END_TAG,tagName:n,tagID:jl(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Iu(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Kt.RCDATA||t.parser.tokenizer.state===Kt.RAWTEXT||t.parser.tokenizer.state===Kt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Kt.DATA)}function sP(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Iu(e){const t=aa(e)||{line:void 0,column:void 0,offset:void 0},n=Df(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function lP(e){return"children"in e?is({...e,children:[]}):is(e)}function wp(e){return function(t,n){return GN(t,{...e,file:n})}}const Vi=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],tu={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Vi,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Vi],h2:[["className","sr-only"]],img:[...Vi,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Vi,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Vi],table:[...Vi],ul:[...Vi,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},ci={}.hasOwnProperty;function oP(e,t){let n={type:"root",children:[]};const a={schema:t?{...tu,...t}:tu,stack:[]},s=KN(a,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function KN(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return uP(e,n);case"doctype":return cP(e,n);case"element":return dP(e,n);case"root":return fP(e,n);case"text":return hP(e,n)}}}function uP(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",a=n.indexOf("-->"),l={type:"comment",value:a<0?n:n.slice(0,a)};return Du(l,t),l}}function cP(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Du(n,t),n}}function dP(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const a=ZN(e,t.children),s=mP(e,t.properties);e.stack.pop();let l=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(l=!0,e.schema.ancestors&&ci.call(e.schema.ancestors,n))){const f=e.schema.ancestors[n];let h=-1;for(l=!1;++h<f.length;)e.stack.includes(f[h])&&(l=!0)}if(!l)return e.schema.strip&&!e.schema.strip.includes(n)?a:void 0;const u={type:"element",tagName:n,properties:s,children:a};return Du(u,t),u}function fP(e,t){const a={type:"root",children:ZN(e,t.children)};return Du(a,t),a}function hP(e,t){const a={type:"text",value:typeof t.value=="string"?t.value:""};return Du(a,t),a}function ZN(e,t){const n=[];if(Array.isArray(t)){const a=t;let s=-1;for(;++s<a.length;){const l=KN(e,a[s]);l&&(Array.isArray(l)?n.push(...l):n.push(l))}}return n}function mP(e,t){const n=e.stack[e.stack.length-1],a=e.schema.attributes,s=e.schema.required,l=a&&ci.call(a,n)?a[n]:void 0,u=a&&ci.call(a,"*")?a["*"]:void 0,f=t&&typeof t=="object"?t:{},h={};let m;for(m in f)if(ci.call(f,m)){const p=f[m];let g=TT(e,vT(l,m),m,p);g==null&&(g=TT(e,vT(u,m),m,p)),g!=null&&(h[m]=g)}if(s&&ci.call(s,n)){const p=s[n];for(m in p)ci.call(p,m)&&!ci.call(h,m)&&(h[m]=p[m])}return h}function TT(e,t,n,a){return t?Array.isArray(a)?pP(e,t,n,a):JN(e,t,n,a):void 0}function pP(e,t,n,a){let s=-1;const l=[];for(;++s<a.length;){const u=JN(e,t,n,a[s]);(typeof u=="number"||typeof u=="string")&&l.push(u)}return l}function JN(e,t,n,a){if(!(typeof a!="boolean"&&typeof a!="number"&&typeof a!="string")&&gP(e,n,a)){if(typeof t=="object"&&t.length>1){let s=!1,l=0;for(;++l<t.length;){const u=t[l];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(a))){s=!0;break}}else if(u===a){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+a:a}}function gP(e,t,n){const a=e.schema.protocols&&ci.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!a||a.length===0)return!0;const s=String(n),l=s.indexOf(":"),u=s.indexOf("?"),f=s.indexOf("#"),h=s.indexOf("/");if(l<0||h>-1&&l>h||u>-1&&l>u||f>-1&&l>f)return!0;let m=-1;for(;++m<a.length;){const p=a[m];if(l===p.length&&s.slice(0,p.length)===p)return!0}return!1}function Du(e,t){const n=YN(t);t.data&&(e.data=is(t.data)),n&&(e.position=n)}function vT(e,t){let n,a=-1;if(e)for(;++a<e.length;){const s=e[a],l=typeof s=="string"?s:s[0];if(l===t)return s;l==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function eC(e){return function(t){return oP(t,e)}}function ST(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,s=n.indexOf(t);for(;s!==-1;)a++,s=n.indexOf(t,s+t.length);return a}const In=Ni(/[A-Za-z]/),Cn=Ni(/[\dA-Za-z]/),xP=Ni(/[#-'*+\--9=?A-Z^-~]/);function Wd(e){return e!==null&&(e<32||e===127)}const Rp=Ni(/\d/),bP=Ni(/[\dA-Fa-f]/),yP=Ni(/[!-/:-@[-`{-~]/);function ze(e){return e!==null&&e<-2}function Rt(e){return e!==null&&(e<0||e===32)}function st(e){return e===-2||e===-1||e===32}const Lf=Ni(new RegExp("\\p{P}|\\p{S}","u")),ss=Ni(/\s/);function Ni(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function EP(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function TP(e,t,n){const s=Nf((n||{}).ignore||[]),l=vP(t);let u=-1;for(;++u<l.length;)zg(e,"text",f);function f(m,p){let g=-1,y;for(;++g<p.length;){const T=p[g],S=y?y.children:void 0;if(s(T,S?S.indexOf(T):void 0,y))return;y=T}if(y)return h(m,p)}function h(m,p){const g=p[p.length-1],y=l[u][0],T=l[u][1];let S=0;const N=g.children.indexOf(m);let _=!1,A=[];y.lastIndex=0;let w=y.exec(m.value);for(;w;){const P=w.index,F={index:w.index,input:w.input,stack:[...p,m]};let M=T(...w,F);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?y.lastIndex=P+1:(S!==P&&A.push({type:"text",value:m.value.slice(S,P)}),Array.isArray(M)?A.push(...M):M&&A.push(M),S=P+w[0].length,_=!0),!y.global)break;w=y.exec(m.value)}return _?(S<m.value.length&&A.push({type:"text",value:m.value.slice(S)}),g.children.splice(N,1,...A)):A=[m],N+A.length}}function vP(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<n.length;){const s=n[a];t.push([SP(s[0]),kP(s[1])])}return t}function SP(e){return typeof e=="string"?new RegExp(EP(e),"g"):e}function kP(e){return typeof e=="function"?e:function(){return e}}const Am="phrasing",wm=["autolink","link","image","label"];function NP(){return{transforms:[IP],enter:{literalAutolink:_P,literalAutolinkEmail:Rm,literalAutolinkHttp:Rm,literalAutolinkWww:Rm},exit:{literalAutolink:OP,literalAutolinkEmail:RP,literalAutolinkHttp:AP,literalAutolinkWww:wP}}}function CP(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Am,notInConstruct:wm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Am,notInConstruct:wm},{character:":",before:"[ps]",after:"\\/",inConstruct:Am,notInConstruct:wm}]}}function _P(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Rm(e){this.config.enter.autolinkProtocol.call(this,e)}function AP(e){this.config.exit.autolinkProtocol.call(this,e)}function wP(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function RP(e){this.config.exit.autolinkEmail.call(this,e)}function OP(e){this.exit(e)}function IP(e){TP(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,DP],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),LP]],{ignore:["link","linkReference"]})}function DP(e,t,n,a,s){let l="";if(!tC(s)||(/^w/i.test(t)&&(n=t+n,t="",l="http://"),!jP(n)))return!1;const u=MP(n+a);if(!u[0])return!1;const f={type:"link",title:null,url:l+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[f,{type:"text",value:u[1]}]:f}function LP(e,t,n,a){return!tC(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function jP(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function MP(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const s=ST(e,"(");let l=ST(e,")");for(;a!==-1&&s>l;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),l++;return[e,n]}function tC(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ss(n)||Lf(n))&&(!t||n!==47)}function jr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}nC.peek=VP;function BP(){this.buffer()}function PP(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function zP(){this.buffer()}function HP(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function UP(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function FP(e){this.exit(e)}function $P(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qP(e){this.exit(e)}function VP(){return"["}function nC(e,t,n,a){const s=n.createTracker(a);let l=s.move("[^");const u=n.enter("footnoteReference"),f=n.enter("reference");return l+=s.move(n.safe(n.associationId(e),{after:"]",before:l})),f(),u(),l+=s.move("]"),l}function YP(){return{enter:{gfmFootnoteCallString:BP,gfmFootnoteCall:PP,gfmFootnoteDefinitionLabelString:zP,gfmFootnoteDefinition:HP},exit:{gfmFootnoteCallString:UP,gfmFootnoteCall:FP,gfmFootnoteDefinitionLabelString:$P,gfmFootnoteDefinition:qP}}}function GP(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:nC},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,l,u){const f=l.createTracker(u);let h=f.move("[^");const m=l.enter("footnoteDefinition"),p=l.enter("label");return h+=f.move(l.safe(l.associationId(a),{before:h,after:"]"})),p(),h+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),h+=f.move((t?`
63
+ `:" ")+l.indentLines(l.containerFlow(a,f.current()),t?rC:XP))),m(),h}}function XP(e,t,n){return t===0?e:rC(e,t,n)}function rC(e,t,n){return(n?"":" ")+e}const QP=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];aC.peek=ez;function WP(){return{canContainEols:["delete"],enter:{strikethrough:ZP},exit:{strikethrough:JP}}}function KP(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:QP}],handlers:{delete:aC}}}function ZP(e){this.enter({type:"delete",children:[]},e)}function JP(e){this.exit(e)}function aC(e,t,n,a){const s=n.createTracker(a),l=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,{...s.current(),before:u,after:"~"}),u+=s.move("~~"),l(),u}function ez(){return"~"}function tz(e){return e.length}function nz(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||tz,l=[],u=[],f=[],h=[];let m=0,p=-1;for(;++p<e.length;){const k=[],N=[];let _=-1;for(e[p].length>m&&(m=e[p].length);++_<e[p].length;){const A=rz(e[p][_]);if(n.alignDelimiters!==!1){const w=s(A);N[_]=w,(h[_]===void 0||w>h[_])&&(h[_]=w)}k.push(A)}u[p]=k,f[p]=N}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<m;)l[g]=kT(a[g]);else{const k=kT(a);for(;++g<m;)l[g]=k}g=-1;const y=[],T=[];for(;++g<m;){const k=l[g];let N="",_="";k===99?(N=":",_=":"):k===108?N=":":k===114&&(_=":");let A=n.alignDelimiters===!1?1:Math.max(1,h[g]-N.length-_.length);const w=N+"-".repeat(A)+_;n.alignDelimiters!==!1&&(A=N.length+A+_.length,A>h[g]&&(h[g]=A),T[g]=A),y[g]=w}u.splice(1,0,y),f.splice(1,0,T),p=-1;const S=[];for(;++p<u.length;){const k=u[p],N=f[p];g=-1;const _=[];for(;++g<m;){const A=k[g]||"";let w="",P="";if(n.alignDelimiters!==!1){const F=h[g]-(N[g]||0),M=l[g];M===114?w=" ".repeat(F):M===99?F%2?(w=" ".repeat(F/2+.5),P=" ".repeat(F/2-.5)):(w=" ".repeat(F/2),P=w):P=" ".repeat(F)}n.delimiterStart!==!1&&!g&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||g)&&_.push(" "),n.alignDelimiters!==!1&&_.push(w),_.push(A),n.alignDelimiters!==!1&&_.push(P),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||g!==m-1)&&_.push("|")}S.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return S.join(`
64
+ `)}function rz(e){return e==null?"":String(e)}function kT(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function az(e,t,n,a){const s=n.enter("blockquote"),l=n.createTracker(a);l.move("> "),l.shift(2);const u=n.indentLines(n.containerFlow(e,l.current()),iz);return s(),u}function iz(e,t,n){return">"+(n?"":" ")+e}function sz(e,t){return NT(e,t.inConstruct,!0)&&!NT(e,t.notInConstruct,!1)}function NT(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function CT(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
65
+ `&&sz(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
66
+ `}function lz(e,t){const n=String(e);let a=n.indexOf(t),s=a,l=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++l>u&&(u=l):l=1,s=a+t.length,a=n.indexOf(t,s);return u}function oz(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function uz(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function cz(e,t,n,a){const s=uz(n),l=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(oz(e,n)){const g=n.enter("codeIndented"),y=n.indentLines(l,dz);return g(),y}const f=n.createTracker(a),h=s.repeat(Math.max(lz(l,s)+1,3)),m=n.enter("codeFenced");let p=f.move(h);if(e.lang){const g=n.enter(`codeFencedLang${u}`);p+=f.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${u}`);p+=f.move(" "),p+=f.move(n.safe(e.meta,{before:p,after:`
67
+ `,encode:["`"],...f.current()})),g()}return p+=f.move(`
68
+ `),l&&(p+=f.move(l+`
69
+ `)),p+=f.move(h),m(),p}function dz(e,t,n){return(n?"":" ")+e}function Kg(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function fz(e,t,n,a){const s=Kg(n),l=s==='"'?"Quote":"Apostrophe",u=n.enter("definition");let f=n.enter("label");const h=n.createTracker(a);let m=h.move("[");return m+=h.move(n.safe(n.associationId(e),{before:m,after:"]",...h.current()})),m+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":`
70
+ `,...h.current()}))),f(),e.title&&(f=n.enter(`title${l}`),m+=h.move(" "+s),m+=h.move(n.safe(e.title,{before:m,after:s,...h.current()})),m+=h.move(s),f()),u(),m}function hz(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function bu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function kl(e){if(e===null||Rt(e)||ss(e))return 1;if(Lf(e))return 2}function Kd(e,t,n){const a=kl(e),s=kl(t);return a===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}iC.peek=mz;function iC(e,t,n,a){const s=hz(n),l=n.enter("emphasis"),u=n.createTracker(a),f=u.move(s);let h=u.move(n.containerPhrasing(e,{after:s,before:f,...u.current()}));const m=h.charCodeAt(0),p=Kd(a.before.charCodeAt(a.before.length-1),m,s);p.inside&&(h=bu(m)+h.slice(1));const g=h.charCodeAt(h.length-1),y=Kd(a.after.charCodeAt(0),g,s);y.inside&&(h=h.slice(0,-1)+bu(g));const T=u.move(s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},f+h+T}function mz(e,t,n){return n.options.emphasis||"*"}const pz={};function Zg(e,t){const n=pz,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return sC(e,a,s)}function sC(e,t,n){if(gz(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return _T(e.children,t,n)}return Array.isArray(e)?_T(e,t,n):""}function _T(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=sC(e[s],t,n);return a.join("")}function gz(e){return!!(e&&typeof e=="object")}function xz(e,t){let n=!1;return gi(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Tp}),!!((!e.depth||e.depth<3)&&Zg(e)&&(t.options.setext||n))}function bz(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),l=n.createTracker(a);if(xz(e,n)){const p=n.enter("headingSetext"),g=n.enter("phrasing"),y=n.containerPhrasing(e,{...l.current(),before:`
71
+ `,after:`
72
+ `});return g(),p(),y+`
73
+ `+(s===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
74
+ `))+1))}const u="#".repeat(s),f=n.enter("headingAtx"),h=n.enter("phrasing");l.move(u+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
75
+ `,...l.current()});return/^[\t ]/.test(m)&&(m=bu(m.charCodeAt(0))+m.slice(1)),m=m?u+" "+m:u,n.options.closeAtx&&(m+=" "+u),h(),f(),m}lC.peek=yz;function lC(e){return e.value||""}function yz(){return"<"}oC.peek=Ez;function oC(e,t,n,a){const s=Kg(n),l=s==='"'?"Quote":"Apostrophe",u=n.enter("image");let f=n.enter("label");const h=n.createTracker(a);let m=h.move("![");return m+=h.move(n.safe(e.alt,{before:m,after:"]",...h.current()})),m+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=n.enter(`title${l}`),m+=h.move(" "+s),m+=h.move(n.safe(e.title,{before:m,after:s,...h.current()})),m+=h.move(s),f()),m+=h.move(")"),u(),m}function Ez(){return"!"}uC.peek=Tz;function uC(e,t,n,a){const s=e.referenceType,l=n.enter("imageReference");let u=n.enter("label");const f=n.createTracker(a);let h=f.move("![");const m=n.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return u(),n.stack=p,l(),s==="full"||!m||m!==g?h+=f.move(g+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function Tz(){return"!"}cC.peek=vz;function cC(e,t,n){let a=e.value||"",s="`",l=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++l<n.unsafe.length;){const u=n.unsafe[l],f=n.compilePattern(u);let h;if(u.atBreak)for(;h=f.exec(a);){let m=h.index;a.charCodeAt(m)===10&&a.charCodeAt(m-1)===13&&m--,a=a.slice(0,m)+" "+a.slice(h.index+1)}}return s+a+s}function vz(){return"`"}function dC(e,t){const n=Zg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}fC.peek=Sz;function fC(e,t,n,a){const s=Kg(n),l=s==='"'?"Quote":"Apostrophe",u=n.createTracker(a);let f,h;if(dC(e,n)){const p=n.stack;n.stack=[],f=n.enter("autolink");let g=u.move("<");return g+=u.move(n.containerPhrasing(e,{before:g,after:">",...u.current()})),g+=u.move(">"),f(),n.stack=p,g}f=n.enter("link"),h=n.enter("label");let m=u.move("[");return m+=u.move(n.containerPhrasing(e,{before:m,after:"](",...u.current()})),m+=u.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),m+=u.move("<"),m+=u.move(n.safe(e.url,{before:m,after:">",...u.current()})),m+=u.move(">")):(h=n.enter("destinationRaw"),m+=u.move(n.safe(e.url,{before:m,after:e.title?" ":")",...u.current()}))),h(),e.title&&(h=n.enter(`title${l}`),m+=u.move(" "+s),m+=u.move(n.safe(e.title,{before:m,after:s,...u.current()})),m+=u.move(s),h()),m+=u.move(")"),f(),m}function Sz(e,t,n){return dC(e,n)?"<":"["}hC.peek=kz;function hC(e,t,n,a){const s=e.referenceType,l=n.enter("linkReference");let u=n.enter("label");const f=n.createTracker(a);let h=f.move("[");const m=n.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const g=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return u(),n.stack=p,l(),s==="full"||!m||m!==g?h+=f.move(g+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function kz(){return"["}function Jg(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Nz(e){const t=Jg(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Cz(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function mC(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function _z(e,t,n,a){const s=n.enter("list"),l=n.bulletCurrent;let u=e.ordered?Cz(n):Jg(n);const f=e.ordered?u==="."?")":".":Nz(n);let h=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(h=!0),mC(n)===u&&p){let g=-1;for(;++g<e.children.length;){const y=e.children[g];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(u=f),n.bulletCurrent=u;const m=n.containerFlow(e,a);return n.bulletLastUsed=u,n.bulletCurrent=l,s(),m}function Az(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function wz(e,t,n,a){const s=Az(n);let l=n.bulletCurrent||Jg(n);t&&t.type==="list"&&t.ordered&&(l=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+l);let u=l.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const f=n.createTracker(a);f.move(l+" ".repeat(u-l.length)),f.shift(u);const h=n.enter("listItem"),m=n.indentLines(n.containerFlow(e,f.current()),p);return h(),m;function p(g,y,T){return y?(T?"":" ".repeat(u))+g:(T?l:l+" ".repeat(u-l.length))+g}}function Rz(e,t,n,a){const s=n.enter("paragraph"),l=n.enter("phrasing"),u=n.containerPhrasing(e,a);return l(),s(),u}const Oz=Nf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Iz(e,t,n,a){return(e.children.some(function(u){return Oz(u)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function Dz(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}pC.peek=Lz;function pC(e,t,n,a){const s=Dz(n),l=n.enter("strong"),u=n.createTracker(a),f=u.move(s+s);let h=u.move(n.containerPhrasing(e,{after:s,before:f,...u.current()}));const m=h.charCodeAt(0),p=Kd(a.before.charCodeAt(a.before.length-1),m,s);p.inside&&(h=bu(m)+h.slice(1));const g=h.charCodeAt(h.length-1),y=Kd(a.after.charCodeAt(0),g,s);y.inside&&(h=h.slice(0,-1)+bu(g));const T=u.move(s+s);return l(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},f+h+T}function Lz(e,t,n){return n.options.strong||"*"}function jz(e,t,n,a){return n.safe(e.value,a)}function Mz(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Bz(e,t,n){const a=(mC(n)+(n.options.ruleSpaces?" ":"")).repeat(Mz(n));return n.options.ruleSpaces?a.slice(0,-1):a}const gC={blockquote:az,break:CT,code:cz,definition:fz,emphasis:iC,hardBreak:CT,heading:bz,html:lC,image:oC,imageReference:uC,inlineCode:cC,link:fC,linkReference:hC,list:_z,listItem:wz,paragraph:Rz,root:Iz,strong:pC,text:jz,thematicBreak:Bz},AT=document.createElement("i");function e1(e){const t="&"+e+";";AT.innerHTML=t;const n=AT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function xC(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const Pz=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zz(e){return e.replace(Pz,Hz)}function Hz(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),l=s===120||s===88;return xC(n.slice(l?2:1),l?16:10)}return e1(n)||e}function Uz(){return{enter:{table:Fz,tableData:wT,tableHeader:wT,tableRow:qz},exit:{codeText:Vz,table:$z,tableData:Om,tableHeader:Om,tableRow:Om}}}function Fz(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function $z(e){this.exit(e),this.data.inTable=void 0}function qz(e){this.enter({type:"tableRow",children:[]},e)}function Om(e){this.exit(e)}function wT(e){this.enter({type:"tableCell",children:[]},e)}function Vz(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Yz));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Yz(e,t){return t==="|"?t:e}function Gz(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,l=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
76
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:u,tableCell:h,tableRow:f}};function u(T,S,k,N){return m(p(T,k,N),T.align)}function f(T,S,k,N){const _=g(T,k,N),A=m([_]);return A.slice(0,A.indexOf(`
77
+ `))}function h(T,S,k,N){const _=k.enter("tableCell"),A=k.enter("phrasing"),w=k.containerPhrasing(T,{...N,before:l,after:l});return A(),_(),w}function m(T,S){return nz(T,{align:S,alignDelimiters:a,padding:n,stringLength:s})}function p(T,S,k){const N=T.children;let _=-1;const A=[],w=S.enter("table");for(;++_<N.length;)A[_]=g(N[_],S,k);return w(),A}function g(T,S,k){const N=T.children;let _=-1;const A=[],w=S.enter("tableRow");for(;++_<N.length;)A[_]=h(N[_],T,S,k);return w(),A}function y(T,S,k){let N=gC.inlineCode(T,S,k);return k.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function Xz(){return{exit:{taskListCheckValueChecked:RT,taskListCheckValueUnchecked:RT,paragraph:Wz}}}function Qz(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Kz}}}function RT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Wz(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const a=n.children[0];if(a&&a.type==="text"){const s=t.children;let l=-1,u;for(;++l<s.length;){const f=s[l];if(f.type==="paragraph"){u=f;break}}u===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function Kz(e,t,n,a){const s=e.children[0],l=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);l&&f.move(u);let h=gC.listItem(e,t,n,{...a,...f.current()});return l&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(p){return p+u}}function Zz(){return[NP(),YP(),WP(),Uz(),Xz()]}function Jz(e){return{extensions:[CP(),GP(e),KP(),Gz(e),Qz()]}}function lr(e,t,n,a){const s=e.length;let l=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)u=Array.from(a),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);l<a.length;)u=a.slice(l,l+1e4),u.unshift(t,0),e.splice(...u),l+=1e4,t+=1e4}function yr(e,t){return e.length>0?(lr(e,e.length,0,t),e):t}const OT={}.hasOwnProperty;function bC(e){const t={};let n=-1;for(;++n<e.length;)eH(t,e[n]);return t}function eH(e,t){let n;for(n in t){const s=(OT.call(e,n)?e[n]:void 0)||(e[n]={}),l=t[n];let u;if(l)for(u in l){OT.call(s,u)||(s[u]=[]);const f=l[u];tH(s[u],Array.isArray(f)?f:f?[f]:[])}}}function tH(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);lr(e,0,0,a)}const nH={tokenize:oH,partial:!0},yC={tokenize:uH,partial:!0},EC={tokenize:cH,partial:!0},TC={tokenize:dH,partial:!0},rH={tokenize:fH,partial:!0},vC={name:"wwwAutolink",tokenize:sH,previous:kC},SC={name:"protocolAutolink",tokenize:lH,previous:NC},Oa={name:"emailAutolink",tokenize:iH,previous:CC},ia={};function aH(){return{text:ia}}let Yi=48;for(;Yi<123;)ia[Yi]=Oa,Yi++,Yi===58?Yi=65:Yi===91&&(Yi=97);ia[43]=Oa;ia[45]=Oa;ia[46]=Oa;ia[95]=Oa;ia[72]=[Oa,SC];ia[104]=[Oa,SC];ia[87]=[Oa,vC];ia[119]=[Oa,vC];function iH(e,t,n){const a=this;let s,l;return u;function u(g){return!Op(g)||!CC.call(a,a.previous)||t1(a.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return Op(g)?(e.consume(g),f):g===64?(e.consume(g),h):n(g)}function h(g){return g===46?e.check(rH,p,m)(g):g===45||g===95||Cn(g)?(l=!0,e.consume(g),h):p(g)}function m(g){return e.consume(g),s=!0,h}function p(g){return l&&s&&In(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function sH(e,t,n){const a=this;return s;function s(u){return u!==87&&u!==119||!kC.call(a,a.previous)||t1(a.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(nH,e.attempt(yC,e.attempt(EC,l),n),n)(u))}function l(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function lH(e,t,n){const a=this;let s="",l=!1;return u;function u(g){return(g===72||g===104)&&NC.call(a,a.previous)&&!t1(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),f):n(g)}function f(g){if(In(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const y=s.toLowerCase();if(y==="http"||y==="https")return e.consume(g),h}return n(g)}function h(g){return g===47?(e.consume(g),l?m:(l=!0,h)):n(g)}function m(g){return g===null||Wd(g)||Rt(g)||ss(g)||Lf(g)?n(g):e.attempt(yC,e.attempt(EC,p),n)(g)}function p(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function oH(e,t,n){let a=0;return s;function s(u){return(u===87||u===119)&&a<3?(a++,e.consume(u),s):u===46&&a===3?(e.consume(u),l):n(u)}function l(u){return u===null?n(u):t(u)}}function uH(e,t,n){let a,s,l;return u;function u(m){return m===46||m===95?e.check(TC,h,f)(m):m===null||Rt(m)||ss(m)||m!==45&&Lf(m)?h(m):(l=!0,e.consume(m),u)}function f(m){return m===95?a=!0:(s=a,a=void 0),e.consume(m),u}function h(m){return s||a||!l?n(m):t(m)}}function cH(e,t){let n=0,a=0;return s;function s(u){return u===40?(n++,e.consume(u),s):u===41&&a<n?l(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(TC,t,l)(u):u===null||Rt(u)||ss(u)?t(u):(e.consume(u),s)}function l(u){return u===41&&a++,e.consume(u),s}}function dH(e,t,n){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),l):f===93?(e.consume(f),s):f===60||f===null||Rt(f)||ss(f)?t(f):n(f)}function s(f){return f===null||f===40||f===91||Rt(f)||ss(f)?t(f):a(f)}function l(f){return In(f)?u(f):n(f)}function u(f){return f===59?(e.consume(f),a):In(f)?(e.consume(f),u):n(f)}}function fH(e,t,n){return a;function a(l){return e.consume(l),s}function s(l){return Cn(l)?n(l):t(l)}}function kC(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Rt(e)}function NC(e){return!In(e)}function CC(e){return!(e===47||Op(e))}function Op(e){return e===43||e===45||e===46||e===95||Cn(e)}function t1(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Bl(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const l=e.charCodeAt(n);let u="";if(l===37&&Cn(e.charCodeAt(n+1))&&Cn(e.charCodeAt(n+2)))s=2;else if(l<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(l))||(u=String.fromCharCode(l));else if(l>55295&&l<57344){const f=e.charCodeAt(n+1);l<56320&&f>56319&&f<57344?(u=String.fromCharCode(l,f),s=1):u="�"}else u=String.fromCharCode(l);u&&(t.push(e.slice(a,n),encodeURIComponent(u)),a=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function jf(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const l=e[s].resolveAll;l&&!a.includes(l)&&(t=l(t,n),a.push(l))}return t}const Ip={name:"attention",resolveAll:hH,tokenize:mH};function hH(e,t){let n=-1,a,s,l,u,f,h,m,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[a][1].end},y={...e[n][1].start};IT(g,-h),IT(y,h),u={type:h>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},l={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:h>1?"strong":"emphasis",start:{...u.start},end:{...f.end}},e[a][1].end={...u.start},e[n][1].start={...f.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=yr(m,[["enter",e[a][1],t],["exit",e[a][1],t]])),m=yr(m,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",l,t]]),m=yr(m,jf(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),m=yr(m,[["exit",l,t],["enter",f,t],["exit",f,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,m=yr(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,lr(e,a-1,n-a+3,m),n=a+m.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function mH(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=kl(a);let l;return u;function u(h){return l=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===l)return e.consume(h),f;const m=e.exit("attentionSequence"),p=kl(h),g=!p||p===2&&s||n.includes(h),y=!s||s===2&&p||n.includes(a);return m._open=!!(l===42?g:g&&(s||!y)),m._close=!!(l===42?y:y&&(p||!g)),t(h)}}function IT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const pH={name:"autolink",tokenize:gH};function gH(e,t,n){let a=0;return s;function s(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),l}function l(T){return In(T)?(e.consume(T),u):T===64?n(T):m(T)}function u(T){return T===43||T===45||T===46||Cn(T)?(a=1,f(T)):m(T)}function f(T){return T===58?(e.consume(T),a=0,h):(T===43||T===45||T===46||Cn(T))&&a++<32?(e.consume(T),f):(a=0,m(T))}function h(T){return T===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):T===null||T===32||T===60||Wd(T)?n(T):(e.consume(T),h)}function m(T){return T===64?(e.consume(T),p):xP(T)?(e.consume(T),m):n(T)}function p(T){return Cn(T)?g(T):n(T)}function g(T){return T===46?(e.consume(T),a=0,p):T===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):y(T)}function y(T){if((T===45||Cn(T))&&a++<63){const S=T===45?y:g;return e.consume(T),S}return n(T)}}function ft(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let l=0;return u;function u(h){return st(h)?(e.enter(n),f(h)):t(h)}function f(h){return st(h)&&l++<s?(e.consume(h),f):(e.exit(n),t(h))}}const Lu={partial:!0,tokenize:xH};function xH(e,t,n){return a;function a(l){return st(l)?ft(e,s,"linePrefix")(l):s(l)}function s(l){return l===null||ze(l)?t(l):n(l)}}const _C={continuation:{tokenize:yH},exit:EH,name:"blockQuote",tokenize:bH};function bH(e,t,n){const a=this;return s;function s(u){if(u===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),l}return n(u)}function l(u){return st(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function yH(e,t,n){const a=this;return s;function s(u){return st(u)?ft(e,l,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):l(u)}function l(u){return e.attempt(_C,t,n)(u)}}function EH(e){e.exit("blockQuote")}const AC={name:"characterEscape",tokenize:TH};function TH(e,t,n){return a;function a(l){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(l),e.exit("escapeMarker"),s}function s(l){return yP(l)?(e.enter("characterEscapeValue"),e.consume(l),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(l)}}const wC={name:"characterReference",tokenize:vH};function vH(e,t,n){const a=this;let s=0,l,u;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),h}function h(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),l=31,u=Cn,p(g))}function m(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),l=6,u=bP,p):(e.enter("characterReferenceValue"),l=7,u=Rp,p(g))}function p(g){if(g===59&&s){const y=e.exit("characterReferenceValue");return u===Cn&&!e1(a.sliceSerialize(y))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(g)&&s++<l?(e.consume(g),p):n(g)}}const DT={partial:!0,tokenize:kH},LT={concrete:!0,name:"codeFenced",tokenize:SH};function SH(e,t,n){const a=this,s={partial:!0,tokenize:F};let l=0,u=0,f;return h;function h(M){return m(M)}function m(M){const I=a.events[a.events.length-1];return l=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,f=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(M)}function p(M){return M===f?(u++,e.consume(M),p):u<3?n(M):(e.exit("codeFencedFenceSequence"),st(M)?ft(e,g,"whitespace")(M):g(M))}function g(M){return M===null||ze(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(DT,k,P)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(M))}function y(M){return M===null||ze(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):st(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ft(e,T,"whitespace")(M)):M===96&&M===f?n(M):(e.consume(M),y)}function T(M){return M===null||ze(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(M))}function S(M){return M===null||ze(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===f?n(M):(e.consume(M),S)}function k(M){return e.attempt(s,P,N)(M)}function N(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),_}function _(M){return l>0&&st(M)?ft(e,A,"linePrefix",l+1)(M):A(M)}function A(M){return M===null||ze(M)?e.check(DT,k,P)(M):(e.enter("codeFlowValue"),w(M))}function w(M){return M===null||ze(M)?(e.exit("codeFlowValue"),A(M)):(e.consume(M),w)}function P(M){return e.exit("codeFenced"),t(M)}function F(M,I,j){let G=0;return B;function B(U){return M.enter("lineEnding"),M.consume(U),M.exit("lineEnding"),Q}function Q(U){return M.enter("codeFencedFence"),st(U)?ft(M,V,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):V(U)}function V(U){return U===f?(M.enter("codeFencedFenceSequence"),te(U)):j(U)}function te(U){return U===f?(G++,M.consume(U),te):G>=u?(M.exit("codeFencedFenceSequence"),st(U)?ft(M,ee,"whitespace")(U):ee(U)):j(U)}function ee(U){return U===null||ze(U)?(M.exit("codeFencedFence"),I(U)):j(U)}}}function kH(e,t,n){const a=this;return s;function s(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l)}function l(u){return a.parser.lazy[a.now().line]?n(u):t(u)}}const Im={name:"codeIndented",tokenize:CH},NH={partial:!0,tokenize:_H};function CH(e,t,n){const a=this;return s;function s(m){return e.enter("codeIndented"),ft(e,l,"linePrefix",5)(m)}function l(m){const p=a.events[a.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(m):n(m)}function u(m){return m===null?h(m):ze(m)?e.attempt(NH,u,h)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||ze(m)?(e.exit("codeFlowValue"),u(m)):(e.consume(m),f)}function h(m){return e.exit("codeIndented"),t(m)}}function _H(e,t,n){const a=this;return s;function s(u){return a.parser.lazy[a.now().line]?n(u):ze(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):ft(e,l,"linePrefix",5)(u)}function l(u){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):ze(u)?s(u):n(u)}}const AH={name:"codeText",previous:RH,resolve:wH,tokenize:OH};function wH(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function RH(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function OH(e,t,n){let a=0,s,l;return u;function u(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),a++,f):(e.exit("codeTextSequence"),h(g))}function h(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),h):g===96?(l=e.enter("codeTextSequence"),s=0,p(g)):ze(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("codeTextData"),m(g))}function m(g){return g===null||g===32||g===96||ze(g)?(e.exit("codeTextData"),h(g)):(e.consume(g),m)}function p(g){return g===96?(e.consume(g),s++,p):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(l.type="codeTextData",m(g))}}class IH{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const l=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Bo(this.left,a),l.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Bo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Bo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Bo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Bo(this.left,n.reverse())}}}function Bo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function RC(e){const t={};let n=-1,a,s,l,u,f,h,m;const p=new IH(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(a=p.get(n),n&&a[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,l=0,l<h.length&&h[l][1].type==="lineEndingBlank"&&(l+=2),l<h.length&&h[l][1].type==="content"))for(;++l<h.length&&h[l][1].type!=="content";)h[l][1].type==="chunkText"&&(h[l][1]._isInFirstContentOfListItem=!0,l++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,DH(p,n)),n=t[n],m=!0);else if(a[1]._container){for(l=n,s=void 0;l--;)if(u=p.get(l),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=l);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(a[1].end={...p.get(s)[1].start},f=p.slice(s,n),f.unshift(a),p.splice(s,n-s+1,f))}}return lr(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!m}function DH(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const l=[];let u=n._tokenizer;u||(u=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const f=u.events,h=[],m={};let p,g,y=-1,T=n,S=0,k=0;const N=[k];for(;T;){for(;e.get(++s)[1]!==T;);l.push(s),T._tokenizer||(p=a.sliceStream(T),T.next||p.push(null),g&&u.defineSkip(T.start),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),g=T,T=T.next}for(T=n;++y<f.length;)f[y][0]==="exit"&&f[y-1][0]==="enter"&&f[y][1].type===f[y-1][1].type&&f[y][1].start.line!==f[y][1].end.line&&(k=y+1,N.push(k),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(u.events=[],T?(T._tokenizer=void 0,T.previous=void 0):N.pop(),y=N.length;y--;){const _=f.slice(N[y],N[y+1]),A=l.pop();h.push([A,A+_.length-1]),e.splice(A,2,_)}for(h.reverse(),y=-1;++y<h.length;)m[S+h[y][0]]=S+h[y][1],S+=h[y][1]-h[y][0]-1;return m}const LH={resolve:MH,tokenize:BH},jH={partial:!0,tokenize:PH};function MH(e){return RC(e),e}function BH(e,t){let n;return a;function a(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?l(f):ze(f)?e.check(jH,u,l)(f):(e.consume(f),s)}function l(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function u(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function PH(e,t,n){const a=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ft(e,l,"linePrefix")}function l(u){if(u===null||ze(u))return n(u);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(u):e.interrupt(a.parser.constructs.flow,n,t)(u)}}function OC(e,t,n,a,s,l,u,f,h){const m=h||Number.POSITIVE_INFINITY;let p=0;return g;function g(_){return _===60?(e.enter(a),e.enter(s),e.enter(l),e.consume(_),e.exit(l),y):_===null||_===32||_===41||Wd(_)?n(_):(e.enter(a),e.enter(u),e.enter(f),e.enter("chunkString",{contentType:"string"}),k(_))}function y(_){return _===62?(e.enter(l),e.consume(_),e.exit(l),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),T(_))}function T(_){return _===62?(e.exit("chunkString"),e.exit(f),y(_)):_===null||_===60||ze(_)?n(_):(e.consume(_),_===92?S:T)}function S(_){return _===60||_===62||_===92?(e.consume(_),T):T(_)}function k(_){return!p&&(_===null||_===41||Rt(_))?(e.exit("chunkString"),e.exit(f),e.exit(u),e.exit(a),t(_)):p<m&&_===40?(e.consume(_),p++,k):_===41?(e.consume(_),p--,k):_===null||_===32||_===40||Wd(_)?n(_):(e.consume(_),_===92?N:k)}function N(_){return _===40||_===41||_===92?(e.consume(_),k):k(_)}}function IC(e,t,n,a,s,l){const u=this;let f=0,h;return m;function m(T){return e.enter(a),e.enter(s),e.consume(T),e.exit(s),e.enter(l),p}function p(T){return f>999||T===null||T===91||T===93&&!h||T===94&&!f&&"_hiddenFootnoteSupport"in u.parser.constructs?n(T):T===93?(e.exit(l),e.enter(s),e.consume(T),e.exit(s),e.exit(a),t):ze(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),g(T))}function g(T){return T===null||T===91||T===93||ze(T)||f++>999?(e.exit("chunkString"),p(T)):(e.consume(T),h||(h=!st(T)),T===92?y:g)}function y(T){return T===91||T===92||T===93?(e.consume(T),f++,g):g(T)}}function DC(e,t,n,a,s,l){let u;return f;function f(y){return y===34||y===39||y===40?(e.enter(a),e.enter(s),e.consume(y),e.exit(s),u=y===40?41:y,h):n(y)}function h(y){return y===u?(e.enter(s),e.consume(y),e.exit(s),e.exit(a),t):(e.enter(l),m(y))}function m(y){return y===u?(e.exit(l),h(u)):y===null?n(y):ze(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),ft(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===u||y===null||ze(y)?(e.exit("chunkString"),m(y)):(e.consume(y),y===92?g:p)}function g(y){return y===u||y===92?(e.consume(y),p):p(y)}}function nu(e,t){let n;return a;function a(s){return ze(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):st(s)?ft(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const zH={name:"definition",tokenize:UH},HH={partial:!0,tokenize:FH};function UH(e,t,n){const a=this;let s;return l;function l(T){return e.enter("definition"),u(T)}function u(T){return IC.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function f(T){return s=jr(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),h):n(T)}function h(T){return Rt(T)?nu(e,m)(T):m(T)}function m(T){return OC(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function p(T){return e.attempt(HH,g,g)(T)}function g(T){return st(T)?ft(e,y,"whitespace")(T):y(T)}function y(T){return T===null||ze(T)?(e.exit("definition"),a.parser.defined.push(s),t(T)):n(T)}}function FH(e,t,n){return a;function a(f){return Rt(f)?nu(e,s)(f):n(f)}function s(f){return DC(e,l,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function l(f){return st(f)?ft(e,u,"whitespace")(f):u(f)}function u(f){return f===null||ze(f)?t(f):n(f)}}const $H={name:"hardBreakEscape",tokenize:qH};function qH(e,t,n){return a;function a(l){return e.enter("hardBreakEscape"),e.consume(l),s}function s(l){return ze(l)?(e.exit("hardBreakEscape"),t(l)):n(l)}}const VH={name:"headingAtx",resolve:YH,tokenize:GH};function YH(e,t){let n=e.length-2,a=3,s,l;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},l={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},lr(e,a,n-a+1,[["enter",s,t],["enter",l,t],["exit",l,t],["exit",s,t]])),e}function GH(e,t,n){let a=0;return s;function s(p){return e.enter("atxHeading"),l(p)}function l(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&a++<6?(e.consume(p),u):p===null||Rt(p)?(e.exit("atxHeadingSequence"),f(p)):n(p)}function f(p){return p===35?(e.enter("atxHeadingSequence"),h(p)):p===null||ze(p)?(e.exit("atxHeading"),t(p)):st(p)?ft(e,f,"whitespace")(p):(e.enter("atxHeadingText"),m(p))}function h(p){return p===35?(e.consume(p),h):(e.exit("atxHeadingSequence"),f(p))}function m(p){return p===null||p===35||Rt(p)?(e.exit("atxHeadingText"),f(p)):(e.consume(p),m)}}const XH=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],jT=["pre","script","style","textarea"],QH={concrete:!0,name:"htmlFlow",resolveTo:ZH,tokenize:JH},WH={partial:!0,tokenize:tU},KH={partial:!0,tokenize:eU};function ZH(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function JH(e,t,n){const a=this;let s,l,u,f,h;return m;function m(L){return p(L)}function p(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),g}function g(L){return L===33?(e.consume(L),y):L===47?(e.consume(L),l=!0,k):L===63?(e.consume(L),s=3,a.interrupt?t:O):In(L)?(e.consume(L),u=String.fromCharCode(L),N):n(L)}function y(L){return L===45?(e.consume(L),s=2,T):L===91?(e.consume(L),s=5,f=0,S):In(L)?(e.consume(L),s=4,a.interrupt?t:O):n(L)}function T(L){return L===45?(e.consume(L),a.interrupt?t:O):n(L)}function S(L){const fe="CDATA[";return L===fe.charCodeAt(f++)?(e.consume(L),f===fe.length?a.interrupt?t:V:S):n(L)}function k(L){return In(L)?(e.consume(L),u=String.fromCharCode(L),N):n(L)}function N(L){if(L===null||L===47||L===62||Rt(L)){const fe=L===47,Ne=u.toLowerCase();return!fe&&!l&&jT.includes(Ne)?(s=1,a.interrupt?t(L):V(L)):XH.includes(u.toLowerCase())?(s=6,fe?(e.consume(L),_):a.interrupt?t(L):V(L)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(L):l?A(L):w(L))}return L===45||Cn(L)?(e.consume(L),u+=String.fromCharCode(L),N):n(L)}function _(L){return L===62?(e.consume(L),a.interrupt?t:V):n(L)}function A(L){return st(L)?(e.consume(L),A):B(L)}function w(L){return L===47?(e.consume(L),B):L===58||L===95||In(L)?(e.consume(L),P):st(L)?(e.consume(L),w):B(L)}function P(L){return L===45||L===46||L===58||L===95||Cn(L)?(e.consume(L),P):F(L)}function F(L){return L===61?(e.consume(L),M):st(L)?(e.consume(L),F):w(L)}function M(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),h=L,I):st(L)?(e.consume(L),M):j(L)}function I(L){return L===h?(e.consume(L),h=null,G):L===null||ze(L)?n(L):(e.consume(L),I)}function j(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||Rt(L)?F(L):(e.consume(L),j)}function G(L){return L===47||L===62||st(L)?w(L):n(L)}function B(L){return L===62?(e.consume(L),Q):n(L)}function Q(L){return L===null||ze(L)?V(L):st(L)?(e.consume(L),Q):n(L)}function V(L){return L===45&&s===2?(e.consume(L),R):L===60&&s===1?(e.consume(L),q):L===62&&s===4?(e.consume(L),H):L===63&&s===3?(e.consume(L),O):L===93&&s===5?(e.consume(L),he):ze(L)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(WH,Z,te)(L)):L===null||ze(L)?(e.exit("htmlFlowData"),te(L)):(e.consume(L),V)}function te(L){return e.check(KH,ee,Z)(L)}function ee(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),U}function U(L){return L===null||ze(L)?te(L):(e.enter("htmlFlowData"),V(L))}function R(L){return L===45?(e.consume(L),O):V(L)}function q(L){return L===47?(e.consume(L),u="",W):V(L)}function W(L){if(L===62){const fe=u.toLowerCase();return jT.includes(fe)?(e.consume(L),H):V(L)}return In(L)&&u.length<8?(e.consume(L),u+=String.fromCharCode(L),W):V(L)}function he(L){return L===93?(e.consume(L),O):V(L)}function O(L){return L===62?(e.consume(L),H):L===45&&s===2?(e.consume(L),O):V(L)}function H(L){return L===null||ze(L)?(e.exit("htmlFlowData"),Z(L)):(e.consume(L),H)}function Z(L){return e.exit("htmlFlow"),t(L)}}function eU(e,t,n){const a=this;return s;function s(u){return ze(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):n(u)}function l(u){return a.parser.lazy[a.now().line]?n(u):t(u)}}function tU(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Lu,t,n)}}const nU={name:"htmlText",tokenize:rU};function rU(e,t,n){const a=this;let s,l,u;return f;function f(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),h}function h(O){return O===33?(e.consume(O),m):O===47?(e.consume(O),F):O===63?(e.consume(O),w):In(O)?(e.consume(O),j):n(O)}function m(O){return O===45?(e.consume(O),p):O===91?(e.consume(O),l=0,S):In(O)?(e.consume(O),A):n(O)}function p(O){return O===45?(e.consume(O),T):n(O)}function g(O){return O===null?n(O):O===45?(e.consume(O),y):ze(O)?(u=g,q(O)):(e.consume(O),g)}function y(O){return O===45?(e.consume(O),T):g(O)}function T(O){return O===62?R(O):O===45?y(O):g(O)}function S(O){const H="CDATA[";return O===H.charCodeAt(l++)?(e.consume(O),l===H.length?k:S):n(O)}function k(O){return O===null?n(O):O===93?(e.consume(O),N):ze(O)?(u=k,q(O)):(e.consume(O),k)}function N(O){return O===93?(e.consume(O),_):k(O)}function _(O){return O===62?R(O):O===93?(e.consume(O),_):k(O)}function A(O){return O===null||O===62?R(O):ze(O)?(u=A,q(O)):(e.consume(O),A)}function w(O){return O===null?n(O):O===63?(e.consume(O),P):ze(O)?(u=w,q(O)):(e.consume(O),w)}function P(O){return O===62?R(O):w(O)}function F(O){return In(O)?(e.consume(O),M):n(O)}function M(O){return O===45||Cn(O)?(e.consume(O),M):I(O)}function I(O){return ze(O)?(u=I,q(O)):st(O)?(e.consume(O),I):R(O)}function j(O){return O===45||Cn(O)?(e.consume(O),j):O===47||O===62||Rt(O)?G(O):n(O)}function G(O){return O===47?(e.consume(O),R):O===58||O===95||In(O)?(e.consume(O),B):ze(O)?(u=G,q(O)):st(O)?(e.consume(O),G):R(O)}function B(O){return O===45||O===46||O===58||O===95||Cn(O)?(e.consume(O),B):Q(O)}function Q(O){return O===61?(e.consume(O),V):ze(O)?(u=Q,q(O)):st(O)?(e.consume(O),Q):G(O)}function V(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,te):ze(O)?(u=V,q(O)):st(O)?(e.consume(O),V):(e.consume(O),ee)}function te(O){return O===s?(e.consume(O),s=void 0,U):O===null?n(O):ze(O)?(u=te,q(O)):(e.consume(O),te)}function ee(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||Rt(O)?G(O):(e.consume(O),ee)}function U(O){return O===47||O===62||Rt(O)?G(O):n(O)}function R(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function q(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),W}function W(O){return st(O)?ft(e,he,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):he(O)}function he(O){return e.enter("htmlTextData"),u(O)}}const n1={name:"labelEnd",resolveAll:lU,resolveTo:oU,tokenize:uU},aU={tokenize:cU},iU={tokenize:dU},sU={tokenize:fU};function lU(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&lr(e,0,e.length,n),e}function oU(e,t){let n=e.length,a=0,s,l,u,f;for(;n--;)if(s=e[n][1],l){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(l=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(u=n);const h={type:e[l][1].type==="labelLink"?"link":"image",start:{...e[l][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[l][1].start},end:{...e[u][1].end}},p={type:"labelText",start:{...e[l+a+2][1].end},end:{...e[u-2][1].start}};return f=[["enter",h,t],["enter",m,t]],f=yr(f,e.slice(l+1,l+a+3)),f=yr(f,[["enter",p,t]]),f=yr(f,jf(t.parser.constructs.insideSpan.null,e.slice(l+a+4,u-3),t)),f=yr(f,[["exit",p,t],e[u-2],e[u-1],["exit",m,t]]),f=yr(f,e.slice(u+1)),f=yr(f,[["exit",h,t]]),lr(e,l,e.length,f),e}function uU(e,t,n){const a=this;let s=a.events.length,l,u;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){l=a.events[s][1];break}return f;function f(y){return l?l._inactive?g(y):(u=a.parser.defined.includes(jr(a.sliceSerialize({start:l.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),h):n(y)}function h(y){return y===40?e.attempt(aU,p,u?p:g)(y):y===91?e.attempt(iU,p,u?m:g)(y):u?p(y):g(y)}function m(y){return e.attempt(sU,p,g)(y)}function p(y){return t(y)}function g(y){return l._balanced=!0,n(y)}}function cU(e,t,n){return a;function a(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return Rt(g)?nu(e,l)(g):l(g)}function l(g){return g===41?p(g):OC(e,u,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function u(g){return Rt(g)?nu(e,h)(g):p(g)}function f(g){return n(g)}function h(g){return g===34||g===39||g===40?DC(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):p(g)}function m(g){return Rt(g)?nu(e,p)(g):p(g)}function p(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function dU(e,t,n){const a=this;return s;function s(f){return IC.call(a,e,l,u,"reference","referenceMarker","referenceString")(f)}function l(f){return a.parser.defined.includes(jr(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function u(f){return n(f)}}function fU(e,t,n){return a;function a(l){return e.enter("reference"),e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),s}function s(l){return l===93?(e.enter("referenceMarker"),e.consume(l),e.exit("referenceMarker"),e.exit("reference"),t):n(l)}}const hU={name:"labelStartImage",resolveAll:n1.resolveAll,tokenize:mU};function mU(e,t,n){const a=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),l}function l(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),u):n(f)}function u(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const pU={name:"labelStartLink",resolveAll:n1.resolveAll,tokenize:gU};function gU(e,t,n){const a=this;return s;function s(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),l}function l(u){return u===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(u):t(u)}}const Dm={name:"lineEnding",tokenize:xU};function xU(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ft(e,t,"linePrefix")}}const wd={name:"thematicBreak",tokenize:bU};function bU(e,t,n){let a=0,s;return l;function l(m){return e.enter("thematicBreak"),u(m)}function u(m){return s=m,f(m)}function f(m){return m===s?(e.enter("thematicBreakSequence"),h(m)):a>=3&&(m===null||ze(m))?(e.exit("thematicBreak"),t(m)):n(m)}function h(m){return m===s?(e.consume(m),a++,h):(e.exit("thematicBreakSequence"),st(m)?ft(e,f,"whitespace")(m):f(m))}}const Vn={continuation:{tokenize:vU},exit:kU,name:"list",tokenize:TU},yU={partial:!0,tokenize:NU},EU={partial:!0,tokenize:SU};function TU(e,t,n){const a=this,s=a.events[a.events.length-1];let l=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return f;function f(T){const S=a.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||T===a.containerState.marker:Rp(T)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(wd,n,m)(T):m(T);if(!a.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(T)}return n(T)}function h(T){return Rp(T)&&++u<10?(e.consume(T),h):(!a.interrupt||u<2)&&(a.containerState.marker?T===a.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),m(T)):n(T)}function m(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||T,e.check(Lu,a.interrupt?n:p,e.attempt(yU,y,g))}function p(T){return a.containerState.initialBlankLine=!0,l++,y(T)}function g(T){return st(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),y):n(T)}function y(T){return a.containerState.size=l+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function vU(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Lu,s,l);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,ft(e,t,"listItemIndent",a.containerState.size+1)(f)}function l(f){return a.containerState.furtherBlankLines||!st(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,u(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(EU,t,u)(f))}function u(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,ft(e,e.attempt(Vn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function SU(e,t,n){const a=this;return ft(e,s,"listItemIndent",a.containerState.size+1);function s(l){const u=a.events[a.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===a.containerState.size?t(l):n(l)}}function kU(e){e.exit(this.containerState.type)}function NU(e,t,n){const a=this;return ft(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(l){const u=a.events[a.events.length-1];return!st(l)&&u&&u[1].type==="listItemPrefixWhitespace"?t(l):n(l)}}const MT={name:"setextUnderline",resolveTo:CU,tokenize:_U};function CU(e,t){let n=e.length,a,s,l;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!l&&e[n][1].type==="definition"&&(l=n);const u={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",l?(e.splice(s,0,["enter",u,t]),e.splice(l+1,0,["exit",e[a][1],t]),e[a][1].end={...e[l][1].end}):e[a][1]=u,e.push(["exit",u,t]),e}function _U(e,t,n){const a=this;let s;return l;function l(m){let p=a.events.length,g;for(;p--;)if(a.events[p][1].type!=="lineEnding"&&a.events[p][1].type!=="linePrefix"&&a.events[p][1].type!=="content"){g=a.events[p][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),s=m,u(m)):n(m)}function u(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===s?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),st(m)?ft(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||ze(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const AU={tokenize:MU,partial:!0};function wU(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:DU,continuation:{tokenize:LU},exit:jU}},text:{91:{name:"gfmFootnoteCall",tokenize:IU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:RU,resolveTo:OU}}}}function RU(e,t,n){const a=this;let s=a.events.length;const l=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u;for(;s--;){const h=a.events[s][1];if(h.type==="labelImage"){u=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!u||!u._balanced)return n(h);const m=jr(a.sliceSerialize({start:u.end,end:a.now()}));return m.codePointAt(0)!==94||!l.includes(m.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function OU(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const l={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},l.start),end:Object.assign({},l.end)},f=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",l,t],["enter",u,t],["exit",u,t],["exit",l,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...f),e}function IU(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l=0,u;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),h}function h(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(g){if(l>999||g===93&&!u||g===null||g===91||Rt(g))return n(g);if(g===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return s.includes(jr(a.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return Rt(g)||(u=!0),l++,e.consume(g),g===92?p:m}function p(g){return g===91||g===92||g===93?(e.consume(g),l++,m):m(g)}}function DU(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let l,u=0,f;return h;function h(S){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(S){return S===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(S)}function p(S){if(u>999||S===93&&!f||S===null||S===91||Rt(S))return n(S);if(S===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return l=jr(a.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(S),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Rt(S)||(f=!0),u++,e.consume(S),S===92?g:p}function g(S){return S===91||S===92||S===93?(e.consume(S),u++,p):p(S)}function y(S){return S===58?(e.enter("definitionMarker"),e.consume(S),e.exit("definitionMarker"),s.includes(l)||s.push(l),ft(e,T,"gfmFootnoteDefinitionWhitespace")):n(S)}function T(S){return t(S)}}function LU(e,t,n){return e.check(Lu,t,e.attempt(AU,t,n))}function jU(e){e.exit("gfmFootnoteDefinition")}function MU(e,t,n){const a=this;return ft(e,s,"gfmFootnoteDefinitionIndent",5);function s(l){const u=a.events[a.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(l):n(l)}}function BU(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:l,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(u,f){let h=-1;for(;++h<u.length;)if(u[h][0]==="enter"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._close){let m=h;for(;m--;)if(u[m][0]==="exit"&&u[m][1].type==="strikethroughSequenceTemporary"&&u[m][1]._open&&u[h][1].end.offset-u[h][1].start.offset===u[m][1].end.offset-u[m][1].start.offset){u[h][1].type="strikethroughSequence",u[m][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[m][1].start),end:Object.assign({},u[h][1].end)},g={type:"strikethroughText",start:Object.assign({},u[m][1].end),end:Object.assign({},u[h][1].start)},y=[["enter",p,f],["enter",u[m][1],f],["exit",u[m][1],f],["enter",g,f]],T=f.parser.constructs.insideSpan.null;T&&lr(y,y.length,0,jf(T,u.slice(m+1,h),f)),lr(y,y.length,0,[["exit",g,f],["enter",u[h][1],f],["exit",u[h][1],f],["exit",p,f]]),lr(u,m-1,h-m+3,y),h=m+y.length-2;break}}for(h=-1;++h<u.length;)u[h][1].type==="strikethroughSequenceTemporary"&&(u[h][1].type="data");return u}function l(u,f,h){const m=this.previous,p=this.events;let g=0;return y;function y(S){return m===126&&p[p.length-1][1].type!=="characterEscape"?h(S):(u.enter("strikethroughSequenceTemporary"),T(S))}function T(S){const k=kl(m);if(S===126)return g>1?h(S):(u.consume(S),g++,T);if(g<2&&!n)return h(S);const N=u.exit("strikethroughSequenceTemporary"),_=kl(S);return N._open=!_||_===2&&!!k,N._close=!k||k===2&&!!_,f(S)}}}class PU{constructor(){this.map=[]}add(t,n,a){zU(this,t,n,a)}consume(t){if(this.map.sort(function(l,u){return l[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const l of s)t.push(l);s=a.pop()}this.map.length=0}}function zU(e,t,n,a){let s=0;if(!(n===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...a);return}s+=1}e.map.push([t,n,a])}}function HU(e,t){let n=!1;const a=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const l=a.length-1;a[l]=a[l]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function UU(){return{flow:{null:{name:"table",tokenize:FU,resolveAll:$U}}}}function FU(e,t,n){const a=this;let s=0,l=0,u;return f;function f(B){let Q=a.events.length-1;for(;Q>-1;){const ee=a.events[Q][1].type;if(ee==="lineEnding"||ee==="linePrefix")Q--;else break}const V=Q>-1?a.events[Q][1].type:null,te=V==="tableHead"||V==="tableRow"?M:h;return te===M&&a.parser.lazy[a.now().line]?n(B):te(B)}function h(B){return e.enter("tableHead"),e.enter("tableRow"),m(B)}function m(B){return B===124||(u=!0,l+=1),p(B)}function p(B){return B===null?n(B):ze(B)?l>1?(l=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),T):n(B):st(B)?ft(e,p,"whitespace")(B):(l+=1,u&&(u=!1,s+=1),B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),g(B)))}function g(B){return B===null||B===124||Rt(B)?(e.exit("data"),p(B)):(e.consume(B),B===92?y:g)}function y(B){return B===92||B===124?(e.consume(B),g):g(B)}function T(B){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(B):(e.enter("tableDelimiterRow"),u=!1,st(B)?ft(e,S,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):S(B))}function S(B){return B===45||B===58?N(B):B===124?(u=!0,e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),k):F(B)}function k(B){return st(B)?ft(e,N,"whitespace")(B):N(B)}function N(B){return B===58?(l+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),_):B===45?(l+=1,_(B)):B===null||ze(B)?P(B):F(B)}function _(B){return B===45?(e.enter("tableDelimiterFiller"),A(B)):F(B)}function A(B){return B===45?(e.consume(B),A):B===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(B),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(B))}function w(B){return st(B)?ft(e,P,"whitespace")(B):P(B)}function P(B){return B===124?S(B):B===null||ze(B)?!u||s!==l?F(B):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(B)):F(B)}function F(B){return n(B)}function M(B){return e.enter("tableRow"),I(B)}function I(B){return B===124?(e.enter("tableCellDivider"),e.consume(B),e.exit("tableCellDivider"),I):B===null||ze(B)?(e.exit("tableRow"),t(B)):st(B)?ft(e,I,"whitespace")(B):(e.enter("data"),j(B))}function j(B){return B===null||B===124||Rt(B)?(e.exit("data"),I(B)):(e.consume(B),B===92?G:j)}function G(B){return B===92||B===124?(e.consume(B),j):j(B)}}function $U(e,t){let n=-1,a=!0,s=0,l=[0,0,0,0],u=[0,0,0,0],f=!1,h=0,m,p,g;const y=new PU;for(;++n<e.length;){const T=e[n],S=T[1];T[0]==="enter"?S.type==="tableHead"?(f=!1,h!==0&&(BT(y,t,h,m,p),p=void 0,h=0),m={type:"table",start:Object.assign({},S.start),end:Object.assign({},S.end)},y.add(n,0,[["enter",m,t]])):S.type==="tableRow"||S.type==="tableDelimiterRow"?(a=!0,g=void 0,l=[0,0,0,0],u=[0,n+1,0,0],f&&(f=!1,p={type:"tableBody",start:Object.assign({},S.start),end:Object.assign({},S.end)},y.add(n,0,[["enter",p,t]])),s=S.type==="tableDelimiterRow"?2:p?3:1):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")?(a=!1,u[2]===0&&(l[1]!==0&&(u[0]=u[1],g=gd(y,t,l,s,void 0,g),l=[0,0,0,0]),u[2]=n)):S.type==="tableCellDivider"&&(a?a=!1:(l[1]!==0&&(u[0]=u[1],g=gd(y,t,l,s,void 0,g)),l=u,u=[l[1],n,0,0])):S.type==="tableHead"?(f=!0,h=n):S.type==="tableRow"||S.type==="tableDelimiterRow"?(h=n,l[1]!==0?(u[0]=u[1],g=gd(y,t,l,s,n,g)):u[1]!==0&&(g=gd(y,t,u,s,n,g)),s=0):s&&(S.type==="data"||S.type==="tableDelimiterMarker"||S.type==="tableDelimiterFiller")&&(u[3]=n)}for(h!==0&&BT(y,t,h,m,p),y.consume(t.events),n=-1;++n<t.events.length;){const T=t.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=HU(t.events,n))}return e}function gd(e,t,n,a,s,l){const u=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(l.end=Object.assign({},ol(t.events,n[0])),e.add(n[0],0,[["exit",l,t]]));const h=ol(t.events,n[1]);if(l={type:u,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",l,t]]),n[2]!==0){const m=ol(t.events,n[2]),p=ol(t.events,n[3]),g={type:f,start:Object.assign({},m),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",g,t]]),a!==2){const y=t.events[n[2]],T=t.events[n[3]];if(y[1].end=Object.assign({},T[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const S=n[2]+1,k=n[3]-n[2]-1;e.add(S,k,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return s!==void 0&&(l.end=Object.assign({},ol(t.events,s)),e.add(s,0,[["exit",l,t]]),l=void 0),l}function BT(e,t,n,a,s){const l=[],u=ol(t.events,n);s&&(s.end=Object.assign({},u),l.push(["exit",s,t])),a.end=Object.assign({},u),l.push(["exit",a,t]),e.add(n+1,0,l)}function ol(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const qU={name:"tasklistCheck",tokenize:YU};function VU(){return{text:{91:qU}}}function YU(e,t,n){const a=this;return s;function s(h){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),l)}function l(h){return Rt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),u):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),u):n(h)}function u(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(h)}function f(h){return ze(h)?t(h):st(h)?e.check({tokenize:GU},t,n)(h):n(h)}}function GU(e,t,n){return ft(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function XU(e){return bC([aH(),wU(),BU(e),UU(),VU()])}const QU={};function WU(e){const t=this,n=e||QU,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),l=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),u=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(XU(n)),l.push(Zz()),u.push(Jz(n))}var KU=Object.defineProperty,ZU=Object.defineProperties,JU=Object.getOwnPropertyDescriptors,PT=Object.getOwnPropertySymbols,eF=Object.prototype.hasOwnProperty,tF=Object.prototype.propertyIsEnumerable,zT=(e,t,n)=>t in e?KU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,LC=(e,t)=>{for(var n in t||(t={}))eF.call(t,n)&&zT(e,n,t[n]);if(PT)for(var n of PT(t))tF.call(t,n)&&zT(e,n,t[n]);return e},jC=(e,t)=>ZU(e,JU(t)),nF=/(\*\*)([^*]*\*?)$/,rF=/(__)([^_]*?)$/,aF=/(\*\*\*)([^*]*?)$/,iF=/(\*)([^*]*?)$/,sF=/(_)([^_]*?)$/,lF=/(`)([^`]*?)$/,oF=/(~~)([^~]*?)$/,hs=/^[\s_~*`]*$/,MC=/^[\s]*[-*+][\s]+$/,uF=/[\p{L}\p{N}_]/u,cF=/^```[^`\n]*```?$/,dF=/^\*{4,}$/,fF=/(__)([^_]+)_$/,hF=/(~~)([^~]+)~$/,HT=/~~/g,xi=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:uF.test(e)},yu=(e,t)=>{let n=!1;for(let a=0;a<t;a+=1)e[a]==="`"&&e[a+1]==="`"&&e[a+2]==="`"&&(n=!n,a+=2);return n},mF=(e,t)=>{let n=1;for(let a=t-1;a>=0;a-=1)if(e[a]==="]")n+=1;else if(e[a]==="["&&(n-=1,n===0))return a;return-1},BC=(e,t)=>{let n=1;for(let a=t+1;a<e.length;a+=1)if(e[a]==="[")n+=1;else if(e[a]==="]"&&(n-=1,n===0))return a;return-1},Mf=(e,t)=>{let n=!1,a=!1;for(let s=0;s<e.length&&s<t;s+=1){if(e[s]==="\\"&&e[s+1]==="$"){s+=1;continue}e[s]==="$"&&(e[s+1]==="$"?(a=!a,s+=1,n=!1):a||(n=!n))}return n||a},pF=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
78
+ `)return!1}return!1},PC=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?pF(e,t):!1;if(e[n]===`
79
+ `)return!1}return!1},gF=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let a=n+1<e.length?e[n+1]:"";return a>="a"&&a<="z"||a>="A"&&a<="Z"||a==="/"}if(e[n]===`
80
+ `)return!1}return!1},r1=(e,t,n)=>{let a=0;for(let h=t-1;h>=0;h-=1)if(e[h]===`
81
+ `){a=h+1;break}let s=e.length;for(let h=t;h<e.length;h+=1)if(e[h]===`
82
+ `){s=h;break}let l=e.substring(a,s),u=0,f=!1;for(let h of l)if(h===n)u+=1;else if(h!==" "&&h!==" "){f=!0;break}return u>=3&&!f},xF=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,bF=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(xF,(t,n,a,s)=>yu(e,s)?t:`${n}\\>${a}`),yF=(e,t,n,a)=>n==="\\"||e.includes("$")&&Mf(e,t)?!0:n!=="*"&&a==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&a&&xi(n)&&xi(a)||(!n||n===" "||n===" "||n===`
83
+ `)&&(!a||a===" "||a===" "||a===`
84
+ `)),zC=e=>{let t=0,n=!1,a=e.length;for(let s=0;s<a;s+=1){if(e[s]==="`"&&s+2<a&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="*")continue;let l=s>0?e[s-1]:"",u=s<a-1?e[s+1]:"";yF(e,s,l,u)||(t+=1)}return t},EF=(e,t,n,a)=>!!(n==="\\"||e.includes("$")&&Mf(e,t)||PC(e,t)||gF(e,t)||n==="_"||a==="_"||n&&a&&xi(n)&&xi(a)),TF=e=>{let t=0,n=!1,a=e.length;for(let s=0;s<a;s+=1){if(e[s]==="`"&&s+2<a&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="_")continue;let l=s>0?e[s-1]:"",u=s<a-1?e[s+1]:"";EF(e,s,l,u)||(t+=1)}return t},vF=e=>{let t=0,n=0,a=!1;for(let s=0;s<e.length;s+=1){if(e[s]==="`"&&s+2<e.length&&e[s+1]==="`"&&e[s+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,a=!a,s+=2;continue}a||(e[s]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},a1=e=>{let t=0,n=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="`"&&a+2<e.length&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}n||e[a]==="*"&&a+1<e.length&&e[a+1]==="*"&&(t+=1,a+=1)}return t},UT=e=>{let t=0,n=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="`"&&a+2<e.length&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}n||e[a]==="_"&&a+1<e.length&&e[a+1]==="_"&&(t+=1,a+=1)}return t},SF=(e,t,n)=>{if(!t||hs.test(t))return!0;let a=e.substring(0,n).lastIndexOf(`
85
+ `),s=a===-1?0:a+1,l=e.substring(s,n);return MC.test(l)&&t.includes(`
86
+ `)?!0:r1(e,n,"*")},kF=e=>{let t=e.match(nF);if(!t)return e;let n=t[2],a=e.lastIndexOf(t[1]);return yu(e,a)||SF(e,n,a)?e:a1(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},NF=(e,t,n)=>{if(!t||hs.test(t))return!0;let a=e.substring(0,n).lastIndexOf(`
87
+ `),s=a===-1?0:a+1,l=e.substring(s,n);return MC.test(l)&&t.includes(`
88
+ `)?!0:r1(e,n,"_")},CF=e=>{let t=e.match(rF);if(!t){let s=e.match(fF);if(s){let l=e.lastIndexOf(s[1]);if(!yu(e,l)&&UT(e)%2===1)return`${e}_`}return e}let n=t[2],a=e.lastIndexOf(t[1]);return yu(e,a)||NF(e,n,a)?e:UT(e)%2===1?`${e}__`:e},_F=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Mf(e,n)){let a=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if((!a||a===" "||a===" "||a===`
89
+ `)&&(!s||s===" "||s===" "||s===`
90
+ `)||a&&s&&xi(a)&&xi(s))continue;return n}}return-1},AF=e=>{if(!e.match(iF))return e;let t=_F(e);if(t===-1)return e;let n=e.substring(t+1);return!n||hs.test(n)?e:zC(e)%2===1?`${e}*`:e},HC=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Mf(e,n)&&!PC(e,n)){let a=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if(a&&s&&xi(a)&&xi(s))continue;return n}}return-1},wF=e=>{let t=e.length;for(;t>0&&e[t-1]===`
91
+ `;)t-=1;if(t<e.length){let n=e.slice(0,t),a=e.slice(t);return`${n}_${a}`}return`${e}_`},RF=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(a1(t)%2!==1)return null;let n=t.indexOf("**"),a=HC(t);return n!==-1&&a!==-1&&n<a?`${t}_**`:null},OF=e=>{if(!e.match(sF))return e;let t=HC(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||hs.test(n))return e;if(TF(e)%2===1){let a=RF(e);return a!==null?a:wF(e)}return e},IF=e=>{let t=a1(e),n=zC(e);return t%2===0&&n%2===0},DF=(e,t,n)=>!t||hs.test(t)||yu(e,n)?!0:r1(e,n,"*"),LF=e=>{if(dF.test(e))return e;let t=e.match(aF);if(!t)return e;let n=t[2],a=e.lastIndexOf(t[1]);return DF(e,n,a)?e:vF(e)%2===1?IF(e)?e:`${e}***`:e},Eu=(e,t)=>{let n=!1,a=!1;for(let s=0;s<t;s+=1){if(e.substring(s,s+3)==="```"){a=!a,s+=2;continue}!a&&e[s]==="`"&&(n=!n)}return n||a},jF=(e,t)=>{let n=e.substring(t,t+3)==="```",a=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return n||a||s},MF=e=>{let t=0;for(let n=0;n<e.length;n+=1)e[n]==="`"&&!jF(e,n)&&(t+=1);return t},BF=/<[a-zA-Z/][^>]*$/,PF=e=>{let t=e.match(BF);return!t||t.index===void 0||Eu(e,t.index)?e:e.substring(0,t.index).trimEnd()},zF=e=>!e.match(cF)||e.includes(`
92
+ `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,HF=e=>(e.match(/```/g)||[]).length%2===1,UF=e=>{let t=zF(e);if(t!==null)return t;let n=e.match(lF);if(n&&!HF(e)){let a=n[2];if(!a||hs.test(a))return e;if(MF(e)%2===1)return`${e}\``}return e},FF=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",$F=e=>{let t=0,n=!1;for(let a=0;a<e.length-1;a+=1)e[a]==="`"&&!FF(e,a)&&(n=!n),!n&&e[a]==="$"&&e[a+1]==="$"&&(t+=1,a+=1);return t},qF=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
93
+ `,t)!==-1&&!e.endsWith(`
94
+ `)?`${e}
95
+ $$`:`${e}$$`},VF=e=>$F(e)%2===0?e:qF(e),YF=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let a=mF(e,t);if(a===-1||Eu(e,a))return null;let s=a>0&&e[a-1]==="!",l=s?a-1:a,u=e.substring(0,l);if(s)return u;let f=e.substring(a+1,t);return n==="text-only"?`${u}${f}`:`${u}[${f}](streamdown:incomplete-link)`},FT=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!Eu(e,n)){if(n>0&&e[n-1]==="!")continue;let a=BC(e,n);if(a===-1)return n;if(a+1<e.length&&e[a+1]==="("){let s=e.indexOf(")",a+2);s!==-1&&(n=s)}}return t},GF=(e,t,n)=>{let a=t>0&&e[t-1]==="!",s=a?t-1:t;if(!e.substring(t+1).includes("]")){let l=e.substring(0,s);if(a)return l;if(n==="text-only"){let u=FT(e,t);return e.substring(0,u)+e.substring(u+1)}return`${e}](streamdown:incomplete-link)`}if(BC(e,t)===-1){let l=e.substring(0,s);if(a)return l;if(n==="text-only"){let u=FT(e,t);return e.substring(0,u)+e.substring(u+1)}return`${e}](streamdown:incomplete-link)`}return null},UC=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!Eu(e,n)){let a=YF(e,n,t);if(a!==null)return a}for(let a=e.length-1;a>=0;a-=1)if(e[a]==="["&&!Eu(e,a)){let s=GF(e,a,t);if(s!==null)return s}return e},XF=/^-{1,2}$/,QF=/^[\s]*-{1,2}[\s]+$/,WF=/^={1,2}$/,KF=/^[\s]*={1,2}[\s]+$/,ZF=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
96
+ `);if(t===-1)return e;let n=e.substring(t+1),a=e.substring(0,t),s=n.trim();if(XF.test(s)&&!n.match(QF)){let l=a.split(`
97
+ `).at(-1);if(l&&l.trim().length>0)return`${e}​`}if(WF.test(s)&&!n.match(KF)){let l=a.split(`
98
+ `).at(-1);if(l&&l.trim().length>0)return`${e}​`}return e},JF=e=>{var t,n;let a=e.match(oF);if(a){let s=a[2];if(!s||hs.test(s))return e;if(((t=e.match(HT))==null?void 0:t.length)%2===1)return`${e}~~`}else if(e.match(hF)&&((n=e.match(HT))==null?void 0:n.length)%2===1)return`${e}~`;return e},Lm=e=>e!==!1,nr={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},e$=[{handler:{name:"comparisonOperators",handle:bF,priority:nr.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:PF,priority:nr.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:ZF,priority:nr.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:UC,priority:nr.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:LF,priority:nr.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:kF,priority:nr.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:CF,priority:nr.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:AF,priority:nr.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:OF,priority:nr.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:UF,priority:nr.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:JF,priority:nr.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:VF,priority:nr.KATEX},optionKey:"katex"}],t$=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return e$.filter(({handler:a,optionKey:s})=>a.name==="links"?Lm(e?.links)||Lm(e?.images):Lm(e?.[s])).map(({handler:a,earlyReturn:s})=>a.name==="links"?{handler:jC(LC({},a),{handle:l=>UC(l,n)}),earlyReturn:n==="protocol"?s:void 0}:{handler:a,earlyReturn:s})},n$=(e,t)=>{var n;if(!e||typeof e!="string")return e;let a=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=t$(t),l=((n=t?.handlers)!=null?n:[]).map(f=>{var h;return{handler:jC(LC({},f),{priority:(h=f.priority)!=null?h:nr.DEFAULT}),earlyReturn:void 0}}),u=[...s,...l].sort((f,h)=>{var m,p;return((m=f.handler.priority)!=null?m:0)-((p=h.handler.priority)!=null?p:0)});for(let{handler:f,earlyReturn:h}of u)if(a=f.handle(a),h!=null&&h(a))return a;return a},r$=n$;const a$=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,i$=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s$={};function $T(e,t){return(s$.jsx?i$:a$).test(e)}const l$=/[ \t\n\f\r]/g;function o$(e){return typeof e=="object"?e.type==="text"?qT(e.value):!1:qT(e)}function qT(e){return e.replace(l$,"")===""}var ll={},jm,VT;function u$(){if(VT)return jm;VT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,l=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
99
+ `,m="/",p="*",g="",y="comment",T="declaration";function S(N,_){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];_=_||{};var A=1,w=1;function P(ee){var U=ee.match(t);U&&(A+=U.length);var R=ee.lastIndexOf(h);w=~R?ee.length-R:w+ee.length}function F(){var ee={line:A,column:w};return function(U){return U.position=new M(ee),G(),U}}function M(ee){this.start=ee,this.end={line:A,column:w},this.source=_.source}M.prototype.content=N;function I(ee){var U=new Error(_.source+":"+A+":"+w+": "+ee);if(U.reason=ee,U.filename=_.source,U.line=A,U.column=w,U.source=N,!_.silent)throw U}function j(ee){var U=ee.exec(N);if(U){var R=U[0];return P(R),N=N.slice(R.length),U}}function G(){j(n)}function B(ee){var U;for(ee=ee||[];U=Q();)U!==!1&&ee.push(U);return ee}function Q(){var ee=F();if(!(m!=N.charAt(0)||p!=N.charAt(1))){for(var U=2;g!=N.charAt(U)&&(p!=N.charAt(U)||m!=N.charAt(U+1));)++U;if(U+=2,g===N.charAt(U-1))return I("End of comment missing");var R=N.slice(2,U-2);return w+=2,P(R),N=N.slice(U),w+=2,ee({type:y,comment:R})}}function V(){var ee=F(),U=j(a);if(U){if(Q(),!j(s))return I("property missing ':'");var R=j(l),q=ee({type:T,property:k(U[0].replace(e,g)),value:R?k(R[0].replace(e,g)):g});return j(u),q}}function te(){var ee=[];B(ee);for(var U;U=V();)U!==!1&&(ee.push(U),B(ee));return ee}return G(),te()}function k(N){return N?N.replace(f,g):g}return jm=S,jm}var YT;function c$(){if(YT)return ll;YT=1;var e=ll&&ll.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(ll,"__esModule",{value:!0}),ll.default=n;const t=e(u$());function n(a,s){let l=null;if(!a||typeof a!="string")return l;const u=(0,t.default)(a),f=typeof s=="function";return u.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:p}=h;f?s(m,p,h):p&&(l=l||{},l[m]=p)}),l}return ll}var Po={},GT;function d$(){if(GT)return Po;GT=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,l=function(m){return!m||n.test(m)||e.test(m)},u=function(m,p){return p.toUpperCase()},f=function(m,p){return"".concat(p,"-")},h=function(m,p){return p===void 0&&(p={}),l(m)?m:(m=m.toLowerCase(),p.reactCompat?m=m.replace(s,f):m=m.replace(a,f),m.replace(t,u))};return Po.camelCase=h,Po}var zo,XT;function f$(){if(XT)return zo;XT=1;var e=zo&&zo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(c$()),n=d$();function a(s,l){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(f,h){f&&h&&(u[(0,n.camelCase)(f,l)]=h)}),u}return a.default=a,zo=a,zo}var h$=f$();const m$=tf(h$);function ru(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?QT(e.position):"start"in e||"end"in e?QT(e):"line"in e||"column"in e?Dp(e):""}function Dp(e){return WT(e&&e.line)+":"+WT(e&&e.column)}function QT(e){return Dp(e&&e.start)+"-"+Dp(e&&e.end)}function WT(e){return e&&typeof e=="number"?e:1}class wn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",l={},u=!1;if(n&&("line"in n&&"column"in n?l={place:n}:"start"in n&&"end"in n?l={place:n}:"type"in n?l={ancestors:[n],place:n.position}:l={...n}),typeof t=="string"?s=t:!l.cause&&t&&(u=!0,s=t.message,l.cause=t),!l.ruleId&&!l.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?l.ruleId=a:(l.source=a.slice(0,h),l.ruleId=a.slice(h+1))}if(!l.place&&l.ancestors&&l.ancestors){const h=l.ancestors[l.ancestors.length-1];h&&(l.place=h.position)}const f=l.place&&"start"in l.place?l.place.start:l.place;this.ancestors=l.ancestors||void 0,this.cause=l.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=ru(l.place)||"1:1",this.place=l.place||void 0,this.reason=this.message,this.ruleId=l.ruleId||void 0,this.source=l.source||void 0,this.stack=u&&l.cause&&typeof l.cause.stack=="string"?l.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}wn.prototype.file="";wn.prototype.name="";wn.prototype.reason="";wn.prototype.message="";wn.prototype.stack="";wn.prototype.column=void 0;wn.prototype.line=void 0;wn.prototype.ancestors=void 0;wn.prototype.cause=void 0;wn.prototype.fatal=void 0;wn.prototype.place=void 0;wn.prototype.ruleId=void 0;wn.prototype.source=void 0;const i1={}.hasOwnProperty,p$=new Map,g$=/[A-Z]/g,x$=new Set(["table","tbody","thead","tfoot","tr"]),b$=new Set(["td","th"]),FC="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function y$(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=_$(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=C$(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,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"?ki:Ru,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},l=$C(s,e,void 0);return l&&typeof l!="string"?l:s.create(e,s.Fragment,{children:l||void 0},void 0)}function $C(e,t,n){if(t.type==="element")return E$(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return T$(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return S$(e,t,n);if(t.type==="mdxjsEsm")return v$(e,t);if(t.type==="root")return k$(e,t,n);if(t.type==="text")return N$(e,t)}function E$(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=ki,e.schema=s),e.ancestors.push(t);const l=VC(e,t.tagName,!1),u=A$(e,t);let f=l1(e,t);return x$.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!o$(h):!0})),qC(e,u,l,t),s1(u,f),e.ancestors.pop(),e.schema=a,e.create(t,l,u,n)}function T$(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}Tu(e,t.position)}function v$(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Tu(e,t.position)}function S$(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=ki,e.schema=s),e.ancestors.push(t);const l=t.name===null?e.Fragment:VC(e,t.name,!0),u=w$(e,t),f=l1(e,t);return qC(e,u,l,t),s1(u,f),e.ancestors.pop(),e.schema=a,e.create(t,l,u,n)}function k$(e,t,n){const a={};return s1(a,l1(e,t)),e.create(t,e.Fragment,a,n)}function N$(e,t){return t.value}function qC(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function s1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function C$(e,t,n){return a;function a(s,l,u,f){const m=Array.isArray(u.children)?n:t;return f?m(l,u,f):m(l,u)}}function _$(e,t){return n;function n(a,s,l,u){const f=Array.isArray(l.children),h=aa(a);return t(s,l,u,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function A$(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&i1.call(t.properties,s)){const l=R$(e,s,t.properties[s]);if(l){const[u,f]=l;e.tableCellAlignToStyle&&u==="align"&&typeof f=="string"&&b$.has(t.tagName)?a=f:n[u]=f}}if(a){const l=n.style||(n.style={});l[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function w$(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const l=a.data.estree.body[0];l.type;const u=l.expression;u.type;const f=u.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else Tu(e,t.position);else{const s=a.name;let l;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,l=e.evaluater.evaluateExpression(f.expression)}else Tu(e,t.position);else l=a.value===null?!0:a.value;n[s]=l}return n}function l1(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:p$;for(;++a<t.children.length;){const l=t.children[a];let u;if(e.passKeys){const h=l.type==="element"?l.tagName:l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement"?l.name:void 0;if(h){const m=s.get(h)||0;u=h+"-"+m,s.set(h,m+1)}}const f=$C(e,l,u);f!==void 0&&n.push(f)}return n}function R$(e,t,n){const a=Af(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?dN(n):fN(n)),a.property==="style"){let s=typeof n=="object"?n:O$(e,String(n));return e.stylePropertyNameCase==="css"&&(s=I$(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?Y8[a.property]||a.property:a.attribute,n]}}function O$(e,t){try{return m$(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new wn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=FC+"#cannot-parse-style-attribute",s}}function VC(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let l=-1,u;for(;++l<s.length;){const f=$T(s[l])?{type:"Identifier",name:s[l]}:{type:"Literal",value:s[l]};u=u?{type:"MemberExpression",object:u,property:f,computed:!!(l&&f.type==="Literal"),optional:!1}:f}a=u}else a=$T(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return i1.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);Tu(e)}function Tu(e,t){const n=new wn("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=FC+"#cannot-handle-mdx-estrees-without-createevaluater",n}function I$(e){const t={};let n;for(n in e)i1.call(e,n)&&(t[D$(n)]=e[n]);return t}function D$(e){let t=e.replace(g$,L$);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function L$(e){return"-"+e.toLowerCase()}const Mm={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"]},j$={tokenize:M$};function M$(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),ft(e,t,"linePrefix")}function s(f){return e.enter("paragraph"),l(f)}function l(f){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,u(f)}function u(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return ze(f)?(e.consume(f),e.exit("chunkText"),l):(e.consume(f),u)}}const B$={tokenize:P$},KT={tokenize:z$};function P$(e){const t=this,n=[];let a=0,s,l,u;return f;function f(w){if(a<n.length){const P=n[a];return t.containerState=P[1],e.attempt(P[0].continuation,h,m)(w)}return m(w)}function h(w){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&A();const P=t.events.length;let F=P,M;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){M=t.events[F][1].end;break}_(a);let I=P;for(;I<t.events.length;)t.events[I][1].end={...M},I++;return lr(t.events,F+1,0,t.events.slice(P)),t.events.length=I,m(w)}return f(w)}function m(w){if(a===n.length){if(!s)return y(w);if(s.currentConstruct&&s.currentConstruct.concrete)return S(w);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(KT,p,g)(w)}function p(w){return s&&A(),_(a),y(w)}function g(w){return t.parser.lazy[t.now().line]=a!==n.length,u=t.now().offset,S(w)}function y(w){return t.containerState={},e.attempt(KT,T,S)(w)}function T(w){return a++,n.push([t.currentConstruct,t.containerState]),y(w)}function S(w){if(w===null){s&&A(),_(0),e.consume(w);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:l}),k(w)}function k(w){if(w===null){N(e.exit("chunkFlow"),!0),_(0),e.consume(w);return}return ze(w)?(e.consume(w),N(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(w),k)}function N(w,P){const F=t.sliceStream(w);if(P&&F.push(null),w.previous=l,l&&(l.next=w),l=w,s.defineSkip(w.start),s.write(F),t.parser.lazy[w.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<u&&(!s.events[M][1].end||s.events[M][1].end.offset>u))return;const I=t.events.length;let j=I,G,B;for(;j--;)if(t.events[j][0]==="exit"&&t.events[j][1].type==="chunkFlow"){if(G){B=t.events[j][1].end;break}G=!0}for(_(a),M=I;M<t.events.length;)t.events[M][1].end={...B},M++;lr(t.events,j+1,0,t.events.slice(I)),t.events.length=M}}function _(w){let P=n.length;for(;P-- >w;){const F=n[P];t.containerState=F[1],F[0].exit.call(t,e)}n.length=w}function A(){s.write([null]),l=void 0,s=void 0,t.containerState._closeFlow=void 0}}function z$(e,t,n){return ft(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const H$={tokenize:U$};function U$(e){const t=this,n=e.attempt(Lu,a,e.attempt(this.parser.constructs.flowInitial,s,ft(e,e.attempt(this.parser.constructs.flow,s,e.attempt(LH,s)),"linePrefix")));return n;function a(l){if(l===null){e.consume(l);return}return e.enter("lineEndingBlank"),e.consume(l),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const F$={resolveAll:GC()},$$=YC("string"),q$=YC("text");function YC(e){return{resolveAll:GC(e==="text"?V$:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],l=n.attempt(s,u,f);return u;function u(p){return m(p)?l(p):f(p)}function f(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),h}function h(p){return m(p)?(n.exit("data"),l(p)):(n.consume(p),h)}function m(p){if(p===null)return!0;const g=s[p];let y=-1;if(g)for(;++y<g.length;){const T=g[y];if(!T.previous||T.previous.call(a,a.previous))return!0}return!1}}}function GC(e){return t;function t(n,a){let s=-1,l;for(;++s<=n.length;)l===void 0?n[s]&&n[s][1].type==="data"&&(l=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==l+2&&(n[l][1].end=n[s-1][1].end,n.splice(l+2,s-l-2),s=l+2),l=void 0);return e?e(n,a):n}}function V$(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],s=t.sliceStream(a);let l=s.length,u=-1,f=0,h;for(;l--;){const m=s[l];if(typeof m=="string"){for(u=m.length;m.charCodeAt(u-1)===32;)f++,u--;if(u)break;u=-1}else if(m===-2)h=!0,f++;else if(m!==-1){l++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const m={type:n===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:l?u:a.start._bufferIndex+u,_index:a.start._index+l,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const Y$={42:Vn,43:Vn,45:Vn,48:Vn,49:Vn,50:Vn,51:Vn,52:Vn,53:Vn,54:Vn,55:Vn,56:Vn,57:Vn,62:_C},G$={91:zH},X$={[-2]:Im,[-1]:Im,32:Im},Q$={35:VH,42:wd,45:[MT,wd],60:QH,61:MT,95:wd,96:LT,126:LT},W$={38:wC,92:AC},K$={[-5]:Dm,[-4]:Dm,[-3]:Dm,33:hU,38:wC,42:Ip,60:[pH,nU],91:pU,92:[$H,AC],93:n1,95:Ip,96:AH},Z$={null:[Ip,F$]},J$={null:[42,95]},eq={null:[]},tq=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:J$,contentInitial:G$,disable:eq,document:Y$,flow:Q$,flowInitial:X$,insideSpan:Z$,string:W$,text:K$},Symbol.toStringTag,{value:"Module"}));function nq(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},l=[];let u=[],f=[];const h={attempt:I(F),check:I(M),consume:A,enter:w,exit:P,interrupt:I(M,{interrupt:!0})},m={code:null,containerState:{},defineSkip:k,events:[],now:S,parser:e,previous:null,sliceSerialize:y,sliceStream:T,write:g};let p=t.tokenize.call(m,h);return t.resolveAll&&l.push(t),m;function g(Q){return u=yr(u,Q),N(),u[u.length-1]!==null?[]:(j(t,0),m.events=jf(l,m.events,m),m.events)}function y(Q,V){return aq(T(Q),V)}function T(Q){return rq(u,Q)}function S(){const{_bufferIndex:Q,_index:V,line:te,column:ee,offset:U}=a;return{_bufferIndex:Q,_index:V,line:te,column:ee,offset:U}}function k(Q){s[Q.line]=Q.column,B()}function N(){let Q;for(;a._index<u.length;){const V=u[a._index];if(typeof V=="string")for(Q=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===Q&&a._bufferIndex<V.length;)_(V.charCodeAt(a._bufferIndex));else _(V)}}function _(Q){p=p(Q)}function A(Q){ze(Q)?(a.line++,a.column=1,a.offset+=Q===-3?2:1,B()):Q!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===u[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=Q}function w(Q,V){const te=V||{};return te.type=Q,te.start=S(),m.events.push(["enter",te,m]),f.push(te),te}function P(Q){const V=f.pop();return V.end=S(),m.events.push(["exit",V,m]),V}function F(Q,V){j(Q,V.from)}function M(Q,V){V.restore()}function I(Q,V){return te;function te(ee,U,R){let q,W,he,O;return Array.isArray(ee)?Z(ee):"tokenize"in ee?Z([ee]):H(ee);function H(ve){return ge;function ge(ue){const xe=ue!==null&&ve[ue],Ae=ue!==null&&ve.null,Le=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(Ae)?Ae:Ae?[Ae]:[]];return Z(Le)(ue)}}function Z(ve){return q=ve,W=0,ve.length===0?R:L(ve[W])}function L(ve){return ge;function ge(ue){return O=G(),he=ve,ve.partial||(m.currentConstruct=ve),ve.name&&m.parser.constructs.disable.null.includes(ve.name)?Ne():ve.tokenize.call(V?Object.assign(Object.create(m),V):m,h,fe,Ne)(ue)}}function fe(ve){return Q(he,O),U}function Ne(ve){return O.restore(),++W<q.length?L(q[W]):R}}}function j(Q,V){Q.resolveAll&&!l.includes(Q)&&l.push(Q),Q.resolve&&lr(m.events,V,m.events.length-V,Q.resolve(m.events.slice(V),m)),Q.resolveTo&&(m.events=Q.resolveTo(m.events,m))}function G(){const Q=S(),V=m.previous,te=m.currentConstruct,ee=m.events.length,U=Array.from(f);return{from:ee,restore:R};function R(){a=Q,m.previous=V,m.currentConstruct=te,m.events.length=ee,f=U,B()}}function B(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function rq(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,l=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(a,l)];else{if(u=e.slice(n,s),a>-1){const f=u[0];typeof f=="string"?u[0]=f.slice(a):u.shift()}l>0&&u.push(e[s].slice(0,l))}return u}function aq(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const l=e[n];let u;if(typeof l=="string")u=l;else switch(l){case-5:{u="\r";break}case-4:{u=`
100
+ `;break}case-3:{u=`\r
101
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(l)}s=l===-2,a.push(u)}return a.join("")}function iq(e){const a={constructs:bC([tq,...(e||{}).extensions||[]]),content:s(j$),defined:[],document:s(B$),flow:s(H$),lazy:{},string:s($$),text:s(q$)};return a;function s(l){return u;function u(f){return nq(a,l,f)}}}function sq(e){for(;!RC(e););return e}const ZT=/[\0\t\n\r]/g;function lq(){let e=1,t="",n=!0,a;return s;function s(l,u,f){const h=[];let m,p,g,y,T;for(l=t+(typeof l=="string"?l.toString():new TextDecoder(u||void 0).decode(l)),g=0,t="",n&&(l.charCodeAt(0)===65279&&g++,n=void 0);g<l.length;){if(ZT.lastIndex=g,m=ZT.exec(l),y=m&&m.index!==void 0?m.index:l.length,T=l.charCodeAt(y),!m){t=l.slice(g);break}if(T===10&&g===y&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),g<y&&(h.push(l.slice(g,y)),e+=y-g),T){case 0:{h.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,h.push(-2);e++<p;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}g=y+1}return f&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const XC={}.hasOwnProperty;function oq(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),uq(n)(sq(iq(n).document().write(lq()(e,t,!0))))}function uq(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:l(an),autolinkProtocol:G,autolinkEmail:G,atxHeading:l(Ee),blockQuote:l(Ae),characterEscape:G,characterReference:G,codeFenced:l(Le),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:l(Le,u),codeText:l(Fe,u),codeTextData:G,data:G,codeFlowValue:G,definition:l($e),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:l(pe),hardBreakEscape:l(we),hardBreakTrailing:l(we),htmlFlow:l(qe,u),htmlFlowData:G,htmlText:l(qe,u),htmlTextData:G,image:l(dt),label:u,link:l(an),listItem:l(sa),listItemValue:y,listOrdered:l(Pt,g),listUnordered:l(Pt),paragraph:l(ps),reference:L,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:l(Ee),strong:l(Ia),thematicBreak:l(Nr)},exit:{atxHeading:h(),atxHeadingSequence:F,autolink:h(),autolinkEmail:xe,autolinkProtocol:ue,blockQuote:h(),characterEscapeValue:B,characterReferenceMarkerHexadecimal:Ne,characterReferenceMarkerNumeric:Ne,characterReferenceValue:ve,characterReference:ge,codeFenced:h(N),codeFencedFence:k,codeFencedFenceInfo:T,codeFencedFenceMeta:S,codeFlowValue:B,codeIndented:h(_),codeText:h(U),codeTextData:B,data:B,definition:h(),definitionDestinationString:P,definitionLabelString:A,definitionTitleString:w,emphasis:h(),hardBreakEscape:h(V),hardBreakTrailing:h(V),htmlFlow:h(te),htmlFlowData:B,htmlText:h(ee),htmlTextData:B,image:h(q),label:he,labelText:W,lineEnding:Q,link:h(R),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:fe,resourceDestinationString:O,resourceTitleString:H,resource:Z,setextHeading:h(j),setextHeadingLineSequence:I,setextHeadingText:M,strong:h(),thematicBreak:h()}};QC(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ce){let Ce={type:"root",children:[]};const He={stack:[Ce],tokenStack:[],config:t,enter:f,exit:m,buffer:u,resume:p,data:n},et=[];let mt=-1;for(;++mt<ce.length;)if(ce[mt][1].type==="listOrdered"||ce[mt][1].type==="listUnordered")if(ce[mt][0]==="enter")et.push(mt);else{const vn=et.pop();mt=s(ce,vn,mt)}for(mt=-1;++mt<ce.length;){const vn=t[ce[mt][0]];XC.call(vn,ce[mt][1].type)&&vn[ce[mt][1].type].call(Object.assign({sliceSerialize:ce[mt][2].sliceSerialize},He),ce[mt][1])}if(He.tokenStack.length>0){const vn=He.tokenStack[He.tokenStack.length-1];(vn[1]||JT).call(He,void 0,vn[0])}for(Ce.position={start:si(ce.length>0?ce[0][1].start:{line:1,column:1,offset:0}),end:si(ce.length>0?ce[ce.length-2][1].end:{line:1,column:1,offset:0})},mt=-1;++mt<t.transforms.length;)Ce=t.transforms[mt](Ce)||Ce;return Ce}function s(ce,Ce,He){let et=Ce-1,mt=-1,vn=!1,Cr,Rn,sn,jn;for(;++et<=He;){const At=ce[et];switch(At[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{At[0]==="enter"?mt++:mt--,jn=void 0;break}case"lineEndingBlank":{At[0]==="enter"&&(Cr&&!jn&&!mt&&!sn&&(sn=et),jn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:jn=void 0}if(!mt&&At[0]==="enter"&&At[1].type==="listItemPrefix"||mt===-1&&At[0]==="exit"&&(At[1].type==="listUnordered"||At[1].type==="listOrdered")){if(Cr){let Da=et;for(Rn=void 0;Da--;){const _r=ce[Da];if(_r[1].type==="lineEnding"||_r[1].type==="lineEndingBlank"){if(_r[0]==="exit")continue;Rn&&(ce[Rn][1].type="lineEndingBlank",vn=!0),_r[1].type="lineEnding",Rn=Da}else if(!(_r[1].type==="linePrefix"||_r[1].type==="blockQuotePrefix"||_r[1].type==="blockQuotePrefixWhitespace"||_r[1].type==="blockQuoteMarker"||_r[1].type==="listItemIndent"))break}sn&&(!Rn||sn<Rn)&&(Cr._spread=!0),Cr.end=Object.assign({},Rn?ce[Rn][1].start:At[1].end),ce.splice(Rn||et,0,["exit",Cr,At[2]]),et++,He++}if(At[1].type==="listItemPrefix"){const Da={type:"listItem",_spread:!1,start:Object.assign({},At[1].start),end:void 0};Cr=Da,ce.splice(et,0,["enter",Da,At[2]]),et++,He++,sn=void 0,jn=!0}}}return ce[Ce][1]._spread=vn,He}function l(ce,Ce){return He;function He(et){f.call(this,ce(et),et),Ce&&Ce.call(this,et)}}function u(){this.stack.push({type:"fragment",children:[]})}function f(ce,Ce,He){this.stack[this.stack.length-1].children.push(ce),this.stack.push(ce),this.tokenStack.push([Ce,He||void 0]),ce.position={start:si(Ce.start),end:void 0}}function h(ce){return Ce;function Ce(He){ce&&ce.call(this,He),m.call(this,He)}}function m(ce,Ce){const He=this.stack.pop(),et=this.tokenStack.pop();if(et)et[0].type!==ce.type&&(Ce?Ce.call(this,ce,et[0]):(et[1]||JT).call(this,ce,et[0]));else throw new Error("Cannot close `"+ce.type+"` ("+ru({start:ce.start,end:ce.end})+"): it’s not open");He.position.end=si(ce.end)}function p(){return Zg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function y(ce){if(this.data.expectingFirstListItemValue){const Ce=this.stack[this.stack.length-2];Ce.start=Number.parseInt(this.sliceSerialize(ce),10),this.data.expectingFirstListItemValue=void 0}}function T(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.lang=ce}function S(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.meta=ce}function k(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ce.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ce.replace(/(\r?\n|\r)$/g,"")}function A(ce){const Ce=this.resume(),He=this.stack[this.stack.length-1];He.label=Ce,He.identifier=jr(this.sliceSerialize(ce)).toLowerCase()}function w(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=ce}function P(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=ce}function F(ce){const Ce=this.stack[this.stack.length-1];if(!Ce.depth){const He=this.sliceSerialize(ce).length;Ce.depth=He}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function I(ce){const Ce=this.stack[this.stack.length-1];Ce.depth=this.sliceSerialize(ce).codePointAt(0)===61?1:2}function j(){this.data.setextHeadingSlurpLineEnding=void 0}function G(ce){const He=this.stack[this.stack.length-1].children;let et=He[He.length-1];(!et||et.type!=="text")&&(et=qt(),et.position={start:si(ce.start),end:void 0},He.push(et)),this.stack.push(et)}function B(ce){const Ce=this.stack.pop();Ce.value+=this.sliceSerialize(ce),Ce.position.end=si(ce.end)}function Q(ce){const Ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const He=Ce.children[Ce.children.length-1];He.position.end=si(ce.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Ce.type)&&(G.call(this,ce),B.call(this,ce))}function V(){this.data.atHardBreak=!0}function te(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ce}function ee(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ce}function U(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.value=ce}function R(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=Ce,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function q(){const ce=this.stack[this.stack.length-1];if(this.data.inReference){const Ce=this.data.referenceType||"shortcut";ce.type+="Reference",ce.referenceType=Ce,delete ce.url,delete ce.title}else delete ce.identifier,delete ce.label;this.data.referenceType=void 0}function W(ce){const Ce=this.sliceSerialize(ce),He=this.stack[this.stack.length-2];He.label=zz(Ce),He.identifier=jr(Ce).toLowerCase()}function he(){const ce=this.stack[this.stack.length-1],Ce=this.resume(),He=this.stack[this.stack.length-1];if(this.data.inReference=!0,He.type==="link"){const et=ce.children;He.children=et}else He.alt=Ce}function O(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.url=ce}function H(){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.title=ce}function Z(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function fe(ce){const Ce=this.resume(),He=this.stack[this.stack.length-1];He.label=Ce,He.identifier=jr(this.sliceSerialize(ce)).toLowerCase(),this.data.referenceType="full"}function Ne(ce){this.data.characterReferenceType=ce.type}function ve(ce){const Ce=this.sliceSerialize(ce),He=this.data.characterReferenceType;let et;He?(et=xC(Ce,He==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):et=e1(Ce);const mt=this.stack[this.stack.length-1];mt.value+=et}function ge(ce){const Ce=this.stack.pop();Ce.position.end=si(ce.end)}function ue(ce){B.call(this,ce);const Ce=this.stack[this.stack.length-1];Ce.url=this.sliceSerialize(ce)}function xe(ce){B.call(this,ce);const Ce=this.stack[this.stack.length-1];Ce.url="mailto:"+this.sliceSerialize(ce)}function Ae(){return{type:"blockquote",children:[]}}function Le(){return{type:"code",lang:null,meta:null,value:""}}function Fe(){return{type:"inlineCode",value:""}}function $e(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pe(){return{type:"emphasis",children:[]}}function Ee(){return{type:"heading",depth:0,children:[]}}function we(){return{type:"break"}}function qe(){return{type:"html",value:""}}function dt(){return{type:"image",title:null,url:"",alt:null}}function an(){return{type:"link",title:null,url:"",children:[]}}function Pt(ce){return{type:"list",ordered:ce.type==="listOrdered",start:null,spread:ce._spread,children:[]}}function sa(ce){return{type:"listItem",spread:ce._spread,checked:null,children:[]}}function ps(){return{type:"paragraph",children:[]}}function Ia(){return{type:"strong",children:[]}}function qt(){return{type:"text",value:""}}function Nr(){return{type:"thematicBreak"}}}function si(e){return{line:e.line,column:e.column,offset:e.offset}}function QC(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?QC(e,a):cq(e,a)}}function cq(e,t){let n;for(n in t)if(XC.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function JT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ru({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ru({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ru({start:t.start,end:t.end})+") is still open")}function dq(e){const t=this;t.parser=n;function n(a){return oq(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function fq(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function hq(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
102
+ `}]}function mq(e,t){const n=t.value?t.value+`
103
+ `:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let l={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function pq(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gq(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xq(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=Bl(a.toLowerCase()),l=e.footnoteOrder.indexOf(a);let u,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),u=e.footnoteOrder.length):u=l+1,f+=1,e.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,m),e.applyData(t,m)}function bq(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yq(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function WC(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),l=s[0];l&&l.type==="text"?l.value="["+l.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=a:s.push({type:"text",value:a}),s}function Eq(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return WC(e,t);const s={src:Bl(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const l={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,l),e.applyData(t,l)}function Tq(e,t){const n={src:Bl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function vq(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function Sq(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return WC(e,t);const s={href:Bl(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const l={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,l),e.applyData(t,l)}function kq(e,t){const n={href:Bl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Nq(e,t,n){const a=e.all(t),s=n?Cq(n):KC(t),l={},u=[];if(typeof t.checked=="boolean"){const p=a[0];let g;p&&p.type==="element"&&p.tagName==="p"?g=p:(g={type:"element",tagName:"p",properties:{},children:[]},a.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),l.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const p=a[f];(s||f!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
104
+ `}),p.type==="element"&&p.tagName==="p"&&!s?u.push(...p.children):u.push(p)}const h=a[a.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&u.push({type:"text",value:`
105
+ `});const m={type:"element",tagName:"li",properties:l,children:u};return e.patch(t,m),e.applyData(t,m)}function Cq(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=KC(n[a])}return t}function KC(e){const t=e.spread;return t??e.children.length>1}function _q(e,t){const n={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<a.length;){const u=a[s];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const l={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,l),e.applyData(t,l)}function Aq(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wq(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Rq(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Oq(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=aa(t.children[1]),h=Df(t.children[t.children.length-1]);f&&h&&(u.position={start:f,end:h}),s.push(u)}const l={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,l),e.applyData(t,l)}function Iq(e,t,n){const a=n?n.children:void 0,l=(a?a.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,f=u?u.length:t.children.length;let h=-1;const m=[];for(;++h<f;){const g=t.children[h],y={},T=u?u[h]:void 0;T&&(y.align=T);let S={type:"element",tagName:l,properties:y,children:[]};g&&(S.children=e.all(g),e.patch(g,S),S=e.applyData(g,S)),m.push(S)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,p),e.applyData(t,p)}function Dq(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ev=9,tv=32;function Lq(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const l=[];for(;a;)l.push(nv(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return l.push(nv(t.slice(s),s>0,!1)),l.join("")}function nv(e,t,n){let a=0,s=e.length;if(t){let l=e.codePointAt(a);for(;l===ev||l===tv;)a++,l=e.codePointAt(a)}if(n){let l=e.codePointAt(s-1);for(;l===ev||l===tv;)s--,l=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function jq(e,t){const n={type:"text",value:Lq(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Mq(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Bq={blockquote:fq,break:hq,code:mq,delete:pq,emphasis:gq,footnoteReference:xq,heading:bq,html:yq,imageReference:Eq,image:Tq,inlineCode:vq,linkReference:Sq,link:kq,listItem:Nq,list:_q,paragraph:Aq,root:wq,strong:Rq,table:Oq,tableCell:Dq,tableRow:Iq,text:jq,thematicBreak:Mq,toml:xd,yaml:xd,definition:xd,footnoteDefinition:xd};function xd(){}function Pq(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function zq(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Hq(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Pq,a=e.options.footnoteBackLabel||zq,s=e.options.footnoteLabel||"Footnotes",l=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[h]);if(!m)continue;const p=e.all(m),g=String(m.identifier).toUpperCase(),y=Bl(g.toLowerCase());let T=0;const S=[],k=e.footnoteCounts.get(g);for(;k!==void 0&&++T<=k;){S.length>0&&S.push({type:"text",value:" "});let A=typeof n=="string"?n:n(h,T);typeof A=="string"&&(A={type:"text",value:A}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(T>1?"-"+T:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,T),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const N=p[p.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const A=N.children[N.children.length-1];A&&A.type==="text"?A.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...S)}else p.push(...S);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(p,!0)};e.patch(m,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:l,properties:{...is(u),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
106
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
107
+ `}]}}const Lp={}.hasOwnProperty,Uq={};function Fq(e,t){const n=t||Uq,a=new Map,s=new Map,l=new Map,u={...Bq,...n.handlers},f={all:m,applyData:qq,definitionById:a,footnoteById:s,footnoteCounts:l,footnoteOrder:[],handlers:u,one:h,options:n,patch:$q,wrap:Yq};return gi(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const g=p.type==="definition"?a:s,y=String(p.identifier).toUpperCase();g.has(y)||g.set(y,p)}}),f;function h(p,g){const y=p.type,T=f.handlers[y];if(Lp.call(f.handlers,y)&&T)return T(f,p,g);if(f.options.passThrough&&f.options.passThrough.includes(y)){if("children"in p){const{children:k,...N}=p,_=is(N);return _.children=f.all(p),_}return is(p)}return(f.options.unknownHandler||Vq)(f,p,g)}function m(p){const g=[];if("children"in p){const y=p.children;let T=-1;for(;++T<y.length;){const S=f.one(y[T],p);if(S){if(T&&y[T-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=rv(S.value)),!Array.isArray(S)&&S.type==="element")){const k=S.children[0];k&&k.type==="text"&&(k.value=rv(k.value))}Array.isArray(S)?g.push(...S):g.push(S)}}}return g}}function $q(e,t){e.position&&(t.position=YN(e))}function qq(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,l=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const u="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:u}}n.type==="element"&&l&&Object.assign(n.properties,is(l)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function Vq(e,t){const n=t.data||{},a="value"in t&&!(Lp.call(n,"hProperties")||Lp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Yq(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
108
+ `});++a<e.length;)a&&n.push({type:"text",value:`
109
+ `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
110
+ `}),n}function rv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function av(e,t){const n=Fq(e,t),a=n.one(e,void 0),s=Hq(n),l=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&l.children.push({type:"text",value:`
111
+ `},s),l}function Gq(e,t){return e&&"run"in e?async function(n,a){const s=av(n,{file:a,...t});await e.run(s,a)}:function(n,a){return av(n,{file:a,...e||t})}}function iv(e){if(e)throw e}var Bm,sv;function Xq(){if(sv)return Bm;sv=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},l=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var p=e.call(m,"constructor"),g=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!p&&!g)return!1;var y;for(y in m);return typeof y>"u"||e.call(m,y)},u=function(m,p){n&&p.name==="__proto__"?n(m,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):m[p.name]=p.newValue},f=function(m,p){if(p==="__proto__")if(e.call(m,p)){if(a)return a(m,p).value}else return;return m[p]};return Bm=function h(){var m,p,g,y,T,S,k=arguments[0],N=1,_=arguments.length,A=!1;for(typeof k=="boolean"&&(A=k,k=arguments[1]||{},N=2),(k==null||typeof k!="object"&&typeof k!="function")&&(k={});N<_;++N)if(m=arguments[N],m!=null)for(p in m)g=f(k,p),y=f(m,p),k!==y&&(A&&y&&(l(y)||(T=s(y)))?(T?(T=!1,S=g&&s(g)?g:[]):S=g&&l(g)?g:{},u(k,{name:p,newValue:h(A,S,y)})):typeof y<"u"&&u(k,{name:p,newValue:y}));return k},Bm}var Qq=Xq();const Pm=tf(Qq);function jp(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Wq(){const e=[],t={run:n,use:a};return t;function n(...s){let l=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);f(null,...s);function f(h,...m){const p=e[++l];let g=-1;if(h){u(h);return}for(;++g<s.length;)(m[g]===null||m[g]===void 0)&&(m[g]=s[g]);s=m,p?Kq(p,f)(...m):u(null,...m)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function Kq(e,t){let n;return a;function a(...u){const f=e.length>u.length;let h;f&&u.push(s);try{h=e.apply(this,u)}catch(m){const p=m;if(f&&n)throw p;return s(p)}f||(h&&h.then&&typeof h.then=="function"?h.then(l,s):h instanceof Error?s(h):l(h))}function s(u,...f){n||(n=!0,t(u,...f))}function l(u){s(null,u)}}const Gr={basename:Zq,dirname:Jq,extname:eV,join:tV,sep:"/"};function Zq(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ju(e);let n=0,a=-1,s=e.length,l;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else a<0&&(l=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let u=-1,f=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(l){n=s+1;break}}else u<0&&(l=!0,u=s+1),f>-1&&(e.codePointAt(s)===t.codePointAt(f--)?f<0&&(a=s):(f=-1,a=u));return n===a?a=u:a<0&&(a=e.length),e.slice(n,a)}function Jq(e){if(ju(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function eV(e){ju(e);let t=e.length,n=-1,a=0,s=-1,l=0,u;for(;t--;){const f=e.codePointAt(t);if(f===47){if(u){a=t+1;break}continue}n<0&&(u=!0,n=t+1),f===46?s<0?s=t:l!==1&&(l=1):s>-1&&(l=-1)}return s<0||n<0||l===0||l===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function tV(...e){let t=-1,n;for(;++t<e.length;)ju(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":nV(n)}function nV(e){ju(e);const t=e.codePointAt(0)===47;let n=rV(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function rV(e,t){let n="",a=0,s=-1,l=0,u=-1,f,h;for(;++u<=e.length;){if(u<e.length)f=e.codePointAt(u);else{if(f===47)break;f=47}if(f===47){if(!(s===u-1||l===1))if(s!==u-1&&l===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",a=0):(n=n.slice(0,h),a=n.length-1-n.lastIndexOf("/")),s=u,l=0;continue}}else if(n.length>0){n="",a=0,s=u,l=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),a=u-s-1;s=u,l=0}else f===46&&l>-1?l++:l=-1}return n}function ju(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const aV={cwd:iV};function iV(){return"/"}function Mp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function sV(e){if(typeof e=="string")e=new URL(e);else if(!Mp(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return lV(e)}function lV(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const zm=["history","path","basename","stem","extname","dirname"];class oV{constructor(t){let n;t?Mp(t)?n={path:t}:typeof t=="string"||uV(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":aV.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<zm.length;){const l=zm[a];l in n&&n[l]!==void 0&&n[l]!==null&&(this[l]=l==="history"?[...n[l]]:n[l])}let s;for(s in n)zm.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Gr.basename(this.path):void 0}set basename(t){Um(t,"basename"),Hm(t,"basename"),this.path=Gr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Gr.dirname(this.path):void 0}set dirname(t){lv(this.basename,"dirname"),this.path=Gr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Gr.extname(this.path):void 0}set extname(t){if(Hm(t,"extname"),lv(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Gr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Mp(t)&&(t=sV(t)),Um(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Gr.basename(this.path,this.extname):void 0}set stem(t){Um(t,"stem"),Hm(t,"stem"),this.path=Gr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const s=this.message(t,n,a);throw s.fatal=!0,s}info(t,n,a){const s=this.message(t,n,a);return s.fatal=void 0,s}message(t,n,a){const s=new wn(t,n,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Hm(e,t){if(e&&e.includes(Gr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gr.sep+"`")}function Um(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function lv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function uV(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cV=(function(e){const a=this.constructor.prototype,s=a[e],l=function(){return s.apply(l,arguments)};return Object.setPrototypeOf(l,a),l}),dV={}.hasOwnProperty;class o1 extends cV{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Wq()}copy(){const t=new o1;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Pm(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(qm("data",this.frozen),this.namespace[t]=n,this):dV.call(this.namespace,t)&&this.namespace[t]||void 0:t?(qm("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=n.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=bd(t),a=this.parser||this.Parser;return Fm("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),Fm("process",this.parser||this.Parser),$m("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(l,u){const f=bd(t),h=a.parse(f);a.run(h,f,function(p,g,y){if(p||!g||!y)return m(p);const T=g,S=a.stringify(T,y);mV(S)?y.value=S:y.result=S,m(p,y)});function m(p,g){p||!g?u(p):l?l(g):n(void 0,g)}}}processSync(t){let n=!1,a;return this.freeze(),Fm("processSync",this.parser||this.Parser),$m("processSync",this.compiler||this.Compiler),this.process(t,s),uv("processSync","process",n),a;function s(l,u){n=!0,iv(l),a=u}}run(t,n,a){ov(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?l(void 0,a):new Promise(l);function l(u,f){const h=bd(n);s.run(t,h,m);function m(p,g,y){const T=g||t;p?f(p):u?u(T):a(void 0,T,y)}}}runSync(t,n){let a=!1,s;return this.run(t,n,l),uv("runSync","run",a),s;function l(u,f){iv(u),s=f,a=!0}}stringify(t,n){this.freeze();const a=bd(n),s=this.compiler||this.Compiler;return $m("stringify",s),ov(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(qm("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function l(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[p,...g]=m;h(p,g)}else u(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function u(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(m.plugins),m.settings&&(s.settings=Pm(!0,s.settings,m.settings))}function f(m){let p=-1;if(m!=null)if(Array.isArray(m))for(;++p<m.length;){const g=m[p];l(g)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,p){let g=-1,y=-1;for(;++g<a.length;)if(a[g][0]===m){y=g;break}if(y===-1)a.push([m,...p]);else if(p.length>0){let[T,...S]=p;const k=a[y][1];jp(k)&&jp(T)&&(T=Pm(!0,k,T)),a[y]=[m,T,...S]}}}}const fV=new o1().freeze();function Fm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function $m(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function qm(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ov(e){if(!jp(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function uv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function bd(e){return hV(e)?e:new oV(e)}function hV(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mV(e){return typeof e=="string"||pV(e)}function pV(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function u1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var ms=u1();function ZC(e){ms=e}var Gi={exec:()=>null};function ht(e,t=""){let n=typeof e=="string"?e:e.source,a={replace:(s,l)=>{let u=typeof l=="string"?l:l.source;return u=u.replace(Dn.caret,"$1"),n=n.replace(s,u),a},getRegex:()=>new RegExp(n,t)};return a}var gV=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Dn={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},xV=/^(?:[ \t]*(?:\n|$))+/,bV=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,yV=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Mu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,EV=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,c1=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,JC=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,e_=ht(JC).replace(/bull/g,c1).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),TV=ht(JC).replace(/bull/g,c1).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),d1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,vV=/^[^\n]+/,f1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,SV=ht(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",f1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),kV=ht(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,c1).getRegex(),Bf="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",h1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,NV=ht("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",h1).replace("tag",Bf).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),t_=ht(d1).replace("hr",Mu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Bf).getRegex(),CV=ht(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",t_).getRegex(),m1={blockquote:CV,code:bV,def:SV,fences:yV,heading:EV,hr:Mu,html:NV,lheading:e_,list:kV,newline:xV,paragraph:t_,table:Gi,text:vV},cv=ht("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Mu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Bf).getRegex(),_V={...m1,lheading:TV,table:cv,paragraph:ht(d1).replace("hr",Mu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",cv).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Bf).getRegex()},AV={...m1,html:ht(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",h1).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Gi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ht(d1).replace("hr",Mu).replace("heading",` *#{1,6} *[^
112
+ ]`).replace("lheading",e_).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},wV=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,RV=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,n_=/^( {2,}|\\)\n(?!\s*$)/,OV=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Pf=/[\p{P}\p{S}]/u,p1=/[\s\p{P}\p{S}]/u,r_=/[^\s\p{P}\p{S}]/u,IV=ht(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,p1).getRegex(),a_=/(?!~)[\p{P}\p{S}]/u,DV=/(?!~)[\s\p{P}\p{S}]/u,LV=/(?:[^\s\p{P}\p{S}]|~)/u,i_=/(?![*_])[\p{P}\p{S}]/u,jV=/(?![*_])[\s\p{P}\p{S}]/u,MV=/(?:[^\s\p{P}\p{S}]|[*_])/u,BV=ht(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",gV?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),s_=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,PV=ht(s_,"u").replace(/punct/g,Pf).getRegex(),zV=ht(s_,"u").replace(/punct/g,a_).getRegex(),l_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",HV=ht(l_,"gu").replace(/notPunctSpace/g,r_).replace(/punctSpace/g,p1).replace(/punct/g,Pf).getRegex(),UV=ht(l_,"gu").replace(/notPunctSpace/g,LV).replace(/punctSpace/g,DV).replace(/punct/g,a_).getRegex(),FV=ht("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,r_).replace(/punctSpace/g,p1).replace(/punct/g,Pf).getRegex(),$V=ht(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,i_).getRegex(),qV="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",VV=ht(qV,"gu").replace(/notPunctSpace/g,MV).replace(/punctSpace/g,jV).replace(/punct/g,i_).getRegex(),YV=ht(/\\(punct)/,"gu").replace(/punct/g,Pf).getRegex(),GV=ht(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),XV=ht(h1).replace("(?:-->|$)","-->").getRegex(),QV=ht("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",XV).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Zd=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,WV=ht(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Zd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),o_=ht(/^!?\[(label)\]\[(ref)\]/).replace("label",Zd).replace("ref",f1).getRegex(),u_=ht(/^!?\[(ref)\](?:\[\])?/).replace("ref",f1).getRegex(),KV=ht("reflink|nolink(?!\\()","g").replace("reflink",o_).replace("nolink",u_).getRegex(),dv=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,g1={_backpedal:Gi,anyPunctuation:YV,autolink:GV,blockSkip:BV,br:n_,code:RV,del:Gi,delLDelim:Gi,delRDelim:Gi,emStrongLDelim:PV,emStrongRDelimAst:HV,emStrongRDelimUnd:FV,escape:wV,link:WV,nolink:u_,punctuation:IV,reflink:o_,reflinkSearch:KV,tag:QV,text:OV,url:Gi},ZV={...g1,link:ht(/^!?\[(label)\]\((.*?)\)/).replace("label",Zd).getRegex(),reflink:ht(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Zd).getRegex()},Bp={...g1,emStrongRDelimAst:UV,emStrongLDelim:zV,delLDelim:$V,delRDelim:VV,url:ht(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dv).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:ht(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",dv).getRegex()},JV={...Bp,br:ht(n_).replace("{2,}","*").getRegex(),text:ht(Bp.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},yd={normal:m1,gfm:_V,pedantic:AV},Ho={normal:g1,gfm:Bp,breaks:JV,pedantic:ZV},eY={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fv=e=>eY[e];function Yr(e,t){if(t){if(Dn.escapeTest.test(e))return e.replace(Dn.escapeReplace,fv)}else if(Dn.escapeTestNoEncode.test(e))return e.replace(Dn.escapeReplaceNoEncode,fv);return e}function hv(e){try{e=encodeURI(e).replace(Dn.percentDecode,"%")}catch{return null}return e}function mv(e,t){let n=e.replace(Dn.findPipe,(l,u,f)=>{let h=!1,m=u;for(;--m>=0&&f[m]==="\\";)h=!h;return h?"|":" |"}),a=n.split(Dn.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!a.at(-1)?.trim()&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(Dn.slashPipe,"|");return a}function Uo(e,t,n){let a=e.length;if(a===0)return"";let s=0;for(;s<a&&e.charAt(a-s-1)===t;)s++;return e.slice(0,a-s)}function tY(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])n++;else if(e[a]===t[1]&&(n--,n<0))return a;return n>0?-2:-1}function nY(e,t=0){let n=t,a="";for(let s of e)if(s===" "){let l=4-n%4;a+=" ".repeat(l),n+=l}else a+=s,n++;return a}function pv(e,t,n,a,s){let l=t.href,u=t.title||null,f=e[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let h={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:l,title:u,text:f,tokens:a.inlineTokens(f)};return a.state.inLink=!1,h}function rY(e,t,n){let a=e.match(n.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
113
+ `).map(l=>{let u=l.match(n.other.beginningSpace);if(u===null)return l;let[f]=u;return f.length>=s.length?l.slice(s.length):l}).join(`
114
+ `)}var Jd=class{options;rules;lexer;constructor(e){this.options=e||ms}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Uo(n,`
115
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],a=rY(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:a}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let a=Uo(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Uo(t[0],`
116
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Uo(t[0],`
117
+ `).split(`
118
+ `),a="",s="",l=[];for(;n.length>0;){let u=!1,f=[],h;for(h=0;h<n.length;h++)if(this.rules.other.blockquoteStart.test(n[h]))f.push(n[h]),u=!0;else if(!u)f.push(n[h]);else break;n=n.slice(h);let m=f.join(`
119
+ `),p=m.replace(this.rules.other.blockquoteSetextReplace,`
120
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
121
+ ${m}`:m,s=s?`${s}
122
+ ${p}`:p;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,l,!0),this.lexer.state.top=g,n.length===0)break;let y=l.at(-1);if(y?.type==="code")break;if(y?.type==="blockquote"){let T=y,S=T.raw+`
123
+ `+n.join(`
124
+ `),k=this.blockquote(S);l[l.length-1]=k,a=a.substring(0,a.length-T.raw.length)+k.raw,s=s.substring(0,s.length-T.text.length)+k.text;break}else if(y?.type==="list"){let T=y,S=T.raw+`
125
+ `+n.join(`
126
+ `),k=this.list(S);l[l.length-1]=k,a=a.substring(0,a.length-y.raw.length)+k.raw,s=s.substring(0,s.length-T.raw.length)+k.raw,n=S.substring(l.at(-1).raw.length).split(`
127
+ `);continue}}return{type:"blockquote",raw:a,tokens:l,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),a=n.length>1,s={type:"list",raw:"",ordered:a,start:a?+n.slice(0,-1):"",loose:!1,items:[]};n=a?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=a?n:"[*+-]");let l=this.rules.other.listItemRegex(n),u=!1;for(;e;){let h=!1,m="",p="";if(!(t=l.exec(e))||this.rules.block.hr.test(e))break;m=t[0],e=e.substring(m.length);let g=nY(t[2].split(`
128
+ `,1)[0],t[1].length),y=e.split(`
129
+ `,1)[0],T=!g.trim(),S=0;if(this.options.pedantic?(S=2,p=g.trimStart()):T?S=t[1].length+1:(S=g.search(this.rules.other.nonSpaceChar),S=S>4?1:S,p=g.slice(S),S+=t[1].length),T&&this.rules.other.blankLine.test(y)&&(m+=y+`
130
+ `,e=e.substring(y.length+1),h=!0),!h){let k=this.rules.other.nextBulletRegex(S),N=this.rules.other.hrRegex(S),_=this.rules.other.fencesBeginRegex(S),A=this.rules.other.headingBeginRegex(S),w=this.rules.other.htmlBeginRegex(S),P=this.rules.other.blockquoteBeginRegex(S);for(;e;){let F=e.split(`
131
+ `,1)[0],M;if(y=F,this.options.pedantic?(y=y.replace(this.rules.other.listReplaceNesting," "),M=y):M=y.replace(this.rules.other.tabCharGlobal," "),_.test(y)||A.test(y)||w.test(y)||P.test(y)||k.test(y)||N.test(y))break;if(M.search(this.rules.other.nonSpaceChar)>=S||!y.trim())p+=`
132
+ `+M.slice(S);else{if(T||g.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||_.test(g)||A.test(g)||N.test(g))break;p+=`
133
+ `+y}T=!y.trim(),m+=F+`
134
+ `,e=e.substring(F.length+1),g=M.slice(S)}}s.loose||(u?s.loose=!0:this.rules.other.doubleBlankLine.test(m)&&(u=!0)),s.items.push({type:"list_item",raw:m,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),s.raw+=m}let f=s.items.at(-1);if(f)f.raw=f.raw.trimEnd(),f.text=f.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let h of s.items){if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),h.task){if(h.text=h.text.replace(this.rules.other.listReplaceTask,""),h.tokens[0]?.type==="text"||h.tokens[0]?.type==="paragraph"){h.tokens[0].raw=h.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),h.tokens[0].text=h.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let p=this.lexer.inlineQueue.length-1;p>=0;p--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[p].src)){this.lexer.inlineQueue[p].src=this.lexer.inlineQueue[p].src.replace(this.rules.other.listReplaceTask,"");break}}let m=this.rules.other.listTaskCheckbox.exec(h.raw);if(m){let p={type:"checkbox",raw:m[0]+" ",checked:m[0]!=="[ ]"};h.checked=p.checked,s.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=p.raw+h.tokens[0].raw,h.tokens[0].text=p.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(p)):h.tokens.unshift({type:"paragraph",raw:p.raw,text:p.raw,tokens:[p]}):h.tokens.unshift(p)}}if(!s.loose){let m=h.tokens.filter(g=>g.type==="space"),p=m.length>0&&m.some(g=>this.rules.other.anyLine.test(g.raw));s.loose=p}}if(s.loose)for(let h of s.items){h.loose=!0;for(let m of h.tokens)m.type==="text"&&(m.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:a,title:s}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=mv(t[1]),a=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
135
+ `):[],l={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let u of a)this.rules.other.tableAlignRight.test(u)?l.align.push("right"):this.rules.other.tableAlignCenter.test(u)?l.align.push("center"):this.rules.other.tableAlignLeft.test(u)?l.align.push("left"):l.align.push(null);for(let u=0;u<n.length;u++)l.header.push({text:n[u],tokens:this.lexer.inline(n[u]),header:!0,align:l.align[u]});for(let u of s)l.rows.push(mv(u,l.header.length).map((f,h)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:l.align[h]})));return l}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
136
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let l=Uo(n.slice(0,-1),"\\");if((n.length-l.length)%2===0)return}else{let l=tY(t[2],"()");if(l===-2)return;if(l>-1){let u=(t[0].indexOf("!")===0?5:4)+t[1].length+l;t[2]=t[2].substring(0,l),t[0]=t[0].substring(0,u).trim(),t[3]=""}}let a=t[2],s="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(a);l&&(a=l[1],s=l[3])}else s=t[3]?t[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?a=a.slice(1):a=a.slice(1,-1)),pv(t,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[a.toLowerCase()];if(!s){let l=n[0].charAt(0);return{type:"text",raw:l,text:l}}return pv(n,s,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||a[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[2])||!n||this.rules.inline.punctuation.exec(n))){let s=[...a[0]].length-1,l,u,f=s,h=0,m=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(m.lastIndex=0,t=t.slice(-1*e.length+s);(a=m.exec(t))!=null;){if(l=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!l)continue;if(u=[...l].length,a[3]||a[4]){f+=u;continue}else if((a[5]||a[6])&&s%3&&!((s+u)%3)){h+=u;continue}if(f-=u,f>0)continue;u=Math.min(u,u+f+h);let p=[...a[0]][0].length,g=e.slice(0,s+a.index+p+u);if(Math.min(s,u)%2){let T=g.slice(1,-1);return{type:"em",raw:g,text:T,tokens:this.lexer.inlineTokens(T)}}let y=g.slice(2,-2);return{type:"strong",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let a=this.rules.inline.delLDelim.exec(e);if(a&&(!a[1]||!n||this.rules.inline.punctuation.exec(n))){let s=[...a[0]].length-1,l,u,f=s,h=this.rules.inline.delRDelim;for(h.lastIndex=0,t=t.slice(-1*e.length+s);(a=h.exec(t))!=null;){if(l=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!l||(u=[...l].length,u!==s))continue;if(a[3]||a[4]){f+=u;continue}if(f-=u,f>0)continue;u=Math.min(u,u+f);let m=[...a[0]][0].length,p=e.slice(0,s+a.index+m+u),g=p.slice(s,-s);return{type:"del",raw:p,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,a;return t[2]==="@"?(n=t[1],a="mailto:"+n):(n=t[1],a=n),{type:"link",raw:t[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,a;if(t[2]==="@")n=t[0],a="mailto:"+n;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);n=t[0],t[1]==="www."?a="http://"+t[0]:a=t[0]}return{type:"link",raw:t[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Er=class Pp{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||ms,this.options.tokenizer=this.options.tokenizer||new Jd,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:Dn,block:yd.normal,inline:Ho.normal};this.options.pedantic?(n.block=yd.pedantic,n.inline=Ho.pedantic):this.options.gfm&&(n.block=yd.gfm,this.options.breaks?n.inline=Ho.breaks:n.inline=Ho.gfm),this.tokenizer.rules=n}static get rules(){return{block:yd,inline:Ho}}static lex(t,n){return new Pp(n).lex(t)}static lexInline(t,n){return new Pp(n).inlineTokens(t)}lex(t){t=t.replace(Dn.carriageReturn,`
137
+ `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let a=this.inlineQueue[n];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],a=!1){for(this.options.pedantic&&(t=t.replace(Dn.tabCharGlobal," ").replace(Dn.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(u=>(s=u.call({lexer:this},t,n))?(t=t.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let u=n.at(-1);s.raw.length===1&&u!==void 0?u.raw+=`
138
+ `:n.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let u=n.at(-1);u?.type==="paragraph"||u?.type==="text"?(u.raw+=(u.raw.endsWith(`
139
+ `)?"":`
140
+ `)+s.raw,u.text+=`
141
+ `+s.text,this.inlineQueue.at(-1).src=u.text):n.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let u=n.at(-1);u?.type==="paragraph"||u?.type==="text"?(u.raw+=(u.raw.endsWith(`
142
+ `)?"":`
143
+ `)+s.raw,u.text+=`
144
+ `+s.raw,this.inlineQueue.at(-1).src=u.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},n.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),n.push(s);continue}let l=t;if(this.options.extensions?.startBlock){let u=1/0,f=t.slice(1),h;this.options.extensions.startBlock.forEach(m=>{h=m.call({lexer:this},f),typeof h=="number"&&h>=0&&(u=Math.min(u,h))}),u<1/0&&u>=0&&(l=t.substring(0,u+1))}if(this.state.top&&(s=this.tokenizer.paragraph(l))){let u=n.at(-1);a&&u?.type==="paragraph"?(u.raw+=(u.raw.endsWith(`
145
+ `)?"":`
146
+ `)+s.raw,u.text+=`
147
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(s),a=l.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let u=n.at(-1);u?.type==="text"?(u.raw+=(u.raw.endsWith(`
148
+ `)?"":`
149
+ `)+s.raw,u.text+=`
150
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=u.text):n.push(s);continue}if(t){let u="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(u);break}else throw new Error(u)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let a=t,s=null;if(this.tokens.links){let h=Object.keys(this.tokens.links);if(h.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!=null;)h.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!=null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let l;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!=null;)l=s[2]?s[2].length:0,a=a.slice(0,s.index+l)+"["+"a".repeat(s[0].length-l-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=this.options.hooks?.emStrongMask?.call({lexer:this},a)??a;let u=!1,f="";for(;t;){u||(f=""),u=!1;let h;if(this.options.extensions?.inline?.some(p=>(h=p.call({lexer:this},t,n))?(t=t.substring(h.raw.length),n.push(h),!0):!1))continue;if(h=this.tokenizer.escape(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.tag(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.link(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(h.raw.length);let p=n.at(-1);h.type==="text"&&p?.type==="text"?(p.raw+=h.raw,p.text+=h.text):n.push(h);continue}if(h=this.tokenizer.emStrong(t,a,f)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.codespan(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.br(t)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.del(t,a,f)){t=t.substring(h.raw.length),n.push(h);continue}if(h=this.tokenizer.autolink(t)){t=t.substring(h.raw.length),n.push(h);continue}if(!this.state.inLink&&(h=this.tokenizer.url(t))){t=t.substring(h.raw.length),n.push(h);continue}let m=t;if(this.options.extensions?.startInline){let p=1/0,g=t.slice(1),y;this.options.extensions.startInline.forEach(T=>{y=T.call({lexer:this},g),typeof y=="number"&&y>=0&&(p=Math.min(p,y))}),p<1/0&&p>=0&&(m=t.substring(0,p+1))}if(h=this.tokenizer.inlineText(m)){t=t.substring(h.raw.length),h.raw.slice(-1)!=="_"&&(f=h.raw.slice(-1)),u=!0;let p=n.at(-1);p?.type==="text"?(p.raw+=h.raw,p.text+=h.text):n.push(h);continue}if(t){let p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return n}},ef=class{options;parser;constructor(e){this.options=e||ms}space(e){return""}code({text:e,lang:t,escaped:n}){let a=(t||"").match(Dn.notSpaceStart)?.[0],s=e.replace(Dn.endingNewline,"")+`
151
+ `;return a?'<pre><code class="language-'+Yr(a)+'">'+(n?s:Yr(s,!0))+`</code></pre>
152
+ `:"<pre><code>"+(n?s:Yr(s,!0))+`</code></pre>
153
+ `}blockquote({tokens:e}){return`<blockquote>
154
+ ${this.parser.parse(e)}</blockquote>
155
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
156
+ `}hr(e){return`<hr>
157
+ `}list(e){let t=e.ordered,n=e.start,a="";for(let u=0;u<e.items.length;u++){let f=e.items[u];a+=this.listitem(f)}let s=t?"ol":"ul",l=t&&n!==1?' start="'+n+'"':"";return"<"+s+l+`>
158
+ `+a+"</"+s+`>
159
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
160
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
161
+ `}table(e){let t="",n="";for(let s=0;s<e.header.length;s++)n+=this.tablecell(e.header[s]);t+=this.tablerow({text:n});let a="";for(let s=0;s<e.rows.length;s++){let l=e.rows[s];n="";for(let u=0;u<l.length;u++)n+=this.tablecell(l[u]);a+=this.tablerow({text:n})}return a&&(a=`<tbody>${a}</tbody>`),`<table>
162
+ <thead>
163
+ `+t+`</thead>
164
+ `+a+`</table>
165
+ `}tablerow({text:e}){return`<tr>
166
+ ${e}</tr>
167
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
168
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Yr(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let a=this.parser.parseInline(n),s=hv(e);if(s===null)return a;e=s;let l='<a href="'+e+'"';return t&&(l+=' title="'+Yr(t)+'"'),l+=">"+a+"</a>",l}image({href:e,title:t,text:n,tokens:a}){a&&(n=this.parser.parseInline(a,this.parser.textRenderer));let s=hv(e);if(s===null)return Yr(n);e=s;let l=`<img src="${e}" alt="${Yr(n)}"`;return t&&(l+=` title="${Yr(t)}"`),l+=">",l}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:Yr(e.text)}},x1=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},Dr=class zp{options;renderer;textRenderer;constructor(t){this.options=t||ms,this.options.renderer=this.options.renderer||new ef,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new x1}static parse(t,n){return new zp(n).parse(t)}static parseInline(t,n){return new zp(n).parseInline(t)}parse(t){let n="";for(let a=0;a<t.length;a++){let s=t[a];if(this.options.extensions?.renderers?.[s.type]){let u=s,f=this.options.extensions.renderers[u.type].call({parser:this},u);if(f!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(u.type)){n+=f||"";continue}}let l=s;switch(l.type){case"space":{n+=this.renderer.space(l);break}case"hr":{n+=this.renderer.hr(l);break}case"heading":{n+=this.renderer.heading(l);break}case"code":{n+=this.renderer.code(l);break}case"table":{n+=this.renderer.table(l);break}case"blockquote":{n+=this.renderer.blockquote(l);break}case"list":{n+=this.renderer.list(l);break}case"checkbox":{n+=this.renderer.checkbox(l);break}case"html":{n+=this.renderer.html(l);break}case"def":{n+=this.renderer.def(l);break}case"paragraph":{n+=this.renderer.paragraph(l);break}case"text":{n+=this.renderer.text(l);break}default:{let u='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(u),"";throw new Error(u)}}}return n}parseInline(t,n=this.renderer){let a="";for(let s=0;s<t.length;s++){let l=t[s];if(this.options.extensions?.renderers?.[l.type]){let f=this.options.extensions.renderers[l.type].call({parser:this},l);if(f!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(l.type)){a+=f||"";continue}}let u=l;switch(u.type){case"escape":{a+=n.text(u);break}case"html":{a+=n.html(u);break}case"link":{a+=n.link(u);break}case"image":{a+=n.image(u);break}case"checkbox":{a+=n.checkbox(u);break}case"strong":{a+=n.strong(u);break}case"em":{a+=n.em(u);break}case"codespan":{a+=n.codespan(u);break}case"br":{a+=n.br(u);break}case"del":{a+=n.del(u);break}case"text":{a+=n.text(u);break}default:{let f='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(f),"";throw new Error(f)}}}return a}},Yo=class{options;block;constructor(e){this.options=e||ms}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Er.lex:Er.lexInline}provideParser(){return this.block?Dr.parse:Dr.parseInline}},aY=class{defaults=u1();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Dr;Renderer=ef;TextRenderer=x1;Lexer=Er;Tokenizer=Jd;Hooks=Yo;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let a of e)switch(n=n.concat(t.call(this,a)),a.type){case"table":{let s=a;for(let l of s.header)n=n.concat(this.walkTokens(l.tokens,t));for(let l of s.rows)for(let u of l)n=n.concat(this.walkTokens(u.tokens,t));break}case"list":{let s=a;n=n.concat(this.walkTokens(s.items,t));break}default:{let s=a;this.defaults.extensions?.childTokens?.[s.type]?this.defaults.extensions.childTokens[s.type].forEach(l=>{let u=s[l].flat(1/0);n=n.concat(this.walkTokens(u,t))}):s.tokens&&(n=n.concat(this.walkTokens(s.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let a={...n};if(a.async=this.defaults.async||a.async||!1,n.extensions&&(n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if("renderer"in s){let l=t.renderers[s.name];l?t.renderers[s.name]=function(...u){let f=s.renderer.apply(this,u);return f===!1&&(f=l.apply(this,u)),f}:t.renderers[s.name]=s.renderer}if("tokenizer"in s){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=t[s.level];l?l.unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}"childTokens"in s&&s.childTokens&&(t.childTokens[s.name]=s.childTokens)}),a.extensions=t),n.renderer){let s=this.defaults.renderer||new ef(this.defaults);for(let l in n.renderer){if(!(l in s))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let u=l,f=n.renderer[u],h=s[u];s[u]=(...m)=>{let p=f.apply(s,m);return p===!1&&(p=h.apply(s,m)),p||""}}a.renderer=s}if(n.tokenizer){let s=this.defaults.tokenizer||new Jd(this.defaults);for(let l in n.tokenizer){if(!(l in s))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let u=l,f=n.tokenizer[u],h=s[u];s[u]=(...m)=>{let p=f.apply(s,m);return p===!1&&(p=h.apply(s,m)),p}}a.tokenizer=s}if(n.hooks){let s=this.defaults.hooks||new Yo;for(let l in n.hooks){if(!(l in s))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let u=l,f=n.hooks[u],h=s[u];Yo.passThroughHooks.has(l)?s[u]=m=>{if(this.defaults.async&&Yo.passThroughHooksRespectAsync.has(l))return(async()=>{let g=await f.call(s,m);return h.call(s,g)})();let p=f.call(s,m);return h.call(s,p)}:s[u]=(...m)=>{if(this.defaults.async)return(async()=>{let g=await f.apply(s,m);return g===!1&&(g=await h.apply(s,m)),g})();let p=f.apply(s,m);return p===!1&&(p=h.apply(s,m)),p}}a.hooks=s}if(n.walkTokens){let s=this.defaults.walkTokens,l=n.walkTokens;a.walkTokens=function(u){let f=[];return f.push(l.call(this,u)),s&&(f=f.concat(s.call(this,u))),f}}this.defaults={...this.defaults,...a}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Er.lex(e,t??this.defaults)}parser(e,t){return Dr.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let a={...n},s={...this.defaults,...a},l=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&a.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(s.hooks&&(s.hooks.options=s,s.hooks.block=e),s.async)return(async()=>{let u=s.hooks?await s.hooks.preprocess(t):t,f=await(s.hooks?await s.hooks.provideLexer():e?Er.lex:Er.lexInline)(u,s),h=s.hooks?await s.hooks.processAllTokens(f):f;s.walkTokens&&await Promise.all(this.walkTokens(h,s.walkTokens));let m=await(s.hooks?await s.hooks.provideParser():e?Dr.parse:Dr.parseInline)(h,s);return s.hooks?await s.hooks.postprocess(m):m})().catch(l);try{s.hooks&&(t=s.hooks.preprocess(t));let u=(s.hooks?s.hooks.provideLexer():e?Er.lex:Er.lexInline)(t,s);s.hooks&&(u=s.hooks.processAllTokens(u)),s.walkTokens&&this.walkTokens(u,s.walkTokens);let f=(s.hooks?s.hooks.provideParser():e?Dr.parse:Dr.parseInline)(u,s);return s.hooks&&(f=s.hooks.postprocess(f)),f}catch(u){return l(u)}}}onError(e,t){return n=>{if(n.message+=`
169
+ Please report this to https://github.com/markedjs/marked.`,e){let a="<p>An error occurred:</p><pre>"+Yr(n.message+"",!0)+"</pre>";return t?Promise.resolve(a):a}if(t)return Promise.reject(n);throw n}}},ls=new aY;function Ct(e,t){return ls.parse(e,t)}Ct.options=Ct.setOptions=function(e){return ls.setOptions(e),Ct.defaults=ls.defaults,ZC(Ct.defaults),Ct};Ct.getDefaults=u1;Ct.defaults=ms;Ct.use=function(...e){return ls.use(...e),Ct.defaults=ls.defaults,ZC(Ct.defaults),Ct};Ct.walkTokens=function(e,t){return ls.walkTokens(e,t)};Ct.parseInline=ls.parseInline;Ct.Parser=Dr;Ct.parser=Dr.parse;Ct.Renderer=ef;Ct.TextRenderer=x1;Ct.Lexer=Er;Ct.lexer=Er.lex;Ct.Tokenizer=Jd;Ct.Hooks=Yo;Ct.parse=Ct;Ct.options;Ct.setOptions;Ct.use;Ct.walkTokens;Ct.parseInline;Dr.parse;Er.lex;var iY=300,sY="300px",lY=500;function oY(e={}){let{immediate:t=!1,debounceDelay:n=iY,rootMargin:a=sY,idleTimeout:s=lY}=e,[l,u]=v.useState(!1),f=v.useRef(null),h=v.useRef(null),m=v.useRef(null),p=v.useMemo(()=>T=>{let S=Date.now();return window.setTimeout(()=>{T({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-S))})},1)},[]),g=v.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(T,S)=>window.requestIdleCallback(T,S):p,[p]),y=v.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?T=>window.cancelIdleCallback(T):T=>{clearTimeout(T)},[]);return v.useEffect(()=>{if(t){u(!0);return}let T=f.current;if(!T)return;h.current&&(clearTimeout(h.current),h.current=null),m.current&&(y(m.current),m.current=null);let S=()=>{h.current&&(clearTimeout(h.current),h.current=null),m.current&&(y(m.current),m.current=null)},k=w=>{m.current=g(P=>{P.timeRemaining()>0||P.didTimeout?(u(!0),w.disconnect()):m.current=g(()=>{u(!0),w.disconnect()},{timeout:s/2})},{timeout:s})},N=w=>{S(),h.current=window.setTimeout(()=>{var P,F;let M=w.takeRecords();(M.length===0||(F=(P=M.at(-1))==null?void 0:P.isIntersecting)!=null&&F)&&k(w)},n)},_=(w,P)=>{w.isIntersecting?N(P):S()},A=new IntersectionObserver(w=>{for(let P of w)_(P,A)},{rootMargin:a,threshold:0});return A.observe(T),()=>{h.current&&clearTimeout(h.current),m.current&&y(m.current),A.disconnect()}},[t,n,a,s,y,g]),{shouldRender:l,containerRef:f}}var c_=/\s/,uY=/^\s+$/,cY=new Set(["code","pre","svg","math","annotation"]),dY=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",fY=e=>e.some(t=>dY(t)&&cY.has(t.tagName)),hY=e=>{let t=[],n="",a=!1;for(let s of e){let l=c_.test(s);l!==a&&n&&(t.push(n),n=""),n+=s,a=l}return n&&t.push(n),t},mY=e=>{let t=[],n="";for(let a of e)c_.test(a)?n+=a:(n&&(t.push(n),n=""),t.push(a));return n&&t.push(n),t},pY=(e,t,n,a)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${a}`},children:[{type:"text",value:e}]}),gY=(e,t,n)=>{let a=t.at(-1);if(!(a&&"children"in a))return;if(fY(t))return cl;let s=a,l=s.children.indexOf(e);if(l===-1)return;let u=e.value;if(!u.trim())return;let f=(n.sep==="char"?mY(u):hY(u)).map(h=>uY.test(h)?{type:"text",value:h}:pY(h,n.animation,n.duration,n.easing));return s.children.splice(l,1,...f),l+f.length};function Hp(e){var t,n,a,s;let l={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(a=e?.easing)!=null?a:"ease",sep:(s=e?.sep)!=null?s:"word"};return{name:"animate",type:"animate",rehypePlugin:()=>u=>{zg(u,"text",(f,h)=>gY(f,h,l))}}}Hp();var d_=v.createContext(!1),xY=()=>v.useContext(d_),Ge=(...e)=>pk(ek(e)),bl=(e,t,n)=>{let a=typeof t=="string"?new Blob([t],{type:n}):t,s=URL.createObjectURL(a),l=document.createElement("a");l.href=s,l.download=e,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(s)},bY=Ge("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),yY=e=>{let t={};for(let n of e.split(";")){let a=n.indexOf(":");if(a>0){let s=n.slice(0,a).trim(),l=n.slice(a+1).trim();s&&l&&(t[s]=l)}}return t},EY=v.memo(({children:e,result:t,language:n,className:a,...s})=>{let l=v.useMemo(()=>{let u={};return t.bg&&(u["--sdm-bg"]=t.bg),t.fg&&(u["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(u,yY(t.rootStyle)),u},[t.bg,t.fg,t.rootStyle]);return c.jsx("div",{className:Ge(a,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...s,children:c.jsx("pre",{className:Ge(a,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:l,children:c.jsx("code",{className:"[counter-increment:line_0] [counter-reset:line]",children:t.tokens.map((u,f)=>c.jsx("span",{className:bY,children:u.map((h,m)=>{let p={},g=!!h.bgColor;if(h.color&&(p["--sdm-c"]=h.color),h.bgColor&&(p["--sdm-tbg"]=h.bgColor),h.htmlStyle)for(let[y,T]of Object.entries(h.htmlStyle))y==="color"?p["--sdm-c"]=T:y==="background-color"?(p["--sdm-tbg"]=T,g=!0):p[y]=T;return c.jsx("span",{className:Ge("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",g&&"bg-[var(--sdm-tbg)]",g&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:p,...h.htmlAttrs,children:h.content},m)})},f))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className),TY=({className:e,language:t,style:n,isIncomplete:a,...s})=>c.jsx("div",{className:Ge("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":a||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...s}),f_=v.createContext({code:""}),h_=()=>v.useContext(f_),vY=({language:e})=>c.jsx("div",{className:"flex h-8 items-center text-muted-foreground text-xs","data-language":e,"data-streamdown":"code-block-header",children:c.jsx("span",{className:"ml-1 font-mono lowercase",children:e})}),SY=/\n+$/,kY=v.lazy(()=>Zk(()=>import("./highlighted-body-B3W2YXNL-D2MTYyJz.js"),[],import.meta.url).then(e=>({default:e.HighlightedCodeBlockBody}))),NY=({code:e,language:t,className:n,children:a,isIncomplete:s=!1,...l})=>{let u=v.useMemo(()=>e.replace(SY,""),[e]),f=v.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:u.split(`
170
+ `).map(h=>[{content:h,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[u]);return c.jsx(f_.Provider,{value:{code:e},children:c.jsxs(TY,{isIncomplete:s,language:t,children:[c.jsx(vY,{language:t}),a?c.jsx("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:c.jsx("div",{className:"pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur","data-streamdown":"code-block-actions",children:a})}):null,c.jsx(v.Suspense,{fallback:c.jsx(EY,{className:n,language:t,result:f,...l}),children:c.jsx(kY,{className:n,code:u,language:t,raw:f,...l})})]})})},b1=e=>c.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:c.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),y1=e=>c.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:c.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),zf=e=>c.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:c.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),CY=e=>c.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[c.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),c.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),_Y=e=>c.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:c.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),AY=e=>c.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:c.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),m_=e=>c.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:c.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),gv=e=>c.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:c.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),wY=e=>c.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:c.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),RY=e=>c.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:c.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),xv=({onCopy:e,onError:t,timeout:n=2e3,children:a,className:s,code:l,...u})=>{let[f,h]=v.useState(!1),m=v.useRef(0),{code:p}=h_(),{isAnimating:g}=v.useContext(kr),y=l??p,T=async()=>{var k;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.writeText)){t?.(new Error("Clipboard API not available"));return}try{f||(await navigator.clipboard.writeText(y),h(!0),e?.(),m.current=window.setTimeout(()=>h(!1),n))}catch(N){t?.(N)}};v.useEffect(()=>()=>{window.clearTimeout(m.current)},[]);let S=f?b1:y1;return c.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-copy-button",disabled:g,onClick:T,title:"Copy Code",type:"button",...u,children:a??c.jsx(S,{size:14})})},bv={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},OY=({onDownload:e,onError:t,language:n,children:a,className:s,code:l,...u})=>{let{code:f}=h_(),{isAnimating:h}=v.useContext(kr),m=l??f,p=`file.${n&&n in bv?bv[n]:"txt"}`,g="text/plain",y=()=>{try{bl(p,m,g),e?.()}catch(T){t?.(T)}};return c.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-download-button",disabled:h,onClick:y,title:"Download file",type:"button",...u,children:a??c.jsx(zf,{size:14})})},IY=()=>c.jsxs("div",{className:"w-full divide-y divide-border overflow-hidden rounded-xl border border-border",children:[c.jsx("div",{className:"h-[46px] w-full bg-muted/80"}),c.jsx("div",{className:"flex w-full items-center justify-center p-4",children:c.jsx(CY,{className:"size-4 animate-spin"})})]}),DY=/\.[^/.]+$/,LY=({node:e,className:t,src:n,alt:a,onLoad:s,onError:l,...u})=>{let f=v.useRef(null),[h,m]=v.useState(!1),[p,g]=v.useState(!1),y=u.width!=null||u.height!=null,T=(h||y)&&!p,S=p&&!y;v.useEffect(()=>{let A=f.current;if(A!=null&&A.complete){let w=A.naturalWidth>0;m(w),g(!w)}},[]);let k=v.useCallback(A=>{m(!0),g(!1),s?.(A)},[s]),N=v.useCallback(A=>{m(!1),g(!0),l?.(A)},[l]),_=async()=>{if(n)try{let A=await(await fetch(n)).blob(),w=new URL(n,window.location.origin).pathname.split("/").pop()||"",P=w.split(".").pop(),F=w.includes(".")&&P!==void 0&&P.length<=4,M="";if(F)M=w;else{let I=A.type,j="png";I.includes("jpeg")||I.includes("jpg")?j="jpg":I.includes("png")?j="png":I.includes("svg")?j="svg":I.includes("gif")?j="gif":I.includes("webp")&&(j="webp"),M=`${(a||w||"image").replace(DY,"")}.${j}`}bl(M,A,A.type)}catch{window.open(n,"_blank")}};return n?c.jsxs("div",{className:"group relative my-4 inline-block","data-streamdown":"image-wrapper",children:[c.jsx("img",{alt:a,className:Ge("max-w-full rounded-lg",S&&"hidden",t),"data-streamdown":"image",onError:N,onLoad:k,ref:f,src:n,...u}),S&&c.jsx("span",{className:"text-muted-foreground text-xs italic","data-streamdown":"image-fallback",children:"Image not available"}),c.jsx("div",{className:"pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block"}),T&&c.jsx("button",{className:Ge("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:_,title:"Download image",type:"button",children:c.jsx(zf,{size:14})})]}):null},au=0,jY=()=>{au+=1,au===1&&(document.body.style.overflow="hidden")},MY=()=>{au=Math.max(0,au-1),au===0&&(document.body.style.overflow="")},BY=({url:e,isOpen:t,onClose:n,onConfirm:a})=>{let[s,l]=v.useState(!1),u=v.useCallback(async()=>{try{await navigator.clipboard.writeText(e),l(!0),setTimeout(()=>l(!1),2e3)}catch{}},[e]),f=v.useCallback(()=>{a(),n()},[a,n]);return v.useEffect(()=>{if(t){jY();let h=m=>{m.key==="Escape"&&n()};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),MY()}}},[t,n]),t?c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm","data-streamdown":"link-safety-modal",onClick:n,onKeyDown:h=>{h.key==="Escape"&&n()},role:"button",tabIndex:0,children:c.jsxs("div",{className:"relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg",onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:[c.jsx("button",{className:"absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:n,title:"Close",type:"button",children:c.jsx(m_,{size:16})}),c.jsxs("div",{className:"flex flex-col gap-2",children:[c.jsxs("div",{className:"flex items-center gap-2 font-semibold text-lg",children:[c.jsx(gv,{size:20}),c.jsx("span",{children:"Open external link?"})]}),c.jsx("p",{className:"text-muted-foreground text-sm",children:"You're about to visit an external website."})]}),c.jsx("div",{className:Ge("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted",onClick:u,type:"button",children:s?c.jsxs(c.Fragment,{children:[c.jsx(b1,{size:14}),c.jsx("span",{children:"Copied"})]}):c.jsxs(c.Fragment,{children:[c.jsx(y1,{size:14}),c.jsx("span",{children:"Copy link"})]})}),c.jsxs("button",{className:"flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90",onClick:f,type:"button",children:[c.jsx(gv,{size:14}),c.jsx("span",{children:"Open link"})]})]})]})}):null},Up=v.createContext(null),p_=()=>v.useContext(Up),kX=()=>{var e;let t=p_();return(e=t?.code)!=null?e:null},E1=()=>{var e;let t=p_();return(e=t?.mermaid)!=null?e:null},PY=(e,t)=>{var n;let a=(n=void 0)!=null?n:5;return new Promise((s,l)=>{let u="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),f=new Image;f.crossOrigin="anonymous",f.onload=()=>{let h=document.createElement("canvas"),m=f.width*a,p=f.height*a;h.width=m,h.height=p;let g=h.getContext("2d");if(!g){l(new Error("Failed to create 2D canvas context for PNG export"));return}g.drawImage(f,0,0,m,p),h.toBlob(y=>{if(!y){l(new Error("Failed to create PNG blob"));return}s(y)},"image/png")},f.onerror=()=>l(new Error("Failed to load SVG image")),f.src=u})},zY=({chart:e,children:t,className:n,onDownload:a,config:s,onError:l})=>{let[u,f]=v.useState(!1),h=v.useRef(null),{isAnimating:m}=v.useContext(kr),p=E1(),g=async y=>{try{if(y==="mmd"){bl("diagram.mmd",e,"text/plain"),f(!1),a?.(y);return}if(!p){l?.(new Error("Mermaid plugin not available"));return}let T=p.getMermaid(s),S=e.split("").reduce((_,A)=>(_<<5)-_+A.charCodeAt(0)|0,0),k=`mermaid-${Math.abs(S)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await T.render(k,e);if(!N){l?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(y==="svg"){bl("diagram.svg",N,"image/svg+xml"),f(!1),a?.(y);return}if(y==="png"){let _=await PY(N);bl("diagram.png",_,"image/png"),a?.(y),f(!1);return}}catch(T){l?.(T)}};return v.useEffect(()=>{let y=T=>{let S=T.composedPath();h.current&&!S.includes(h.current)&&f(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),c.jsxs("div",{className:"relative",ref:h,children:[c.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:m,onClick:()=>f(!u),title:"Download diagram",type:"button",children:t??c.jsx(zf,{size:14})}),u?c.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[c.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>g("svg"),title:"Download diagram as SVG",type:"button",children:"SVG"}),c.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>g("png"),title:"Download diagram as PNG",type:"button",children:"PNG"}),c.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>g("mmd"),title:"Download diagram as MMD",type:"button",children:"MMD"})]}):null]})},iu=0,HY=()=>{iu+=1,iu===1&&(document.body.style.overflow="hidden")},UY=()=>{iu=Math.max(0,iu-1),iu===0&&(document.body.style.overflow="")},FY=({chart:e,config:t,onFullscreen:n,onExit:a,className:s,...l})=>{let[u,f]=v.useState(!1),{isAnimating:h,controls:m}=v.useContext(kr),p=(()=>{if(typeof m=="boolean")return m;let y=m.mermaid;return y===!1?!1:y===!0||y===void 0?!0:y.panZoom!==!1})(),g=()=>{f(!u)};return v.useEffect(()=>{if(u){HY();let y=T=>{T.key==="Escape"&&f(!1)};return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y),UY()}}},[u]),v.useEffect(()=>{u?n?.():a&&a()},[u,n,a]),c.jsxs(c.Fragment,{children:[c.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),disabled:h,onClick:g,title:"View fullscreen",type:"button",...l,children:c.jsx(_Y,{size:14})}),u?Nl.createPortal(c.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm",onClick:g,onKeyDown:y=>{y.key==="Escape"&&g()},role:"button",tabIndex:0,children:[c.jsx("button",{className:"absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground",onClick:g,title:"Exit fullscreen",type:"button",children:c.jsx(m_,{size:20})}),c.jsx("div",{className:"flex size-full items-center justify-center p-4",onClick:y=>y.stopPropagation(),onKeyDown:y=>y.stopPropagation(),role:"presentation",children:c.jsx(V_,{chart:e,className:"size-full [&_svg]:h-auto [&_svg]:w-auto",config:t,fullscreen:!0,showControls:p})})]}),document.body):null]})},g_=e=>{var t,n;let a=[],s=[],l=e.querySelectorAll("thead th");for(let f of l)a.push(((t=f.textContent)==null?void 0:t.trim())||"");let u=e.querySelectorAll("tbody tr");for(let f of u){let h=[],m=f.querySelectorAll("td");for(let p of m)h.push(((n=p.textContent)==null?void 0:n.trim())||"");s.push(h)}return{headers:a,rows:s}},x_=e=>{let{headers:t,rows:n}=e,a=f=>{let h=!1,m=!1;for(let p of f){if(p==='"'){h=!0,m=!0;break}(p===","||p===`
171
+ `)&&(h=!0)}return h?m?`"${f.replace(/"/g,'""')}"`:`"${f}"`:f},s=t.length>0?n.length+1:n.length,l=new Array(s),u=0;t.length>0&&(l[u]=t.map(a).join(","),u+=1);for(let f of n)l[u]=f.map(a).join(","),u+=1;return l.join(`
172
+ `)},$Y=e=>{let{headers:t,rows:n}=e,a=f=>{let h=!1;for(let p of f)if(p===" "||p===`
173
+ `||p==="\r"){h=!0;break}if(!h)return f;let m=[];for(let p of f)p===" "?m.push("\\t"):p===`
174
+ `?m.push("\\n"):p==="\r"?m.push("\\r"):m.push(p);return m.join("")},s=t.length>0?n.length+1:n.length,l=new Array(s),u=0;t.length>0&&(l[u]=t.map(a).join(" "),u+=1);for(let f of n)l[u]=f.map(a).join(" "),u+=1;return l.join(`
175
+ `)},Vm=e=>{let t=!1;for(let a of e)if(a==="\\"||a==="|"){t=!0;break}if(!t)return e;let n=[];for(let a of e)a==="\\"?n.push("\\\\"):a==="|"?n.push("\\|"):n.push(a);return n.join("")},Fp=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let a=new Array(n.length+2),s=0,l=t.map(f=>Vm(f));a[s]=`| ${l.join(" | ")} |`,s+=1;let u=new Array(t.length);for(let f=0;f<t.length;f+=1)u[f]="---";a[s]=`| ${u.join(" | ")} |`,s+=1;for(let f of n)if(f.length<t.length){let h=new Array(t.length);for(let m=0;m<t.length;m+=1)h[m]=m<f.length?Vm(f[m]):"";a[s]=`| ${h.join(" | ")} |`,s+=1}else{let h=f.map(m=>Vm(m));a[s]=`| ${h.join(" | ")} |`,s+=1}return a.join(`
176
+ `)},qY=({children:e,className:t,onCopy:n,onError:a,timeout:s=2e3})=>{let[l,u]=v.useState(!1),[f,h]=v.useState(!1),m=v.useRef(null),p=v.useRef(0),{isAnimating:g}=v.useContext(kr),y=async S=>{var k,N;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.write)){a?.(new Error("Clipboard API not available"));return}try{let _=(N=m.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),A=_?.querySelector("table");if(!A){a?.(new Error("Table not found"));return}let w=g_(A),P=({csv:x_,tsv:$Y,md:Fp}[S]||Fp)(w),F=new ClipboardItem({"text/plain":new Blob([P],{type:"text/plain"}),"text/html":new Blob([A.outerHTML],{type:"text/html"})});await navigator.clipboard.write([F]),h(!0),u(!1),n?.(S),p.current=window.setTimeout(()=>h(!1),s)}catch(_){a?.(_)}};v.useEffect(()=>{let S=k=>{let N=k.composedPath();m.current&&!N.includes(m.current)&&u(!1)};return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S),window.clearTimeout(p.current)}},[]);let T=f?b1:y1;return c.jsxs("div",{className:"relative",ref:m,children:[c.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:g,onClick:()=>u(!l),title:"Copy table",type:"button",children:e??c.jsx(T,{size:14})}),l?c.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[c.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>y("md"),title:"Copy table as Markdown",type:"button",children:"Markdown"}),c.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>y("csv"),title:"Copy table as CSV",type:"button",children:"CSV"}),c.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>y("tsv"),title:"Copy table as TSV",type:"button",children:"TSV"})]}):null]})},VY=({children:e,className:t,onDownload:n,onError:a})=>{let[s,l]=v.useState(!1),u=v.useRef(null),{isAnimating:f}=v.useContext(kr),h=m=>{var p;try{let g=(p=u.current)==null?void 0:p.closest('[data-streamdown="table-wrapper"]'),y=g?.querySelector("table");if(!y){a?.(new Error("Table not found"));return}let T=g_(y),S=m==="csv"?x_(T):Fp(T);bl(`table.${m==="csv"?"csv":"md"}`,S,m==="csv"?"text/csv":"text/markdown"),l(!1),n?.(m)}catch(g){a?.(g)}};return v.useEffect(()=>{let m=p=>{let g=p.composedPath();u.current&&!g.includes(u.current)&&l(!1)};return document.addEventListener("mousedown",m),()=>{document.removeEventListener("mousedown",m)}},[]),c.jsxs("div",{className:"relative",ref:u,children:[c.jsx("button",{className:Ge("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:()=>l(!s),title:"Download table",type:"button",children:e??c.jsx(zf,{size:14})}),s?c.jsxs("div",{className:"absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg",children:[c.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("csv"),title:"Download table as CSV",type:"button",children:"CSV"}),c.jsx("button",{className:"w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40",onClick:()=>h("markdown"),title:"Download table as Markdown",type:"button",children:"Markdown"})]}):null]})},YY=({children:e,className:t,showControls:n,...a})=>c.jsxs("div",{className:"my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2","data-streamdown":"table-wrapper",children:[n?c.jsxs("div",{className:"flex items-center justify-end gap-1",children:[c.jsx(qY,{}),c.jsx(VY,{})]}):null,c.jsx("div",{className:"border-collapse overflow-x-auto overscroll-y-auto rounded-md border border-border bg-background",children:c.jsx("table",{className:Ge("w-full divide-y divide-border",t),"data-streamdown":"table",...a,children:e})})]}),GY=v.lazy(()=>Zk(()=>Promise.resolve().then(()=>SX),void 0,import.meta.url).then(e=>({default:e.Mermaid}))),XY=/language-([^\s]+)/;function Hf(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,a=t.position.start,s=e.position.end,l=t.position.end;return n?.line===a?.line&&n?.column===a?.column&&s?.line===l?.line&&s?.column===l?.column}function Xt(e,t){return e.className===t.className&&Hf(e.node,t.node)}var $p=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,Ed=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},T1=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("ol",{className:Ge("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...a,children:e}),(e,t)=>Xt(e,t));T1.displayName="MarkdownOl";var b_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("li",{className:Ge("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...a,children:e}),(e,t)=>e.className===t.className&&Hf(e.node,t.node));b_.displayName="MarkdownLi";var y_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("ul",{className:Ge("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...a,children:e}),(e,t)=>Xt(e,t));y_.displayName="MarkdownUl";var E_=v.memo(({className:e,node:t,...n})=>c.jsx("hr",{className:Ge("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n}),(e,t)=>Xt(e,t));E_.displayName="MarkdownHr";var T_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("span",{className:Ge("font-semibold",t),"data-streamdown":"strong",...a,children:e}),(e,t)=>Xt(e,t));T_.displayName="MarkdownStrong";var QY=({children:e,className:t,href:n,node:a,...s})=>{let{linkSafety:l}=v.useContext(kr),[u,f]=v.useState(!1),h=n==="streamdown:incomplete-link",m=v.useCallback(async T=>{if(!(!(l!=null&&l.enabled&&n)||h)){if(T.preventDefault(),l.onLinkCheck&&await l.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}f(!0)}},[l,n,h]),p=v.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),g=v.useCallback(()=>{f(!1)},[]),y={url:n??"",isOpen:u,onClose:g,onConfirm:p};return l!=null&&l.enabled&&n?c.jsxs(c.Fragment,{children:[c.jsx("button",{className:Ge("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",onClick:m,type:"button",children:e}),l.renderModal?l.renderModal(y):c.jsx(BY,{...y})]}):c.jsx("a",{className:Ge("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...s,children:e})},v_=v.memo(QY,(e,t)=>Xt(e,t)&&e.href===t.href);v_.displayName="MarkdownA";var S_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("h1",{className:Ge("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...a,children:e}),(e,t)=>Xt(e,t));S_.displayName="MarkdownH1";var k_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("h2",{className:Ge("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...a,children:e}),(e,t)=>Xt(e,t));k_.displayName="MarkdownH2";var N_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("h3",{className:Ge("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...a,children:e}),(e,t)=>Xt(e,t));N_.displayName="MarkdownH3";var C_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("h4",{className:Ge("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...a,children:e}),(e,t)=>Xt(e,t));C_.displayName="MarkdownH4";var __=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("h5",{className:Ge("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...a,children:e}),(e,t)=>Xt(e,t));__.displayName="MarkdownH5";var A_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("h6",{className:Ge("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...a,children:e}),(e,t)=>Xt(e,t));A_.displayName="MarkdownH6";var w_=v.memo(({children:e,className:t,node:n,...a})=>{let{controls:s}=v.useContext(kr),l=$p(s,"table");return c.jsx(YY,{className:t,showControls:l,...a,children:e})},(e,t)=>Xt(e,t));w_.displayName="MarkdownTable";var R_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("thead",{className:Ge("bg-muted/80",t),"data-streamdown":"table-header",...a,children:e}),(e,t)=>Xt(e,t));R_.displayName="MarkdownThead";var O_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("tbody",{className:Ge("divide-y divide-border",t),"data-streamdown":"table-body",...a,children:e}),(e,t)=>Xt(e,t));O_.displayName="MarkdownTbody";var I_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("tr",{className:Ge("border-border",t),"data-streamdown":"table-row",...a,children:e}),(e,t)=>Xt(e,t));I_.displayName="MarkdownTr";var D_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("th",{className:Ge("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...a,children:e}),(e,t)=>Xt(e,t));D_.displayName="MarkdownTh";var L_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("td",{className:Ge("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...a,children:e}),(e,t)=>Xt(e,t));L_.displayName="MarkdownTd";var j_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("blockquote",{className:Ge("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...a,children:e}),(e,t)=>Xt(e,t));j_.displayName="MarkdownBlockquote";var M_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("sup",{className:Ge("text-sm",t),"data-streamdown":"superscript",...a,children:e}),(e,t)=>Xt(e,t));M_.displayName="MarkdownSup";var B_=v.memo(({children:e,className:t,node:n,...a})=>c.jsx("sub",{className:Ge("text-sm",t),"data-streamdown":"subscript",...a,children:e}),(e,t)=>Xt(e,t));B_.displayName="MarkdownSub";var P_=v.memo(({children:e,className:t,node:n,...a})=>{if("data-footnotes"in a){let s=u=>{var f,h;if(!v.isValidElement(u))return!1;let m=Array.isArray(u.props.children)?u.props.children:[u.props.children],p=!1,g=!1;for(let y of m)if(y){if(typeof y=="string")y.trim()!==""&&(p=!0);else if(v.isValidElement(y))if(((f=y.props)==null?void 0:f["data-footnote-backref"])!==void 0)g=!0;else{let T=Array.isArray(y.props.children)?y.props.children:[y.props.children];for(let S of T){if(typeof S=="string"&&S.trim()!==""){p=!0;break}if(v.isValidElement(S)&&((h=S.props)==null?void 0:h["data-footnote-backref"])===void 0){p=!0;break}}}}return g&&!p},l=Array.isArray(e)?e.map(u=>{if(!v.isValidElement(u))return u;if(u.type===T1){let f=(Array.isArray(u.props.children)?u.props.children:[u.props.children]).filter(h=>!s(h));return f.length===0?null:{...u,props:{...u.props,children:f}}}return u}):e;return(Array.isArray(l)?l.some(u=>u!==null):l!==null)?c.jsx("section",{className:t,...a,children:l}):null}return c.jsx("section",{className:t,...a,children:e})},(e,t)=>Xt(e,t));P_.displayName="MarkdownSection";var WY=({node:e,className:t,children:n,...a})=>{var s;let l=!("data-block"in a),{mermaid:u,controls:f}=v.useContext(kr),h=E1(),m=xY();if(l)return c.jsx("code",{className:Ge("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...a,children:n});let p=t?.match(XY),g=(s=p?.at(1))!=null?s:"",y="";if(v.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?y=n.props.children:typeof n=="string"&&(y=n),g==="mermaid"&&h){let S=$p(f,"mermaid"),k=Ed(f,"download"),N=Ed(f,"copy"),_=Ed(f,"fullscreen"),A=Ed(f,"panZoom"),w=S&&(k||N||_);return c.jsx(v.Suspense,{fallback:c.jsx(IY,{}),children:c.jsxs("div",{className:Ge("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[c.jsx("div",{className:"flex h-8 items-center text-muted-foreground text-xs",children:c.jsx("span",{className:"ml-1 font-mono lowercase",children:"mermaid"})}),w?c.jsx("div",{className:"pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end",children:c.jsxs("div",{className:"pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur","data-streamdown":"mermaid-block-actions",children:[k?c.jsx(zY,{chart:y,config:u?.config}):null,N?c.jsx(xv,{code:y}):null,_?c.jsx(FY,{chart:y,config:u?.config}):null]})}):null,c.jsx("div",{className:"rounded-md border border-border bg-background",children:c.jsx(GY,{chart:y,config:u?.config,showControls:A})})]})})}let T=$p(f,"code");return c.jsx(NY,{className:t,code:y,isIncomplete:m,language:g,children:T?c.jsxs(c.Fragment,{children:[c.jsx(OY,{code:y,language:g}),c.jsx(xv,{})]}):null})},z_=v.memo(WY,(e,t)=>e.className===t.className&&Hf(e.node,t.node));z_.displayName="MarkdownCode";var H_=v.memo(LY,(e,t)=>e.className===t.className&&Hf(e.node,t.node));H_.displayName="MarkdownImg";var U_=v.memo(({children:e,node:t,...n})=>{let a=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(a.length===1&&v.isValidElement(a[0])){let s=a[0].props.node,l=s?.tagName;if(l==="img")return c.jsx(c.Fragment,{children:e});if(l==="code"&&"data-block"in a[0].props)return c.jsx(c.Fragment,{children:e})}return c.jsx("p",{...n,children:e})},(e,t)=>Xt(e,t));U_.displayName="MarkdownParagraph";var KY={ol:T1,li:b_,ul:y_,hr:E_,strong:T_,a:v_,h1:S_,h2:k_,h3:N_,h4:C_,h5:__,h6:A_,table:w_,thead:R_,tbody:O_,tr:I_,th:D_,td:L_,blockquote:j_,code:z_,img:H_,pre:({children:e})=>v.isValidElement(e)?v.cloneElement(e,{"data-block":"true"}):e,sup:M_,sub:B_,p:U_,section:P_},ZY=/^[ \t]{0,3}(`{3,}|~{3,})/,JY=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,yv=e=>{let t=e.split(`
177
+ `),n=null,a=0;for(let s of t){let l=ZY.exec(s);if(n===null){if(l){let u=l[1];n=u[0],a=u.length}}else if(l){let u=l[1],f=u[0],h=u.length;f===n&&h>=a&&(n=null,a=0)}}return n!==null},eG=e=>{let t=e.split(`
178
+ `);for(let n of t){let a=n.trim();if(a.length>0&&a.includes("|")&&JY.test(a))return!0}return!1},tG=()=>e=>{gi(e,"html",(t,n,a)=>{!a||typeof n!="number"||(a.children[n]={type:"text",value:t.value})})},Ev=[],Tv={allowDangerousHtml:!0},Td=new WeakMap,nG=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,a=e.remarkPlugins,s=e.remarkRehypeOptions;if(!(n||a||s)){let p="default";return this.keyCache.set(e,p),p}let l=p=>{if(!p||p.length===0)return"";let g="";for(let y=0;y<p.length;y+=1){let T=p[y];if(y>0&&(g+=","),Array.isArray(T)){let[S,k]=T;if(typeof S=="function"){let N=Td.get(S);N||(N=S.name,Td.set(S,N)),g+=N}else g+=String(S);g+=":",g+=JSON.stringify(k)}else if(typeof T=="function"){let S=Td.get(T);S||(S=T.name,Td.set(T,S)),g+=S}else g+=String(T)}return g},u=l(n),f=l(a),h=s?JSON.stringify(s):"",m=`${f}::${u}::${h}`;return this.keyCache.set(e,m),m}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let a=this.cache.keys().next().value;a&&this.cache.delete(a)}this.cache.set(n,t)}clear(){this.cache.clear()}},vv=new nG,F_=e=>{let t=rG(e),n=e.children||"";return cG(t.runSync(t.parse(n),n),e)},rG=e=>{let t=vv.get(e);if(t)return t;let n=iG(e);return vv.set(e,n),n},aG=e=>e.some(t=>Array.isArray(t)?t[0]===wp:t===wp),iG=e=>{let t=e.rehypePlugins||Ev,n=e.remarkPlugins||Ev,a=aG(t)?n:[...n,tG],s=e.remarkRehypeOptions?{...Tv,...e.remarkRehypeOptions}:Tv;return fV().use(dq).use(a).use(Gq,s).use(t)},sG=e=>e,lG=(e,t,n,a)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:a}},oG=(e,t)=>{var n;for(let a in Mm)if(Object.hasOwn(Mm,a)&&Object.hasOwn(e.properties,a)){let s=e.properties[a],l=Mm[a];(l===null||l.includes(e.tagName))&&(e.properties[a]=(n=t(String(s||""),a,e))!=null?n:void 0)}},uG=(e,t,n,a,s,l)=>{let u=!1;return a?u=!a.includes(e.tagName):s&&(u=s.includes(e.tagName)),!u&&l&&typeof t=="number"&&(u=!l(e,t,n)),u},cG=(e,t)=>{let{allowElement:n,allowedElements:a,disallowedElements:s,skipHtml:l,unwrapDisallowed:u,urlTransform:f}=t;if(n||a||s||l||f){let h=f||sG;gi(e,(m,p,g)=>{if(m.type==="raw"&&g&&typeof p=="number")return lG(g,p,l,m.value),p;if(m.type==="element"&&(oG(m,h),uG(m,p,g,a,s,n)&&g&&typeof p=="number"))return u&&m.children?g.children.splice(p,1,...m.children):g.children.splice(p,1),p})}return y$(e,{Fragment:c.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0})},dG=/\[\^[\w-]{1,200}\](?!:)/,fG=/\[\^[\w-]{1,200}\]:/,hG=/<(\w+)[\s>]/,mG=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Sv=new Map,kv=new Map,pG=e=>{let t=e.toLowerCase(),n=Sv.get(t);if(n)return n;let a=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return Sv.set(t,a),a},gG=e=>{let t=e.toLowerCase(),n=kv.get(t);if(n)return n;let a=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return kv.set(t,a),a},Nv=(e,t)=>{if(mG.has(t.toLowerCase()))return 0;let n=e.match(pG(t));if(!n)return 0;let a=0;for(let s of n)s.trimEnd().endsWith("/>")||(a+=1);return a},Cv=(e,t)=>{let n=e.match(gG(t));return n?n.length:0},xG=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},bG=e=>{let t=dG.test(e),n=fG.test(e);if(t||n)return[e];let a=Er.lex(e,{gfm:!0}),s=[],l=[],u=!1;for(let f of a){let h=f.raw,m=s.length;if(l.length>0){s[m-1]+=h;let p=l.at(-1),g=Nv(h,p),y=Cv(h,p);for(let T=0;T<g;T+=1)l.push(p);for(let T=0;T<y;T+=1)l.length>0&&l.at(-1)===p&&l.pop();continue}if(f.type==="html"&&f.block){let p=h.match(hG);if(p){let g=p[1],y=Nv(h,g),T=Cv(h,g);y>T&&l.push(g)}}if(m>0&&!u){let p=s[m-1];if(xG(p)%2===1){s[m-1]=p+h;continue}}s.push(h),f.type!=="space"&&(u=f.type==="code")}return s},yG=(e,t)=>{if(!t.length)return e;let n=e;for(let a of t){let s=new RegExp(`(<${a}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${a}\\s*>)`,"gi");n=n.replace(s,(l,u,f,h)=>{let m=f.replace(/\n\n/g,`
179
+ <!---->
180
+ `);return u+m+h})}return n},EG=/^[ \t]*<[\w!/?-]/,TG=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,vG=e=>typeof e!="string"||e.length===0||!EG.test(e)?e:e.replace(TG,"$1"),_v,Av,Rd={...tu,protocols:{...tu.protocols,href:[...(Av=(_v=tu.protocols)==null?void 0:_v.href)!=null?Av:[],"tel"]}},qp={raw:wp,sanitize:[eC,Rd],harden:[I8,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},SG={gfm:[WU,{}]},wv=Object.values(qp),kG=Object.values(SG),NG={block:" ▋",circle:" ●"},CG={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},kr=v.createContext(CG),$_=v.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:a,isIncomplete:s,...l})=>{let u=typeof e=="string"&&n?vG(e):e;return c.jsx(d_.Provider,{value:s,children:c.jsx(F_,{...l,children:u})})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),a=Object.keys(t.components||{});if(n.length!==a.length||n.some(s=>{var l,u;return((l=e.components)==null?void 0:l[s])!==((u=t.components)==null?void 0:u[s])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});$_.displayName="Block";var _G=["github-light","github-dark"],q_=v.memo(({children:e,mode:t="streaming",parseIncompleteMarkdown:n=!0,normalizeHtmlIndentation:a=!1,components:s,rehypePlugins:l=wv,remarkPlugins:u=kG,className:f,shikiTheme:h=_G,mermaid:m,controls:p=!0,isAnimating:g=!1,animated:y,BlockComponent:T=$_,parseMarkdownIntoBlocksFn:S=bG,caret:k,plugins:N,remend:_,linkSafety:A={enabled:!0},allowedTags:w,...P})=>{let F=v.useId(),[M,I]=v.useTransition(),j=v.useMemo(()=>w?Object.keys(w):[],[w]),G=v.useMemo(()=>{if(typeof e!="string")return"";let Z=t==="streaming"&&n?r$(e,_):e;return j.length>0&&(Z=yG(Z,j)),Z},[e,t,n,_,j]),B=v.useMemo(()=>S(G),[G,S]),[Q,V]=v.useState(B);v.useEffect(()=>{t==="streaming"?I(()=>{V(B)}):V(B)},[B,t]);let te=t==="streaming"?Q:B,ee=v.useMemo(()=>te.map((Z,L)=>`${F}-${L}`),[te.length,F]),U=v.useMemo(()=>y?y===!0?Hp():Hp(y):null,[y]),R=v.useMemo(()=>{var Z,L;return{shikiTheme:(L=(Z=N?.code)==null?void 0:Z.getThemes())!=null?L:h,controls:p,isAnimating:g,mode:t,mermaid:m,linkSafety:A}},[h,p,g,t,m,A,N?.code]),q=v.useMemo(()=>({...KY,...s}),[s]),W=v.useMemo(()=>{let Z=[];return N!=null&&N.cjk&&(Z=[...Z,...N.cjk.remarkPluginsBefore]),Z=[...Z,...u],N!=null&&N.cjk&&(Z=[...Z,...N.cjk.remarkPluginsAfter]),N!=null&&N.math&&(Z=[...Z,N.math.remarkPlugin]),Z},[u,N?.math,N?.cjk]),he=v.useMemo(()=>{var Z;let L=l;if(w&&Object.keys(w).length>0&&l===wv){let fe={...Rd,tagNames:[...(Z=Rd.tagNames)!=null?Z:[],...Object.keys(w)],attributes:{...Rd.attributes,...w}};L=[qp.raw,[eC,fe],qp.harden]}return N!=null&&N.math&&(L=[...L,N.math.rehypePlugin]),U&&g&&(L=[...L,U.rehypePlugin]),L},[l,N?.math,U,g,w]),O=v.useMemo(()=>{if(!g||te.length===0)return!1;let Z=te.at(-1);return yv(Z)||eG(Z)},[g,te]),H=v.useMemo(()=>k&&g&&!O?{"--streamdown-caret":`"${NG[k]}"`}:void 0,[k,g,O]);return t==="static"?c.jsx(Up.Provider,{value:N??null,children:c.jsx(kr.Provider,{value:R,children:c.jsx("div",{className:Ge("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",f),children:c.jsx(F_,{components:q,rehypePlugins:he,remarkPlugins:W,...P,children:G})})})}):c.jsx(Up.Provider,{value:N??null,children:c.jsx(kr.Provider,{value:R,children:c.jsxs("div",{className:Ge("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",k&&!O?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,f),style:H,children:[te.length===0&&k&&g&&c.jsx("span",{}),te.map((Z,L)=>{let fe=L===te.length-1,Ne=g&&fe&&yv(Z);return c.jsx(T,{components:q,content:Z,index:L,isIncomplete:Ne,rehypePlugins:he,remarkPlugins:W,shouldNormalizeHtmlIndentation:a,shouldParseIncompleteMarkdown:n,...P},ee[L])})]})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation);q_.displayName="Streamdown";var AG=({children:e,className:t,minZoom:n=.5,maxZoom:a=3,zoomStep:s=.1,showControls:l=!0,initialZoom:u=1,fullscreen:f=!1})=>{let h=v.useRef(null),m=v.useRef(null),[p,g]=v.useState(u),[y,T]=v.useState({x:0,y:0}),[S,k]=v.useState(!1),[N,_]=v.useState({x:0,y:0}),[A,w]=v.useState({x:0,y:0}),P=v.useCallback(V=>{g(te=>Math.max(n,Math.min(a,te+V)))},[n,a]),F=v.useCallback(()=>{P(s)},[P,s]),M=v.useCallback(()=>{P(-s)},[P,s]),I=v.useCallback(()=>{g(u),T({x:0,y:0})},[u]),j=v.useCallback(V=>{V.preventDefault();let te=V.deltaY>0?-s:s;P(te)},[P,s]),G=v.useCallback(V=>{if(V.button!==0||V.isPrimary===!1)return;k(!0),_({x:V.clientX,y:V.clientY}),w(y);let te=V.currentTarget;te instanceof HTMLElement&&te.setPointerCapture(V.pointerId)},[y]),B=v.useCallback(V=>{if(!S)return;V.preventDefault();let te=V.clientX-N.x,ee=V.clientY-N.y;T({x:A.x+te,y:A.y+ee})},[S,N,A]),Q=v.useCallback(V=>{k(!1);let te=V.currentTarget;te instanceof HTMLElement&&te.releasePointerCapture(V.pointerId)},[]);return v.useEffect(()=>{let V=h.current;if(V)return V.addEventListener("wheel",j,{passive:!1}),()=>{V.removeEventListener("wheel",j)}},[j]),v.useEffect(()=>{let V=m.current;if(V&&S)return document.body.style.userSelect="none",V.addEventListener("pointermove",B,{passive:!1}),V.addEventListener("pointerup",Q),V.addEventListener("pointercancel",Q),()=>{document.body.style.userSelect="",V.removeEventListener("pointermove",B),V.removeEventListener("pointerup",Q),V.removeEventListener("pointercancel",Q)}},[S,B,Q]),c.jsxs("div",{className:Ge("relative flex flex-col",f?"h-full w-full":"min-h-28 w-full",t),ref:h,style:{cursor:S?"grabbing":"grab"},children:[l?c.jsxs("div",{className:Ge("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",f?"bottom-4 left-4":"bottom-2 left-2"),children:[c.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:p>=a,onClick:F,title:"Zoom in",type:"button",children:c.jsx(wY,{size:16})}),c.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",disabled:p<=n,onClick:M,title:"Zoom out",type:"button",children:c.jsx(RY,{size:16})}),c.jsx("button",{className:"flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",onClick:I,title:"Reset zoom and pan",type:"button",children:c.jsx(AY,{size:16})})]}):null,c.jsx("div",{className:Ge("flex-1 origin-center transition-transform duration-150 ease-out",f?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:G,ref:m,role:"application",style:{transform:`translate(${y.x}px, ${y.y}px) scale(${p})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},V_=({chart:e,className:t,config:n,fullscreen:a=!1,showControls:s=!0})=>{let[l,u]=v.useState(null),[f,h]=v.useState(!1),[m,p]=v.useState(""),[g,y]=v.useState(""),[T,S]=v.useState(0),{mermaid:k}=v.useContext(kr),N=E1(),_=k?.errorComponent,{shouldRender:A,containerRef:w}=oY({immediate:a});if(v.useEffect(()=>{if(A){if(!N){u("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{u(null),h(!0);let F=N.getMermaid(n),M=e.split("").reduce((G,B)=>(G<<5)-G+B.charCodeAt(0)|0,0),I=`mermaid-${Math.abs(M)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:j}=await F.render(I,e);p(j),y(j)}catch(F){if(!(g||m)){let M=F instanceof Error?F.message:"Failed to render Mermaid chart";u(M)}}finally{h(!1)}})()}},[e,n,T,A,N]),!(A||m||g))return c.jsx("div",{className:Ge("my-4 min-h-[200px]",t),ref:w});if(f&&!m&&!g)return c.jsx("div",{className:Ge("my-4 flex justify-center p-4",t),ref:w,children:c.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[c.jsx("div",{className:"h-4 w-4 animate-spin rounded-full border-current border-b-2"}),c.jsx("span",{className:"text-sm",children:"Loading diagram..."})]})});if(l&&!m&&!g){let F=()=>S(M=>M+1);return _?c.jsx("div",{ref:w,children:c.jsx(_,{chart:e,error:l,retry:F})}):c.jsxs("div",{className:Ge("rounded-md bg-red-50 p-4",t),ref:w,children:[c.jsxs("p",{className:"font-mono text-red-700 text-sm",children:["Mermaid Error: ",l]}),c.jsxs("details",{className:"mt-2",children:[c.jsx("summary",{className:"cursor-pointer text-red-600 text-xs",children:"Show Code"}),c.jsx("pre",{className:"mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs",children:e})]})]})}let P=m||g;return c.jsx("div",{className:Ge("size-full",t),"data-streamdown":"mermaid",ref:w,children:c.jsx(AG,{className:Ge(a?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:a,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:c.jsx("div",{"aria-label":"Mermaid chart",className:Ge("flex justify-center",a?"size-full items-center":null),dangerouslySetInnerHTML:{__html:P},role:"img"})})})};const wG=e=>{const t=/(^|\n)```[a-z]*\n[\s\S]*?\n```|`[^`\n]+`/g,n=[];let a;for(;(a=t.exec(e))!==null;){const m=a[0].startsWith(`
181
+ `)?a.index+1:a.index;n.push({start:m,end:a.index+a[0].length})}const s=h=>{let m=h.replace(/<(?=[a-zA-Z/!?])/g,"<");return m=m.replace(new RegExp("(?<!^)(?<![-=])>","gm"),">"),m=m.replace(/\n([ ]{4,})/g,`
182
+ ​$1`),m},l=[];let u=0;for(const h of n){const m=e.slice(u,h.start);l.push(s(m)),l.push(e.slice(h.start,h.end)),u=h.end}const f=e.slice(u);return l.push(s(f)),l.join("")},RG=["flow-root","[&_p]:m-0","[&_h1]:m-0","[&_h2]:m-0","[&_h3]:m-0","[&_h4]:m-0","[&_h5]:m-0","[&_h6]:m-0","[&_ul]:m-0","[&_ol]:m-0","[&_li]:m-0","[&_blockquote]:m-0","[&_hr]:m-0","[&_pre]:m-0"].join(" "),OG=/language-([^\s]+)/,IG=e=>e?.match(OG)?.[1],Vp=e=>typeof e=="string"?e:Array.isArray(e)?e.map(Vp).join(""):v.isValidElement(e)?Vp(e.props.children):"";function DG({code:e,language:t,className:n}){const[a,s]=v.useState(!1),l=async()=>{await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3)};return c.jsxs("div",{className:pn("group/code relative my-2 rounded border bg-card",n),children:[c.jsxs("div",{className:"absolute top-1.5 right-1.5 flex items-center gap-1 opacity-0 group-hover/code:opacity-100 transition-opacity",children:[t&&c.jsx("span",{className:"text-[10px] text-muted-foreground font-mono px-1",children:t}),c.jsx("button",{onClick:l,className:"rounded p-1 hover:bg-muted text-muted-foreground hover:text-foreground",children:a?c.jsx(vu,{className:"size-3.5"}):c.jsx(af,{className:"size-3.5"})})]}),c.jsx("pre",{className:"overflow-auto p-3 text-xs max-h-[60vh]",children:c.jsx("code",{className:"font-mono",children:e})})]})}const LG=({className:e,children:t,node:n,...a})=>n?.position?.start?.line===n?.position?.end?.line?c.jsx("code",{className:pn("rounded bg-secondary px-1 py-0.5 font-mono text-xs",e),...a,children:t}):c.jsx(DG,{code:Vp(t),language:IG(e)}),jG=({children:e})=>e,MG={code:LG,pre:jG},Uf=v.memo(({className:e,children:t,...n})=>c.jsx(q_,{className:pn("streamdown-prose w-full text-sm leading-relaxed [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",RG,e),components:MG,rehypePlugins:[],...n,children:typeof t=="string"?wG(t):t}),(e,t)=>e.children===t.children);Uf.displayName="Markdown";function BG({message:e}){const[t,n]=v.useState(!1),a=Sr(e.content),s=a.filter(h=>h.type==="text").map(h=>h.text).join(`
183
+ `),l=a.filter(h=>h.type==="image_url"),u=a.filter(h=>h.type==="audio_url"),f=a.filter(h=>h.type==="video_url");return c.jsxs("div",{className:"my-2 flex gap-3",children:[c.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground",children:c.jsx(c4,{size:14})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx("span",{className:"text-sm font-semibold",children:"User"}),e.name&&c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted px-1.5 py-0.5 rounded",children:e.name}),c.jsxs("button",{onClick:()=>n(!t),className:"text-[10px] text-muted-foreground hover:text-foreground",children:[t?c.jsx($t,{size:12,className:"inline"}):c.jsx(cn,{size:12,className:"inline"})," ","raw"]})]}),c.jsx(PG,{text:s}),l.map((h,m)=>c.jsxs("div",{className:"mt-2",children:[c.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground mb-1",children:[c.jsx(qv,{size:10}),c.jsx("span",{children:"Image"}),h.image_url?.id&&c.jsxs("span",{className:"font-mono",children:["(",h.image_url.id,")"]})]}),c.jsx("img",{src:h.image_url?.url,alt:"attachment",className:"max-w-sm rounded-md border"})]},m)),u.map((h,m)=>c.jsxs("div",{className:"mt-2",children:[c.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground mb-1",children:[c.jsx(Vv,{size:10}),c.jsx("span",{children:"Audio"}),h.audio_url?.id&&c.jsxs("span",{className:"font-mono",children:["(",h.audio_url.id,")"]})]}),c.jsx("audio",{controls:!0,src:h.audio_url?.url,className:"max-w-sm"})]},`audio-${m}`)),f.map((h,m)=>c.jsxs("div",{className:"mt-2",children:[c.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground mb-1",children:[c.jsx(Qv,{size:10}),c.jsx("span",{children:"Video"}),h.video_url?.id&&c.jsxs("span",{className:"font-mono",children:["(",h.video_url.id,")"]})]}),c.jsx("video",{controls:!0,src:h.video_url?.url,className:"max-w-sm rounded-md border"})]},`video-${m}`)),t&&c.jsx("div",{className:"mt-2 rounded-md border bg-card p-2",children:c.jsx("pre",{className:"overflow-auto whitespace-pre-wrap text-[11px] font-mono text-muted-foreground max-h-[500px]",children:JSON.stringify(e,null,2)})})]})]})}function PG({text:e}){const t=v1();return c.jsx("div",{className:"rounded-lg bg-primary/10 px-3 py-2",children:e?t?c.jsx("pre",{className:"whitespace-pre-wrap text-sm font-mono leading-relaxed",children:e}):c.jsx(Uf,{children:e}):c.jsx("span",{className:"text-sm text-muted-foreground",children:"(empty)"})})}function zG({part:e}){const[t,n]=v.useState(!1),a=e.think??e.thinking??"";return a?c.jsxs("div",{className:"my-1 rounded-md border border-dashed bg-muted/30 px-3 py-2",children:[c.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",children:[c.jsx(tg,{size:12}),c.jsx("span",{className:"font-medium",children:"Thinking"}),t?c.jsx($t,{size:12}):c.jsx(cn,{size:12})]}),t?c.jsx("div",{className:"mt-2 whitespace-pre-wrap text-xs text-muted-foreground leading-relaxed",children:a}):c.jsxs("div",{className:"mt-1 truncate text-xs text-muted-foreground",children:[a.slice(0,100),a.length>100?"...":""]})]}):null}function HG({toolCall:e}){const[t,n]=v.useState(!1),a=G_();let s=null;try{s=JSON.parse(e.function.arguments)}catch{s=e.function.arguments}const l=e.extras&&Object.keys(e.extras).length>0;return c.jsxs("div",{className:"my-1 rounded-md border bg-purple-500/5 dark:bg-purple-500/10 px-3 py-2",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1.5 text-xs",children:[c.jsx(Wv,{size:12,className:"text-purple-600 dark:text-purple-400"}),c.jsx("span",{className:"font-mono font-medium text-purple-700 dark:text-purple-300",children:e.function.name}),c.jsx("span",{className:"text-[10px] text-muted-foreground font-mono",children:e.id.slice(0,12)}),l&&c.jsx("span",{className:"text-[10px] text-amber-600 dark:text-amber-400",children:"+extras"}),t?c.jsx($t,{size:12}):c.jsx(cn,{size:12})]}),a&&c.jsxs("span",{role:"button",tabIndex:0,onClick:()=>a(e.id),onKeyDown:u=>{u.key==="Enter"&&a(e.id)},className:"text-[10px] text-blue-600 dark:text-blue-400 hover:underline cursor-pointer flex items-center gap-0.5",children:[c.jsx(eg,{size:9}),"Wire"]})]}),t&&c.jsxs("div",{className:"mt-2 space-y-2",children:[c.jsxs("div",{className:"rounded border bg-card p-2",children:[c.jsx("div",{className:"text-[10px] font-medium text-muted-foreground mb-1",children:"Arguments"}),c.jsx("pre",{className:"overflow-auto whitespace-pre-wrap text-[11px] font-mono text-card-foreground max-h-96",children:typeof s=="string"?s:JSON.stringify(s,null,2)})]}),l&&c.jsxs("div",{className:"rounded border bg-amber-500/5 p-2",children:[c.jsx("div",{className:"text-[10px] font-medium text-amber-600 dark:text-amber-400 mb-1",children:"Extras"}),c.jsx("pre",{className:"overflow-auto whitespace-pre-wrap text-[11px] font-mono text-card-foreground max-h-48",children:JSON.stringify(e.extras,null,2)})]})]})]})}function UG({part:e,i:t}){return e.type==="image_url"&&e.image_url?c.jsxs("div",{className:"my-2",children:[c.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground mb-1",children:[c.jsx(qv,{size:10}),c.jsx("span",{children:"Image"}),e.image_url.id&&c.jsxs("span",{className:"font-mono",children:["(",e.image_url.id,")"]})]}),c.jsx("img",{src:e.image_url.url,alt:"generated",className:"max-w-sm rounded-md border"})]},t):e.type==="audio_url"&&e.audio_url?c.jsxs("div",{className:"my-2",children:[c.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground mb-1",children:[c.jsx(Vv,{size:10}),c.jsx("span",{children:"Audio"}),e.audio_url.id&&c.jsxs("span",{className:"font-mono",children:["(",e.audio_url.id,")"]})]}),c.jsx("audio",{controls:!0,src:e.audio_url.url,className:"max-w-sm"})]},t):e.type==="video_url"&&e.video_url?c.jsxs("div",{className:"my-2",children:[c.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground mb-1",children:[c.jsx(Qv,{size:10}),c.jsx("span",{children:"Video"}),e.video_url.id&&c.jsxs("span",{className:"font-mono",children:["(",e.video_url.id,")"]})]}),c.jsx("video",{controls:!0,src:e.video_url.url,className:"max-w-sm rounded-md border"})]},t):null}function FG({part:e,i:t}){const n=v1(),a=e.text??"";return n?c.jsx("pre",{className:"whitespace-pre-wrap text-sm font-mono leading-relaxed",children:a},t):c.jsx(Uf,{children:a},t)}function $G(e,t){switch(e.type){case"text":return c.jsx(FG,{part:e,i:t},t);case"think":case"thinking":return c.jsx(zG,{part:e},t);case"image_url":case"audio_url":case"video_url":return c.jsx(UG,{part:e,i:t},t);default:return c.jsxs("div",{className:"my-1 rounded border bg-muted/20 px-2 py-1",children:[c.jsxs("span",{className:"text-[10px] font-mono text-muted-foreground",children:["[",e.type,"]"]}),c.jsx("pre",{className:"overflow-auto whitespace-pre-wrap text-[11px] font-mono text-muted-foreground max-h-32",children:JSON.stringify(e,null,2)})]},t)}}function qG({message:e}){const[t,n]=v.useState(!1),a=e.tool_calls??[];return c.jsxs("div",{className:"my-2 flex gap-3",children:[c.jsx("div",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-secondary text-secondary-foreground",children:c.jsx(Mr,{size:14})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[c.jsx("span",{className:"text-sm font-semibold",children:"Assistant"}),e.name&&c.jsx("span",{className:"text-[10px] font-mono text-muted-foreground bg-muted px-1.5 py-0.5 rounded",children:e.name}),e.partial&&c.jsx("span",{className:"text-[10px] text-amber-600 dark:text-amber-400",children:"streaming..."}),c.jsxs("button",{onClick:()=>n(!t),className:"text-[10px] text-muted-foreground hover:text-foreground",children:[t?c.jsx($t,{size:12,className:"inline"}):c.jsx(cn,{size:12,className:"inline"})," ","raw"]})]}),t&&c.jsx("div",{className:"mb-2 rounded-md border bg-card p-2",children:c.jsx("pre",{className:"overflow-auto whitespace-pre-wrap text-[11px] font-mono text-muted-foreground max-h-[500px]",children:JSON.stringify(e,null,2)})}),Sr(e.content).map((s,l)=>$G(s,l)),a.map(s=>c.jsx(HG,{toolCall:s},s.id))]})]})}function VG({message:e}){const[t,n]=v.useState(!1),a=G_(),l=Sr(e.content).filter(f=>f.type==="text").map(f=>f.text).join(`
184
+ `),u=l?l.slice(0,80)+(l.length>80?"...":""):null;return c.jsxs("div",{className:"my-1 ml-10 rounded-md border bg-muted/20 px-3 py-2",children:[c.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1.5 text-xs",children:[c.jsx(Gv,{size:12,className:"text-muted-foreground"}),c.jsx("span",{className:"font-medium text-muted-foreground",children:"Tool Result"}),e.name&&c.jsx("span",{className:"font-mono text-[10px] text-purple-600 dark:text-purple-400",children:e.name}),e.tool_call_id&&c.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:e.tool_call_id.slice(0,12)}),t?c.jsx($t,{size:12,className:"text-muted-foreground"}):c.jsx(cn,{size:12,className:"text-muted-foreground"})]}),a&&e.tool_call_id&&c.jsxs("span",{role:"button",tabIndex:0,onClick:()=>a(e.tool_call_id),onKeyDown:f=>{f.key==="Enter"&&a(e.tool_call_id)},className:"inline-flex items-center gap-0.5 ml-6 mt-0.5 text-[10px] text-blue-600 dark:text-blue-400 hover:underline cursor-pointer",children:[c.jsx(eg,{size:9}),"Wire"]}),!t&&u&&c.jsx("div",{className:"mt-1 truncate text-[11px] font-mono text-muted-foreground",children:u}),t&&c.jsx("div",{className:"mt-2 rounded border bg-card p-2",children:l?c.jsx("pre",{className:"overflow-auto whitespace-pre-wrap text-[11px] font-mono text-card-foreground max-h-96",children:l}):c.jsx("pre",{className:"overflow-auto whitespace-pre-wrap text-[11px] font-mono text-muted-foreground max-h-96",children:JSON.stringify(e.content,null,2)})})]})}const Ym={system:{label:"System",color:"bg-blue-500/60",bgColor:"bg-blue-500"},user:{label:"User",color:"bg-green-500/60",bgColor:"bg-green-500"},assistant:{label:"Assistant",color:"bg-purple-500/60",bgColor:"bg-purple-500"},thinking:{label:"Thinking",color:"bg-cyan-500/60",bgColor:"bg-cyan-500"},"tool-result":{label:"Tool Result",color:"bg-amber-500/60",bgColor:"bg-amber-500"},internal:{label:"Internal",color:"bg-gray-500/60",bgColor:"bg-gray-500"}};function YG(e){const t=[];if(e.role.startsWith("_")){const a=JSON.stringify(e).length/4;return t.push({category:"internal",tokens:a}),t}if(e.role==="system"){const a=Sr(e.content);let s=0;for(const l of a)l.text&&(s+=l.text.length/4);return s===0&&(s=JSON.stringify(e.content).length/4),t.push({category:"system",tokens:s}),t}if(e.role==="user"){const a=Sr(e.content);let s=0;for(const l of a)l.text&&(s+=l.text.length/4);return s===0&&(s=JSON.stringify(e.content).length/4),t.push({category:"user",tokens:s}),t}if(e.role==="tool"){const a=JSON.stringify(e.content).length/4;return t.push({category:"tool-result",tokens:a}),t}if(e.role==="assistant"){const a=Sr(e.content);let s=0,l=0;for(const u of a)u.think?l+=u.think.length/4:u.thinking?l+=u.thinking.length/4:u.text&&(s+=u.text.length/4);if(e.tool_calls)for(const u of e.tool_calls)s+=JSON.stringify(u.function.arguments).length/4;return s>0&&t.push({category:"assistant",tokens:s}),l>0&&t.push({category:"thinking",tokens:l}),t.length===0&&t.push({category:"assistant",tokens:1}),t}const n=JSON.stringify(e).length/4;return t.push({category:"internal",tokens:n}),t}function Fo(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(Math.round(e))}function GG(e){const t=Sr(e.content);for(const n of t){if(n.text)return n.text.slice(0,80);if(n.think)return n.think.slice(0,80);if(n.thinking)return n.thinking.slice(0,80)}return e.tool_calls&&e.tool_calls.length>0?`tool_call: ${e.tool_calls[0].function.name}(${e.tool_calls[0].function.arguments.slice(0,50)})`:e.role==="tool"?JSON.stringify(e.content).slice(0,80):JSON.stringify(e).slice(0,80)}function XG({messages:e,onScrollToIndex:t}){const{categories:n,largeItems:a,totalTokens:s}=v.useMemo(()=>{const l=new Map,u=[];for(let g=0;g<e.length;g++){const y=e[g],T=YG(y);for(const{category:S,tokens:k}of T){const N=l.get(S)||{tokens:0,count:0};N.tokens+=k,N.count+=1,l.set(S,N),u.push({index:g,category:S,tokens:k})}}const f=Array.from(l.values()).reduce((g,y)=>g+y.tokens,0),h=Array.from(l.entries()).map(([g,{tokens:y,count:T}])=>({category:g,label:Ym[g]?.label??g,estimatedTokens:Math.round(y),percentage:f>0?y/f*100:0,color:Ym[g]?.color??"bg-gray-500/60",messageCount:T})).sort((g,y)=>y.estimatedTokens-g.estimatedTokens),m=f*.05,p=u.filter(g=>g.tokens>m).sort((g,y)=>y.tokens-g.tokens).slice(0,10).map(g=>({messageIndex:g.index,category:g.category,estimatedTokens:Math.round(g.tokens),percentage:f>0?g.tokens/f*100:0,preview:GG(e[g.index])}));return{categories:h,largeItems:p,totalTokens:Math.round(f)}},[e]);return e.length===0?null:c.jsxs("div",{className:"border-b px-4 py-3 shrink-0 space-y-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-[10px] font-medium text-muted-foreground",children:"Context Space Map"}),c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["(~",Fo(s)," est. tokens)"]})]}),c.jsx("div",{className:"w-full h-5 bg-muted/30 rounded-sm overflow-hidden flex",children:n.map(l=>c.jsx("div",{className:`h-full ${l.color} hover:brightness-110 transition-all relative group`,style:{width:`${l.percentage}%`},title:`${l.label}: ${Fo(l.estimatedTokens)} (${l.percentage.toFixed(1)}%)`,children:l.percentage>8&&c.jsx("span",{className:"absolute inset-0 flex items-center justify-center text-[9px] text-white font-medium truncate px-1",children:l.label})},l.category))}),c.jsx("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:n.map(l=>c.jsxs("div",{className:"flex items-center gap-1",children:[c.jsx("div",{className:`w-2 h-2 rounded-sm ${l.color}`}),c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:[l.label," ",Fo(l.estimatedTokens)," (",l.percentage.toFixed(1),"%)"]})]},l.category))}),c.jsx("div",{className:"overflow-x-auto",children:c.jsxs("table",{className:"w-full text-[11px]",children:[c.jsx("thead",{children:c.jsxs("tr",{className:"text-left text-muted-foreground border-b",children:[c.jsx("th",{className:"py-1 pr-3 font-medium",children:"Category"}),c.jsx("th",{className:"py-1 pr-3 font-medium text-right",children:"Messages"}),c.jsx("th",{className:"py-1 pr-3 font-medium text-right",children:"Est. Tokens"}),c.jsx("th",{className:"py-1 font-medium text-right",children:"Percentage"})]})}),c.jsx("tbody",{children:n.map(l=>c.jsxs("tr",{className:"border-b border-border/50",children:[c.jsx("td",{className:"py-1 pr-3",children:c.jsxs("span",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:`inline-block w-2 h-2 rounded-sm ${l.color}`}),c.jsx("span",{className:"text-foreground",children:l.label})]})}),c.jsx("td",{className:"py-1 pr-3 text-right text-muted-foreground tabular-nums",children:l.messageCount}),c.jsx("td",{className:"py-1 pr-3 text-right text-muted-foreground tabular-nums",children:Fo(l.estimatedTokens)}),c.jsxs("td",{className:"py-1 text-right text-muted-foreground tabular-nums",children:[l.percentage.toFixed(1),"%"]})]},l.category))})]})}),a.length>0&&c.jsxs("div",{children:[c.jsxs("div",{className:"text-[10px] font-medium text-muted-foreground mb-1",children:["Top ",a.length," Largest Items (>5% of total)"]}),c.jsx("div",{className:"flex flex-col gap-0.5",children:a.map((l,u)=>{const f=Ym[l.category];return c.jsxs("button",{onClick:()=>t(l.messageIndex),className:"flex items-center gap-2 px-2 py-1 rounded hover:bg-muted/50 text-left transition-colors group",children:[c.jsx("span",{className:`shrink-0 text-[9px] px-1.5 py-0.5 rounded font-medium text-white ${f?.bgColor??"bg-gray-500"}`,children:f?.label??l.category}),c.jsxs("span",{className:"flex-1 text-[11px] text-muted-foreground truncate group-hover:text-foreground",children:[l.preview,l.preview.length>=80?"...":""]}),c.jsx("span",{className:"shrink-0 text-[10px] text-muted-foreground tabular-nums",children:Fo(l.estimatedTokens)}),c.jsxs("span",{className:"shrink-0 text-[10px] text-muted-foreground tabular-nums",children:[l.percentage.toFixed(1),"%"]})]},`${l.messageIndex}-${u}`)})})]})]})}const Y_=v.createContext(null),G_=()=>v.useContext(Y_),X_=v.createContext(!1),v1=()=>v.useContext(X_);function QG({message:e}){const[t,n]=v.useState(!1),a=e.role==="_usage"?"Usage":e.role==="_checkpoint"?"Checkpoint":e.role,s=e.role==="_usage"?Fv:q5;return c.jsxs("div",{className:"my-0.5 ml-10 px-2 py-1 rounded border border-dashed bg-muted/10",children:[c.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1.5 text-[10px] text-muted-foreground hover:text-foreground",children:[c.jsx(s,{size:10}),c.jsx("span",{className:"font-medium",children:a}),e.role==="_usage"&&e.token_count!=null&&c.jsxs("span",{className:"font-mono",children:[e.token_count.toLocaleString()," tokens"]}),e.role==="_checkpoint"&&e.id!=null&&c.jsxs("span",{className:"font-mono",children:["id=",e.id]}),t?c.jsx($t,{size:10}):c.jsx(cn,{size:10})]}),t&&c.jsx("pre",{className:"mt-1 overflow-auto whitespace-pre-wrap text-[10px] font-mono text-muted-foreground max-h-32",children:JSON.stringify(e,null,2)})]})}function WG({message:e}){const[t,n]=v.useState(!1),a=typeof e.content=="string"?e.content:String(e.content??""),s=a.length,l=Math.round(s/4);return c.jsxs("div",{className:"my-2 rounded-md border border-blue-500/30 bg-blue-500/5 px-3 py-2",children:[c.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-2 w-full text-left text-xs",children:[c.jsx(ag,{size:12,className:"text-blue-500 shrink-0"}),c.jsx("span",{className:"font-medium text-blue-700 dark:text-blue-300",children:"System Prompt"}),c.jsxs("span",{className:"text-[10px] text-muted-foreground font-mono",children:["~",l.toLocaleString()," tokens · ",s.toLocaleString()," chars"]}),t?c.jsx($t,{size:11,className:"ml-auto shrink-0"}):c.jsx(cn,{size:11,className:"ml-auto shrink-0"})]}),t&&c.jsx("div",{className:"mt-2 max-h-[600px] overflow-auto text-xs text-muted-foreground",children:c.jsx("pre",{className:"whitespace-pre-wrap font-mono text-[11px] leading-relaxed",children:a})}),!t&&a&&c.jsxs("div",{className:"mt-1 truncate text-[11px] text-muted-foreground font-mono",children:[a.slice(0,120),a.length>120?"…":""]})]})}function KG({sessionId:e,refreshKey:t=0,onNavigateToWire:n,scrollToToolCallId:a,onScrollTargetConsumed:s,agentScope:l}){const[u,f]=v.useState([]),[h,m]=v.useState(!0),[p,g]=v.useState(null),[y,T]=v.useState(!1),[S,k]=v.useState(!1),[N,_]=v.useState(!1),[A,w]=v.useState(null),[P,F]=v.useState(""),[M,I]=v.useState(0),j=v.useRef(null);v.useEffect(()=>{m(!0),g(null),(l?Hv(e,l,t>0):Bv(e,t>0)).then(R=>{f(R.messages)}).catch(R=>g(R.message)).finally(()=>m(!1))},[e,t,l]);const G=v.useMemo(()=>y?u:u.filter(U=>!U.role.startsWith("_")),[u,y]),B=v.useMemo(()=>u.filter(U=>U.role.startsWith("_")).length,[u]),Q=v.useMemo(()=>{const U=new Map;return G.forEach((R,q)=>{if(R.tool_call_id&&U.set(R.tool_call_id,q),R.tool_calls)for(const W of R.tool_calls)U.set(W.id,q)}),U},[G]),V=v.useMemo(()=>{if(!P)return[];const U=P.toLowerCase(),R=[];return G.forEach((q,W)=>{const he=Sr(q.content);for(const O of he){if(O.text&&O.text.toLowerCase().includes(U)){R.push(W);return}if(O.think&&O.think.toLowerCase().includes(U)){R.push(W);return}if(O.thinking&&O.thinking.toLowerCase().includes(U)){R.push(W);return}}if(q.tool_calls){for(const O of q.tool_calls)if(O.function.name.toLowerCase().includes(U)||O.function.arguments.toLowerCase().includes(U)){R.push(W);return}}if(q.role==="tool"&&JSON.stringify(q.content).toLowerCase().includes(U)){R.push(W);return}}),R},[G,P]);v.useEffect(()=>{I(0),V.length>0&&j.current&&j.current.scrollToIndex({index:V[0],align:"center",behavior:"smooth"})},[P,V]);const te=v.useMemo(()=>new Set(V),[V]),ee=U=>{if(V.length===0)return;const R=U==="next"?(M+1)%V.length:(M-1+V.length)%V.length;I(R),j.current?.scrollToIndex({index:V[R],align:"center",behavior:"smooth"})};return v.useEffect(()=>{const U=R=>{const q=R.target?.tagName;q==="INPUT"||q==="TEXTAREA"||q==="SELECT"||R.key==="/"&&(R.preventDefault(),document.querySelector('input[placeholder="Search messages..."]')?.focus())};return window.addEventListener("keydown",U),()=>window.removeEventListener("keydown",U)},[]),v.useEffect(()=>{if(!a||G.length===0)return;w(a);const U=Q.get(a);U!=null&&j.current&&setTimeout(()=>{j.current?.scrollToIndex({index:U,align:"center",behavior:"smooth"})},100),s?.();const R=setTimeout(()=>w(null),3e3);return()=>clearTimeout(R)},[a,G,Q,s]),h?c.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"Loading context messages..."}):p?c.jsxs("div",{className:"flex h-full items-center justify-center text-destructive",children:["Error: ",p]}):u.length===0?c.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"No context messages found"}):c.jsx(X_.Provider,{value:S,children:c.jsx(Y_.Provider,{value:n??null,children:c.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[l&&c.jsxs("div",{className:"flex items-center gap-2 px-4 py-1 border-b bg-indigo-500/5 text-[11px] text-indigo-600 dark:text-indigo-400 shrink-0",children:[c.jsx("span",{className:"font-medium",children:"Sub-agent context"}),c.jsx("span",{className:"font-mono text-[10px] text-muted-foreground",children:l.slice(0,8)})]}),c.jsxs("div",{className:"flex items-center gap-2 px-4 py-1.5 border-b text-[11px] text-muted-foreground shrink-0",children:[c.jsxs("span",{className:"shrink-0",children:[u.length," messages"]}),B>0&&c.jsxs("button",{onClick:()=>T(!y),className:"flex items-center gap-1 hover:text-foreground shrink-0",children:[y?c.jsx(y6,{size:11}):c.jsx(T6,{size:11}),y?"Hide":"Show"," ",B," internal"]}),c.jsx("div",{className:"h-4 w-px bg-border shrink-0"}),c.jsxs("div",{className:"relative flex-1 max-w-xs",children:[c.jsx(lg,{size:12,className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),c.jsx("input",{value:P,onChange:U=>F(U.target.value),onKeyDown:U=>{U.key==="Enter"&&(U.preventDefault(),ee(U.shiftKey?"prev":"next")),U.key==="Escape"&&(F(""),U.target.blur())},placeholder:"Search messages...",className:"w-full rounded border bg-background pl-7 pr-7 py-0.5 text-xs placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring"}),P&&c.jsx("button",{onClick:()=>F(""),className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:c.jsx(Su,{size:11})})]}),P&&c.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[c.jsx("span",{className:"text-[10px]",children:V.length>0?`${M+1}/${V.length}`:"0 results"}),c.jsx("button",{onClick:()=>ee("prev"),className:"p-0.5 hover:bg-muted rounded",title:"Previous (Shift+Enter)",children:c.jsx(rg,{size:12})}),c.jsx("button",{onClick:()=>ee("next"),className:"p-0.5 hover:bg-muted rounded",title:"Next (Enter)",children:c.jsx($t,{size:12})})]}),c.jsx("div",{className:"ml-auto"}),c.jsxs("button",{onClick:()=>_(!N),className:`flex items-center gap-1 px-2 py-0.5 rounded transition-colors shrink-0 ${N?"bg-primary/10 text-foreground":"hover:text-foreground"}`,children:[c.jsx(ng,{size:11}),"Space"]}),c.jsxs("button",{onClick:()=>k(!S),className:`flex items-center gap-1 px-2 py-0.5 rounded transition-colors shrink-0 ${S?"bg-primary/10 text-foreground":"hover:text-foreground"}`,children:[S?c.jsx(f6,{size:11}):c.jsx(ag,{size:11}),S?"Raw":"Rendered"]})]}),N&&c.jsx(XG,{messages:u,onScrollToIndex:U=>{j.current?.scrollToIndex({index:U,align:"center",behavior:"smooth"})}}),c.jsx(qd,{ref:j,data:G,itemContent:(U,R)=>{const q=R.tool_call_id??null,W=R.tool_calls?.map(H=>H.id)??[],he=q&&q===A||W.includes(A??""),O=P&&te.has(U);return c.jsxs("div",{className:`px-4 py-1 ${he?"bg-blue-500/10 ring-1 ring-blue-500/30 rounded transition-all":""} ${O?"bg-yellow-500/10":""}`,children:[R.role==="user"&&c.jsx(BG,{message:R}),R.role==="assistant"&&c.jsx(qG,{message:R}),R.role==="tool"&&c.jsx(VG,{message:R}),R.role==="system"&&c.jsx(ZG,{message:R}),R.role==="_system_prompt"&&c.jsx(WG,{message:R}),R.role.startsWith("_")&&R.role!=="_system_prompt"&&c.jsx(QG,{message:R}),!["user","assistant","tool","system"].includes(R.role)&&!R.role.startsWith("_")&&c.jsx(JG,{message:R})]})}})]})})})}function ZG({message:e}){const[t,n]=v.useState(!1),a=v1(),s=Sr(e.content)[0]?.text??"",l=s.slice(0,150);return c.jsxs("div",{className:"my-2 rounded-md border border-dashed bg-muted/30 px-3 py-2",children:[c.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",children:[c.jsx("span",{className:"font-medium",children:"System"}),e.name&&c.jsx("span",{className:"font-mono text-[10px] bg-muted px-1 py-0.5 rounded",children:e.name}),t?c.jsx($t,{size:12}):c.jsx(cn,{size:12})]}),t?c.jsx("div",{className:"mt-2 max-h-96 overflow-auto text-xs text-muted-foreground",children:s?a?c.jsx("pre",{className:"whitespace-pre-wrap font-mono text-[11px]",children:s}):c.jsx(Uf,{children:s}):c.jsx("pre",{className:"whitespace-pre-wrap font-mono text-[11px]",children:JSON.stringify(e.content,null,2)})}):c.jsxs("div",{className:"mt-1 truncate text-xs text-muted-foreground",children:[l,s.length>150?"...":""]})]})}function JG({message:e}){const[t,n]=v.useState(!1);return c.jsxs("div",{className:"my-1 rounded-md border bg-muted/10 px-3 py-2",children:[c.jsxs("button",{onClick:()=>n(!t),className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",children:[c.jsx("span",{className:"font-mono font-medium",children:e.role}),e.name&&c.jsx("span",{className:"font-mono text-[10px] bg-muted px-1 py-0.5 rounded",children:e.name}),t?c.jsx($t,{size:12}):c.jsx(cn,{size:12})]}),t&&c.jsx("pre",{className:"mt-2 overflow-auto whitespace-pre-wrap text-[11px] font-mono text-muted-foreground max-h-64",children:JSON.stringify(e,null,2)})]})}function Yp({value:e,depth:t=0}){const[n,a]=v.useState(t<2);if(e===null)return c.jsx("span",{className:"text-muted-foreground italic",children:"null"});if(typeof e=="boolean")return c.jsx("span",{className:e?"text-green-600 dark:text-green-400":"text-red-500 dark:text-red-400",children:String(e)});if(typeof e=="number")return c.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:e});if(typeof e=="string")return c.jsxs("span",{className:"text-amber-700 dark:text-amber-300",children:['"',e,'"']});if(Array.isArray(e))return e.length===0?c.jsx("span",{className:"text-muted-foreground",children:"[]"}):c.jsxs("div",{children:[c.jsxs("button",{onClick:()=>a(!n),className:"inline-flex items-center gap-0.5 text-muted-foreground hover:text-foreground",children:[n?c.jsx($t,{size:12}):c.jsx(cn,{size:12}),c.jsxs("span",{className:"text-xs",children:["[",e.length,"]"]})]}),n&&c.jsx("div",{className:"ml-4 border-l border-border pl-3",children:e.map((s,l)=>c.jsxs("div",{className:"py-0.5",children:[c.jsxs("span",{className:"text-muted-foreground text-[11px] mr-2",children:[l,":"]}),c.jsx(Yp,{value:s,depth:t+1})]},l))})]});if(typeof e=="object"){const s=Object.entries(e);return s.length===0?c.jsx("span",{className:"text-muted-foreground",children:"{}"}):c.jsxs("div",{children:[c.jsxs("button",{onClick:()=>a(!n),className:"inline-flex items-center gap-0.5 text-muted-foreground hover:text-foreground",children:[n?c.jsx($t,{size:12}):c.jsx(cn,{size:12}),c.jsx("span",{className:"text-xs",children:`{${s.length}}`})]}),n&&c.jsx("div",{className:"ml-4 border-l border-border pl-3",children:s.map(([l,u])=>c.jsxs("div",{className:"py-0.5",children:[c.jsxs("span",{className:"font-medium text-xs",children:[l,": "]}),c.jsx(Yp,{value:u,depth:t+1})]},l))})]})}return c.jsx("span",{children:String(e)})}function eX({sessionId:e,refreshKey:t=0}){const[n,a]=v.useState(null),[s,l]=v.useState(!0),[u,f]=v.useState(null);if(v.useEffect(()=>{l(!0),f(null),S5(e,t>0).then(a).catch(g=>f(g.message)).finally(()=>l(!1))},[e,t]),s)return c.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"Loading state..."});if(u)return c.jsxs("div",{className:"flex h-full items-center justify-center text-destructive",children:["Error: ",u]});if(!n||Object.keys(n).length===0)return c.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"No state data found"});const h=n.approval,m=n.dynamic_subagents,p=n.additional_dirs;return c.jsxs("div",{className:"h-full overflow-auto p-4 space-y-4",children:[c.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[c.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(Z6,{size:16,className:"text-muted-foreground"}),c.jsx("h3",{className:"text-sm font-semibold",children:"Approval"})]}),h&&c.jsxs("div",{className:"space-y-1.5 text-xs",children:[c.jsxs("div",{className:"flex items-center justify-between",children:[c.jsx("span",{className:"text-muted-foreground",children:"YOLO Mode"}),c.jsx("span",{className:`font-medium ${h.yolo?"text-green-600 dark:text-green-400":"text-muted-foreground"}`,children:h.yolo?"ON":"OFF"})]}),c.jsxs("div",{children:[c.jsx("span",{className:"text-muted-foreground",children:"Auto-approved actions:"}),Array.isArray(h.auto_approve_actions)&&h.auto_approve_actions.length>0?c.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:h.auto_approve_actions.map(g=>c.jsx("span",{className:"rounded bg-secondary px-1.5 py-0.5 text-[10px] font-mono",children:g},g))}):c.jsx("span",{className:"ml-1 text-muted-foreground",children:"none"})]})]})]}),c.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(f4,{size:16,className:"text-muted-foreground"}),c.jsx("h3",{className:"text-sm font-semibold",children:"Dynamic Subagents"})]}),c.jsx("div",{className:"text-xs",children:m&&m.length>0?c.jsx("div",{className:"space-y-1",children:m.map((g,y)=>{const T=g;return c.jsx("div",{className:"rounded bg-secondary px-2 py-1 font-mono",children:String(T.name??"unnamed")},y)})}):c.jsx("span",{className:"text-muted-foreground",children:"No subagents"})})]}),c.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[c.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[c.jsx(sf,{size:16,className:"text-muted-foreground"}),c.jsx("h3",{className:"text-sm font-semibold",children:"Additional Dirs"})]}),c.jsx("div",{className:"text-xs",children:p&&p.length>0?c.jsx("div",{className:"space-y-1",children:p.map(g=>c.jsx("div",{className:"truncate font-mono text-muted-foreground",children:g},g))}):c.jsx("span",{className:"text-muted-foreground",children:"None"})})]})]}),c.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[c.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Raw State"}),c.jsx("div",{className:"font-mono text-xs",children:c.jsx(Yp,{value:n})})]})]})}const Rv={completed:{icon:o6,color:"text-green-500",label:"Completed"},running_foreground:{icon:Id,color:"text-blue-500",label:"Running (foreground)"},running_background:{icon:Id,color:"text-cyan-500",label:"Running (background)"},failed:{icon:$v,color:"text-red-500",label:"Failed"},killed:{icon:e4,color:"text-orange-500",label:"Killed"},idle:{icon:Y6,color:"text-gray-400",label:"Idle"}},tX={coder:"bg-violet-500/15 text-violet-700 dark:text-violet-300 border-violet-500/30",explore:"bg-cyan-500/15 text-cyan-700 dark:text-cyan-300 border-cyan-500/30",plan:"bg-amber-500/15 text-amber-700 dark:text-amber-300 border-amber-500/30","general-purpose":"bg-blue-500/15 text-blue-700 dark:text-blue-300 border-blue-500/30"};function Gp(e){return tX[e]??"bg-indigo-500/15 text-indigo-700 dark:text-indigo-300 border-indigo-500/30"}function nX(e){return e===0?"0 B":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function rX(e){return new Date(e*1e3).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function aX(e,t){const n=t-e;return n<1?`${(n*1e3).toFixed(0)}ms`:n<60?`${n.toFixed(1)}s`:`${(n/60).toFixed(1)}min`}function iX({sessionId:e,refreshKey:t=0,onSelectAgent:n,selectedAgentId:a,onSelectMain:s}){const[l,u]=v.useState([]),[f,h]=v.useState(!0),[m,p]=v.useState(null);v.useEffect(()=>{h(!0),p(null),Jp(e,t>0).then(u).catch(y=>p(y.message)).finally(()=>h(!1))},[e,t]);const g=v.useMemo(()=>{const y=new Map;for(const T of l){const S=y.get(T.subagent_type)??[];S.push(T),y.set(T.subagent_type,S)}return y},[l]);return f?c.jsxs("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:[c.jsx(Id,{size:16,className:"animate-spin mr-2"}),"Loading agents..."]}):m?c.jsxs("div",{className:"flex h-full items-center justify-center text-destructive",children:["Error: ",m]}):l.length===0?c.jsxs("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:[c.jsx(Mr,{size:20,className:"mr-2 opacity-50"}),"No sub-agents in this session"]}):c.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[c.jsxs("div",{className:"flex items-center gap-3 border-b px-4 py-3",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx(Mr,{size:16,className:"text-indigo-500"}),c.jsxs("span",{className:"text-sm font-medium",children:[l.length," Sub-Agent",l.length!==1?"s":""]})]}),c.jsx("div",{className:"flex gap-2 text-xs text-muted-foreground",children:Array.from(g.entries()).map(([y,T])=>c.jsxs("span",{className:`rounded border px-1.5 py-0.5 ${Gp(y)}`,children:[y," (",T.length,")"]},y))})]}),c.jsx("div",{className:"px-3 pt-3 pb-1",children:c.jsxs("button",{onClick:s,className:`w-full flex items-center gap-3 rounded-lg border px-4 py-3 text-left transition-all ${a===null?"border-primary bg-primary/5 shadow-sm":"border-border hover:border-primary/40 hover:bg-muted/30"}`,children:[c.jsx("div",{className:`flex h-8 w-8 items-center justify-center rounded-lg ${a===null?"bg-primary/15":"bg-muted"}`,children:c.jsx(Xm,{size:16,className:a===null?"text-primary":"text-muted-foreground"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsx("div",{className:"text-sm font-medium",children:"Main Agent"}),c.jsx("div",{className:"text-[11px] text-muted-foreground",children:"Root conversation & orchestration"})]}),a===null&&c.jsx("span",{className:"text-[10px] font-medium text-primary bg-primary/10 px-2 py-0.5 rounded-full",children:"Active"})]})}),c.jsx("div",{className:"flex-1 overflow-auto px-3 py-2 space-y-2",children:Array.from(g.entries()).map(([y,T])=>c.jsxs("div",{children:[c.jsxs("div",{className:"flex items-center gap-2 px-1 py-1.5",children:[c.jsx("span",{className:`text-[10px] font-semibold uppercase tracking-wider ${Gp(y).split(" ")[1]}`,children:y}),c.jsx("div",{className:"h-px flex-1 bg-border/50"})]}),c.jsx("div",{className:"space-y-1.5",children:T.map(S=>c.jsx(sX,{agent:S,isSelected:a===S.agent_id,onSelect:()=>n(S.agent_id)},S.agent_id))})]},y))})]})}function sX({agent:e,isSelected:t,onSelect:n}){const a=Rv[e.status]??Rv.idle,s=a.icon;return c.jsxs("button",{onClick:n,className:`w-full group flex items-start gap-3 rounded-lg border px-3 py-2.5 text-left transition-all ${t?"border-indigo-500/50 bg-indigo-500/5 shadow-sm":"border-border hover:border-indigo-500/30 hover:bg-muted/30"}`,children:[c.jsx("div",{className:`mt-0.5 flex h-7 w-7 items-center justify-center rounded-md ${t?"bg-indigo-500/15":"bg-muted"}`,children:c.jsx(Mr,{size:14,className:t?"text-indigo-500":"text-muted-foreground"})}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-xs font-medium truncate",children:e.description||e.agent_id.slice(0,12)}),c.jsx(s,{size:12,className:`shrink-0 ${a.color} ${e.status.startsWith("running")?"animate-spin":""}`})]}),c.jsxs("div",{className:"flex items-center gap-2 mt-1 flex-wrap",children:[c.jsx("span",{className:`text-[9px] font-mono rounded border px-1 py-0 ${Gp(e.subagent_type)}`,children:e.subagent_type}),typeof e.launch_spec?.effective_model=="string"&&e.launch_spec.effective_model&&c.jsx("span",{className:"text-[9px] font-mono rounded border px-1 py-0 bg-emerald-500/15 text-emerald-700 dark:text-emerald-300 border-emerald-500/30",children:e.launch_spec.effective_model}),c.jsx("span",{className:"text-[9px] font-mono text-muted-foreground",children:e.agent_id.slice(0,8)})]}),c.jsxs("div",{className:"flex items-center gap-3 mt-1.5 text-[10px] text-muted-foreground",children:[c.jsxs("span",{className:"flex items-center gap-0.5",children:[c.jsx(rf,{size:9}),rX(e.created_at)]}),e.updated_at>e.created_at&&c.jsxs("span",{className:"flex items-center gap-0.5",children:[c.jsx(og,{size:9}),aX(e.created_at,e.updated_at)]}),(e.wire_size>0||e.context_size>0)&&c.jsxs("span",{className:"flex items-center gap-0.5",children:[c.jsx(ag,{size:9}),nX(e.wire_size+e.context_size)]})]})]}),c.jsx(cn,{size:14,className:`mt-1 shrink-0 transition-transform ${t?"text-indigo-500":"text-muted-foreground/50 group-hover:text-muted-foreground"}`})]})}const Gm={coder:"bg-violet-500",explore:"bg-cyan-500",plan:"bg-amber-500","general-purpose":"bg-blue-500"};function lX({sessionId:e,refreshKey:t=0,selectedAgentId:n,onSelectAgent:a}){const[s,l]=v.useState([]),[u,f]=v.useState(!1);if(v.useEffect(()=>{Jp(e,t>0).then(l).catch(()=>l([]))},[e,t]),s.length===0)return null;const h=n?s.find(m=>m.agent_id===n):null;return c.jsxs("div",{className:"relative flex items-center gap-2 border-b px-4 py-1.5 bg-muted/20",children:[c.jsx("span",{className:"text-[10px] font-medium text-muted-foreground uppercase tracking-wider",children:"Scope"}),c.jsxs("button",{onClick:()=>f(m=>!m),className:"flex items-center gap-2 rounded-md border bg-background px-2.5 py-1 text-xs hover:bg-muted/50 transition-colors",children:[h?c.jsxs(c.Fragment,{children:[c.jsx(Mr,{size:12,className:"text-indigo-500"}),c.jsx("span",{className:"font-medium",children:h.description||h.agent_id.slice(0,8)}),c.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${Gm[h.subagent_type]??"bg-indigo-500"}`}),c.jsx("span",{className:"text-[10px] text-muted-foreground",children:h.subagent_type})]}):c.jsxs(c.Fragment,{children:[c.jsx(Xm,{size:12,className:"text-primary"}),c.jsx("span",{className:"font-medium",children:"Main Agent"})]}),c.jsx($t,{size:12,className:`text-muted-foreground transition-transform ${u?"rotate-180":""}`})]}),c.jsxs("div",{className:"flex items-center gap-1 ml-1",children:[c.jsx("button",{onClick:()=>{a(null),f(!1)},className:`rounded-full px-2 py-0.5 text-[10px] font-medium transition-colors ${n===null?"bg-primary/15 text-primary":"text-muted-foreground hover:bg-muted"}`,children:"Main"}),s.slice(0,5).map(m=>c.jsxs("button",{onClick:()=>{a(m.agent_id),f(!1)},className:`flex items-center gap-1 rounded-full px-2 py-0.5 text-[10px] font-medium transition-colors ${n===m.agent_id?"bg-indigo-500/15 text-indigo-600 dark:text-indigo-400":"text-muted-foreground hover:bg-muted"}`,title:m.description||m.agent_id,children:[c.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${Gm[m.subagent_type]??"bg-indigo-500"}`}),(m.description||m.agent_id).slice(0,20)]},m.agent_id)),s.length>5&&c.jsxs("span",{className:"text-[10px] text-muted-foreground",children:["+",s.length-5," more"]})]}),u&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-40",onClick:()=>f(!1)}),c.jsxs("div",{className:"absolute left-4 top-full z-50 mt-1 w-80 rounded-lg border bg-popover shadow-lg overflow-hidden",children:[c.jsxs("button",{onClick:()=>{a(null),f(!1)},className:`flex items-center gap-2 w-full px-3 py-2 text-left text-xs hover:bg-muted/50 transition-colors ${n===null?"bg-primary/5":""}`,children:[c.jsx(Xm,{size:13,className:"text-primary shrink-0"}),c.jsx("span",{className:"font-medium",children:"Main Agent"}),c.jsx("span",{className:"text-[10px] text-muted-foreground ml-auto",children:"Root"})]}),c.jsx("div",{className:"h-px bg-border"}),c.jsx("div",{className:"max-h-64 overflow-auto",children:s.map(m=>c.jsxs("button",{onClick:()=>{a(m.agent_id),f(!1)},className:`flex items-center gap-2 w-full px-3 py-2 text-left text-xs hover:bg-muted/50 transition-colors ${n===m.agent_id?"bg-indigo-500/5":""}`,children:[c.jsx(Mr,{size:13,className:"text-indigo-500 shrink-0"}),c.jsxs("div",{className:"flex-1 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:"font-medium truncate",children:m.description||m.agent_id.slice(0,12)}),c.jsx("span",{className:`text-[9px] rounded border px-1 ${m.status==="completed"?"text-green-600 border-green-500/30":m.status.startsWith("running")?"text-blue-600 border-blue-500/30":m.status==="failed"?"text-red-600 border-red-500/30":m.status==="killed"?"text-orange-600 border-orange-500/30":"text-gray-500 border-gray-500/30"}`,children:m.status})]}),c.jsxs("div",{className:"text-[10px] text-muted-foreground",children:[m.subagent_type," · ",m.agent_id.slice(0,8)]})]}),c.jsx("span",{className:`h-2 w-2 rounded-full shrink-0 ${Gm[m.subagent_type]??"bg-indigo-500"}`})]},m.agent_id))})]})]})]})}function oX(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function uX(){const[e,t]=v.useState(()=>localStorage.getItem("vis-theme")??oX());v.useEffect(()=>{document.documentElement.classList.toggle("dark",e==="dark"),localStorage.setItem("vis-theme",e)},[e]);const n=v.useCallback(()=>{t(a=>a==="dark"?"light":"dark")},[]);return{theme:e,toggleTheme:n}}const cX={TurnBegin:"bg-blue-500/15 text-blue-700 dark:text-blue-300",TurnEnd:"bg-blue-500/15 text-blue-700 dark:text-blue-300",SteerInput:"bg-blue-500/15 text-blue-700 dark:text-blue-300",StepBegin:"bg-green-500/15 text-green-700 dark:text-green-300",StepInterrupted:"bg-yellow-500/15 text-yellow-700 dark:text-yellow-300",CompactionBegin:"bg-orange-500/15 text-orange-700 dark:text-orange-300",CompactionEnd:"bg-orange-500/15 text-orange-700 dark:text-orange-300",MCPLoadingBegin:"bg-cyan-500/15 text-cyan-700 dark:text-cyan-300",MCPLoadingEnd:"bg-cyan-500/15 text-cyan-700 dark:text-cyan-300",StatusUpdate:"bg-gray-500/15 text-gray-700 dark:text-gray-300",Notification:"bg-yellow-500/15 text-yellow-700 dark:text-yellow-300",TextPart:"bg-gray-500/15 text-gray-700 dark:text-gray-300",ThinkPart:"bg-gray-500/15 text-gray-700 dark:text-gray-300",PlanDisplay:"bg-teal-500/15 text-teal-700 dark:text-teal-300",ToolCall:"bg-purple-500/15 text-purple-700 dark:text-purple-300",ToolResult:"bg-purple-500/15 text-purple-700 dark:text-purple-300",ToolCallPart:"bg-purple-500/15 text-purple-700 dark:text-purple-300",ToolCallRequest:"bg-purple-500/15 text-purple-700 dark:text-purple-300",QuestionRequest:"bg-amber-500/15 text-amber-700 dark:text-amber-300",ApprovalRequest:"bg-amber-500/15 text-amber-700 dark:text-amber-300",ApprovalResponse:"bg-amber-500/15 text-amber-700 dark:text-amber-300",SubagentEvent:"bg-indigo-500/15 text-indigo-700 dark:text-indigo-300"},dX={user:"bg-blue-500/15 text-blue-700 dark:text-blue-300",assistant:"bg-green-500/15 text-green-700 dark:text-green-300",tool:"bg-purple-500/15 text-purple-700 dark:text-purple-300",system:"bg-gray-500/15 text-gray-700 dark:text-gray-300"};function fX(e){const t=e.payload;switch(e.type){case"TurnBegin":{const n=t.user_input;if(typeof n=="string")return n.slice(0,100);if(Array.isArray(n)&&n.length>0){const a=n[0];return String(a.text??"").slice(0,100)}return""}case"StepBegin":return`Step ${t.n}`;case"TextPart":return String(t.text??"").slice(0,100);case"ThinkPart":return String(t.thinking??t.think??"").slice(0,100);case"ToolCall":{const n=t.function;return n?`${n.name}()`:""}case"ToolCallPart":return String(t.arguments_part??"").slice(0,60);case"ToolResult":{const n=t.return_value;if(n){const a=n.is_error?"[error] ":"",s=n.output;return typeof s=="string"?`${a}${s.slice(0,100)}`:Array.isArray(s)?`${a}${s.length} part(s)`:a||"result"}return`tool_call_id: ${t.tool_call_id}`}case"StatusUpdate":return t.context_usage!=null?`ctx: ${(t.context_usage*100).toFixed(1)}%`:"";case"ApprovalRequest":return`${t.sender}: ${t.action}`;case"ApprovalResponse":return String(t.response??"");case"SubagentEvent":{const a=t.event?.type;return a?`sub:${a}`:""}default:return""}}function hX(e){return e.role==="tool"?Sr(e.content).map(a=>a.text??"").join(" ").slice(0,100)||(e.name?`${e.name} result`:"tool result"):e.role==="assistant"?e.tool_calls&&e.tool_calls.length>0?e.tool_calls.map(a=>`${a.function.name}()`).join(", "):Sr(e.content).map(a=>a.text??a.think??a.thinking??"").join(" ").slice(0,100):e.role==="user"||e.role==="system"?Sr(e.content).map(a=>a.text??"").join(" ").slice(0,100):e.role}function Ov(e){return e.type==="ToolCall"?e.payload.id??null:e.type==="ToolResult"?e.payload.tool_call_id??null:null}function Iv(e){const t=[];if(e.tool_call_id&&t.push(e.tool_call_id),e.tool_calls)for(const n of e.tool_calls)t.push(n.id);return t}function mX({sessionId:e,refreshKey:t=0,agentScope:n}){const[a,s]=v.useState([]),[l,u]=v.useState([]),[f,h]=v.useState(!0),[m,p]=v.useState(!0),[g,y]=v.useState(null),[T,S]=v.useState(null),[k,N]=v.useState(null),_=v.useRef(null),A=v.useRef(null),w=v.useRef(null);v.useEffect(()=>{const j=t>0;h(!0),y(null),(n?zv(e,n,j):Zp(e,j)).then(Q=>s(Q.events)).catch(Q=>y(Q.message)).finally(()=>h(!1)),p(!0),S(null),(n?Hv(e,n,j):Bv(e,j)).then(Q=>u(Q.messages.filter(V=>!V.role.startsWith("_")))).catch(Q=>S(Q.message)).finally(()=>p(!1))},[e,t,n]);const P=v.useMemo(()=>{const j=new Map;return a.forEach((G,B)=>{const Q=Ov(G);Q&&j.set(Q,B)}),j},[a]),F=v.useMemo(()=>{const j=new Map;return l.forEach((G,B)=>{for(const Q of Iv(G))j.set(Q,B)}),j},[l]),M=v.useCallback((j,G)=>{if(w.current&&clearTimeout(w.current),N(j),G==="wire"){const B=F.get(j);B!=null&&A.current?.scrollToIndex({index:B,align:"center",behavior:"smooth"})}else{const B=P.get(j);B!=null&&_.current?.scrollToIndex({index:B,align:"center",behavior:"smooth"})}w.current=setTimeout(()=>{N(null)},2e3)},[F,P]);return v.useEffect(()=>()=>{w.current&&clearTimeout(w.current)},[]),f||m?c.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"Loading dual view..."}):c.jsxs("div",{className:"flex h-full overflow-hidden",children:[c.jsxs("div",{className:"flex w-1/2 flex-col border-r overflow-hidden",children:[c.jsxs("div",{className:"shrink-0 border-b px-3 py-1.5 text-[11px] font-medium text-muted-foreground",children:["Wire Events",c.jsxs("span",{className:"ml-1.5 font-mono text-[10px]",children:["(",a.length,")"]})]}),g?c.jsxs("div",{className:"flex h-full items-center justify-center text-xs text-destructive",children:["Error: ",g]}):a.length===0?c.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:"No wire events"}):c.jsx(qd,{ref:_,data:a,itemContent:(j,G)=>{const B=Ov(G),Q=B!=null&&B===k,V=B!=null,te=fX(G);return c.jsxs("div",{className:`flex items-center gap-1.5 border-b px-3 py-1 transition-all duration-300 ${Q?"ring-1 ring-blue-500/30 bg-blue-500/10":""} ${V?"cursor-pointer hover:bg-muted/50":""}`,onClick:()=>{B&&M(B,"wire")},children:[c.jsx("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground w-[72px]",children:Ud(G.timestamp)}),c.jsx("span",{className:`shrink-0 rounded px-1.5 py-0 text-[10px] font-medium ${cX[G.type]??"bg-secondary text-secondary-foreground"}`,children:G.type}),te&&c.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:te})]})}})]}),c.jsxs("div",{className:"flex w-1/2 flex-col overflow-hidden",children:[c.jsxs("div",{className:"shrink-0 border-b px-3 py-1.5 text-[11px] font-medium text-muted-foreground",children:["Context Messages",c.jsxs("span",{className:"ml-1.5 font-mono text-[10px]",children:["(",l.length,")"]})]}),T?c.jsxs("div",{className:"flex h-full items-center justify-center text-xs text-destructive",children:["Error: ",T]}):l.length===0?c.jsx("div",{className:"flex h-full items-center justify-center text-xs text-muted-foreground",children:"No context messages"}):c.jsx(qd,{ref:A,data:l,itemContent:(j,G)=>{const B=Iv(G),Q=B.some(ee=>ee===k),V=B.length>0,te=hX(G);return c.jsxs("div",{className:`flex items-center gap-1.5 border-b px-3 py-1 transition-all duration-300 ${Q?"ring-1 ring-blue-500/30 bg-blue-500/10":""} ${V?"cursor-pointer hover:bg-muted/50":""}`,onClick:()=>{B.length>0&&M(B[0],"context")},children:[c.jsx("span",{className:`shrink-0 rounded px-1.5 py-0 text-[10px] font-medium ${dX[G.role]??"bg-secondary text-secondary-foreground"}`,children:G.role}),G.role==="tool"&&G.name&&c.jsx("span",{className:"shrink-0 font-mono text-[10px] text-purple-600 dark:text-purple-400",children:G.name}),te&&c.jsx("span",{className:"truncate text-[11px] text-muted-foreground",children:te})]})}})]})]})}function pX({delayDuration:e=0,...t}){return c.jsx(Z3,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Xp({...e}){return c.jsx(up,{"data-slot":"tooltip",...e})}function Qp({...e}){return c.jsx(cp,{"data-slot":"tooltip-trigger",...e})}function Wp({className:e,sideOffset:t=0,children:n,...a}){return c.jsx(dp,{children:c.jsxs(fp,{"data-slot":"tooltip-content",sideOffset:t,className:pn("z-50 w-fit origin-(--radix-tooltip-content-transform-origin) animate-in rounded-md bg-foreground px-3 py-1.5 text-xs text-balance text-background fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...a,children:[n,c.jsx(UD,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}function gX(e){let t=0,n=0,a=0,s=0,l=0,u=0,f=0,h=0,m=0,p=0;for(const S of e){if(S.type==="TurnBegin"&&t++,S.type==="StepBegin"&&n++,S.type==="ToolCall"&&a++,S.type==="CompactionBegin"&&l++,Tl(S)&&s++,S.type==="StatusUpdate"){const k=S.payload.token_usage;k&&(u+=(k.input_other??0)+(k.input_cache_read??0)+(k.input_cache_creation??0),f+=k.output??0,h+=k.input_cache_read??0,m+=k.input_other??0,p+=k.input_cache_creation??0)}if(S.type==="SubagentEvent"){const k=S.payload.event;if(k?.type==="StatusUpdate"){const _=k.payload?.token_usage;_&&(u+=(_.input_other??0)+(_.input_cache_read??0)+(_.input_cache_creation??0),f+=_.output??0,h+=_.input_cache_read??0,m+=_.input_other??0,p+=_.input_cache_creation??0)}}}const g=e.length>=2?e[e.length-1].timestamp-e[0].timestamp:0,y=h+m+p,T=y>0?h/y*100:0;return{turns:t,steps:n,toolCalls:a,errors:s,compactions:l,durationSec:g,inputTokens:u,outputTokens:f,cacheRate:T}}function xX(e){return e<1?`${(e*1e3).toFixed(0)}ms`:e<60?`${e.toFixed(1)}s`:`${(e/60).toFixed(1)}min`}function Dv(e){return e===0?"0":e<1e3?`${e}`:`${(e/1e3).toFixed(1)}k`}function bX(e){return e.session_dir}function yX({session:e,openInSupported:t}){const[n,a]=v.useState(!1),s=v.useCallback(async()=>{try{await C5("finder",e.session_dir)}catch(u){console.error("Failed to open session directory:",u),window.alert(u instanceof Error?`Failed to open session directory:
185
+ ${u.message}`:"Failed to open session directory")}},[e.session_dir]),l=v.useCallback(async()=>{try{await navigator.clipboard.writeText(bX(e)),a(!0),setTimeout(()=>a(!1),2e3)}catch(u){console.error("Failed to copy DIR info:",u),window.alert("Failed to copy DIR info")}},[e]);return c.jsxs("div",{className:"flex shrink-0 items-center gap-1 px-1.5",children:[t&&c.jsxs(Xp,{children:[c.jsx(Qp,{asChild:!0,children:c.jsx("button",{onClick:s,className:"rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground","aria-label":"Open current session directory",children:c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(sf,{size:13}),"Open Dir"]})})}),c.jsxs(Wp,{side:"bottom",className:"max-w-md break-all",children:["Open current session directory",c.jsx("div",{className:"mt-1 font-mono text-[11px]",children:e.session_dir})]})]}),c.jsxs(Xp,{children:[c.jsx(Qp,{asChild:!0,children:c.jsx("button",{onClick:l,className:"rounded-md px-2 py-1.5 text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground","aria-label":"Copy current session directory info",children:c.jsxs("span",{className:"flex items-center gap-1",children:[n?c.jsx(vu,{size:13}):c.jsx(af,{size:13}),"Copy DIR"]})})}),c.jsx(Wp,{side:"bottom",children:n?"Copied session directory":"Copy session directory path"})]})]})}function EX({sessionId:e,refreshKey:t}){const[n,a]=v.useState(!1),[s,l]=v.useState([]),[u,f]=v.useState(!1),[h,m]=v.useState(0);v.useEffect(()=>{f(!1),Zp(e,t>0).then(y=>l(y.events)).catch(()=>l([])).finally(()=>f(!0)),Jp(e,t>0).then(y=>m(y.length)).catch(()=>m(0))},[e,t]);const p=v.useMemo(()=>gX(s),[s]);if(!u||s.length===0)return null;const g=[`${p.turns} turn${p.turns!==1?"s":""}`,`${p.steps} step${p.steps!==1?"s":""}`,`${p.toolCalls} tool call${p.toolCalls!==1?"s":""}`];return p.errors>0&&g.push(`${p.errors} error${p.errors!==1?"s":""}`),p.compactions>0&&g.push(`${p.compactions} compaction${p.compactions!==1?"s":""}`),h>0&&g.push(`${h} agent${h!==1?"s":""}`),c.jsxs("div",{className:"min-w-0 flex flex-1 items-center gap-2 overflow-x-auto px-4 py-1.5 text-xs text-muted-foreground",children:[c.jsxs(Xp,{children:[c.jsx(Qp,{asChild:!0,children:c.jsx("span",{className:"font-mono shrink-0 cursor-pointer hover:text-foreground transition-colors",onClick:()=>{const y=e.split("/").pop()??e;navigator.clipboard.writeText(y).catch(()=>{}),a(!0),setTimeout(()=>a(!1),2e3)},children:e.split("/").pop()??e})}),c.jsx(Wp,{children:n?"Copied!":"Click to copy"})]}),c.jsx("span",{className:"text-border",children:"|"}),c.jsx("span",{className:"shrink-0",children:g.join(" · ")}),c.jsx("span",{className:"text-border",children:"|"}),c.jsx("span",{className:"shrink-0",children:xX(p.durationSec)}),(p.inputTokens>0||p.outputTokens>0)&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-border",children:"|"}),c.jsxs("span",{className:"shrink-0",children:[Dv(p.inputTokens)," in / ",Dv(p.outputTokens)," out"]}),p.cacheRate>0&&c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-border",children:"|"}),c.jsxs("span",{className:"shrink-0",children:[Math.round(p.cacheRate),"% cache"]})]})]})]})}function qn({keys:e,desc:t}){return c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("kbd",{className:"inline-flex min-w-[2rem] items-center justify-center rounded border bg-muted px-1.5 py-0.5 font-mono text-xs",children:e}),c.jsx("span",{className:"text-muted-foreground",children:t})]})}function TX(){const{theme:e,toggleTheme:t}=uX(),[n,a]=v.useState(()=>new URLSearchParams(window.location.search).get("session")),[s,l]=v.useState("wire"),[u,f]=v.useState("sessions"),[h,m]=v.useState(!1),[p,g]=v.useState(0),[y,T]=v.useState(!1),[S,k]=v.useState(!1),[N,_]=v.useState(null),[A,w]=v.useState(null),[P,F]=v.useState(null),M=v.useCallback(V=>{w(V),l("context")},[]),I=v.useCallback(V=>{F(V),l("wire")},[]),j=v.useCallback(V=>{a(V),_(null);const te=new URL(window.location.href);V?te.searchParams.set("session",V):te.searchParams.delete("session"),window.history.pushState({},"",te.toString())},[]);v.useEffect(()=>{const V=()=>{const te=new URLSearchParams(window.location.search);a(te.get("session"))};return window.addEventListener("popstate",V),()=>window.removeEventListener("popstate",V)},[]);const[G,B]=v.useState([]);v.useEffect(()=>{Od().then(B).catch(()=>{})},[]),v.useEffect(()=>{N5().then(V=>k(V.open_in_supported)).catch(V=>{console.error("Failed to load vis capabilities:",V),k(!1)})},[]);const Q=v.useMemo(()=>n?G.find(V=>`${V.work_dir_hash}/${V.session_id}`===n)??null:null,[n,G]);return v.useEffect(()=>{if(!n){document.title="Pythinker Agent Tracing";return}const V=n.split("/").pop()??n,te=Q?.metadata?.title||Q?.title||V.slice(0,8);document.title=`${te} — Pythinker Agent Tracing`},[Q,n]),v.useEffect(()=>{const V=te=>{const ee=te.target?.tagName;if(!(ee==="INPUT"||ee==="TEXTAREA"||ee==="SELECT")){if(te.key==="Escape"&&h){m(!1);return}if(te.key==="?"){m(U=>!U);return}te.key==="1"?l("wire"):te.key==="2"?l("context"):te.key==="3"?l("state"):te.key==="4"?l("dual"):te.key==="5"&&l("agents")}};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[h]),c.jsxs("div",{className:"flex h-full flex-col",children:[c.jsxs("header",{className:"flex items-center justify-between border-b px-4 py-3",children:[c.jsxs("h1",{className:`text-lg font-semibold tracking-tight flex items-center gap-2 ${n?"cursor-pointer hover:text-primary transition-colors":""}`,onClick:()=>n&&j(null),title:n?"Back to Sessions Explorer":void 0,children:[n&&c.jsx(z5,{size:16,className:"text-muted-foreground"}),"Pythinker Agent Tracing"]}),c.jsx("button",{onClick:t,className:"rounded-md p-2 hover:bg-accent",title:`Switch to ${e==="dark"?"light":"dark"} mode`,children:e==="dark"?c.jsx(n4,{size:16}):c.jsx(z6,{size:16})})]}),n&&c.jsxs("div",{className:"flex items-center border-b",children:[c.jsx(EX,{sessionId:n,refreshKey:p}),Q&&c.jsx(yX,{session:Q,openInSupported:S}),c.jsx("a",{href:Pv(n),download:!0,className:"shrink-0 rounded-md p-1.5 hover:bg-accent text-muted-foreground hover:text-foreground transition-colors",title:"Download session files as ZIP",children:c.jsx(Qm,{size:14})}),c.jsx("button",{onClick:()=>{T(!0),g(V=>V+1),Od(!0).then(B).catch(()=>{}),setTimeout(()=>T(!1),600)},className:"mr-3 shrink-0 rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",title:"Refresh session data",children:c.jsx(sg,{size:14,className:y?"animate-spin":""})})]}),n&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"flex border-b px-4",children:[{key:"wire",label:"Wire Events",icon:null},{key:"context",label:"Context Messages",icon:null},{key:"state",label:"State",icon:null},{key:"dual",label:"Dual",icon:c.jsx(m6,{size:14})},{key:"agents",label:"Agents",icon:c.jsx(Mr,{size:14})}].map(({key:V,label:te,icon:ee})=>c.jsxs("button",{onClick:()=>l(V),className:`relative flex items-center gap-1.5 px-4 py-2.5 text-sm font-medium transition-colors ${s===V?"text-foreground":"text-muted-foreground hover:text-foreground"}`,children:[ee,te,s===V&&c.jsx("span",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-primary"})]},V))}),(s==="wire"||s==="context"||s==="dual")&&c.jsx(lX,{sessionId:n,refreshKey:p,selectedAgentId:N,onSelectAgent:V=>{_(V)}}),c.jsxs("div",{className:"flex-1 overflow-hidden",children:[s==="wire"&&c.jsx(v8,{sessionId:n,refreshKey:p,onNavigateToContext:M,scrollToToolCallId:P,onScrollTargetConsumed:()=>F(null),agentScope:N}),s==="context"&&c.jsx(KG,{sessionId:n,refreshKey:p,onNavigateToWire:I,scrollToToolCallId:A,onScrollTargetConsumed:()=>w(null),agentScope:N}),s==="state"&&c.jsx(eX,{sessionId:n,refreshKey:p}),s==="dual"&&c.jsx(mX,{sessionId:n,refreshKey:p,agentScope:N}),s==="agents"&&c.jsx(iX,{sessionId:n,refreshKey:p,selectedAgentId:N,onSelectAgent:V=>{_(V),l("wire")},onSelectMain:()=>{_(null),l("wire")}})]})]}),!n&&c.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[c.jsx("div",{className:"flex items-center gap-1 border-b px-4 py-1.5",children:[{key:"sessions",label:"Sessions",icon:c.jsx(ig,{size:14})},{key:"statistics",label:"Statistics",icon:c.jsx(ng,{size:14})}].map(({key:V,label:te,icon:ee})=>c.jsxs("button",{onClick:()=>f(V),className:`flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition-colors ${u===V?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50"}`,children:[ee,te]},V))}),u==="sessions"?c.jsx(ZL,{onSelectSession:j}):c.jsx(ij,{})]}),h&&c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:()=>m(!1),children:c.jsxs("div",{className:"relative w-full max-w-lg rounded-lg border bg-popover p-6 shadow-lg",onClick:V=>V.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center justify-between mb-4",children:[c.jsx("h2",{className:"text-lg font-semibold",children:"Keyboard Shortcuts"}),c.jsx("button",{onClick:()=>m(!1),className:"rounded-md p-1 hover:bg-accent",children:c.jsx(Su,{size:16})})]}),c.jsxs("div",{className:"space-y-4 text-sm",children:[c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-medium uppercase text-muted-foreground mb-2",children:"Global"}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(qn,{keys:"1",desc:"Wire Events"}),c.jsx(qn,{keys:"2",desc:"Context Messages"}),c.jsx(qn,{keys:"3",desc:"State"}),c.jsx(qn,{keys:"4",desc:"Dual View"}),c.jsx(qn,{keys:"5",desc:"Agents"}),c.jsx(qn,{keys:"?",desc:"Show shortcuts"})]})]}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-medium uppercase text-muted-foreground mb-2",children:"Wire Events"}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(qn,{keys:"j / k",desc:"Navigate events"}),c.jsx(qn,{keys:"Enter",desc:"Expand / collapse"}),c.jsx(qn,{keys:"e",desc:"Next error"}),c.jsx(qn,{keys:"/",desc:"Search"}),c.jsx(qn,{keys:"Esc",desc:"Close panel"})]})]}),c.jsxs("div",{children:[c.jsx("h3",{className:"text-xs font-medium uppercase text-muted-foreground mb-2",children:"Context Messages"}),c.jsxs("div",{className:"space-y-1.5",children:[c.jsx(qn,{keys:"/",desc:"Search"}),c.jsx(qn,{keys:"Enter",desc:"Next match"}),c.jsx(qn,{keys:"Shift+Enter",desc:"Previous match"})]})]})]})]})})]})}class vX extends v.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){console.error("Uncaught error:",t,n)}render(){return this.state.error?c.jsx("div",{className:"flex h-screen items-center justify-center bg-background text-foreground",children:c.jsxs("div",{className:"max-w-md space-y-4 text-center",children:[c.jsx("h1",{className:"text-lg font-semibold",children:"Something went wrong"}),c.jsx("pre",{className:"rounded border bg-muted p-3 text-xs text-left overflow-auto max-h-48 whitespace-pre-wrap",children:this.state.error.message}),c.jsx("button",{onClick:()=>window.location.reload(),className:"rounded border px-4 py-1.5 text-sm hover:bg-muted transition-colors",children:"Reload"})]})}):this.props.children}}b5.createRoot(document.getElementById("root")).render(c.jsx(v.StrictMode,{children:c.jsx(pX,{children:c.jsx(vX,{children:c.jsx(TX,{})})})}));const SX=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:V_},Symbol.toStringTag,{value:"Module"}));export{kX as K,EY as Q,kr as R,c as j,v as r};