@roackb2/heddle 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/dist/examples/conversation-engine.js +10 -10
  2. package/dist/examples/conversation-engine.js.map +1 -1
  3. package/dist/examples/heartbeat-scheduler.js +2 -2
  4. package/dist/examples/heartbeat-scheduler.js.map +1 -1
  5. package/dist/examples/heartbeat.js +2 -2
  6. package/dist/examples/heartbeat.js.map +1 -1
  7. package/dist/examples/programmatic-loop.js +2 -2
  8. package/dist/examples/programmatic-loop.js.map +1 -1
  9. package/dist/examples/repo-investigator.js +3 -3
  10. package/dist/examples/repo-investigator.js.map +1 -1
  11. package/dist/src/cli/ask.js +2 -2
  12. package/dist/src/cli/ask.js.map +1 -1
  13. package/dist/src/cli/auth.d.ts +14 -7
  14. package/dist/src/cli/auth.d.ts.map +1 -1
  15. package/dist/src/cli/auth.js +75 -70
  16. package/dist/src/cli/auth.js.map +1 -1
  17. package/dist/src/cli/chat/adapters/conversation-activity-adapter.d.ts +1 -1
  18. package/dist/src/cli/chat/adapters/conversation-activity-adapter.d.ts.map +1 -1
  19. package/dist/src/cli/chat/adapters/conversation-activity-adapter.js +29 -19
  20. package/dist/src/cli/chat/adapters/conversation-activity-adapter.js.map +1 -1
  21. package/dist/src/cli/chat/adapters/slash-command-context.js +4 -4
  22. package/dist/src/cli/chat/adapters/slash-command-context.js.map +1 -1
  23. package/dist/src/cli/chat/components/ModelPickerPanel.d.ts +1 -1
  24. package/dist/src/cli/chat/components/ModelPickerPanel.js +1 -1
  25. package/dist/src/cli/chat/debug/tui-debug-snapshot.d.ts +1 -1
  26. package/dist/src/cli/chat/debug/tui-debug-snapshot.js +1 -1
  27. package/dist/src/cli/chat/hooks/controllers/run/tui-direct-shell-result.js +3 -3
  28. package/dist/src/cli/chat/hooks/controllers/run/tui-direct-shell-result.js.map +1 -1
  29. package/dist/src/cli/chat/hooks/controllers/run/tui-direct-shell.js +2 -2
  30. package/dist/src/cli/chat/hooks/controllers/run/tui-direct-shell.js.map +1 -1
  31. package/dist/src/cli/chat/hooks/controllers/run/tui-run-loop-events.d.ts.map +1 -1
  32. package/dist/src/cli/chat/hooks/controllers/run/tui-run-loop-events.js +3 -3
  33. package/dist/src/cli/chat/hooks/controllers/run/tui-run-loop-events.js.map +1 -1
  34. package/dist/src/cli/chat/hooks/controllers/useAgentRunController.d.ts.map +1 -1
  35. package/dist/src/cli/chat/hooks/controllers/useAgentRunController.js +16 -6
  36. package/dist/src/cli/chat/hooks/controllers/useAgentRunController.js.map +1 -1
  37. package/dist/src/cli/chat/hooks/controllers/useChatAppController.d.ts.map +1 -1
  38. package/dist/src/cli/chat/hooks/controllers/useChatAppController.js +9 -10
  39. package/dist/src/cli/chat/hooks/controllers/useChatAppController.js.map +1 -1
  40. package/dist/src/cli/chat/hooks/controllers/usePromptSubmissionController.d.ts +1 -1
  41. package/dist/src/cli/chat/hooks/useChatPickers.d.ts +1 -1
  42. package/dist/src/cli/chat/hooks/useChatPickers.d.ts.map +1 -1
  43. package/dist/src/cli/chat/hooks/useChatPickers.js +7 -8
  44. package/dist/src/cli/chat/hooks/useChatPickers.js.map +1 -1
  45. package/dist/src/cli/chat/hooks/useChatStatusSummary.d.ts.map +1 -1
  46. package/dist/src/cli/chat/hooks/useChatStatusSummary.js +3 -4
  47. package/dist/src/cli/chat/hooks/useChatStatusSummary.js.map +1 -1
  48. package/dist/src/cli/chat/state/local-commands.d.ts +1 -1
  49. package/dist/src/cli/chat/state/local-commands.d.ts.map +1 -1
  50. package/dist/src/cli/chat/utils/format.d.ts +0 -1
  51. package/dist/src/cli/chat/utils/format.d.ts.map +1 -1
  52. package/dist/src/cli/chat/utils/format.js +0 -1
  53. package/dist/src/cli/chat/utils/format.js.map +1 -1
  54. package/dist/src/cli/chat/utils/runtime.js +4 -4
  55. package/dist/src/cli/chat/utils/runtime.js.map +1 -1
  56. package/dist/src/cli/main.js +10 -7
  57. package/dist/src/cli/main.js.map +1 -1
  58. package/dist/src/cli/remote/control-plane-client.d.ts +2 -2
  59. package/dist/src/core/approvals/remembered-rules/schemas.d.ts +3 -3
  60. package/dist/src/core/auth/index.d.ts +4 -0
  61. package/dist/src/core/auth/index.d.ts.map +1 -0
  62. package/dist/src/core/auth/index.js +3 -0
  63. package/dist/src/core/auth/index.js.map +1 -0
  64. package/dist/src/core/auth/openai-oauth.d.ts +41 -61
  65. package/dist/src/core/auth/openai-oauth.d.ts.map +1 -1
  66. package/dist/src/core/auth/openai-oauth.js +264 -258
  67. package/dist/src/core/auth/openai-oauth.js.map +1 -1
  68. package/dist/src/core/auth/provider-credentials.d.ts +23 -51
  69. package/dist/src/core/auth/provider-credentials.d.ts.map +1 -1
  70. package/dist/src/core/auth/provider-credentials.js +69 -134
  71. package/dist/src/core/auth/provider-credentials.js.map +1 -1
  72. package/dist/src/core/auth/schemas.d.ts +54 -0
  73. package/dist/src/core/auth/schemas.d.ts.map +1 -0
  74. package/dist/src/core/auth/schemas.js +63 -0
  75. package/dist/src/core/auth/schemas.js.map +1 -0
  76. package/dist/src/core/auth/types.d.ts +80 -0
  77. package/dist/src/core/auth/types.d.ts.map +1 -0
  78. package/dist/src/core/auth/types.js +2 -0
  79. package/dist/src/core/auth/types.js.map +1 -0
  80. package/dist/src/core/chat/engine/compaction/service.js +2 -2
  81. package/dist/src/core/chat/engine/compaction/service.js.map +1 -1
  82. package/dist/src/core/chat/engine/compaction/summarizer/service.d.ts.map +1 -1
  83. package/dist/src/core/chat/engine/compaction/summarizer/service.js +9 -6
  84. package/dist/src/core/chat/engine/compaction/summarizer/service.js.map +1 -1
  85. package/dist/src/core/chat/engine/compaction/transcript-renderer.js +2 -2
  86. package/dist/src/core/chat/engine/compaction/transcript-renderer.js.map +1 -1
  87. package/dist/src/core/chat/engine/config.d.ts +2 -2
  88. package/dist/src/core/chat/engine/config.d.ts.map +1 -1
  89. package/dist/src/core/chat/engine/sessions/preferences/service.js +3 -3
  90. package/dist/src/core/chat/engine/sessions/preferences/service.js.map +1 -1
  91. package/dist/src/core/chat/engine/sessions/records/records.js +3 -3
  92. package/dist/src/core/chat/engine/sessions/records/records.js.map +1 -1
  93. package/dist/src/core/chat/engine/sessions/records/types.d.ts +2 -2
  94. package/dist/src/core/chat/engine/sessions/records/types.d.ts.map +1 -1
  95. package/dist/src/core/chat/engine/turns/host/host-normalizer.d.ts.map +1 -1
  96. package/dist/src/core/chat/engine/turns/host/host-normalizer.js +4 -4
  97. package/dist/src/core/chat/engine/turns/host/host-normalizer.js.map +1 -1
  98. package/dist/src/core/chat/engine/turns/memory/turn-memory-maintenance.js +2 -2
  99. package/dist/src/core/chat/engine/turns/memory/turn-memory-maintenance.js.map +1 -1
  100. package/dist/src/core/chat/engine/turns/persistence/types.d.ts +3 -3
  101. package/dist/src/core/chat/engine/turns/persistence/types.d.ts.map +1 -1
  102. package/dist/src/core/chat/engine/turns/runtime/runtime-resolver.d.ts.map +1 -1
  103. package/dist/src/core/chat/engine/turns/runtime/runtime-resolver.js +10 -7
  104. package/dist/src/core/chat/engine/turns/runtime/runtime-resolver.js.map +1 -1
  105. package/dist/src/core/chat/engine/turns/types.d.ts +2 -3
  106. package/dist/src/core/chat/engine/turns/types.d.ts.map +1 -1
  107. package/dist/src/core/chat/engine/types.d.ts +4 -5
  108. package/dist/src/core/chat/engine/types.d.ts.map +1 -1
  109. package/dist/src/core/commands/slash/modules/model/model-commands.d.ts.map +1 -1
  110. package/dist/src/core/commands/slash/modules/model/model-commands.js +6 -7
  111. package/dist/src/core/commands/slash/modules/model/model-commands.js.map +1 -1
  112. package/dist/src/core/llm/adapters/anthropic/anthropic-adapter.d.ts +21 -0
  113. package/dist/src/core/llm/adapters/anthropic/anthropic-adapter.d.ts.map +1 -0
  114. package/dist/src/core/llm/adapters/anthropic/anthropic-adapter.js +66 -0
  115. package/dist/src/core/llm/adapters/anthropic/anthropic-adapter.js.map +1 -0
  116. package/dist/src/core/llm/adapters/anthropic/anthropic-codec.d.ts +16 -0
  117. package/dist/src/core/llm/adapters/anthropic/anthropic-codec.d.ts.map +1 -0
  118. package/dist/src/core/llm/adapters/anthropic/anthropic-codec.js +64 -0
  119. package/dist/src/core/llm/adapters/anthropic/anthropic-codec.js.map +1 -0
  120. package/dist/src/core/llm/adapters/anthropic/anthropic-provider-adapter.d.ts +17 -0
  121. package/dist/src/core/llm/adapters/anthropic/anthropic-provider-adapter.d.ts.map +1 -0
  122. package/dist/src/core/llm/adapters/anthropic/anthropic-provider-adapter.js +20 -0
  123. package/dist/src/core/llm/adapters/anthropic/anthropic-provider-adapter.js.map +1 -0
  124. package/dist/src/core/llm/adapters/anthropic/index.d.ts +4 -0
  125. package/dist/src/core/llm/adapters/anthropic/index.d.ts.map +1 -0
  126. package/dist/src/core/llm/adapters/anthropic/index.js +3 -0
  127. package/dist/src/core/llm/adapters/anthropic/index.js.map +1 -0
  128. package/dist/src/core/llm/adapters/openai/index.d.ts +4 -0
  129. package/dist/src/core/llm/adapters/openai/index.d.ts.map +1 -0
  130. package/dist/src/core/llm/adapters/openai/index.js +3 -0
  131. package/dist/src/core/llm/adapters/openai/index.js.map +1 -0
  132. package/dist/src/core/llm/adapters/openai/openai-adapter.d.ts +53 -0
  133. package/dist/src/core/llm/adapters/openai/openai-adapter.d.ts.map +1 -0
  134. package/dist/src/core/llm/adapters/openai/openai-adapter.js +266 -0
  135. package/dist/src/core/llm/adapters/openai/openai-adapter.js.map +1 -0
  136. package/dist/src/core/llm/adapters/openai/openai-codec.d.ts +41 -0
  137. package/dist/src/core/llm/adapters/openai/openai-codec.d.ts.map +1 -0
  138. package/dist/src/core/llm/adapters/openai/openai-codec.js +169 -0
  139. package/dist/src/core/llm/adapters/openai/openai-codec.js.map +1 -0
  140. package/dist/src/core/llm/adapters/openai/openai-provider-adapter.d.ts +17 -0
  141. package/dist/src/core/llm/adapters/openai/openai-provider-adapter.d.ts.map +1 -0
  142. package/dist/src/core/llm/adapters/openai/openai-provider-adapter.js +20 -0
  143. package/dist/src/core/llm/adapters/openai/openai-provider-adapter.js.map +1 -0
  144. package/dist/src/core/llm/index.d.ts +9 -0
  145. package/dist/src/core/llm/index.d.ts.map +1 -0
  146. package/dist/src/core/llm/index.js +5 -0
  147. package/dist/src/core/llm/index.js.map +1 -0
  148. package/dist/src/core/llm/models/index.d.ts +5 -0
  149. package/dist/src/core/llm/models/index.d.ts.map +1 -0
  150. package/dist/src/core/llm/models/index.js +3 -0
  151. package/dist/src/core/llm/models/index.js.map +1 -0
  152. package/dist/src/core/llm/models/model-catalog.d.ts +23 -0
  153. package/dist/src/core/llm/models/model-catalog.d.ts.map +1 -0
  154. package/dist/src/core/llm/models/model-catalog.js +132 -0
  155. package/dist/src/core/llm/models/model-catalog.js.map +1 -0
  156. package/dist/src/core/llm/models/model-policy-service.d.ts +70 -0
  157. package/dist/src/core/llm/models/model-policy-service.d.ts.map +1 -0
  158. package/dist/src/core/llm/models/model-policy-service.js +137 -0
  159. package/dist/src/core/llm/models/model-policy-service.js.map +1 -0
  160. package/dist/src/core/llm/registry/builtin-llm-providers.d.ts +5 -0
  161. package/dist/src/core/llm/registry/builtin-llm-providers.d.ts.map +1 -0
  162. package/dist/src/core/llm/registry/builtin-llm-providers.js +16 -0
  163. package/dist/src/core/llm/registry/builtin-llm-providers.js.map +1 -0
  164. package/dist/src/core/llm/registry/index.d.ts +5 -0
  165. package/dist/src/core/llm/registry/index.d.ts.map +1 -0
  166. package/dist/src/core/llm/registry/index.js +4 -0
  167. package/dist/src/core/llm/registry/index.js.map +1 -0
  168. package/dist/src/core/llm/registry/llm-provider-registry.d.ts +17 -0
  169. package/dist/src/core/llm/registry/llm-provider-registry.d.ts.map +1 -0
  170. package/dist/src/core/llm/registry/llm-provider-registry.js +51 -0
  171. package/dist/src/core/llm/registry/llm-provider-registry.js.map +1 -0
  172. package/dist/src/core/llm/registry/provider-inference.d.ts +18 -0
  173. package/dist/src/core/llm/registry/provider-inference.d.ts.map +1 -0
  174. package/dist/src/core/llm/registry/provider-inference.js +41 -0
  175. package/dist/src/core/llm/registry/provider-inference.js.map +1 -0
  176. package/dist/src/core/llm/registry/types.d.ts +16 -0
  177. package/dist/src/core/llm/registry/types.d.ts.map +1 -0
  178. package/dist/src/core/llm/registry/types.js +2 -0
  179. package/dist/src/core/llm/registry/types.js.map +1 -0
  180. package/dist/src/core/llm/service.d.ts +15 -0
  181. package/dist/src/core/llm/service.d.ts.map +1 -0
  182. package/dist/src/core/llm/service.js +44 -0
  183. package/dist/src/core/llm/service.js.map +1 -0
  184. package/dist/src/core/llm/types.d.ts +18 -1
  185. package/dist/src/core/llm/types.d.ts.map +1 -1
  186. package/dist/src/core/observability/activity/conversation-activity-projector.d.ts +24 -0
  187. package/dist/src/core/observability/activity/conversation-activity-projector.d.ts.map +1 -0
  188. package/dist/src/core/observability/activity/conversation-activity-projector.js +146 -0
  189. package/dist/src/core/observability/activity/conversation-activity-projector.js.map +1 -0
  190. package/dist/src/core/observability/activity/index.d.ts +4 -0
  191. package/dist/src/core/observability/activity/index.d.ts.map +1 -0
  192. package/dist/src/core/observability/activity/index.js +3 -0
  193. package/dist/src/core/observability/activity/index.js.map +1 -0
  194. package/dist/src/core/observability/activity/tool-activity-summarizer.d.ts +15 -0
  195. package/dist/src/core/observability/activity/tool-activity-summarizer.d.ts.map +1 -0
  196. package/dist/src/core/observability/activity/tool-activity-summarizer.js +92 -0
  197. package/dist/src/core/observability/activity/tool-activity-summarizer.js.map +1 -0
  198. package/dist/src/core/observability/activity/types.d.ts +87 -0
  199. package/dist/src/core/observability/activity/types.d.ts.map +1 -0
  200. package/dist/src/core/observability/activity/types.js +2 -0
  201. package/dist/src/core/observability/activity/types.js.map +1 -0
  202. package/dist/src/core/observability/index.d.ts +6 -0
  203. package/dist/src/core/observability/index.d.ts.map +1 -0
  204. package/dist/src/core/observability/index.js +4 -0
  205. package/dist/src/core/observability/index.js.map +1 -0
  206. package/dist/src/core/observability/semantics/index.d.ts +2 -0
  207. package/dist/src/core/observability/semantics/index.d.ts.map +1 -0
  208. package/dist/src/core/observability/semantics/index.js +2 -0
  209. package/dist/src/core/observability/semantics/index.js.map +1 -0
  210. package/dist/src/core/observability/{semantic-conventions.d.ts → semantics/trace-semantics.d.ts} +1 -1
  211. package/dist/src/core/observability/semantics/trace-semantics.d.ts.map +1 -0
  212. package/dist/src/core/observability/{semantic-conventions.js → semantics/trace-semantics.js} +1 -1
  213. package/dist/src/core/observability/semantics/trace-semantics.js.map +1 -0
  214. package/dist/src/core/observability/summaries/default-trace-summarizers.d.ts +3 -0
  215. package/dist/src/core/observability/summaries/default-trace-summarizers.d.ts.map +1 -0
  216. package/dist/src/core/observability/summaries/default-trace-summarizers.js +29 -0
  217. package/dist/src/core/observability/summaries/default-trace-summarizers.js.map +1 -0
  218. package/dist/src/core/observability/summaries/index.d.ts +4 -0
  219. package/dist/src/core/observability/summaries/index.d.ts.map +1 -0
  220. package/dist/src/core/observability/summaries/index.js +3 -0
  221. package/dist/src/core/observability/summaries/index.js.map +1 -0
  222. package/dist/src/core/observability/summaries/trace-summary-service.d.ts +17 -0
  223. package/dist/src/core/observability/summaries/trace-summary-service.d.ts.map +1 -0
  224. package/dist/src/core/observability/summaries/trace-summary-service.js +32 -0
  225. package/dist/src/core/observability/summaries/trace-summary-service.js.map +1 -0
  226. package/dist/src/core/observability/summaries/types.d.ts +15 -0
  227. package/dist/src/core/observability/summaries/types.d.ts.map +1 -0
  228. package/dist/src/core/observability/summaries/types.js +2 -0
  229. package/dist/src/core/observability/summaries/types.js.map +1 -0
  230. package/dist/src/core/runtime/credentials/service.d.ts +1 -1
  231. package/dist/src/core/runtime/credentials/service.d.ts.map +1 -1
  232. package/dist/src/core/runtime/credentials/service.js +8 -6
  233. package/dist/src/core/runtime/credentials/service.js.map +1 -1
  234. package/dist/src/core/runtime/loop/service.d.ts.map +1 -1
  235. package/dist/src/core/runtime/loop/service.js +14 -6
  236. package/dist/src/core/runtime/loop/service.js.map +1 -1
  237. package/dist/src/core/tools/toolkits/external-context/view-image.d.ts.map +1 -1
  238. package/dist/src/core/tools/toolkits/external-context/view-image.js +15 -9
  239. package/dist/src/core/tools/toolkits/external-context/view-image.js.map +1 -1
  240. package/dist/src/core/tools/toolkits/external-context/web-search.d.ts.map +1 -1
  241. package/dist/src/core/tools/toolkits/external-context/web-search.js +15 -9
  242. package/dist/src/core/tools/toolkits/external-context/web-search.js.map +1 -1
  243. package/dist/src/index.d.ts +8 -14
  244. package/dist/src/index.d.ts.map +1 -1
  245. package/dist/src/index.js +4 -7
  246. package/dist/src/index.js.map +1 -1
  247. package/dist/src/server/features/control-plane/controllers/ask.d.ts.map +1 -1
  248. package/dist/src/server/features/control-plane/controllers/ask.js +5 -2
  249. package/dist/src/server/features/control-plane/controllers/ask.js.map +1 -1
  250. package/dist/src/server/features/control-plane/controllers/chat-sessions-controller.js +5 -5
  251. package/dist/src/server/features/control-plane/controllers/chat-sessions-controller.js.map +1 -1
  252. package/dist/src/server/features/control-plane/router.d.ts +2 -2
  253. package/dist/src/server/features/control-plane/router.d.ts.map +1 -1
  254. package/dist/src/server/features/control-plane/router.js +5 -6
  255. package/dist/src/server/features/control-plane/router.js.map +1 -1
  256. package/dist/src/server/router.d.ts +2 -2
  257. package/dist/src/web/assets/{MonacoDiffViewer-F3AOHIps.js → MonacoDiffViewer-D_Fh9ndN.js} +1 -1
  258. package/dist/src/web/assets/index-B1wQ0pS4.js +87 -0
  259. package/dist/src/web/index.html +1 -1
  260. package/package.json +1 -1
  261. package/dist/src/core/llm/anthropic.d.ts +0 -7
  262. package/dist/src/core/llm/anthropic.d.ts.map +0 -1
  263. package/dist/src/core/llm/anthropic.js +0 -115
  264. package/dist/src/core/llm/anthropic.js.map +0 -1
  265. package/dist/src/core/llm/factory.d.ts +0 -14
  266. package/dist/src/core/llm/factory.d.ts.map +0 -1
  267. package/dist/src/core/llm/factory.js +0 -46
  268. package/dist/src/core/llm/factory.js.map +0 -1
  269. package/dist/src/core/llm/model-policy.d.ts +0 -63
  270. package/dist/src/core/llm/model-policy.d.ts.map +0 -1
  271. package/dist/src/core/llm/model-policy.js +0 -131
  272. package/dist/src/core/llm/model-policy.js.map +0 -1
  273. package/dist/src/core/llm/openai-models.d.ts +0 -17
  274. package/dist/src/core/llm/openai-models.d.ts.map +0 -1
  275. package/dist/src/core/llm/openai-models.js +0 -127
  276. package/dist/src/core/llm/openai-models.js.map +0 -1
  277. package/dist/src/core/llm/openai.d.ts +0 -31
  278. package/dist/src/core/llm/openai.d.ts.map +0 -1
  279. package/dist/src/core/llm/openai.js +0 -405
  280. package/dist/src/core/llm/openai.js.map +0 -1
  281. package/dist/src/core/llm/providers.d.ts +0 -3
  282. package/dist/src/core/llm/providers.d.ts.map +0 -1
  283. package/dist/src/core/llm/providers.js +0 -21
  284. package/dist/src/core/llm/providers.js.map +0 -1
  285. package/dist/src/core/observability/conversation-activity.d.ts +0 -116
  286. package/dist/src/core/observability/conversation-activity.d.ts.map +0 -1
  287. package/dist/src/core/observability/conversation-activity.js +0 -255
  288. package/dist/src/core/observability/conversation-activity.js.map +0 -1
  289. package/dist/src/core/observability/semantic-conventions.d.ts.map +0 -1
  290. package/dist/src/core/observability/semantic-conventions.js.map +0 -1
  291. package/dist/src/core/observability/trace-summarizers.d.ts +0 -23
  292. package/dist/src/core/observability/trace-summarizers.d.ts.map +0 -1
  293. package/dist/src/core/observability/trace-summarizers.js +0 -60
  294. package/dist/src/core/observability/trace-summarizers.js.map +0 -1
  295. package/dist/src/web/assets/index-D6aK1OFb.js +0 -81
@@ -1,81 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/MonacoDiffViewer-F3AOHIps.js","assets/chunk-DECur_0Z.js","assets/editor.api2-DRhrSk9h.js","assets/editor-Br_kD0ds.css"])))=>i.map(i=>d[i]);
2
- import{n as e,r as t,t as n}from"./chunk-DECur_0Z.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var r=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=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,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function j(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=M(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=M(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return M(j(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function te(e,t,n){if(e==null)return e;var r=[],i=0;return M(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},F={map:te,forEach:function(e,t,n){te(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return te(e,function(){t++}),t},toArray:function(e){return te(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),i=n(((e,t)=>{t.exports=r()})),a=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&A(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&A(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function A(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,A(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),o=n(((e,t)=>{t.exports=a()})),s=n((e=>{var t=i();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.5`})),c=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=n((e=>{var t=o(),n=i(),r=c();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return f(i),e;if(o===r)return f(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),ee=Symbol.for(`react.activity`),k=Symbol.for(`react.memo_cache_sentinel`),A=Symbol.iterator;function j(e){return typeof e!=`object`||!e?null:(e=A&&e[A]||e[`@@iterator`],typeof e==`function`?e:null)}var M=Symbol.for(`react.client.reference`);function te(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ee:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?te(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return te(e(t))}catch{}}return null}var N=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function I(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function L(e,t){ie++,re[ie]=e.current,e.current=t}var oe=ae(null),se=ae(null),ce=ae(null),le=ae(null);function ue(e,t){switch(L(ce,t),L(se,e),L(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}I(oe),L(oe,e)}function de(){I(oe),I(se),I(ce)}function fe(e){e.memoizedState!==null&&L(le,e);var t=oe.current,n=qd(t,e.type);t!==n&&(L(se,e),L(oe,n))}function pe(e){se.current===e&&(I(oe),I(se)),le.current===e&&(I(le),rp._currentValue=ne)}var me,he;function ge(e){if(me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||``,he=-1<e.stack.indexOf(`
3
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
- `+me+e+he}var _e=!1;function ve(e,t){if(!e||_e)return``;_e=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
- `),l=s.split(`
6
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
- `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{_e=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ge(n):``}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge(`Lazy`);case 13:return e.child!==t&&t!==null?ge(`Suspense Fallback`):ge(`Suspense`);case 19:return ge(`SuspenseList`);case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return ge(`Activity`);default:return``}}function be(e){try{var t=``,n=null;do t+=ye(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
- Error generating stack: `+e.message+`
9
- `+e.stack}}var xe=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ne=t.log,Pe=t.unstable_setDisableYieldValue,Fe=null,Ie=null;function Le(e){if(typeof Ne==`function`&&Pe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(Fe,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ke(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Re(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=F.p;return e===0?(e=window.event,e===void 0?32:yp(e.type)):e}function at(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var ot=Math.random().toString(36).slice(2),st=`__reactFiber$`+ot,ct=`__reactProps$`+ot,lt=`__reactContainer$`+ot,ut=`__reactEvents$`+ot,dt=`__reactListeners$`+ot,ft=`__reactHandles$`+ot,pt=`__reactResources$`+ot,mt=`__reactMarker$`+ot;function ht(e){delete e[st],delete e[ct],delete e[ut],delete e[dt],delete e[ft]}function gt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gf(e);e!==null;){if(n=e[st])return n;e=gf(e)}return t}e=n,n=e.parentNode}return null}function _t(e){if(e=e[st]||e[lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(a(33))}function yt(e){var t=e[pt];return t||=e[pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function bt(e){e[mt]=!0}var xt=new Set,St={};function Ct(e,t){wt(e,t),wt(e+`Capture`,t)}function wt(e,t){for(St[e]=t,e=0;e<t.length;e++)xt.add(t[e])}var Tt=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]*$`),Et={},Dt={};function Ot(e){return xe.call(Dt,e)?!0:xe.call(Et,e)?!1:Tt.test(e)?Dt[e]=!0:(Et[e]=!0,!1)}function kt(e,t,n){if(Ot(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function At(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function jt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Mt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Nt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Pt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ft(e){if(!e._valueTracker){var t=Nt(e)?`checked`:`value`;e._valueTracker=Pt(e,t,``+e[t])}}function It(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Nt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Lt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Rt=/[\n"\\]/g;function zt(e){return e.replace(Rt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Bt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Mt(t)):e.value!==``+Mt(t)&&(e.value=``+Mt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ht(e,o,Mt(n)):Ht(e,o,Mt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Mt(s):e.removeAttribute(`name`)}function Vt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Ft(e);return}n=n==null?``:``+Mt(n),t=t==null?n:``+Mt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Ft(e)}function Ht(e,t,n){t===`number`&&Lt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ut(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Mt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Wt(e,t,n){if(t!=null&&(t=``+Mt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Mt(n)}function Gt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(a(92));if(N(r)){if(1<r.length)throw Error(a(93));r=r[0]}n=r}n??=``,t=n}n=Mt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Ft(e)}function Kt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qt=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 Jt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||qt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Yt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(a(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Jt(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&Jt(e,o,t[o])}function Xt(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Zt=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`]]),Qt=/^[\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 $t(e){return Qt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function en(){}var tn=null;function nn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var rn=null,an=null;function on(e){var t=_t(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[ct]||null;if(!i)throw Error(a(90));Bt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&It(r)}break a;case`textarea`:Wt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ut(e,!!n.multiple,t,!1)}}}var sn=!1;function cn(e,t,n){if(sn)return e(t,n);sn=!0;try{return e(t)}finally{if(sn=!1,(rn!==null||an!==null)&&(Cu(),rn&&(t=rn,e=an,an=rn=null,on(t),e)))for(t=0;t<e.length;t++)on(e[t])}}function ln(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(a(231,t,typeof n));return n}var un=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),dn=!1;if(un)try{var fn={};Object.defineProperty(fn,`passive`,{get:function(){dn=!0}}),window.addEventListener(`test`,fn,fn),window.removeEventListener(`test`,fn,fn)}catch{dn=!1}var pn=null,mn=null,hn=null;function gn(){if(hn)return hn;var e,t=mn,n=t.length,r,i=`value`in pn?pn.value:pn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return hn=i.slice(e,1<r?1-r:void 0)}function _n(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function vn(){return!0}function yn(){return!1}function bn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?vn:yn,this.isPropagationStopped=yn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=vn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=vn)},persist:function(){},isPersistent:vn}),t}var xn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Sn=bn(xn),Cn=h({},xn,{view:0,detail:0}),wn=bn(Cn),Tn,En,Dn,On=h({},Cn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Dn&&(Dn&&e.type===`mousemove`?(Tn=e.screenX-Dn.screenX,En=e.screenY-Dn.screenY):En=Tn=0,Dn=e),Tn)},movementY:function(e){return`movementY`in e?e.movementY:En}}),kn=bn(On),An=bn(h({},On,{dataTransfer:0})),jn=bn(h({},Cn,{relatedTarget:0})),Mn=bn(h({},xn,{animationName:0,elapsedTime:0,pseudoElement:0})),Nn=bn(h({},xn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Pn=bn(h({},xn,{data:0})),Fn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},In={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`},Ln={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Rn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ln[e])?!!t[e]:!1}function zn(){return Rn}var Bn=bn(h({},Cn,{key:function(e){if(e.key){var t=Fn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=_n(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?In[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zn,charCode:function(e){return e.type===`keypress`?_n(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?_n(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Vn=bn(h({},On,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Hn=bn(h({},Cn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zn})),Un=bn(h({},xn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Wn=bn(h({},On,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Gn=bn(h({},xn,{newState:0,oldState:0})),Kn=[9,13,27,32],qn=un&&`CompositionEvent`in window,Jn=null;un&&`documentMode`in document&&(Jn=document.documentMode);var Yn=un&&`TextEvent`in window&&!Jn,Xn=un&&(!qn||Jn&&8<Jn&&11>=Jn),Zn=` `,Qn=!1;function $n(e,t){switch(e){case`keyup`:return Kn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function er(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var tr=!1;function nr(e,t){switch(e){case`compositionend`:return er(t);case`keypress`:return t.which===32?(Qn=!0,Zn):null;case`textInput`:return e=t.data,e===Zn&&Qn?null:e;default:return null}}function rr(e,t){if(tr)return e===`compositionend`||!qn&&$n(e,t)?(e=gn(),hn=mn=pn=null,tr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Xn&&t.locale!==`ko`?null:t.data;default:return null}}var ir={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 ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ir[e.type]:t===`textarea`}function or(e,t,n,r){rn?an?an.push(r):an=[r]:rn=r,t=Ad(t,`onChange`),0<t.length&&(n=new Sn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var sr=null,cr=null;function lr(e){Cd(e,0)}function ur(e){if(It(vt(e)))return e}function dr(e,t){if(e===`change`)return t}var fr=!1;if(un){var pr;if(un){var mr=`oninput`in document;if(!mr){var hr=document.createElement(`div`);hr.setAttribute(`oninput`,`return;`),mr=typeof hr.oninput==`function`}pr=mr}else pr=!1;fr=pr&&(!document.documentMode||9<document.documentMode)}function gr(){sr&&(sr.detachEvent(`onpropertychange`,_r),cr=sr=null)}function _r(e){if(e.propertyName===`value`&&ur(cr)){var t=[];or(t,cr,e,nn(e)),cn(lr,t)}}function vr(e,t,n){e===`focusin`?(gr(),sr=t,cr=n,sr.attachEvent(`onpropertychange`,_r)):e===`focusout`&&gr()}function yr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return ur(cr)}function br(e,t){if(e===`click`)return ur(t)}function xr(e,t){if(e===`input`||e===`change`)return ur(t)}function Sr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Cr=typeof Object.is==`function`?Object.is:Sr;function wr(e,t){if(Cr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!xe.call(t,i)||!Cr(e[i],t[i]))return!1}return!0}function Tr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Er(e,t){var n=Tr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Tr(n)}}function Dr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Or(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Lt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lt(e.document)}return t}function kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Ar=un&&`documentMode`in document&&11>=document.documentMode,jr=null,Mr=null,Nr=null,Pr=!1;function Fr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Pr||jr==null||jr!==Lt(r)||(r=jr,`selectionStart`in r&&kr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&wr(Nr,r)||(Nr=r,r=Ad(Mr,`onSelect`),0<r.length&&(t=new Sn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=jr)))}function Ir(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Lr={animationend:Ir(`Animation`,`AnimationEnd`),animationiteration:Ir(`Animation`,`AnimationIteration`),animationstart:Ir(`Animation`,`AnimationStart`),transitionrun:Ir(`Transition`,`TransitionRun`),transitionstart:Ir(`Transition`,`TransitionStart`),transitioncancel:Ir(`Transition`,`TransitionCancel`),transitionend:Ir(`Transition`,`TransitionEnd`)},Rr={},zr={};un&&(zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Lr.animationend.animation,delete Lr.animationiteration.animation,delete Lr.animationstart.animation),`TransitionEvent`in window||delete Lr.transitionend.transition);function Br(e){if(Rr[e])return Rr[e];if(!Lr[e])return e;var t=Lr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zr)return Rr[e]=t[n];return e}var Vr=Br(`animationend`),Hr=Br(`animationiteration`),Ur=Br(`animationstart`),Wr=Br(`transitionrun`),Gr=Br(`transitionstart`),Kr=Br(`transitioncancel`),qr=Br(`transitionend`),Jr=new Map,Yr=`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(` `);Yr.push(`scrollEnd`);function Xr(e,t){Jr.set(e,t),Ct(t,[e])}var Zr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Qr=[],$r=0,ei=0;function ti(){for(var e=$r,t=ei=$r=0;t<e;){var n=Qr[t];Qr[t++]=null;var r=Qr[t];Qr[t++]=null;var i=Qr[t];Qr[t++]=null;var a=Qr[t];if(Qr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ai(n,i,a)}}function ni(e,t,n,r){Qr[$r++]=e,Qr[$r++]=t,Qr[$r++]=n,Qr[$r++]=r,ei|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ri(e,t,n,r){return ni(e,t,n,r),oi(e)}function ii(e,t){return ni(e,null,null,t),oi(e)}function ai(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function oi(e){if(50<mu)throw mu=0,hu=null,Error(a(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function ci(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(e,t,n,r){return new ci(e,t,n,r)}function ui(e){return e=e.prototype,!(!e||!e.isReactComponent)}function di(e,t){var n=e.alternate;return n===null?(n=li(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function fi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function pi(e,t,n,r,i,o){var s=0;if(r=e,typeof e==`function`)ui(e)&&(s=1);else if(typeof e==`string`)s=Jf(e,n,oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case ee:return e=li(31,n,t,i),e.elementType=ee,e.lanes=o,e;case y:return mi(n.children,i,o,t);case b:s=8,i|=24;break;case x:return e=li(12,n,t,i|2),e.elementType=x,e.lanes=o,e;case T:return e=li(13,n,t,i),e.elementType=T,e.lanes=o,e;case E:return e=li(19,n,t,i),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(a(130,e===null?`null`:typeof e,``)),r=null}return t=li(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function mi(e,t,n,r){return e=li(7,e,r,t),e.lanes=n,e}function hi(e,t,n){return e=li(6,e,null,t),e.lanes=n,e}function gi(e){var t=li(18,null,null,0);return t.stateNode=e,t}function _i(e,t,n){return t=li(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var vi=new WeakMap;function yi(e,t){if(typeof e==`object`&&e){var n=vi.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},vi.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}var bi=[],xi=0,Si=null,Ci=0,wi=[],Ti=0,Ei=null,Di=1,Oi=``;function ki(e,t){bi[xi++]=Ci,bi[xi++]=Si,Si=e,Ci=t}function Ai(e,t,n){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Ei=e;var r=Di;e=Oi;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Di=1<<32-Re(t)+i|n<<i|r,Oi=a+e}else Di=1<<a|n<<i|r,Oi=e}function ji(e){e.return!==null&&(ki(e,1),Ai(e,1,0))}function Mi(e){for(;e===Si;)Si=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null;for(;e===Ei;)Ei=wi[--Ti],wi[Ti]=null,Oi=wi[--Ti],wi[Ti]=null,Di=wi[--Ti],wi[Ti]=null}function Ni(e,t){wi[Ti++]=Di,wi[Ti++]=Oi,wi[Ti++]=Ei,Di=t.id,Oi=t.overflow,Ei=e}var Pi=null,Fi=null,R=!1,Ii=null,Li=!1,Ri=Error(a(519));function zi(e){throw Gi(yi(Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ri}function Bi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[st]=e,t[ct]=r,n){case`dialog`:J(`cancel`,t),J(`close`,t);break;case`iframe`:case`object`:case`embed`:J(`load`,t);break;case`video`:case`audio`:for(n=0;n<xd.length;n++)J(xd[n],t);break;case`source`:J(`error`,t);break;case`img`:case`image`:case`link`:J(`error`,t),J(`load`,t);break;case`details`:J(`toggle`,t);break;case`input`:J(`invalid`,t),Vt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:J(`invalid`,t);break;case`textarea`:J(`invalid`,t),Gt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Id(t.textContent,n)?(r.popover!=null&&(J(`beforetoggle`,t),J(`toggle`,t)),r.onScroll!=null&&J(`scroll`,t),r.onScrollEnd!=null&&J(`scrollend`,t),r.onClick!=null&&(t.onclick=en),t=!0):t=!1,t||zi(e,!0)}function Vi(e){for(Pi=e.return;Pi;)switch(Pi.tag){case 5:case 31:case 13:Li=!1;return;case 27:case 3:Li=!0;return;default:Pi=Pi.return}}function Hi(e){if(e!==Pi)return!1;if(!R)return Vi(e),R=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Jd(e.type,e.memoizedProps)),n=!n),n&&Fi&&zi(e),Vi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Fi=hf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(317));Fi=hf(e)}else t===27?(t=Fi,nf(e.type)?(e=mf,mf=null,Fi=e):Fi=t):Fi=Pi?pf(e.stateNode.nextSibling):null;return!0}function Ui(){Fi=Pi=null,R=!1}function Wi(){var e=Ii;return e!==null&&(eu===null?eu=e:eu.push.apply(eu,e),Ii=null),e}function Gi(e){Ii===null?Ii=[e]:Ii.push(e)}var Ki=ae(null),qi=null,Ji=null;function Yi(e,t,n){L(Ki,t._currentValue),t._currentValue=n}function Xi(e){e._currentValue=Ki.current,I(Ki)}function Zi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Qi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var s=i.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Zi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(i.tag===18){if(s=i.return,s===null)throw Error(a(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Zi(s,n,e),s=null}else s=i.child;if(s!==null)s.return=i;else for(s=i;s!==null;){if(s===e){s=null;break}if(i=s.sibling,i!==null){i.return=s.return,s=i;break}s=s.return}i=s}}function $i(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if(i.flags&524288)o=!0;else if(i.flags&262144)break}if(i.tag===10){var s=i.alternate;if(s===null)throw Error(a(387));if(s=s.memoizedProps,s!==null){var c=i.type;Cr(i.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(i===le.current){if(s=i.alternate,s===null)throw Error(a(387));s.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[rp]:e.push(rp))}i=i.return}e!==null&&Qi(t,e,n,r),t.flags|=262144}function ea(e){for(e=e.firstContext;e!==null;){if(!Cr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ta(e){qi=e,Ji=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function na(e){return ia(qi,e)}function ra(e,t){return qi===null&&ta(e),ia(e,t)}function ia(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ji===null){if(e===null)throw Error(a(308));Ji=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ji=Ji.next=t;return n}var aa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},oa=t.unstable_scheduleCallback,sa=t.unstable_NormalPriority,ca={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function la(){return{controller:new aa,data:new Map,refCount:0}}function ua(e){e.refCount--,e.refCount===0&&oa(sa,function(){e.controller.abort()})}var da=null,fa=0,pa=0,ma=null;function ha(e,t){if(da===null){var n=da=[];fa=0,pa=hd(),ma={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return fa++,t.then(ga,ga),t}function ga(){if(--fa===0&&da!==null){ma!==null&&(ma.status=`fulfilled`);var e=da;da=null,pa=0,ma=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function _a(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var va=P.S;P.S=function(e,t){ru=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&ha(e,t),va!==null&&va(e,t)};var ya=ae(null);function ba(){var e=ya.current;return e===null?Bl.pooledCache:e}function xa(e,t){t===null?L(ya,ya.current):L(ya,t.pool)}function Sa(){var e=ba();return e===null?null:{parent:ca._currentValue,pool:e}}var Ca=Error(a(460)),wa=Error(a(474)),Ta=Error(a(542)),Ea={then:function(){}};function Da(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Oa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(en,en),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ma(e),e;default:if(typeof t.status==`string`)t.then(en,en);else{if(e=Bl,e!==null&&100<e.shellSuspendCounter)throw Error(a(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ma(e),e}throw Aa=t,Ca}}function ka(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Aa=e,Ca):e}}var Aa=null;function ja(){if(Aa===null)throw Error(a(459));var e=Aa;return Aa=null,e}function Ma(e){if(e===Ca||e===Ta)throw Error(a(483))}var Na=null,Pa=0;function Fa(e){var t=Pa;return Pa+=1,Na===null&&(Na=[]),Oa(Na,e,t)}function Ia(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function La(e,t){throw t.$$typeof===g?Error(a(525)):(e=Object.prototype.toString.call(t),Error(a(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ra(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=di(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=hi(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===O&&ka(a)===t.type)?(t=i(t,n.props),Ia(t,n),t.return=e,t):(t=pi(n.type,n.key,n.props,null,e.mode,r),Ia(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=_i(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=mi(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=hi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=pi(t.type,t.key,t.props,null,e.mode,n),Ia(n,t),n.return=e,n;case v:return t=_i(t,e.mode,n),t.return=e,t;case O:return t=ka(t),f(e,t,n)}if(N(t)||j(t))return t=mi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Fa(t),n);if(t.$$typeof===C)return f(e,ra(e,t),n);La(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=ka(n),p(e,t,n,r)}if(N(n)||j(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Fa(n),r);if(n.$$typeof===C)return p(e,t,ra(e,n),r);La(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=ka(r),m(e,t,n,r,i)}if(N(r)||j(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Fa(r),i);if(r.$$typeof===C)return m(e,t,n,ra(t,r),i);La(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),R&&ki(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return R&&ki(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),R&&ki(i,h),l}function g(i,s,c,l){if(c==null)throw Error(a(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),R&&ki(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return R&&ki(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),R&&ki(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ka(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ia(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=mi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=pi(o.type,o.key,o.props,null,e.mode,c),Ia(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=_i(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ka(o),b(e,r,o,c)}if(N(o))return h(e,r,o,c);if(j(o)){if(l=j(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Fa(o),c);if(o.$$typeof===C)return b(e,r,ra(e,o),c);La(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=hi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Pa=0;var i=b(e,t,n,r);return Na=null,i}catch(t){if(t===Ca||t===Ta)throw t;var a=li(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var za=Ra(!0),Ba=Ra(!1),Va=!1;function Ha(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ua(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,zl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=oi(e),ai(e,null,n),t}return ni(e,r,t,n),oi(e)}function Ka(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}function qa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ja=!1;function Ya(){if(Ja){var e=ma;if(e!==null)throw e}}function Xa(e,t,n,r){Ja=!1;var i=e.updateQueue;Va=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(q&f)===f:(r&f)===f){f!==0&&f===pa&&(Ja=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Va=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Jl|=o,e.lanes=o,e.memoizedState=d}}function Za(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function Qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Za(n[e],t)}var $a=ae(null),eo=ae(0);function to(e,t){e=Kl,L(eo,e),L($a,t),Kl=e|t.baseLanes}function no(){L(eo,Kl),L($a,$a.current)}function ro(){Kl=eo.current,I($a),I(eo)}var io=ae(null),ao=null;function oo(e){var t=e.alternate;L(fo,fo.current&1),L(io,e),ao===null&&(t===null||$a.current!==null||t.memoizedState!==null)&&(ao=e)}function so(e){L(fo,fo.current),L(io,e),ao===null&&(ao=e)}function co(e){e.tag===22?(L(fo,fo.current),L(io,e),ao===null&&(ao=e)):lo(e)}function lo(){L(fo,fo.current),L(io,io.current)}function uo(e){I(io),ao===e&&(ao=null),I(fo)}var fo=ae(0);function po(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||uf(n)||df(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mo=0,z=null,ho=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(a(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Cr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return mo=a,z=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Bs:Vs,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){P.H=zs;var t=ho!==null&&ho.next!==null;if(mo=0,go=ho=z=null,_o=!1,xo=0,So=null,t)throw Error(a(300));e===null||nc||(e=e.dependencies,e!==null&&ea(e)&&(nc=!0))}function Oo(e,t,n,r){z=e;var i=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=i)throw Error(a(301));if(i+=1,go=ho=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Hs,o=t(n,r)}while(vo);return o}function ko(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(ho===null?null:ho.memoizedState)!==e&&(z.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}mo=0,go=ho=z=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?z.memoizedState=go=e:go=go.next=e,go}function Po(){if(ho===null){var e=z.alternate;e=e===null?null:e.memoizedState}else e=ho.next;var t=go===null?z.memoizedState:go.next;if(t!==null)go=t,ho=e;else{if(e===null)throw z.alternate===null?Error(a(467)):Error(a(310));ho=e,e={memoizedState:ho.memoizedState,baseState:ho.baseState,baseQueue:ho.baseQueue,queue:ho.queue,next:null},go===null?z.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=Oa(So,e,t),t=z,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Bs:Vs),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===C)return na(e)}throw Error(a(438,String(e)))}function Ro(e){var t=null,n=z.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=z.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),z.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=k;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),ho,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(a(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(mo&f)===f:(q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===pa&&(d=!0);else if((mo&p)===p){u=u.next,p===pa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,z.lanes|=p,Jl|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,z.lanes|=f,Jl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Cr(o,e.memoizedState)&&(nc=!0,d&&(n=ma,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Cr(o,t.memoizedState)||(nc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=z,i=Po(),o=R;if(o){if(n===void 0)throw Error(a(407));n=n()}else n=t();var s=!Cr((ho||i).memoizedState,n);if(s&&(i.memoizedState=n,nc=!0),i=i.queue,ps(Ko.bind(null,r,i,e),[e]),i.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,i,n,t),null),Bl===null)throw Error(a(349));o||mo&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=z.updateQueue,t===null?(t=Fo(),z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Cr(e,n)}catch{return!0}}function Jo(e){var t=ii(e,2);t!==null&&vu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,ho,typeof r==`function`?r:zo)}function Zo(e,t,n,r,i){if(Is(e))throw Error(a(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(R){var n=Bl.formState;if(n!==null){a:{var r=z;if(R){if(Fi){b:{for(var i=Fi,a=Li;i.nodeType!==8;){if(!a){i=null;break b}if(i=pf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Fi=pf(i.nextSibling),r=i.data===`F!`;break a}}zi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Ns.bind(null,z,r),r.dispatch=n,r=Yo(!1),a=Fs.bind(null,z,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,z,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),ho,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===Ca?Ta:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(z.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=ho;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=z.updateQueue,t===null&&(t=Fo(),z.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function B(){return Po().memoizedState}function us(e,t,n,r){var i=No();z.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function ds(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;ho!==null&&r!==null&&To(r,ho.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(z.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function fs(e,t){us(8390656,8,e,t)}function ps(e,t){ds(2048,8,e,t)}function ms(e){z.flags|=4;var t=z.updateQueue;if(t===null)t=Fo(),z.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function hs(e){var t=Po().memoizedState;return ms({ref:t,nextImpl:e}),function(){if(zl&2)throw Error(a(440));return t.impl.apply(void 0,arguments)}}function gs(e,t){return ds(4,2,e,t)}function _s(e,t){return ds(4,4,e,t)}function vs(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ys(e,t,n){n=n==null?null:n.concat([e]),ds(4,4,vs.bind(null,t,e),n)}function V(){}function bs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function Ss(e,t,n){return n===void 0||mo&1073741824&&!(q&261930)?e.memoizedState=t:(e.memoizedState=n,e=_u(),z.lanes|=e,Jl|=e,n)}function Cs(e,t,n,r){return Cr(n,t)?n:$a.current===null?!(mo&42)||mo&1073741824&&!(q&261930)?(nc=!0,e.memoizedState=n):(e=_u(),z.lanes|=e,Jl|=e,t):(e=Ss(e,n,r),Cr(e,t)||(nc=!0),e)}function ws(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,Fs(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,_a(c,r),gu(e)):Ps(e,t,r,gu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},gu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function Ts(){}function Es(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=H(e).queue;ws(e,i,t,ne,n===null?Ts:function(){return Ds(e),n(r)})}function H(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=H(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},gu())}function Os(){return na(rp)}function ks(){return Po().memoizedState}function As(){return Po().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=gu();e=Wa(n);var r=Ga(t,e,n);r!==null&&(vu(r,t,n),Ka(r,t,n)),t={cache:la()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=gu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=ri(e,t,n,r),n!==null&&(vu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,gu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Cr(s,o))return ni(e,t,i,0),Bl===null&&ti(),!1}catch{}if(n=ri(e,t,i,r),n!==null)return vu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:hd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(a(479))}else t=ri(e,n,r,2),t!==null&&vu(t,e,2)}function Is(e){var t=e.alternate;return e===z||t!==null&&t===z}function Ls(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var zs={readContext:na,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};zs.useEffectEvent=wo;var Bs={readContext:na,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:na,useEffect:fs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),us(4194308,4,vs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){us(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){Le(!0);try{n(t)}finally{Le(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,z,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Ns.bind(null,z,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:V,useDeferredValue:function(e,t){return Ss(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=ws.bind(null,z,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=z,i=No();if(R){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),Bl===null)throw Error(a(349));q&127||Wo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,fs(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=Bl.identifierPrefix;if(R){var n=Oi,r=Di;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Os,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Fs.bind(null,z,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=js.bind(null,z)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(zl&2)throw Error(a(440));return n.impl.apply(void 0,arguments)}}},Vs={readContext:na,use:Lo,useCallback:bs,useContext:na,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:xs,useReducer:Bo,useRef:B,useState:function(){return Bo(zo)},useDebugValue:V,useDeferredValue:function(e,t){return Cs(Po(),ho.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:ks,useHostTransitionStatus:Os,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),ho,e,t)},useMemoCache:Ro,useCacheRefresh:As};Vs.useEffectEvent=hs;var Hs={readContext:na,use:Lo,useCallback:bs,useContext:na,useEffect:ps,useImperativeHandle:ys,useInsertionEffect:gs,useLayoutEffect:_s,useMemo:xs,useReducer:Ho,useRef:B,useState:function(){return Ho(zo)},useDebugValue:V,useDeferredValue:function(e,t){var n=Po();return ho===null?Ss(n,e,t):Cs(n,ho.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:ks,useHostTransitionStatus:Os,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return ho===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,ho,e,t)},useMemoCache:Ro,useCacheRefresh:As};Hs.useEffectEvent=hs;function Us(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ws={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=gu(),i=Wa(r);i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,r),t!==null&&(vu(t,e,r),Ka(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=gu(),i=Wa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ga(e,i,r),t!==null&&(vu(t,e,r),Ka(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=gu(),r=Wa(n);r.tag=2,t!=null&&(r.callback=t),t=Ga(e,r,n),t!==null&&(vu(t,e,n),Ka(t,e,n))}};function Gs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!wr(n,r)||!wr(i,a):!0}function Ks(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ws.enqueueReplaceState(t,t.state,null)}function qs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function U(e){Zr(e)}function Js(e){console.error(e)}function W(e){Zr(e)}function Ys(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Zs(e,t,n){return n=Wa(n),n.tag=3,n.payload={element:null},n.callback=function(){Ys(e,t)},n}function Qs(e){return e=Wa(e),e.tag=3,e}function $s(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Xs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Xs(t,n,r),typeof i!=`function`&&(ou===null?ou=new Set([this]):ou.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ec(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&$i(t,n,i,!0),n=io.current,n!==null){switch(n.tag){case 31:case 13:return ao===null?Au():n.alternate===null&&ql===0&&(ql=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===Ea?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Yu(e,r,i)),!1;case 22:return n.flags|=65536,r===Ea?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Yu(e,r,i)),!1}throw Error(a(435,n.tag))}return Yu(e,r,i),Au(),!1}if(R)return t=io.current,t===null?(r!==Ri&&(t=Error(a(423),{cause:r}),Gi(yi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=yi(r,n),i=Zs(e.stateNode,r,i),qa(e,i),ql!==4&&(ql=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ri&&(e=Error(a(422),{cause:r}),Gi(yi(e,n)))),!1;var o=Error(a(520),{cause:r});if(o=yi(o,n),$l===null?$l=[o]:$l.push(o),ql!==4&&(ql=2),t===null)return!0;r=yi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Zs(n.stateNode,r,e),qa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ou===null||!ou.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Qs(i),$s(i,e,n,r),qa(n,i),!1}n=n.return}while(n!==null);return!1}var tc=Error(a(461)),nc=!1;function rc(e,t,n,r){t.child=e===null?Ba(t,null,n,r):za(t,e.child,n,r)}function ic(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ta(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!nc?(jo(e,t,i),Dc(e,t,i)):(R&&s&&ji(t),t.flags|=1,rc(e,t,r,i),t.child)}function ac(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ui(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,oc(e,t,a,r,i)):(e=pi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?wr:n,n(o,r)&&e.ref===t.ref)return Dc(e,t,i)}return t.flags|=1,e=di(a,r),e.ref=t.ref,e.return=t,t.child=e}function oc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(wr(a,r)&&e.ref===t.ref)if(nc=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(nc=!0);else return t.lanes=e.lanes,Dc(e,t,i)}return pc(e,t,n,r,i)}function sc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return lc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&xa(t,a===null?null:a.cachePool),a===null?no():to(t,a),co(t);else return r=t.lanes=536870912,lc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&xa(t,null),no(),lo(t)):(xa(t,a.cachePool),to(t,a),lo(t),t.memoizedState=null);return rc(e,t,i,n),t.child}function cc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function lc(e,t,n,r,i){var a=ba();return a=a===null?null:{parent:ca._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&xa(t,null),no(),co(t),e!==null&&$i(e,t,r,!0),t.childLanes=i,null}function G(e,t){return t=Sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function uc(e,t,n){return za(t,e.child,null,n),e=G(t,t.pendingProps),e.flags|=2,uo(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(R){if(r.mode===`hidden`)return e=G(t,r),t.lanes=536870912,cc(null,e);if(so(t),(e=Fi)?(e=lf(e,Li),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw zi(t);return t.lanes=536870912,null}return G(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(so(t),i)if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(a(558));else if(nc||$i(e,t,n,!1),i=(n&e.childLanes)!==0,nc||i){if(r=Bl,r!==null&&(s=tt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ii(e,s),vu(r,e,s),tc;Au(),t=uc(e,t,n)}else e=o.treeContext,Fi=pf(s.nextSibling),Pi=t,R=!0,Ii=null,Li=!1,e!==null&&Ni(t,e),t=G(t,r),t.flags|=4096;return t}return e=di(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(a(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function pc(e,t,n,r,i){return ta(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!nc?(jo(e,t,i),Dc(e,t,i)):(R&&r&&ji(t),t.flags|=1,rc(e,t,n,i),t.child)}function mc(e,t,n,r,i,a){return ta(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!nc?(jo(e,t,a),Dc(e,t,a)):(R&&r&&ji(t),t.flags|=1,rc(e,t,n,a),t.child)}function hc(e,t,n,r,i){if(ta(t),t.stateNode===null){var a=si,o=n.contextType;typeof o==`object`&&o&&(a=na(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ws,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ha(t),o=n.contextType,a.context=typeof o==`object`&&o?na(o):si,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Us(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ws.enqueueReplaceState(a,a.state,null),Xa(t,r,a,i),Ya(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=qs(n,s);a.props=c;var l=a.context,u=n.contextType;o=si,typeof u==`object`&&u&&(o=na(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ks(t,a,r,o),Va=!1;var f=t.memoizedState;a.state=f,Xa(t,r,a,i),Ya(),l=t.memoizedState,s||f!==l||Va?(typeof d==`function`&&(Us(t,n,d,r),l=t.memoizedState),(c=Va||Gs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ua(e,t),o=t.memoizedProps,u=qs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=si,typeof l==`object`&&l&&(c=na(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ks(t,a,r,c),Va=!1,f=t.memoizedState,a.state=f,Xa(t,r,a,i),Ya();var p=t.memoizedState;o!==d||f!==p||Va||e!==null&&e.dependencies!==null&&ea(e.dependencies)?(typeof s==`function`&&(Us(t,n,s,r),p=t.memoizedState),(u=Va||Gs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ea(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,fc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=za(t,e.child,null,i),t.child=za(t,null,n,i)):rc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Dc(e,t,i),e}function gc(e,t,n,r){return Ui(),t.flags|=256,rc(e,t,n,r),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:Sa()}}function yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Zl),e}function bc(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(fo.current&2)!=0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(R){if(i?oo(t):lo(t),(e=Fi)?(e=lf(e,Li),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ei===null?null:{id:Di,overflow:Oi},retryLane:536870912,hydrationErrors:null},n=gi(e),n.return=t,t.child=n,Pi=t,Fi=null)):e=null,e===null)throw zi(t);return df(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(lo(t),i=t.mode,c=Sc({mode:`hidden`,children:c},i),r=mi(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,cc(null,r)):(oo(t),xc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(oo(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState===null?(lo(t),c=r.fallback,i=t.mode,r=Sc({mode:`visible`,children:r.children},i),c=mi(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,za(t,e.child,null,n),r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,s,n),t.memoizedState=_c,t=cc(null,r)):(lo(t),t.child=e.child,t.flags|=128,t=null);else if(oo(t),df(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(a(419)),r.stack=``,r.digest=s,Gi({value:r,source:null,stack:null}),t=Cc(e,t,n)}else if(nc||$i(e,t,n,!1),s=(n&e.childLanes)!==0,nc||s){if(s=Bl,s!==null&&(r=tt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ii(e,r),vu(s,e,r),tc;uf(c)||Au(),t=Cc(e,t,n)}else uf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Fi=pf(c.nextSibling),Pi=t,R=!0,Ii=null,Li=!1,e!==null&&Ni(t,e),t=xc(t,r.children),t.flags|=4096);return t}return i?(lo(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=di(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=mi(c,i,n,null),c.flags|=2):c=di(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,cc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=vc(n):(i=c.cachePool,i===null?i=Sa():(l=ca._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=yc(e,s,n),t.memoizedState=_c,cc(e.child,r)):(oo(t),n=e.child,e=n.sibling,n=di(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function xc(e,t){return t=Sc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Sc(e,t){return e=li(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return za(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Zi(e.return,t,n)}function Tc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=fo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,L(fo,o),rc(e,t,r,n),r=R?Ci:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&po(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Tc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&po(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Tc(t,!0,n,null,a,r);break;case`together`:Tc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if($i(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(a(153));if(t.child!==null){for(e=t.child,n=di(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=di(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ea(e))):!0}function kc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Yi(t,ca,e.memoizedState.cache),Ui();break;case 27:case 5:fe(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Yi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,so(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(oo(t),e=Dc(e,t,n),e===null?null:e.sibling):bc(e,t,n):(oo(t),t.flags|=128,null);oo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=($i(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(fo,fo.current),r)break;return null;case 22:return t.lanes=0,sc(e,t,n,t.pendingProps);case 24:Yi(t,ca,e.memoizedState.cache)}return Dc(e,t,n)}function Ac(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)nc=!0;else{if(!Oc(e,n)&&!(t.flags&128))return nc=!1,kc(e,t,n);nc=!!(e.flags&131072)}else nc=!1,R&&t.flags&1048576&&Ai(t,Ci,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e==`function`)ui(e)?(r=qs(e,r),t.tag=1,t=hc(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===w){t.tag=11,t=ic(null,t,e,r,n);break a}else if(i===D){t.tag=14,t=ac(null,t,e,r,n);break a}}throw t=te(e)||e,Error(a(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=qs(r,t.pendingProps),hc(e,t,r,i,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(a(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,Ua(e,t),Xa(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Yi(t,ca,r),r!==o.cache&&Qi(t,[ca],n,!0),Ya(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=gc(e,t,r,n);break a}else if(r!==i){i=yi(Error(a(424)),t),Gi(i),t=gc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Fi=pf(e.firstChild),Pi=t,R=!0,Ii=null,Li=!0,n=Ba(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ui(),r===i){t=Dc(e,t,n);break a}rc(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=Pf(t.type,null,t.pendingProps,null))?t.memoizedState=n:R||(n=t.type,e=t.pendingProps,r=Gd(ce.current).createElement(n),r[st]=t,r[ct]=e,zd(r,n,e),bt(r),t.stateNode=r):t.memoizedState=Pf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&R&&(r=t.stateNode=_f(t.type,t.pendingProps,ce.current),Pi=t,Li=!0,i=Fi,nf(t.type)?(mf=i,Fi=pf(r.firstChild)):Fi=i),rc(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&R&&((i=r=Fi)&&(r=sf(r,t.type,t.pendingProps,Li),r===null?i=!1:(t.stateNode=r,Pi=t,Fi=pf(r.firstChild),Li=!1,i=!0)),i||zi(t)),fe(t),i=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Jd(i,o)?r=null:s!==null&&Jd(i,s)&&(t.flags|=32),t.memoizedState!==null&&(i=Eo(e,t,ko,null,null,n),rp._currentValue=i),fc(e,t),rc(e,t,r,n),t.child;case 6:return e===null&&R&&((e=n=Fi)&&(n=cf(n,t.pendingProps,Li),n===null?e=!1:(t.stateNode=n,Pi=t,Fi=null,e=!0)),e||zi(t)),null;case 13:return bc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=za(t,null,r,n):rc(e,t,r,n),t.child;case 11:return ic(e,t,t.type,t.pendingProps,n);case 7:return rc(e,t,t.pendingProps,n),t.child;case 8:return rc(e,t,t.pendingProps.children,n),t.child;case 12:return rc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Yi(t,t.type,r.value),rc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ta(t),i=na(i),r=r(i),t.flags|=1,rc(e,t,r,n),t.child;case 14:return ac(e,t,t.type,t.pendingProps,n);case 15:return oc(e,t,t.type,t.pendingProps,n);case 19:return Ec(e,t,n);case 31:return dc(e,t,n);case 22:return sc(e,t,n,t.pendingProps);case 24:return ta(t),r=na(ca),e===null?(i=ba(),i===null&&(i=Bl,o=la(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},Ha(t),Yi(t,ca,i)):((e.lanes&n)!==0&&(Ua(e,t),Xa(t,null,null,n),Ya()),i=e.memoizedState,o=t.memoizedState,i.parent===r?(r=o.cache,Yi(t,ca,r),r!==i.cache&&Qi(t,[ca],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Yi(t,ca,r))),rc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(a(156,t.tag))}function jc(e){e.flags|=4}function Mc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Du())e.flags|=8192;else throw Aa=Ea,wa}else e.flags&=-16777217}function Nc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Yf(t))if(Du())e.flags|=8192;else throw Aa=Ea,wa}function Pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,Ql|=t)}function Fc(e,t){if(!R)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ic(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Lc(e,t,n){var r=t.pendingProps;switch(Mi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ic(t),null;case 1:return Ic(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Xi(ca),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wi())),Ic(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(jc(t),o===null?(Ic(t),Mc(t,i,null,r,n)):(Ic(t),Nc(t,o))):o?o===e.memoizedState?(Ic(t),t.flags&=-16777217):(jc(t),Ic(t),Nc(t,o)):(e=e.memoizedProps,e!==r&&jc(t),Ic(t),Mc(t,i,e,r,n)),null;case 27:if(pe(t),n=ce.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Ic(t),null}e=oe.current,Hi(t)?Bi(t,e):(e=_f(i,r,n),t.stateNode=e,jc(t))}return Ic(t),null;case 5:if(pe(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(a(166));return Ic(t),null}if(o=oe.current,Hi(t))Bi(t,o);else{var s=Gd(ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[st]=t,o[ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(zd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&jc(t)}}return Ic(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=ce.current,Hi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Pi,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Id(e.nodeValue,n)),e||zi(t,!0)}else e=Gd(e).createTextNode(r),e[st]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Hi(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[st]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(uo(t),t):(uo(t),null);if(t.flags&128)throw Error(a(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Hi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[st]=t}else Ui(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),i=!1}else i=Wi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(uo(t),t):(uo(t),null)}return uo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pc(t,t.updateQueue),Ic(t),null);case 4:return de(),e===null&&Ed(t.stateNode.containerInfo),Ic(t),null;case 10:return Xi(t.type),Ic(t),null;case 19:if(I(fo),r=t.memoizedState,r===null)return Ic(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Fc(r,!1);else{if(ql!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=po(e),o!==null){for(t.flags|=128,Fc(r,!1),e=o.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)fi(n,e),n=n.sibling;return L(fo,fo.current&1|2),R&&ki(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>iu&&(t.flags|=128,i=!0,Fc(r,!1),t.lanes=4194304)}else{if(!i)if(e=po(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!R)return Ic(t),null}else 2*Ee()-r.renderingStartTime>iu&&n!==536870912&&(t.flags|=128,i=!0,Fc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=fo.current,L(fo,i?n&1|2:n&1),R&&ki(t,r.treeForkCount),e);case 22:case 23:return uo(t),ro(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Pc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&I(ya),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Xi(ca),Ic(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Rc(e,t){switch(Mi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(ca),de(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(uo(t),t.alternate===null)throw Error(a(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(uo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Ui()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(fo),null;case 4:return de(),null;case 10:return Xi(t.type),null;case 22:case 23:return uo(t),ro(),e!==null&&I(ya),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Xi(ca),null;case 25:return null;default:return null}}function zc(e,t){switch(Mi(t),t.tag){case 3:Xi(ca),de();break;case 26:case 27:case 5:pe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&uo(t);break;case 13:uo(t);break;case 19:I(fo);break;case 10:Xi(t.type);break;case 22:case 23:uo(t),ro(),e!==null&&I(ya);break;case 24:Xi(ca)}}function Bc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ju(t,t.return,e)}}function Vc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ju(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ju(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Qa(t,n)}catch(t){Ju(e,e.return,t)}}}function Uc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ju(e,t,n)}}function Wc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ju(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ju(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ju(e,t,n)}else n.current=null}function Kc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ju(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Bd(r,e.type,n,t),r[ct]=t}catch(t){Ju(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&nf(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&nf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=en));else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&nf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);zd(t,r,n),t[st]=e,t[ct]=n}catch(t){Ju(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Ud=fp,e=Or(e),kr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Wd={focusedElem:e,selectionRange:n},fp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=qs(n.type,i);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Ju(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)of(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:of(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(a(163))}if(e=t.sibling,e!==null){e.return=t.return,rl=e;break}rl=t.return}}function al(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Bc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Ju(n,n.return,e)}else{var i=qs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Ju(n,n.return,e)}}r&64&&Hc(n),r&512&&Wc(n,n.return);break;case 3:if(bl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Qa(e,t)}catch(e){Ju(n,n.return,e)}}break;case 27:t===null&&r&4&&Qc(n);case 26:case 5:bl(e,n),t===null&&r&4&&Kc(n),r&512&&Wc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Qu.bind(null,n),ff(e,n))));break;case 22:if(r=n.memoizedState!==null||$c,!r){t=t!==null&&t.memoizedState!==null||el,i=$c;var a=el;$c=r,(el=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),$c=i,el=a}break;case 30:break;default:bl(e,n)}}function ol(e){var t=e.alternate;t!==null&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ht(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var sl=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:el||Gc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:el||Gc(n,t);var r=sl,i=cl;nf(n.type)&&(sl=n.stateNode,cl=!1),ll(e,t,n),vf(n.stateNode),sl=r,cl=i;break;case 5:el||Gc(n,t);case 6:if(r=sl,i=cl,sl=null,ll(e,t,n),sl=r,cl=i,sl!==null)if(cl)try{(sl.nodeType===9?sl.body:sl.nodeName===`HTML`?sl.ownerDocument.body:sl).removeChild(n.stateNode)}catch(e){Ju(n,t,e)}else try{sl.removeChild(n.stateNode)}catch(e){Ju(n,t,e)}break;case 18:sl!==null&&(cl?(e=sl,rf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Rp(e)):rf(sl,n.stateNode));break;case 4:r=sl,i=cl,sl=n.stateNode.containerInfo,cl=!0,ll(e,t,n),sl=r,cl=i;break;case 0:case 11:case 14:case 15:Vc(2,n,t),el||Vc(4,n,t),ll(e,t,n);break;case 1:el||(Gc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Uc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:el=(r=el)||n.memoizedState!==null,ll(e,t,n),el=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Rp(e)}catch(e){Ju(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Rp(e)}catch(e){Ju(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nl),t;default:throw Error(a(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=$u.bind(null,e,t);t.then(r,r)}})}function hl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(nf(c.type)){sl=c.stateNode,cl=!1;break a}break;case 5:sl=c.stateNode,cl=!1;break a;case 3:case 4:sl=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(sl===null)throw Error(a(160));ul(o,s,i),sl=null,cl=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Vc(3,e,e.return),Bc(3,e),Vc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&64&&$c&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=gl;if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:o=i.getElementsByTagName(`title`)[0],(!o||o[mt]||o[st]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector(`head > title`))),zd(o,r,n),o[st]=e,bt(o),r=o;break a;case`link`:var s=Kf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=i.createElement(r),zd(o,r,n),i.head.appendChild(o);break;case`meta`:if(s=Kf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=i.createElement(r),zd(o,r,n),i.head.appendChild(o);break;default:throw Error(a(468,r))}o[st]=e,bt(o),r=o}e.stateNode=r}else qf(i,e.type,e.stateNode);else e.stateNode=Vf(i,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?qf(i,e.type,e.stateNode):Vf(i,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),n!==null&&r&4&&qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),e.flags&32){i=e.stateNode;try{Kt(i,``)}catch(t){Ju(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,qc(e,i,n===null?i:n.memoizedProps)),r&1024&&(tl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(a(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Ju(e,e.return,t)}}break;case 3:if(Gf=null,i=gl,gl=xf(t.containerInfo),hl(t,e),gl=i,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Rp(t.containerInfo)}catch(t){Ju(e,e.return,t)}tl&&(tl=!1,yl(e));break;case 4:r=gl,gl=xf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(nu=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=$c,d=el;if($c=u||i,el=d||l,hl(t,e),el=d,$c=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||$c||el||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,i)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Ju(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Ju(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?af(m,!0):af(l.stateNode,!1)}catch(e){Ju(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Jc(r)){n=r;break}r=r.return}if(n==null)throw Error(a(160));switch(n.tag){case 27:var i=n.stateNode;Zc(e,Yc(e),i);break;case 5:var o=n.stateNode;n.flags&32&&(Kt(o,``),n.flags&=-33),Zc(e,Yc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Xc(e,Yc(e),s);break;default:throw Error(a(161))}}catch(t){Ju(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)al(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vc(4,t,t.return),xl(t);break;case 1:Gc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Uc(t,t.return,n),xl(t);break;case 27:vf(t.stateNode);case 26:case 5:Gc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Sl(i,a,n),Bc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Ju(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Za(c[i],s)}catch(e){Ju(r,r.return,e)}}n&&o&64&&Hc(a),Wc(a,a.return);break;case 27:Qc(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&Kc(a),Wc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Wc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ua(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ua(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Bc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ua(e)));break;case 12:if(i&2048){Tl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Ju(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(a,o,s,c,i),Bc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Xf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=xf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Vc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;rl!==null;){var n=rl;switch(n.tag){case 0:case 11:case 15:Vc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ua(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,rl=r;else a:for(n=e;rl!==null;){r=rl;var i=r.sibling,a=r.return;if(ol(r),r===n){rl=null;break a}if(i!==null){i.return=a,rl=i;break a}rl=a}}}var Ll={getCacheForType:function(e){var t=na(ca),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return na(ca).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,zl=0,Bl=null,K=null,q=0,Vl=0,Hl=null,Ul=!1,Wl=!1,Gl=!1,Kl=0,ql=0,Jl=0,Yl=0,Xl=0,Zl=0,Ql=0,$l=null,eu=null,tu=!1,nu=0,ru=0,iu=1/0,au=null,ou=null,su=0,cu=null,lu=null,uu=0,du=0,fu=null,pu=null,mu=0,hu=null;function gu(){return zl&2&&q!==0?q&-q:P.T===null?it():hd()}function _u(){if(Zl===0)if(!(q&536870912)||R){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),Zl=e}else Zl=536870912;return e=io.current,e!==null&&(e.flags|=32),Zl}function vu(e,t,n){(e===Bl&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)&&(Tu(e,0),Su(e,q,Zl,!1)),Ze(e,n),(!(zl&2)||e!==Bl)&&(e===Bl&&(!(zl&2)&&(Yl|=n),ql===4&&Su(e,q,Zl,!1)),sd(e))}function yu(e,t,n){if(zl&6)throw Error(a(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||qe(e,t),i=r?Nu(e,t):ju(e,t,!0),o=r;do{if(i===0){Wl&&!r&&Su(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!xu(n)){i=ju(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;i=$l;var l=c.current.memoizedState.isDehydrated;if(l&&(Tu(c,s).flags|=256),s=ju(c,s,!1),s!==2){if(Gl&&!l){c.errorRecoveryDisabledLanes|=o,Yl|=o,i=4;break a}o=eu,eu=i,o!==null&&(eu===null?eu=o:eu.push.apply(eu,o))}i=s}if(o=!1,i!==2)continue}}if(i===1){Tu(e,0),Su(e,t,0,!0);break}a:{switch(r=e,o=i,o){case 0:case 1:throw Error(a(345));case 4:if((t&4194048)!==t)break;case 6:Su(r,t,Zl,!Ul);break a;case 2:eu=null;break;case 3:case 5:break;default:throw Error(a(329))}if((t&62914560)===t&&(i=nu+300-Ee(),10<i)){if(Su(r,t,Zl,!Ul),Ke(r,0,!0)!==0)break a;uu=t,r.timeoutHandle=Zd(bu.bind(null,r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,`Throttled`,-0,0),i);break a}bu(r,n,eu,au,tu,t,Zl,Yl,Ql,Ul,o,null,-0,0)}}break}while(1);sd(e)}function bu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:en},jl(t,a,d);var m=(a&62914560)===a?nu-Ee():(a&4194048)===a?ru-Ee():0;if(m=Qf(d,m),m!==null){uu=a,e.cancelPendingCommit=m(Bu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Su(e,a,o,!l);return}}Bu(e,t,a,n,r,i,o,s,c)}function xu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Cr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Su(e,t,n,r){t&=~Xl,t&=~Yl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function Cu(){return zl&6?!0:(cd(0,!1),!1)}function wu(){if(K!==null){if(Vl===0)var e=K.return;else e=K,Ji=qi=null,Mo(e),Na=null,Pa=0,e=K;for(;e!==null;)zc(e.alternate,e),e=e.return;K=null}}function Tu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),uu=0,wu(),Bl=e,K=n=di(e.current,null),q=t,Vl=0,Hl=null,Ul=!1,Wl=qe(e,t),Gl=!1,Ql=Zl=Xl=Yl=Jl=ql=0,eu=$l=null,tu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return Kl=t,ti(),n}function Eu(e,t){z=null,P.H=zs,t===Ca||t===Ta?(t=ja(),Vl=3):t===wa?(t=ja(),Vl=4):Vl=t===tc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Hl=t,K===null&&(ql=1,Ys(e,yi(t,e.current)))}function Du(){var e=io.current;return e===null?!0:(q&4194048)===q?ao===null:(q&62914560)===q||q&536870912?e===ao:!1}function Ou(){var e=P.H;return P.H=zs,e===null?zs:e}function ku(){var e=P.A;return P.A=Ll,e}function Au(){ql=4,Ul||(q&4194048)!==q&&io.current!==null||(Wl=!0),!(Jl&134217727)&&!(Yl&134217727)||Bl===null||Su(Bl,q,Zl,!1)}function ju(e,t,n){var r=zl;zl|=2;var i=Ou(),a=ku();(Bl!==e||q!==t)&&(au=null,Tu(e,t)),t=!1;var o=ql;a:do try{if(Vl!==0&&K!==null){var s=K,c=Hl;switch(Vl){case 8:wu(),o=6;break a;case 3:case 2:case 9:case 6:io.current===null&&(t=!0);var l=Vl;if(Vl=0,Hl=null,Lu(e,s,c,l),n&&Wl){o=0;break a}break;default:l=Vl,Vl=0,Hl=null,Lu(e,s,c,l)}}Mu(),o=ql;break}catch(t){Eu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ji=qi=null,zl=r,P.H=i,P.A=a,K===null&&(Bl=null,q=0,ti()),o}function Mu(){for(;K!==null;)Fu(K)}function Nu(e,t){var n=zl;zl|=2;var r=Ou(),i=ku();Bl!==e||q!==t?(au=null,iu=Ee()+500,Tu(e,t)):Wl=qe(e,t);a:do try{if(Vl!==0&&K!==null){t=K;var o=Hl;b:switch(Vl){case 1:Vl=0,Hl=null,Lu(e,t,o,1);break;case 2:case 9:if(Da(o)){Vl=0,Hl=null,Iu(t);break}t=function(){Vl!==2&&Vl!==9||Bl!==e||(Vl=7),sd(e)},o.then(t,t);break a;case 3:Vl=7;break a;case 4:Vl=5;break a;case 7:Da(o)?(Vl=0,Hl=null,Iu(t)):(Vl=0,Hl=null,Lu(e,t,o,7));break;case 5:var s=null;switch(K.tag){case 26:s=K.memoizedState;case 5:case 27:var c=K;if(s?Yf(s):c.stateNode.complete){Vl=0,Hl=null;var l=c.sibling;if(l!==null)K=l;else{var u=c.return;u===null?K=null:(K=u,Ru(u))}break b}}Vl=0,Hl=null,Lu(e,t,o,5);break;case 6:Vl=0,Hl=null,Lu(e,t,o,6);break;case 8:wu(),ql=6;break a;default:throw Error(a(462))}}Pu();break}catch(t){Eu(e,t)}while(1);return Ji=qi=null,P.H=r,P.A=i,zl=n,K===null?(Bl=null,q=0,ti(),ql):0}function Pu(){for(;K!==null&&!we();)Fu(K)}function Fu(e){var t=Ac(e.alternate,e,Kl);e.memoizedProps=e.pendingProps,t===null?Ru(e):K=t}function Iu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=mc(n,t,t.pendingProps,t.type,void 0,q);break;case 11:t=mc(n,t,t.pendingProps,t.type.render,t.ref,q);break;case 5:Mo(t);default:zc(n,t),t=K=fi(t,Kl),t=Ac(n,t,Kl)}e.memoizedProps=e.pendingProps,t===null?Ru(e):K=t}function Lu(e,t,n,r){Ji=qi=null,Mo(t),Na=null,Pa=0;var i=t.return;try{if(ec(e,i,t,n,q)){ql=1,Ys(e,yi(n,e.current)),K=null;return}}catch(t){if(i!==null)throw K=i,t;ql=1,Ys(e,yi(n,e.current)),K=null;return}t.flags&32768?(R||r===1?e=!0:Wl||q&536870912?e=!1:(Ul=e=!0,(r===2||r===9||r===3||r===6)&&(r=io.current,r!==null&&r.tag===13&&(r.flags|=16384))),zu(t,e)):Ru(t)}function Ru(e){var t=e;do{if(t.flags&32768){zu(t,Ul);return}e=t.return;var n=Lc(t.alternate,t,Kl);if(n!==null){K=n;return}if(t=t.sibling,t!==null){K=t;return}K=t=e}while(t!==null);ql===0&&(ql=5)}function zu(e,t){do{var n=Rc(e.alternate,e);if(n!==null){n.flags&=32767,K=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){K=e;return}K=e=n}while(e!==null);ql=6,K=null}function Bu(e,t,n,r,i,o,s,c,l){e.cancelPendingCommit=null;do Gu();while(su!==0);if(zl&6)throw Error(a(327));if(t!==null){if(t===e.current)throw Error(a(177));if(o=t.lanes|t.childLanes,o|=ei,Qe(e,n,o,s,c,l),e===Bl&&(K=Bl=null,q=0),lu=t,cu=e,uu=n,du=o,fu=i,pu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ed(Ae,function(){return Ku(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,s=zl,zl|=4;try{il(e,t,n)}finally{zl=s,F.p=i,P.T=r}}su=1,Vu(),Hu(),Uu()}}function Vu(){if(su===1){su=0;var e=cu,t=lu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=zl;zl|=4;try{_l(t,e);var a=Wd,o=Or(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Dr(s.ownerDocument.documentElement,s)){if(c!==null&&kr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Er(s,h),v=Er(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}fp=!!Ud,Wd=Ud=null}finally{zl=i,F.p=r,P.T=n}}e.current=t,su=2}}function Hu(){if(su===2){su=0;var e=cu,t=lu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=zl;zl|=4;try{al(e,t.alternate,t)}finally{zl=i,F.p=r,P.T=n}}su=3}}function Uu(){if(su===4||su===3){su=0,Te();var e=cu,t=lu,n=uu,r=pu;t.subtreeFlags&10256||t.flags&10256?su=5:(su=0,lu=cu=null,Wu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ou=null),rt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(Fe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}uu&3&&Gu(),sd(e),i=e.pendingLanes,n&261930&&i&42?e===hu?mu++:(mu=0,hu=e):mu=0,cd(0,!1)}}function Wu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ua(t)))}function Gu(){return Vu(),Hu(),Uu(),Ku()}function Ku(){if(su!==5)return!1;var e=cu,t=du;du=0;var n=rt(uu),r=P.T,i=F.p;try{F.p=32>n?32:n,P.T=null,n=fu,fu=null;var o=cu,s=uu;if(su=0,lu=cu=null,uu=0,zl&6)throw Error(a(331));var c=zl;if(zl|=4,Pl(o.current),El(o,o.current,s,n),zl=c,cd(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(Fe,o)}catch{}return!0}finally{F.p=i,P.T=r,Wu(e,t)}}function qu(e,t,n){t=yi(n,t),t=Zs(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(Ze(e,2),sd(e))}function Ju(e,t,n){if(e.tag===3)qu(e,e,n);else for(;t!==null;){if(t.tag===3){qu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ou===null||!ou.has(r))){e=yi(n,e),n=Qs(2),r=Ga(t,n,2),r!==null&&($s(n,r,t,e),Ze(r,2),sd(r));break}}t=t.return}}function Yu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Gl=!0,i.add(n),e=Xu.bind(null,e,t,n),t.then(e,e))}function Xu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Bl===e&&(q&n)===n&&(ql===4||ql===3&&(q&62914560)===q&&300>Ee()-nu?!(zl&2)&&Tu(e,0):Xl|=n,Ql===q&&(Ql=0)),sd(e)}function Zu(e,t){t===0&&(t=Ye()),e=ii(e,t),e!==null&&(Ze(e,t),sd(e))}function Qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Zu(e,n)}function $u(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Zu(e,n)}function ed(e,t){return Se(e,t)}var td=null,nd=null,rd=!1,id=!1,ad=!1,od=0;function sd(e){e!==nd&&e.next===null&&(nd===null?td=nd=e:nd=nd.next=e),id=!0,rd||(rd=!0,md())}function cd(e,t){if(!ad&&id){ad=!0;do for(var n=!1,r=td;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,pd(r,a))}else a=q,a=Ke(r,r===Bl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,pd(r,a));r=r.next}while(n);ad=!1}}function ld(){ud()}function ud(){id=rd=!1;var e=0;od!==0&&Xd()&&(e=od);for(var t=Ee(),n=null,r=td;r!==null;){var i=r.next,a=dd(r,t);a===0?(r.next=null,n===null?td=i:n.next=i,i===null&&(nd=n)):(n=r,(e!==0||a&3)&&(id=!0)),r=i}su!==0&&su!==5||cd(e,!1),od!==0&&(od=0)}function dd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Bl,n=q,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Vl===2||Vl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),rt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=fd.bind(null,e),n=Se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ce(r),e.callbackPriority=2,e.callbackNode=null,2}function fd(e,t){if(su!==0&&su!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Gu()&&e.callbackNode!==n)return null;var r=q;return r=Ke(e,e===Bl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(yu(e,r,t),dd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?fd.bind(null,e):null)}function pd(e,t){if(Gu())return null;yu(e,t,!0)}function md(){ef(function(){zl&6?Se(Oe,ld):ud()})}function hd(){if(od===0){var e=pa;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),od=e}return od}function gd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:$t(``+e)}function _d(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function vd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=gd((i[ct]||null).action),o=r.submitter;o&&(t=(t=o[ct]||null)?gd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Sn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(od!==0){var e=o?_d(i,o):new FormData(i);Es(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?_d(i,o):new FormData(i),Es(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var yd=0;yd<Yr.length;yd++){var bd=Yr[yd];Xr(bd.toLowerCase(),`on`+(bd[0].toUpperCase()+bd.slice(1)))}Xr(Vr,`onAnimationEnd`),Xr(Hr,`onAnimationIteration`),Xr(Ur,`onAnimationStart`),Xr(`dblclick`,`onDoubleClick`),Xr(`focusin`,`onFocus`),Xr(`focusout`,`onBlur`),Xr(Wr,`onTransitionRun`),Xr(Gr,`onTransitionStart`),Xr(Kr,`onTransitionCancel`),Xr(qr,`onTransitionEnd`),wt(`onMouseEnter`,[`mouseout`,`mouseover`]),wt(`onMouseLeave`,[`mouseout`,`mouseover`]),wt(`onPointerEnter`,[`pointerout`,`pointerover`]),wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ct(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ct(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ct(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ct(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var xd=`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(` `),Sd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(xd));function Cd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Zr(e)}i.currentTarget=null,a=c}}}}function J(e,t){var n=t[ut];n===void 0&&(n=t[ut]=new Set);var r=e+`__bubble`;n.has(r)||(Dd(t,e,2,!1),n.add(r))}function wd(e,t,n){var r=0;t&&(r|=4),Dd(n,e,r,t)}var Td=`_reactListening`+Math.random().toString(36).slice(2);function Ed(e){if(!e[Td]){e[Td]=!0,xt.forEach(function(t){t!==`selectionchange`&&(Sd.has(t)||wd(t,!1,e),wd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Td]||(t[Td]=!0,wd(`selectionchange`,!1,t))}}function Dd(e,t,n,r){switch(yp(t)){case 2:var i=pp;break;case 8:i=mp;break;default:i=hp}n=i.bind(null,t,n,e),i=void 0,!dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Od(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=gt(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}cn(function(){var r=a,i=nn(n),o=[];a:{var s=Jr.get(e);if(s!==void 0){var c=Sn,u=e;switch(e){case`keypress`:if(_n(n)===0)break a;case`keydown`:case`keyup`:c=Bn;break;case`focusin`:u=`focus`,c=jn;break;case`focusout`:u=`blur`,c=jn;break;case`beforeblur`:case`afterblur`:c=jn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=kn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=An;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Hn;break;case Vr:case Hr:case Ur:c=Mn;break;case qr:c=Un;break;case`scroll`:case`scrollend`:c=wn;break;case`wheel`:c=Wn;break;case`copy`:case`cut`:case`paste`:c=Nn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Vn;break;case`toggle`:case`beforetoggle`:c=Gn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=ln(m,p),g!=null&&d.push(kd(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==tn&&(u=n.relatedTarget||n.fromElement)&&(gt(u)||u[lt]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(u=n.relatedTarget||n.toElement,c=r,u=u?gt(u):null,u!==null&&(f=l(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(c=null,u=r),c!==u)){if(d=kn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Vn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?s:vt(c),h=u==null?s:vt(u),s=new d(g,m+`leave`,c,n,i),s.target=f,s.relatedTarget=h,g=null,gt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,c&&u)b:{for(d=jd,p=c,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;c!==null&&Md(o,s,c,d,!1),u!==null&&f!==null&&Md(o,f,u,d,!0)}}a:{if(s=r?vt(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var v=dr;else if(ar(s))if(fr)v=xr;else{v=yr;var y=vr}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&Xt(r.elementType)&&(v=dr):v=br;if(v&&=v(e,r)){or(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Ht(s,`number`,s.value)}switch(y=r?vt(r):window,e){case`focusin`:(ar(y)||y.contentEditable===`true`)&&(jr=y,Mr=r,Nr=null);break;case`focusout`:Nr=Mr=jr=null;break;case`mousedown`:Pr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Pr=!1,Fr(o,n,i);break;case`selectionchange`:if(Ar)break;case`keydown`:case`keyup`:Fr(o,n,i)}var b;if(qn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else tr?$n(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Xn&&n.locale!==`ko`&&(tr||x!==`onCompositionStart`?x===`onCompositionEnd`&&tr&&(b=gn()):(pn=i,mn=`value`in pn?pn.value:pn.textContent,tr=!0)),y=Ad(r,x),0<y.length&&(x=new Pn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=er(n),b!==null&&(x.data=b)))),(b=Yn?nr(e,n):rr(e,n))&&(x=Ad(r,`onBeforeInput`),0<x.length&&(y=new Pn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),vd(o,e,r,n,i)}Cd(o,t)})}function kd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ad(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=ln(e,n),i!=null&&r.unshift(kd(e,i,a)),i=ln(e,t),i!=null&&r.push(kd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function jd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Md(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=ln(n,a),l!=null&&o.unshift(kd(n,l,c))):i||(l=ln(n,a),l!=null&&o.push(kd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Nd=/\r\n?/g,Pd=/\u0000|\uFFFD/g;function Fd(e){return(typeof e==`string`?e:``+e).replace(Nd,`
10
- `).replace(Pd,``)}function Id(e,t){return t=Fd(t),Fd(e)===t}function Ld(e,t,n,r,i,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Kt(e,``+r);break;case`className`:At(e,`class`,r);break;case`tabIndex`:At(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:At(e,n,r);break;case`style`:Yt(e,r,o);break;case`data`:if(t!==`object`){At(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Ld(e,t,`name`,i.name,i,null),Ld(e,t,`formEncType`,i.formEncType,i,null),Ld(e,t,`formMethod`,i.formMethod,i,null),Ld(e,t,`formTarget`,i.formTarget,i,null)):(Ld(e,t,`encType`,i.encType,i,null),Ld(e,t,`method`,i.method,i,null),Ld(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=$t(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=en);break;case`onScroll`:r!=null&&J(`scroll`,e);break;case`onScrollEnd`:r!=null&&J(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=$t(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:J(`beforetoggle`,e),J(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:jt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:jt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Zt.get(n)||n,kt(e,n,r))}}function Rd(e,t,n,r,i,o){switch(n){case`style`:Yt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(a(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(a(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Kt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Kt(e,``+r);break;case`onScroll`:r!=null&&J(`scroll`,e);break;case`onScrollEnd`:r!=null&&J(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=en);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!St.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),o=e[ct]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,i),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):kt(e,n,r)}}}function zd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:J(`error`,e),J(`load`,e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Ld(e,t,o,s,n,null)}}i&&Ld(e,t,`srcSet`,n.srcSet,n,null),r&&Ld(e,t,`src`,n.src,n,null);return;case`input`:J(`invalid`,e);var c=o=s=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(a(137,t));break;default:Ld(e,t,r,d,n,null)}}Vt(e,o,c,l,u,s,i,!1);return;case`select`:for(i in J(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Ld(e,t,i,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ut(e,!!r,n,!0):Ut(e,!!r,t,!1);return;case`textarea`:for(s in J(`invalid`,e),o=i=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(a(91));break;default:Ld(e,t,s,c,n,null)}Gt(e,r,i,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Ld(e,t,l,r,n,null)}return;case`dialog`:J(`beforetoggle`,e),J(`toggle`,e),J(`cancel`,e),J(`close`,e);break;case`iframe`:case`object`:J(`load`,e);break;case`video`:case`audio`:for(r=0;r<xd.length;r++)J(xd[r],e);break;case`image`:J(`error`,e),J(`load`,e);break;case`details`:J(`toggle`,e);break;case`embed`:case`source`:case`link`:J(`error`,e),J(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(a(137,t));default:Ld(e,t,u,r,n,null)}return;default:if(Xt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Rd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Ld(e,t,c,r,n,null))}function Bd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Ld(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(a(137,t));break;default:m!==f&&Ld(e,t,p,m,r,f)}}Bt(e,s,c,l,u,d,o,i);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Ld(e,t,o,null,r,l)}for(i in r)if(o=r[i],l=n[i],r.hasOwnProperty(i)&&(o!=null||l!=null))switch(i){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Ld(e,t,i,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ut(e,!!n,n?[]:``,!1):Ut(e,!!n,t,!0)):Ut(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Ld(e,t,c,null,r,i)}for(s in r)if(i=r[s],o=n[s],r.hasOwnProperty(s)&&(i!=null||o!=null))switch(s){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(a(91));break;default:i!==o&&Ld(e,t,s,i,r,o)}Wt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Ld(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Ld(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Ld(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(a(137,t));break;default:Ld(e,t,u,p,r,m)}return;default:if(Xt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Rd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Rd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Ld(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Ld(e,t,f,p,r,m)}function Vd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Hd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Vd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Vd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Ud=null,Wd=null;function Gd(e){return e.nodeType===9?e:e.ownerDocument}function Kd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function qd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Jd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yd=null;function Xd(){var e=window.event;return e&&e.type===`popstate`?e===Yd?!1:(Yd=e,!0):(Yd=null,!1)}var Zd=typeof setTimeout==`function`?setTimeout:void 0,Qd=typeof clearTimeout==`function`?clearTimeout:void 0,$d=typeof Promise==`function`?Promise:void 0,ef=typeof queueMicrotask==`function`?queueMicrotask:$d===void 0?Zd:function(e){return $d.resolve(null).then(e).catch(tf)};function tf(e){setTimeout(function(){throw e})}function nf(e){return e===`head`}function rf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Rp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vf(e.ownerDocument.body);n=i}while(n);Rp(t)}function af(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function of(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:of(n),ht(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function sf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=pf(e.nextSibling),e===null)break}return null}function cf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=pf(e.nextSibling),e===null))return null;return e}function lf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=pf(e.nextSibling),e===null))return null;return e}function uf(e){return e.data===`$?`||e.data===`$~`}function df(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function ff(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function pf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var mf=null;function hf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return pf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function gf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function _f(e,t,n){switch(t=Gd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(a(452));return e;case`head`:if(e=t.head,!e)throw Error(a(453));return e;case`body`:if(e=t.body,!e)throw Error(a(454));return e;default:throw Error(a(451))}}function vf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ht(e)}var yf=new Map,bf=new Set;function xf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Sf=F.d;F.d={f:Cf,r:wf,D:Df,C:Of,L:kf,m:Af,X:Mf,S:jf,M:Nf};function Cf(){var e=Sf.f(),t=Cu();return e||t}function wf(e){var t=_t(e);t!==null&&t.tag===5&&t.type===`form`?Ds(t):Sf.r(e)}var Tf=typeof document>`u`?null:document;function Ef(e,t,n){var r=Tf;if(r&&typeof t==`string`&&t){var i=zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bf.has(i)||(bf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),zd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Df(e){Sf.D(e),Ef(`dns-prefetch`,e,null)}function Of(e,t){Sf.C(e,t),Ef(`preconnect`,e,t)}function kf(e,t,n){Sf.L(e,t,n);var r=Tf;if(r&&e&&t){var i=`link[rel="preload"][as="`+zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+zt(n.imageSizes)+`"]`)):i+=`[href="`+zt(e)+`"]`;var a=i;switch(t){case`style`:a=Ff(e);break;case`script`:a=zf(e)}yf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),yf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(If(a))||t===`script`&&r.querySelector(Bf(a))||(t=r.createElement(`link`),zd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Af(e,t){Sf.m(e,t);var n=Tf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+zt(r)+`"][href="`+zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zf(e)}if(!yf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),yf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bf(a)))return}r=n.createElement(`link`),zd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function jf(e,t,n){Sf.S(e,t,n);var r=Tf;if(r&&e){var i=yt(r).hoistableStyles,a=Ff(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(If(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=yf.get(a))&&Uf(e,n);var c=o=r.createElement(`link`);bt(c),zd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Hf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mf(e,t){Sf.X(e,t);var n=Tf;if(n&&e){var r=yt(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=h({src:e,async:!0},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),bt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t){Sf.M(e,t);var n=Tf;if(n&&e){var r=yt(n).hoistableScripts,i=zf(e),a=r.get(i);a||(a=n.querySelector(Bf(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=yf.get(i))&&Wf(e,t),a=n.createElement(`script`),bt(a),zd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pf(e,t,n,r){var i=(i=ce.current)?xf(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Ff(n.href),n=yt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Ff(n.href);var o=yt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(If(e)))&&!o._p&&(s.instance=o,s.state.loading=5),yf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},yf.set(e,n),o||Rf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=zf(n),n=yt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function Ff(e){return`href="`+zt(e)+`"`}function If(e){return`link[rel="stylesheet"][`+e+`]`}function Lf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Rf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),zd(t,`link`,n),bt(t),e.head.appendChild(t))}function zf(e){return`[src="`+zt(e)+`"]`}function Bf(e){return`script[async]`+e}function Vf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+zt(n.href)+`"]`);if(r)return t.instance=r,bt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),bt(r),zd(r,`style`,i),Hf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Ff(n.href);var o=e.querySelector(If(i));if(o)return t.state.loading|=4,t.instance=o,bt(o),o;r=Lf(n),(i=yf.get(i))&&Uf(r,i),o=(e.ownerDocument||e).createElement(`link`),bt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),zd(o,`link`,r),t.state.loading|=4,Hf(o,n.precedence,e),t.instance=o;case`script`:return o=zf(n.src),(i=e.querySelector(Bf(o)))?(t.instance=i,bt(i),i):(r=n,(i=yf.get(o))&&(r=h({},n),Wf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),bt(i),zd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Hf(r,n.precedence,e));return t.instance}function Hf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Uf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gf=null;function Kf(e,t,n){if(Gf===null){var r=new Map,i=Gf=new Map;i.set(n,r)}else i=Gf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[mt]||a[st]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function qf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Jf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Yf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Ff(r.href),a=t.querySelector(If(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=$f.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Lf(r),(i=yf.get(i))&&Uf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),zd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=$f.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Zf=0;function Qf(e,t){return e.stylesheets&&e.count===0&&tp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&tp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Zf===0&&(Zf=62500*Hd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&tp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Zf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function $f(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ep=null;function tp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ep=new Map,t.forEach(np,e),ep=null,$f.call(e))}function np(e,t){if(!(t.state.loading&4)){var n=ep.get(e);if(n)var r=n.get(null);else{n=new Map,ep.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=$f.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var rp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function ip(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ap(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ip(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=li(3,null,null,t),e.current=a,a.stateNode=e,t=la(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ha(a),e}function op(e){return e?(e=si,e):si}function sp(e,t,n,r,i,a){i=op(i),r.context===null?r.context=i:r.pendingContext=i,r=Wa(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ga(e,r,t),n!==null&&(vu(n,e,t),Ka(n,e,t))}function cp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lp(e,t){cp(e,t),(e=e.alternate)&&cp(e,t)}function up(e){if(e.tag===13||e.tag===31){var t=ii(e,67108864);t!==null&&vu(t,e,67108864),lp(e,67108864)}}function dp(e){if(e.tag===13||e.tag===31){var t=gu();t=nt(t);var n=ii(e,t);n!==null&&vu(n,e,t),lp(e,t)}}var fp=!0;function pp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,hp(e,t,n,r)}finally{F.p=a,P.T=i}}function mp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,hp(e,t,n,r)}finally{F.p=a,P.T=i}}function hp(e,t,n,r){if(fp){var i=gp(r);if(i===null)Od(e,t,r,_p,n),Op(e,r);else if(Ap(i,e,t,n,r))r.stopPropagation();else if(Op(e,r),t&4&&-1<Dp.indexOf(e)){for(;i!==null;){var a=_t(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}sd(a),!(zl&6)&&(iu=Ee()+500,cd(0,!1))}}break;case 31:case 13:s=ii(a,2),s!==null&&vu(s,a,2),Cu(),lp(a,2)}if(a=gp(r),a===null&&Od(e,t,r,_p,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Od(e,t,r,null,n)}}function gp(e){return e=nn(e),vp(e)}var _p=null;function vp(e){if(_p=null,e=gt(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _p=e,null}function yp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(De()){case Oe:return 2;case ke:return 8;case Ae:case je:return 32;case Me:return 268435456;default:return 32}default:return 32}}var bp=!1,xp=null,Sp=null,Cp=null,wp=new Map,Tp=new Map,Ep=[],Dp=`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 Op(e,t){switch(e){case`focusin`:case`focusout`:xp=null;break;case`dragenter`:case`dragleave`:Sp=null;break;case`mouseover`:case`mouseout`:Cp=null;break;case`pointerover`:case`pointerout`:wp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Tp.delete(t.pointerId)}}function kp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=_t(t),t!==null&&up(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ap(e,t,n,r,i){switch(t){case`focusin`:return xp=kp(xp,e,t,n,r,i),!0;case`dragenter`:return Sp=kp(Sp,e,t,n,r,i),!0;case`mouseover`:return Cp=kp(Cp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return wp.set(a,kp(wp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Tp.set(a,kp(Tp.get(a)||null,e,t,n,r,i)),!0}return!1}function jp(e){var t=gt(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,at(e.priority,function(){dp(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,at(e.priority,function(){dp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=gp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);tn=r,n.target.dispatchEvent(r),tn=null}else return t=_t(n),t!==null&&up(t),e.blockedOn=n,!1;t.shift()}return!0}function Np(e,t,n){Mp(e)&&n.delete(t)}function Pp(){bp=!1,xp!==null&&Mp(xp)&&(xp=null),Sp!==null&&Mp(Sp)&&(Sp=null),Cp!==null&&Mp(Cp)&&(Cp=null),wp.forEach(Np),Tp.forEach(Np)}function Fp(e,n){e.blockedOn===n&&(e.blockedOn=null,bp||(bp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Pp)))}var Ip=null;function Lp(e){Ip!==e&&(Ip=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ip===e&&(Ip=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(vp(r||n)===null)continue;break}var a=_t(n);a!==null&&(e.splice(t,3),t-=3,Es(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Rp(e){function t(t){return Fp(t,e)}xp!==null&&Fp(xp,e),Sp!==null&&Fp(Sp,e),Cp!==null&&Fp(Cp,e),wp.forEach(t),Tp.forEach(t);for(var n=0;n<Ep.length;n++){var r=Ep[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ep.length&&(n=Ep[0],n.blockedOn===null);)jp(n),n.blockedOn===null&&Ep.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ct]||null;if(typeof a==`function`)o||Lp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ct]||null)s=o.formAction;else if(vp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Lp(n)}}}function zp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Bp(e){this._internalRoot=e}Vp.prototype.render=Bp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(a(409));var n=t.current;sp(n,gu(),e,t,null,null)},Vp.prototype.unmount=Bp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sp(e.current,2,null,e,null,null),Cu(),t[lt]=null}};function Vp(e){this._internalRoot=e}Vp.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ep.length&&t!==0&&t<Ep[n].priority;n++);Ep.splice(n,0,e),n===0&&jp(e)}};var Hp=n.version;if(Hp!==`19.2.5`)throw Error(a(527,Hp,`19.2.5`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(a(188)):(e=Object.keys(e).join(`,`),Error(a(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Up={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Wp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wp.isDisabled&&Wp.supportsFiber)try{Fe=Wp.inject(Up),Ie=Wp}catch{}}e.createRoot=function(e,t){if(!s(e))throw Error(a(299));var n=!1,r=``,i=U,o=Js,c=W;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ap(e,1,!1,null,null,n,r,null,i,o,c,zp),e[lt]=t.current,Ed(e),new Bp(t)}})),u=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=l()})),d=t(i(),1),f=t(c(),1),p=u(),m=`modulepreload`,h=function(e){return`/`+e},g={},_=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=h(t,n),t in g)return;g[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:m,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},v=`popstate`;function y(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function b(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return T(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:E(t)}return O(t,n,null,e)}function x(e,t){if(e===!1||e==null)throw Error(t)}function S(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function C(){return Math.random().toString(36).substring(2,10)}function w(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function T(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?D(t):t,state:n,key:t&&t.key||r||C(),unstable_mask:i}}function E({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function D(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function O(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=y(e)?e:T(h.location,e,t);n&&n(r,e),l=u()+1;let d=w(r,l),f=h.createHref(r.unstable_mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=y(e)?e:T(h.location,e,t);n&&n(r,e),l=u();let i=w(r,l),d=h.createHref(r.unstable_mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ee(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(v,d),c=e,()=>{i.removeEventListener(v,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ee(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),x(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:E(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function k(e,t,n=`/`){return A(e,t,n,!1)}function A(e,t,n,r){let i=de((typeof t==`string`?D(t):t).pathname||`/`,n);if(i==null)return null;let a=M(e);N(a);let o=null;for(let e=0;o==null&&e<a.length;++e){let t=ue(i);o=se(a[e],t,r)}return o}function j(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function M(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;x(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=be([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(x(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),M(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:L(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of te(e.path))a(e,t,!0,n)}),t}function te(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=te(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function N(e){e.sort((e,t)=>e.score===t.score?oe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var P=/^:[\w-]+$/,F=3,ne=2,re=1,ie=10,ae=-2,I=e=>e===`*`;function L(e,t){let n=e.split(`/`),r=n.length;return n.some(I)&&(r+=ae),t&&(r+=ne),n.filter(e=>!I(e)).reduce((e,t)=>e+(P.test(t)?F:t===``?re:ie),r)}function oe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function se(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=ce({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=ce({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;Object.assign(i,u.params),o.push({params:i,pathname:be([a,u.pathname]),pathnameBase:Se(be([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=be([a,u.pathnameBase]))}return o}function ce(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=le(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function le(e,t=!1,n=!0){S(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ue(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return S(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function de(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var fe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function pe(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?D(e):e,a;return n?(n=ye(n),a=n.startsWith(`/`)?me(n.substring(1),`/`):me(n,t)):a=t,{pathname:a,search:Ce(r),hash:we(i)}}function me(e,t){let n=xe(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function he(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ge(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function _e(e){let t=ge(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function ve(e,t,n,r=!1){let i;typeof e==`string`?i=D(e):(i={...e},x(!i.pathname||!i.pathname.includes(`?`),he(`?`,`pathname`,`search`,i)),x(!i.pathname||!i.pathname.includes(`#`),he(`#`,`pathname`,`hash`,i)),x(!i.search||!i.search.includes(`#`),he(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=pe(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var ye=e=>e.replace(/\/\/+/g,`/`),be=e=>ye(e.join(`/`)),xe=e=>e.replace(/\/+$/,``),Se=e=>xe(e).replace(/^\/*/,`/`),Ce=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,we=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Te=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ee(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function De(e){return be(e.map(e=>e.route.path).filter(Boolean))||`/`}var Oe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ke(e,t){let n=e;if(typeof n!=`string`||!fe.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Oe)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=de(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{S(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ae=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ae);var je=[`GET`,...Ae];new Set(je);var Me=d.createContext(null);Me.displayName=`DataRouter`;var Ne=d.createContext(null);Ne.displayName=`DataRouterState`;var Pe=d.createContext(!1);function Fe(){return d.useContext(Pe)}var Ie=d.createContext({isTransitioning:!1});Ie.displayName=`ViewTransition`;var Le=d.createContext(new Map);Le.displayName=`Fetchers`;var Re=d.createContext(null);Re.displayName=`Await`;var ze=d.createContext(null);ze.displayName=`Navigation`;var Be=d.createContext(null);Be.displayName=`Location`;var Ve=d.createContext({outlet:null,matches:[],isDataRoute:!1});Ve.displayName=`Route`;var He=d.createContext(null);He.displayName=`RouteError`;var Ue=`REACT_ROUTER_ERROR`,We=`REDIRECT`,Ge=`ROUTE_ERROR_RESPONSE`;function Ke(e){if(e.startsWith(`${Ue}:${We}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function qe(e){if(e.startsWith(`${Ue}:${Ge}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Te(t.status,t.statusText,t.data)}catch{}}function Je(e,{relative:t}={}){x(Ye(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=d.useContext(ze),{hash:i,pathname:a,search:o}=tt(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:be([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Ye(){return d.useContext(Be)!=null}function Xe(){return x(Ye(),`useLocation() may be used only in the context of a <Router> component.`),d.useContext(Be).location}var Ze=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Qe(e){d.useContext(ze).static||d.useLayoutEffect(e)}function $e(){let{isDataRoute:e}=d.useContext(Ve);return e?bt():et()}function et(){x(Ye(),`useNavigate() may be used only in the context of a <Router> component.`);let e=d.useContext(Me),{basename:t,navigator:n}=d.useContext(ze),{matches:r}=d.useContext(Ve),{pathname:i}=Xe(),a=JSON.stringify(_e(r)),o=d.useRef(!1);return Qe(()=>{o.current=!0}),d.useCallback((r,s={})=>{if(S(o.current,Ze),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=ve(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:be([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}d.createContext(null);function tt(e,{relative:t}={}){let{matches:n}=d.useContext(Ve),{pathname:r}=Xe(),i=JSON.stringify(_e(n));return d.useMemo(()=>ve(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function nt(e,t){return rt(e,t)}function rt(e,t,n){x(Ye(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=d.useContext(ze),{matches:i}=d.useContext(Ve),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;St(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
11
-
12
- Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=Xe(),f;if(t){let e=typeof t==`string`?D(t):t;x(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=u;let p=f.pathname||`/`,m=p;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=k(e,{pathname:m});S(l||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),S(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=ut(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:be([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:be([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?d.createElement(Be.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,unstable_mask:void 0,...f},navigationType:`POP`}},g):g}function it(){let e=yt(),t=Ee(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=d.createElement(d.Fragment,null,d.createElement(`p`,null,`💿 Hey developer 👋`),d.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,d.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,d.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),d.createElement(d.Fragment,null,d.createElement(`h2`,null,`Unexpected Application Error!`),d.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?d.createElement(`pre`,{style:i},n):null,o)}var at=d.createElement(it,null),ot=class extends d.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=qe(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:d.createElement(Ve.Provider,{value:this.props.routeContext},d.createElement(He.Provider,{value:e,children:this.props.component}));return this.context?d.createElement(ct,{error:e},t):t}};ot.contextType=Pe;var st=new WeakMap;function ct({children:e,error:t}){let{basename:n}=d.useContext(ze);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ke(t.digest);if(e){let r=st.get(t);if(r)throw r;let i=ke(e.location,n);if(Oe&&!st.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw st.set(t,n),n}return d.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function lt({routeContext:e,match:t,children:n}){let r=d.useContext(Me);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),d.createElement(Ve.Provider,{value:e},n)}function ut(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);x(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:De(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,f=!1,p=null,m=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||at,o&&(s<0&&c===0?(St(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):s===c&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?p:f?m:n.route.Component?d.createElement(n.route.Component,null):n.route.element?n.route.element:e,d.createElement(lt,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?d.createElement(ot,{location:r.location,revalidation:r.revalidation,component:p,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function dt(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ft(e){let t=d.useContext(Me);return x(t,dt(e)),t}function pt(e){let t=d.useContext(Ne);return x(t,dt(e)),t}function mt(e){let t=d.useContext(Ve);return x(t,dt(e)),t}function ht(e){let t=mt(e),n=t.matches[t.matches.length-1];return x(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function gt(){return ht(`useRouteId`)}function _t(){return pt(`useNavigation`).navigation}function vt(){let{matches:e,loaderData:t}=pt(`useMatches`);return d.useMemo(()=>e.map(e=>j(e,t)),[e,t])}function yt(){let e=d.useContext(He),t=pt(`useRouteError`),n=ht(`useRouteError`);return e===void 0?t.errors?.[n]:e}function bt(){let{router:e}=ft(`useNavigate`),t=ht(`useNavigate`),n=d.useRef(!1);return Qe(()=>{n.current=!0}),d.useCallback(async(r,i={})=>{S(n.current,Ze),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var xt={};function St(e,t,n){!t&&!xt[e]&&(xt[e]=!0,S(!1,n))}d.useOptimistic,d.memo(Ct);function Ct({routes:e,future:t,state:n,isStatic:r,onError:i}){return rt(e,void 0,{state:n,isStatic:r,onError:i,future:t})}function wt({to:e,replace:t,state:n,relative:r}){x(Ye(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=d.useContext(ze);S(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=d.useContext(Ve),{pathname:o}=Xe(),s=$e(),c=ve(e,_e(a),o,r===`path`),l=JSON.stringify(c);return d.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Tt(e){x(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Et({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,unstable_useTransitions:o}){x(!Ye(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=d.useMemo(()=>({basename:s,navigator:i,static:a,unstable_useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=D(n));let{pathname:l=`/`,search:u=``,hash:f=``,state:p=null,key:m=`default`,unstable_mask:h}=n,g=d.useMemo(()=>{let e=de(l,s);return e==null?null:{location:{pathname:e,search:u,hash:f,state:p,key:m,unstable_mask:h},navigationType:r}},[s,l,u,f,p,m,r,h]);return S(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:d.createElement(ze.Provider,{value:c},d.createElement(Be.Provider,{children:t,value:g}))}function Dt({children:e,location:t}){return nt(Ot(e),t)}d.Component;function Ot(e,t=[]){let n=[];return d.Children.forEach(e,(e,r)=>{if(!d.isValidElement(e))return;let i=[...t,r];if(e.type===d.Fragment){n.push.apply(n,Ot(e.props.children,i));return}x(e.type===Tt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),x(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Ot(e.props.children,i)),n.push(a)}),n}var kt=`get`,At=`application/x-www-form-urlencoded`;function jt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Mt(e){return jt(e)&&e.tagName.toLowerCase()===`button`}function Nt(e){return jt(e)&&e.tagName.toLowerCase()===`form`}function Pt(e){return jt(e)&&e.tagName.toLowerCase()===`input`}function Ft(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function It(e,t){return e.button===0&&(!t||t===`_self`)&&!Ft(e)}var Lt=null;function Rt(){if(Lt===null)try{new FormData(document.createElement(`form`),0),Lt=!1}catch{Lt=!0}return Lt}var zt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Bt(e){return e!=null&&!zt.has(e)?(S(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${At}"`),null):e}function Vt(e,t){let n,r,i,a,o;if(Nt(e)){let o=e.getAttribute(`action`);r=o?de(o,t):null,n=e.getAttribute(`method`)||kt,i=Bt(e.getAttribute(`enctype`))||At,a=new FormData(e)}else if(Mt(e)||Pt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?de(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||kt,i=Bt(e.getAttribute(`formenctype`))||Bt(o.getAttribute(`enctype`))||At,a=new FormData(o,e),!Rt()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(jt(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=kt,r=null,i=At,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ht={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Ut=/[&><\u2028\u2029]/g;function Wt(e){return e.replace(Ut,e=>Ht[e])}function Gt(e,t){if(e===!1||e==null)throw Error(t)}function Kt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&de(i.pathname,t)===`/`?i.pathname=`${xe(t)}/_root.${r}`:i.pathname=`${xe(i.pathname)}.${r}`,i}async function qt(e,t){if(e.id in t)return t[e.id];try{let n=await _(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Jt(e){return e!=null&&typeof e.page==`string`}function Yt(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Xt(e,t,n){return tn((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await qt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Yt).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Zt(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Qt(e,t,{includeHydrateFallback:n}={}){return $t(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function $t(e){return[...new Set(e)]}function en(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function tn(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Jt(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(en(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function nn(){let e=d.useContext(Me);return Gt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function rn(){let e=d.useContext(Ne);return Gt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var an=d.createContext(void 0);an.displayName=`FrameworkContext`;function on(){let e=d.useContext(an);return Gt(e,`You must render this element inside a <HydratedRouter> element`),e}function sn(e,t){let n=d.useContext(an),[r,i]=d.useState(!1),[a,o]=d.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:f}=t,p=d.useRef(null);d.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),d.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:cn(s,m),onBlur:cn(c,h),onMouseEnter:cn(l,m),onMouseLeave:cn(u,h),onTouchStart:cn(f,m)}]:[a,p,{}]:[!1,p,{}]}function cn(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ln({page:e,...t}){let n=Fe(),{router:r}=nn(),i=d.useMemo(()=>k(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?n?d.createElement(dn,{page:e,matches:i,...t}):d.createElement(fn,{page:e,matches:i,...t}):null}function un(e){let{manifest:t,routeModules:n}=on(),[r,i]=d.useState([]);return d.useEffect(()=>{let r=!1;return Xt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function dn({page:e,matches:t,...n}){let r=Xe(),{future:i}=on(),{basename:a}=nn(),o=d.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Kt(e,a,i.unstable_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.unstable_trailingSlashAwareDataRequests,e,r,t]);return d.createElement(d.Fragment,null,o.map(e=>d.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function fn({page:e,matches:t,...n}){let r=Xe(),{future:i,manifest:a,routeModules:o}=on(),{basename:s}=nn(),{loaderData:c,matches:l}=rn(),u=d.useMemo(()=>Zt(e,t,l,a,r,`data`),[e,t,l,a,r]),f=d.useMemo(()=>Zt(e,t,l,a,r,`assets`),[e,t,l,a,r]),p=d.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Kt(e,s,i.unstable_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.unstable_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),m=d.useMemo(()=>Qt(f,a),[f,a]),h=un(f);return d.createElement(d.Fragment,null,p.map(e=>d.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>d.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>d.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function pn(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}d.Component;var mn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{mn&&(window.__reactRouterVersion=`7.14.2`)}catch{}function hn({basename:e,children:t,unstable_useTransitions:n,window:r}){let i=d.useRef();i.current??=b({window:r,v5Compat:!0});let a=i.current,[o,s]=d.useState({action:a.action,location:a.location}),c=d.useCallback(e=>{n===!1?s(e):d.startTransition(()=>s(e))},[n]);return d.useLayoutEffect(()=>a.listen(c),[a,c]),d.createElement(Et,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,unstable_useTransitions:n})}function gn({basename:e,children:t,history:n,unstable_useTransitions:r}){let[i,a]=d.useState({action:n.action,location:n.location}),o=d.useCallback(e=>{r===!1?a(e):d.startTransition(()=>a(e))},[r]);return d.useLayoutEffect(()=>n.listen(o),[n,o]),d.createElement(Et,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,unstable_useTransitions:r})}gn.displayName=`unstable_HistoryRouter`;var _n=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vn=d.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,unstable_mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,unstable_useTransitions:v}=d.useContext(ze),y=typeof l==`string`&&_n.test(l),b=ke(l,g);l=b.to;let x=Je(l,{relative:r}),S=Xe(),C=null;if(o){let e=ve(o,[],S.unstable_mask?S.unstable_mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:be([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=sn(n,m),D=Tn(l,{replace:a,unstable_mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:f,unstable_defaultShouldRevalidate:p,unstable_useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let ee=!(b.isExternal||i),k=d.createElement(`a`,{...m,...E,href:(ee?C:void 0)||b.absoluteURL||x,onClick:ee?O:e,ref:pn(h,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?d.createElement(d.Fragment,null,k,d.createElement(ln,{page:x})):k});vn.displayName=`Link`;var yn=d.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=tt(a,{relative:c.relative}),f=Xe(),p=d.useContext(Ne),{navigator:m,basename:h}=d.useContext(ze),g=p!=null&&Fn(u)&&o===!0,_=m.encodeLocation?m.encodeLocation(u).pathname:u.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=de(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return d.createElement(vn,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});yn.displayName=`NavLink`;var bn=d.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=kt,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:p,...m},h)=>{let{unstable_useTransitions:g}=d.useContext(ze),_=On(),v=kn(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&_n.test(s);return d.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:f,unstable_defaultShouldRevalidate:p});g&&n!==!1?d.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});bn.displayName=`Form`;function xn({getKey:e,storageKey:t,...n}){let r=d.useContext(an),{basename:i}=d.useContext(ze),a=Xe(),o=vt();Nn({getKey:e,storageKey:t});let s=d.useMemo(()=>{if(!r||!e)return null;let t=Mn(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return d.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${Wt(JSON.stringify(t||An))}, ${Wt(JSON.stringify(s))})`}})}xn.displayName=`ScrollRestoration`;function Sn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cn(e){let t=d.useContext(Me);return x(t,Sn(e)),t}function wn(e){let t=d.useContext(Ne);return x(t,Sn(e)),t}function Tn(e,{target:t,replace:n,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c,unstable_useTransitions:l}={}){let u=$e(),f=Xe(),p=tt(e,{relative:o});return d.useCallback(m=>{if(It(m,t)){m.preventDefault();let t=n===void 0?E(f)===E(p):n,h=()=>u(e,{replace:t,unstable_mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,unstable_defaultShouldRevalidate:c});l?d.startTransition(()=>h()):h()}},[f,u,p,n,r,i,t,e,a,o,s,c,l])}var En=0,Dn=()=>`__${String(++En)}__`;function On(){let{router:e}=Cn(`useSubmit`),{basename:t}=d.useContext(ze),n=gt(),r=e.fetch,i=e.navigate;return d.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Vt(e,t);a.navigate===!1?await r(a.fetcherKey||Dn(),n,a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{unstable_defaultShouldRevalidate:a.unstable_defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function kn(e,{relative:t}={}){let{basename:n}=d.useContext(ze),r=d.useContext(Ve);x(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...tt(e||`.`,{relative:t})},o=Xe();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:be([n,a.pathname])),E(a)}var An=`react-router-scroll-positions`,jn={};function Mn(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:de(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Nn({getKey:e,storageKey:t}={}){let{router:n}=Cn(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=wn(`useScrollRestoration`),{basename:a}=d.useContext(ze),o=Xe(),s=vt(),c=_t();d.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Pn(d.useCallback(()=>{if(c.state===`idle`){let t=Mn(o,s,a,e);jn[t]=window.scrollY}try{sessionStorage.setItem(t||An,JSON.stringify(jn))}catch(e){S(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(d.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||An);e&&(jn=JSON.parse(e))}catch{}},[t]),d.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(jn,()=>window.scrollY,e?(t,n)=>Mn(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),d.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{S(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Pn(e,t){let{capture:n}=t||{};d.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Fn(e,{relative:t}={}){let n=d.useContext(Ie);x(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Cn(`useViewTransitionState`),i=tt(e,{relative:t});if(!n.isTransitioning)return!1;let a=de(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=de(n.nextLocation.pathname,r)||n.nextLocation.pathname;return ce(i.pathname,o)!=null||ce(i.pathname,a)!=null}var In=Object.create,Ln=Object.defineProperty,Rn=Object.getOwnPropertyDescriptor,zn=Object.getOwnPropertyNames,Bn=Object.getPrototypeOf,Vn=Object.prototype.hasOwnProperty,Hn=(e,t)=>function(){return t||(0,e[zn(e)[0]])((t={exports:{}}).exports,t),t.exports},Un=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=zn(t),a=0,o=i.length,s;a<o;a++)s=i[a],!Vn.call(e,s)&&s!==n&&Ln(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=Rn(t,s))||r.enumerable});return e},Wn=(e,t,n)=>(n=e==null?{}:In(Bn(e)),Un(t||!e||!e.__esModule?Ln(n,`default`,{value:e,enumerable:!0}):n,e)),Gn=Hn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),Kn=Hn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=Gn().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),qn=Hn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=Gn().default,r=Kn();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),Jn=Hn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=qn();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Yn=Hn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=Jn();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});function Xn(e){let t={subscribe(t){let n=null,r=!1,i=!1,a=!1;function o(){if(n===null){a=!0;return}i||(i=!0,typeof n==`function`?n():n&&n.unsubscribe())}return n=e({next(e){var n;r||(n=t.next)==null||n.call(t,e)},error(e){var n;r||(r=!0,(n=t.error)==null||n.call(t,e),o())},complete(){var e;r||(r=!0,(e=t.complete)==null||e.call(t),o())}}),a&&o(),{unsubscribe:o}},pipe(...e){return e.reduce(Zn,t)}};return t}function Zn(e,t){return t(e)}function Qn(e){let t=new AbortController;return new Promise((n,r)=>{let i=!1;function a(){i||(i=!0,o.unsubscribe())}t.signal.addEventListener(`abort`,()=>{r(t.signal.reason)});let o=e.subscribe({next(e){i=!0,n(e),a()},error(e){r(e)},complete(){t.abort(),a()}})})}function $n(e){return e=>{let t=0,n=null,r=[];function i(){n||=e.subscribe({next(e){for(let n of r){var t;(t=n.next)==null||t.call(n,e)}},error(e){for(let n of r){var t;(t=n.error)==null||t.call(n,e)}},complete(){for(let t of r){var e;(e=t.complete)==null||e.call(t)}}})}function a(){if(t===0&&n){let e=n;n=null,e.unsubscribe()}}return Xn(e=>(t++,r.push(e),i(),{unsubscribe(){t--,a();let n=r.findIndex(t=>t===e);n>-1&&r.splice(n,1)}}))}}function er(e){let t=e,n=[],r=e=>{t!==void 0&&e.next(t),n.push(e)},i=e=>{n.splice(n.indexOf(e),1)},a=Xn(e=>(r(e),()=>{i(e)}));return a.next=e=>{if(t!==e){t=e;for(let t of n)t.next(e)}},a.get=()=>t,a}function tr(e){return Xn(t=>{function n(t=0,r=e.op){let i=e.links[t];if(!i)throw Error(`No more links to execute - did you forget to add an ending link?`);return i({op:r,next(e){return n(t+1,e)}})}return n().subscribe(t)})}function nr(e){return!!e&&!Array.isArray(e)&&typeof e==`object`}function rr(){return Object.create(null)}var ir={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,NOT_IMPLEMENTED:-32603,BAD_GATEWAY:-32603,SERVICE_UNAVAILABLE:-32603,GATEWAY_TIMEOUT:-32603,UNAUTHORIZED:-32001,PAYMENT_REQUIRED:-32002,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNSUPPORTED_MEDIA_TYPE:-32015,UNPROCESSABLE_CONTENT:-32022,PRECONDITION_REQUIRED:-32028,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};ir.BAD_GATEWAY,ir.SERVICE_UNAVAILABLE,ir.GATEWAY_TIMEOUT,ir.INTERNAL_SERVER_ERROR;var ar=Object.create,or=Object.defineProperty,sr=Object.getOwnPropertyDescriptor,cr=Object.getOwnPropertyNames,lr=Object.getPrototypeOf,ur=Object.prototype.hasOwnProperty,dr=(e,t)=>function(){return t||(0,e[cr(e)[0]])((t={exports:{}}).exports,t),t.exports},fr=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=cr(t),a=0,o=i.length,s;a<o;a++)s=i[a],!ur.call(e,s)&&s!==n&&or(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=sr(t,s))||r.enumerable});return e},pr=(e,t,n)=>(n=e==null?{}:ar(lr(e)),fr(t||!e||!e.__esModule?or(n,`default`,{value:e,enumerable:!0}):n,e)),mr=()=>{},hr=e=>{Object.freeze&&Object.freeze(e)};function gr(e,t,n){let r=t.join(`.`);return n[r]??(n[r]=new Proxy(mr,{get(r,i){if(!(typeof i!=`string`||i===`then`))return gr(e,[...t,i],n)},apply(n,r,i){let a=t[t.length-1],o={args:i,path:t};return a===`call`?o={args:i.length>=2?[i[1]]:[],path:t.slice(0,-1)}:a===`apply`&&(o={args:i.length>=2?i[1]:[],path:t.slice(0,-1)}),hr(o.args),hr(o.path),e(o)}})),n[r]}var _r=e=>gr(e,[],rr()),vr=e=>new Proxy(mr,{get(t,n){if(n!==`then`)return e(n)}}),yr=dr({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(e,t){function n(e){"@babel/helpers - typeof";return t.exports=n=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),br=dr({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(e,t){var n=yr().default;function r(e,t){if(n(e)!=`object`||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var i=r.call(e,t||`default`);if(n(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),xr=dr({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(e,t){var n=yr().default,r=br();function i(e){var t=r(e,`string`);return n(t)==`symbol`?t:t+``}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}}),Sr=dr({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(e,t){var n=xr();function r(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),Cr=dr({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(e,t){var n=Sr();function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]==null?{}:arguments[t];t%2?r(Object(i),!0).forEach(function(t){n(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports}});pr(Cr(),1),pr(Sr(),1);var wr=pr(Cr(),1);function Tr(e,t){if(`error`in e){let n=t.deserialize(e.error);return{ok:!1,error:(0,wr.default)((0,wr.default)({},e),{},{error:n})}}return{ok:!0,result:(0,wr.default)((0,wr.default)({},e.result),(!e.result.type||e.result.type===`data`)&&{type:`data`,data:t.deserialize(e.result.data)})}}var Er=class extends Error{constructor(){super(`Unable to transform response from server`)}};function Dr(e,t){let n;try{n=Tr(e,t)}catch{throw new Er}if(!n.ok&&(!nr(n.error.error)||typeof n.error.error.code!=`number`)||n.ok&&!nr(n.result))throw new Er;return n}pr(Cr(),1);var Or=Wn(Jn(),1),kr=Wn(Yn(),1);function Ar(e){return e instanceof Nr}function jr(e){return nr(e)&&nr(e.error)&&typeof e.error.code==`number`&&typeof e.error.message==`string`}function Mr(e,t){return typeof e==`string`?e:nr(e)&&typeof e.message==`string`?e.message:t}var Nr=class e extends Error{constructor(t,n){var r,i;let a=n?.cause;super(t,{cause:a}),(0,Or.default)(this,`cause`,void 0),(0,Or.default)(this,`shape`,void 0),(0,Or.default)(this,`data`,void 0),(0,Or.default)(this,`meta`,void 0),this.meta=n?.meta,this.cause=a,this.shape=n==null||(r=n.result)==null?void 0:r.error,this.data=n==null||(i=n.result)==null?void 0:i.error.data,this.name=`TRPCClientError`,Object.setPrototypeOf(this,e.prototype)}static from(t,n={}){let r=t;return Ar(r)?(n.meta&&(r.meta=(0,kr.default)((0,kr.default)({},r.meta),n.meta)),r):jr(r)?new e(r.error.message,(0,kr.default)((0,kr.default)({},n),{},{result:r,cause:n.cause})):new e(Mr(r,`Unknown error`),(0,kr.default)((0,kr.default)({},n),{},{cause:r}))}};function Pr(e){let t=e;return t?`input`in t?t:{input:t,output:t}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}}var Fr=e=>typeof e==`function`;function Ir(e){if(e)return e;if(typeof window<`u`&&Fr(window.fetch))return window.fetch;if(typeof globalThis<`u`&&Fr(globalThis.fetch))return globalThis.fetch;throw Error(`No fetch implementation found`)}var Lr=Wn(Yn());function Rr(e){return{url:e.url.toString(),fetch:e.fetch,transformer:Pr(e.transformer),methodOverride:e.methodOverride}}function zr(e){let t={};for(let n=0;n<e.length;n++)t[n]=e[n];return t}var Br={query:`GET`,mutation:`POST`,subscription:`PATCH`};function Vr(e){return`input`in e?e.transformer.input.serialize(e.input):zr(e.inputs.map(t=>e.transformer.input.serialize(t)))}var Hr=e=>{let t=e.url.split(`?`),n=t[0].replace(/\/$/,``)+`/`+e.path,r=[];if(t[1]&&r.push(t[1]),`inputs`in e&&r.push(`batch=1`),e.type===`query`||e.type===`subscription`){let t=Vr(e);t!==void 0&&e.methodOverride!==`POST`&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(n+=`?`+r.join(`&`)),n},Ur=e=>{if(e.type===`query`&&e.methodOverride!==`POST`)return;let t=Vr(e);return t===void 0?void 0:JSON.stringify(t)},Wr=e=>Jr((0,Lr.default)((0,Lr.default)({},e),{},{contentTypeHeader:`application/json`,getUrl:Hr,getBody:Ur})),Gr=class extends Error{constructor(){let e=`AbortError`;super(e),this.name=e,this.message=e}},Kr=e=>{var t;if(e?.aborted)throw(t=e.throwIfAborted)==null||t.call(e),typeof DOMException<`u`?new DOMException(`AbortError`,`AbortError`):new Gr};async function qr(e){Kr(e.signal);let t=e.getUrl(e),n=e.getBody(e),r=e.methodOverride??Br[e.type],i=await(async()=>{let t=await e.headers();return Symbol.iterator in t?Object.fromEntries(t):t})(),a=(0,Lr.default)((0,Lr.default)((0,Lr.default)({},e.contentTypeHeader&&r!==`GET`?{"content-type":e.contentTypeHeader}:{}),e.trpcAcceptHeader?{[e.trpcAcceptHeaderKey??`trpc-accept`]:e.trpcAcceptHeader}:void 0),i);return Ir(e.fetch)(t,{method:r,signal:e.signal,body:n,headers:a})}async function Jr(e){let t={},n=await qr(e);t.response=n;let r=await n.json();return t.responseJSON=r,{json:r,meta:t}}Wn(Yn(),1);var Yr=()=>{throw Error(`Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new`)};function Xr(e){let t=null,n=null,r=()=>{clearTimeout(n),n=null,t=null};function i(t){let n=[[]],r=0;for(;;){let o=t[r];if(!o)break;let s=n[n.length-1];if(o.aborted){var i;(i=o.reject)==null||i.call(o,Error(`Aborted`)),r++;continue}if(e.validate(s.concat(o).map(e=>e.key))){s.push(o),r++;continue}if(s.length===0){var a;(a=o.reject)==null||a.call(o,Error(`Input is too big for a single dispatch`)),r++;continue}n.push([])}return n}function a(){let n=i(t);r();for(let t of n){if(!t.length)continue;let n={items:t};for(let e of t)e.batch=n;e.fetch(n.items.map(e=>e.key)).then(async e=>{await Promise.all(e.map(async(e,t)=>{let r=n.items[t];try{var i;let t=await Promise.resolve(e);(i=r.resolve)==null||i.call(r,t)}catch(e){var a;(a=r.reject)==null||a.call(r,e)}r.batch=null,r.reject=null,r.resolve=null}));for(let e of n.items){var t;(t=e.reject)==null||t.call(e,Error(`Missing result`)),e.batch=null}}).catch(e=>{for(let r of n.items){var t;(t=r.reject)==null||t.call(r,e),r.batch=null}})}}function o(e){let r={aborted:!1,key:e,batch:null,resolve:Yr,reject:Yr},i=new Promise((e,n)=>{r.reject=n,r.resolve=e,t??=[],t.push(r)});return n??=setTimeout(a),i}return{load:o}}function Zr(...e){let t=new AbortController,n=e.length,r=0,i=()=>{++r===n&&t.abort()};for(let t of e)t?.aborted?i():t?.addEventListener(`abort`,i,{once:!0});return t.signal}var Qr=Wn(Yn(),1);function $r(e){let t=Rr(e),n=e.maxURLLength??1/0,r=e.maxItems??1/0;return()=>{let i=i=>({validate(e){if(n===1/0&&r===1/0)return!0;if(e.length>r)return!1;let a=e.map(e=>e.path).join(`,`),o=e.map(e=>e.input);return Hr((0,Qr.default)((0,Qr.default)({},t),{},{type:i,path:a,inputs:o,signal:null})).length<=n},async fetch(n){let r=n.map(e=>e.path).join(`,`),a=n.map(e=>e.input),o=Zr(...n.map(e=>e.signal)),s=await Wr((0,Qr.default)((0,Qr.default)({},t),{},{path:r,inputs:a,type:i,headers(){return e.headers?typeof e.headers==`function`?e.headers({opList:n}):e.headers:{}},signal:o}));return(Array.isArray(s.json)?s.json:n.map(()=>s.json)).map(e=>({meta:s.meta,json:e}))}}),a={query:Xr(i(`query`)),mutation:Xr(i(`mutation`))};return({op:e})=>Xn(n=>{if(e.type===`subscription`)throw Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");let r=a[e.type].load(e),i;return r.then(e=>{i=e;let r=Dr(e.json,t.transformer.output);if(!r.ok){n.error(Nr.from(r.error,{meta:e.meta}));return}n.next({context:e.meta,result:r.result}),n.complete()}).catch(e=>{n.error(Nr.from(e,{meta:i?.meta}))}),()=>{}})}}Wn(Yn(),1);var ei=(e,...t)=>typeof e==`function`?e(...t):e;Wn(Jn(),1);function ti(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}async function ni(e){let t=await ei(e.url);return e.connectionParams?t+`${t.includes(`?`)?`&`:`?`}connectionParams=1`:t}async function ri(e,t){let n={method:`connectionParams`,data:await ei(e)};return t.encode(n)}Wn(Jn(),1);var ii=Wn(Jn(),1);function ai(e){let{promise:t,resolve:n,reject:r}=ti();return e.addEventListener(`open`,()=>{e.removeEventListener(`error`,r),n()}),e.addEventListener(`error`,r),t}function oi(e,{intervalMs:t,pongTimeoutMs:n}){let r,i;function a(){r=setTimeout(()=>{e.send(`PING`),i=setTimeout(()=>{e.close()},n)},t)}function o(){clearTimeout(r),a()}function s(){clearTimeout(i),o()}e.addEventListener(`open`,a),e.addEventListener(`message`,({data:e})=>{clearTimeout(r),a(),e===`PONG`&&s()}),e.addEventListener(`close`,()=>{clearTimeout(r),clearTimeout(i)})}var si=class e{constructor(t){if((0,ii.default)(this,`id`,++e.connectCount),(0,ii.default)(this,`WebSocketPonyfill`,void 0),(0,ii.default)(this,`urlOptions`,void 0),(0,ii.default)(this,`keepAliveOpts`,void 0),(0,ii.default)(this,`encoder`,void 0),(0,ii.default)(this,`wsObservable`,er(null)),(0,ii.default)(this,`openPromise`,null),this.WebSocketPonyfill=t.WebSocketPonyfill??WebSocket,!this.WebSocketPonyfill)throw Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive,this.encoder=t.encoder}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var t=this;if(t.openPromise)return t.openPromise;t.id=++e.connectCount,t.openPromise=ni(t.urlOptions).then(e=>new t.WebSocketPonyfill(e)).then(async e=>{t.ws=e,e.binaryType=`arraybuffer`,e.addEventListener(`message`,function({data:e}){e===`PING`&&this.send(`PONG`)}),t.keepAliveOpts.enabled&&oi(e,t.keepAliveOpts),e.addEventListener(`close`,()=>{t.ws===e&&(t.ws=null)}),await ai(e),t.urlOptions.connectionParams&&e.send(await ri(t.urlOptions.connectionParams,t.encoder))});try{await t.openPromise}finally{t.openPromise=null}}async close(){var e=this;try{await e.openPromise}finally{var t;(t=e.ws)==null||t.close()}}};(0,ii.default)(si,`connectCount`,0),Wn(Jn(),1),Wn(Yn(),1);var ci=Wn(Jn(),1),li=Wn(Yn(),1),ui=class{constructor(e){(0,ci.default)(this,`links`,void 0),(0,ci.default)(this,`runtime`,void 0),(0,ci.default)(this,`requestId`,void 0),this.requestId=0,this.runtime={},this.links=e.links.map(e=>e(this.runtime))}$request(e){return tr({links:this.links,op:(0,li.default)((0,li.default)({},e),{},{context:e.context??{},id:++this.requestId})}).pipe($n())}async requestAsPromise(e){var t=this;try{return(await Qn(t.$request(e))).result.data}catch(e){throw Nr.from(e)}}query(e,t,n){return this.requestAsPromise({type:`query`,path:e,input:t,context:n?.context,signal:n?.signal})}mutation(e,t,n){return this.requestAsPromise({type:`mutation`,path:e,input:t,context:n?.context,signal:n?.signal})}subscription(e,t,n){return this.$request({type:`subscription`,path:e,input:t,context:n.context,signal:n.signal}).subscribe({next(e){switch(e.result.type){case`state`:var t;(t=n.onConnectionStateChange)==null||t.call(n,e.result);break;case`started`:var r;(r=n.onStarted)==null||r.call(n,{context:e.context});break;case`stopped`:var i;(i=n.onStopped)==null||i.call(n);break;case`data`:case void 0:var a;(a=n.onData)==null||a.call(n,e.result.data);break}},error(e){var t;(t=n.onError)==null||t.call(n,e)},complete(){var e;(e=n.onComplete)==null||e.call(n)}})}},di=Symbol.for(`trpc_untypedClient`),fi={query:`query`,mutate:`mutation`,subscribe:`subscription`},pi=e=>fi[e];function mi(e){let t=_r(({path:t,args:n})=>{let r=[...t],i=pi(r.pop()),a=r.join(`.`);return e[i](a,...n)});return vr(n=>n===di?e:t[n])}function hi(e){return mi(new ui(e))}Wn(Yn(),1),Wn(Yn(),1),Wn(Hn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(e,t){function n(e){var t,n,i,a=2;for(typeof Symbol<`u`&&(n=Symbol.asyncIterator,i=Symbol.iterator);a--;){if(n&&(t=e[n])!=null)return t.call(e);if(i&&(t=e[i])!=null)return new r(t.call(e));n=`@@asyncIterator`,i=`@@iterator`}throw TypeError(`Object is not async iterable`)}function r(e){function t(e){if(Object(e)!==e)return Promise.reject(TypeError(e+` is not an object.`));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return r=function(e){this.s=e,this.n=e.next},r.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return n===void 0?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return n===void 0?Promise.reject(e):t(n.apply(this.s,arguments))}},new r(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}})(),1),Wn(Yn(),1);var gi=Hn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(e,t){function n(){var e=typeof SuppressedError==`function`?SuppressedError:function(e,t){var n=Error();return n.name=`SuppressedError`,n.error=e,n.suppressed=t,n},t={},n=[];function r(e,t){if(t!=null){if(Object(t)!==t)throw TypeError(`using declarations can only be used with objects, functions, null, or undefined.`);if(e)var r=t[Symbol.asyncDispose||Symbol.for(`Symbol.asyncDispose`)];if(r===void 0&&(r=t[Symbol.dispose||Symbol.for(`Symbol.dispose`)],e))var i=r;if(typeof r!=`function`)throw TypeError(`Object is not disposable.`);i&&(r=function(){try{i.call(t)}catch(e){return Promise.reject(e)}}),n.push({v:t,d:r,a:e})}else e&&n.push({d:t,a:e});return t}return{e:t,u:r.bind(null,!1),a:r.bind(null,!0),d:function(){var r,i=this.e,a=0;function o(){for(;r=n.pop();)try{if(!r.a&&a===1)return a=0,n.push(r),Promise.resolve().then(o);if(r.d){var e=r.d.call(r.v);if(r.a)return a|=2,Promise.resolve(e).then(o,s)}else a|=1}catch(e){return s(e)}if(a===1)return i===t?Promise.resolve():Promise.reject(i);if(i!==t)throw i}function s(n){return i=i===t?n:new e(n,i),o()}return o()}}}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),_i=Hn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(e,t){function n(e,t){this.v=e,this.k=t}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports}}),vi=Hn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(e,t){var n=_i();function r(e){return new n(e,0)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}}),yi=Hn({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(e,t){var n=_i();function r(e){return function(){return new i(e.apply(this,arguments))}}function i(e){var t,r;function i(t,r){try{var o=e[t](r),s=o.value,c=s instanceof n;Promise.resolve(c?s.v:s).then(function(n){if(c){var r=t===`return`?`return`:`next`;if(!s.k||n.done)return i(r,n);n=e[r](n).value}a(o.done?`return`:`normal`,n)},function(e){i(`throw`,e)})}catch(e){a(`throw`,e)}}function a(e,n){switch(e){case`return`:t.resolve({value:n,done:!0});break;case`throw`:t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?i(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise(function(a,o){var s={key:e,arg:n,resolve:a,reject:o,next:null};r?r=r.next=s:(t=r=s,i(e,n))})},typeof e.return!=`function`&&(this.return=void 0)}i.prototype[typeof Symbol==`function`&&Symbol.asyncIterator||`@@asyncIterator`]=function(){return this},i.prototype.next=function(e){return this._invoke(`next`,e)},i.prototype.throw=function(e){return this._invoke(`throw`,e)},i.prototype.return=function(e){return this._invoke(`return`,e)},t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports}});Wn(gi(),1),Wn(vi(),1),Wn(yi(),1),Wn(Yn(),1);var bi=hi({links:[$r({url:`/trpc`})]});async function xi(){return await bi.controlPlane.state.query()}async function Si(e){return await bi.controlPlane.session.query({id:e})}async function Ci(){return await bi.controlPlane.modelOptions.query()}async function wi(e,t){return await bi.controlPlane.sessionSettingsUpdate.mutate({id:e,...t})}async function Ti(e){return await bi.controlPlane.sessionCreate.mutate(e?{name:e}:void 0)}async function Ei(e,t){return await bi.controlPlane.sessionTurnReview.query({sessionId:e,turnId:t})}async function Di(e,t,n){return await bi.controlPlane.sessionSendPrompt.mutate({sessionId:e,prompt:t,apiKey:n?.apiKey,preferApiKey:n?.preferApiKey,systemContext:n?.systemContext,memoryMaintenanceMode:n?.memoryMaintenanceMode})}async function Oi(e,t){return await bi.controlPlane.sessionContinue.mutate({id:e,apiKey:t?.apiKey,preferApiKey:t?.preferApiKey})}async function ki(e){return await bi.controlPlane.sessionPendingApproval.query({id:e})}async function Ai(e){return await bi.controlPlane.sessionRunning.query({id:e})}async function ji(e){return await bi.controlPlane.sessionCancel.mutate({id:e})}async function Mi(e,t,n){return await bi.controlPlane.sessionResolveApproval.mutate({sessionId:e,approved:t,reason:n})}async function Ni(e){return(await bi.controlPlane.workspaceFileSearch.query({query:e,limit:20})).files}async function Pi(e,t=!1){return await bi.controlPlane.workspaceBrowse.query(e?{path:e,limit:100,includeHidden:t}:{limit:100,includeHidden:t})}async function Fi(){return await bi.controlPlane.workspaceChanges.query()}async function R(e){return await bi.controlPlane.workspaceFileDiff.query({path:e})}async function Ii(e){return await bi.controlPlane.layoutSnapshotSave.mutate({snapshot:e})}async function Li(e){return await bi.controlPlane.heartbeatTaskEnable.mutate({taskId:e})}async function Ri(e){return await bi.controlPlane.heartbeatTaskDisable.mutate({taskId:e})}async function zi(e){return await bi.controlPlane.heartbeatTaskTrigger.mutate({taskId:e})}async function Bi(e){return await bi.controlPlane.workspaceSetActive.mutate({workspaceId:e})}async function Vi(e){return await bi.controlPlane.workspaceCreate.mutate(e)}async function Hi(e,t){return await bi.controlPlane.workspaceRename.mutate({workspaceId:e,name:t})}function Ui(e,t){let n=new EventSource(`/control-plane/sessions/${encodeURIComponent(e)}/events`),r=n=>r=>{try{let i=JSON.parse(r.data);t({type:n,sessionId:i.sessionId??e,timestamp:i.timestamp,event:i.event})}catch{t({type:n,sessionId:e})}};return n.addEventListener(`ready`,r(`ready`)),n.addEventListener(`waiting`,r(`waiting`)),n.addEventListener(`heartbeat`,r(`heartbeat`)),n.addEventListener(`session.updated`,r(`session.updated`)),n.addEventListener(`session.event`,r(`session.event`)),()=>{n.close()}}function Wi(){let[e,t]=(0,d.useState)(),[n,r]=(0,d.useState)(),i=(0,d.useRef)(void 0),a=(0,d.useCallback)(async()=>{try{let e=await xi(),n=JSON.stringify(e);i.current!==n&&(i.current=n,t(e)),r(void 0)}catch(e){r(e instanceof Error?e.message:String(e))}},[]),o=(0,d.useCallback)(async e=>{await Bi(e),await a()},[a]),s=(0,d.useCallback)(async e=>{await Vi(e),await a()},[a]),c=(0,d.useCallback)(async(e,t)=>{await Hi(e,t),await a()},[a]);return(0,d.useEffect)(()=>{let e=!0;async function t(){if(e)try{await a()}catch{if(!e)return}}t();let n=window.setInterval(()=>{t()},1e4);return()=>{e=!1,window.clearInterval(n)}},[a]),{state:e,error:n,refresh:a,setActiveWorkspace:o,createWorkspace:s,renameWorkspace:c}}function Gi(e){return Yi(e,`/overview`)?`overview`:Yi(e,`/tasks`)?`tasks`:Yi(e,`/workspaces`)?`workspaces`:`sessions`}function Ki(e){return e===`overview`?`/overview`:e===`tasks`?`/tasks`:e===`workspaces`?`/workspaces`:`/sessions`}function qi(e){return ce(`/sessions/:sessionId/*`,e)?.params.sessionId}function Ji(e){return e===`/`||Yi(e,`/overview`)||Yi(e,`/sessions`)||Yi(e,`/tasks`)||Yi(e,`/workspaces`)}function Yi(e,t){return e===t||e.startsWith(`${t}/`)}function Xi(){let e=Xe(),t=$e(),n=Gi(e.pathname),r=(0,d.useMemo)(()=>{if(n===`sessions`)return qi(e.pathname)},[e.pathname,n]),i=(0,d.useCallback)(e=>{t(Ki(e))},[t]),a=(0,d.useCallback)(e=>{if(!e){n===`sessions`&&t(`/sessions`,{replace:!0});return}t(`/sessions/${encodeURIComponent(e)}`)},[t,n]),o=(0,d.useCallback)(()=>{(e.pathname===`/`||!Ji(e.pathname))&&t(`/overview`,{replace:!0})},[e.pathname,t]);return(0,d.useMemo)(()=>({section:n,routeSessionId:r,setSection:i,setRouteSessionId:a,normalizeRoute:o}),[o,r,n,a,i])}var Zi=[`.workspace-shell`,`.mobile-session-screen`,`.mobile-chat-pane`,`.conversation-scroll`,`.composer-shell`,`.approval-card`,`.approval-card .code-block`,`.approval-actions`,`.approval-actions button`,`.mention-menu`,`.toast-viewport`,`[role="dialog"]`,`[aria-modal="true"]`],Qi=[`button`,`a[href]`,`input`,`textarea`,`select`,`[tabindex]:not([tabindex="-1"])`].join(`,`);async function $i(e){let t=ta(),n=na(),r=Array.from(document.querySelectorAll(Qi)).slice(0,80).map((e,t)=>ra(e,ua(e,t))).filter(e=>!!e),i=e.screenshot===`auto`?await aa():{status:`unavailable`,reason:`Screenshot capture was not requested.`};return{version:1,capturedAt:new Date().toISOString(),url:window.location.href,title:document.title,viewport:ea(),appState:oa(e.context),dom:{html:ha(ga(document.documentElement.outerHTML),24e4),activeElement:document.activeElement?ra(document.activeElement,`document.activeElement`):void 0,landmarks:t,scrollContainers:n,focusableElements:r,problemChecks:ia(t,n,r)},screenshot:i}}function ea(){let e=window.visualViewport?{width:window.visualViewport.width,height:window.visualViewport.height,offsetTop:window.visualViewport.offsetTop,offsetLeft:window.visualViewport.offsetLeft,scale:window.visualViewport.scale}:void 0;return{innerWidth:window.innerWidth,innerHeight:window.innerHeight,visualViewport:e,devicePixelRatio:window.devicePixelRatio,userAgent:window.navigator.userAgent,orientation:screen.orientation?.type}}function ta(){return Zi.flatMap(e=>Array.from(document.querySelectorAll(e)).slice(0,12).map((t,n)=>ra(t,n===0?e:`${e}:nth-match(${n+1})`)).filter(e=>!!e))}function na(){return Array.from(document.querySelectorAll(`body, body *`)).filter(e=>{let t=window.getComputedStyle(e),n=e.scrollHeight>e.clientHeight+1,r=e.scrollWidth>e.clientWidth+1;return n||r||/(auto|scroll|hidden|clip)/.test(`${t.overflowX} ${t.overflowY}`)}).slice(0,120).map((e,t)=>{let n=window.getComputedStyle(e);return{selector:ua(e,t),rect:pa(e.getBoundingClientRect()),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,clientHeight:e.clientHeight,clientWidth:e.clientWidth,overflowX:n.overflowX,overflowY:n.overflowY,canScrollY:e.scrollHeight>e.clientHeight+1,atTop:e.scrollTop<=1,atBottom:e.scrollTop+e.clientHeight>=e.scrollHeight-1}})}function ra(e,t){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return;let n=window.getComputedStyle(e),r=e.getBoundingClientRect();return{selector:t,tagName:e.tagName.toLowerCase(),textPreview:ca(e),role:e.getAttribute(`role`)??void 0,ariaLabel:e.getAttribute(`aria-label`)??void 0,className:typeof e.className==`string`?e.className:void 0,rect:pa(r),computed:{display:n.display,visibility:n.visibility,position:n.position,overflow:n.overflow,overflowX:n.overflowX,overflowY:n.overflowY,zIndex:n.zIndex,pointerEvents:n.pointerEvents},visibleInViewport:fa(r),clippedByAncestors:la(e)}}function ia(e,t,n){let r=[],i=window.visualViewport?.height??window.innerHeight,a=n.filter(e=>e.selector.includes(`button`)&&/approve|deny/i.test(e.textPreview??``));for(let e of a)e.rect.bottom>i&&!da(t)&&r.push({id:`approval-action-unreachable`,severity:`high`,selector:e.selector,message:`Approval action is below the visual viewport and no captured scroll container appears able to scroll further.`}),e.clippedByAncestors.length>0&&r.push({id:`interactive-control-clipped`,severity:`high`,selector:e.selector,message:`Interactive control may be clipped by ${e.clippedByAncestors.join(`, `)}.`});let o=e.find(e=>e.selector===`.composer-shell`);o&&window.innerWidth<=760&&o.rect.height>i*.62&&r.push({id:`composer-exceeds-mobile-viewport`,severity:`medium`,selector:`.composer-shell`,message:`Composer consumes more than 62% of the visual viewport on mobile.`});for(let e of n)/approve|deny|send|continue|cancel|submit|save/i.test(`${e.textPreview??``} ${e.ariaLabel??``} ${e.selector}`)&&(e.rect.width<=0||e.rect.height<=0||e.computed.display===`none`||e.computed.visibility===`hidden`)&&r.push({id:`hidden-or-zero-size-control`,severity:`medium`,selector:e.selector,message:`Focusable control is hidden or has zero rendered size.`});return r}async function aa(){if(!navigator.mediaDevices?.getDisplayMedia)return{status:`unavailable`,reason:`Browser does not support getDisplayMedia screenshot capture.`};let e;try{e=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:`browser`},audio:!1});let t=document.createElement(`video`);t.srcObject=e,t.muted=!0,await t.play(),await new Promise(e=>{if(t.videoWidth>0&&t.videoHeight>0){e();return}t.onloadedmetadata=()=>e()});let n=document.createElement(`canvas`);n.width=t.videoWidth,n.height=t.videoHeight;let r=n.getContext(`2d`);return r?(r.drawImage(t,0,0,n.width,n.height),{status:`captured`,kind:`screen-capture-frame`,dataUrl:n.toDataURL(`image/png`),width:n.width,height:n.height}):{status:`failed`,reason:`Could not create a canvas context for screenshot capture.`}}catch(e){return{status:`failed`,reason:e instanceof Error?e.message:String(e)}}finally{e?.getTracks().forEach(e=>e.stop())}}function oa(e){let t=e.pendingApproval?{tool:e.pendingApproval.tool,callId:e.pendingApproval.callId,inputSummary:sa(e.pendingApproval.input)}:null;return{...e,pendingApproval:t,latestToasts:e.latestToasts?.slice(-5),errors:e.errors?.filter(Boolean).slice(-8)}}function sa(e){let t=ma(e),n=e&&typeof e==`object`&&!Array.isArray(e)?Object.keys(e).slice(0,20):void 0;return{type:Array.isArray(e)?`array`:typeof e,approxBytes:new Blob([t]).size,keys:n,preview:ha(ga(t),900)}}function ca(e){let t=e.textContent?.replace(/\s+/g,` `).trim();return t?ha(ga(t),240):void 0}function la(e){let t=[],n=e.parentElement;for(;n&&n!==document.body&&t.length<8;){let e=window.getComputedStyle(n);/(hidden|clip)/.test(`${e.overflowX} ${e.overflowY}`)&&t.push(ua(n,t.length)),n=n.parentElement}return t}function ua(e,t){if(e.id)return`#${CSS.escape(e.id)}`;let n=typeof e.className==`string`?e.className.trim().split(/\s+/).filter(Boolean).slice(0,3):[];return n.length>0?`${e.tagName.toLowerCase()}.${n.map(e=>CSS.escape(e)).join(`.`)}`:`${e.tagName.toLowerCase()}:nth-of-type(${t+1})`}function da(e){return e.some(e=>e.canScrollY&&!e.atBottom)}function fa(e){let t=window.visualViewport?.width??window.innerWidth,n=window.visualViewport?.height??window.innerHeight;return e.width>0&&e.height>0&&e.bottom>0&&e.right>0&&e.top<n&&e.left<t}function pa(e){return{x:_a(e.x),y:_a(e.y),width:_a(e.width),height:_a(e.height),top:_a(e.top),right:_a(e.right),bottom:_a(e.bottom),left:_a(e.left)}}function ma(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function ha(e,t){return e.length>t?`${e.slice(0,t)}\n...[truncated ${e.length-t} chars]`:e}function ga(e){return e.replace(/(sk-[A-Za-z0-9_-]{12,})/g,`[redacted-openai-key]`).replace(/(gh[pousr]_[A-Za-z0-9_]{20,})/g,`[redacted-github-token]`).replace(/(AKIA[0-9A-Z]{16})/g,`[redacted-aws-key]`).replace(/("?(?:api[_-]?key|token|secret|password)"?\s*[:=]\s*)"[^"]+"/gi,`$1"[redacted]"`)}function _a(e){return Math.round(e*100)/100}function va({section:e,sessionsState:t,error:n,toasts:r,notify:i}){return(0,d.useCallback)(async a=>{let o;try{o=await $i({screenshot:a,context:{activeTab:e,selectedSessionId:t.selectedSessionId,selectedTurnId:t.selectedTurnId,runActive:t.sendingPrompt||t.runInFlight,pendingApproval:t.pendingApproval,selectedModel:t.sessionDetail?.model??t.activeSession?.model,driftEnabled:t.sessionDetail?.driftEnabled??t.activeSession?.driftEnabled,driftLevel:t.sessionDetail?.driftLevel??t.activeSession?.driftLevel,toastCount:r.length,latestToasts:r.map(e=>({title:e.title,tone:e.tone})),errors:[n,t.sessionDetailError,t.sendPromptError,t.turnReviewError].filter(e=>!!e)}});let s=await Ii(o);i({title:`Layout snapshot saved`,body:s.screenshotPath?`${s.jsonPath}\n${s.screenshotPath}`:s.jsonPath,tone:`success`})}catch(e){let t=e instanceof Error?e.message:String(e);o&&ya(o),i({title:o?`Layout snapshot downloaded`:`Layout snapshot failed`,body:o?`Server save failed, downloaded locally. ${t}`:t,tone:o?`info`:`error`})}},[n,i,e,t,r])}function ya(e){let t=`${e.capturedAt.replaceAll(`:`,`-`)}-${e.appState.activeTab}`;ba(`${t}.json`,`${JSON.stringify(e,null,2)}\n`,`application/json`),e.screenshot.status===`captured`&&xa(`${t}.png`,e.screenshot.dataUrl)}function ba(e,t,n){let r=new Blob([t],{type:n}),i=URL.createObjectURL(r);try{Sa(e,i)}finally{URL.revokeObjectURL(i)}}function xa(e,t){Sa(e,t)}function Sa(e,t){let n=document.createElement(`a`);n.href=t,n.download=e,document.body.append(n),n.click(),n.remove()}var Ca=`(max-width: 760px)`;function wa(){let[e,t]=(0,d.useState)(()=>Ta(Ca));return(0,d.useEffect)(()=>{let e=window.matchMedia(Ca),n=()=>t(e.matches);return n(),e.addEventListener(`change`,n),()=>{e.removeEventListener(`change`,n)}},[]),e}function Ta(e){return typeof window>`u`||typeof window.matchMedia!=`function`?!1:window.matchMedia(e).matches}function Ea(e){let t=(0,d.useCallback)(t=>{e(e=>{if(!e)return e;let n=e.messages.filter(e=>e.id!==`live-user`&&e.id!==`live-assistant`&&e.id!==`live-run-status`);return{...e,messages:[...n,{id:`live-user`,role:`user`,text:t},{id:`live-run-status`,role:`assistant`,text:`Heddle is working…`,isStreaming:!0,isPending:!0}]}})},[e]),n=(0,d.useCallback)((t,n,r)=>{e(e=>{if(!e)return e;let i=[...e.messages],a=i.findIndex(e=>e.id===t),o={id:t,role:`assistant`,text:n,isPending:r?.pending,isStreaming:r?.streaming};return a>=0?i[a]=o:i.push(o),{...e,messages:i}})},[e]),r=(0,d.useCallback)(t=>{e(e=>e&&{...e,messages:e.messages.filter(e=>e.id!==t)})},[e]),i=(0,d.useCallback)((t,n)=>{e(e=>{if(!e)return e;let r=e.messages.filter(e=>e.id!==`live-run-status`),i=r.at(-1);return i?.id===`live-assistant`&&i.role===`assistant`?r[r.length-1]={...i,text:t,isStreaming:!n,isPending:!n}:r.push({id:`live-assistant`,role:`assistant`,text:t,isStreaming:!n,isPending:!n}),{...e,messages:r}})},[e]);return(0,d.useMemo)(()=>({appendPendingUserTurn:t,upsertLiveStatusMessage:n,removeLiveStatusMessage:r,upsertLiveAssistantMessage:i}),[t,r,i,n])}function Da(e,t){if(!e||!t||e.id!==t.id)return t;let n=e.messages.filter(e=>e.id.startsWith(`live-`));if(!n.length)return t;let r=new Set(t.messages.map(e=>e.id));return{...t,messages:[...t.messages,...n.filter(e=>!r.has(e.id))]}}function Oa(e,t){return e.length<=t?e:`${e.slice(0,t-1)}…`}var ka=96;function Aa(e,t,n){let r=t[e.type];return r?.(e,n)}var ja={"run.started":e=>[{type:`run.started`,...La(e)}],"assistant.turn":e=>[{type:`assistant.turn`,requestedTools:e.requestedTools,rationale:e.diagnostics?.rationale,...La(e)}],"host.warning":()=>[],"tool.approval_requested":e=>[{type:`tool.approval_requested`,tool:e.call.tool,toolSummary:za(e.call.tool,e.call.input),call:e.call,...La(e)}],"tool.approval_resolved":e=>[{type:`tool.approval_resolved`,tool:e.call.tool,toolSummary:za(e.call.tool,e.call.input),approved:e.approved,reason:e.reason,call:e.call,...La(e)}],"tool.fallback":e=>[{type:`tool.fallback`,fromTool:e.fromCall.tool,toTool:e.toCall.tool,fromSummary:za(e.fromCall.tool,e.fromCall.input),toSummary:za(e.toCall.tool,e.toCall.input),reason:e.reason,...La(e)}],"tool.call":e=>[{type:`tool.call`,toolSummary:za(e.call.tool,e.call.input),...La(e)}],"tool.result":e=>[{type:`tool.result`,tool:e.tool,toolSummary:Ba(e.tool,{output:e.result.output}),ok:e.result.ok,error:e.result.error,...La(e)}],"memory.candidate_recorded":e=>[{type:`memory.candidate_recorded`,candidateId:e.candidateId,...La(e)}],"memory.checkpoint_skipped":()=>[],"memory.maintenance_started":e=>[{type:`memory.maintenance_started`,candidateCount:e.candidateIds.length,...La(e)}],"memory.maintenance_finished":e=>[{type:`memory.maintenance_finished`,outcome:e.outcome,summary:e.summary,...La(e)}],"memory.maintenance_failed":e=>[{type:`memory.maintenance_failed`,error:e.error,...La(e)}],"cyberloop.annotation":e=>e.driftLevel===`unknown`?[]:[{type:`cyberloop.annotation`,driftLevel:e.driftLevel,metrics:Ka(e.metadata),...La(e)}],"run.finished":e=>[{type:`run.finished`,outcome:e.outcome,...La(e)}]},Ma={"loop.started":e=>[{type:`loop.started`,...Ra(e)}],"assistant.stream":e=>[{type:`assistant.stream`,text:e.text,done:e.done,...Ra(e)}],"tool.calling":e=>[{type:`tool.calling`,tool:e.tool,toolSummary:za(e.tool,e.input),requiresApproval:e.requiresApproval,...Ra(e)}],"tool.completed":e=>[{type:`tool.completed`,tool:e.tool,durationMs:e.durationMs,...Ra(e)}],trace:e=>Pa(e.event).map(t=>({runId:e.runId,...t})),"loop.finished":e=>[{type:`loop.finished`,...Ra(e)}]},Na={running:e=>[{type:`compaction.running`,archivePath:e.archivePath}],finished:e=>[{type:`compaction.finished`,summaryPath:e.summaryPath}],failed:e=>[{type:`compaction.failed`,error:e.error}]};function Pa(e){let t=ja[e.type];return t(e)}function Fa(e){let t=Ma[e.type];return t?.(e)??[]}function Ia(e){let t=Na[e.status];return t(e)}function La(e){let t={timestamp:e.timestamp};return`runId`in e&&(t.runId=e.runId),`step`in e&&(t.step=e.step),t}function Ra(e){let t={runId:e.runId,timestamp:e.timestamp};return`step`in e&&(t.step=e.step),t}function za(e,t,n=ka){if(e===`update_plan`)return Ua(e,t,n);let r=Ga(t,`command`);if(r)return`${e} (${Oa(r,n)})`;if(e===`search_files`)return Ha(e,t,n);let i=Va(e,t,n);if(i)return i;let a=Ga(t,`path`);return a?`${e} (${Oa(a,n)})`:e}function Ba(e,t={}){let n=t.maxChars??ka,r=Ga(t.output,`command`);if(r)return`${e} (${Oa(r,n)})`;let i=Va(e,t.output,n);if(i)return i;let a=Ga(t.output,`path`);return a?`${e} (${Oa(a,n)})`:e}function Va(e,t,n){let r=Ga(t,`from`),i=Ga(t,`to`);if(!r&&!i)return;let a=Math.max(12,Math.floor(n/2));return`${e} (${r?Oa(r,a):`?`} -> ${i?Oa(i,a):`?`})`}function Ha(e,t,n){let r=Ga(t,`query`);if(!r)return e;let i=Ga(t,`path`),a=Math.max(12,Math.floor(n/2)),o=Oa(JSON.stringify(r),a);return i?`${e} (${o} in ${Oa(i,a)})`:`${e} (${o})`}function Ua(e,t,n){if(!t||typeof t!=`object`||Array.isArray(t))return e;let r=t.plan;if(!Array.isArray(r)||r.length===0)return e;let i=r.map(e=>Wa(e,`in_progress`)).find(e=>!!e);return i?`${e} (${Oa(i,n)})`:`${e} (${r.length} items)`}function Wa(e,t){if(!e||typeof e!=`object`||Array.isArray(e))return;let n=e;return n.status===t&&typeof n.step==`string`?n.step:void 0}function Ga(e,t){if(!e||typeof e!=`object`||Array.isArray(e))return;let n=e[t];return typeof n==`string`&&n.trim()?n.trim():void 0}function Ka(e){let t=e.kinematics;if(!t||typeof t!=`object`||Array.isArray(t))return``;let n=t,r=[];return typeof n.errorMagnitude==`number`&&r.push(`err=${qa(n.errorMagnitude)}`),typeof n.correctionMagnitude==`number`&&r.push(`corr=${qa(n.correctionMagnitude)}`),typeof n.isStable==`boolean`&&r.push(`stable=${n.isStable}`),r.length?` (${r.join(` `)})`:``}function qa(e){return Number.isFinite(e)?Math.abs(e)<.001&&e!==0?e.toExponential(2):e.toFixed(3):String(e)}function Ja({selectedSessionId:e,setSessionDetail:t,setSessionDetailLoading:n,setSessionDetailError:r,setRunInFlight:i,setMemoryUpdating:a,setPendingApproval:o,onSessionsChanged:s,liveMessages:c}){let l=(0,d.useRef)(s);(0,d.useEffect)(()=>{l.current=s},[s]),(0,d.useEffect)(()=>{if(!e){t(null),r(void 0);return}let s=e,u=!1,d;async function f(e={}){e.silent||n(!0);try{let n=await Si(s);u||(t(t=>e.silent?Da(t,n):n),r(void 0))}catch(e){u||r(e instanceof Error?e.message:String(e))}finally{!u&&!e.silent&&n(!1)}}f(),Ai(s).then(e=>i(e.running));let p=Ui(s,e=>{if(e.type===`session.updated`){d!==void 0&&window.clearTimeout(d),d=window.setTimeout(()=>{Ai(s).then(e=>{u||i(e.running)}),f({silent:!0}),l.current?.()},300);return}e.type!==`session.event`||!e.event||typeof e.event!=`object`||Ya({sessionId:s,liveEvent:e.event,setRunInFlight:i,setMemoryUpdating:a,setPendingApproval:o,refresh:f,liveMessages:c})});return()=>{u=!0,d!==void 0&&window.clearTimeout(d),p()}},[c,e,a,o,i,t,r,n])}function Ya({sessionId:e,liveEvent:t,setRunInFlight:n,setMemoryUpdating:r,setPendingApproval:i,refresh:a,liveMessages:o}){let s=t,c={sessionId:e,setRunInFlight:n,setMemoryUpdating:r,setPendingApproval:i,refresh:a,liveMessages:o};Za(s).forEach(e=>Qa(e,c))}var Xa={"compaction.running":(e,{liveMessages:t})=>{t.upsertLiveStatusMessage(`live-run-status`,e.archivePath?`Compacting earlier history… ${e.archivePath}`:`Compacting earlier history…`,{pending:!0,streaming:!1})},"compaction.failed":(e,{liveMessages:t})=>{t.upsertLiveStatusMessage(`live-run-status`,e.error?`Compaction failed: ${e.error}`:`Compaction failed.`,{pending:!1,streaming:!1})},"compaction.finished":(e,{liveMessages:t})=>{t.upsertLiveStatusMessage(`live-run-status`,e.summaryPath?`Compaction finished. Summary: ${e.summaryPath}`:`Compaction finished.`,{pending:!1,streaming:!1})},"loop.started":(e,{setRunInFlight:t,liveMessages:n})=>{t(!0),n.upsertLiveStatusMessage(`live-run-status`,`Run started…`,{pending:!0,streaming:!0})},"tool.calling":(e,{liveMessages:t})=>{t.upsertLiveStatusMessage(`live-run-status`,`Working… running ${e.tool}${typeof e.step==`number`?` (step ${e.step})`:``}`,{pending:!0,streaming:!0})},"tool.completed":(e,{liveMessages:t})=>{t.upsertLiveStatusMessage(`live-run-status`,`${e.tool} finished${typeof e.durationMs==`number`?` in ${Math.round(e.durationMs)}ms`:``}`,{pending:!1,streaming:!1})},"assistant.stream":(e,{liveMessages:t})=>{t.upsertLiveAssistantMessage(e.text,e.done),e.done&&t.removeLiveStatusMessage(`live-run-status`)},"loop.finished":(e,{setRunInFlight:t,liveMessages:n,refresh:r})=>{t(!1),n.removeLiveStatusMessage(`live-run-status`),r()},"memory.maintenance_started":(e,{setMemoryUpdating:t,liveMessages:n})=>{t(!0),n.upsertLiveStatusMessage(`live-run-status`,`Memory updating… ${e.candidateCount} candidate${e.candidateCount===1?``:`s`}`,{pending:!0,streaming:!1})},"memory.maintenance_finished":(e,{setMemoryUpdating:t,liveMessages:n,refresh:r})=>{t(!1),n.upsertLiveStatusMessage(`live-run-status`,e.summary?`Memory updated. ${e.summary}`:`Memory updated.`,{pending:!1,streaming:!1}),r({silent:!0})},"memory.maintenance_failed":(e,{setMemoryUpdating:t,liveMessages:n})=>{t(!1),n.upsertLiveStatusMessage(`live-run-status`,e.error?`Memory update failed: ${e.error}`:`Memory update failed.`,{pending:!1,streaming:!1})},"tool.approval_requested":(e,{sessionId:t,setPendingApproval:n,liveMessages:r})=>{ki(t).then(e=>n(e)),r.upsertLiveStatusMessage(`live-run-status`,`Approval requested for ${e.tool}${typeof e.step==`number`?` (step ${e.step})`:``}`,{pending:!0,streaming:!1})},"tool.approval_resolved":(e,{setPendingApproval:t,liveMessages:n})=>{t(null),n.upsertLiveStatusMessage(`live-run-status`,`Approval ${e.approved?`granted`:`denied`} for ${e.tool}${e.reason?` — ${e.reason}`:``}`,{pending:!1,streaming:!1})},"tool.fallback":(e,{liveMessages:t})=>{t.upsertLiveStatusMessage(`live-run-status`,`Fallback: ${e.fromTool} → ${e.toTool}`,{pending:!0,streaming:!1})}};function Za(e){return $a(e)?Ia(e):eo(e)?Fa(e):[]}function Qa(e,t){Aa(e,Xa,t)}function $a(e){return e.status===`running`||e.status===`finished`||e.status===`failed`}function eo(e){return typeof e.type==`string`}function to({selectedSessionId:e,pendingApproval:t,sendingPrompt:n,runInFlight:r,notify:i,setSelectedSessionId:a,setSelectedTurnId:o,setSessionDetail:s,setSessionDetailError:c,setSendingPrompt:l,setSendPromptError:u,setTurnReview:f,setPendingApproval:p,setRunInFlight:m,setCreatingSession:h,setSessionNotice:g,liveMessages:_}){return{resolveApproval:(0,d.useCallback)(async n=>{if(!(!e||!t))try{await Mi(e,n,n?`Approved in web control plane`:`Denied in web control plane`),p(null),i?.({title:n?`Approval granted`:`Approval denied`,body:t.tool,tone:n?`success`:`info`})}catch(e){i?.({title:`Approval failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}},[i,t,e,p]),createSession:(0,d.useCallback)(async()=>{h(!0),g(`Creating a new session…`);try{let e=await Ti();a(e.id),s(e),o(void 0),f(null),p(null),m(!1),u(void 0),c(void 0),g(`Created ${e.name}. Ready for a fresh prompt.`),i?.({title:`Session created`,body:`${e.name} is ready for a fresh prompt.`,tone:`success`})}catch(e){let t=e instanceof Error?e.message:String(e);g(t),i?.({title:`Session creation failed`,body:t,tone:`error`})}finally{h(!1)}},[i,h,p,m,a,o,u,s,c,g,f]),sendPrompt:(0,d.useCallback)(async t=>{let r=t.trim();if(!(!e||!r||n)){l(!0),m(!0),u(void 0),_.appendPendingUserTurn(r);try{let t=await Di(e,r);s(t.session);let n=t.session?.turns.at(-1)?.id;n&&o(n),m(!1)}catch(e){let t=e instanceof Error?e.message:String(e);u(t),m(!1),i?.({title:`Send failed`,body:t,tone:`error`})}finally{l(!1)}}},[_,i,e,n,m,o,l,u,s]),continueSession:(0,d.useCallback)(async()=>{if(!(!e||n||r)){l(!0),m(!0),u(void 0),_.upsertLiveStatusMessage(`live-run-status`,`Continuing from the current transcript…`,{pending:!0,streaming:!0});try{let t=await Oi(e);s(t.session);let n=t.session?.turns.at(-1)?.id;n&&o(n),p(await ki(e)),m(!1)}catch(e){let t=e instanceof Error?e.message:String(e);u(t),m(!1),i?.({title:`Continue failed`,body:t,tone:`error`}),_.removeLiveStatusMessage(`live-run-status`),s(e=>e&&{...e,messages:e.messages.filter(e=>e.id!==`live-assistant`)})}finally{l(!1)}}},[_,i,r,e,n,p,m,o,l,u,s]),cancelSessionRun:(0,d.useCallback)(async()=>{if(!(!e||!r))try{let t=await ji(e);m(!1),p(null),_.removeLiveStatusMessage(`live-run-status`),u(void 0),s(e=>e&&{...e,messages:e.messages.filter(e=>e.id!==`live-user`&&e.id!==`live-assistant`)}),i?.({title:t.cancelled?`Run cancelled`:`No active run to cancel`,body:t.cancelled?`The active session run was interrupted.`:void 0,tone:t.cancelled?`success`:`info`})}catch(e){i?.({title:`Cancel failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}},[_,i,r,e,p,m,u,s]),updateSessionSettings:(0,d.useCallback)(async t=>{if(!(!e||r||n))try{s(await wi(e,t)),i?.({title:`Session settings updated`,body:[t.model?`model ${t.model}`:void 0,typeof t.driftEnabled==`boolean`?`drift ${t.driftEnabled?`on`:`off`}`:void 0].filter(Boolean).join(`, `),tone:`success`})}catch(e){i?.({title:`Settings update failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}},[i,r,e,n,s])}}function no({sessionDetail:e,selectedTurnId:t,setSelectedTurnId:n,turnReview:r,setTurnReview:i,turnReviewLoading:a,setTurnReviewLoading:o,turnReviewError:s,setTurnReviewError:c}){(0,d.useEffect)(()=>{let r=e?.turns.at(-1)?.id;if(!e){n(void 0);return}if(!r){n(void 0);return}(!t||!e.turns.some(e=>e.id===t))&&n(r)},[t,e,n]);let l=(0,d.useMemo)(()=>e?.turns.find(e=>e.id===t)??e?.turns.at(-1),[t,e]);return(0,d.useEffect)(()=>{if(!e?.id||!t){i(null),c(void 0);return}let n=e.id,r=t,a=!1;o(!0);async function s(){try{let e=await Ei(n,r);a||(i(e),c(void 0))}catch(e){a||c(e instanceof Error?e.message:String(e))}finally{a||o(!1)}}return s(),()=>{a=!0}},[t,e?.id,l?.traceFile,i,c,o]),{selectedTurn:l,turnReview:r,turnReviewLoading:a,turnReviewError:s}}function ro(e,t,n,r){let[i,a]=(0,d.useState)(),[o,s]=(0,d.useState)(),[c,l]=(0,d.useState)(null),[u,f]=(0,d.useState)(!1),[p,m]=(0,d.useState)(),[h,g]=(0,d.useState)(!1),[_,v]=(0,d.useState)(),[y,b]=(0,d.useState)(null),[x,S]=(0,d.useState)(!1),[C,w]=(0,d.useState)(),[T,E]=(0,d.useState)(null),[D,O]=(0,d.useState)(!1),[ee,k]=(0,d.useState)(!1),[A,j]=(0,d.useState)(!1),[M,te]=(0,d.useState)(),N=r?.selectedSessionId??i,P=r?.onSelectedSessionIdChange??a,F=r?.autoSelectSession??!0,ne=Ea(l);(0,d.useEffect)(()=>{if(F){if(!e?.length){if(N&&c?.id===N)return;P(void 0);return}N&&c?.id===N||(!N||!e.some(e=>e.id===N))&&P(e[0].id)}},[F,N,c?.id,e,P]);let re=(0,d.useCallback)(e=>{P(e),s(void 0),te(void 0),v(void 0)},[P]);Ja({selectedSessionId:N,setSessionDetail:l,setSessionDetailLoading:f,setSessionDetailError:m,setRunInFlight:O,setMemoryUpdating:k,setPendingApproval:E,onSessionsChanged:n,liveMessages:ne});let ie=(0,d.useMemo)(()=>e?.find(e=>e.id===N),[N,e]),{selectedTurn:ae,turnReview:I,turnReviewLoading:L,turnReviewError:oe}=no({sessionDetail:c,selectedTurnId:o,setSelectedTurnId:s,turnReview:y,setTurnReview:b,turnReviewLoading:x,setTurnReviewLoading:S,turnReviewError:C,setTurnReviewError:w}),{resolveApproval:se,createSession:ce,sendPrompt:le,continueSession:ue,cancelSessionRun:de,updateSessionSettings:fe}=to({selectedSessionId:N,pendingApproval:T,sendingPrompt:h,runInFlight:D,notify:t,setSelectedSessionId:P,setSelectedTurnId:s,setSessionDetail:l,setSessionDetailError:m,setSendingPrompt:g,setSendPromptError:v,setTurnReview:b,setPendingApproval:E,setRunInFlight:O,setCreatingSession:j,setSessionNotice:te,liveMessages:ne});return{activeSession:ie,selectedSessionId:N,setSelectedSessionId:re,sessionDetail:c,sessionDetailLoading:u,sessionDetailError:p,sendingPrompt:h,runInFlight:D,memoryUpdating:ee,sendPromptError:_,sendPrompt:le,creatingSession:A,sessionNotice:M,createSession:ce,continueSession:ue,cancelSessionRun:de,updateSessionSettings:fe,pendingApproval:T,resolveApproval:se,selectedTurnId:o,setSelectedTurnId:s,selectedTurn:ae,turnReview:I,turnReviewLoading:L,turnReviewError:oe}}function io(e,t,n,r){let[i,a]=(0,d.useState)(),[o,s]=(0,d.useState)(),[c,l]=(0,d.useState)();(0,d.useEffect)(()=>{if(!e?.length){a(void 0);return}(!i||!e.some(e=>e.taskId===i))&&a(e[0].taskId)},[i,e]);let u=(0,d.useMemo)(()=>!t||!i?[]:t.filter(e=>e.taskId===i),[t,i]);(0,d.useEffect)(()=>{if(!u.length){s(void 0);return}(!o||!u.some(e=>e.id===o))&&s(u[0].id)},[o,u]);let f=(0,d.useMemo)(()=>e?.find(e=>e.taskId===i),[i,e]),p=(0,d.useMemo)(()=>u.find(e=>e.id===o)??u[0],[o,u]),m=(0,d.useCallback)(async(e,t,i)=>{if(!(!e||c)){l({taskId:e,action:t});try{let a=await i(e);r?.(),n?.({title:t===`enable`?`Task resumed`:t===`disable`?`Task paused`:`Task triggered`,body:t===`trigger`?`${a.task.taskId} was queued for the next worker poll.`:`${a.task.taskId} is now ${a.task.enabled?`enabled`:`disabled`}.`,tone:`success`})}catch(e){n?.({title:`Task action failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}finally{l(void 0)}}},[n,r,c]);return{selectedTaskId:i,setSelectedTaskId:a,selectedTask:f,selectedTaskRuns:u,selectedRunId:o,setSelectedRunId:s,selectedRun:p,pendingTaskAction:c,enableTask:(0,d.useCallback)(async e=>{await m(e,`enable`,Li)},[m]),disableTask:(0,d.useCallback)(async e=>{await m(e,`disable`,Ri)},[m]),triggerTask:(0,d.useCallback)(async e=>{await m(e,`trigger`,zi)},[m])}}function ao({state:e,setActiveWorkspace:t,createWorkspace:n,renameWorkspace:r,notify:i}){let[a,o]=(0,d.useState)(!1),[s,c]=(0,d.useState)();return{creatingWorkspace:a,renamingWorkspaceId:s,switchWorkspace:(0,d.useCallback)(async n=>{try{await t(n),i({title:`Workspace switched`,body:e?.workspaces.find(e=>e.id===n)?.name??n,tone:`success`})}catch(e){i({title:`Workspace switch failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}},[i,t,e?.workspaces]),createWorkspace:(0,d.useCallback)(async e=>{o(!0);try{await n(e),i({title:`Workspace created`,body:e.name,tone:`success`})}catch(e){i({title:`Workspace creation failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}finally{o(!1)}},[n,i]),renameWorkspace:(0,d.useCallback)(async(e,t)=>{c(e);try{await r(e,t),i({title:`Workspace renamed`,body:t,tone:`success`})}catch(e){i({title:`Workspace rename failed`,body:e instanceof Error?e.message:String(e),tone:`error`})}finally{c(void 0)}},[i,r])}}function oo(...e){return e.filter(Boolean).join(` `)}function so(e){if(e){if(e===`complete`||e===`continue`||e===`done`||e===`idle`||e===`enabled`)return`good`;if(e===`blocked`||e===`escalate`||e===`waiting`||e===`paused`)return`warn`;if(e===`failed`||e===`error`)return`bad`}}function co(e){return e?new Date(e).toLocaleString():`none`}function lo(e){return e?new Date(e).toLocaleDateString():`—`}function uo(e,t=220){return e.length>t?`${e.slice(0,t-1)}…`:e}function fo(e){return e.split(`/`).filter(Boolean).slice(-3).join(`/`)}function po(e){return typeof e==`number`?e.toLocaleString():`—`}function mo(e){let t=Math.max(1,Math.floor(e/1e3)),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}h ${r}m`:r>0?`${r}m ${i}s`:`${i}s`}function z(e){if(!e||typeof e!=`object`||Array.isArray(e))return;let t=e,n=go(t,[`inputTokens`,`input_tokens`,`promptTokens`,`prompt_tokens`]),r=go(t,[`outputTokens`,`output_tokens`,`completionTokens`,`completion_tokens`]),i=go(t,[`totalTokens`,`total_tokens`]),a=[n===void 0?void 0:`in ${n.toLocaleString()}`,r===void 0?void 0:`out ${r.toLocaleString()}`,i===void 0?void 0:`total ${i.toLocaleString()}`].filter(e=>!!e);return a.length?a.join(` • `):void 0}function ho(e){if(e.status===`running`)return{label:`running now`,tone:`good`,detail:`The task is actively executing a heartbeat wake cycle.`};if(!e.enabled)return{label:`paused`,tone:`warn`,detail:`The task is disabled and will not run until resumed.`};if(e.status===`complete`)return{label:`finished`,tone:`good`,detail:`The task reached a terminal complete decision and stopped scheduling.`};if(e.status===`blocked`)return{label:`blocked`,tone:`warn`,detail:`The task escalated and is waiting for human follow-up.`};if(e.status===`failed`)return{label:`failed`,tone:`bad`,detail:`The last wake failed. It will retry according to the next run schedule.`};if(e.status===`waiting`){let t=e.nextRunAt?Date.parse(e.nextRunAt):NaN;return Number.isFinite(t)&&t<=Date.now()+1e3?{label:`queued`,tone:`warn`,detail:`The task is queued and will start on the next worker poll.`}:{label:`scheduled`,tone:`good`,detail:`The task is waiting for its next scheduled wake time.`}}return{label:e.status??`idle`,tone:so(e.status),detail:`The task is currently idle.`}}function go(e,t){for(let n of t){let t=e[n];if(typeof t==`number`&&Number.isFinite(t))return t}}function _o(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=_o(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function vo(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=_o(e))&&(r&&(r+=` `),r+=t);return r}var yo=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,bo=vo,xo=(e,t)=>n=>{if(t?.variants==null)return bo(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=yo(t)||yo(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return bo(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},So=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Co=(e,t)=>({classGroupId:e,validator:t}),wo=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),To=`-`,Eo=[],Do=`arbitrary..`,Oo=e=>{let t=jo(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return Ao(e);let n=e.split(To);return ko(n,n[0]===``&&n.length>1?1:0,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?So(i,t):t:i||Eo}return n[e]||Eo}}},ko=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ko(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(To):e.slice(t).join(To),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},Ao=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?Do+r:void 0})(),jo=e=>{let{theme:t,classGroups:n}=e;return Mo(n,t)},Mo=(e,t)=>{let n=wo();for(let r in e){let i=e[r];No(i,n,r,t)}return n},No=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Po(i,t,n,r)}},Po=(e,t,n,r)=>{if(typeof e==`string`){Fo(e,t,n);return}if(typeof e==`function`){Io(e,t,n,r);return}Lo(e,t,n,r)},Fo=(e,t,n)=>{let r=e===``?t:Ro(t,e);r.classGroupId=n},Io=(e,t,n,r)=>{if(zo(e)){No(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Co(n,e))},Lo=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];No(o,Ro(t,a),n,r)}},Ro=(e,t)=>{let n=e,r=t.split(To),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=wo(),n.nextPart.set(t,i)),n=i}return n},zo=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,Bo=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Vo=`!`,Ho=`:`,Uo=[],Wo=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Go=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===Ho){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Vo)?(c=s.slice(0,-1),l=!0):s.startsWith(Vo)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Wo(t,l,c,u)};if(t){let e=t+Ho,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Wo(Uo,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Ko=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},qo=e=>({cache:Bo(e.cacheSize),parseClassName:Go(e),sortModifiers:Ko(e),...Oo(e)}),Jo=/\s+/,Yo=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Jo),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+Vo:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},Xo=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Zo(n))&&(i&&(i+=` `),i+=r);return i},Zo=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Zo(e[r]))&&(n&&(n+=` `),n+=t);return n},Qo=(e,...t)=>{let n,r,i,a,o=o=>(n=qo(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Yo(e,n);return i(e,a),a};return a=o,(...e)=>a(Xo(...e))},$o=[],es=e=>{let t=t=>t[e]||$o;return t.isThemeGetter=!0,t},ts=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,ns=/^\((?:(\w[\w-]*):)?(.+)\)$/i,rs=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,is=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,as=/\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$/,os=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ss=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,cs=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ls=e=>rs.test(e),B=e=>!!e&&!Number.isNaN(Number(e)),us=e=>!!e&&Number.isInteger(Number(e)),ds=e=>e.endsWith(`%`)&&B(e.slice(0,-1)),fs=e=>is.test(e),ps=()=>!0,ms=e=>as.test(e)&&!os.test(e),hs=()=>!1,gs=e=>ss.test(e),_s=e=>cs.test(e),vs=e=>!V(e)&&!H(e),ys=e=>Ps(e,Rs,hs),V=e=>ts.test(e),bs=e=>Ps(e,zs,ms),xs=e=>Ps(e,Bs,B),Ss=e=>Ps(e,Hs,ps),Cs=e=>Ps(e,Vs,hs),ws=e=>Ps(e,Is,hs),Ts=e=>Ps(e,Ls,_s),Es=e=>Ps(e,Us,gs),H=e=>ns.test(e),Ds=e=>Fs(e,zs),Os=e=>Fs(e,Vs),ks=e=>Fs(e,Is),As=e=>Fs(e,Rs),js=e=>Fs(e,Ls),Ms=e=>Fs(e,Us,!0),Ns=e=>Fs(e,Hs,!0),Ps=(e,t,n)=>{let r=ts.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Fs=(e,t,n=!1)=>{let r=ns.exec(e);return r?r[1]?t(r[1]):n:!1},Is=e=>e===`position`||e===`percentage`,Ls=e=>e===`image`||e===`url`,Rs=e=>e===`length`||e===`size`||e===`bg-size`,zs=e=>e===`length`,Bs=e=>e===`number`,Vs=e=>e===`family-name`,Hs=e=>e===`number`||e===`weight`,Us=e=>e===`shadow`,Ws=Qo(()=>{let e=es(`color`),t=es(`font`),n=es(`text`),r=es(`font-weight`),i=es(`tracking`),a=es(`leading`),o=es(`breakpoint`),s=es(`container`),c=es(`spacing`),l=es(`radius`),u=es(`shadow`),d=es(`inset-shadow`),f=es(`text-shadow`),p=es(`drop-shadow`),m=es(`blur`),h=es(`perspective`),g=es(`aspect`),_=es(`ease`),v=es(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),H,V],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[H,V,c],T=()=>[ls,`full`,`auto`,...w()],E=()=>[us,`none`,`subgrid`,H,V],D=()=>[`auto`,{span:[`full`,us,H,V]},us,H,V],O=()=>[us,`auto`,H,V],ee=()=>[`auto`,`min`,`max`,`fr`,H,V],k=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],A=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],j=()=>[`auto`,...w()],M=()=>[ls,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],te=()=>[ls,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],N=()=>[ls,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,H,V],F=()=>[...b(),ks,ws,{position:[H,V]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,As,ys,{size:[H,V]}],ie=()=>[ds,Ds,bs],ae=()=>[``,`none`,`full`,l,H,V],I=()=>[``,B,Ds,bs],L=()=>[`solid`,`dashed`,`dotted`,`double`],oe=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],se=()=>[B,ds,ks,ws],ce=()=>[``,`none`,m,H,V],le=()=>[`none`,B,H,V],ue=()=>[`none`,B,H,V],de=()=>[B,H,V],fe=()=>[ls,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[fs],breakpoint:[fs],color:[ps],container:[fs],"drop-shadow":[fs],ease:[`in`,`out`,`in-out`],font:[vs],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[fs],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[fs],shadow:[fs],spacing:[`px`,B],text:[fs],"text-shadow":[fs],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,ls,V,H,g]}],container:[`container`],columns:[{columns:[B,V,H,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[us,`auto`,H,V]}],basis:[{basis:[ls,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[B,ls,`auto`,`initial`,`none`,V]}],grow:[{grow:[``,B,H,V]}],shrink:[{shrink:[``,B,H,V]}],order:[{order:[us,`first`,`last`,`none`,H,V]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ee()}],"auto-rows":[{"auto-rows":ee()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...k(),`normal`]}],"justify-items":[{"justify-items":[...A(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...A()]}],"align-content":[{content:[`normal`,...k()]}],"align-items":[{items:[...A(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...A(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":k()}],"place-items":[{"place-items":[...A(),`baseline`]}],"place-self":[{"place-self":[`auto`,...A()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mbs:[{mbs:j()}],mbe:[{mbe:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:M()}],"inline-size":[{inline:[`auto`,...te()]}],"min-inline-size":[{"min-inline":[`auto`,...te()]}],"max-inline-size":[{"max-inline":[`none`,...te()]}],"block-size":[{block:[`auto`,...N()]}],"min-block-size":[{"min-block":[`auto`,...N()]}],"max-block-size":[{"max-block":[`none`,...N()]}],w:[{w:[s,`screen`,...M()]}],"min-w":[{"min-w":[s,`screen`,`none`,...M()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...M()]}],h:[{h:[`screen`,`lh`,...M()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...M()]}],"max-h":[{"max-h":[`screen`,`lh`,...M()]}],"font-size":[{text:[`base`,n,Ds,bs]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Ns,Ss]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ds,V]}],"font-family":[{font:[Os,Cs,t]}],"font-features":[{"font-features":[V]}],"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:[i,H,V]}],"line-clamp":[{"line-clamp":[B,`none`,H,xs]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,H,V]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,H,V]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[B,`from-font`,`auto`,H,bs]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[B,`auto`,H,V]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,H,V]}],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`,H,V]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},us,H,V],radial:[``,H,V],conic:[us,H,V]},js,Ts]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[B,H,V]}],"outline-w":[{outline:[``,B,Ds,bs]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,Ms,Es]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ms,Es]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[B,bs]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,Ms,Es]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[B,H,V]}],"mix-blend":[{"mix-blend":[...oe(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":oe()}],"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":[B]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[H,V]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[B]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,H,V]}],filter:[{filter:[``,`none`,H,V]}],blur:[{blur:ce()}],brightness:[{brightness:[B,H,V]}],contrast:[{contrast:[B,H,V]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ms,Es]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,B,H,V]}],"hue-rotate":[{"hue-rotate":[B,H,V]}],invert:[{invert:[``,B,H,V]}],saturate:[{saturate:[B,H,V]}],sepia:[{sepia:[``,B,H,V]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,H,V]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[B,H,V]}],"backdrop-contrast":[{"backdrop-contrast":[B,H,V]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,B,H,V]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[B,H,V]}],"backdrop-invert":[{"backdrop-invert":[``,B,H,V]}],"backdrop-opacity":[{"backdrop-opacity":[B,H,V]}],"backdrop-saturate":[{"backdrop-saturate":[B,H,V]}],"backdrop-sepia":[{"backdrop-sepia":[``,B,H,V]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,H,V]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[B,`initial`,H,V]}],ease:[{ease:[`linear`,`initial`,_,H,V]}],delay:[{delay:[B,H,V]}],animate:[{animate:[`none`,v,H,V]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,H,V]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":[`scale-3d`],skew:[{skew:de()}],"skew-x":[{"skew-x":de()}],"skew-y":[{"skew-y":de()}],transform:[{transform:[H,V,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:fe()}],"translate-x":[{"translate-x":fe()}],"translate-y":[{"translate-y":fe()}],"translate-z":[{"translate-z":fe()}],"translate-none":[`translate-none`],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"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`,H,V]}],"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":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,H,V]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[B,Ds,bs,xs]}],stroke:[{stroke:[`none`,...P()]}],"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`]}});function Gs(...e){return Ws(vo(e))}var Ks=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),qs=n(((e,t)=>{t.exports=Ks()})),U=qs(),Js=xo(`inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:`border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80`,secondary:`border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80`,destructive:`border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80`,outline:`text-foreground`}},defaultVariants:{variant:`default`}});function W({className:e,variant:t,...n}){return(0,U.jsx)(`div`,{className:Gs(Js({variant:t}),e),...n})}function Ys(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Xs(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ys(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ys(e[t],null)}}}}function Zs(...e){return d.useCallback(Xs(...e),e)}var Qs=Symbol.for(`react.lazy`),$s=d.use;function ec(e){return typeof e==`object`&&!!e&&`then`in e}function tc(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Qs&&`_payload`in e&&ec(e._payload)}function nc(e){let t=ic(e),n=d.forwardRef((e,n)=>{let{children:r,...i}=e;tc(r)&&typeof $s==`function`&&(r=$s(r._payload));let a=d.Children.toArray(r),o=a.find(oc);if(o){let e=o.props.children,r=a.map(t=>t===o?d.Children.count(e)>1?d.Children.only(null):d.isValidElement(e)?e.props.children:null:t);return(0,U.jsx)(t,{...i,ref:n,children:d.isValidElement(e)?d.cloneElement(e,void 0,r):null})}return(0,U.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var rc=nc(`Slot`);function ic(e){let t=d.forwardRef((e,t)=>{let{children:n,...r}=e;if(tc(n)&&typeof $s==`function`&&(n=$s(n._payload)),d.isValidElement(n)){let e=cc(n),i=sc(r,n.props);return n.type!==d.Fragment&&(i.ref=t?Xs(t,e):e),d.cloneElement(n,i)}return d.Children.count(n)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ac=Symbol(`radix.slottable`);function oc(e){return d.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ac}function sc(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function cc(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 lc=xo(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90`,outline:`border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),G=d.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,U.jsx)(r?rc:`button`,{className:Gs(lc({variant:t,size:n,className:e})),ref:a,...i}));G.displayName=`Button`,typeof window<`u`&&window.document&&window.document.createElement;function uc(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function dc(e,t=[]){let n=[];function r(t,r){let i=d.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=d.useMemo(()=>o,Object.values(o));return(0,U.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=d.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>d.createContext(e));return function(n){let r=n?.[e]||t;return d.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,fc(i,...t)]}function fc(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function pc(e){let t=mc(e),n=d.forwardRef((e,n)=>{let{children:r,...i}=e,a=d.Children.toArray(r),o=a.find(gc);if(o){let e=o.props.children,r=a.map(t=>t===o?d.Children.count(e)>1?d.Children.only(null):d.isValidElement(e)?e.props.children:null:t);return(0,U.jsx)(t,{...i,ref:n,children:d.isValidElement(e)?d.cloneElement(e,void 0,r):null})}return(0,U.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function mc(e){let t=d.forwardRef((e,t)=>{let{children:n,...r}=e;if(d.isValidElement(n)){let e=vc(n),i=_c(r,n.props);return n.type!==d.Fragment&&(i.ref=t?Xs(t,e):e),d.cloneElement(n,i)}return d.Children.count(n)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var hc=Symbol(`radix.slottable`);function gc(e){return d.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===hc}function _c(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function vc(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 yc=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=pc(`Primitive.${t}`),r=d.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,U.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function bc(e,t){e&&f.flushSync(()=>e.dispatchEvent(t))}function xc(e){let t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...e)=>t.current?.(...e),[])}function Sc(e,t=globalThis?.document){let n=xc(e);d.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Cc=`DismissableLayer`,wc=`dismissableLayer.update`,Tc=`dismissableLayer.pointerDownOutside`,Ec=`dismissableLayer.focusOutside`,Dc,Oc=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kc=d.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=d.useContext(Oc),[u,f]=d.useState(null),p=u?.ownerDocument??globalThis?.document,[,m]=d.useState({}),h=Zs(t,e=>f(e)),g=Array.from(l.layers),[_]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(_),y=u?g.indexOf(u):-1,b=l.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=Mc(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},p),C=Nc(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},p);return Sc(e=>{y===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},p),d.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(Dc=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Pc(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Dc)}},[u,p,n,l]),d.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Pc())},[u,l]),d.useEffect(()=>{let e=()=>m({});return document.addEventListener(wc,e),()=>document.removeEventListener(wc,e)},[]),(0,U.jsx)(yc.div,{...c,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:uc(e.onFocusCapture,C.onFocusCapture),onBlurCapture:uc(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:uc(e.onPointerDownCapture,S.onPointerDownCapture)})});kc.displayName=Cc;var Ac=`DismissableLayerBranch`,jc=d.forwardRef((e,t)=>{let n=d.useContext(Oc),r=d.useRef(null),i=Zs(t,r);return d.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,U.jsx)(yc.div,{...e,ref:i})});jc.displayName=Ac;function Mc(e,t=globalThis?.document){let n=xc(e),r=d.useRef(!1),i=d.useRef(()=>{});return d.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){Fc(Tc,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Nc(e,t=globalThis?.document){let n=xc(e),r=d.useRef(!1);return d.useEffect(()=>{let e=e=>{e.target&&!r.current&&Fc(Ec,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Pc(){let e=new CustomEvent(wc);document.dispatchEvent(e)}function Fc(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?bc(i,a):i.dispatchEvent(a)}var Ic=kc,Lc=jc,Rc=globalThis?.document?d.useLayoutEffect:()=>{},zc=d.useId||(()=>void 0),Bc=0;function Vc(e){let[t,n]=d.useState(zc());return Rc(()=>{e||n(e=>e??String(Bc++))},[e]),e||(t?`radix-${t}`:``)}var Hc=[`top`,`right`,`bottom`,`left`],Uc=Math.min,Wc=Math.max,Gc=Math.round,Kc=Math.floor,qc=e=>({x:e,y:e}),Jc={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Yc(e,t,n){return Wc(e,Uc(t,n))}function Xc(e,t){return typeof e==`function`?e(t):e}function Zc(e){return e.split(`-`)[0]}function Qc(e){return e.split(`-`)[1]}function $c(e){return e===`x`?`y`:`x`}function el(e){return e===`y`?`height`:`width`}function tl(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function nl(e){return $c(tl(e))}function rl(e,t,n){n===void 0&&(n=!1);let r=Qc(e),i=nl(e),a=el(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=fl(o)),[o,fl(o)]}function il(e){let t=fl(e);return[al(e),t,al(t)]}function al(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ol=[`left`,`right`],sl=[`right`,`left`],cl=[`top`,`bottom`],ll=[`bottom`,`top`];function ul(e,t,n){switch(e){case`top`:case`bottom`:return n?t?sl:ol:t?ol:sl;case`left`:case`right`:return t?cl:ll;default:return[]}}function dl(e,t,n,r){let i=Qc(e),a=ul(Zc(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(al)))),a}function fl(e){let t=Zc(e);return Jc[t]+e.slice(t.length)}function pl(e){return{top:0,right:0,bottom:0,left:0,...e}}function ml(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:pl(e)}function hl(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function gl(e,t,n){let{reference:r,floating:i}=e,a=tl(t),o=nl(t),s=el(o),c=Zc(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Qc(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function _l(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Xc(t,e),p=ml(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=hl(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=hl(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var vl=50,yl=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:_l},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=gl(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<vl&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=gl(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},bl=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Xc(e,t)||{};if(l==null)return{};let d=ml(u),f={x:n,y:r},p=nl(i),m=el(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Uc(d[_],T),D=Uc(d[v],T),O=E,ee=C-h[m]-D,k=C/2-h[m]/2+w,A=Yc(O,k,ee),j=!c.arrow&&Qc(i)!=null&&k!==A&&a.reference[m]/2-(k<O?E:D)-h[m]/2<0,M=j?k<O?k-O:k-ee:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),xl=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Xc(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Zc(r),_=tl(o),v=Zc(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[fl(o)]:il(o)),x=p!==`none`;!d&&x&&b.push(...dl(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=rl(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==tl(t))||T.every(e=>tl(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=tl(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function Sl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Cl(e){return Hc.some(t=>e[t]>=0)}var wl=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Xc(e,t);switch(i){case`referenceHidden`:{let e=Sl(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Cl(e)}}}case`escaped`:{let e=Sl(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Cl(e)}}}default:return{}}}}},Tl=new Set([`left`,`top`]);async function El(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Zc(n),s=Qc(n),c=tl(n)===`y`,l=Tl.has(o)?-1:1,u=a&&c?-1:1,d=Xc(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Dl=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await El(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ol=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Xc(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=tl(Zc(i)),p=$c(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Yc(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Yc(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},kl=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Xc(e,t),u={x:n,y:r},d=tl(i),f=$c(d),p=u[f],m=u[d],h=Xc(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Tl.has(Zc(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Al=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Xc(e,t),u=await o.detectOverflow(t,l),d=Zc(i),f=Qc(i),p=tl(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Uc(h-u[g],v),x=Uc(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Wc(u.left,0),t=Wc(u.right,0),n=Wc(u.top,0),r=Wc(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Wc(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Wc(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function jl(){return typeof window<`u`}function Ml(e){return Fl(e)?(e.nodeName||``).toLowerCase():`#document`}function Nl(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pl(e){return((Fl(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Fl(e){return jl()?e instanceof Node||e instanceof Nl(e).Node:!1}function Il(e){return jl()?e instanceof Element||e instanceof Nl(e).Element:!1}function Ll(e){return jl()?e instanceof HTMLElement||e instanceof Nl(e).HTMLElement:!1}function Rl(e){return!jl()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Nl(e).ShadowRoot}function zl(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Jl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Bl(e){return/^(table|td|th)$/.test(Ml(e))}function K(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var q=/transform|translate|scale|rotate|perspective|filter/,Vl=/paint|layout|strict|content/,Hl=e=>!!e&&e!==`none`,Ul;function Wl(e){let t=Il(e)?Jl(e):e;return Hl(t.transform)||Hl(t.translate)||Hl(t.scale)||Hl(t.rotate)||Hl(t.perspective)||!Kl()&&(Hl(t.backdropFilter)||Hl(t.filter))||q.test(t.willChange||``)||Vl.test(t.contain||``)}function Gl(e){let t=Xl(e);for(;Ll(t)&&!ql(t);){if(Wl(t))return t;if(K(t))return null;t=Xl(t)}return null}function Kl(){return Ul??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Ul}function ql(e){return/^(html|body|#document)$/.test(Ml(e))}function Jl(e){return Nl(e).getComputedStyle(e)}function Yl(e){return Il(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xl(e){if(Ml(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Rl(e)&&e.host||Pl(e);return Rl(t)?t.host:t}function Zl(e){let t=Xl(e);return ql(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ll(t)&&zl(t)?t:Zl(t)}function Ql(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Zl(e),i=r===e.ownerDocument?.body,a=Nl(r);if(i){let e=$l(a);return t.concat(a,a.visualViewport||[],zl(r)?r:[],e&&n?Ql(e):[])}else return t.concat(r,Ql(r,[],n))}function $l(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eu(e){let t=Jl(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Ll(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Gc(n)!==a||Gc(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function tu(e){return Il(e)?e:e.contextElement}function nu(e){let t=tu(e);if(!Ll(t))return qc(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=eu(t),o=(a?Gc(n.width):n.width)/r,s=(a?Gc(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ru=qc(0);function iu(e){let t=Nl(e);return!Kl()||!t.visualViewport?ru:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function au(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nl(e)?!1:t}function ou(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=tu(e),o=qc(1);t&&(r?Il(r)&&(o=nu(r)):o=nu(e));let s=au(a,n,r)?iu(a):qc(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=Nl(a),t=r&&Il(r)?Nl(r):r,n=e,i=$l(n);for(;i&&r&&t!==n;){let e=nu(i),t=i.getBoundingClientRect(),r=Jl(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Nl(i),i=$l(n)}}return hl({width:u,height:d,x:c,y:l})}function su(e,t){let n=Yl(e).scrollLeft;return t?t.left+n:ou(Pl(e)).left+n}function cu(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-su(e,n),y:n.top+t.scrollTop}}function lu(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Pl(r),s=t?K(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=qc(1),u=qc(0),d=Ll(r);if((d||!d&&!a)&&((Ml(r)!==`body`||zl(o))&&(c=Yl(r)),d)){let e=ou(r);l=nu(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?cu(o,c):qc(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function uu(e){return Array.from(e.getClientRects())}function du(e){let t=Pl(e),n=Yl(e),r=e.ownerDocument.body,i=Wc(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Wc(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+su(e),s=-n.scrollTop;return Jl(r).direction===`rtl`&&(o+=Wc(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var fu=25;function pu(e,t){let n=Nl(e),r=Pl(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Kl();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=su(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=fu&&(a-=o)}else l<=fu&&(a+=l);return{width:a,height:o,x:s,y:c}}function mu(e,t){let n=ou(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ll(e)?nu(e):qc(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function hu(e,t,n){let r;if(t===`viewport`)r=pu(e,n);else if(t===`document`)r=du(Pl(e));else if(Il(t))r=mu(t,n);else{let n=iu(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return hl(r)}function gu(e,t){let n=Xl(e);return n===t||!Il(n)||ql(n)?!1:Jl(n).position===`fixed`||gu(n,t)}function _u(e,t){let n=t.get(e);if(n)return n;let r=Ql(e,[],!1).filter(e=>Il(e)&&Ml(e)!==`body`),i=null,a=Jl(e).position===`fixed`,o=a?Xl(e):e;for(;Il(o)&&!ql(o);){let t=Jl(o),n=Wl(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||zl(o)&&!n&&gu(e,o))?r=r.filter(e=>e!==o):i=t,o=Xl(o)}return t.set(e,r),r}function vu(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?K(t)?[]:_u(t,this._c):[].concat(n),r],o=hu(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=hu(t,a[e],i);s=Wc(n.top,s),c=Uc(n.right,c),l=Uc(n.bottom,l),u=Wc(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function yu(e){let{width:t,height:n}=eu(e);return{width:t,height:n}}function bu(e,t,n){let r=Ll(t),i=Pl(t),a=n===`fixed`,o=ou(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=qc(0);function l(){c.x=su(i)}if(r||!r&&!a)if((Ml(t)!==`body`||zl(i))&&(s=Yl(t)),r){let e=ou(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?cu(i,s):qc(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function xu(e){return Jl(e).position===`static`}function Su(e,t){if(!Ll(e)||Jl(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Pl(e)===n&&(n=n.ownerDocument.body),n}function Cu(e,t){let n=Nl(e);if(K(e))return n;if(!Ll(e)){let t=Xl(e);for(;t&&!ql(t);){if(Il(t)&&!xu(t))return t;t=Xl(t)}return n}let r=Su(e,t);for(;r&&Bl(r)&&xu(r);)r=Su(r,t);return r&&ql(r)&&xu(r)&&!Wl(r)?n:r||Gl(e)||n}var wu=async function(e){let t=this.getOffsetParent||Cu,n=this.getDimensions,r=await n(e.floating);return{reference:bu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Tu(e){return Jl(e).direction===`rtl`}var Eu={convertOffsetParentRelativeRectToViewportRelativeRect:lu,getDocumentElement:Pl,getClippingRect:vu,getOffsetParent:Cu,getElementRects:wu,getClientRects:uu,getDimensions:yu,getScale:nu,isElement:Il,isRTL:Tu};function Du(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ou(e,t){let n=null,r,i=Pl(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Kc(d),h=Kc(i.clientWidth-(u+f)),g=Kc(i.clientHeight-(d+p)),_=Kc(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Wc(0,Uc(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Du(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function ku(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=tu(e),u=i||a?[...l?Ql(l):[],...t?Ql(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ou(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ou(e):null;c&&g();function g(){let t=ou(e);h&&!Du(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Au=Dl,ju=Ol,Mu=xl,Nu=Al,Pu=wl,Fu=bl,Iu=kl,Lu=(e,t,n)=>{let r=new Map,i={platform:Eu,...n},a={...i.platform,_c:r};return yl(e,t,{...i,platform:a})},Ru=typeof document<`u`?d.useLayoutEffect:function(){};function zu(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,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!zu(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Bu(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vu(e,t){let n=Bu(e);return Math.round(t*n)/n}function Hu(e){let t=d.useRef(e);return Ru(()=>{t.current=e}),t}function Uu(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,p]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=d.useState(r);zu(m,r)||h(r);let[g,_]=d.useState(null),[v,y]=d.useState(null),b=d.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=d.useCallback(e=>{e!==T.current&&(T.current=e,y(e))},[]),S=a||g,C=o||v,w=d.useRef(null),T=d.useRef(null),E=d.useRef(u),D=c!=null,O=Hu(c),ee=Hu(i),k=Hu(l),A=d.useCallback(()=>{if(!w.current||!T.current)return;let e={placement:t,strategy:n,middleware:m};ee.current&&(e.platform=ee.current),Lu(w.current,T.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!zu(E.current,t)&&(E.current=t,f.flushSync(()=>{p(t)}))})},[m,t,n,ee,k]);Ru(()=>{l===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[l]);let j=d.useRef(!1);Ru(()=>(j.current=!0,()=>{j.current=!1}),[]),Ru(()=>{if(S&&(w.current=S),C&&(T.current=C),S&&C){if(O.current)return O.current(S,C,A);A()}},[S,C,A,O,D]);let M=d.useMemo(()=>({reference:w,floating:T,setReference:b,setFloating:x}),[b,x]),te=d.useMemo(()=>({reference:S,floating:C}),[S,C]),N=d.useMemo(()=>{let e={position:n,left:0,top:0};if(!te.floating)return e;let t=Vu(te.floating,u.x),r=Vu(te.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Bu(te.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,te.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:A,refs:M,elements:te,floatingStyles:N}),[u,A,M,te,N])}var Wu=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Fu({element:r.current,padding:i}).fn(n):r?Fu({element:r,padding:i}).fn(n):{}}}},Gu=(e,t)=>{let n=Au(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ku=(e,t)=>{let n=ju(e);return{name:n.name,fn:n.fn,options:[e,t]}},qu=(e,t)=>({fn:Iu(e).fn,options:[e,t]}),Ju=(e,t)=>{let n=Mu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yu=(e,t)=>{let n=Nu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xu=(e,t)=>{let n=Pu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zu=(e,t)=>{let n=Wu(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qu=`Arrow`,$u=d.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,U.jsx)(yc.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,U.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});$u.displayName=Qu;var ed=$u;function td(e){let[t,n]=d.useState(void 0);return Rc(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var nd=`Popper`,[rd,id]=dc(nd),[ad,od]=rd(nd),sd=e=>{let{__scopePopper:t,children:n}=e,[r,i]=d.useState(null);return(0,U.jsx)(ad,{scope:t,anchor:r,onAnchorChange:i,children:n})};sd.displayName=nd;var cd=`PopperAnchor`,ld=d.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=od(cd,n),o=d.useRef(null),s=Zs(t,o),c=d.useRef(null);return d.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,U.jsx)(yc.div,{...i,ref:s})});ld.displayName=cd;var ud=`PopperContent`,[dd,fd]=rd(ud),pd=d.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:f=`partial`,hideWhenDetached:p=!1,updatePositionStrategy:m=`optimized`,onPlaced:h,...g}=e,_=od(ud,n),[v,y]=d.useState(null),b=Zs(t,e=>y(e)),[x,S]=d.useState(null),C=td(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],ee=O.length>0,k={padding:D,boundary:O.filter(_d),altBoundary:ee},{refs:A,floatingStyles:j,placement:M,isPositioned:te,middlewareData:N}=Uu({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>ku(...e,{animationFrame:m===`always`}),elements:{reference:_.anchor},middleware:[Gu({mainAxis:i+T,alignmentAxis:o}),c&&Ku({mainAxis:!0,crossAxis:!1,limiter:f===`partial`?qu():void 0,...k}),c&&Ju({...k}),Yu({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&Zu({element:x,padding:s}),vd({arrowWidth:w,arrowHeight:T}),p&&Xu({strategy:`referenceHidden`,...k})]}),[P,F]=yd(M),ne=xc(h);Rc(()=>{te&&ne?.()},[te,ne]);let re=N.arrow?.x,ie=N.arrow?.y,ae=N.arrow?.centerOffset!==0,[I,L]=d.useState();return Rc(()=>{v&&L(window.getComputedStyle(v).zIndex)},[v]),(0,U.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:te?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:I,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(` `),...N.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,U.jsx)(dd,{scope:n,placedSide:P,onArrowChange:S,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,U.jsx)(yc.div,{"data-side":P,"data-align":F,...g,ref:b,style:{...g.style,animation:te?void 0:`none`}})})})});pd.displayName=ud;var md=`PopperArrow`,hd={top:`bottom`,right:`left`,bottom:`top`,left:`right`},gd=d.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=fd(md,n),a=hd[i.placedSide];return(0,U.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,U.jsx)(ed,{...r,ref:t,style:{...r.style,display:`block`}})})});gd.displayName=md;function _d(e){return e!==null}var vd=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=yd(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function yd(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var bd=sd,xd=ld,Sd=pd,Cd=gd,J=`Portal`,wd=d.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=d.useState(!1);Rc(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?f.createPortal((0,U.jsx)(yc.div,{...r,ref:t}),o):null});wd.displayName=J;function Td(e,t){return d.useReducer((e,n)=>t[e][n]??e,e)}var Ed=e=>{let{present:t,children:n}=e,r=Dd(t),i=typeof n==`function`?n({present:r.isPresent}):d.Children.only(n),a=Zs(r.ref,kd(i));return typeof n==`function`||r.isPresent?d.cloneElement(i,{ref:a}):null};Ed.displayName=`Presence`;function Dd(e){let[t,n]=d.useState(),r=d.useRef(null),i=d.useRef(e),a=d.useRef(`none`),[o,s]=Td(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return d.useEffect(()=>{let e=Od(r.current);a.current=o===`mounted`?e:`none`},[o]),Rc(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Od(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Rc(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Od(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Od(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:d.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Od(e){return e?.animationName||`none`}function kd(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 Ad=Symbol(`radix.slottable`);function jd(e){let t=({children:e})=>(0,U.jsx)(U.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Ad,t}var Md=d.useInsertionEffect||Rc;function Nd({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Pd({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=d.useRef(e!==void 0);d.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`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.`),t.current=s},[s,r])}return[c,d.useCallback(t=>{if(s){let n=Fd(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Pd({defaultProp:e,onChange:t}){let[n,r]=d.useState(e),i=d.useRef(n),a=d.useRef(t);return Md(()=>{a.current=t},[t]),d.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Fd(e){return typeof e==`function`}var Id=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`}),Ld=`VisuallyHidden`,Rd=d.forwardRef((e,t)=>(0,U.jsx)(yc.span,{...e,ref:t,style:{...Id,...e.style}}));Rd.displayName=Ld;var zd=Rd,[Bd,Vd]=dc(`Tooltip`,[id]),Hd=id(),Ud=`TooltipProvider`,Wd=700,Gd=`tooltip.open`,[Kd,qd]=Bd(Ud),Jd=e=>{let{__scopeTooltip:t,delayDuration:n=Wd,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=d.useRef(!0),s=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,U.jsx)(Kd,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:d.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};Jd.displayName=Ud;var Yd=`Tooltip`,[Xd,Zd]=Bd(Yd),Qd=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=qd(Yd,e.__scopeTooltip),l=Hd(t),[u,f]=d.useState(null),p=Vc(),m=d.useRef(0),h=o??c.disableHoverableContent,g=s??c.delayDuration,_=d.useRef(!1),[v,y]=Nd({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(Gd))):c.onClose(),a?.(e)},caller:Yd}),b=d.useMemo(()=>v?_.current?`delayed-open`:`instant-open`:`closed`,[v]),x=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,_.current=!1,y(!0)},[y]),S=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y(!1)},[y]),C=d.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{_.current=!0,y(!0),m.current=0},g)},[g,y]);return d.useEffect(()=>()=>{m.current&&=(window.clearTimeout(m.current),0)},[]),(0,U.jsx)(bd,{...l,children:(0,U.jsx)(Xd,{scope:t,contentId:p,open:v,stateAttribute:b,trigger:u,onTriggerChange:f,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?C():x()},[c.isOpenDelayedRef,C,x]),onTriggerLeave:d.useCallback(()=>{h?S():(window.clearTimeout(m.current),m.current=0)},[S,h]),onOpen:x,onClose:S,disableHoverableContent:h,children:n})})};Qd.displayName=Yd;var $d=`TooltipTrigger`,ef=d.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Zd($d,n),a=qd($d,n),o=Hd(n),s=Zs(t,d.useRef(null),i.onTriggerChange),c=d.useRef(!1),l=d.useRef(!1),u=d.useCallback(()=>c.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,U.jsx)(xd,{asChild:!0,...o,children:(0,U.jsx)(yc.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:uc(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:uc(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:uc(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:uc(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:uc(e.onBlur,i.onClose),onClick:uc(e.onClick,i.onClose)})})});ef.displayName=$d;var tf=`TooltipPortal`,[nf,rf]=Bd(tf,{forceMount:void 0}),af=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Zd(tf,t);return(0,U.jsx)(nf,{scope:t,forceMount:n,children:(0,U.jsx)(Ed,{present:n||a.open,children:(0,U.jsx)(wd,{asChild:!0,container:i,children:r})})})};af.displayName=tf;var of=`TooltipContent`,sf=d.forwardRef((e,t)=>{let n=rf(of,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Zd(of,e.__scopeTooltip);return(0,U.jsx)(Ed,{present:r||o.open,children:o.disableHoverableContent?(0,U.jsx)(ff,{side:i,...a,ref:t}):(0,U.jsx)(cf,{side:i,...a,ref:t})})}),cf=d.forwardRef((e,t)=>{let n=Zd(of,e.__scopeTooltip),r=qd(of,e.__scopeTooltip),i=d.useRef(null),a=Zs(t,i),[o,s]=d.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:f}=r,p=d.useCallback(()=>{s(null),f(!1)},[f]),m=d.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=gf(r,hf(r,n.getBoundingClientRect())),a=_f(t.getBoundingClientRect());s(yf([...i,...a])),f(!0)},[f]);return d.useEffect(()=>()=>p(),[p]),d.useEffect(()=>{if(c&&u){let e=e=>m(e,u),t=e=>m(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,m,p]),d.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!vf(n,o);r?p():i&&(p(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,p]),(0,U.jsx)(ff,{...e,ref:a})}),[lf,uf]=Bd(Yd,{isInside:!1}),df=jd(`TooltipContent`),ff=d.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=Zd(of,n),l=Hd(n),{onClose:u}=c;return d.useEffect(()=>(document.addEventListener(Gd,u),()=>document.removeEventListener(Gd,u)),[u]),d.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,U.jsx)(kc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,U.jsxs)(Sd,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.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:[(0,U.jsx)(df,{children:r}),(0,U.jsx)(lf,{scope:n,isInside:!0,children:(0,U.jsx)(zd,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});sf.displayName=of;var pf=`TooltipArrow`,mf=d.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Hd(n);return uf(pf,n).isInside?null:(0,U.jsx)(Cd,{...i,...r,ref:t})});mf.displayName=pf;function hf(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function gf(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function _f(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function vf(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function yf(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),bf(t)}function bf(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}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 xf=Jd,Sf=Qd,Cf=ef,wf=af,Tf=sf,Ef=xf,Df=Sf,Of=Cf,kf=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,U.jsx)(wf,{children:(0,U.jsx)(Tf,{ref:r,sideOffset:t,className:Gs(`z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 origin-[--radix-tooltip-content-transform-origin]`,e),...n})}));kf.displayName=Tf.displayName;var Af=0;function jf(){d.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Mf()),document.body.insertAdjacentElement(`beforeend`,e[1]??Mf()),Af++,()=>{Af===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Af--}},[])}function Mf(){let 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 Nf=`focusScope.autoFocusOnMount`,Pf=`focusScope.autoFocusOnUnmount`,Ff={bubbles:!1,cancelable:!0},If=`FocusScope`,Lf=d.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=d.useState(null),l=xc(i),u=xc(a),f=d.useRef(null),p=Zs(t,e=>c(e)),m=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let e=function(e){if(m.paused||!s)return;let t=e.target;s.contains(t)?f.current=t:Wf(f.current,{select:!0})},t=function(e){if(m.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||Wf(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&Wf(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,m.paused]),d.useEffect(()=>{if(s){Gf.add(m);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(Nf,Ff);s.addEventListener(Nf,l),s.dispatchEvent(t),t.defaultPrevented||(Rf(Jf(Bf(s)),{select:!0}),document.activeElement===e&&Wf(s))}return()=>{s.removeEventListener(Nf,l),setTimeout(()=>{let t=new CustomEvent(Pf,Ff);s.addEventListener(Pf,u),s.dispatchEvent(t),t.defaultPrevented||Wf(e??document.body,{select:!0}),s.removeEventListener(Pf,u),Gf.remove(m)},0)}}},[s,l,u,m]);let h=d.useCallback(e=>{if(!n&&!r||m.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=zf(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&Wf(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&Wf(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,m.paused]);return(0,U.jsx)(yc.div,{tabIndex:-1,...o,ref:p,onKeyDown:h})});Lf.displayName=If;function Rf(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(Wf(r,{select:t}),document.activeElement!==n)return}function zf(e){let t=Bf(e);return[Vf(t,e),Vf(t.reverse(),e)]}function Bf(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Vf(e,t){for(let n of e)if(!Hf(n,{upTo:t}))return n}function Hf(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 Uf(e){return e instanceof HTMLInputElement&&`select`in e}function Wf(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Uf(e)&&t&&e.select()}}var Gf=Kf();function Kf(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=qf(e,t),e.unshift(t)},remove(t){e=qf(e,t),e[0]?.resume()}}}function qf(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Jf(e){return e.filter(e=>e.tagName!==`A`)}function Yf(e){let t=Xf(e),n=d.forwardRef((e,n)=>{let{children:r,...i}=e,a=d.Children.toArray(r),o=a.find(Qf);if(o){let e=o.props.children,r=a.map(t=>t===o?d.Children.count(e)>1?d.Children.only(null):d.isValidElement(e)?e.props.children:null:t);return(0,U.jsx)(t,{...i,ref:n,children:d.isValidElement(e)?d.cloneElement(e,void 0,r):null})}return(0,U.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Xf(e){let t=d.forwardRef((e,t)=>{let{children:n,...r}=e;if(d.isValidElement(n)){let e=ep(n),i=$f(r,n.props);return n.type!==d.Fragment&&(i.ref=t?Xs(t,e):e),d.cloneElement(n,i)}return d.Children.count(n)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zf=Symbol(`radix.slottable`);function Qf(e){return d.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Zf}function $f(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function ep(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 tp=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},np=new WeakMap,rp=new WeakMap,ip={},ap=0,op=function(e){return e&&(e.host||op(e.parentNode))},sp=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=op(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},cp=function(e,t,n,r){var i=sp(t,Array.isArray(e)?e:[e]);ip[n]||(ip[n]=new WeakMap);var a=ip[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(np.get(e)||0)+1,l=(a.get(e)||0)+1;np.set(e,c),a.set(e,l),o.push(e),c===1&&i&&rp.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),ap++,function(){o.forEach(function(e){var t=np.get(e)-1,i=a.get(e)-1;np.set(e,t),a.set(e,i),t||(rp.has(e)||e.removeAttribute(r),rp.delete(e)),i||e.removeAttribute(n)}),ap--,ap||(np=new WeakMap,np=new WeakMap,rp=new WeakMap,ip={})}},lp=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||tp(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),cp(r,i,n,`aria-hidden`)):function(){return null}},up=function(){return up=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},up.apply(this,arguments)};function dp(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function fp(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var pp=`right-scroll-bar-position`,mp=`width-before-scroll-bar`,hp=`with-scroll-bars-hidden`,gp=`--removed-body-scroll-bar-size`;function _p(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function vp(e,t){var n=(0,d.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var yp=typeof window<`u`?d.useLayoutEffect:d.useEffect,bp=new WeakMap;function xp(e,t){var n=vp(t||null,function(t){return e.forEach(function(e){return _p(e,t)})});return yp(function(){var t=bp.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||_p(e,null)}),i.forEach(function(e){r.has(e)||_p(e,a)})}bp.set(n,e)},[e]),n}function Sp(e){return e}function Cp(e,t){t===void 0&&(t=Sp);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function wp(e){e===void 0&&(e={});var t=Cp(null);return t.options=up({async:!0,ssr:!1},e),t}var Tp=function(e){var t=e.sideCar,n=dp(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return d.createElement(r,up({},n))};Tp.isSideCarExport=!0;function Ep(e,t){return e.useMedium(t),Tp}var Dp=wp(),Op=function(){},kp=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:Op,onWheelCapture:Op,onTouchMoveCapture:Op}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=dp(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=p,C=xp([n,t]),w=up(up({},x),i);return d.createElement(d.Fragment,null,u&&d.createElement(S,{sideCar:Dp,removeScrollBar:l,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?d.cloneElement(d.Children.only(s),up(up({},w),{ref:C})):d.createElement(y,up({},w,{className:c,ref:C}),s))});kp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},kp.classNames={fullWidth:mp,zeroRight:pp};var Ap,jp=function(){if(Ap)return Ap;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Mp(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=jp();return t&&e.setAttribute(`nonce`,t),e}function Np(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Pp(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Fp=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Mp())&&(Np(t,n),Pp(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ip=function(){var e=Fp();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Lp=function(){var e=Ip();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Rp={left:0,top:0,right:0,gap:0},zp=function(e){return parseInt(e||``,10)||0},Bp=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[zp(n),zp(r),zp(i)]},Vp=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Rp;var t=Bp(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Hp=Lp(),Up=`data-scroll-locked`,Wp=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
13
- .${hp} {
14
- overflow: hidden ${r};
15
- padding-right: ${s}px ${r};
16
- }
17
- body[${Up}] {
18
- overflow: hidden ${r};
19
- overscroll-behavior: contain;
20
- ${[t&&`position: relative ${r};`,n===`margin`&&`
21
- padding-left: ${i}px;
22
- padding-top: ${a}px;
23
- padding-right: ${o}px;
24
- margin-left:0;
25
- margin-top:0;
26
- margin-right: ${s}px ${r};
27
- `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
28
- }
29
-
30
- .${pp} {
31
- right: ${s}px ${r};
32
- }
33
-
34
- .${mp} {
35
- margin-right: ${s}px ${r};
36
- }
37
-
38
- .${pp} .${pp} {
39
- right: 0 ${r};
40
- }
41
-
42
- .${mp} .${mp} {
43
- margin-right: 0 ${r};
44
- }
45
-
46
- body[${Up}] {
47
- ${gp}: ${s}px;
48
- }
49
- `},Gp=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Kp=function(){d.useEffect(function(){return document.body.setAttribute(Up,(Gp()+1).toString()),function(){var e=Gp()-1;e<=0?document.body.removeAttribute(Up):document.body.setAttribute(Up,e.toString())}},[])},qp=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Kp();var a=d.useMemo(function(){return Vp(i)},[i]);return d.createElement(Hp,{styles:Wp(a,!t,i,n?``:`!important`)})},Jp=!1;if(typeof window<`u`)try{var Yp=Object.defineProperty({},`passive`,{get:function(){return Jp=!0,!0}});window.addEventListener(`test`,Yp,Yp),window.removeEventListener(`test`,Yp,Yp)}catch{Jp=!1}var Xp=Jp?{passive:!1}:!1,Zp=function(e){return e.tagName===`TEXTAREA`},Qp=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Zp(e)&&n[t]===`visible`)},$p=function(e){return Qp(e,`overflowY`)},em=function(e){return Qp(e,`overflowX`)},tm=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),im(e,r)){var i=am(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},nm=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},rm=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},im=function(e,t){return e===`v`?$p(t):em(t)},am=function(e,t){return e===`v`?nm(t):rm(t)},om=function(e,t){return e===`h`&&t===`rtl`?-1:1},sm=function(e,t,n,r,i){var a=om(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=am(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&im(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},cm=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},lm=function(e){return[e.deltaX,e.deltaY]},um=function(e){return e&&`current`in e?e.current:e},dm=function(e,t){return e[0]===t[0]&&e[1]===t[1]},fm=function(e){return`
50
- .block-interactivity-${e} {pointer-events: none;}
51
- .allow-interactivity-${e} {pointer-events: all;}
52
- `},pm=0,mm=[];function hm(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),i=d.useState(pm++)[0],a=d.useState(Lp)[0],o=d.useRef(e);d.useEffect(function(){o.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=fp([e.lockRef.current],(e.shards||[]).map(um),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=d.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=cm(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=tm(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=tm(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return sm(h,t,e,h===`h`?s:c,!0)},[]),c=d.useCallback(function(e){var n=e;if(!(!mm.length||mm[mm.length-1]!==a)){var r=`deltaY`in n?lm(n):cm(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&dm(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(um).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=d.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:gm(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=d.useCallback(function(e){n.current=cm(e),r.current=void 0},[]),f=d.useCallback(function(t){l(t.type,lm(t),t.target,s(t,e.lockRef.current))},[]),p=d.useCallback(function(t){l(t.type,cm(t),t.target,s(t,e.lockRef.current))},[]);d.useEffect(function(){return mm.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener(`wheel`,c,Xp),document.addEventListener(`touchmove`,c,Xp),document.addEventListener(`touchstart`,u,Xp),function(){mm=mm.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Xp),document.removeEventListener(`touchmove`,c,Xp),document.removeEventListener(`touchstart`,u,Xp)}},[]);var m=e.removeScrollBar,h=e.inert;return d.createElement(d.Fragment,null,h?d.createElement(a,{styles:fm(i)}):null,m?d.createElement(qp,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function gm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var _m=Ep(Dp,hm),vm=d.forwardRef(function(e,t){return d.createElement(kp,up({},e,{ref:t,sideCar:_m}))});vm.classNames=kp.classNames;var ym=`Popover`,[bm,xm]=dc(ym,[id]),Sm=id(),[Cm,wm]=bm(ym),Tm=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Sm(t),c=d.useRef(null),[l,u]=d.useState(!1),[f,p]=Nd({prop:r,defaultProp:i??!1,onChange:a,caller:ym});return(0,U.jsx)(bd,{...s,children:(0,U.jsx)(Cm,{scope:t,contentId:Vc(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(e=>!e),[p]),hasCustomAnchor:l,onCustomAnchorAdd:d.useCallback(()=>u(!0),[]),onCustomAnchorRemove:d.useCallback(()=>u(!1),[]),modal:o,children:n})})};Tm.displayName=ym;var Em=`PopoverAnchor`,Dm=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=wm(Em,n),a=Sm(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:s}=i;return d.useEffect(()=>(o(),()=>s()),[o,s]),(0,U.jsx)(xd,{...a,...r,ref:t})});Dm.displayName=Em;var Om=`PopoverTrigger`,km=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=wm(Om,n),a=Sm(n),o=Zs(t,i.triggerRef),s=(0,U.jsx)(yc.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Wm(i.open),...r,ref:o,onClick:uc(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,U.jsx)(xd,{asChild:!0,...a,children:s})});km.displayName=Om;var Am=`PopoverPortal`,[jm,Mm]=bm(Am,{forceMount:void 0}),Nm=e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=wm(Am,t);return(0,U.jsx)(jm,{scope:t,forceMount:n,children:(0,U.jsx)(Ed,{present:n||a.open,children:(0,U.jsx)(wd,{asChild:!0,container:i,children:r})})})};Nm.displayName=Am;var Pm=`PopoverContent`,Fm=d.forwardRef((e,t)=>{let n=Mm(Pm,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=wm(Pm,e.__scopePopover);return(0,U.jsx)(Ed,{present:r||a.open,children:a.modal?(0,U.jsx)(Lm,{...i,ref:t}):(0,U.jsx)(Rm,{...i,ref:t})})});Fm.displayName=Pm;var Im=Yf(`PopoverContent.RemoveScroll`),Lm=d.forwardRef((e,t)=>{let n=wm(Pm,e.__scopePopover),r=d.useRef(null),i=Zs(t,r),a=d.useRef(!1);return d.useEffect(()=>{let e=r.current;if(e)return lp(e)},[]),(0,U.jsx)(vm,{as:Im,allowPinchZoom:!0,children:(0,U.jsx)(zm,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:uc(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:uc(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;a.current=t.button===2||n},{checkForDefaultPrevented:!1}),onFocusOutside:uc(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),Rm=d.forwardRef((e,t)=>{let n=wm(Pm,e.__scopePopover),r=d.useRef(!1),i=d.useRef(!1);return(0,U.jsx)(zm,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),zm=d.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=wm(Pm,n),p=Sm(n);return jf(),(0,U.jsx)(Lf,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,U.jsx)(kc,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),children:(0,U.jsx)(Sd,{"data-state":Wm(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})}),Bm=`PopoverClose`,Vm=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=wm(Bm,n);return(0,U.jsx)(yc.button,{type:`button`,...r,ref:t,onClick:uc(e.onClick,()=>i.onOpenChange(!1))})});Vm.displayName=Bm;var Hm=`PopoverArrow`,Um=d.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,i=Sm(n);return(0,U.jsx)(Cd,{...i,...r,ref:t})});Um.displayName=Hm;function Wm(e){return e?`open`:`closed`}var Gm=Tm,Km=km,qm=Nm,Jm=Fm,Ym=Gm,Xm=Km,Zm=d.forwardRef(({className:e,align:t=`center`,sideOffset:n=4,...r},i)=>(0,U.jsx)(qm,{children:(0,U.jsx)(Jm,{ref:i,align:t,sideOffset:n,className:Gs(`z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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 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 origin-[--radix-popover-content-transform-origin]`,e),...r})}));Zm.displayName=Jm.displayName;var Qm=45e3;function $m(e){if(!e?.runtimeHost)return{state:`local`,label:`Local control plane`,badgeLabel:`Local`,detail:`No daemon ownership metadata is loaded in this control-plane session.`,tone:`outline`};let t=e.runtimeHost.workspaceOwner?.lastSeenAt,n=eh(t),r=`${e.runtimeHost.endpoint.host}:${e.runtimeHost.endpoint.port}`;return n?{state:`stale`,label:`Daemon unreachable`,badgeLabel:`Stale daemon`,detail:t?`The last daemon heartbeat is stale for ${e.workspace.name}. Refresh state or restart the daemon before trusting live runtime status.`:`The daemon owner for ${e.workspace.name} is not reporting a recent heartbeat.`,tone:`destructive`,endpoint:r,ownerId:e.runtimeHost.ownerId,lastSeenAt:t}:{state:`attached`,label:`Attached to daemon`,badgeLabel:`Daemon`,detail:`Sessions and tasks are reading daemon-owned runtime state for ${e.workspace.name}.`,tone:`secondary`,endpoint:r,ownerId:e.runtimeHost.ownerId,lastSeenAt:t}}function eh(e){if(!e)return!1;let t=Date.parse(e);return Number.isFinite(t)?Date.now()-t>Qm:!1}function th({title:e,children:t,wide:n=!1,panelClassName:r}){return(0,U.jsxs)(`section`,{className:oo(`panel`,n&&`wide`,r),children:[(0,U.jsx)(`h2`,{children:e}),t]})}function nh({title:e,body:t}){return(0,U.jsxs)(`div`,{className:`empty-state`,children:[(0,U.jsx)(`strong`,{children:e}),(0,U.jsx)(`p`,{className:`muted`,children:t})]})}function rh({error:e,state:t}){return e?(0,U.jsxs)(`aside`,{className:`status-badge bad`,children:[`Error: `,e]}):t?(0,U.jsxs)(`aside`,{className:`status-badge`,children:[t.sessions.length,` sessions · `,t.heartbeat.tasks.length,` tasks`]}):(0,U.jsx)(`aside`,{className:`status-badge`,children:`Connecting...`})}function ih({state:e,onRefresh:t}){let n=$m(e);return(0,U.jsxs)(`section`,{className:`mx-4 mt-4 flex min-w-0 flex-col gap-3 rounded-xl border border-border bg-card/95 px-4 py-3 shadow-sm sm:mx-5`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,U.jsx)(`p`,{className:`truncate text-sm font-semibold text-foreground`,children:n.label}),(0,U.jsx)(W,{variant:n.tone,className:`w-fit shrink-0`,children:e?.workspace.name??`workspace`})]}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n.detail})]}),t?(0,U.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:t,children:`Refresh state`}):null]}),n.endpoint||n.ownerId||n.lastSeenAt?(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:[n.endpoint?(0,U.jsxs)(`span`,{children:[`endpoint=`,n.endpoint]}):null,n.ownerId?(0,U.jsxs)(`span`,{children:[`owner=`,n.ownerId]}):null,n.lastSeenAt?(0,U.jsxs)(`span`,{children:[`last seen=`,new Date(n.lastSeenAt).toLocaleTimeString()]}):null]}):null]})}function ah({state:e}){return e?(0,U.jsxs)(`span`,{className:`workspace-path-label`,children:[e.workspace.name,(0,U.jsxs)(`span`,{className:`muted`,children:[` · `,fo(e.workspace.anchorRoot)]})]}):null}function oh({state:e,disabled:t,onSelect:n}){return!e||e.workspaces.length<=1?null:(0,U.jsxs)(`label`,{className:`workspace-switcher`,children:[(0,U.jsx)(`span`,{className:`muted`,children:`Workspace`}),(0,U.jsx)(`select`,{value:e.activeWorkspaceId,disabled:t,onChange:e=>n(e.target.value),"data-testid":`workspace-switcher`,children:e.workspaces.map(e=>(0,U.jsx)(`option`,{value:e.id,children:e.name},e.id))})]})}function Y({children:e,tone:t}){return(0,U.jsx)(`span`,{className:oo(`pill`,t),children:e})}function sh({children:e}){return(0,U.jsx)(`pre`,{className:`code-block`,children:e})}function ch({title:e,subtitle:t,actions:n}){return(0,U.jsxs)(`header`,{className:`workspace-header`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h2`,{children:e}),(0,U.jsx)(`p`,{className:`muted`,children:t})]}),n]})}function lh({title:e,actions:t,children:n,testId:r}){return(0,U.jsxs)(`section`,{className:`side-section`,"data-testid":r,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,U.jsx)(`h3`,{children:e}),t]}),n]})}function uh({state:e,error:t,activeSection:n,sessionPath:r,children:i,onRefresh:a,onSetActiveWorkspace:o,onCaptureDebugSnapshot:s}){let c=$m(e);return(0,U.jsxs)(`main`,{className:`app-shell`,children:[(0,U.jsxs)(`header`,{className:`toolbar`,children:[(0,U.jsxs)(`nav`,{className:`tabs toolbar-tabs`,"aria-label":`Control plane sections`,children:[(0,U.jsx)(dh,{active:n===`overview`,to:`/overview`,children:`Overview`}),(0,U.jsx)(dh,{active:n===`sessions`,to:r,children:`Sessions`}),(0,U.jsx)(dh,{active:n===`tasks`,to:`/tasks`,children:`Tasks`}),(0,U.jsx)(dh,{active:n===`workspaces`,to:`/workspaces`,children:`Workspaces`})]}),(0,U.jsxs)(`div`,{className:`toolbar-status`,children:[(0,U.jsx)(`div`,{className:`toolbar-actions`,children:(0,U.jsx)(fh,{onCapture:s})}),(0,U.jsxs)(`div`,{className:`topbar-title-row`,children:[(0,U.jsx)(`p`,{className:`topbar-eyebrow`,children:`Heddle Control Plane`}),(0,U.jsx)(oh,{state:e,onSelect:o}),(0,U.jsx)(ah,{state:e})]}),(0,U.jsx)(rh,{error:t,state:e})]})]}),t||c.state===`stale`?(0,U.jsx)(ih,{state:e,onRefresh:a}):null,i]})}function dh({active:e,to:t,children:n}){return(0,U.jsx)(yn,{className:`tab-button ${e?`active`:``}`,to:t,"aria-current":e?`page`:void 0,"data-testid":`nav-${n.toLowerCase()}`,children:n})}function fh({onCapture:e}){return(0,U.jsxs)(`details`,{className:`debug-snapshot-menu`,children:[(0,U.jsx)(`summary`,{className:`debug-button`,children:`Snapshot`}),(0,U.jsxs)(`div`,{className:`debug-snapshot-options`,role:`menu`,"aria-label":`Debug layout snapshot options`,children:[(0,U.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>e(`none`),children:`DOM + layout only`}),(0,U.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:()=>e(`auto`),children:`Include screenshot`})]})]})}var ph=[{value:`overview`,label:`Overview`},{value:`sessions`,label:`Sessions`},{value:`tasks`,label:`Tasks`},{value:`workspaces`,label:`Workspaces`}];function mh({section:e,onSectionChange:t,state:n,error:r,children:i,onCaptureDebugSnapshot:a,onSetActiveWorkspace:o,onRefresh:s}){let c=r?{state:`stale`,label:`Error`,badgeLabel:`Error`,detail:r,tone:`destructive`,endpoint:void 0}:$m(n);return(0,U.jsxs)(`main`,{className:`flex h-dvh flex-col overflow-hidden bg-background pt-[env(safe-area-inset-top)] text-foreground`,children:[(0,U.jsxs)(`header`,{className:`shrink-0 border-b border-border bg-card/95 px-4 py-3`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center justify-between gap-2`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,U.jsx)(`span`,{className:`text-xs font-semibold tracking-normal text-foreground`,children:`Heddle`})}),(0,U.jsx)(`p`,{className:`m-0 truncate text-xs leading-5 text-muted-foreground`,children:n?`${n.workspace.name} · ${fo(n.workspace.anchorRoot)}`:`Reading workspace state`}),n&&n.workspaces.length>1&&o?(0,U.jsxs)(`label`,{className:`mt-1 flex items-center gap-2 text-[11px] text-muted-foreground`,children:[(0,U.jsx)(`span`,{children:`Workspace`}),(0,U.jsx)(`select`,{className:`h-7 min-w-0 rounded-md border border-border bg-background px-2 text-[11px] text-foreground`,value:n.activeWorkspaceId,onChange:e=>o(e.target.value),children:n.workspaces.map(e=>(0,U.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}):null]}),(0,U.jsx)(`div`,{className:`flex items-center gap-2`,children:a?(0,U.jsx)(hh,{onCapture:a}):null})]}),r||c.state===`stale`?(0,U.jsxs)(`div`,{className:`mt-2 flex min-w-0 flex-wrap gap-x-3 gap-y-1 text-[11px] text-muted-foreground`,children:[(0,U.jsx)(`span`,{className:`truncate`,children:c.detail}),c.endpoint?(0,U.jsxs)(`span`,{className:`shrink-0`,children:[`endpoint=`,c.endpoint]}):null,s?(0,U.jsx)(`button`,{type:`button`,className:`text-[11px] text-accent`,onClick:s,children:`Refresh`}):null]}):null]}),(0,U.jsx)(`section`,{className:`min-h-0 flex-1 overflow-x-hidden overflow-y-auto bg-background`,children:i}),(0,U.jsx)(`nav`,{className:`grid shrink-0 grid-cols-4 gap-1 border-t border-border bg-card/95 px-3 py-2 pb-[calc(env(safe-area-inset-bottom)+0.5rem)]`,"aria-label":`Control plane sections`,children:ph.map(n=>(0,U.jsx)(G,{type:`button`,variant:e===n.value?`secondary`:`ghost`,size:`sm`,className:`h-9 rounded-md px-2 text-xs`,onClick:()=>t(n.value),"aria-current":e===n.value?`page`:void 0,"data-testid":`mobile-nav-${n.value}`,children:n.label},n.value))})]})}function hh({onCapture:e}){return(0,U.jsxs)(`details`,{className:`relative`,children:[(0,U.jsx)(`summary`,{className:`flex h-10 cursor-pointer list-none items-center rounded-md border border-border bg-secondary px-3 text-xs font-medium text-secondary-foreground marker:hidden`,children:`Snapshot`}),(0,U.jsxs)(`div`,{className:`absolute right-0 top-11 z-50 grid min-w-44 gap-1 rounded-md border border-border bg-popover p-1 shadow-lg`,children:[(0,U.jsx)(`button`,{type:`button`,className:`rounded-md px-3 py-2 text-left text-xs text-popover-foreground hover:bg-accent hover:text-accent-foreground`,onClick:()=>e(`none`),children:`DOM only`}),(0,U.jsx)(`button`,{type:`button`,className:`rounded-md px-3 py-2 text-left text-xs text-popover-foreground hover:bg-accent hover:text-accent-foreground`,onClick:()=>e(`auto`),children:`With screenshot`})]})]})}function gh({children:e,className:t=``,...n}){return(0,U.jsx)(`section`,{className:`min-w-0 rounded-2xl border border-border bg-card/95 p-4 shadow-sm sm:p-5 ${t}`,...n,children:e})}function _h({label:e,value:t}){return(0,U.jsxs)(`div`,{className:`min-w-0 rounded-xl border border-border bg-background/60 p-3`,children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:e}),(0,U.jsx)(`p`,{className:`mt-2 text-3xl font-semibold leading-none text-foreground sm:text-4xl`,children:t})]})}function vh({label:e,children:t}){return(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`dt`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:e}),(0,U.jsx)(`dd`,{className:`break-all text-sm text-foreground`,children:t})]})}function yh({session:e}){return(0,U.jsxs)(`article`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`h3`,{className:`truncate text-base font-semibold text-foreground`,children:e.name}),(0,U.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:lo(e.updatedAt)})]}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2 sm:max-w-[48%] sm:justify-end`,children:[(0,U.jsx)(W,{variant:`outline`,className:`max-w-full truncate`,children:e.model??`unset model`}),(0,U.jsxs)(W,{variant:`secondary`,className:`w-fit`,children:[e.turnCount,` turns`]})]})]}),e.lastSummary?(0,U.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:uo(e.lastSummary,120)}):null]})}function bh({run:e}){return(0,U.jsxs)(`article`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`h3`,{className:`truncate text-base font-semibold text-foreground`,children:e.id}),(0,U.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:lo(e.createdAt)})]}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap gap-2 sm:max-w-[48%] sm:justify-end`,children:[(0,U.jsx)(Sh,{value:e.status}),(0,U.jsx)(Sh,{value:e.decision})]})]}),(0,U.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:uo(e.summary,132)})]})}function xh({run:e}){return(0,U.jsxs)(`article`,{className:`rounded-xl border border-border bg-background/60 p-4`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`h3`,{className:`truncate text-base font-semibold text-foreground`,children:e.id}),(0,U.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:lo(e.finishedAt)})]}),(0,U.jsx)(Sh,{value:e.outcome})]}),(0,U.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:uo(e.summary,132)})]})}function Sh({value:e}){let t=so(e);return t===`good`?(0,U.jsx)(W,{className:`max-w-full truncate border-emerald-400/45 bg-emerald-950/90 text-emerald-50`,children:e}):t===`warn`?(0,U.jsx)(W,{className:`max-w-full truncate border-cyan-400/40 bg-primary/5 text-foreground`,children:e}):t===`bad`?(0,U.jsx)(W,{className:`max-w-full truncate border-red-300/45 bg-red-950/92 text-red-50`,children:e}):(0,U.jsx)(W,{variant:`outline`,className:`max-w-full truncate`,children:e})}function Ch({state:e}){let t=(0,d.useMemo)(()=>e.sessions.slice(0,3),[e.sessions]),n=(0,d.useMemo)(()=>e.heartbeat.runs.slice(0,3),[e.heartbeat.runs]),r=(0,d.useMemo)(()=>e.memory.runs.latest.slice(0,3),[e.memory.runs.latest]),i=$m(e);return(0,U.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-x-hidden overflow-y-auto px-3 pt-3 pb-[calc(env(safe-area-inset-bottom)+5.5rem)] sm:px-4 sm:pt-4 sm:pb-4`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 grid gap-4 lg:grid-cols-2`,children:[(0,U.jsxs)(gh,{className:`lg:col-span-1`,"data-testid":`overview-active-workspace`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Active workspace`}),(0,U.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:e.workspace.name}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:fo(e.workspace.anchorRoot)})]}),(0,U.jsx)(W,{variant:`secondary`,className:`w-fit max-w-full truncate`,children:e.workspace.id})]}),(0,U.jsxs)(`div`,{className:`mt-4 grid grid-cols-3 gap-3`,children:[(0,U.jsx)(_h,{label:`Repos`,value:po(e.workspace.repoRoots.length)}),(0,U.jsx)(_h,{label:`Sessions`,value:po(e.sessions.length)}),(0,U.jsx)(_h,{label:`Tasks`,value:po(e.heartbeat.tasks.length)})]}),(0,U.jsxs)(`dl`,{className:`mt-4 grid gap-3 text-sm`,children:[(0,U.jsx)(vh,{label:`Workspace path`,children:e.workspace.anchorRoot}),(0,U.jsx)(vh,{label:`State path`,children:e.workspace.stateRoot})]})]}),(0,U.jsxs)(gh,{className:`lg:col-span-1`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Runtime host`}),(0,U.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:i.label}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:i.detail})]}),(0,U.jsx)(W,{variant:i.tone,className:`w-fit max-w-full truncate`,children:i.state})]}),e.runtimeHost?(0,U.jsxs)(`dl`,{className:`mt-4 grid gap-3 text-sm`,children:[(0,U.jsxs)(vh,{label:`Endpoint`,children:[e.runtimeHost.endpoint.host,`:`,e.runtimeHost.endpoint.port]}),(0,U.jsx)(vh,{label:`Owner`,children:e.runtimeHost.ownerId}),(0,U.jsx)(vh,{label:`Last seen`,children:e.runtimeHost.workspaceOwner?.lastSeenAt??`unknown`}),(0,U.jsx)(vh,{label:`Registry`,children:e.runtimeHost.registryPath})]}):(0,U.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:`Daemon metadata is not loaded in this control-plane session.`})]})]}),(0,U.jsxs)(`div`,{className:`min-w-0 grid gap-4 xl:grid-cols-3`,children:[(0,U.jsxs)(gh,{className:`min-h-0`,"data-testid":`overview-memory-health`,children:[(0,U.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Recent sessions`}),(0,U.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Latest conversations`})]}),(0,U.jsxs)(W,{variant:`outline`,children:[po(e.sessions.length),` total`]})]}),t.length?(0,U.jsx)(`div`,{className:`space-y-3`,children:t.map(e=>(0,U.jsx)(yh,{session:e},e.id))}):(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No saved sessions yet.`}),e.sessions.length>t.length?(0,U.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:`Open Sessions to browse the full conversation catalog.`}):null]}),(0,U.jsxs)(gh,{className:`min-h-0`,children:[(0,U.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Recent task runs`}),(0,U.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Heartbeat activity`})]}),(0,U.jsxs)(W,{variant:`outline`,children:[po(e.heartbeat.tasks.length),` tasks`]})]}),n.length?(0,U.jsx)(`div`,{className:`space-y-3`,children:n.map(e=>(0,U.jsx)(bh,{run:e},e.id))}):(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No heartbeat runs recorded yet.`}),e.heartbeat.runs.length>n.length?(0,U.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:`Open Tasks to inspect the full run history.`}):null]}),(0,U.jsxs)(gh,{className:`min-h-0`,children:[(0,U.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Workspace memory`}),(0,U.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Catalog health`})]}),(0,U.jsx)(W,{variant:e.memory.catalog.ok?`secondary`:`destructive`,children:e.memory.catalog.ok?`ok`:`attention`})]}),(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,U.jsx)(_h,{label:`Notes`,value:po(e.memory.notes.count)}),(0,U.jsx)(_h,{label:`Pending`,value:po(e.memory.candidates.pending)})]}),e.memory.catalog.missing.length?(0,U.jsxs)(`div`,{className:`mt-4 rounded-xl border border-border bg-background/60 p-3`,children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Missing catalogs`}),(0,U.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:e.memory.catalog.missing.slice(0,4).join(`, `)})]}):null,r.length?(0,U.jsx)(`div`,{className:`mt-4 space-y-3`,children:r.map(e=>(0,U.jsx)(xh,{run:e},e.id))}):(0,U.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:`No memory maintenance runs recorded yet.`})]})]})]})}var wh=`openai`;function Th(e){let t=e.trim().toLowerCase();return t?t.startsWith(`gpt-`)||t.startsWith(`o1`)||t.startsWith(`o3`)||t.startsWith(`o4`)?`openai`:t.startsWith(`claude`)?`anthropic`:t.startsWith(`gemini`)?`google`:wh:wh}function Eh(e,t){if(!e||!t)return;let n=Th(e);if(n===`openai`)return Dh(`openai`,t.openai);if(n===`anthropic`)return Dh(`anthropic`,t.anthropic)}function Dh(e,t){switch(t.type){case`explicit-api-key`:return`auth=${e}-key`;case`env-api-key`:return`auth=${e}-key`;case`oauth`:return t.accountId?`auth=${e}-oauth:${t.accountId.slice(0,8)}`:`auth=${e}-oauth`;case`missing`:return`auth=${e}-missing`}}var Oh=(0,d.memo)(function({session:e,active:t,onClick:n}){return(0,U.jsxs)(`button`,{className:oo(`list-button`,t&&`active`),type:`button`,onClick:n,children:[(0,U.jsxs)(`div`,{className:`list-button-header`,children:[(0,U.jsx)(`strong`,{children:e.name}),(0,U.jsx)(`span`,{children:lo(e.updatedAt)})]}),(0,U.jsxs)(`div`,{className:`pills compact-pills`,children:[(0,U.jsx)(Y,{children:e.model??`unset model`}),(0,U.jsxs)(Y,{children:[`turns `,e.turnCount]})]}),e.lastPrompt?(0,U.jsxs)(`p`,{className:`button-copy`,children:[(0,U.jsx)(`strong`,{children:`Prompt:`}),` `,uo(e.lastPrompt,88)]}):null,e.lastSummary?(0,U.jsx)(`p`,{className:`button-copy muted-copy`,children:uo(e.lastSummary,120)}):null]})}),kh=(0,d.memo)(function({task:e,active:t,onClick:n}){let r=ho(e);return(0,U.jsxs)(`button`,{className:oo(`list-button`,t&&`active`),type:`button`,onClick:n,children:[(0,U.jsxs)(`div`,{className:`list-button-header`,children:[(0,U.jsx)(`strong`,{children:e.name||e.taskId}),(0,U.jsx)(`span`,{children:lo(e.nextRunAt)})]}),(0,U.jsxs)(`div`,{className:`pills compact-pills`,children:[(0,U.jsx)(Y,{tone:e.enabled?`good`:void 0,children:e.enabled?`enabled`:`disabled`}),(0,U.jsx)(Y,{tone:r.tone,children:r.label})]}),(0,U.jsx)(`p`,{className:`button-copy`,children:uo(e.task,112)})]})}),Ah=(0,d.memo)(function({run:e,active:t,onClick:n}){return(0,U.jsxs)(`button`,{className:oo(`list-button compact-button`,t&&`active`),type:`button`,onClick:n,children:[(0,U.jsxs)(`div`,{className:`list-button-header`,children:[(0,U.jsx)(`strong`,{children:e.id}),(0,U.jsx)(`span`,{children:lo(e.createdAt)})]}),(0,U.jsxs)(`div`,{className:`pills compact-pills`,children:[(0,U.jsx)(Y,{tone:so(e.status),children:e.status}),(0,U.jsx)(Y,{tone:so(e.decision),children:e.decision})]}),(0,U.jsx)(`p`,{className:`button-copy muted-copy`,children:uo(e.summary,96)})]})}),jh=(0,d.memo)(function({turn:e,active:t,onClick:n}){return(0,U.jsxs)(`button`,{className:oo(`list-button compact-button`,t&&`active`),type:`button`,onClick:n,children:[(0,U.jsxs)(`div`,{className:`list-button-header`,children:[(0,U.jsx)(`strong`,{children:e.prompt}),(0,U.jsxs)(`span`,{children:[e.steps,` steps`]})]}),(0,U.jsx)(`div`,{className:`pills compact-pills`,children:(0,U.jsx)(Y,{tone:so(e.outcome),children:e.outcome})}),(0,U.jsx)(`p`,{className:`button-copy muted-copy`,children:uo(e.summary,110)})]})}),Mh=(0,d.memo)(function({commands:e,empty:t}){return e.length?(0,U.jsx)(`div`,{className:`stack-list compact`,children:e.map(e=>(0,U.jsxs)(`div`,{className:`detail-card`,children:[(0,U.jsx)(`p`,{className:`card-title`,children:e.command}),(0,U.jsxs)(`div`,{className:`pills compact-pills`,children:[(0,U.jsx)(Y,{children:e.tool}),(0,U.jsxs)(Y,{tone:e.exitCode===0?`good`:e.exitCode===void 0?void 0:`bad`,children:[`exit `,e.exitCode??`n/a`]})]}),e.stdout?(0,U.jsx)(sh,{children:e.stdout}):null,e.stderr?(0,U.jsx)(sh,{children:e.stderr}):null]},`${e.tool}-${e.command}`))}):(0,U.jsx)(nh,{title:`No evidence`,body:t})});function Nh(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Ph=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fh=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ih={};function Lh(e,t){return((t||Ih).jsx?Fh:Ph).test(e)}var Rh=/[ \t\n\f\r]/g;function zh(e){return typeof e==`object`?e.type===`text`?Bh(e.value):!1:Bh(e)}function Bh(e){return e.replace(Rh,``)===``}var Vh=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Vh.prototype.normal={},Vh.prototype.property={},Vh.prototype.space=void 0;function Hh(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Vh(n,r,t)}function Uh(e){return e.toLowerCase()}var Wh=class{constructor(e,t){this.attribute=t,this.property=e}};Wh.prototype.attribute=``,Wh.prototype.booleanish=!1,Wh.prototype.boolean=!1,Wh.prototype.commaOrSpaceSeparated=!1,Wh.prototype.commaSeparated=!1,Wh.prototype.defined=!1,Wh.prototype.mustUseProperty=!1,Wh.prototype.number=!1,Wh.prototype.overloadedBoolean=!1,Wh.prototype.property=``,Wh.prototype.spaceSeparated=!1,Wh.prototype.space=void 0;var Gh=e({boolean:()=>X,booleanish:()=>qh,commaOrSpaceSeparated:()=>Zh,commaSeparated:()=>Xh,number:()=>Z,overloadedBoolean:()=>Jh,spaceSeparated:()=>Yh}),Kh=0,X=Qh(),qh=Qh(),Jh=Qh(),Z=Qh(),Yh=Qh(),Xh=Qh(),Zh=Qh();function Qh(){return 2**++Kh}var $h=Object.keys(Gh),eg=class extends Wh{constructor(e,t,n,r){let i=-1;if(super(e,t),tg(this,`space`,r),typeof n==`number`)for(;++i<$h.length;){let e=$h[i];tg(this,$h[i],(n&Gh[e])===Gh[e])}}};eg.prototype.defined=!0;function tg(e,t,n){n&&(e[t]=n)}function ng(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new eg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Uh(r)]=r,n[Uh(a.attribute)]=r}return new Vh(t,n,e.space)}var rg=ng({properties:{ariaActiveDescendant:null,ariaAtomic:qh,ariaAutoComplete:null,ariaBusy:qh,ariaChecked:qh,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Yh,ariaCurrent:null,ariaDescribedBy:Yh,ariaDetails:null,ariaDisabled:qh,ariaDropEffect:Yh,ariaErrorMessage:null,ariaExpanded:qh,ariaFlowTo:Yh,ariaGrabbed:qh,ariaHasPopup:null,ariaHidden:qh,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Yh,ariaLevel:Z,ariaLive:null,ariaModal:qh,ariaMultiLine:qh,ariaMultiSelectable:qh,ariaOrientation:null,ariaOwns:Yh,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:qh,ariaReadOnly:qh,ariaRelevant:null,ariaRequired:qh,ariaRoleDescription:Yh,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:qh,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ig(e,t){return t in e?e[t]:t}function ag(e,t){return ig(e,t.toLowerCase())}var og=ng({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Xh,acceptCharset:Yh,accessKey:Yh,action:null,allow:null,allowFullScreen:X,allowPaymentRequest:X,allowUserMedia:X,alt:null,as:null,async:X,autoCapitalize:null,autoComplete:Yh,autoFocus:X,autoPlay:X,blocking:Yh,capture:null,charSet:null,checked:X,cite:null,className:Yh,cols:Z,colSpan:null,content:null,contentEditable:qh,controls:X,controlsList:Yh,coords:Z|Xh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:X,defer:X,dir:null,dirName:null,disabled:X,download:Jh,draggable:qh,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:X,formTarget:null,headers:Yh,height:Z,hidden:Jh,high:Z,href:null,hrefLang:null,htmlFor:Yh,httpEquiv:Yh,id:null,imageSizes:null,imageSrcSet:null,inert:X,inputMode:null,integrity:null,is:null,isMap:X,itemId:null,itemProp:Yh,itemRef:Yh,itemScope:X,itemType:Yh,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:X,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:X,muted:X,name:null,nonce:null,noModule:X,noValidate:X,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:X,optimum:Z,pattern:null,ping:Yh,placeholder:null,playsInline:X,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:X,referrerPolicy:null,rel:Yh,required:X,reversed:X,rows:Z,rowSpan:Z,sandbox:Yh,scope:null,scoped:X,seamless:X,selected:X,shadowRootClonable:X,shadowRootDelegatesFocus:X,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:qh,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:X,useMap:null,value:qh,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Yh,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:X,declare:X,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:X,noHref:X,noShade:X,noWrap:X,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:qh,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:X,disableRemotePlayback:X,prefix:null,property:null,results:Z,security:null,unselectable:null},space:`html`,transform:ag}),sg=ng({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:Zh,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Yh,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:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:X,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,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:Xh,g2:Xh,glyphName:Xh,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:Zh,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,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:Z,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:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Yh,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zh,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zh,rev:Zh,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zh,requiredFeatures:Zh,requiredFonts:Zh,requiredFormats:Zh,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:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:Zh,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zh,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zh,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ig}),cg=ng({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()}}),lg=ng({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:ag}),ug=ng({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),dg={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`},fg=/[A-Z]/g,pg=/-[a-z]/g,mg=/^data[-\w.:]+$/i;function hg(e,t){let n=Uh(t),r=t,i=Wh;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&mg.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(pg,_g);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!pg.test(e)){let n=e.replace(fg,gg);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=eg}return new i(r,t)}function gg(e){return`-`+e.toLowerCase()}function _g(e){return e.charAt(1).toUpperCase()}var vg=Hh([rg,og,cg,lg,ug],`html`),yg=Hh([rg,sg,cg,lg,ug],`svg`);function bg(e){return e.join(` `).trim()}var xg=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
53
- `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Sg=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(xg());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),Cg=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),wg=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Sg()),r=Cg();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Tg=Dg(`end`),Eg=Dg(`start`);function Dg(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Og(e){let t=Eg(e),n=Tg(e);if(t&&n)return{start:t,end:n}}function kg(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?jg(e.position):`start`in e||`end`in e?jg(e):`line`in e||`column`in e?Ag(e):``}function Ag(e){return Mg(e&&e.line)+`:`+Mg(e&&e.column)}function jg(e){return Ag(e&&e.start)+`-`+Ag(e&&e.end)}function Mg(e){return e&&typeof e==`number`?e:1}var Ng=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=kg(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};Ng.prototype.file=``,Ng.prototype.name=``,Ng.prototype.reason=``,Ng.prototype.message=``,Ng.prototype.stack=``,Ng.prototype.column=void 0,Ng.prototype.line=void 0,Ng.prototype.ancestors=void 0,Ng.prototype.cause=void 0,Ng.prototype.fatal=void 0,Ng.prototype.place=void 0,Ng.prototype.ruleId=void 0,Ng.prototype.source=void 0;var Pg=t(wg(),1),Fg={}.hasOwnProperty,Ig=new Map,Lg=/[A-Z]/g,Rg=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),zg=new Set([`td`,`th`]),Bg=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Vg(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=Qg(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Zg(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?yg:vg,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Hg(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Hg(e,t,n){if(t.type===`element`)return Ug(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Wg(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Kg(e,t,n);if(t.type===`mdxjsEsm`)return Gg(e,t);if(t.type===`root`)return qg(e,t,n);if(t.type===`text`)return Jg(e,t)}function Ug(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=yg,e.schema=i),e.ancestors.push(t);let a=i_(e,t.tagName,!1),o=$g(e,t),s=t_(e,t);return Rg.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!zh(e):!0})),Yg(e,o,a,t),Xg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Wg(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}a_(e,t.position)}function Gg(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);a_(e,t.position)}function Kg(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=yg,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:i_(e,t.name,!0),o=e_(e,t),s=t_(e,t);return Yg(e,o,a,t),Xg(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function qg(e,t,n){let r={};return Xg(r,t_(e,t)),e.create(t,e.Fragment,r,n)}function Jg(e,t){return t.value}function Yg(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xg(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Zg(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function Qg(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Eg(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function $g(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Fg.call(t.properties,i)){let a=n_(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&zg.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function e_(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else a_(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else a_(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function t_(e,t){let n=[],r=-1,i=e.passKeys?new Map:Ig;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Hg(e,a,o);s!==void 0&&n.push(s)}return n}function n_(e,t,n){let r=hg(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Nh(n):bg(n)),r.property===`style`){let t=typeof n==`object`?n:r_(e,String(n));return e.stylePropertyNameCase===`css`&&(t=o_(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?dg[r.property]||r.property:r.attribute,n]}}function r_(e,t){try{return(0,Pg.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new Ng("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Bg+`#cannot-parse-style-attribute`,r}}function i_(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Lh(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Lh(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Fg.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);a_(e)}function a_(e,t){let n=new Ng("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=Bg+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function o_(e){let t={},n;for(n in e)Fg.call(e,n)&&(t[s_(n)]=e[n]);return t}function s_(e){let t=e.replace(Lg,c_);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function c_(e){return`-`+e.toLowerCase()}var l_={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`]},u_={};function d_(e,t){let n=t||u_;return f_(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function f_(e,t,n){if(m_(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 p_(e.children,t,n)}return Array.isArray(e)?p_(e,t,n):``}function p_(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=f_(e[i],t,n);return r.join(``)}function m_(e){return!!(e&&typeof e==`object`)}var h_=document.createElement(`i`);function g_(e){let t=`&`+e+`;`;h_.innerHTML=t;let n=h_.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function __(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function v_(e,t){return e.length>0?(__(e,e.length,0,t),e):t}var y_={}.hasOwnProperty;function b_(e){let t={},n=-1;for(;++n<e.length;)x_(t,e[n]);return t}function x_(e,t){let n;for(n in t){let r=(y_.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){y_.call(r,a)||(r[a]=[]);let e=i[a];S_(r[a],Array.isArray(e)?e:e?[e]:[])}}}function S_(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);__(e,0,0,r)}function C_(e,t){let 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)}function w_(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var T_=F_(/[A-Za-z]/),E_=F_(/[\dA-Za-z]/),D_=F_(/[#-'*+\--9=?A-Z^-~]/);function O_(e){return e!==null&&(e<32||e===127)}var k_=F_(/\d/),A_=F_(/[\dA-Fa-f]/),j_=F_(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function M_(e){return e!==null&&(e<0||e===32)}function $(e){return e===-2||e===-1||e===32}var N_=F_(/\p{P}|\p{S}/u),P_=F_(/\s/);function F_(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function I_(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&E_(e.charCodeAt(n+1))&&E_(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function L_(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return $(r)?(e.enter(n),s(r)):t(r)}function s(r){return $(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var R_={tokenize:z_};function z_(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),L_(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Q(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var B_={tokenize:H_},V_={tokenize:U_};function H_(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return __(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(V_,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(V_,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Q(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;__(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function U_(e,t,n){return L_(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function W_(e){if(e===null||M_(e)||P_(e))return 1;if(N_(e))return 2}function G_(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var K_={name:`attention`,resolveAll:q_,tokenize:J_};function q_(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};Y_(d,-c),Y_(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=v_(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=v_(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=v_(l,G_(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=v_(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=v_(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,__(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function J_(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=W_(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=W_(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Y_(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var X_={name:`autolink`,tokenize:Z_};function Z_(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return T_(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||E_(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||E_(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||O_(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):D_(t)?(e.consume(t),l):n(t)}function u(e){return E_(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||E_(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Q_={partial:!0,tokenize:$_};function $_(e,t,n){return r;function r(t){return $(t)?L_(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Q(e)?t(e):n(e)}}var ev={continuation:{tokenize:nv},exit:rv,name:`blockQuote`,tokenize:tv};function tv(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return $(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function nv(e,t,n){let r=this;return i;function i(t){return $(t)?L_(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(ev,t,n)(r)}}function rv(e){e.exit(`blockQuote`)}var iv={name:`characterEscape`,tokenize:av};function av(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return j_(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var ov={name:`characterReference`,tokenize:sv};function sv(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=E_,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=A_,u):(e.enter(`characterReferenceValue`),a=7,o=k_,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===E_&&!g_(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var cv={partial:!0,tokenize:dv},lv={concrete:!0,name:`codeFenced`,tokenize:uv};function uv(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),$(t)?L_(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Q(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(cv,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):$(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),L_(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Q(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Q(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&$(t)?L_(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Q(t)?e.check(cv,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),$(t)?L_(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),$(t)?L_(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function dv(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var fv={name:`codeIndented`,tokenize:mv},pv={partial:!0,tokenize:hv};function mv(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),L_(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Q(t)?e.attempt(pv,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Q(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function hv(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):L_(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Q(e)?i(e):n(e)}}var gv={name:`codeText`,previous:vv,resolve:_v,tokenize:yv};function _v(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function vv(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function yv(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Q(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var bv=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&xv(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),xv(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),xv(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);xv(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);xv(this.left,t.reverse())}}};function xv(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 Sv(e){let t={},n=-1,r,i,a,o,s,c,l,u=new bv(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Cv(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return __(e,0,1/0,u.slice(0)),!l}function Cv(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var wv={resolve:Ev,tokenize:Dv},Tv={partial:!0,tokenize:Ov};function Ev(e){return Sv(e),e}function Dv(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Q(t)?e.check(Tv,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Ov(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),L_(e,a,`linePrefix`)}function a(i){if(i===null||Q(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function kv(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||O_(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||M_(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||O_(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Av(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!$(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function jv(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),L_(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function Mv(e,t){let n;return r;function r(i){return Q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):$(i)?L_(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Nv={name:`definition`,tokenize:Fv},Pv={partial:!0,tokenize:Iv};function Fv(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Av.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=w_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return M_(t)?Mv(e,l)(t):l(t)}function l(t){return kv(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Pv,d,d)(t)}function d(t){return $(t)?L_(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Iv(e,t,n){return r;function r(t){return M_(t)?Mv(e,i)(t):n(t)}function i(t){return jv(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return $(t)?L_(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Q(e)?t(e):n(e)}}var Lv={name:`hardBreakEscape`,tokenize:Rv};function Rv(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var zv={name:`headingAtx`,resolve:Bv,tokenize:Vv};function Bv(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},__(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Vv(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||M_(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Q(n)?(e.exit(`atxHeading`),t(n)):$(n)?L_(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||M_(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Hv=`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`.split(`.`),Uv=[`pre`,`script`,`style`,`textarea`],Wv={concrete:!0,name:`htmlFlow`,resolveTo:qv,tokenize:Jv},Gv={partial:!0,tokenize:Xv},Kv={partial:!0,tokenize:Yv};function qv(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 Jv(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:P):T_(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):T_(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return T_(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||M_(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Uv.includes(l)?(i=1,r.interrupt?t(s):O(s)):Hv.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||E_(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return $(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||T_(t)?(e.consume(t),b):$(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||E_(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):$(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):$(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||M_(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||$(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Q(t)?O(t):$(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),j):t===60&&i===1?(e.consume(t),M):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),N):Q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Gv,ne,ee)(t)):t===null||Q(t)?(e.exit(`htmlFlowData`),ee(t)):(e.consume(t),O)}function ee(t){return e.check(Kv,k,ne)(t)}function k(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),A}function A(t){return t===null||Q(t)?ee(t):(e.enter(`htmlFlowData`),O(t))}function j(t){return t===45?(e.consume(t),P):O(t)}function M(t){return t===47?(e.consume(t),o=``,te):O(t)}function te(t){if(t===62){let n=o.toLowerCase();return Uv.includes(n)?(e.consume(t),F):O(t)}return T_(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),te):O(t)}function N(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),P):O(t)}function F(t){return t===null||Q(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),F)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function Yv(e,t,n){let r=this;return i;function i(t){return Q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Xv(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Q_,t,n)}}var Zv={name:`htmlText`,tokenize:Qv};function Qv(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):T_(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):T_(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Q(t)?(o=d,M(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?j(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Q(t)?(o=h,M(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?j(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?j(t):Q(t)?(o=v,M(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Q(t)?(o=y,M(t)):(e.consume(t),y)}function b(e){return e===62?j(e):y(e)}function x(t){return T_(t)?(e.consume(t),S):n(t)}function S(t){return t===45||E_(t)?(e.consume(t),S):C(t)}function C(t){return Q(t)?(o=C,M(t)):$(t)?(e.consume(t),C):j(t)}function w(t){return t===45||E_(t)?(e.consume(t),w):t===47||t===62||M_(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),j):t===58||t===95||T_(t)?(e.consume(t),E):Q(t)?(o=T,M(t)):$(t)?(e.consume(t),T):j(t)}function E(t){return t===45||t===46||t===58||t===95||E_(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Q(t)?(o=D,M(t)):$(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,ee):Q(t)?(o=O,M(t)):$(t)?(e.consume(t),O):(e.consume(t),k)}function ee(t){return t===i?(e.consume(t),i=void 0,A):t===null?n(t):Q(t)?(o=ee,M(t)):(e.consume(t),ee)}function k(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||M_(t)?T(t):(e.consume(t),k)}function A(e){return e===47||e===62||M_(e)?T(e):n(e)}function j(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function M(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return $(t)?L_(e,N,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):N(t)}function N(t){return e.enter(`htmlTextData`),o(t)}}var $v={name:`labelEnd`,resolveAll:ry,resolveTo:iy,tokenize:ay},ey={tokenize:oy},ty={tokenize:sy},ny={tokenize:cy};function ry(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&__(e,0,e.length,n),e}function iy(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=v_(s,e.slice(a+1,a+r+3)),s=v_(s,[[`enter`,u,t]]),s=v_(s,G_(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=v_(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=v_(s,e.slice(o+1)),s=v_(s,[[`exit`,c,t]]),__(e,a,e.length,s),e}function ay(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(w_(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(ey,u,o?u:d)(t):t===91?e.attempt(ty,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(ny,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function oy(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return M_(t)?Mv(e,a)(t):a(t)}function a(t){return t===41?u(t):kv(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return M_(t)?Mv(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?jv(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return M_(t)?Mv(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function sy(e,t,n){let r=this;return i;function i(t){return Av.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(w_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function cy(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var ly={name:`labelStartImage`,resolveAll:$v.resolveAll,tokenize:uy};function uy(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var dy={name:`labelStartLink`,resolveAll:$v.resolveAll,tokenize:fy};function fy(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var py={name:`lineEnding`,tokenize:my};function my(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),L_(e,t,`linePrefix`)}}var hy={name:`thematicBreak`,tokenize:gy};function gy(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),$(t)?L_(e,s,`whitespace`)(t):s(t))}}var _y={continuation:{tokenize:xy},exit:Cy,name:`list`,tokenize:by},vy={partial:!0,tokenize:wy},yy={partial:!0,tokenize:Sy};function by(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:k_(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(hy,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return k_(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Q_,r.interrupt?n:u,e.attempt(vy,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return $(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function xy(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Q_,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,L_(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!$(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(yy,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,L_(e,e.attempt(_y,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Sy(e,t,n){let r=this;return L_(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Cy(e){e.exit(this.containerState.type)}function wy(e,t,n){let r=this;return L_(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!$(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Ty={name:`setextUnderline`,resolveTo:Ey,tokenize:Dy};function Ey(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Dy(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),$(t)?L_(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var Oy={tokenize:ky};function ky(e){let t=this,n=e.attempt(Q_,r,e.attempt(this.parser.constructs.flowInitial,i,L_(e,e.attempt(this.parser.constructs.flow,i,e.attempt(wv,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Ay={resolveAll:Py()},jy=Ny(`string`),My=Ny(`text`);function Ny(e){return{resolveAll:Py(e===`text`?Fy:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function Py(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Fy(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Iy=e({attentionMarkers:()=>Wy,contentInitial:()=>Ry,disable:()=>Gy,document:()=>Ly,flow:()=>By,flowInitial:()=>zy,insideSpan:()=>Uy,string:()=>Vy,text:()=>Hy}),Ly={42:_y,43:_y,45:_y,48:_y,49:_y,50:_y,51:_y,52:_y,53:_y,54:_y,55:_y,56:_y,57:_y,62:ev},Ry={91:Nv},zy={[-2]:fv,[-1]:fv,32:fv},By={35:zv,42:hy,45:[Ty,hy],60:Wv,61:Ty,95:hy,96:lv,126:lv},Vy={38:ov,92:iv},Hy={[-5]:py,[-4]:py,[-3]:py,33:ly,38:ov,42:K_,60:[X_,Zv],91:dy,92:[Lv,iv],93:$v,95:K_,96:gv},Uy={null:[K_,Ay]},Wy={null:[42,95]},Gy={null:[]};function Ky(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=v_(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=G_(a,l.events,l),l.events):[]}function f(e,t){return Jy(p(e),t)}function p(e){return qy(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Q(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&__(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function qy(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Jy(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
54
- `;break;case-3:o=`\r
55
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Yy(e){let t={constructs:b_([Iy,...(e||{}).extensions||[]]),content:n(R_),defined:[],document:n(B_),flow:n(Oy),lazy:{},string:n(jy),text:n(My)};return t;function n(e){return n;function n(n){return Ky(t,e,n)}}}function Xy(e){for(;!Sv(e););return e}var Zy=/[\0\t\n\r]/g;function Qy(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(Zy.lastIndex=u,c=Zy.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var $y=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function eb(e){return e.replace($y,tb)}function tb(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return C_(n.slice(t?2:1),t?16:10)}return g_(n)||e}var nb={}.hasOwnProperty;function rb(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),ib(n)(Xy(Yy(n).document().write(Qy()(e,t,!0))))}function ib(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(_e),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(pe),blockQuote:a(ce),characterEscape:T,characterReference:T,codeFenced:a(le),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(le,o),codeText:a(ue,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(de),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(fe),hardBreakEscape:a(me),hardBreakTrailing:a(me),htmlFlow:a(he,o),htmlFlowData:T,htmlText:a(he,o),htmlTextData:T,image:a(ge),label:o,link:a(_e),listItem:a(ye),listItemValue:f,listOrdered:a(ve,d),listUnordered:a(ve),paragraph:a(be),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(pe),strong:a(xe),thematicBreak:a(Ce)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:se,autolinkProtocol:oe,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:I,characterReference:L,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(A),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(ee),htmlFlowData:E,htmlText:c(k),htmlTextData:E,image:c(M),label:N,labelText:te,lineEnding:D,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:P,resourceTitleString:F,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};ob(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];nb.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||cb).call(a,void 0,e[0])}for(r.position={start:ab(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:ab(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(!(t[1].type===`linePrefix`||t[1].type===`blockQuotePrefix`||t[1].type===`blockQuotePrefixWhitespace`||t[1].type===`blockQuoteMarker`||t[1].type===`listItemIndent`))break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:ab(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||cb).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+kg({start:e.start,end:e.end})+`): it’s not open`);n.position.end=ab(e.end)}function u(){return d_(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=w_(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Se(),n.position={start:ab(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=ab(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=ab(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function ee(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function te(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=eb(t),n.identifier=w_(t).toLowerCase()}function N(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=w_(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function I(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=C_(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=g_(t);let i=this.stack[this.stack.length-1];i.value+=r}function L(e){let t=this.stack.pop();t.position.end=ab(e.end)}function oe(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function ce(){return{type:`blockquote`,children:[]}}function le(){return{type:`code`,lang:null,meta:null,value:``}}function ue(){return{type:`inlineCode`,value:``}}function de(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function fe(){return{type:`emphasis`,children:[]}}function pe(){return{type:`heading`,depth:0,children:[]}}function me(){return{type:`break`}}function he(){return{type:`html`,value:``}}function ge(){return{type:`image`,title:null,url:``,alt:null}}function _e(){return{type:`link`,title:null,url:``,children:[]}}function ve(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function ye(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function be(){return{type:`paragraph`,children:[]}}function xe(){return{type:`strong`,children:[]}}function Se(){return{type:`text`,value:``}}function Ce(){return{type:`thematicBreak`}}}function ab(e){return{line:e.line,column:e.column,offset:e.offset}}function ob(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?ob(e,r):sb(e,r)}}function sb(e,t){let n;for(n in t)if(nb.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function cb(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+kg({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kg({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+kg({start:t.start,end:t.end})+`) is still open`)}function lb(e){let t=this;t.parser=n;function n(n){return rb(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function ub(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function db(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
56
- `}]}function fb(e,t){let n=t.value?t.value+`
57
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function pb(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mb(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hb(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=I_(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function gb(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _b(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function vb(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function yb(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vb(e,t);let i={src:I_(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function bb(e,t){let n={src:I_(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function xb(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Sb(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return vb(e,t);let i={href:I_(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Cb(e,t){let n={href:I_(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function wb(e,t,n){let r=e.all(t),i=n?Tb(n):Eb(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
58
- `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
59
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function Tb(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=Eb(n[r])}return t}function Eb(e){return e.spread??e.children.length>1}function Db(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Ob(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kb(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Ab(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function jb(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Eg(t.children[1]),o=Tg(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Mb(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Nb(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Pb=9,Fb=32;function Ib(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Lb(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Lb(t.slice(i),i>0,!1)),a.join(``)}function Lb(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===Pb||t===Fb;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===Pb||t===Fb;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function Rb(e,t){let n={type:`text`,value:Ib(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function zb(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Bb={blockquote:ub,break:db,code:fb,delete:pb,emphasis:mb,footnoteReference:hb,heading:gb,html:_b,imageReference:yb,image:bb,inlineCode:xb,linkReference:Sb,link:Cb,listItem:wb,list:Db,paragraph:Ob,root:kb,strong:Ab,table:jb,tableCell:Nb,tableRow:Mb,text:Rb,thematicBreak:zb,toml:Vb,yaml:Vb,definition:Vb,footnoteDefinition:Vb};function Vb(){}var Hb=typeof self==`object`?self:globalThis,Ub=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new Hb[e](t)},Wb=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(Ub(e,t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(Ub(a,o),i)};return r},Gb=e=>Wb(new Map,e)(0),Kb=``,{toString:qb}={},{keys:Jb}=Object,Yb=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=qb.call(e).slice(8,-1);switch(n){case`Array`:return[1,Kb];case`Object`:return[2,Kb];case`Date`:return[3,Kb];case`RegExp`:return[4,Kb];case`Map`:return[5,Kb];case`Set`:return[6,Kb];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Xb=([e,t])=>e===0&&(t===`function`||t===`symbol`),Zb=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Yb(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Jb(r))(e||!Xb(Yb(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Xb(Yb(n))||Xb(Yb(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Xb(Yb(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Qb=(e,{json:t,lossy:n}={})=>{let r=[];return Zb(!(t||n),!!t,new Map,r)(e),r},$b=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Gb(Qb(e,t)):structuredClone(e):(e,t)=>Gb(Qb(e,t));function ex(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function tx(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function nx(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||ex,r=e.options.footnoteBackLabel||tx,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=I_(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...$b(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
60
- `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
61
- `}]}}var rx=(function(e){if(e==null)return cx;if(typeof e==`function`)return sx(e);if(typeof e==`object`)return Array.isArray(e)?ix(e):ax(e);if(typeof e==`string`)return ox(e);throw Error(`Expected function, string, or object as test`)});function ix(e){let t=[],n=-1;for(;++n<e.length;)t[n]=rx(e[n]);return sx(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function ax(e){let t=e;return sx(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function ox(e){return sx(t);function t(t){return t&&t.type===e}}function sx(e){return t;function t(t,n,r){return!!(lx(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function cx(){return!0}function lx(e){return typeof e==`object`&&!!e&&`type`in e}function ux(e){return e}var dx=[];function fx(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=rx(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,`name`,{value:`node (`+ux(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=dx,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=px(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function px(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?dx:[e]}function mx(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),fx(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var hx={}.hasOwnProperty,gx={};function _x(e,t){let n=t||gx,r=new Map,i=new Map,a={all:s,applyData:yx,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Bb,...n.handlers},one:o,options:n,patch:vx,wrap:xx};return mx(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(hx.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=$b(n);return r.children=a.all(e),r}return $b(e)}return(a.options.unknownHandler||bx)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=Sx(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=Sx(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function vx(e,t){e.position&&(t.position=Og(e))}function yx(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,$b(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function bx(e,t){let n=t.data||{},r=`value`in t&&!(hx.call(n,`hProperties`)||hx.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function xx(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
62
- `});++r<e.length;)r&&n.push({type:`text`,value:`
63
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
64
- `}),n}function Sx(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Cx(e,t){let n=_x(e,t),r=n.one(e,void 0),i=nx(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
65
- `},i)),a}function wx(e,t){return e&&`run`in e?async function(n,r){let i=Cx(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Cx(n,{file:r,...e||t})}}function Tx(e){if(e)throw e}var Ex=n(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function Dx(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Ox(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?kx(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function kx(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Ax={basename:jx,dirname:Mx,extname:Nx,join:Px,sep:`/`};function jx(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);Lx(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Mx(e){if(Lx(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Nx(e){Lx(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Px(...e){let t=-1,n;for(;++t<e.length;)Lx(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Fx(n)}function Fx(e){Lx(e);let t=e.codePointAt(0)===47,n=Ix(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Ix(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(!(i===o-1||a===1))if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1;i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function Lx(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Rx={cwd:zx};function zx(){return`/`}function Bx(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Vx(e){if(typeof e==`string`)e=new URL(e);else if(!Bx(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Hx(e)}function Hx(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Ux=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Wx=class{constructor(e){let t;t=e?Bx(e)?{path:e}:typeof e==`string`||Jx(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Rx.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Ux.length;){let e=Ux[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Ux.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?Ax.basename(this.path):void 0}set basename(e){Kx(e,`basename`),Gx(e,`basename`),this.path=Ax.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?Ax.dirname(this.path):void 0}set dirname(e){qx(this.basename,`dirname`),this.path=Ax.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?Ax.extname(this.path):void 0}set extname(e){if(Gx(e,`extname`),qx(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=Ax.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Bx(e)&&(e=Vx(e)),Kx(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?Ax.basename(this.path,this.extname):void 0}set stem(e){Kx(e,`stem`),Gx(e,`stem`),this.path=Ax.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new Ng(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Gx(e,t){if(e&&e.includes(Ax.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+Ax.sep+"`")}function Kx(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function qx(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Jx(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Yx=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Xx=t(Ex(),1),Zx={}.hasOwnProperty,Qx=new class e extends Yx{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=Ox()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Xx.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(tS(`data`,this.frozen),this.namespace[e]=t,this):Zx.call(this.namespace,e)&&this.namespace[e]||void 0:e?(tS(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=iS(e),n=this.parser||this.Parser;return $x(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),$x(`process`,this.parser||this.Parser),eS(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=iS(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);oS(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),$x(`processSync`,this.parser||this.Parser),eS(`processSync`,this.compiler||this.Compiler),this.process(e,r),rS(`processSync`,`process`,t),n;function r(e,r){t=!0,Tx(e),n=r}}run(e,t,n){nS(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=iS(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),rS(`runSync`,`run`,n),r;function i(e,t){Tx(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=iS(t),r=this.compiler||this.Compiler;return eS(`stringify`,r),nS(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(tS(`use`,this.frozen),e!=null)if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`");return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`)if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e);else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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");o(e.plugins),e.settings&&(r.settings=(0,Xx.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null)if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];Dx(o)&&Dx(r)&&(r=(0,Xx.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function $x(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function eS(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function tS(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nS(e){if(!Dx(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function rS(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function iS(e){return aS(e)?e:new Wx(e)}function aS(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function oS(e){return typeof e==`string`||sS(e)}function sS(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var cS=[],lS={allowDangerousHtml:!0},uS=/^(https?|ircs?|mailto|xmpp)$/i,dS=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function fS(e){let t=pS(e),n=mS(e);return hS(t.runSync(t.parse(n),n),e)}function pS(e){let t=e.rehypePlugins||cS,n=e.remarkPlugins||cS,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lS}:lS;return Qx().use(lb).use(n).use(wx,r).use(t)}function mS(e){let t=e.children||``,n=new Wx;return typeof t==`string`?n.value=t:``+t,n}function hS(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||gS;for(let e of dS)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return mx(e,l),Vg(e,{Fragment:U.Fragment,components:i,ignoreInvalidStyle:!0,jsx:U.jsx,jsxs:U.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in l_)if(Object.hasOwn(l_,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=l_[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function gS(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||uS.test(e.slice(0,t))?e:``}function _S(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function vS(e,t,n){let r=rx((n||{}).ignore||[]),i=yS(t),a=-1;for(;++a<i.length;)fx(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function yS(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([bS(e[0]),xS(e[1])])}return t}function bS(e){return typeof e==`string`?new RegExp(_S(e),`g`):e}function xS(e){return typeof e==`function`?e:function(){return e}}function SS(e){vS(e,[/\r?\n|\r/g,CS])}function CS(){return{type:`break`}}function wS(){return function(e){SS(e)}}function TS(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}var ES=`phrasing`,DS=[`autolink`,`link`,`image`,`label`];function OS(){return{transforms:[IS],enter:{literalAutolink:AS,literalAutolinkEmail:jS,literalAutolinkHttp:jS,literalAutolinkWww:jS},exit:{literalAutolink:FS,literalAutolinkEmail:PS,literalAutolinkHttp:MS,literalAutolinkWww:NS}}}function kS(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:ES,notInConstruct:DS},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:ES,notInConstruct:DS},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:ES,notInConstruct:DS}]}}function AS(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function jS(e){this.config.enter.autolinkProtocol.call(this,e)}function MS(e){this.config.exit.autolinkProtocol.call(this,e)}function NS(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function PS(e){this.config.exit.autolinkEmail.call(this,e)}function FS(e){this.exit(e)}function IS(e){vS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,LS],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,RS]],{ignore:[`link`,`linkReference`]})}function LS(e,t,n,r,i){let a=``;if(!VS(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!zS(n)))return!1;let o=BS(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function RS(e,t,n,r){return!VS(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function zS(e){let 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 BS(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=TS(e,`(`),a=TS(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function VS(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||P_(n)||N_(n))&&(!t||n!==47)}ZS.peek=XS;function HS(){this.buffer()}function US(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function WS(){this.buffer()}function GS(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function KS(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=w_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function qS(e){this.exit(e)}function JS(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=w_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function YS(e){this.exit(e)}function XS(){return`[`}function ZS(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function QS(){return{enter:{gfmFootnoteCallString:HS,gfmFootnoteCall:US,gfmFootnoteDefinitionLabelString:WS,gfmFootnoteDefinition:GS},exit:{gfmFootnoteCallString:KS,gfmFootnoteCall:qS,gfmFootnoteDefinitionLabelString:JS,gfmFootnoteDefinition:YS}}}function $S(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ZS},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
66
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?tC:eC))),s(),o}}function eC(e,t,n){return t===0?e:tC(e,t,n)}function tC(e,t,n){return(n?``:` `)+e}var nC=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];sC.peek=cC;function rC(){return{canContainEols:[`delete`],enter:{strikethrough:aC},exit:{strikethrough:oC}}}function iC(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:nC}],handlers:{delete:sC}}}function aC(e){this.enter({type:`delete`,children:[]},e)}function oC(e){this.exit(e)}function sC(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function cC(){return`~`}function lC(e){return e.length}function uC(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||lC,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=dC(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=fC(r[d]);else{let e=fC(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&!(n.alignDelimiters===!1&&i===``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
67
- `)}function dC(e){return e==null?``:String(e)}function fC(e){let 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 pC(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),mC);return i(),o}function mC(e,t,n){return`>`+(n?``:` `)+e}function hC(e,t){return gC(e,t.inConstruct,!0)&&!gC(e,t.notInConstruct,!1)}function gC(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function _C(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
68
- `&&hC(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
69
- `}function vC(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function yC(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 bC(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function xC(e,t,n,r){let i=bC(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(yC(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,SC);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(vC(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
70
- `,encode:["`"],...s.current()})),t()}return u+=s.move(`
71
- `),a&&(u+=s.move(a+`
72
- `)),u+=s.move(c),l(),u}function SC(e,t,n){return(n?``:` `)+e}function CC(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function wC(e,t,n,r){let i=CC(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
73
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function TC(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function EC(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function DC(e,t,n){let r=W_(e),i=W_(t);return r===void 0?i===void 0?n===`_`?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}OC.peek=kC;function OC(e,t,n,r){let i=TC(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=DC(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=EC(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=DC(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+EC(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function kC(e,t,n){return n.options.emphasis||`*`}function AC(e,t){let n=!1;return mx(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&d_(e)&&(t.options.setext||n))}function jC(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(AC(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
74
- `,after:`
75
- `});return r(),t(),o+`
76
- `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
77
- `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
78
- `,...a.current()});return/^[\t ]/.test(l)&&(l=EC(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}MC.peek=NC;function MC(e){return e.value||``}function NC(){return`<`}PC.peek=FC;function PC(e,t,n,r){let i=CC(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function FC(){return`!`}IC.peek=LC;function IC(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function LC(){return`!`}RC.peek=zC;function RC(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function zC(){return"`"}function BC(e,t){let n=d_(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))}VC.peek=HC;function VC(e,t,n,r){let i=CC(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(BC(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function HC(e,t,n){return BC(e,n)?`<`:`[`}UC.peek=WC;function UC(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function WC(){return`[`}function GC(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function KC(e){let t=GC(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function qC(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function JC(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function YC(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?qC(n):GC(n),s=e.ordered?o===`.`?`)`:`.`:KC(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.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&&(c=!0),JC(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function XC(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function ZC(e,t,n,r){let i=XC(n),a=n.bulletCurrent||GC(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function QC(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var $C=rx([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function ew(e,t,n,r){return(e.children.some(function(e){return $C(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function tw(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}nw.peek=rw;function nw(e,t,n,r){let i=tw(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=DC(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=EC(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=DC(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+EC(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function rw(e,t,n){return n.options.strong||`*`}function iw(e,t,n,r){return n.safe(e.value,r)}function aw(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function ow(e,t,n){let r=(JC(n)+(n.options.ruleSpaces?` `:``)).repeat(aw(n));return n.options.ruleSpaces?r.slice(0,-1):r}var sw={blockquote:pC,break:_C,code:xC,definition:wC,emphasis:OC,hardBreak:_C,heading:jC,html:MC,image:PC,imageReference:IC,inlineCode:RC,link:VC,linkReference:UC,list:YC,listItem:ZC,paragraph:QC,root:ew,strong:nw,text:iw,thematicBreak:ow};function cw(){return{enter:{table:lw,tableData:pw,tableHeader:pw,tableRow:dw},exit:{codeText:mw,table:uw,tableData:fw,tableHeader:fw,tableRow:fw}}}function lw(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function uw(e){this.exit(e),this.data.inTable=void 0}function dw(e){this.enter({type:`tableRow`,children:[]},e)}function fw(e){this.exit(e)}function pw(e){this.enter({type:`tableCell`,children:[]},e)}function mw(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,hw));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function hw(e,t){return t===`|`?t:e}function gw(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
79
- `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
80
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return uC(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=sw.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function _w(){return{exit:{taskListCheckValueChecked:yw,taskListCheckValueUnchecked:yw,paragraph:bw}}}function vw(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:xw}}}function yw(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function bw(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function xw(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=sw.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Sw(){return[OS(),QS(),rC(),cw(),_w()]}function Cw(e){return{extensions:[kS(),$S(e),iC(),gw(e),vw()]}}var ww={tokenize:Rw,partial:!0},Tw={tokenize:zw,partial:!0},Ew={tokenize:Bw,partial:!0},Dw={tokenize:Vw,partial:!0},Ow={tokenize:Hw,partial:!0},kw={name:`wwwAutolink`,tokenize:Iw,previous:Uw},Aw={name:`protocolAutolink`,tokenize:Lw,previous:Ww},jw={name:`emailAutolink`,tokenize:Fw,previous:Gw},Mw={};function Nw(){return{text:Mw}}for(var Pw=48;Pw<123;)Mw[Pw]=jw,Pw++,Pw===58?Pw=65:Pw===91&&(Pw=97);Mw[43]=jw,Mw[45]=jw,Mw[46]=jw,Mw[95]=jw,Mw[72]=[jw,Aw],Mw[104]=[jw,Aw],Mw[87]=[jw,kw],Mw[119]=[jw,kw];function Fw(e,t,n){let r=this,i,a;return o;function o(t){return!Kw(t)||!Gw.call(r,r.previous)||qw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Kw(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Ow,u,l)(t):t===45||t===95||E_(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&T_(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Iw(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Uw.call(r,r.previous)||qw(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(ww,e.attempt(Tw,e.attempt(Ew,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Lw(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Ww.call(r,r.previous)&&!qw(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(T_(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||O_(t)||M_(t)||P_(t)||N_(t)?n(t):e.attempt(Tw,e.attempt(Ew,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Rw(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function zw(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Dw,c,s)(t):t===null||M_(t)||P_(t)||t!==45&&N_(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Bw(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Dw,t,a)(o):o===null||M_(o)||P_(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function Vw(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||M_(o)||P_(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||M_(e)||P_(e)?t(e):r(e)}function a(e){return T_(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):T_(t)?(e.consume(t),o):n(t)}}function Hw(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return E_(e)?n(e):t(e)}}function Uw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||M_(e)}function Ww(e){return!T_(e)}function Gw(e){return!(e===47||Kw(e))}function Kw(e){return e===43||e===45||e===46||e===95||E_(e)}function qw(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Jw={tokenize:nT,partial:!0};function Yw(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:$w,continuation:{tokenize:eT},exit:tT}},text:{91:{name:`gfmFootnoteCall`,tokenize:Qw},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Xw,resolveTo:Zw}}}}function Xw(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=w_(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Zw(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`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Qw(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||M_(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(w_(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return M_(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function $w(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||M_(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=w_(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return M_(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),L_(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function eT(e,t,n){return e.check(Q_,t,e.attempt(Jw,t,n))}function tT(e){e.exit(`gfmFootnoteDefinition`)}function nT(e,t,n){let r=this;return L_(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function rT(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&__(o,o.length,0,G_(s,e.slice(r+1,n),t)),__(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),__(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=W_(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=W_(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var iT=class{constructor(){this.map=[]}add(e,t,n){aT(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function aT(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function oT(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function sT(){return{flow:{null:{name:`table`,tokenize:cT,resolveAll:lT}}}}function cT(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):Q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):$(t)?L_(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||M_(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,$(t)?L_(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return $(t)?L_(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return $(t)?L_(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Q(n)?(e.exit(`tableRow`),t(n)):$(n)?L_(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||M_(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function lT(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new iT;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(dT(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=uT(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=uT(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=uT(f,t,o,i,n,d)):(o[0]=o[1],d=uT(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&dT(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=oT(t.events,n))}return e}function uT(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},fT(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=fT(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=fT(t.events,n[2]),a=fT(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},fT(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function dT(e,t,n,r,i){let a=[],o=fT(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function fT(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var pT={name:`tasklistCheck`,tokenize:hT};function mT(){return{text:{91:pT}}}function hT(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return M_(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Q(r)?t(r):$(r)?e.check({tokenize:gT},t,n)(r):n(r)}}function gT(e,t,n){return L_(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function _T(e){return b_([Nw(),Yw(),rT(e),sT(),mT()])}var vT={};function yT(e){let t=this,n=e||vT,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(_T(n)),a.push(Sw()),o.push(Cw(n))}var bT={a:({node:e,...t})=>(0,U.jsx)(`a`,{...t,target:`_blank`,rel:`noreferrer noopener`})};function xT({markdown:e}){return(0,U.jsx)(`div`,{className:`assistant-markdown`,children:(0,U.jsx)(fS,{components:bT,remarkPlugins:[yT,wS],skipHtml:!0,children:e})})}var ST=(0,d.memo)(function({message:e}){let t=e.role===`assistant`&&!!(e.isPending||e.isStreaming),n=e.role===`assistant`?kT(e.text):void 0;return e.role===`user`?(0,U.jsx)(CT,{message:e}):n?(0,U.jsx)(TT,{message:e,result:n,isWorking:t}):(0,U.jsx)(wT,{message:e,variant:DT(e),isWorking:t})});function CT({message:e}){return(0,U.jsx)(`article`,{className:`message-row user`,"data-message-role":`user`,children:(0,U.jsxs)(`div`,{className:`message user-message-card`,children:[(0,U.jsx)(`div`,{className:`message-header user-message-header`,children:(0,U.jsx)(`span`,{children:`You`})}),(0,U.jsx)(`div`,{className:`message-body user-message-body`,children:e.text})]})})}function wT({message:e,variant:t,isWorking:n}){return t===`status`?(0,U.jsx)(`article`,{className:`message-row assistant status`,"data-message-role":`assistant`,"data-message-variant":`status`,children:(0,U.jsxs)(`div`,{className:oo(`message assistant-status-card`,n&&`working`),children:[(0,U.jsxs)(`div`,{className:`message-header assistant-status-header`,children:[(0,U.jsx)(`span`,{children:`Heddle`}),(0,U.jsxs)(`div`,{className:`pills compact-pills`,children:[e.isPending?(0,U.jsx)(Y,{tone:`warn`,children:`working`}):null,e.isStreaming?(0,U.jsx)(Y,{children:`live`}):null]})]}),(0,U.jsx)(`div`,{className:`message-body assistant-status-body`,children:e.text})]})}):(0,U.jsx)(`article`,{className:`message-row assistant article`,"data-message-role":`assistant`,"data-message-variant":`article`,children:(0,U.jsxs)(`div`,{className:`assistant-article-shell`,children:[(0,U.jsxs)(`div`,{className:`message-header assistant-article-header`,children:[(0,U.jsx)(`span`,{children:`Heddle`}),(0,U.jsxs)(`div`,{className:`pills compact-pills`,children:[e.isPending?(0,U.jsx)(Y,{tone:`warn`,children:`working`}):null,e.isStreaming?(0,U.jsx)(Y,{children:`live`}):null]})]}),(0,U.jsx)(`div`,{className:oo(`message-body assistant-article-body`,n&&`working`),children:(0,U.jsx)(xT,{markdown:e.text})})]})})}function TT({message:e,result:t,isWorking:n}){return(0,U.jsx)(`article`,{className:`message-row assistant tool-result`,"data-message-role":`assistant`,"data-message-variant":`tool-result`,children:(0,U.jsxs)(`div`,{className:oo(`message tool-result-card`,n&&`working`),children:[(0,U.jsxs)(`div`,{className:`message-header tool-result-header`,children:[(0,U.jsx)(`span`,{children:`Tool result`}),(0,U.jsxs)(`div`,{className:`pills compact-pills`,children:[(0,U.jsx)(Y,{tone:t.ok===!1?`bad`:`good`,children:t.tool}),e.isPending?(0,U.jsx)(Y,{tone:`warn`,children:`working`}):null,e.isStreaming?(0,U.jsx)(Y,{children:`live`}):null]})]}),(0,U.jsx)(`div`,{className:`message-body tool-result-message-body`,children:(0,U.jsx)(ET,{result:t})})]})})}function ET({result:e}){let t=jT(e.output);return(0,U.jsxs)(`div`,{className:`tool-result-body`,children:[(0,U.jsxs)(`div`,{className:`tool-result-meta`,children:[(0,U.jsx)(Y,{tone:e.ok===!1?`bad`:`good`,children:e.ok===!1?`failed`:`completed`}),e.command?(0,U.jsx)(`span`,{className:`tool-command`,children:e.command}):null]}),e.error?(0,U.jsx)(`p`,{className:`tool-error`,children:e.error}):null,t?(0,U.jsx)(`pre`,{className:`tool-output`,children:t}):(0,U.jsx)(`p`,{className:`muted`,children:`No visible output.`})]})}function DT(e){if(e.id.startsWith(`live-run-status`))return`status`;let t=e.text.trim();return!t||OT(t)?`status`:`article`}function OT(e){return e.length>120?!1:[/^run started/i,/^working…/i,/^approval /i,/^fallback:/i,/^memory update/i,/^memory updating/i,/^compaction /i,/^heddle is working/i,/^[a-z_][a-z0-9_]* finished(?: in \d+ms)?$/i].some(t=>t.test(e))}function kT(e){let t=e.match(/^([a-z][a-z0-9_]*):\s*([\s\S]*)$/);if(!t)return;let[,n,r]=t;if(!MT(n))return;let i=AT(r.trim());if(!i||typeof i!=`object`||Array.isArray(i))return{tool:n,output:r.trim()};let a=i,o=a.output,s=o&&typeof o==`object`&&!Array.isArray(o)?o:void 0;return{tool:n,ok:typeof a.ok==`boolean`?a.ok:void 0,command:typeof s?.command==`string`?s.command:void 0,output:s?.stdout??s?.output??o,error:typeof a.error==`string`?a.error:typeof s?.stderr==`string`&&!s.stdout?s.stderr:void 0}}function AT(e){try{return JSON.parse(e)}catch{return}}function jT(e){if(e!=null)return typeof e==`string`?e.trim()||void 0:JSON.stringify(e,null,2)}function MT(e){return[`edit_file`,`edit_memory_note`,`list_files`,`read_file`,`report_state`,`run_shell_inspect`,`run_shell_mutate`,`search_files`,`search_memory_notes`,`update_plan`,`view_image`,`web_search`].includes(e)}var NT=[{label:`OpenAI · GPT-5.5`,models:[`gpt-5.5`,`gpt-5.5-pro`]},{label:`OpenAI · GPT-5.4`,models:[`gpt-5.4`,`gpt-5.4-pro`,`gpt-5.4-mini`,`gpt-5.4-nano`]},{label:`OpenAI · GPT-5 family`,models:[`gpt-5`,`gpt-5-pro`,`gpt-5-mini`,`gpt-5-nano`]},{label:`OpenAI · Earlier GPT-5 releases`,models:[`gpt-5.2`,`gpt-5.2-pro`,`gpt-5.1`]},{label:`OpenAI · GPT-4.1`,models:[`gpt-4.1`,`gpt-4.1-mini`,`gpt-4.1-nano`]},{label:`OpenAI · Reasoning series`,models:[`o3-pro`,`o3`,`o3-mini`,`o4-mini`]},{label:`OpenAI · Coding-optimized`,models:[`gpt-5.3-codex`,`gpt-5.3-codex-spark`,`gpt-5.2-codex`,`gpt-5.1-codex`,`gpt-5.1-codex-max`,`gpt-5.1-codex-mini`]},{label:`Anthropic · Claude 4`,models:[`claude-opus-4-6`,`claude-sonnet-4-6`,`claude-haiku-4-5`]},{label:`Anthropic · Earlier Claude 4`,models:[`claude-opus-4-1`,`claude-opus-4-0`,`claude-sonnet-4-0`]},{label:`Anthropic · Claude 3.7`,models:[`claude-3-7-sonnet-latest`]},{label:`Anthropic · Claude 3.5`,models:[`claude-3-5-sonnet-latest`,`claude-3-5-haiku-latest`]}],PT=NT.filter(e=>e.label.startsWith(`OpenAI · `)),FT=NT.flatMap(e=>e.models);PT.flatMap(e=>e.models);var IT=[`gpt-5.5`,`gpt-5.4`,`gpt-5.4-mini`,`gpt-5.1-codex`,`gpt-5.1-codex-max`,`gpt-5.2`,`gpt-5.2-codex`,`gpt-5.3-codex`,`gpt-5.3-codex-spark`];new Map(FT.map(e=>[e,RT(e)]));function LT(e){return IT.includes(e.trim())}function RT(e){return e.startsWith(`gpt-5.5`)||e===`gpt-5.4`||e===`gpt-5.4-pro`||e===`gpt-5.4-mini`||e.startsWith(`gpt-5.1`)||e.startsWith(`gpt-5.2`)||e.startsWith(`gpt-5.3`)||e.startsWith(`gpt-5-`)||e===`gpt-5`?4e5:e.startsWith(`gpt-4.1`)?128e3:2e5}var zT=`OAuth mode supports a smaller OpenAI allowlist.`,BT=[`gpt-5.4`,`gpt-5.4-pro`,`gpt-5.4-mini`,`gpt-5.4-nano`,`gpt-5.5`,`gpt-5.5-pro`],VT={"gpt-5.4":`medium`,"gpt-5.4-pro":`medium`,"gpt-5.4-mini":`medium`,"gpt-5.4-nano":`low`,"gpt-5.5":`medium`,"gpt-5.5-pro":`medium`};function HT(e){return BT.includes(e)}function UT(e){return VT[e]}function WT({selectedModel:e,selectedModelUnsupported:t,disabled:n,groups:r,runActive:i,modelOptionsError:a,onSelectModel:o}){return(0,U.jsxs)(Ym,{children:[(0,U.jsx)(Xm,{asChild:!0,children:(0,U.jsxs)(G,{variant:`outline`,size:`sm`,className:oo(`model-select-trigger`,t&&`unsupported`),disabled:n,title:a?`Model options unavailable. Restart the Heddle daemon if this route was just added.`:void 0,children:[(0,U.jsx)(`span`,{children:e||`loading models`}),t?(0,U.jsx)(`span`,{className:`model-select-trigger-reason`,children:`Not supported`}):null]})}),r.length>0?(0,U.jsx)(Zm,{className:`model-select-menu p-2`,align:`end`,children:(0,U.jsx)(`div`,{role:`listbox`,"aria-label":`Model options`,children:r.map(t=>(0,U.jsxs)(`div`,{className:`model-select-group`,children:[(0,U.jsx)(`div`,{className:`model-select-group-label`,children:t.label}),t.resolvedOptions.map(t=>{let n=(0,U.jsxs)(`button`,{className:oo(`model-select-option`,t.id===e&&`selected`,t.disabled&&`disabled`),type:`button`,role:`option`,"aria-selected":t.id===e,"aria-disabled":t.disabled,disabled:t.disabled||i,onClick:()=>{t.disabled||o(t.id)},children:[(0,U.jsxs)(`span`,{children:[t.id===e?`✓ `:``,t.id]}),t.disabled?(0,U.jsx)(`span`,{className:`model-select-option-reason`,children:`Not supported`}):null]},t.id);return t.disabled?(0,U.jsx)(Ef,{children:(0,U.jsxs)(Df,{children:[(0,U.jsx)(Of,{asChild:!0,children:(0,U.jsx)(`span`,{className:`model-select-option-wrapper`,children:n})}),(0,U.jsx)(kf,{children:zT})]})},t.id):n})]},t.label))})}):null]})}var GT=`heddle.controlPlane.sessionPanelWidths`,KT=12,qT=420,JT=220,YT=520,XT=280,ZT=620;function QT(){let e=(0,d.useRef)(null),[t,n]=(0,d.useState)(()=>$T());return(0,d.useEffect)(()=>{window.localStorage.setItem(GT,JSON.stringify(t))},[t]),{shellRef:e,workspaceStyle:{"--session-sidebar-width":`${t.left}px`,"--session-side-width":`${t.right}px`},startPanelResize:(r,i)=>{i.preventDefault();let a=e.current?.getBoundingClientRect().width;if(!a)return;let o=i.clientX,s=t,c=Math.min(YT,a-s.right-qT-KT),l=Math.min(ZT,a-s.left-qT-KT),u=e=>{let t=e.clientX-o;n({left:r===`left`?eE(s.left+t,JT,c):s.left,right:r===`right`?eE(s.right-t,XT,l):s.right})},d=()=>{window.removeEventListener(`pointermove`,u),window.removeEventListener(`pointerup`,d)};window.addEventListener(`pointermove`,u),window.addEventListener(`pointerup`,d,{once:!0})}}}function $T(){try{let e=window.localStorage.getItem(GT);if(!e)return{left:288,right:344};let t=JSON.parse(e);return{left:eE(typeof t.left==`number`?t.left:288,JT,YT),right:eE(typeof t.right==`number`?t.right:344,XT,ZT)}}catch{return{left:288,right:344}}}function eE(e,t,n){return Math.min(Math.max(e,t),Math.max(t,n))}function tE({onSendPrompt:e}){let t=(0,d.useRef)(null),[n,r]=(0,d.useState)(``),[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)([]),[c,l]=(0,d.useState)(!1),[u,f]=(0,d.useState)(),[p,m]=(0,d.useState)(0);(0,d.useEffect)(()=>{if(!i){s([]),l(!1),f(void 0),m(0);return}let e=!1;l(!0);let t=window.setTimeout(()=>{Ni(i.query).then(t=>{e||(s(t),f(void 0),m(0))}).catch(t=>{e||(s([]),f(t instanceof Error?t.message:String(t)))}).finally(()=>{e||l(!1)})},220);return()=>{e=!0,window.clearTimeout(t)}},[i]);let h=(e,t)=>{r(e),a(nE(e,t??e.length))},g=e=>{if(!i)return;let o=`${n.slice(0,i.start)}@${e.path} ${n.slice(i.end)}`,c=i.start+e.path.length+2;r(o),a(null),s([]),window.requestAnimationFrame(()=>{t.current?.focus(),t.current?.setSelectionRange(c,c)})},_=()=>{let t=n.trim();t&&(r(``),e(t))};return{textareaRef:t,draft:n,mentionQuery:i,mentionSuggestions:o,mentionLoading:c,mentionError:u,activeMentionIndex:p,updateDraft:h,insertMention:g,submitDraft:_,handleComposerKeyDown:e=>{if(i&&(o.length||c)){if(e.key===`ArrowDown`){e.preventDefault(),m(e=>Math.min(e+1,Math.max(o.length-1,0)));return}if(e.key===`ArrowUp`){e.preventDefault(),m(e=>Math.max(e-1,0));return}if(e.key===`Escape`){e.preventDefault(),a(null),s([]);return}if((e.key===`Enter`||e.key===`Tab`)&&o[p]){e.preventDefault(),g(o[p]);return}}if(!(e.key!==`Enter`||e.nativeEvent.isComposing)){if(typeof window<`u`&&window.innerWidth<=760){(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey&&(e.preventDefault(),_());return}!e.shiftKey&&!e.altKey&&(e.preventDefault(),_())}}}}function nE(e,t){let n=e.slice(0,t).match(/(^|\s)@([^\s@]*)$/);if(!n||n.index===void 0)return null;let r=n[1]??``;return{query:n[2]??``,start:n.index+r.length,end:t}}function rE({selectedSessionId:e,onSelectSession:t,onSelectTurn:n}){let[r,i]=(0,d.useState)(`list`);return(0,d.useEffect)(()=>{if(!e){i(`list`);return}i(e=>e===`list`?`chat`:e)},[e]),{mobileView:r,shellClassName:(0,d.useMemo)(()=>oo(`workspace-shell`,`mobile-view-${r}`),[r]),selectSession:e=>{t(e),i(`chat`)},selectTurn:e=>{n(e),i(`review`)},showSessionList:()=>i(`list`),showChatView:()=>i(`chat`),openReviewInspector:()=>i(`review`)}}function iE(e){let t=e.auth?.openai?.type===`oauth`,n=(0,d.useMemo)(()=>e.modelOptions?e.modelOptions.groups.map(e=>({...e,resolvedOptions:(e.options??e.models.map(e=>({id:e,disabled:!1}))).map(e=>{let n=t&&e.id.startsWith(`gpt-`)?!LT(e.id):!1;return{id:e.id,disabled:n,disabledReason:n?`Not supported`:e.disabledReason}})})):[],[e.modelOptions,t]),r=(0,d.useMemo)(()=>n.flatMap(e=>e.resolvedOptions).find(t=>t.id===e.selectedModel),[n,e.selectedModel]),i=(0,d.useMemo)(()=>{let t=e.selectedModel?HT(e.selectedModel):!1,n=e.selectedModel?UT(e.selectedModel):void 0;return[{id:`default`,disabled:!t,label:n?`Default (${n})`:`Default`},{id:`low`,disabled:!t,label:`Low`},{id:`medium`,disabled:!t,label:`Medium`},{id:`high`,disabled:!t,label:`High`},{id:`ultrahigh`,disabled:!0,label:`Ultra high (reserved)`}]},[e.selectedModel]);return{groups:n,selectedModelOption:r,reasoningEffortOptions:i,selectedReasoningEffortOption:(0,d.useMemo)(()=>i.find(t=>t.id===(e.selectedReasoningEffort??`default`)),[i,e.selectedReasoningEffort]),selectorDisabled:e.runActive||!e.modelOptions}}function aE({auth:e,selectedModel:t,selectedReasoningEffort:n,runActive:r}){let[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(),{groups:c,selectedModelOption:l,reasoningEffortOptions:u,selectedReasoningEffortOption:f,selectorDisabled:p}=iE({modelOptions:i,auth:e,selectedModel:t,selectedReasoningEffort:n,runActive:r});return(0,d.useEffect)(()=>{let e=!1;return Ci().then(t=>{e||(a(t),s(void 0))}).catch(t=>{e||(a(null),s(t instanceof Error?t.message:String(t)))}),()=>{e=!0}},[]),{modelOptions:i,modelOptionsError:o,modelOptionGroups:c,selectedModelOption:l,reasoningEffortOptions:u,selectedReasoningEffortOption:f,modelSelectorDisabled:p}}function oE({runActive:e,sessionUpdatedAt:t,turnReview:n,selectedReviewFilePath:r}){let[i,a]=(0,d.useState)(null),[o,s]=(0,d.useState)(!1),[c,l]=(0,d.useState)(),[u,f]=(0,d.useState)(),[p,m]=(0,d.useState)({}),[h,g]=(0,d.useState)(!1),[_,v]=(0,d.useState)(),[y,b]=(0,d.useState)(0),x=n?.files.find(e=>e.path===r)??n?.files[0],S=i?.files.find(e=>e.path===u)??i?.files[0],C=S?p[S.path]??null:null,w=!!(x?.path&&S?.path===x.path&&x.patch&&C?.patch&&sE(x.patch)!==sE(C.patch));return(0,d.useEffect)(()=>{let e=!1;s(!0);async function t(){try{let t=await Fi();e||(a(t),l(void 0),f(e=>e&&t.files.some(t=>t.path===e)?e:t.files[0]?.path))}catch(t){e||l(t instanceof Error?t.message:String(t))}finally{e||s(!1)}}return t(),()=>{e=!0}},[e,t,y]),(0,d.useEffect)(()=>{let e=i?.files.map(e=>e.path)??[];if(!e.length){m({}),v(void 0),g(!1);return}let t=!1;g(!0);async function n(){try{let n=await Promise.all(e.map(async e=>[e,await R(e)]));t||(m(Object.fromEntries(n)),v(void 0))}catch(e){t||(m({}),v(e instanceof Error?e.message:String(e)))}finally{t||g(!1)}}return n(),()=>{t=!0}},[i,y]),{workspaceChanges:i,workspaceChangesLoading:o,workspaceChangesError:c,selectedWorkspaceFile:S,workspaceFileDiff:C,workspaceFileDiffsByPath:p,workspaceFileDiffLoading:h,workspaceFileDiffError:_,selectedTurnPatchIsStale:w,selectWorkspaceFile:f,refreshWorkspaceReview:()=>b(e=>e+1)}}function sE(e){return e.trim().replace(/\r\n/g,`
81
- `)}var cE=(0,d.lazy)(()=>_(()=>import(`./MonacoDiffViewer-F3AOHIps.js`),__vite__mapDeps([0,1,2,3])));function lE({diff:e,patch:t,fallbackTitle:n=`Raw patch`}){return e?.binary?(0,U.jsx)(nh,{title:`Binary file`,body:`Git reports this as a binary diff, so Heddle cannot render line-level changes.`}):e?.hunks.length?(0,U.jsx)(d.Suspense,{fallback:(0,U.jsx)(uE,{diff:e}),children:(0,U.jsx)(cE,{diff:e})}):t?(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-2`,children:[(0,U.jsx)(Y,{tone:`warn`,children:n}),(0,U.jsx)(`span`,{className:`min-w-0 text-xs text-muted-foreground`,children:`Structured hunks are unavailable for this patch.`})]}),(0,U.jsx)(sh,{children:t})]}):(0,U.jsx)(nh,{title:`No patch available`,body:`Git reports this file as changed, but no patch text is available for it.`})}function uE({diff:e}){return(0,U.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border bg-background font-mono text-xs`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2 border-b border-border bg-muted/30 px-3 py-2 font-sans`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`p`,{className:`truncate text-sm font-semibold text-foreground`,children:e.path}),e.oldPath?(0,U.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,children:[`from `,e.oldPath]}):null]}),(0,U.jsxs)(`div`,{className:`flex shrink-0 gap-2`,children:[(0,U.jsx)(Y,{children:e.status}),(0,U.jsxs)(Y,{tone:`good`,children:[`+`,e.additions,` / -`,e.deletions]})]})]}),(0,U.jsx)(`div`,{className:`max-h-[44rem] overflow-auto`,children:e.hunks.map((e,t)=>(0,U.jsx)(`table`,{className:`w-full border-collapse`,children:(0,U.jsxs)(`tbody`,{children:[(0,U.jsx)(`tr`,{children:(0,U.jsx)(`td`,{colSpan:2,className:`border-y border-border bg-muted/40 px-3 py-1 font-mono text-[11px] text-muted-foreground`,children:e.header})}),e.lines.map((t,n)=>(0,U.jsxs)(`tr`,{className:oo(t.type===`added`&&`bg-emerald-500/10`,t.type===`deleted`&&`bg-rose-500/10`),children:[(0,U.jsx)(`td`,{className:`w-14 select-none border-r border-border px-2 py-0.5 text-right text-muted-foreground/70`,children:t.type===`added`?t.newLineNumber:t.oldLineNumber??t.newLineNumber??``}),(0,U.jsx)(`td`,{className:`whitespace-pre px-3 py-0.5 text-foreground`,children:t.content})]},`${e.header}-${t.oldLineNumber??``}-${t.newLineNumber??``}-${n}`))]})},`${e.header}-${t}`))})]})}function dE({workspaceChanges:e,workspaceChangesLoading:t,workspaceChangesError:n,workspaceFileDiffsByPath:r,workspaceFileDiffLoading:i,workspaceFileDiffError:a,selectedTurnPatchIsStale:o,onSelectWorkspaceFile:s,onRefresh:c,onOpenDiff:l}){let u=vE(e?.files??[],r);return(0,U.jsx)(lh,{title:`Current workspace changes`,testId:`review-current-workspace`,actions:(0,U.jsxs)(`div`,{className:`review-section-actions`,children:[o?(0,U.jsx)(hE,{}):null,u.files?.length?(0,U.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,disabled:i,onClick:()=>l(u),children:`Open full diff`}):null,(0,U.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:c,disabled:t||i,children:`Refresh`})]}),children:t?(0,U.jsx)(nh,{title:`Loading workspace diff`,body:`Reading current Git changes from the active workspace.`}):n?(0,U.jsx)(nh,{title:`Workspace diff failed`,body:n}):e?.vcs===`none`?(0,U.jsx)(nh,{title:`Not a git workspace`,body:e.error??`Current workspace changes require a Git-backed project.`}):e?.files.length?(0,U.jsx)(`div`,{className:`detail-stack compact-stack`,children:(0,U.jsx)(gE,{files:e.files,sourceLabel:`current git`,testId:`review-current-file-list`,onSelect:s,renderContent:e=>{let t=r[e.path];return(0,U.jsx)(_E,{loading:i,error:a,diffError:t?.error,patch:t?.patch,diff:t?.diff,unavailableTitle:`No patch available`,unavailableBody:`Git reports this file as changed, but no patch text is available for it.`,loadingTitle:`Loading file diff`,loadingBody:`Reading the selected file patch.`,fallbackTitle:`Raw workspace patch`})}})}):(0,U.jsx)(nh,{title:`Clean workspace`,body:`Git does not report current project file changes.`})})}function fE({sessionDetail:e,selectedTurnId:t,onSelectTurn:n,turnReview:r,turnReviewLoading:i,turnReviewError:a,onSelectReviewFile:o,onOpenDiff:s}){let c=yE(r?.files??[]);return(0,U.jsxs)(lh,{title:`Captured turn diff`,actions:c.files?.length?(0,U.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>s(c),children:`Open full diff`}):void 0,children:[e?.turns.length?(0,U.jsx)(`div`,{className:`stack-list compact review-turn-picker`,children:[...e.turns].reverse().map(e=>(0,U.jsx)(jh,{turn:e,active:e.id===t,onClick:()=>n(e.id)},e.id))}):null,i?(0,U.jsx)(nh,{title:`Loading review`,body:`Reading trace-backed review evidence for the selected turn.`}):a?(0,U.jsx)(nh,{title:`Review load failed`,body:a}):r?.files.length?(0,U.jsx)(`div`,{className:`detail-stack compact-stack`,children:(0,U.jsx)(gE,{files:r.files,testId:`review-turn-file-list`,onSelect:o,renderContent:e=>(0,U.jsx)(_E,{patch:`patch`in e?e.patch:void 0,diff:`diff`in e?e.diff:void 0,unavailableTitle:`No patch captured`,unavailableBody:`This file was changed, but the turn did not capture patch text for it.`,fallbackTitle:`Raw turn patch`})})}):r?.diffExcerpt?(0,U.jsx)(sh,{children:r.diffExcerpt}):(0,U.jsx)(nh,{title:`No captured diff`,body:`This selected turn did not save file-level diff evidence. Check Evidence for commands and approvals.`})]})}function pE({turnReview:e,selectedTurn:t}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(lh,{title:`Review commands`,children:(0,U.jsx)(Mh,{commands:e?.reviewCommands??[],empty:`No git review commands captured for this turn.`})}),(0,U.jsx)(lh,{title:`Verification commands`,children:(0,U.jsx)(Mh,{commands:e?.verificationCommands??[],empty:`No verification commands captured for this turn.`})}),(0,U.jsx)(lh,{title:`Approvals and events`,children:e?.approvals.length?(0,U.jsx)(`div`,{className:`stack-list compact`,children:e.approvals.map((e,t)=>(0,U.jsxs)(`div`,{className:`detail-card`,children:[(0,U.jsx)(`p`,{className:`card-title`,children:e.tool}),(0,U.jsx)(`p`,{className:`muted`,children:e.command??`no command details`}),(0,U.jsx)(`div`,{className:`pills`,children:(0,U.jsx)(Y,{tone:e.approved?`good`:`warn`,children:e.approved?`approved`:`rejected`})}),e.reason?(0,U.jsx)(`p`,{className:`summary`,children:e.reason}):null]},`${e.tool}-${e.timestamp??t}`))}):t?.events.length?(0,U.jsx)(`div`,{className:`event-list`,children:t.events.map((e,n)=>(0,U.jsx)(`p`,{className:`event-line`,children:e},`${t.id}-${n}`))}):(0,U.jsx)(nh,{title:`No approvals or events`,body:`Turn-level approvals, tool review, or summarized events will appear here.`})})]})}function mE({diff:e,onClose:t}){return e?(0,U.jsx)(`div`,{className:`diff-dialog-backdrop`,role:`presentation`,onMouseDown:t,children:(0,U.jsxs)(`section`,{className:`diff-dialog`,role:`dialog`,"aria-modal":`true`,"aria-label":`${e.subtitle}: ${e.title}`,onMouseDown:e=>e.stopPropagation(),children:[(0,U.jsxs)(`header`,{className:`diff-dialog-header`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(`p`,{className:`topbar-eyebrow`,children:`Diff review`}),(0,U.jsx)(`h2`,{children:e.title}),(0,U.jsx)(`p`,{className:`muted`,children:e.subtitle})]}),(0,U.jsx)(G,{type:`button`,variant:`outline`,onClick:t,children:`Close`})]}),(0,U.jsx)(`div`,{className:`diff-dialog-body`,children:e.files?.length?(0,U.jsx)(`div`,{className:`detail-stack`,children:e.files.map(e=>(0,U.jsx)(lE,{diff:e.diff,patch:e.patch,fallbackTitle:e.fallbackTitle},e.title))}):(0,U.jsx)(lE,{diff:e.diff,patch:e.patch,fallbackTitle:e.fallbackTitle})})]})}):null}function hE(){return(0,U.jsx)(Ef,{delayDuration:120,children:(0,U.jsxs)(Df,{children:[(0,U.jsx)(Of,{asChild:!0,children:(0,U.jsx)(`button`,{className:`stale-diff-button`,type:`button`,"aria-label":`Current workspace differs from captured turn`,children:`i`})}),(0,U.jsx)(kf,{side:`left`,className:`max-w-64`,children:`The selected file also has trace-backed turn evidence, but the current Git patch is different. Treat Current as live workspace state.`})]})})}function gE({files:e,sourceLabel:t,testId:n,onSelect:r,renderContent:i}){let[a,o]=(0,d.useState)([]);return(0,d.useEffect)(()=>{let t=new Set(e.map(e=>e.path));o(e=>e.filter(e=>t.has(e)))},[e]),(0,U.jsx)(`div`,{className:`stack-list compact`,"data-testid":n,children:e.map(e=>{let n=!a.includes(e.path);return(0,U.jsxs)(`article`,{className:oo(`changed-file-review-card`,n&&`active`),children:[(0,U.jsxs)(`button`,{"data-testid":`changed-file-${e.path}`,type:`button`,className:`changed-file-review-header`,"aria-expanded":n,onClick:()=>{r(e.path),o(t=>t.includes(e.path)?t.filter(t=>t!==e.path):[...t,e.path])},children:[(0,U.jsxs)(`span`,{className:`list-button-header`,children:[(0,U.jsx)(`strong`,{children:e.path}),(0,U.jsx)(`span`,{children:e.status})]}),(0,U.jsxs)(`span`,{className:`pills compact-pills`,children:[`source`in e?(0,U.jsx)(Y,{children:e.source}):(0,U.jsx)(Y,{children:t??`current git`}),`additions`in e&&(e.additions!==void 0||e.deletions!==void 0)?(0,U.jsxs)(Y,{tone:`good`,children:[`+`,e.additions??0,` / -`,e.deletions??0]}):null,`binary`in e&&e.binary?(0,U.jsx)(Y,{tone:`warn`,children:`binary`}):null,`truncated`in e&&e.truncated?(0,U.jsx)(Y,{tone:`warn`,children:`truncated`}):null]})]}),n&&i?(0,U.jsx)(`div`,{className:`changed-file-review-body`,children:i(e)}):null]},`${`source`in e?e.source:`workspace`}-${e.path}`)})})}function _E({loading:e,error:t,diffError:n,patch:r,diff:i,unavailableTitle:a,unavailableBody:o,loadingTitle:s=`Loading diff`,loadingBody:c=`Reading the selected file patch.`,fallbackTitle:l}){return e?(0,U.jsx)(nh,{title:s,body:c}):t?(0,U.jsx)(nh,{title:`File diff failed`,body:t}):n?(0,U.jsx)(nh,{title:`File diff unavailable`,body:n}):r?(0,U.jsx)(`div`,{className:`detail-stack compact-stack`,children:(0,U.jsx)(lE,{diff:i,patch:r,fallbackTitle:l})}):(0,U.jsx)(nh,{title:a,body:o})}function vE(e,t){return{title:`Current workspace changes`,subtitle:`Current workspace diff`,fallbackTitle:`Raw workspace patch`,files:e.flatMap(e=>{let n=t[e.path];return n?.patch?[{title:e.path,diff:n.diff,patch:n.patch,fallbackTitle:`Raw workspace patch`}]:[]})}}function yE(e){return{title:`Captured turn changes`,subtitle:`Captured turn diff`,fallbackTitle:`Raw turn patch`,files:e.flatMap(e=>e.patch?[{title:e.path,diff:e.diff,patch:e.patch,fallbackTitle:`Raw turn patch`}]:[])}}function bE({reviewMode:e,onReviewModeChange:t,onShowChatView:n,workspaceChanges:r,workspaceChangesLoading:i,workspaceChangesError:a,workspaceFileDiffsByPath:o,workspaceFileDiffLoading:s,workspaceFileDiffError:c,selectedTurnPatchIsStale:l,onSelectWorkspaceFile:u,onRefreshWorkspaceReview:d,sessionDetail:f,selectedTurnId:p,onSelectTurn:m,turnReview:h,turnReviewLoading:g,turnReviewError:_,onSelectReviewFile:v,selectedTurn:y,onOpenDiff:b}){return(0,U.jsxs)(`aside`,{className:`workspace-side`,children:[(0,U.jsx)(`div`,{className:`mobile-side-header`,children:(0,U.jsx)(`button`,{className:`mobile-nav-button`,type:`button`,onClick:n,children:`← Chat`})}),(0,U.jsxs)(`div`,{className:`side-scroll`,children:[(0,U.jsxs)(`nav`,{className:`side-tabs review-mode-tabs`,role:`tablist`,"aria-label":`Review mode`,children:[(0,U.jsx)(`button`,{className:oo(e===`current`&&`active`),type:`button`,onClick:()=>t(`current`),children:`Current`}),(0,U.jsx)(`button`,{className:oo(e===`turn`&&`active`),type:`button`,onClick:()=>t(`turn`),children:`Turn history`}),(0,U.jsx)(`button`,{className:oo(e===`evidence`&&`active`),type:`button`,onClick:()=>t(`evidence`),children:`Evidence`})]}),e===`current`?(0,U.jsx)(dE,{workspaceChanges:r,workspaceChangesLoading:i,workspaceChangesError:a,workspaceFileDiffsByPath:o,workspaceFileDiffLoading:s,workspaceFileDiffError:c,selectedTurnPatchIsStale:l,onSelectWorkspaceFile:u,onRefresh:d,onOpenDiff:b}):e===`turn`?(0,U.jsx)(fE,{sessionDetail:f,selectedTurnId:p,onSelectTurn:m,turnReview:h,turnReviewLoading:g,turnReviewError:_,onSelectReviewFile:v,onOpenDiff:b}):(0,U.jsx)(pE,{turnReview:h,selectedTurn:y})]})]})}function xE({loading:e,suggestions:t,activeIndex:n,error:r,query:i,onPick:a}){return(0,U.jsxs)(`div`,{className:`mention-menu`,role:`listbox`,"aria-label":`File suggestions`,children:[(0,U.jsxs)(`div`,{className:`mention-menu-header`,children:[(0,U.jsx)(`span`,{children:`@ file`}),(0,U.jsx)(`span`,{children:e?`Searching...`:`${t.length} match${t.length===1?``:`es`}`})]}),r?(0,U.jsx)(`p`,{className:`mention-empty`,children:`File search unavailable. Restart the Heddle daemon if this route was just added.`}):t.length?t.map((e,t)=>(0,U.jsx)(`button`,{className:oo(`mention-option`,t===n&&`active`),type:`button`,role:`option`,"aria-selected":t===n,onMouseDown:t=>{t.preventDefault(),a(e)},children:(0,U.jsxs)(`span`,{children:[`@`,e.path]})},e.path)):(0,U.jsx)(`p`,{className:`mention-empty`,children:e?`Searching workspace files...`:`No files found for "${i}".`})]})}var SE=d.forwardRef(({className:e,...t},n)=>(0,U.jsx)(`textarea`,{className:Gs(`flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:n,...t}));SE.displayName=`Textarea`;function CE({activeView:e,title:t,subtitle:n,onBackToSessions:r,onOpenChat:i,onOpenReview:a}){return(0,U.jsxs)(`header`,{className:`shrink-0 border-b border-border bg-card px-3 py-2`,children:[(0,U.jsxs)(`div`,{className:`grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-2`,children:[(0,U.jsx)(G,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,onClick:r,children:`‹ Sessions`}),(0,U.jsxs)(`div`,{className:`min-w-0 text-center`,children:[(0,U.jsx)(`h2`,{className:`m-0 truncate text-sm font-semibold leading-5 tracking-normal`,children:t}),n?(0,U.jsx)(`p`,{className:`m-0 truncate text-xs leading-4 text-muted-foreground`,children:n}):null]}),(0,U.jsx)(`div`,{className:`w-[76px]`,"aria-hidden":`true`})]}),(0,U.jsxs)(`nav`,{className:`mt-2 grid grid-cols-2 rounded-md bg-muted p-1`,"aria-label":`Session views`,children:[(0,U.jsx)(wE,{active:e===`chat`,onClick:i,children:`Chat`}),(0,U.jsx)(wE,{active:e===`review`,onClick:a,children:`Review`})]})]})}function wE({active:e,onClick:t,children:n}){return(0,U.jsx)(`button`,{type:`button`,className:Gs(`h-8 rounded-md text-xs font-medium text-muted-foreground transition-colors`,e&&`bg-background text-foreground shadow-sm`),"aria-current":e?`page`:void 0,onClick:t,children:n})}var TE=new Set([`run_shell_mutate`,`edit_file`,`write_to_file`,`delete_file`,`apply_patch`]);function EE({approval:e,open:t,onOpenChange:n,onResolve:r}){if(!e||!t)return null;let i=TE.has(e.tool)?`high`:`medium`,a=DE(e.input),o=OE(e.input),s=AE(e.input);return(0,U.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-end`,role:`dialog`,"aria-modal":`true`,"aria-label":`Pending approval details`,children:[(0,U.jsx)(`button`,{type:`button`,className:`absolute inset-0 bg-black/45`,"aria-label":`Close approval details`,onClick:()=>n(!1)}),(0,U.jsxs)(`section`,{className:`relative z-10 flex max-h-[82dvh] w-full flex-col rounded-t-2xl border border-border bg-card`,children:[(0,U.jsx)(`header`,{className:`shrink-0 border-b border-border px-3 py-3`,children:(0,U.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsxs)(`p`,{className:`m-0 text-sm font-semibold`,children:[`Approval required: `,e.tool]}),(0,U.jsxs)(`p`,{className:`m-0 mt-1 truncate text-xs text-muted-foreground`,children:[`Call ID: `,e.callId]}),(0,U.jsxs)(`p`,{className:`m-0 mt-1 truncate text-xs text-muted-foreground`,children:[`Requested: `,new Date(e.requestedAt).toLocaleString()]})]}),(0,U.jsxs)(W,{variant:i===`high`?`destructive`:`secondary`,children:[i,` risk`]})]})}),(0,U.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:[(0,U.jsxs)(`dl`,{className:`grid gap-2 text-xs`,children:[(0,U.jsxs)(`div`,{className:`rounded-md border border-border bg-background px-2 py-2`,children:[(0,U.jsx)(`dt`,{className:`font-medium text-foreground`,children:`Path target`}),(0,U.jsx)(`dd`,{className:`m-0 mt-1 break-all text-muted-foreground`,children:a??`No explicit path in payload`})]}),(0,U.jsxs)(`div`,{className:`rounded-md border border-border bg-background px-2 py-2`,children:[(0,U.jsx)(`dt`,{className:`font-medium text-foreground`,children:`Command target`}),(0,U.jsx)(`dd`,{className:`m-0 mt-1 break-all text-muted-foreground`,children:o??`No explicit command in payload`})]})]}),(0,U.jsxs)(`div`,{className:`mt-3 rounded-md border border-border bg-background`,children:[(0,U.jsx)(`div`,{className:`border-b border-border px-2 py-2 text-xs font-medium`,children:`Raw payload`}),(0,U.jsx)(`pre`,{className:`m-0 max-h-[34dvh] overflow-auto whitespace-pre-wrap break-words px-2 py-2 text-[11px] leading-4 text-muted-foreground`,children:s})]})]}),(0,U.jsx)(`footer`,{className:`sticky bottom-0 z-10 shrink-0 border-t border-border bg-card px-3 py-3 pb-[calc(env(safe-area-inset-bottom)+0.75rem)]`,children:(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,U.jsx)(G,{type:`button`,className:`h-11`,onClick:()=>r(!0),children:`Approve`}),(0,U.jsx)(G,{type:`button`,variant:`outline`,className:`h-11`,onClick:()=>r(!1),children:`Deny`})]})})]})]})}function DE(e){let t=kE(e,[`targetFile`,`file_path`,`filePath`,`path`,`paths`,`absolute_path`]);if(t)return t}function OE(e){return kE(e,[`command`,`CommandLine`,`cmd`])}function kE(e,t){if(!(!e||typeof e!=`object`))for(let n of t){let t=e[n];if(typeof t==`string`&&t.trim())return t;if(Array.isArray(t)){let e=t.filter(e=>typeof e==`string`&&!!e.trim());if(e.length>0)return e.slice(0,3).join(`, `)}}}function AE(e){if(e===void 0)return`No payload provided.`;try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}function jE({activeSession:e,sessionDetail:t,sessionDetailLoading:n,sessionDetailError:r,selectedSessionId:i,runActive:a,runInFlight:o,memoryUpdating:s,authStatus:c,sendPromptError:l,sessionNotice:u,draft:f,pendingApproval:p,conversationScrollRef:m,textareaRef:h,mentionMenu:g,renderMessage:_,onDraftChange:v,onComposerKeyDown:y,onBackToSessions:b,onOpenReview:x,onSubmitPrompt:S,onContinueSession:C,onCancelSessionRun:w,onResolveApproval:T}){let E=!!(i&&!a&&f.trim()),D=!!(i&&!a&&t?.lastContinuePrompt),O=t?.name??e?.name??`Chat session`,ee=(t?.context?.compaction?.status??e?.context?.compaction?.status)===`running`,[k,A]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{p||A(!1)},[p]),(0,U.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,U.jsx)(CE,{activeView:`chat`,title:O,subtitle:e?`updated ${co(e.updatedAt)}`:`Pick a session`,onBackToSessions:b,onOpenChat:()=>void 0,onOpenReview:x}),(0,U.jsx)(`div`,{ref:m,className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:(0,U.jsx)(`div`,{className:`flex min-h-full flex-col justify-end gap-3`,children:n?(0,U.jsx)(FE,{title:`Loading session`,body:`Fetching conversation state.`}):r?(0,U.jsx)(FE,{title:`Session load failed`,body:r}):t&&t.messages.length?t.messages.map(e=>_(e)):(0,U.jsx)(FE,{title:`No conversation`,body:`Start with a prompt from the composer.`})})}),(0,U.jsx)(ME,{draft:f,disabled:!i||a,runActive:a,runInFlight:o,memoryUpdating:s,authStatus:c,canSend:E,canContinue:D,pendingApproval:p,compacting:ee,onOpenApprovalSheet:()=>A(!0),sendPromptError:l,sessionNotice:u,textareaRef:h,mentionMenu:g,onDraftChange:v,onComposerKeyDown:y,onSubmitPrompt:S,onContinueSession:C,onCancelSessionRun:w}),(0,U.jsx)(EE,{approval:p,open:k,onOpenChange:A,onResolve:e=>{T(e),A(!1)}})]})}function ME({draft:e,disabled:t,runActive:n,runInFlight:r,memoryUpdating:i,authStatus:a,canSend:o,canContinue:s,pendingApproval:c,compacting:l,onOpenApprovalSheet:u,sendPromptError:d,sessionNotice:f,textareaRef:p,mentionMenu:m,onDraftChange:h,onComposerKeyDown:g,onSubmitPrompt:_,onContinueSession:v,onCancelSessionRun:y}){let b=l?`Compacting earlier conversation history into an archive summary.`:d??f??(i?`Memory updating in the background.`:void 0);return(0,U.jsxs)(`footer`,{className:`relative shrink-0 border-t border-border bg-card px-2 py-2`,children:[c?(0,U.jsx)(NE,{approval:c,onOpen:u}):null,m,(0,U.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,U.jsx)(SE,{ref:p,rows:1,value:e,className:`max-h-24 min-h-10 resize-none rounded-md bg-background px-3 py-2 text-base leading-6 md:text-sm md:leading-5`,disabled:t,placeholder:n?`Heddle is working...`:`Message Heddle`,onChange:e=>h(e.target.value,e.target.selectionStart),onClick:t=>h(e,t.currentTarget.selectionStart),onSelect:t=>h(e,t.currentTarget.selectionStart),onKeyDown:g}),(0,U.jsx)(G,{type:`button`,size:`sm`,className:`h-10 shrink-0 px-3`,disabled:!o,onClick:_,children:`Send`})]}),(0,U.jsxs)(`div`,{className:`mt-1 flex items-center justify-between gap-2`,children:[(0,U.jsx)(`div`,{className:`min-w-0`,children:b?(0,U.jsx)(`p`,{className:`m-0 truncate text-xs text-muted-foreground`,children:b}):(0,U.jsx)(PE,{runActive:n})}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[a?(0,U.jsx)(W,{variant:`secondary`,children:a}):null,(0,U.jsx)(G,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,disabled:!s,onClick:v,children:`Continue`}),(0,U.jsx)(G,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,disabled:!r,onClick:y,children:`Cancel`})]})]})]})}function NE({approval:e,onOpen:t}){return(0,U.jsxs)(`button`,{type:`button`,className:`mb-2 flex w-full items-center justify-between gap-2 rounded-md border border-destructive/40 bg-destructive/10 px-3 py-2 text-left`,onClick:t,"aria-label":`Open pending approval for ${e.tool}`,children:[(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsxs)(`p`,{className:`m-0 truncate text-xs font-semibold text-foreground`,children:[`Approval required: `,e.tool]}),(0,U.jsx)(`p`,{className:`m-0 truncate text-[11px] text-muted-foreground`,children:`Tap for details and actions`})]}),(0,U.jsx)(W,{variant:`destructive`,className:`shrink-0`,children:`Pending`})]})}function PE({runActive:e}){return(0,U.jsx)(W,{variant:e?`outline`:`secondary`,children:e?`working`:`idle`})}function FE({title:e,body:t}){return(0,U.jsxs)(`div`,{className:`rounded-md border border-border bg-card px-3 py-3`,children:[(0,U.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:e}),(0,U.jsx)(`p`,{className:`m-0 mt-1 text-xs text-muted-foreground`,children:t})]})}function IE({activeSession:e,sessionDetail:t,selectedTurnId:n,selectedTurn:r,turnReview:i,turnReviewLoading:a,turnReviewError:o,workspaceChanges:s,workspaceChangesLoading:c,workspaceChangesError:l,selectedWorkspaceFile:u,workspaceFileDiff:f,workspaceFileDiffLoading:p,workspaceFileDiffError:m,onSelectWorkspaceFile:h,onRefreshWorkspaceReview:g,selectedTurnPatchIsStale:_,onOpenDiff:v,onBackToSessions:y,onOpenChat:b,onSelectTurn:x}){let[S,C]=(0,d.useState)(`current`),[w,T]=(0,d.useState)(),E=t?.name??e?.name??`Session`,D=`Review evidence`,O=i?.files.find(e=>e.path===w)??i?.files[0],ee=i?.files[0]?.path;(0,d.useEffect)(()=>{T(ee)},[ee,n,i?.traceFile]);let k=(0,d.useMemo)(()=>i?[{label:`Review`,commands:i.reviewCommands},{label:`Verification`,commands:i.verificationCommands},{label:`Mutation`,commands:i.mutationCommands}]:[],[i]);return(0,U.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,U.jsx)(CE,{activeView:`review`,title:E,subtitle:e?`${D} · updated ${co(e.updatedAt)}`:D,onBackToSessions:y,onOpenChat:b,onOpenReview:()=>void 0}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsxs)(`nav`,{className:`grid grid-cols-3 rounded-md bg-muted p-1`,"aria-label":`Review evidence tabs`,children:[(0,U.jsx)(BE,{active:S===`current`,onClick:()=>C(`current`),children:`Current`}),(0,U.jsx)(BE,{active:S===`turn`,onClick:()=>C(`turn`),children:`Turn`}),(0,U.jsx)(BE,{active:S===`evidence`,onClick:()=>C(`evidence`),children:`Evidence`})]}),S===`current`?(0,U.jsx)(LE,{title:`Current workspace changes`,actions:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[_?(0,U.jsx)(W,{variant:`outline`,children:`live diff differs`}):null,(0,U.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:g,disabled:c||p,children:`Refresh`})]}),children:c?(0,U.jsx)(VE,{title:`Loading workspace diff`,body:`Reading current Git changes from the active workspace.`}):l?(0,U.jsx)(VE,{title:`Workspace diff failed`,body:l}):s?.vcs===`none`?(0,U.jsx)(VE,{title:`Not a git workspace`,body:s.error??`Current workspace changes require a Git-backed project.`}):s?.files.length?(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`flex gap-2 overflow-x-auto pb-1`,children:s.files.map(e=>(0,U.jsxs)(`button`,{type:`button`,className:`shrink-0 rounded-md border px-2 py-1 text-left text-[11px] ${u?.path===e.path?`border-primary bg-primary/5 text-foreground`:`border-border bg-background text-muted-foreground`}`,onClick:()=>h(e.path),children:[(0,U.jsx)(`span`,{className:`block max-w-44 truncate font-medium`,children:e.path}),(0,U.jsxs)(`span`,{className:`block`,children:[e.status,e.additions!==void 0||e.deletions!==void 0?` · +${e.additions??0} / -${e.deletions??0}`:``]})]},`workspace-${e.path}`))}),p?(0,U.jsx)(VE,{title:`Loading file diff`,body:`Reading the selected file patch.`}):m?(0,U.jsx)(VE,{title:`File diff failed`,body:m}):f?.error?(0,U.jsx)(VE,{title:`File diff unavailable`,body:f.error}):f?.patch?(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>v({title:u?.path??f.path,subtitle:`Current workspace diff`,diff:f.diff,patch:f.patch,fallbackTitle:`Raw workspace patch`}),children:`Open full diff`}),(0,U.jsx)(lE,{diff:f.diff,patch:f.patch,fallbackTitle:`Raw workspace patch`})]}):(0,U.jsx)(VE,{title:`No patch available`,body:`Git reports this file as changed, but no patch text is available for it.`})]}):(0,U.jsx)(VE,{title:`Clean workspace`,body:`Git does not report current project file changes.`})}):S===`evidence`?(0,U.jsx)(`div`,{className:`space-y-3`,children:a?(0,U.jsx)(VE,{title:`Loading review`,body:`Reading trace-backed review evidence for the selected turn.`}):o?(0,U.jsx)(VE,{title:`Review load failed`,body:o}):(0,U.jsxs)(U.Fragment,{children:[k.map(e=>(0,U.jsx)(RE,{label:e.label,commands:e.commands},e.label)),(0,U.jsx)(zE,{turnReview:i,selectedTurn:r})]})}):(0,U.jsxs)(LE,{title:`Captured turn diff`,children:[t?.turns.length?(0,U.jsx)(`div`,{className:`mb-2 flex gap-2 overflow-x-auto pb-1`,children:[...t.turns].reverse().map(e=>(0,U.jsxs)(`button`,{type:`button`,className:`shrink-0 rounded-md border px-2 py-1 text-left text-[11px] ${e.id===n?`border-primary bg-primary/5 text-foreground`:`border-border bg-background text-muted-foreground`}`,onClick:()=>x(e.id),children:[(0,U.jsx)(`span`,{className:`block max-w-44 truncate font-medium`,children:e.prompt}),(0,U.jsxs)(`span`,{className:`block`,children:[e.outcome,` · `,e.steps,` steps`]})]},e.id))}):null,a?(0,U.jsx)(VE,{title:`Loading review`,body:`Reading trace-backed review evidence for the selected turn.`}):o?(0,U.jsx)(VE,{title:`Review load failed`,body:o}):i?.files.length?(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`div`,{className:`flex gap-2 overflow-x-auto pb-1`,children:i.files.map(e=>(0,U.jsxs)(`button`,{type:`button`,className:`shrink-0 rounded-md border px-2 py-1 text-left text-[11px] ${O?.path===e.path?`border-primary bg-primary/5 text-foreground`:`border-border bg-background text-muted-foreground`}`,onClick:()=>T(e.path),children:[(0,U.jsx)(`span`,{className:`block max-w-44 truncate font-medium`,children:e.path}),(0,U.jsxs)(`span`,{className:`block`,children:[e.status,` · `,e.source,e.truncated?` · truncated`:``]})]},`${e.source}-${e.path}`))}),O?.patch?(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>v({title:O.path,subtitle:`Captured turn diff`,diff:O.diff,patch:O.patch,fallbackTitle:`Raw turn patch`}),children:`Open full diff`}),(0,U.jsx)(lE,{diff:O.diff,patch:O.patch,fallbackTitle:`Raw turn patch`})]}):(0,U.jsx)(VE,{title:`No patch captured`,body:`This file was changed, but the turn did not capture patch text for it.`})]}):i?.diffExcerpt?(0,U.jsx)(`pre`,{className:`max-h-[52dvh] overflow-auto rounded-md border border-border bg-background p-2 text-[11px] leading-4 text-muted-foreground`,children:i.diffExcerpt}):(0,U.jsx)(VE,{title:`No changed files`,body:`This turn did not capture structured file review data.`})]})]})})]})}function LE({title:e,actions:t,children:n}){return(0,U.jsxs)(`section`,{className:`rounded-md border border-border bg-card px-3 py-3`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:e}),t]}),(0,U.jsx)(`div`,{className:`mt-2`,children:n})]})}function RE({label:e,commands:t}){return(0,U.jsx)(LE,{title:`${e} commands`,children:t.length?(0,U.jsx)(`div`,{className:`space-y-2`,children:t.map(t=>(0,U.jsxs)(`div`,{className:`rounded-md border border-border bg-background px-2 py-2`,children:[(0,U.jsx)(`p`,{className:`m-0 break-words text-xs font-medium text-foreground`,children:t.command}),(0,U.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-1`,children:[(0,U.jsx)(W,{variant:`outline`,children:t.tool}),(0,U.jsxs)(W,{variant:t.exitCode===0?`secondary`:`outline`,children:[`exit `,t.exitCode??`n/a`]})]}),t.stdout?(0,U.jsx)(`pre`,{className:`mt-2 max-h-36 overflow-auto rounded border border-border bg-card p-2 text-[11px] leading-4 text-muted-foreground`,children:t.stdout}):null,t.stderr?(0,U.jsx)(`pre`,{className:`mt-2 max-h-36 overflow-auto rounded border border-border bg-card p-2 text-[11px] leading-4 text-destructive`,children:t.stderr}):null]},`${e}-${t.tool}-${t.command}`))}):(0,U.jsx)(VE,{title:`No commands`,body:`No ${e.toLowerCase()} commands captured for this turn.`})})}function zE({turnReview:e,selectedTurn:t}){return(0,U.jsx)(LE,{title:`Approvals and events`,children:e?.approvals.length?(0,U.jsx)(`div`,{className:`space-y-2`,children:e.approvals.map((e,t)=>(0,U.jsxs)(`div`,{className:`rounded-md border border-border bg-background px-2 py-2`,children:[(0,U.jsx)(`p`,{className:`m-0 text-xs font-medium text-foreground`,children:e.tool}),(0,U.jsx)(`p`,{className:`m-0 mt-1 break-words text-[11px] text-muted-foreground`,children:e.command??`no command details`}),(0,U.jsx)(`div`,{className:`mt-1`,children:(0,U.jsx)(W,{variant:e.approved?`secondary`:`destructive`,children:e.approved?`approved`:`rejected`})}),e.reason?(0,U.jsx)(`p`,{className:`m-0 mt-1 text-[11px] text-muted-foreground`,children:e.reason}):null]},`${e.tool}-${e.timestamp??t}`))}):t?.events.length?(0,U.jsx)(`div`,{className:`space-y-1`,children:t.events.map((e,n)=>(0,U.jsx)(`p`,{className:`m-0 rounded-md border border-border bg-background px-2 py-2 text-[11px] text-muted-foreground`,children:e},`${t.id}-${n}`))}):(0,U.jsx)(VE,{title:`No approvals or events`,body:`Turn-level approvals and events will appear here.`})})}function BE({active:e,onClick:t,children:n}){return(0,U.jsx)(`button`,{type:`button`,className:`h-8 rounded-md text-[11px] font-medium ${e?`bg-background text-foreground shadow-sm`:`text-muted-foreground`}`,"aria-current":e?`page`:void 0,onClick:t,children:n})}function VE({title:e,body:t}){return(0,U.jsxs)(`div`,{className:`rounded-md border border-border bg-background px-3 py-3`,children:[(0,U.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:e}),(0,U.jsx)(`p`,{className:`m-0 mt-1 text-xs text-muted-foreground`,children:t})]})}function HE({mobileView:e,sessions:t,activeSession:n,sessionDetail:r,sessionDetailLoading:i,sessionDetailError:a,selectedSessionId:o,selectedTurnId:s,selectedTurn:c,turnReview:l,turnReviewLoading:u,turnReviewError:d,runActive:f,runInFlight:p,memoryUpdating:m,authStatus:h,sendPromptError:g,sessionNotice:_,draft:v,pendingApproval:y,conversationScrollRef:b,textareaRef:x,mentionMenu:S,workspaceChanges:C,workspaceChangesLoading:w,workspaceChangesError:T,workspaceFileDiff:E,workspaceFileDiffsByPath:D,workspaceFileDiffLoading:O,workspaceFileDiffError:ee,selectedTurnPatchIsStale:k,expandedDiff:A,creatingSession:j,onCreateSession:M,onSelectSession:te,onSelectTurn:N,onDraftChange:P,onComposerKeyDown:F,onBackToSessions:ne,onOpenReview:re,onSubmitPrompt:ie,onContinueSession:ae,onCancelSessionRun:I,onResolveApproval:L,onSelectWorkspaceFile:oe,onRefreshWorkspaceReview:se,onOpenDiff:ce,onOpenChat:le,onCloseDiff:ue}){return e===`list`?(0,U.jsx)(`section`,{className:`mobile-session-screen mobile-session-list`,children:(0,U.jsxs)(`aside`,{className:`workspace-sidebar mobile-pane`,children:[(0,U.jsx)(ch,{title:`Sessions`,subtitle:`${t.length} saved conversation${t.length===1?``:`s`}`,actions:(0,U.jsx)(`button`,{className:`sidebar-action-button`,type:`button`,"data-testid":`new-session-button`,disabled:j,onClick:()=>void M(),children:j?`Creating…`:`+ New session`})}),(0,U.jsx)(`div`,{className:`sidebar-scroll`,children:t.length?(0,U.jsx)(`div`,{className:`stack-list compact`,children:t.map(e=>(0,U.jsx)(Oh,{session:e,active:e.id===o,onClick:()=>te(e.id)},e.id))}):(0,U.jsx)(`div`,{className:`sidebar-empty-state`,children:(0,U.jsx)(nh,{title:`No sessions`,body:`Create a new web session to start a fresh conversation in the browser.`})})})]})}):e===`chat`?(0,U.jsx)(jE,{activeSession:n,sessionDetail:r,sessionDetailLoading:i,sessionDetailError:a,selectedSessionId:o,runActive:f,runInFlight:p,memoryUpdating:m,authStatus:h,sendPromptError:g,sessionNotice:_,draft:v,pendingApproval:y,conversationScrollRef:b,textareaRef:x,mentionMenu:S,renderMessage:e=>(0,U.jsx)(ST,{message:e},e.id),onDraftChange:P,onComposerKeyDown:F,onBackToSessions:ne,onOpenReview:re,onSubmitPrompt:ie,onContinueSession:()=>void ae(),onCancelSessionRun:()=>void I(),onResolveApproval:e=>void L(e)}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(IE,{activeSession:n,sessionDetail:r,selectedTurnId:s,selectedTurn:c,turnReview:l,turnReviewLoading:u,turnReviewError:d,workspaceChanges:C,workspaceChangesLoading:w,workspaceChangesError:T,workspaceFileDiff:E,workspaceFileDiffsByPath:D,workspaceFileDiffLoading:O,workspaceFileDiffError:ee,onSelectWorkspaceFile:oe,onRefreshWorkspaceReview:se,selectedTurnPatchIsStale:k,onOpenDiff:ce,onBackToSessions:ne,onOpenChat:le,onSelectTurn:N}),(0,U.jsx)(mE,{diff:A,onClose:ue})]})}function UE(e,t){return e?`drift ${t??`unknown`}`:`drift off`}function WE({sessions:e,activeSession:t,sessionDetail:n,sessionDetailLoading:r,sessionDetailError:i,selectedSessionId:a,onSelectSession:o,selectedTurnId:s,onSelectTurn:c,selectedTurn:l,turnReview:u,turnReviewLoading:f,turnReviewError:p,sendingPrompt:m,runInFlight:h,memoryUpdating:g,auth:_,sendPromptError:v,onSendPrompt:y,creatingSession:b,sessionNotice:x,onCreateSession:S,onContinueSession:C,onCancelSessionRun:w,onUpdateSessionSettings:T,pendingApproval:E,onResolveApproval:D}){let O=(0,d.useRef)(null),[ee,k]=(0,d.useState)(),[A,j]=(0,d.useState)(`current`),[M,te]=(0,d.useState)(null),{textareaRef:N,draft:P,mentionQuery:F,mentionSuggestions:ne,mentionLoading:re,mentionError:ie,activeMentionIndex:ae,updateDraft:I,insertMention:L,submitDraft:oe,handleComposerKeyDown:se}=tE({onSendPrompt:y}),{shellRef:ce,workspaceStyle:le,startPanelResize:ue}=QT(),{mobileView:de,shellClassName:fe,selectSession:pe,selectTurn:me,showSessionList:he,showChatView:ge,openReviewInspector:_e}=rE({selectedSessionId:a,onSelectSession:o,onSelectTurn:c}),ve=m||h,ye=Eh(n?.model??t?.model,_),be=n?.context?.compaction?.status??t?.context?.compaction?.status,xe=n?.model??t?.model??``,{modelOptions:Se,modelOptionsError:Ce,modelOptionGroups:we,selectedModelOption:Te,reasoningEffortOptions:Ee,selectedReasoningEffortOption:De,modelSelectorDisabled:Oe}=aE({auth:_,selectedModel:xe,selectedReasoningEffort:n?.reasoningEffort??t?.reasoningEffort,runActive:ve}),{workspaceChanges:ke,workspaceChangesLoading:Ae,workspaceChangesError:je,workspaceFileDiff:Me,workspaceFileDiffsByPath:Ne,workspaceFileDiffLoading:Pe,workspaceFileDiffError:Fe,selectedTurnPatchIsStale:Ie,selectWorkspaceFile:Le,refreshWorkspaceReview:Re}=oE({runActive:ve,sessionUpdatedAt:n?.updatedAt,turnReview:u,selectedReviewFilePath:ee}),ze=u?.files[0]?.path;(0,d.useEffect)(()=>{let e=O.current;if(!e)return;let t,n=window.requestAnimationFrame(()=>{e.scrollTop=e.scrollHeight,t=window.setTimeout(()=>{e.scrollTop=e.scrollHeight},0)});return()=>{window.cancelAnimationFrame(n),t!==void 0&&window.clearTimeout(t)}},[de,a,n?.messages.length,r,i]),(0,d.useEffect)(()=>{k(ze)},[ze,s,u?.traceFile]);let Be=F?(0,U.jsx)(xE,{loading:re,suggestions:ne,activeIndex:ae,error:ie,query:F.query,onPick:L}):null;return typeof window<`u`&&window.innerWidth<=760?(0,U.jsx)(HE,{mobileView:de,sessions:e,activeSession:t,sessionDetail:n,sessionDetailLoading:r,sessionDetailError:i,selectedSessionId:a,selectedTurnId:s,selectedTurn:l,turnReview:u,turnReviewLoading:f,turnReviewError:p,runActive:ve,runInFlight:h,memoryUpdating:g,authStatus:ye,sendPromptError:v,sessionNotice:x,draft:P,pendingApproval:E,conversationScrollRef:O,textareaRef:N,mentionMenu:Be,workspaceChanges:ke,workspaceChangesLoading:Ae,workspaceChangesError:je,workspaceFileDiff:Me,workspaceFileDiffsByPath:Ne,workspaceFileDiffLoading:Pe,workspaceFileDiffError:Fe,selectedTurnPatchIsStale:Ie,expandedDiff:M,creatingSession:b,onCreateSession:S,onSelectSession:pe,onSelectTurn:me,onDraftChange:I,onComposerKeyDown:se,onBackToSessions:he,onOpenReview:_e,onSubmitPrompt:oe,onContinueSession:C,onCancelSessionRun:w,onResolveApproval:D,onSelectWorkspaceFile:Le,onRefreshWorkspaceReview:Re,onOpenDiff:te,onOpenChat:ge,onCloseDiff:()=>te(null)}):(0,U.jsxs)(`section`,{className:fe,ref:ce,style:le,"data-mobile-view":de,children:[(0,U.jsxs)(`aside`,{className:`workspace-sidebar`,children:[(0,U.jsx)(ch,{title:`Sessions`,subtitle:`${e.length} saved conversation${e.length===1?``:`s`}`,actions:(0,U.jsx)(`button`,{className:`sidebar-action-button`,type:`button`,"data-testid":`new-session-button`,disabled:b,onClick:()=>void S(),children:b?`Creating…`:`+ New session`})}),(0,U.jsx)(`div`,{className:`sidebar-scroll`,children:e.length?(0,U.jsx)(`div`,{className:`stack-list compact`,children:e.map(e=>(0,U.jsx)(Oh,{session:e,active:e.id===a,onClick:()=>pe(e.id)},e.id))}):(0,U.jsx)(`div`,{className:`sidebar-empty-state`,children:(0,U.jsx)(nh,{title:`No sessions`,body:`Create a new web session to start a fresh conversation in the browser.`})})})]}),(0,U.jsx)(`button`,{className:`workspace-resizer`,type:`button`,"aria-label":`Resize sessions sidebar`,onPointerDown:e=>ue(`left`,e)}),(0,U.jsxs)(`section`,{className:`workspace-main`,children:[(0,U.jsx)(ch,{title:n?.name??t?.name??`Chat session`,subtitle:t?`${t.id} · updated ${co(t.updatedAt)}`:`Pick a session to inspect its conversation.`,actions:t?(0,U.jsxs)(`div`,{className:`session-controls`,children:[(0,U.jsx)(`button`,{className:`mobile-nav-button`,type:`button`,onClick:he,children:`← Sessions`}),(0,U.jsx)(`button`,{className:`mobile-nav-button mobile-inspector-button`,type:`button`,onClick:_e,children:`Review`}),(0,U.jsxs)(`div`,{className:`model-select-control`,children:[(0,U.jsxs)(`label`,{className:`select-control`,children:[(0,U.jsx)(`span`,{children:`model`}),(0,U.jsx)(WT,{selectedModel:xe,selectedModelUnsupported:!!Te?.disabled,disabled:Oe,groups:we,runActive:ve,modelOptionsError:Ce,onSelectModel:e=>void T({model:e})})]}),Se?null:(0,U.jsx)(`p`,{className:`model-select-description`,children:Ce?`models unavailable`:`loading models`})]}),(0,U.jsxs)(`label`,{className:`select-control`,children:[(0,U.jsx)(`span`,{children:`reasoning`}),(0,U.jsx)(`select`,{value:De?.id??`default`,disabled:Oe,onChange:e=>void T({reasoningEffort:e.target.value===`default`?null:e.target.value}),children:Ee.map(e=>(0,U.jsx)(`option`,{value:e.id,disabled:e.disabled,children:e.label},e.id))})]}),(0,U.jsxs)(Y,{children:[`turns `,t.turnCount]}),be===`running`?(0,U.jsx)(Y,{tone:`warn`,children:`compacting`}):null,(0,U.jsx)(`button`,{className:oo(`drift-button`,(n?.driftEnabled??t.driftEnabled)&&`active`),type:`button`,disabled:ve,onClick:()=>void T({driftEnabled:!(n?.driftEnabled??t.driftEnabled??!0)}),children:UE(n?.driftEnabled??t.driftEnabled,n?.driftLevel??t.driftLevel)}),ve?(0,U.jsx)(Y,{tone:`warn`,children:`working`}):null]}):void 0}),(0,U.jsx)(`div`,{className:`conversation-scroll`,"data-testid":`session-conversation`,ref:O,children:(0,U.jsxs)(`div`,{className:`conversation-stack`,children:[(0,U.jsx)(`div`,{className:`conversation-spacer`}),r?(0,U.jsx)(nh,{title:`Loading session`,body:`Fetching full conversation state from saved Heddle session storage.`}):i?(0,U.jsx)(nh,{title:`Session load failed`,body:i}):n&&n.messages.length?n.messages.map(e=>(0,U.jsx)(ST,{message:e},e.id)):(0,U.jsx)(nh,{title:`No conversation available`,body:`This session does not have any saved chat messages yet.`})]})}),(0,U.jsxs)(`div`,{className:`composer-shell`,children:[E?(0,U.jsxs)(`div`,{className:`detail-card error-card approval-card`,children:[(0,U.jsxs)(`p`,{className:`card-title`,children:[`Approval required: `,E.tool]}),(0,U.jsxs)(`p`,{className:`muted`,children:[`Call ID: `,E.callId]}),(0,U.jsx)(sh,{children:JSON.stringify(E.input,null,2)}),(0,U.jsxs)(`div`,{className:`pills approval-actions`,children:[(0,U.jsx)(`button`,{className:`primary-button`,type:`button`,onClick:()=>void D(!0),children:`Approve`}),(0,U.jsx)(`button`,{className:`tab-button`,type:`button`,onClick:()=>void D(!1),children:`Deny`})]})]}):null,(0,U.jsx)(`textarea`,{ref:N,value:P,onChange:e=>I(e.target.value,e.target.selectionStart),onClick:e=>I(P,e.currentTarget.selectionStart),onSelect:e=>I(P,e.currentTarget.selectionStart),disabled:!a||ve,placeholder:ve?`Heddle is working…`:`Ask Heddle about this workspace`,onKeyDown:se}),Be,(0,U.jsxs)(`div`,{className:`composer-footer`,children:[(0,U.jsxs)(`div`,{className:`composer-status`,children:[(0,U.jsx)(`p`,{className:`muted`,children:be===`running`?`Compacting earlier conversation history into an archive summary.`:v||x||(ve?`Run in progress. Continue is disabled until this run settles; Cancel interrupts the active run.`:g?`Memory maintenance is updating the workspace catalog in the background.`:(n?.lastContinuePrompt,`Enter sends. Option+Enter or Shift+Enter adds a new line.`))}),(0,U.jsxs)(`div`,{className:`pills compact-pills`,children:[(0,U.jsx)(Y,{tone:b||ve?`warn`:`good`,children:b?`creating session`:ve?`run active`:`idle`}),g?(0,U.jsx)(Y,{tone:`warn`,children:`memory updating`}):null,ye?(0,U.jsx)(Y,{children:ye}):null,n?.lastContinuePrompt?(0,U.jsx)(Y,{children:`continue available`}):(0,U.jsx)(Y,{children:`no continue state yet`})]})]}),(0,U.jsxs)(`div`,{className:`pills composer-actions`,"data-testid":`session-composer-actions`,children:[(0,U.jsx)(`button`,{className:`tab-button`,type:`button`,disabled:!a||ve||!n?.lastContinuePrompt,onClick:()=>void C(),title:n?.lastContinuePrompt?`Resume the current transcript from the last saved continue point`:`Continue is available after a prior runnable turn exists`,children:`Continue`}),(0,U.jsx)(`button`,{className:`tab-button`,type:`button`,disabled:!h,onClick:()=>void w(),title:`Interrupt the currently running session`,children:`Cancel`}),(0,U.jsx)(`button`,{className:`primary-button`,type:`button`,disabled:!a||ve||!P.trim(),onClick:oe,children:`Send`})]})]})]})]}),(0,U.jsx)(`button`,{className:`workspace-resizer`,type:`button`,"aria-label":`Resize session inspector`,onPointerDown:e=>ue(`right`,e)}),(0,U.jsx)(bE,{reviewMode:A,onReviewModeChange:j,onShowChatView:ge,workspaceChanges:ke,workspaceChangesLoading:Ae,workspaceChangesError:je,workspaceFileDiffsByPath:Ne,workspaceFileDiffLoading:Pe,workspaceFileDiffError:Fe,selectedTurnPatchIsStale:Ie,onSelectWorkspaceFile:Le,onRefreshWorkspaceReview:Re,sessionDetail:n,selectedTurnId:s,onSelectTurn:me,turnReview:u,turnReviewLoading:f,turnReviewError:p,onSelectReviewFile:k,selectedTurn:l,onOpenDiff:te}),(0,U.jsx)(mE,{diff:M,onClose:()=>te(null)})]})}function GE({selectedTask:e,pendingTaskAction:t}){return{isTaskBusy:!!(e&&t&&t.taskId===e.taskId),selectedTaskExecution:e?ho(e):void 0}}function KE({runs:e,selectedTask:t,selectedTaskRuns:n,selectedRun:r,selectedRunId:i,onSelectRun:a}){return(0,U.jsxs)(`aside`,{className:`workspace-side`,children:[(0,U.jsx)(ch,{title:`Runs`,subtitle:t?`${n.length} run${n.length===1?``:`s`} for this task`:`${e.length} recent run${e.length===1?``:`s`}`}),(0,U.jsxs)(`div`,{className:`side-scroll split-scroll`,children:[(0,U.jsx)(lh,{title:`History`,children:n.length?(0,U.jsx)(`div`,{className:`stack-list compact`,children:n.map(e=>(0,U.jsx)(Ah,{run:e,active:e.id===i,onClick:()=>a(e.id)},e.id))}):(0,U.jsx)(nh,{title:`No runs for this task`,body:`Run-once and scheduled executions will appear here.`})}),(0,U.jsx)(lh,{title:`Run detail`,children:r?(0,U.jsxs)(`div`,{className:`detail-stack compact-stack`,children:[(0,U.jsxs)(`div`,{className:`detail-card`,children:[(0,U.jsx)(`p`,{className:`card-title`,children:r.id}),(0,U.jsxs)(`div`,{className:`pills`,children:[(0,U.jsx)(Y,{tone:so(r.status),children:r.status}),(0,U.jsx)(Y,{tone:so(r.decision),children:r.decision}),(0,U.jsx)(Y,{tone:so(r.outcome),children:r.outcome})]}),(0,U.jsx)(`p`,{className:`summary`,children:r.summary})]}),(0,U.jsx)(`div`,{className:`detail-card`,children:(0,U.jsxs)(`div`,{className:`kv-list`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`kv-key`,children:`created`}),(0,U.jsx)(`span`,{className:`kv-value`,children:co(r.createdAt)})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`kv-key`,children:`task`}),(0,U.jsx)(`span`,{className:`kv-value`,children:r.taskId})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`kv-key`,children:`usage`}),(0,U.jsx)(`span`,{className:`kv-value`,children:z(r.usage)??`none`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`kv-key`,children:`checkpoint`}),(0,U.jsx)(`span`,{className:`kv-value`,children:r.loadedCheckpoint?`loaded`:`fresh`})]})]})}),r.progress?(0,U.jsxs)(`div`,{className:`detail-card`,children:[(0,U.jsx)(`p`,{className:`section-label`,children:`Progress`}),(0,U.jsx)(`p`,{className:`summary`,children:r.progress})]}):null]}):(0,U.jsx)(nh,{title:`No run selected`,body:`Select a run to inspect the latest durable heartbeat result.`})})]})]})}function qE({selectedTask:e,pendingTaskAction:t,isTaskBusy:n,selectedTaskExecution:r,onEnableTask:i,onDisableTask:a,onTriggerTask:o}){return(0,U.jsxs)(`section`,{className:`workspace-main`,children:[(0,U.jsx)(ch,{title:e?.name||e?.taskId||`Task detail`,subtitle:e?`${e.taskId} · next ${co(e.nextRunAt)}`:`Pick a task to inspect prompt, schedule, and recent outcome.`,actions:e?(0,U.jsxs)(`div`,{className:`pills`,children:[(0,U.jsx)(Y,{tone:e.enabled?`good`:void 0,children:e.enabled?`enabled`:`disabled`}),(0,U.jsx)(Y,{tone:r?.tone,children:r?.label??e.status}),e.decision?(0,U.jsx)(Y,{tone:so(e.decision),children:e.decision}):null]}):void 0}),(0,U.jsx)(`div`,{className:`task-detail-scroll`,children:e?(0,U.jsxs)(`div`,{className:`detail-stack`,children:[(0,U.jsxs)(`div`,{className:`detail-card`,children:[(0,U.jsx)(`p`,{className:`section-label`,children:`Task prompt`}),(0,U.jsx)(`p`,{className:`summary`,children:e.task}),(0,U.jsxs)(`div`,{className:`pills approval-actions`,children:[(0,U.jsx)(`button`,{type:`button`,className:`sidebar-action-button`,disabled:n||!e.enabled,onClick:()=>{o(e.taskId)},children:n&&t?.action===`trigger`?`Triggering…`:`Run now`}),e.enabled?(0,U.jsx)(`button`,{type:`button`,className:`sidebar-action-button`,disabled:n,onClick:()=>{a(e.taskId)},children:n&&t?.action===`disable`?`Pausing…`:`Pause task`}):(0,U.jsx)(`button`,{type:`button`,className:`sidebar-action-button`,disabled:n,onClick:()=>{i(e.taskId)},children:n&&t?.action===`enable`?`Resuming…`:`Resume task`})]}),(0,U.jsx)(`p`,{className:`summary`,children:r?.detail})]}),(0,U.jsxs)(`div`,{className:`detail-card`,children:[(0,U.jsx)(`p`,{className:`section-label`,children:`Runtime status`}),(0,U.jsxs)(`div`,{className:`kv-list`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`kv-key`,children:`execution`}),(0,U.jsx)(`span`,{className:`kv-value`,children:r?.label??e.status})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`kv-key`,children:`model`}),(0,U.jsx)(`span`,{className:`kv-value`,children:e.model??`unset`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`kv-key`,children:`interval`}),(0,U.jsx)(`span`,{className:`kv-value`,children:mo(e.intervalMs)})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`kv-key`,children:`last run`}),(0,U.jsx)(`span`,{className:`kv-value`,children:co(e.lastRunAt)})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`kv-key`,children:`next run`}),(0,U.jsx)(`span`,{className:`kv-value`,children:co(e.nextRunAt)})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`kv-key`,children:`checkpoint`}),(0,U.jsx)(`span`,{className:`kv-value`,children:e.loadedCheckpoint?`loaded`:e.resumable?`resumable`:`none`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`span`,{className:`kv-key`,children:`usage`}),(0,U.jsx)(`span`,{className:`kv-value`,children:z(e.usage)??`none`})]})]})]}),e.summary?(0,U.jsxs)(`div`,{className:`detail-card`,children:[(0,U.jsx)(`p`,{className:`section-label`,children:`Latest summary`}),(0,U.jsx)(`p`,{className:`summary`,children:e.summary})]}):null,e.progress?(0,U.jsxs)(`div`,{className:`detail-card`,children:[(0,U.jsx)(`p`,{className:`section-label`,children:`Progress`}),(0,U.jsx)(`p`,{className:`summary`,children:e.progress})]}):null,e.error?(0,U.jsxs)(`div`,{className:`detail-card error-card`,children:[(0,U.jsx)(`p`,{className:`section-label`,children:`Error`}),(0,U.jsx)(`p`,{className:`summary`,children:e.error})]}):null]}):(0,U.jsx)(nh,{title:`No task selected`,body:`Choose a task from the left to inspect its durable prompt and latest run state.`})})]})}function JE({tasks:e,selectedTaskId:t,onSelectTask:n}){return(0,U.jsxs)(`aside`,{className:`workspace-sidebar`,children:[(0,U.jsx)(ch,{title:`Tasks`,subtitle:`${e.length} durable task${e.length===1?``:`s`}`}),(0,U.jsx)(`div`,{className:`sidebar-scroll`,children:e.length?e.map(e=>(0,U.jsx)(kh,{task:e,active:e.taskId===t,onClick:()=>n(e.taskId)},e.taskId)):(0,U.jsx)(nh,{title:`No tasks`,body:`Add a heartbeat task in the CLI, then manage it from this view.`})})]})}function YE({tasks:e,runs:t,selectedTask:n,selectedTaskId:r,onSelectTask:i,selectedRun:a,selectedRunId:o,onSelectRun:s,selectedTaskRuns:c,pendingTaskAction:l,onEnableTask:u,onDisableTask:d,onTriggerTask:f}){let{isTaskBusy:p,selectedTaskExecution:m}=GE({selectedTask:n,pendingTaskAction:l});return(0,U.jsxs)(`section`,{className:`workspace-shell tasks-shell`,children:[(0,U.jsx)(JE,{tasks:e,selectedTaskId:r,onSelectTask:i}),(0,U.jsx)(qE,{selectedTask:n,pendingTaskAction:l,isTaskBusy:p,selectedTaskExecution:m,onEnableTask:u,onDisableTask:d,onTriggerTask:f}),(0,U.jsx)(KE,{runs:t,selectedTask:n,selectedTaskRuns:c,selectedRun:a,selectedRunId:o,onSelectRun:s})]})}function XE({tasks:e,selectedTask:t,selectedTaskId:n,onSelectTask:r,selectedRun:i,selectedRunId:a,onSelectRun:o,selectedTaskRuns:s,pendingTaskAction:c,onEnableTask:l,onDisableTask:u,onTriggerTask:f}){let[p,m]=(0,d.useState)(n?`detail`:`list`),h=!!(t&&c&&c.taskId===t.taskId),g=t?ho(t):void 0;return(0,d.useEffect)(()=>{if(!n){m(`list`);return}m(e=>e===`list`?`detail`:e)},[n]),p===`list`?(0,U.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,U.jsxs)(`header`,{className:`shrink-0 border-b border-border bg-card px-3 py-2`,children:[(0,U.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:`Tasks`}),(0,U.jsxs)(`p`,{className:`m-0 text-xs text-muted-foreground`,children:[e.length,` durable task`,e.length===1?``:`s`]})]}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:e.length?(0,U.jsx)(`div`,{className:`space-y-2`,children:e.map(e=>{let t=ho(e);return(0,U.jsxs)(`button`,{type:`button`,className:`w-full rounded-md border px-3 py-3 text-left ${e.taskId===n?`border-primary bg-primary/5`:`border-border bg-card`}`,onClick:()=>{r(e.taskId),m(`detail`)},children:[(0,U.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,U.jsx)(`p`,{className:`m-0 line-clamp-2 text-sm font-semibold text-foreground`,children:e.name||e.taskId}),(0,U.jsx)(`p`,{className:`m-0 shrink-0 text-[11px] text-muted-foreground`,children:co(e.nextRunAt)})]}),(0,U.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:[(0,U.jsx)(W,{variant:e.enabled?`secondary`:`outline`,children:e.enabled?`enabled`:`disabled`}),(0,U.jsx)(W,{variant:`outline`,children:t.label}),e.decision?(0,U.jsx)(W,{variant:`outline`,children:e.decision}):null]}),(0,U.jsx)(`p`,{className:`m-0 mt-2 text-xs text-muted-foreground`,children:e.task})]},e.taskId)})}):(0,U.jsx)(eD,{title:`No tasks`,body:`Add a heartbeat task in the CLI, then manage it from here.`})})]}):p===`runs`?(0,U.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,U.jsx)(`header`,{className:`shrink-0 border-b border-border bg-card px-3 py-2`,children:(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsx)(G,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,onClick:()=>m(`detail`),children:`← Task`}),(0,U.jsx)(`p`,{className:`m-0 text-xs text-muted-foreground`,children:`Runs`})]})}),(0,U.jsx)(`nav`,{className:`shrink-0 border-b border-border bg-card px-3 py-2`,children:(0,U.jsxs)(`div`,{className:`grid grid-cols-2 rounded-md bg-muted p-1`,children:[(0,U.jsx)($E,{active:!1,onClick:()=>m(`detail`),children:`Summary`}),(0,U.jsx)($E,{active:!0,children:`Runs`})]})}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsx)(ZE,{title:`History`,children:s.length?(0,U.jsx)(`div`,{className:`space-y-2`,children:s.map(e=>(0,U.jsxs)(`button`,{type:`button`,className:`w-full rounded-md border px-2 py-2 text-left ${e.id===a?`border-primary bg-primary/5`:`border-border bg-background`}`,onClick:()=>o(e.id),children:[(0,U.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,U.jsx)(`p`,{className:`m-0 truncate text-xs font-medium text-foreground`,children:e.id}),(0,U.jsx)(`p`,{className:`m-0 shrink-0 text-[11px] text-muted-foreground`,children:co(e.createdAt)})]}),(0,U.jsxs)(`div`,{className:`mt-1 flex flex-wrap gap-1`,children:[(0,U.jsx)(W,{variant:`outline`,children:e.status}),(0,U.jsx)(W,{variant:`outline`,children:e.decision}),(0,U.jsx)(W,{variant:`outline`,children:e.outcome})]})]},e.id))}):(0,U.jsx)(eD,{title:`No runs`,body:`Run-once and scheduled executions appear here.`})}),(0,U.jsx)(ZE,{title:`Run detail`,children:i?(0,U.jsxs)(`div`,{className:`space-y-2 text-xs`,children:[(0,U.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:i.id}),(0,U.jsx)(`p`,{className:`m-0 text-muted-foreground`,children:i.summary}),(0,U.jsx)(QE,{label:`created`,value:co(i.createdAt)}),(0,U.jsx)(QE,{label:`task`,value:i.taskId}),(0,U.jsx)(QE,{label:`usage`,value:z(i.usage)??`none`}),(0,U.jsx)(QE,{label:`checkpoint`,value:i.loadedCheckpoint?`loaded`:`fresh`}),i.progress?(0,U.jsx)(QE,{label:`progress`,value:i.progress}):null]}):(0,U.jsx)(eD,{title:`No run selected`,body:`Select a run to inspect the latest heartbeat result.`})})]})})]}):(0,U.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col bg-background`,children:[(0,U.jsx)(`header`,{className:`shrink-0 border-b border-border bg-card px-3 py-2`,children:(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsx)(G,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,onClick:()=>m(`list`),children:`← Tasks`}),(0,U.jsx)(G,{type:`button`,variant:`ghost`,size:`sm`,className:`h-8 px-2 text-xs`,onClick:()=>m(`runs`),disabled:!s.length,children:`Runs`})]})}),(0,U.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-3 py-3`,children:t?(0,U.jsxs)(`div`,{className:`space-y-3`,children:[(0,U.jsxs)(ZE,{title:t.name||t.taskId,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[(0,U.jsx)(W,{variant:t.enabled?`secondary`:`outline`,children:t.enabled?`enabled`:`disabled`}),(0,U.jsx)(W,{variant:g?.tone===`good`?`secondary`:`outline`,children:g?.label??t.status}),t.decision?(0,U.jsx)(W,{variant:`outline`,children:t.decision}):null]}),(0,U.jsx)(`p`,{className:`m-0 mt-2 text-xs text-muted-foreground`,children:t.taskId}),(0,U.jsx)(`p`,{className:`m-0 mt-2 text-sm text-foreground`,children:t.task}),(0,U.jsx)(`p`,{className:`m-0 mt-2 text-xs text-muted-foreground`,children:g?.detail}),(0,U.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,U.jsx)(G,{type:`button`,size:`sm`,variant:`outline`,disabled:h||!t.enabled,onClick:()=>{f(t.taskId)},children:h&&c?.action===`trigger`?`Triggering…`:`Run now`}),t.enabled?(0,U.jsx)(G,{type:`button`,size:`sm`,variant:`outline`,disabled:h,onClick:()=>{u(t.taskId)},children:h&&c?.action===`disable`?`Pausing…`:`Pause task`}):(0,U.jsx)(G,{type:`button`,size:`sm`,variant:`outline`,disabled:h,onClick:()=>{l(t.taskId)},children:h&&c?.action===`enable`?`Resuming…`:`Resume task`})]})]}),(0,U.jsxs)(ZE,{title:`Runtime status`,children:[(0,U.jsx)(QE,{label:`execution`,value:g?.label??t.status}),(0,U.jsx)(QE,{label:`model`,value:t.model??`unset`}),(0,U.jsx)(QE,{label:`interval`,value:mo(t.intervalMs)}),(0,U.jsx)(QE,{label:`last run`,value:co(t.lastRunAt)}),(0,U.jsx)(QE,{label:`next run`,value:co(t.nextRunAt)}),(0,U.jsx)(QE,{label:`checkpoint`,value:t.loadedCheckpoint?`loaded`:t.resumable?`resumable`:`none`}),(0,U.jsx)(QE,{label:`usage`,value:z(t.usage)??`none`})]}),t.summary?(0,U.jsx)(ZE,{title:`Latest summary`,children:(0,U.jsx)(`p`,{className:`m-0 text-sm text-foreground`,children:t.summary})}):null,t.progress?(0,U.jsx)(ZE,{title:`Progress`,children:(0,U.jsx)(`p`,{className:`m-0 text-sm text-foreground`,children:t.progress})}):null,t.error?(0,U.jsx)(ZE,{title:`Error`,children:(0,U.jsx)(`p`,{className:`m-0 text-sm text-destructive`,children:t.error})}):null]}):(0,U.jsx)(eD,{title:`No task selected`,body:`Choose a task to inspect its durable prompt and latest run state.`})})]})}function ZE({title:e,children:t}){return(0,U.jsxs)(`section`,{className:`rounded-md border border-border bg-card px-3 py-3`,children:[(0,U.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:e}),(0,U.jsx)(`div`,{className:`mt-2`,children:t})]})}function QE({label:e,value:t}){return(0,U.jsxs)(`div`,{className:`grid grid-cols-[92px_minmax(0,1fr)] gap-2 text-xs`,children:[(0,U.jsx)(`span`,{className:`truncate text-muted-foreground`,children:e}),(0,U.jsx)(`span`,{className:`break-words text-foreground`,children:t})]})}function $E({active:e,onClick:t,children:n}){return(0,U.jsx)(`button`,{type:`button`,className:`h-8 rounded-md text-xs font-medium ${e?`bg-background text-foreground shadow-sm`:`text-muted-foreground`}`,onClick:t,"aria-current":e?`page`:void 0,children:n})}function eD({title:e,body:t}){return(0,U.jsxs)(`div`,{className:`rounded-md border border-border bg-card px-3 py-3`,children:[(0,U.jsx)(`p`,{className:`m-0 text-sm font-semibold text-foreground`,children:e}),(0,U.jsx)(`p`,{className:`m-0 mt-1 text-xs text-muted-foreground`,children:t})]})}function tD(e){return wa()?(0,U.jsx)(XE,{...e}):(0,U.jsx)(YE,{...e})}function nD(e){let t=new Map;for(let n of e.workspaces)t.set(n.stateRoot,{...n,relation:`attached`});for(let n of e.knownWorkspaces??[])t.has(n.stateRoot)||t.set(n.stateRoot,{...n,relation:`known`});return Array.from(t.values()).sort((t,n)=>{let r=Number(n.id===e.activeWorkspaceId)-Number(t.id===e.activeWorkspaceId);return r===0?(n.updatedAt??``).localeCompare(t.updatedAt??``):r})}function rD(e){let t=e.trim().replace(/\/+$/,``);return t.split(`/`).filter(Boolean).at(-1)??t}function iD({children:e}){return(0,U.jsx)(`section`,{className:`min-w-0 rounded-2xl border border-border bg-card/95 p-4 shadow-sm sm:p-5`,children:e})}function aD({open:e,selectedPath:t,onOpenChange:n}){let[r,i]=(0,d.useState)(t.trim()||void 0),[a,o]=(0,d.useState)(t.trim()),[s,c]=(0,d.useState)(),[l,u]=(0,d.useState)(),[f,p]=(0,d.useState)(!1),[m,h]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{if(!e)return;let n=t.trim()||void 0;i(n),o(n??``)},[e,t]),(0,d.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&n(!1)};return window.addEventListener(`keydown`,t),()=>{window.removeEventListener(`keydown`,t)}},[e,n]),(0,d.useEffect)(()=>{if(!e)return;let t=!1;return p(!0),Pi(r,m).then(e=>{t||(c(e),i(e.path),o(e.path),u(void 0))}).catch(e=>{t||u(e instanceof Error?e.message:String(e))}).finally(()=>{t||p(!1)}),()=>{t=!0}},[e,r,m]),{browsePath:r,setBrowsePath:i,pathInput:a,setPathInput:o,listing:s,error:l,loading:f,includeHidden:m,setIncludeHidden:h}}function oD({label:e,detail:t,entry:n,onOpen:r,onSelect:i}){return(0,U.jsxs)(`div`,{className:`grid gap-3 border-b border-border p-3 last:border-b-0 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-center`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`min-w-0 text-left`,onClick:r,children:[(0,U.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,children:e}),(0,U.jsx)(`span`,{className:`mt-1 block truncate text-xs text-muted-foreground`,children:t}),n?(0,U.jsxs)(`span`,{className:`mt-2 flex flex-wrap gap-1`,children:[n.hasHeddleState?(0,U.jsx)(W,{variant:`secondary`,children:`Heddle workspace`}):null,n.hasGit?(0,U.jsx)(W,{variant:`outline`,children:`git repo`}):null,n.hasPackageJson?(0,U.jsx)(W,{variant:`outline`,children:`package.json`}):null]}):null]}),(0,U.jsxs)(`div`,{className:`flex gap-2 sm:justify-end`,children:[(0,U.jsx)(G,{type:`button`,variant:`ghost`,size:`sm`,onClick:r,children:`Open`}),i?(0,U.jsx)(G,{type:`button`,variant:`outline`,size:`sm`,onClick:i,children:`Select`}):null]})]})}function sD({open:e,selectedPath:t,recentWorkspaces:n,onOpenChange:r,onSelectPath:i}){let{browsePath:a,setBrowsePath:o,pathInput:s,setPathInput:c,listing:l,error:u,loading:d,includeHidden:f,setIncludeHidden:p}=aD({open:e,selectedPath:t,onOpenChange:r});if(!e)return null;let m=l?.path??a??t.trim(),h=()=>{m&&(i(m),r(!1))};return(0,U.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/70 p-3 backdrop-blur-sm sm:p-6`,role:`presentation`,onMouseDown:e=>{e.target===e.currentTarget&&r(!1)},children:(0,U.jsxs)(`div`,{className:`flex max-h-[min(820px,92vh)] w-full max-w-4xl flex-col overflow-hidden rounded-2xl border border-border bg-card shadow-2xl`,role:`dialog`,"aria-modal":`true`,"aria-label":`Choose workspace folder`,children:[(0,U.jsxs)(`div`,{className:`border-b border-border px-4 py-4 sm:px-6`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Workspace folder`}),(0,U.jsx)(`h2`,{className:`mt-1 text-xl font-semibold text-foreground`,children:`Choose a project root`}),(0,U.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Navigate folders, pick a repo or existing Heddle workspace, then switch the control plane to it.`})]}),(0,U.jsx)(G,{type:`button`,variant:`outline`,onClick:()=>r(!1),children:`Close`})]}),(0,U.jsxs)(`form`,{className:`mt-4 flex flex-col gap-2 sm:flex-row`,onSubmit:e=>{e.preventDefault(),o(s.trim()||void 0)},children:[(0,U.jsx)(`input`,{className:`h-11 min-w-0 flex-1 rounded-md border border-border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground`,value:s,onChange:e=>c(e.target.value),placeholder:`/absolute/path/to/workspace`}),(0,U.jsx)(G,{type:`submit`,variant:`outline`,className:`h-11`,children:`Go`}),(0,U.jsx)(G,{type:`button`,variant:`secondary`,className:`h-11`,disabled:!m,onClick:h,children:`Use this folder`})]})]}),(0,U.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-6`,children:[n.length?(0,U.jsxs)(`div`,{className:`mb-4 rounded-xl border border-border bg-background/50 p-3`,children:[(0,U.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Recent workspaces`}),(0,U.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Choose from Heddle workspaces seen on this machine.`})]}),(0,U.jsx)(W,{variant:`outline`,children:n.length})]}),(0,U.jsx)(`div`,{className:`grid gap-2 md:grid-cols-2`,children:n.slice(0,6).map(e=>(0,U.jsxs)(`button`,{type:`button`,className:`rounded-lg border border-border bg-card px-3 py-2 text-left hover:border-primary`,onClick:()=>{i(e.anchorRoot),r(!1)},children:[(0,U.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,children:e.name}),(0,U.jsx)(W,{variant:`outline`,children:e.relation})]}),(0,U.jsx)(`span`,{className:`mt-1 block truncate text-xs text-muted-foreground`,children:e.anchorRoot})]},e.stateRoot))})]}):null,(0,U.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(W,{variant:`outline`,className:`max-w-full truncate`,children:m||`Home`}),l?.parentPath?(0,U.jsx)(G,{type:`button`,variant:`ghost`,size:`sm`,onClick:()=>o(l.parentPath),children:`Up one level`}):null,(0,U.jsxs)(`label`,{className:`ml-auto flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:f,onChange:e=>p(e.target.checked)}),(0,U.jsx)(`span`,{children:`Show hidden folders`})]}),d?(0,U.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Loading...`}):null]}),u?(0,U.jsx)(`div`,{className:`mb-3 rounded-xl border border-destructive/40 bg-destructive/10 p-3 text-sm text-destructive`,children:u}):null,(0,U.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border bg-background/40`,children:[l?.parentPath?(0,U.jsx)(oD,{label:`..`,detail:l.parentPath,onOpen:()=>o(l.parentPath)}):null,l?.entries.map(e=>(0,U.jsx)(oD,{label:e.name,detail:e.path,entry:e,onOpen:()=>o(e.path),onSelect:()=>{i(e.path),r(!1)}},e.path)),l&&!d&&l.entries.length===0?(0,U.jsx)(`div`,{className:`p-4 text-sm text-muted-foreground`,children:`No readable child folders found here. You can still use the current folder.`}):null]})]})]})})}function cD({creatingWorkspace:e,onCreateWorkspace:t,recentWorkspaces:n=[]}){let[r,i]=(0,d.useState)(``),[a,o]=(0,d.useState)(``),[s,c]=(0,d.useState)(!0),[l,u]=(0,d.useState)(!1);return(0,U.jsxs)(iD,{children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Add workspace`}),(0,U.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Choose a project`}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Register another workspace path and optionally switch the control plane to it.`})]}),(0,U.jsxs)(`form`,{"data-testid":`workspace-create-form`,className:`mt-4 space-y-4`,onSubmit:e=>{e.preventDefault(),!(!t||!r.trim()||!a.trim())&&t({name:r.trim(),anchorRoot:a.trim(),setActive:s}).then(()=>{i(``),o(``),c(!0)})},children:[(0,U.jsxs)(`label`,{className:`block space-y-2`,children:[(0,U.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Name`}),(0,U.jsx)(`input`,{className:`h-11 w-full rounded-md border border-border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground`,value:r,onChange:e=>i(e.target.value),placeholder:`Workspace name`,disabled:e,"data-testid":`workspace-create-name`})]}),(0,U.jsxs)(`label`,{className:`block space-y-2`,children:[(0,U.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Workspace path`}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(`input`,{className:`h-11 min-w-0 flex-1 rounded-md border border-border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground`,value:a,onChange:e=>o(e.target.value),placeholder:`/absolute/path/to/workspace`,disabled:e,"data-testid":`workspace-create-path`}),(0,U.jsx)(G,{type:`button`,variant:`outline`,className:`h-11 shrink-0`,disabled:e,onClick:()=>u(!0),children:`Choose…`})]})]}),(0,U.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:[(0,U.jsx)(`input`,{type:`checkbox`,checked:s,onChange:e=>c(e.target.checked),disabled:e}),(0,U.jsx)(`span`,{children:`Switch to this workspace after creating it`})]}),(0,U.jsx)(G,{type:`submit`,variant:`secondary`,className:`w-full`,disabled:e||!r.trim()||!a.trim(),"data-testid":`workspace-create-submit`,children:e?`Creating…`:`Create workspace`})]}),(0,U.jsx)(sD,{open:l,selectedPath:a,recentWorkspaces:n,onOpenChange:u,onSelectPath:e=>{o(e),r.trim()||i(rD(e))}})]})}function lD({label:e,children:t}){return(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`dt`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:e}),(0,U.jsx)(`dd`,{className:`break-all text-sm text-foreground`,children:t})]})}function uD({workspaceId:e,initialName:t,disabled:n,pending:r,onRename:i}){let[a,o]=(0,d.useState)(t);(0,d.useEffect)(()=>{o(t)},[t]);let s=a.trim()&&a.trim()!==t;return(0,U.jsxs)(`form`,{className:`flex gap-2`,onSubmit:t=>{t.preventDefault(),!(!i||!s)&&i(e,a.trim())},children:[(0,U.jsx)(`input`,{className:`h-10 min-w-0 flex-1 rounded-md border border-border bg-background px-3 text-sm text-foreground placeholder:text-muted-foreground`,value:a,onChange:e=>o(e.target.value),disabled:n,"aria-label":`Workspace name`}),(0,U.jsx)(G,{type:`submit`,variant:`outline`,size:`sm`,disabled:n||!s,children:r?`Saving…`:`Rename`})]})}function dD({state:e,renamingWorkspaceId:t,onRenameWorkspace:n,onSetActiveWorkspace:r}){return(0,U.jsxs)(iD,{children:[(0,U.jsxs)(`div`,{className:`mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Workspace management`}),(0,U.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Attached workspaces`}),(0,U.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Switch, rename, and inspect workspaces attached to this control-plane catalog.`})]}),(0,U.jsxs)(W,{variant:`outline`,children:[po(e.workspaces.length),` local`]})]}),(0,U.jsx)(`div`,{className:`space-y-3`,"data-testid":`workspace-list`,children:e.workspaces.map(i=>(0,U.jsx)(`article`,{"data-testid":`workspace-card-${i.id}`,className:`rounded-xl border border-border bg-background/60 p-4`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(`h3`,{className:`truncate text-base font-semibold text-foreground`,children:i.name}),i.id===e.activeWorkspaceId?(0,U.jsx)(W,{variant:`secondary`,children:`active`}):null,(0,U.jsx)(W,{variant:`outline`,children:i.id})]}),(0,U.jsxs)(`dl`,{className:`mt-3 grid gap-2 text-sm`,children:[(0,U.jsx)(lD,{label:`Workspace path`,children:i.anchorRoot}),(0,U.jsx)(lD,{label:`State path`,children:i.stateRoot}),(0,U.jsx)(lD,{label:`Repo roots`,children:i.repoRoots.join(`, `)})]})]}),(0,U.jsxs)(`div`,{className:`flex min-w-[min(100%,260px)] flex-col gap-3`,children:[(0,U.jsx)(uD,{workspaceId:i.id,initialName:i.name,disabled:!n||t===i.id,pending:t===i.id,onRename:n}),(0,U.jsx)(G,{type:`button`,variant:i.id===e.activeWorkspaceId?`secondary`:`outline`,disabled:i.id===e.activeWorkspaceId||!r,onClick:()=>r?.(i.id),children:i.id===e.activeWorkspaceId?`Current workspace`:`Switch to workspace`})]})]})},i.id))})]})}function fD({state:e,recentWorkspaces:t,creatingWorkspace:n,onCreateWorkspace:r,onSetActiveWorkspace:i}){return(0,U.jsxs)(iD,{children:[(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Recent workspaces`}),(0,U.jsx)(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Open workspace`}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Workspaces Heddle has seen on this machine, including the current catalog.`})]}),t.length?(0,U.jsx)(`div`,{className:`mt-4 space-y-2`,"data-testid":`recent-workspace-list`,children:t.slice(0,8).map(t=>{let a=t.id===e.activeWorkspaceId,o=t.relation===`attached`;return(0,U.jsxs)(`button`,{type:`button`,className:`w-full rounded-xl border border-border bg-background/60 p-3 text-left hover:border-primary disabled:cursor-not-allowed disabled:opacity-50`,disabled:n||a||(o?!i:!r),onClick:()=>{o?i?.(t.id):r?.({name:t.name,anchorRoot:t.anchorRoot,setActive:!0})},children:[(0,U.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,children:t.name}),a?(0,U.jsx)(W,{variant:`secondary`,children:`active`}):null,(0,U.jsx)(W,{variant:`outline`,children:o?`attached`:`known`})]}),(0,U.jsx)(`span`,{className:`mt-1 block truncate text-xs text-muted-foreground`,children:t.anchorRoot}),(0,U.jsx)(`span`,{className:`mt-2 block text-[11px] text-muted-foreground`,children:fo(t.stateRoot)})]},t.stateRoot)})}):(0,U.jsx)(`p`,{className:`mt-4 text-sm text-muted-foreground`,children:`No Heddle workspaces are known yet. Run Heddle in a project once, then refresh.`})]})}function pD({state:e,creatingWorkspace:t=!1,renamingWorkspaceId:n,onCreateWorkspace:r,onRenameWorkspace:i,onSetActiveWorkspace:a}){let o=nD(e);return(0,U.jsx)(`section`,{className:`flex min-h-0 flex-1 flex-col gap-4 overflow-x-hidden overflow-y-auto px-3 pt-3 pb-[calc(env(safe-area-inset-bottom)+5.5rem)] sm:px-4 sm:pt-4 sm:pb-4`,children:(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-4 xl:grid-cols-[minmax(0,1.4fr)_minmax(320px,0.8fr)]`,children:[(0,U.jsx)(dD,{state:e,renamingWorkspaceId:n,onRenameWorkspace:i,onSetActiveWorkspace:a}),(0,U.jsxs)(`div`,{className:`grid min-w-0 gap-4`,children:[(0,U.jsx)(cD,{creatingWorkspace:t,recentWorkspaces:o,onCreateWorkspace:r}),(0,U.jsx)(fD,{state:e,recentWorkspaces:o,creatingWorkspace:t,onCreateWorkspace:r,onSetActiveWorkspace:a})]})]})})}function mD(e){let t=hD(e),n=d.forwardRef((e,n)=>{let{children:r,...i}=e,a=d.Children.toArray(r),o=a.find(_D);if(o){let e=o.props.children,r=a.map(t=>t===o?d.Children.count(e)>1?d.Children.only(null):d.isValidElement(e)?e.props.children:null:t);return(0,U.jsx)(t,{...i,ref:n,children:d.isValidElement(e)?d.cloneElement(e,void 0,r):null})}return(0,U.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function hD(e){let t=d.forwardRef((e,t)=>{let{children:n,...r}=e;if(d.isValidElement(n)){let e=yD(n),i=vD(r,n.props);return n.type!==d.Fragment&&(i.ref=t?Xs(t,e):e),d.cloneElement(n,i)}return d.Children.count(n)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gD=Symbol(`radix.slottable`);function _D(e){return d.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===gD}function vD(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function yD(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)}function bD(e){let t=e+`CollectionProvider`,[n,r]=dc(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=d.useRef(null),a=d.useRef(new Map).current;return(0,U.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=mD(s),l=d.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,U.jsx)(c,{ref:Zs(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,f=`data-radix-collection-item`,p=mD(u),m=d.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=d.useRef(null),s=Zs(t,o),c=a(u,n);return d.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,U.jsx)(p,{[f]:``,ref:s,children:r})});m.displayName=u;function h(t){let n=a(e+`CollectionConsumer`,t);return d.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:m},h,r]}var xD=`ToastProvider`,[SD,CD,wD]=bD(`Toast`),[TD,ED]=dc(`Toast`,[wD]),[DD,OD]=TD(xD),kD=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=d.useState(null),[l,u]=d.useState(0),f=d.useRef(!1),p=d.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${xD}\`. Expected non-empty \`string\`.`),(0,U.jsx)(SD.Provider,{scope:t,children:(0,U.jsx)(DD,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:d.useCallback(()=>u(e=>e+1),[]),onToastRemove:d.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p,children:o})})};kD.displayName=xD;var AD=`ToastViewport`,jD=[`F8`],MD=`toast.viewportPause`,ND=`toast.viewportResume`,PD=d.forwardRef((e,t)=>{let{__scopeToast:n,hotkey:r=jD,label:i=`Notifications ({hotkey})`,...a}=e,o=OD(AD,n),s=CD(n),c=d.useRef(null),l=d.useRef(null),u=d.useRef(null),f=d.useRef(null),p=Zs(t,f,o.onViewportChange),m=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),h=o.toastCount>0;d.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&f.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),d.useEffect(()=>{let e=c.current,t=f.current;if(h&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(MD);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(ND);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[h,o.isClosePausedRef]);let g=d.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...sO(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return d.useEffect(()=>{let e=f.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=g({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);cO(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,g]),(0,U.jsxs)(Lc,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,m),tabIndex:-1,style:{pointerEvents:h?void 0:`none`},children:[h&&(0,U.jsx)(ID,{ref:l,onFocusFromOutsideViewport:()=>{cO(g({tabbingDirection:`forwards`}))}}),(0,U.jsx)(SD.Slot,{scope:n,children:(0,U.jsx)(yc.ol,{tabIndex:-1,...a,ref:p})}),h&&(0,U.jsx)(ID,{ref:u,onFocusFromOutsideViewport:()=>{cO(g({tabbingDirection:`backwards`}))}})]})});PD.displayName=AD;var FD=`ToastFocusProxy`,ID=d.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=OD(FD,n);return(0,U.jsx)(Rd,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});ID.displayName=FD;var LD=`Toast`,RD=`toast.swipeStart`,zD=`toast.swipeMove`,BD=`toast.swipeCancel`,VD=`toast.swipeEnd`,HD=d.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=Nd({prop:r,defaultProp:i??!0,onChange:a,caller:LD});return(0,U.jsx)(Ed,{present:n||s,children:(0,U.jsx)(GD,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:xc(e.onPause),onResume:xc(e.onResume),onSwipeStart:uc(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:uc(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:uc(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:uc(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});HD.displayName=LD;var[UD,WD]=TD(LD,{onClose(){}}),GD=d.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:p,onSwipeCancel:m,onSwipeEnd:h,...g}=e,_=OD(LD,n),[v,y]=d.useState(null),b=Zs(t,e=>y(e)),x=d.useRef(null),S=d.useRef(null),C=i||_.duration,w=d.useRef(0),T=d.useRef(C),E=d.useRef(0),{onToastAdd:D,onToastRemove:O}=_,ee=xc(()=>{v?.contains(document.activeElement)&&_.viewport?.focus(),o()}),k=d.useCallback(e=>{!e||e===1/0||(window.clearTimeout(E.current),w.current=new Date().getTime(),E.current=window.setTimeout(ee,e))},[ee]);d.useEffect(()=>{let e=_.viewport;if(e){let t=()=>{k(T.current),l?.()},n=()=>{let e=new Date().getTime()-w.current;T.current-=e,window.clearTimeout(E.current),c?.()};return e.addEventListener(MD,n),e.addEventListener(ND,t),()=>{e.removeEventListener(MD,n),e.removeEventListener(ND,t)}}},[_.viewport,C,c,l,k]),d.useEffect(()=>{a&&!_.isClosePausedRef.current&&k(C)},[a,C,_.isClosePausedRef,k]),d.useEffect(()=>(D(),()=>O()),[D,O]);let A=d.useMemo(()=>v?nO(v):null,[v]);return _.viewport?(0,U.jsxs)(U.Fragment,{children:[A&&(0,U.jsx)(KD,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:A}),(0,U.jsx)(UD,{scope:n,onClose:ee,children:f.createPortal((0,U.jsx)(SD.ItemSlot,{scope:n,children:(0,U.jsx)(Ic,{asChild:!0,onEscapeKeyDown:uc(s,()=>{_.isFocusedToastEscapeKeyDownRef.current||ee(),_.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,U.jsx)(yc.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":_.swipeDirection,...g,ref:b,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:uc(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(_.isFocusedToastEscapeKeyDownRef.current=!0,ee()))}),onPointerDown:uc(e.onPointerDown,e=>{e.button===0&&(x.current={x:e.clientX,y:e.clientY})}),onPointerMove:uc(e.onPointerMove,e=>{if(!x.current)return;let t=e.clientX-x.current.x,n=e.clientY-x.current.y,r=!!S.current,i=[`left`,`right`].includes(_.swipeDirection),a=[`left`,`up`].includes(_.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},d={originalEvent:e,delta:l};r?(S.current=l,rO(zD,p,d,{discrete:!1})):iO(l,_.swipeDirection,c)?(S.current=l,rO(RD,u,d,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(x.current=null)}),onPointerUp:uc(e.onPointerUp,e=>{let t=S.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),S.current=null,x.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};iO(t,_.swipeDirection,_.swipeThreshold)?rO(VD,h,r,{discrete:!0}):rO(BD,m,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),_.viewport)})]}):null}),KD=e=>{let{__scopeToast:t,children:n,...r}=e,i=OD(LD,t),[a,o]=d.useState(!1),[s,c]=d.useState(!1);return aO(()=>o(!0)),d.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,U.jsx)(wd,{asChild:!0,children:(0,U.jsx)(Rd,{...r,children:a&&(0,U.jsxs)(U.Fragment,{children:[i.label,` `,n]})})})},qD=`ToastTitle`,JD=d.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,U.jsx)(yc.div,{...r,ref:t})});JD.displayName=qD;var YD=`ToastDescription`,XD=d.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,U.jsx)(yc.div,{...r,ref:t})});XD.displayName=YD;var ZD=`ToastAction`,QD=d.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,U.jsx)(tO,{altText:n,asChild:!0,children:(0,U.jsx)(eO,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ZD}\`. Expected non-empty \`string\`.`),null)});QD.displayName=ZD;var $D=`ToastClose`,eO=d.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=WD($D,n);return(0,U.jsx)(tO,{asChild:!0,children:(0,U.jsx)(yc.button,{type:`button`,...r,ref:t,onClick:uc(e.onClick,i.onClose)})})});eO.displayName=$D;var tO=d.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,U.jsx)(yc.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function nO(e){let t=[];return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),oO(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...nO(e))}}),t}function rO(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?bc(i,a):i.dispatchEvent(a)}var iO=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function aO(e=()=>{}){let t=xc(e);Rc(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function oO(e){return e.nodeType===e.ELEMENT_NODE}function sO(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function cO(e){let t=document.activeElement;return e.some(e=>e===t?!0:(e.focus(),document.activeElement!==t))}var lO=kD,uO=PD,dO=HD,fO=JD,pO=XD,mO=eO,hO=lO,gO=d.forwardRef(({className:e,...t},n)=>(0,U.jsx)(uO,{ref:n,className:Gs(`fixed top-[max(0.75rem,env(safe-area-inset-top))] z-50 flex max-h-screen w-full flex-col-reverse gap-2 p-3 sm:top-[max(1rem,env(safe-area-inset-top))] md:right-4 md:top-4 md:w-[420px] md:max-w-[420px] md:flex-col`,e),...t}));gO.displayName=uO.displayName;var _O=xo(`group pointer-events-auto relative flex w-full items-start justify-between gap-3 overflow-hidden rounded-md border p-3 pr-6 shadow-2xl ring-1 ring-black/20 transition-all`,{variants:{variant:{info:`border-cyan-400/40 bg-slate-950/96 text-slate-100`,success:`border-emerald-400/45 bg-emerald-950/90 text-emerald-50`,error:`border-red-300/45 bg-red-950/92 text-red-50`}},defaultVariants:{variant:`info`}}),vO=d.forwardRef(({className:e,variant:t,...n},r)=>(0,U.jsx)(dO,{ref:r,className:Gs(_O({variant:t}),e),...n}));vO.displayName=dO.displayName;var yO=d.forwardRef(({className:e,...t},n)=>(0,U.jsx)(fO,{ref:n,className:Gs(`text-sm font-semibold`,e),...t}));yO.displayName=fO.displayName;var bO=d.forwardRef(({className:e,...t},n)=>(0,U.jsx)(pO,{ref:n,className:Gs(`mt-1 text-xs text-slate-200/90`,e),...t}));bO.displayName=pO.displayName;var xO=d.forwardRef(({className:e,...t},n)=>(0,U.jsx)(mO,{ref:n,className:Gs(`absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-md border border-white/20 bg-black/25 text-slate-200 transition-colors hover:bg-black/45 hover:text-white`,e),"toast-close":``,...t,children:`×`}));xO.displayName=mO.displayName;var SO=3,CO=7e3,wO=new Map,TO=e=>{if(wO.has(e))return;let t=setTimeout(()=>{wO.delete(e),kO({type:`REMOVE_TOAST`,toastId:e})},CO);wO.set(e,t)};function EO(e,t){switch(t.type){case`ADD_TOAST`:return{...e,toasts:[t.toast,...e.toasts].slice(0,SO)};case`UPDATE_TOAST`:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case`DISMISS_TOAST`:{let{toastId:n}=t;return n?TO(n):e.toasts.forEach(e=>TO(e.id)),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case`REMOVE_TOAST`:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}}var DO=[],OO={toasts:[]};function kO(e){OO=EO(OO,e),DO.forEach(e=>{e(OO)})}function AO(){return`${Date.now()}-${Math.floor(Math.random()*1e3)}`}function jO(e){let t=AO(),n=()=>kO({type:`DISMISS_TOAST`,toastId:t}),r=e=>kO({type:`UPDATE_TOAST`,toast:{...e,id:t}});kO({type:`ADD_TOAST`,toast:{id:t,title:e.title,body:e.body,tone:e.tone,open:!0}});let i=e.tone===`error`?CO:4200;return setTimeout(n,i),{id:t,dismiss:n,update:r}}function MO(){let[e,t]=d.useState(OO);return d.useEffect(()=>(DO.push(t),()=>{let e=DO.indexOf(t);e>-1&&DO.splice(e,1)}),[]),{...e,toast:jO,dismiss:e=>kO({type:`DISMISS_TOAST`,toastId:e})}}function NO(){let{toasts:e,dismiss:t}=MO();return(0,U.jsxs)(hO,{children:[e.map(e=>(0,U.jsxs)(vO,{open:e.open,onOpenChange:n=>{n||t(e.id)},variant:e.tone??`info`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(yO,{children:e.title}),e.body?(0,U.jsx)(bO,{children:e.body}):null]}),(0,U.jsx)(xO,{"aria-label":`Dismiss notification`})]},e.id)),(0,U.jsx)(gO,{})]})}function PO(){let e=Xi(),{state:t,error:n,refresh:r,setActiveWorkspace:i,createWorkspace:a,renameWorkspace:o}=Wi(),{toasts:s,toast:c}=MO(),l=wa(),u=(0,d.useCallback)(()=>{r()},[r]),f=ro(t?.sessions,c,u,{selectedSessionId:e.routeSessionId,onSelectedSessionIdChange:e.setRouteSessionId,autoSelectSession:e.section===`sessions`}),p=io(t?.heartbeat.tasks,t?.heartbeat.runs,c,u),m=ao({state:t,setActiveWorkspace:i,createWorkspace:a,renameWorkspace:o,notify:c}),h=va({section:e.section,sessionsState:f,error:n,toasts:s,notify:c});(0,d.useEffect)(()=>{e.normalizeRoute()},[e]),(0,d.useEffect)(()=>{window.__HEDDLE_CAPTURE_LAYOUT_SNAPSHOT=async e=>{await h(e?.screenshot??`none`)};let e=e=>{if(!(e.metaKey||e.ctrlKey)||!e.shiftKey||e.key.toLowerCase()!==`d`)return;let t=e.target;t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement||t instanceof HTMLSelectElement||(e.preventDefault(),h(`none`))};return window.addEventListener(`keydown`,e),()=>{window.__HEDDLE_CAPTURE_LAYOUT_SNAPSHOT&&delete window.__HEDDLE_CAPTURE_LAYOUT_SNAPSHOT,window.removeEventListener(`keydown`,e)}},[h]);let g=t?FO(t,f,p,m):(0,U.jsx)(th,{title:`Loading state`,children:(0,U.jsx)(`p`,{className:`muted`,children:n??`Reading local Heddle state...`})});return l?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(mh,{section:e.section,onSectionChange:e.setSection,state:t,error:n,onSetActiveWorkspace:e=>void m.switchWorkspace(e),onCaptureDebugSnapshot:e=>void h(e),onRefresh:()=>void r(),children:g}),(0,U.jsx)(NO,{})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(uh,{activeSection:e.section,sessionPath:e.routeSessionId?`/sessions/${encodeURIComponent(e.routeSessionId)}`:`/sessions`,state:t,error:n,onSetActiveWorkspace:e=>void m.switchWorkspace(e),onCaptureDebugSnapshot:e=>void h(e),onRefresh:()=>void r(),children:g}),(0,U.jsx)(NO,{})]})}function FO(e,t,n,r){return(0,U.jsxs)(Dt,{children:[(0,U.jsx)(Tt,{path:`/overview`,element:(0,U.jsx)(Ch,{state:e})}),(0,U.jsx)(Tt,{path:`/sessions`,element:(0,U.jsx)(IO,{state:e,sessionsState:t})}),(0,U.jsx)(Tt,{path:`/sessions/:sessionId/*`,element:(0,U.jsx)(IO,{state:e,sessionsState:t})}),(0,U.jsx)(Tt,{path:`/tasks`,element:(0,U.jsx)(tD,{tasks:e.heartbeat.tasks,runs:e.heartbeat.runs,selectedTask:n.selectedTask,selectedTaskId:n.selectedTaskId,onSelectTask:n.setSelectedTaskId,selectedRun:n.selectedRun,selectedRunId:n.selectedRunId,onSelectRun:n.setSelectedRunId,selectedTaskRuns:n.selectedTaskRuns,pendingTaskAction:n.pendingTaskAction,onEnableTask:n.enableTask,onDisableTask:n.disableTask,onTriggerTask:n.triggerTask})}),(0,U.jsx)(Tt,{path:`/workspaces`,element:(0,U.jsx)(pD,{state:e,creatingWorkspace:r.creatingWorkspace,renamingWorkspaceId:r.renamingWorkspaceId,onCreateWorkspace:r.createWorkspace,onRenameWorkspace:r.renameWorkspace,onSetActiveWorkspace:e=>void r.switchWorkspace(e)})}),(0,U.jsx)(Tt,{path:`*`,element:(0,U.jsx)(wt,{to:`/overview`,replace:!0})})]})}function IO({state:e,sessionsState:t}){return(0,U.jsx)(WE,{sessions:e.sessions,activeSession:t.activeSession,sessionDetail:t.sessionDetail,sessionDetailLoading:t.sessionDetailLoading,sessionDetailError:t.sessionDetailError,selectedSessionId:t.selectedSessionId,onSelectSession:t.setSelectedSessionId,selectedTurnId:t.selectedTurnId,onSelectTurn:t.setSelectedTurnId,selectedTurn:t.selectedTurn,turnReview:t.turnReview,turnReviewLoading:t.turnReviewLoading,turnReviewError:t.turnReviewError,sendingPrompt:t.sendingPrompt,runInFlight:t.runInFlight,memoryUpdating:t.memoryUpdating,auth:e.auth,sendPromptError:t.sendPromptError,onSendPrompt:t.sendPrompt,creatingSession:t.creatingSession,sessionNotice:t.sessionNotice,onCreateSession:t.createSession,onContinueSession:t.continueSession,onCancelSessionRun:t.cancelSessionRun,onUpdateSessionSettings:t.updateSessionSettings,pendingApproval:t.pendingApproval,onResolveApproval:t.resolveApproval})}(0,p.createRoot)(document.getElementById(`root`)).render((0,U.jsx)(d.StrictMode,{children:(0,U.jsx)(hn,{children:(0,U.jsx)(PO,{})})}));export{_ as n,i as r,qs as t};