octo-vec 1.0.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 (319) hide show
  1. package/README.md +646 -0
  2. package/core/prompts/architect.md +124 -0
  3. package/core/prompts/ba.md +117 -0
  4. package/core/prompts/backend.md +154 -0
  5. package/core/prompts/compliance.md +127 -0
  6. package/core/prompts/dataanalyst.md +126 -0
  7. package/core/prompts/dataengineer.md +155 -0
  8. package/core/prompts/dba.md +155 -0
  9. package/core/prompts/designer.md +145 -0
  10. package/core/prompts/dev.md +148 -0
  11. package/core/prompts/devops.md +127 -0
  12. package/core/prompts/frontend.md +151 -0
  13. package/core/prompts/mlengineer.md +156 -0
  14. package/core/prompts/mobile.md +155 -0
  15. package/core/prompts/pm.md +182 -0
  16. package/core/prompts/productowner.md +122 -0
  17. package/core/prompts/qa.md +135 -0
  18. package/core/prompts/releasemanager.md +138 -0
  19. package/core/prompts/researcher.md +122 -0
  20. package/core/prompts/scrummaster.md +125 -0
  21. package/core/prompts/security.md +127 -0
  22. package/core/prompts/sre.md +141 -0
  23. package/core/prompts/support.md +138 -0
  24. package/core/prompts/techwriter.md +123 -0
  25. package/core/roster.json +1161 -0
  26. package/dashboard/dist/assets/index--L-aFRgh.css +1 -0
  27. package/dashboard/dist/assets/index-BoOVmAFf.js +523 -0
  28. package/dashboard/dist/icons/integrations/gitleaks.svg +6 -0
  29. package/dashboard/dist/icons/integrations/searxng.svg +5 -0
  30. package/dashboard/dist/icons/integrations/semgrep.svg +4 -0
  31. package/dashboard/dist/icons/integrations/slack.svg +6 -0
  32. package/dashboard/dist/icons/integrations/sonarqube.svg +5 -0
  33. package/dashboard/dist/icons/integrations/telegram.svg +4 -0
  34. package/dashboard/dist/icons/integrations/trivy.svg +5 -0
  35. package/dashboard/dist/icons/providers/anthropic.svg +1 -0
  36. package/dashboard/dist/icons/providers/antigravity.svg +1 -0
  37. package/dashboard/dist/icons/providers/azure.svg +1 -0
  38. package/dashboard/dist/icons/providers/bedrock.svg +1 -0
  39. package/dashboard/dist/icons/providers/cerebras.svg +1 -0
  40. package/dashboard/dist/icons/providers/chatglm.svg +1 -0
  41. package/dashboard/dist/icons/providers/codex.svg +1 -0
  42. package/dashboard/dist/icons/providers/gemini.svg +1 -0
  43. package/dashboard/dist/icons/providers/githubcopilot.svg +1 -0
  44. package/dashboard/dist/icons/providers/googlecloud.svg +1 -0
  45. package/dashboard/dist/icons/providers/groq.svg +1 -0
  46. package/dashboard/dist/icons/providers/huggingface.svg +1 -0
  47. package/dashboard/dist/icons/providers/kimi.svg +1 -0
  48. package/dashboard/dist/icons/providers/minimax.svg +1 -0
  49. package/dashboard/dist/icons/providers/mistral.svg +1 -0
  50. package/dashboard/dist/icons/providers/openai.svg +1 -0
  51. package/dashboard/dist/icons/providers/openrouter.svg +1 -0
  52. package/dashboard/dist/icons/providers/vercel.svg +1 -0
  53. package/dashboard/dist/icons/providers/xai.svg +1 -0
  54. package/dashboard/dist/index.html +17 -0
  55. package/dist/agents/pmAgent.d.ts +40 -0
  56. package/dist/agents/pmAgent.d.ts.map +1 -0
  57. package/dist/agents/pmAgent.js +181 -0
  58. package/dist/agents/pmAgent.js.map +1 -0
  59. package/dist/ar/baseSpecialist.d.ts +36 -0
  60. package/dist/ar/baseSpecialist.d.ts.map +1 -0
  61. package/dist/ar/baseSpecialist.js +292 -0
  62. package/dist/ar/baseSpecialist.js.map +1 -0
  63. package/dist/ar/promptLoader.d.ts +10 -0
  64. package/dist/ar/promptLoader.d.ts.map +1 -0
  65. package/dist/ar/promptLoader.js +22 -0
  66. package/dist/ar/promptLoader.js.map +1 -0
  67. package/dist/ar/registry.d.ts +12 -0
  68. package/dist/ar/registry.d.ts.map +1 -0
  69. package/dist/ar/registry.js +22 -0
  70. package/dist/ar/registry.js.map +1 -0
  71. package/dist/ar/roster.d.ts +104 -0
  72. package/dist/ar/roster.d.ts.map +1 -0
  73. package/dist/ar/roster.js +245 -0
  74. package/dist/ar/roster.js.map +1 -0
  75. package/dist/ar/toolProfiles.d.ts +18 -0
  76. package/dist/ar/toolProfiles.d.ts.map +1 -0
  77. package/dist/ar/toolProfiles.js +89 -0
  78. package/dist/ar/toolProfiles.js.map +1 -0
  79. package/dist/atp/agentGroups.d.ts +39 -0
  80. package/dist/atp/agentGroups.d.ts.map +1 -0
  81. package/dist/atp/agentGroups.js +109 -0
  82. package/dist/atp/agentGroups.js.map +1 -0
  83. package/dist/atp/agentInterrupt.d.ts +31 -0
  84. package/dist/atp/agentInterrupt.d.ts.map +1 -0
  85. package/dist/atp/agentInterrupt.js +51 -0
  86. package/dist/atp/agentInterrupt.js.map +1 -0
  87. package/dist/atp/agentMessageQueue.d.ts +74 -0
  88. package/dist/atp/agentMessageQueue.d.ts.map +1 -0
  89. package/dist/atp/agentMessageQueue.js +218 -0
  90. package/dist/atp/agentMessageQueue.js.map +1 -0
  91. package/dist/atp/agentRuntime.d.ts +67 -0
  92. package/dist/atp/agentRuntime.d.ts.map +1 -0
  93. package/dist/atp/agentRuntime.js +279 -0
  94. package/dist/atp/agentRuntime.js.map +1 -0
  95. package/dist/atp/agentStreamBus.d.ts +35 -0
  96. package/dist/atp/agentStreamBus.d.ts.map +1 -0
  97. package/dist/atp/agentStreamBus.js +159 -0
  98. package/dist/atp/agentStreamBus.js.map +1 -0
  99. package/dist/atp/agentToolConfig.d.ts +38 -0
  100. package/dist/atp/agentToolConfig.d.ts.map +1 -0
  101. package/dist/atp/agentToolConfig.js +225 -0
  102. package/dist/atp/agentToolConfig.js.map +1 -0
  103. package/dist/atp/chatLog.d.ts +34 -0
  104. package/dist/atp/chatLog.d.ts.map +1 -0
  105. package/dist/atp/chatLog.js +59 -0
  106. package/dist/atp/chatLog.js.map +1 -0
  107. package/dist/atp/codexAuth.d.ts +6 -0
  108. package/dist/atp/codexAuth.d.ts.map +1 -0
  109. package/dist/atp/codexAuth.js +44 -0
  110. package/dist/atp/codexAuth.js.map +1 -0
  111. package/dist/atp/database.d.ts +54 -0
  112. package/dist/atp/database.d.ts.map +1 -0
  113. package/dist/atp/database.js +323 -0
  114. package/dist/atp/database.js.map +1 -0
  115. package/dist/atp/eventLog.d.ts +12 -0
  116. package/dist/atp/eventLog.d.ts.map +1 -0
  117. package/dist/atp/eventLog.js +60 -0
  118. package/dist/atp/eventLog.js.map +1 -0
  119. package/dist/atp/inboxLoop.d.ts +72 -0
  120. package/dist/atp/inboxLoop.d.ts.map +1 -0
  121. package/dist/atp/inboxLoop.js +482 -0
  122. package/dist/atp/inboxLoop.js.map +1 -0
  123. package/dist/atp/llmDebug.d.ts +18 -0
  124. package/dist/atp/llmDebug.d.ts.map +1 -0
  125. package/dist/atp/llmDebug.js +97 -0
  126. package/dist/atp/llmDebug.js.map +1 -0
  127. package/dist/atp/messageDebouncer.d.ts +34 -0
  128. package/dist/atp/messageDebouncer.d.ts.map +1 -0
  129. package/dist/atp/messageDebouncer.js +60 -0
  130. package/dist/atp/messageDebouncer.js.map +1 -0
  131. package/dist/atp/messageQueue.d.ts +17 -0
  132. package/dist/atp/messageQueue.d.ts.map +1 -0
  133. package/dist/atp/messageQueue.js +69 -0
  134. package/dist/atp/messageQueue.js.map +1 -0
  135. package/dist/atp/modelConfig.d.ts +46 -0
  136. package/dist/atp/modelConfig.d.ts.map +1 -0
  137. package/dist/atp/modelConfig.js +232 -0
  138. package/dist/atp/modelConfig.js.map +1 -0
  139. package/dist/atp/models.d.ts +87 -0
  140. package/dist/atp/models.d.ts.map +1 -0
  141. package/dist/atp/models.js +45 -0
  142. package/dist/atp/models.js.map +1 -0
  143. package/dist/atp/postTaskHooks.d.ts +21 -0
  144. package/dist/atp/postTaskHooks.d.ts.map +1 -0
  145. package/dist/atp/postTaskHooks.js +89 -0
  146. package/dist/atp/postTaskHooks.js.map +1 -0
  147. package/dist/atp/tokenTracker.d.ts +46 -0
  148. package/dist/atp/tokenTracker.d.ts.map +1 -0
  149. package/dist/atp/tokenTracker.js +120 -0
  150. package/dist/atp/tokenTracker.js.map +1 -0
  151. package/dist/channels/activeChannel.d.ts +14 -0
  152. package/dist/channels/activeChannel.d.ts.map +1 -0
  153. package/dist/channels/activeChannel.js +18 -0
  154. package/dist/channels/activeChannel.js.map +1 -0
  155. package/dist/channels/channelConfig.d.ts +61 -0
  156. package/dist/channels/channelConfig.d.ts.map +1 -0
  157. package/dist/channels/channelConfig.js +130 -0
  158. package/dist/channels/channelConfig.js.map +1 -0
  159. package/dist/channels/channelManager.d.ts +22 -0
  160. package/dist/channels/channelManager.d.ts.map +1 -0
  161. package/dist/channels/channelManager.js +77 -0
  162. package/dist/channels/channelManager.js.map +1 -0
  163. package/dist/channels/discord.d.ts +24 -0
  164. package/dist/channels/discord.d.ts.map +1 -0
  165. package/dist/channels/discord.js +276 -0
  166. package/dist/channels/discord.js.map +1 -0
  167. package/dist/channels/slack.d.ts +25 -0
  168. package/dist/channels/slack.d.ts.map +1 -0
  169. package/dist/channels/slack.js +313 -0
  170. package/dist/channels/slack.js.map +1 -0
  171. package/dist/channels/telegram.d.ts +20 -0
  172. package/dist/channels/telegram.d.ts.map +1 -0
  173. package/dist/channels/telegram.js +273 -0
  174. package/dist/channels/telegram.js.map +1 -0
  175. package/dist/channels/types.d.ts +12 -0
  176. package/dist/channels/types.d.ts.map +1 -0
  177. package/dist/channels/types.js +5 -0
  178. package/dist/channels/types.js.map +1 -0
  179. package/dist/config.d.ts +82 -0
  180. package/dist/config.d.ts.map +1 -0
  181. package/dist/config.js +144 -0
  182. package/dist/config.js.map +1 -0
  183. package/dist/dashboard/security.d.ts +68 -0
  184. package/dist/dashboard/security.d.ts.map +1 -0
  185. package/dist/dashboard/security.js +178 -0
  186. package/dist/dashboard/security.js.map +1 -0
  187. package/dist/dashboard/securityHelpers.d.ts +10 -0
  188. package/dist/dashboard/securityHelpers.d.ts.map +1 -0
  189. package/dist/dashboard/securityHelpers.js +22 -0
  190. package/dist/dashboard/securityHelpers.js.map +1 -0
  191. package/dist/dashboard/server.d.ts +18 -0
  192. package/dist/dashboard/server.d.ts.map +1 -0
  193. package/dist/dashboard/server.js +3207 -0
  194. package/dist/dashboard/server.js.map +1 -0
  195. package/dist/flows/codeScanFlow.d.ts +14 -0
  196. package/dist/flows/codeScanFlow.d.ts.map +1 -0
  197. package/dist/flows/codeScanFlow.js +204 -0
  198. package/dist/flows/codeScanFlow.js.map +1 -0
  199. package/dist/flows/gitleaksScanFlow.d.ts +12 -0
  200. package/dist/flows/gitleaksScanFlow.d.ts.map +1 -0
  201. package/dist/flows/gitleaksScanFlow.js +205 -0
  202. package/dist/flows/gitleaksScanFlow.js.map +1 -0
  203. package/dist/flows/index.d.ts +30 -0
  204. package/dist/flows/index.d.ts.map +1 -0
  205. package/dist/flows/index.js +43 -0
  206. package/dist/flows/index.js.map +1 -0
  207. package/dist/flows/semgrepScanFlow.d.ts +13 -0
  208. package/dist/flows/semgrepScanFlow.d.ts.map +1 -0
  209. package/dist/flows/semgrepScanFlow.js +211 -0
  210. package/dist/flows/semgrepScanFlow.js.map +1 -0
  211. package/dist/flows/trivyScanFlow.d.ts +13 -0
  212. package/dist/flows/trivyScanFlow.d.ts.map +1 -0
  213. package/dist/flows/trivyScanFlow.js +198 -0
  214. package/dist/flows/trivyScanFlow.js.map +1 -0
  215. package/dist/identity.d.ts +22 -0
  216. package/dist/identity.d.ts.map +1 -0
  217. package/dist/identity.js +34 -0
  218. package/dist/identity.js.map +1 -0
  219. package/dist/init.d.ts +8 -0
  220. package/dist/init.d.ts.map +1 -0
  221. package/dist/init.js +27 -0
  222. package/dist/init.js.map +1 -0
  223. package/dist/integrations/integrationConfig.d.ts +80 -0
  224. package/dist/integrations/integrationConfig.d.ts.map +1 -0
  225. package/dist/integrations/integrationConfig.js +146 -0
  226. package/dist/integrations/integrationConfig.js.map +1 -0
  227. package/dist/mcp/mcpBridge.d.ts +36 -0
  228. package/dist/mcp/mcpBridge.d.ts.map +1 -0
  229. package/dist/mcp/mcpBridge.js +157 -0
  230. package/dist/mcp/mcpBridge.js.map +1 -0
  231. package/dist/memory/agentMemory.d.ts +32 -0
  232. package/dist/memory/agentMemory.d.ts.map +1 -0
  233. package/dist/memory/agentMemory.js +116 -0
  234. package/dist/memory/agentMemory.js.map +1 -0
  235. package/dist/memory/autoCompaction.d.ts +46 -0
  236. package/dist/memory/autoCompaction.d.ts.map +1 -0
  237. package/dist/memory/autoCompaction.js +220 -0
  238. package/dist/memory/autoCompaction.js.map +1 -0
  239. package/dist/memory/compaction.d.ts +17 -0
  240. package/dist/memory/compaction.d.ts.map +1 -0
  241. package/dist/memory/compaction.js +27 -0
  242. package/dist/memory/compaction.js.map +1 -0
  243. package/dist/memory/messageHistory.d.ts +28 -0
  244. package/dist/memory/messageHistory.d.ts.map +1 -0
  245. package/dist/memory/messageHistory.js +60 -0
  246. package/dist/memory/messageHistory.js.map +1 -0
  247. package/dist/memory/sessionLifecycle.d.ts +30 -0
  248. package/dist/memory/sessionLifecycle.d.ts.map +1 -0
  249. package/dist/memory/sessionLifecycle.js +63 -0
  250. package/dist/memory/sessionLifecycle.js.map +1 -0
  251. package/dist/migrate.d.ts +8 -0
  252. package/dist/migrate.d.ts.map +1 -0
  253. package/dist/migrate.js +83 -0
  254. package/dist/migrate.js.map +1 -0
  255. package/dist/onboarding.d.ts +8 -0
  256. package/dist/onboarding.d.ts.map +1 -0
  257. package/dist/onboarding.js +188 -0
  258. package/dist/onboarding.js.map +1 -0
  259. package/dist/tools/domain/baFileTools.d.ts +7 -0
  260. package/dist/tools/domain/baFileTools.d.ts.map +1 -0
  261. package/dist/tools/domain/baFileTools.js +46 -0
  262. package/dist/tools/domain/baFileTools.js.map +1 -0
  263. package/dist/tools/domain/baTools.d.ts +6 -0
  264. package/dist/tools/domain/baTools.d.ts.map +1 -0
  265. package/dist/tools/domain/baTools.js +160 -0
  266. package/dist/tools/domain/baTools.js.map +1 -0
  267. package/dist/tools/domain/baseSpecialistTools.d.ts +22 -0
  268. package/dist/tools/domain/baseSpecialistTools.d.ts.map +1 -0
  269. package/dist/tools/domain/baseSpecialistTools.js +183 -0
  270. package/dist/tools/domain/baseSpecialistTools.js.map +1 -0
  271. package/dist/tools/domain/devTools.d.ts +6 -0
  272. package/dist/tools/domain/devTools.d.ts.map +1 -0
  273. package/dist/tools/domain/devTools.js +191 -0
  274. package/dist/tools/domain/devTools.js.map +1 -0
  275. package/dist/tools/domain/gitTools.d.ts +36 -0
  276. package/dist/tools/domain/gitTools.d.ts.map +1 -0
  277. package/dist/tools/domain/gitTools.js +279 -0
  278. package/dist/tools/domain/gitTools.js.map +1 -0
  279. package/dist/tools/domain/qaTools.d.ts +6 -0
  280. package/dist/tools/domain/qaTools.d.ts.map +1 -0
  281. package/dist/tools/domain/qaTools.js +275 -0
  282. package/dist/tools/domain/qaTools.js.map +1 -0
  283. package/dist/tools/domain/securityFlowTools.d.ts +6 -0
  284. package/dist/tools/domain/securityFlowTools.d.ts.map +1 -0
  285. package/dist/tools/domain/securityFlowTools.js +156 -0
  286. package/dist/tools/domain/securityFlowTools.js.map +1 -0
  287. package/dist/tools/pm/employeeTools.d.ts +15 -0
  288. package/dist/tools/pm/employeeTools.d.ts.map +1 -0
  289. package/dist/tools/pm/employeeTools.js +117 -0
  290. package/dist/tools/pm/employeeTools.js.map +1 -0
  291. package/dist/tools/pm/taskTools.d.ts +31 -0
  292. package/dist/tools/pm/taskTools.d.ts.map +1 -0
  293. package/dist/tools/pm/taskTools.js +534 -0
  294. package/dist/tools/pm/taskTools.js.map +1 -0
  295. package/dist/tools/shared/dateTools.d.ts +7 -0
  296. package/dist/tools/shared/dateTools.d.ts.map +1 -0
  297. package/dist/tools/shared/dateTools.js +35 -0
  298. package/dist/tools/shared/dateTools.js.map +1 -0
  299. package/dist/tools/shared/fileTools.d.ts +33 -0
  300. package/dist/tools/shared/fileTools.d.ts.map +1 -0
  301. package/dist/tools/shared/fileTools.js +312 -0
  302. package/dist/tools/shared/fileTools.js.map +1 -0
  303. package/dist/tools/shared/memoryTools.d.ts +18 -0
  304. package/dist/tools/shared/memoryTools.d.ts.map +1 -0
  305. package/dist/tools/shared/memoryTools.js +275 -0
  306. package/dist/tools/shared/memoryTools.js.map +1 -0
  307. package/dist/tools/shared/messagingTools.d.ts +14 -0
  308. package/dist/tools/shared/messagingTools.d.ts.map +1 -0
  309. package/dist/tools/shared/messagingTools.js +95 -0
  310. package/dist/tools/shared/messagingTools.js.map +1 -0
  311. package/dist/tools/shared/webTools.d.ts +12 -0
  312. package/dist/tools/shared/webTools.d.ts.map +1 -0
  313. package/dist/tools/shared/webTools.js +140 -0
  314. package/dist/tools/shared/webTools.js.map +1 -0
  315. package/dist/tower.d.ts +8 -0
  316. package/dist/tower.d.ts.map +1 -0
  317. package/dist/tower.js +774 -0
  318. package/dist/tower.js.map +1 -0
  319. package/package.json +71 -0
@@ -0,0 +1,523 @@
1
+ (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function r(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(s){if(s.ep)return;s.ep=!0;const c=r(s);fetch(s.href,c)}})();function dh(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Qs={exports:{}},mo={},Gs={exports:{}},We={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Hf;function wx(){if(Hf)return We;Hf=1;var t=Symbol.for("react.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),x=Symbol.iterator;function v(A){return A===null||typeof A!="object"?null:(A=x&&A[x]||A["@@iterator"],typeof A=="function"?A:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,M={};function N(A,V,C){this.props=A,this.context=V,this.refs=M,this.updater=C||k}N.prototype.isReactComponent={},N.prototype.setState=function(A,V){if(typeof A!="object"&&typeof A!="function"&&A!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,A,V,"setState")},N.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function _(){}_.prototype=N.prototype;function U(A,V,C){this.props=A,this.context=V,this.refs=M,this.updater=C||k}var w=U.prototype=new _;w.constructor=U,j(w,N.prototype),w.isPureReactComponent=!0;var T=Array.isArray,q=Object.prototype.hasOwnProperty,P={current:null},X={key:!0,ref:!0,__self:!0,__source:!0};function oe(A,V,C){var ge,je={},ye=null,H=null;if(V!=null)for(ge in V.ref!==void 0&&(H=V.ref),V.key!==void 0&&(ye=""+V.key),V)q.call(V,ge)&&!X.hasOwnProperty(ge)&&(je[ge]=V[ge]);var pe=arguments.length-2;if(pe===1)je.children=C;else if(1<pe){for(var fe=Array(pe),Te=0;Te<pe;Te++)fe[Te]=arguments[Te+2];je.children=fe}if(A&&A.defaultProps)for(ge in pe=A.defaultProps,pe)je[ge]===void 0&&(je[ge]=pe[ge]);return{$$typeof:t,type:A,key:ye,ref:H,props:je,_owner:P.current}}function me(A,V){return{$$typeof:t,type:A.type,key:V,ref:A.ref,props:A.props,_owner:A._owner}}function E(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function Q(A){var V={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(C){return V[C]})}var Y=/\/+/g;function de(A,V){return typeof A=="object"&&A!==null&&A.key!=null?Q(""+A.key):V.toString(36)}function J(A,V,C,ge,je){var ye=typeof A;(ye==="undefined"||ye==="boolean")&&(A=null);var H=!1;if(A===null)H=!0;else switch(ye){case"string":case"number":H=!0;break;case"object":switch(A.$$typeof){case t:case i:H=!0}}if(H)return H=A,je=je(H),A=ge===""?"."+de(H,0):ge,T(je)?(C="",A!=null&&(C=A.replace(Y,"$&/")+"/"),J(je,V,C,"",function(Te){return Te})):je!=null&&(E(je)&&(je=me(je,C+(!je.key||H&&H.key===je.key?"":(""+je.key).replace(Y,"$&/")+"/")+A)),V.push(je)),1;if(H=0,ge=ge===""?".":ge+":",T(A))for(var pe=0;pe<A.length;pe++){ye=A[pe];var fe=ge+de(ye,pe);H+=J(ye,V,C,fe,je)}else if(fe=v(A),typeof fe=="function")for(A=fe.call(A),pe=0;!(ye=A.next()).done;)ye=ye.value,fe=ge+de(ye,pe++),H+=J(ye,V,C,fe,je);else if(ye==="object")throw V=String(A),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.");return H}function K(A,V,C){if(A==null)return A;var ge=[],je=0;return J(A,ge,"","",function(ye){return V.call(C,ye,je++)}),ge}function he(A){if(A._status===-1){var V=A._result;V=V(),V.then(function(C){(A._status===0||A._status===-1)&&(A._status=1,A._result=C)},function(C){(A._status===0||A._status===-1)&&(A._status=2,A._result=C)}),A._status===-1&&(A._status=0,A._result=V)}if(A._status===1)return A._result.default;throw A._result}var le={current:null},Z={transition:null},G={ReactCurrentDispatcher:le,ReactCurrentBatchConfig:Z,ReactCurrentOwner:P};function S(){throw Error("act(...) is not supported in production builds of React.")}return We.Children={map:K,forEach:function(A,V,C){K(A,function(){V.apply(this,arguments)},C)},count:function(A){var V=0;return K(A,function(){V++}),V},toArray:function(A){return K(A,function(V){return V})||[]},only:function(A){if(!E(A))throw Error("React.Children.only expected to receive a single React element child.");return A}},We.Component=N,We.Fragment=r,We.Profiler=s,We.PureComponent=U,We.StrictMode=a,We.Suspense=h,We.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,We.act=S,We.cloneElement=function(A,V,C){if(A==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+A+".");var ge=j({},A.props),je=A.key,ye=A.ref,H=A._owner;if(V!=null){if(V.ref!==void 0&&(ye=V.ref,H=P.current),V.key!==void 0&&(je=""+V.key),A.type&&A.type.defaultProps)var pe=A.type.defaultProps;for(fe in V)q.call(V,fe)&&!X.hasOwnProperty(fe)&&(ge[fe]=V[fe]===void 0&&pe!==void 0?pe[fe]:V[fe])}var fe=arguments.length-2;if(fe===1)ge.children=C;else if(1<fe){pe=Array(fe);for(var Te=0;Te<fe;Te++)pe[Te]=arguments[Te+2];ge.children=pe}return{$$typeof:t,type:A.type,key:je,ref:ye,props:ge,_owner:H}},We.createContext=function(A){return A={$$typeof:d,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},A.Provider={$$typeof:c,_context:A},A.Consumer=A},We.createElement=oe,We.createFactory=function(A){var V=oe.bind(null,A);return V.type=A,V},We.createRef=function(){return{current:null}},We.forwardRef=function(A){return{$$typeof:f,render:A}},We.isValidElement=E,We.lazy=function(A){return{$$typeof:y,_payload:{_status:-1,_result:A},_init:he}},We.memo=function(A,V){return{$$typeof:g,type:A,compare:V===void 0?null:V}},We.startTransition=function(A){var V=Z.transition;Z.transition={};try{A()}finally{Z.transition=V}},We.unstable_act=S,We.useCallback=function(A,V){return le.current.useCallback(A,V)},We.useContext=function(A){return le.current.useContext(A)},We.useDebugValue=function(){},We.useDeferredValue=function(A){return le.current.useDeferredValue(A)},We.useEffect=function(A,V){return le.current.useEffect(A,V)},We.useId=function(){return le.current.useId()},We.useImperativeHandle=function(A,V,C){return le.current.useImperativeHandle(A,V,C)},We.useInsertionEffect=function(A,V){return le.current.useInsertionEffect(A,V)},We.useLayoutEffect=function(A,V){return le.current.useLayoutEffect(A,V)},We.useMemo=function(A,V){return le.current.useMemo(A,V)},We.useReducer=function(A,V,C){return le.current.useReducer(A,V,C)},We.useRef=function(A){return le.current.useRef(A)},We.useState=function(A){return le.current.useState(A)},We.useSyncExternalStore=function(A,V,C){return le.current.useSyncExternalStore(A,V,C)},We.useTransition=function(){return le.current.useTransition()},We.version="18.3.1",We}var Vf;function Hu(){return Vf||(Vf=1,Gs.exports=wx()),Gs.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var qf;function Sx(){if(qf)return mo;qf=1;var t=Hu(),i=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,c={key:!0,ref:!0,__self:!0,__source:!0};function d(f,h,g){var y,x={},v=null,k=null;g!==void 0&&(v=""+g),h.key!==void 0&&(v=""+h.key),h.ref!==void 0&&(k=h.ref);for(y in h)a.call(h,y)&&!c.hasOwnProperty(y)&&(x[y]=h[y]);if(f&&f.defaultProps)for(y in h=f.defaultProps,h)x[y]===void 0&&(x[y]=h[y]);return{$$typeof:i,type:f,key:v,ref:k,props:x,_owner:s.current}}return mo.Fragment=r,mo.jsx=d,mo.jsxs=d,mo}var Yf;function jx(){return Yf||(Yf=1,Qs.exports=Sx()),Qs.exports}var l=jx(),I=Hu(),Ul={},Xs={exports:{}},Gt={},Zs={exports:{}},Js={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Kf;function Cx(){return Kf||(Kf=1,(function(t){function i(Z,G){var S=Z.length;Z.push(G);e:for(;0<S;){var A=S-1>>>1,V=Z[A];if(0<s(V,G))Z[A]=G,Z[S]=V,S=A;else break e}}function r(Z){return Z.length===0?null:Z[0]}function a(Z){if(Z.length===0)return null;var G=Z[0],S=Z.pop();if(S!==G){Z[0]=S;e:for(var A=0,V=Z.length,C=V>>>1;A<C;){var ge=2*(A+1)-1,je=Z[ge],ye=ge+1,H=Z[ye];if(0>s(je,S))ye<V&&0>s(H,je)?(Z[A]=H,Z[ye]=S,A=ye):(Z[A]=je,Z[ge]=S,A=ge);else if(ye<V&&0>s(H,S))Z[A]=H,Z[ye]=S,A=ye;else break e}}return G}function s(Z,G){var S=Z.sortIndex-G.sortIndex;return S!==0?S:Z.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var d=Date,f=d.now();t.unstable_now=function(){return d.now()-f}}var h=[],g=[],y=1,x=null,v=3,k=!1,j=!1,M=!1,N=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(Z){for(var G=r(g);G!==null;){if(G.callback===null)a(g);else if(G.startTime<=Z)a(g),G.sortIndex=G.expirationTime,i(h,G);else break;G=r(g)}}function T(Z){if(M=!1,w(Z),!j)if(r(h)!==null)j=!0,he(q);else{var G=r(g);G!==null&&le(T,G.startTime-Z)}}function q(Z,G){j=!1,M&&(M=!1,_(oe),oe=-1),k=!0;var S=v;try{for(w(G),x=r(h);x!==null&&(!(x.expirationTime>G)||Z&&!Q());){var A=x.callback;if(typeof A=="function"){x.callback=null,v=x.priorityLevel;var V=A(x.expirationTime<=G);G=t.unstable_now(),typeof V=="function"?x.callback=V:x===r(h)&&a(h),w(G)}else a(h);x=r(h)}if(x!==null)var C=!0;else{var ge=r(g);ge!==null&&le(T,ge.startTime-G),C=!1}return C}finally{x=null,v=S,k=!1}}var P=!1,X=null,oe=-1,me=5,E=-1;function Q(){return!(t.unstable_now()-E<me)}function Y(){if(X!==null){var Z=t.unstable_now();E=Z;var G=!0;try{G=X(!0,Z)}finally{G?de():(P=!1,X=null)}}else P=!1}var de;if(typeof U=="function")de=function(){U(Y)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,K=J.port2;J.port1.onmessage=Y,de=function(){K.postMessage(null)}}else de=function(){N(Y,0)};function he(Z){X=Z,P||(P=!0,de())}function le(Z,G){oe=N(function(){Z(t.unstable_now())},G)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Z){Z.callback=null},t.unstable_continueExecution=function(){j||k||(j=!0,he(q))},t.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):me=0<Z?Math.floor(1e3/Z):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return r(h)},t.unstable_next=function(Z){switch(v){case 1:case 2:case 3:var G=3;break;default:G=v}var S=v;v=G;try{return Z()}finally{v=S}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(Z,G){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var S=v;v=Z;try{return G()}finally{v=S}},t.unstable_scheduleCallback=function(Z,G,S){var A=t.unstable_now();switch(typeof S=="object"&&S!==null?(S=S.delay,S=typeof S=="number"&&0<S?A+S:A):S=A,Z){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=S+V,Z={id:y++,callback:G,priorityLevel:Z,startTime:S,expirationTime:V,sortIndex:-1},S>A?(Z.sortIndex=S,i(g,Z),r(h)===null&&Z===r(g)&&(M?(_(oe),oe=-1):M=!0,le(T,S-A))):(Z.sortIndex=V,i(h,Z),j||k||(j=!0,he(q))),Z},t.unstable_shouldYield=Q,t.unstable_wrapCallback=function(Z){var G=v;return function(){var S=v;v=G;try{return Z.apply(this,arguments)}finally{v=S}}}})(Js)),Js}var Qf;function zx(){return Qf||(Qf=1,Zs.exports=Cx()),Zs.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Gf;function Ex(){if(Gf)return Gt;Gf=1;var t=Hu(),i=zx();function r(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o<arguments.length;o++)n+="&args[]="+encodeURIComponent(arguments[o]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function c(e,n){d(e,n),d(e+"Capture",n)}function d(e,n){for(s[e]=n,e=0;e<n.length;e++)a.add(n[e])}var f=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[: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]*$/,y={},x={};function v(e){return h.call(x,e)?!0:h.call(y,e)?!1:g.test(e)?x[e]=!0:(y[e]=!0,!1)}function k(e,n,o,u){if(o!==null&&o.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return u?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function j(e,n,o,u){if(n===null||typeof n>"u"||k(e,n,o,u))return!0;if(u)return!1;if(o!==null)switch(o.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function M(e,n,o,u,p,m,b){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=u,this.attributeNamespace=p,this.mustUseProperty=o,this.propertyName=e,this.type=n,this.sanitizeURL=m,this.removeEmptyString=b}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){N[e]=new M(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];N[n]=new M(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){N[e]=new M(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){N[e]=new M(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){N[e]=new M(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){N[e]=new M(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){N[e]=new M(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){N[e]=new M(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){N[e]=new M(e,5,!1,e.toLowerCase(),null,!1,!1)});var _=/[\-:]([a-z])/g;function U(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(_,U);N[n]=new M(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(_,U);N[n]=new M(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(_,U);N[n]=new M(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){N[e]=new M(e,1,!1,e.toLowerCase(),null,!1,!1)}),N.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){N[e]=new M(e,1,!1,e.toLowerCase(),null,!0,!0)});function w(e,n,o,u){var p=N.hasOwnProperty(n)?N[n]:null;(p!==null?p.type!==0:u||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(j(n,o,p,u)&&(o=null),u||p===null?v(n)&&(o===null?e.removeAttribute(n):e.setAttribute(n,""+o)):p.mustUseProperty?e[p.propertyName]=o===null?p.type===3?!1:"":o:(n=p.attributeName,u=p.attributeNamespace,o===null?e.removeAttribute(n):(p=p.type,o=p===3||p===4&&o===!0?"":""+o,u?e.setAttributeNS(u,n,o):e.setAttribute(n,o))))}var T=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),P=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),Q=Symbol.for("react.context"),Y=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),le=Symbol.for("react.offscreen"),Z=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=Z&&e[Z]||e["@@iterator"],typeof e=="function"?e:null)}var S=Object.assign,A;function V(e){if(A===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);A=n&&n[1]||""}return`
34
+ `+A+e}var C=!1;function ge(e,n){if(!e||C)return"";C=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(n)if(n=function(){throw Error()},Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(n,[])}catch(B){var u=B}Reflect.construct(e,[],n)}else{try{n.call()}catch(B){u=B}e.call(n.prototype)}else{try{throw Error()}catch(B){u=B}e()}}catch(B){if(B&&u&&typeof B.stack=="string"){for(var p=B.stack.split(`
35
+ `),m=u.stack.split(`
36
+ `),b=p.length-1,z=m.length-1;1<=b&&0<=z&&p[b]!==m[z];)z--;for(;1<=b&&0<=z;b--,z--)if(p[b]!==m[z]){if(b!==1||z!==1)do if(b--,z--,0>z||p[b]!==m[z]){var R=`
37
+ `+p[b].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=b&&0<=z);break}}}finally{C=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?V(e):""}function je(e){switch(e.tag){case 5:return V(e.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return e=ge(e.type,!1),e;case 11:return e=ge(e.type.render,!1),e;case 1:return e=ge(e.type,!0),e;default:return""}}function ye(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case P:return"Portal";case me:return"Profiler";case oe:return"StrictMode";case de:return"Suspense";case J:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Q:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case Y:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return n=e.displayName||null,n!==null?n:ye(e.type)||"Memo";case he:n=e._payload,e=e._init;try{return ye(e(n))}catch{}}return null}function H(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(n);case 8:return n===oe?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function pe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fe(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Te(e){var n=fe(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),u=""+e[n];if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var p=o.get,m=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return p.call(this)},set:function(b){u=""+b,m.call(this,b)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return u},setValue:function(b){u=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Fe(e){e._valueTracker||(e._valueTracker=Te(e))}function Ze(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var o=n.getValue(),u="";return e&&(u=fe(e)?e.checked?"true":"false":e.value),e=u,e!==o?(n.setValue(e),!0):!1}function Ge(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function De(e,n){var o=n.checked;return S({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function mt(e,n){var o=n.defaultValue==null?"":n.defaultValue,u=n.checked!=null?n.checked:n.defaultChecked;o=pe(n.value!=null?n.value:o),e._wrapperState={initialChecked:u,initialValue:o,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Et(e,n){n=n.checked,n!=null&&w(e,"checked",n,!1)}function _t(e,n){Et(e,n);var o=pe(n.value),u=n.type;if(o!=null)u==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(u==="submit"||u==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?ee(e,n.type,o):n.hasOwnProperty("defaultValue")&&ee(e,n.type,pe(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function W(e,n,o){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var u=n.type;if(!(u!=="submit"&&u!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,o||n===e.value||(e.value=n),e.defaultValue=n}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function ee(e,n,o){(n!=="number"||Ge(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var te=Array.isArray;function ze(e,n,o,u){if(e=e.options,n){n={};for(var p=0;p<o.length;p++)n["$"+o[p]]=!0;for(o=0;o<e.length;o++)p=n.hasOwnProperty("$"+e[o].value),e[o].selected!==p&&(e[o].selected=p),p&&u&&(e[o].defaultSelected=!0)}else{for(o=""+pe(o),n=null,p=0;p<e.length;p++){if(e[p].value===o){e[p].selected=!0,u&&(e[p].defaultSelected=!0);return}n!==null||e[p].disabled||(n=e[p])}n!==null&&(n.selected=!0)}}function Oe(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(r(91));return S({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ne(e,n){var o=n.value;if(o==null){if(o=n.children,n=n.defaultValue,o!=null){if(n!=null)throw Error(r(92));if(te(o)){if(1<o.length)throw Error(r(93));o=o[0]}n=o}n==null&&(n=""),o=n}e._wrapperState={initialValue:pe(o)}}function ke(e,n){var o=pe(n.value),u=pe(n.defaultValue);o!=null&&(o=""+o,o!==e.value&&(e.value=o),n.defaultValue==null&&e.defaultValue!==o&&(e.defaultValue=o)),u!=null&&(e.defaultValue=""+u)}function $e(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function D(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ae(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?D(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ee,Pe=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,o,u,p){MSApp.execUnsafeLocalFunction(function(){return e(n,o,u,p)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Ee=Ee||document.createElement("div"),Ee.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Ee.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Ie(e,n){if(n){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=n;return}}e.textContent=n}var pt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bn=["Webkit","ms","Moz","O"];Object.keys(pt).forEach(function(e){bn.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),pt[n]=pt[e]})});function Ht(e,n,o){return n==null||typeof n=="boolean"||n===""?"":o||typeof n!="number"||n===0||pt.hasOwnProperty(e)&&pt[e]?(""+n).trim():n+"px"}function wn(e,n){e=e.style;for(var o in n)if(n.hasOwnProperty(o)){var u=o.indexOf("--")===0,p=Ht(o,n[o],u);o==="float"&&(o="cssFloat"),u?e.setProperty(o,p):e[o]=p}}var $n=S({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vt(e,n){if(n){if($n[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(r(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(r(61))}if(n.style!=null&&typeof n.style!="object")throw Error(r(62))}}function cn(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";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 Tt=null;function Li(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pi=null,Jn=null,er=null;function Ao(e){if(e=eo(e)){if(typeof Pi!="function")throw Error(r(280));var n=e.stateNode;n&&(n=il(n),Pi(e.stateNode,e.type,n))}}function Lo(e){Jn?er?er.push(e):er=[e]:Jn=e}function Po(){if(Jn){var e=Jn,n=er;if(er=Jn=null,Ao(e),n)for(e=0;e<n.length;e++)Ao(n[e])}}function $(e,n){return e(n)}function ue(){}var ve=!1;function He(e,n,o){if(ve)return e(n,o);ve=!0;try{return $(e,n,o)}finally{ve=!1,(Jn!==null||er!==null)&&(ue(),Po())}}function qe(e,n){var o=e.stateNode;if(o===null)return null;var u=il(o);if(u===null)return null;o=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(o&&typeof o!="function")throw Error(r(231,n,typeof o));return o}var Ke=!1;if(f)try{var et={};Object.defineProperty(et,"passive",{get:function(){Ke=!0}}),window.addEventListener("test",et,et),window.removeEventListener("test",et,et)}catch{Ke=!1}function dt(e,n,o,u,p,m,b,z,R){var B=Array.prototype.slice.call(arguments,3);try{n.apply(o,B)}catch(re){this.onError(re)}}var dn=!1,ot=null,lt=!1,Lt=null,tr={onError:function(e){dn=!0,ot=e}};function Do(e,n,o,u,p,m,b,z,R){dn=!1,ot=null,dt.apply(tr,arguments)}function It(e,n,o,u,p,m,b,z,R){if(Do.apply(this,arguments),dn){if(dn){var B=ot;dn=!1,ot=null}else throw Error(r(198));lt||(lt=!0,Lt=B)}}function Bn(e){var n=e,o=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(o=n.return),e=n.return;while(e)}return n.tag===3?o:null}function No(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function pc(e){if(Bn(e)!==e)throw Error(r(188))}function Mg(e){var n=e.alternate;if(!n){if(n=Bn(e),n===null)throw Error(r(188));return n!==e?null:e}for(var o=e,u=n;;){var p=o.return;if(p===null)break;var m=p.alternate;if(m===null){if(u=p.return,u!==null){o=u;continue}break}if(p.child===m.child){for(m=p.child;m;){if(m===o)return pc(p),e;if(m===u)return pc(p),n;m=m.sibling}throw Error(r(188))}if(o.return!==u.return)o=p,u=m;else{for(var b=!1,z=p.child;z;){if(z===o){b=!0,o=p,u=m;break}if(z===u){b=!0,u=p,o=m;break}z=z.sibling}if(!b){for(z=m.child;z;){if(z===o){b=!0,o=m,u=p;break}if(z===u){b=!0,u=m,o=p;break}z=z.sibling}if(!b)throw Error(r(189))}}if(o.alternate!==u)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?e:n}function hc(e){return e=Mg(e),e!==null?gc(e):null}function gc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=gc(e);if(n!==null)return n;e=e.sibling}return null}var mc=i.unstable_scheduleCallback,xc=i.unstable_cancelCallback,Ag=i.unstable_shouldYield,Lg=i.unstable_requestPaint,ht=i.unstable_now,Pg=i.unstable_getCurrentPriorityLevel,ga=i.unstable_ImmediatePriority,yc=i.unstable_UserBlockingPriority,Fo=i.unstable_NormalPriority,Dg=i.unstable_LowPriority,vc=i.unstable_IdlePriority,Oo=null,Mn=null;function Ng(e){if(Mn&&typeof Mn.onCommitFiberRoot=="function")try{Mn.onCommitFiberRoot(Oo,e,void 0,(e.current.flags&128)===128)}catch{}}var Sn=Math.clz32?Math.clz32:$g,Fg=Math.log,Og=Math.LN2;function $g(e){return e>>>=0,e===0?32:31-(Fg(e)/Og|0)|0}var $o=64,Bo=4194304;function Di(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Wo(e,n){var o=e.pendingLanes;if(o===0)return 0;var u=0,p=e.suspendedLanes,m=e.pingedLanes,b=o&268435455;if(b!==0){var z=b&~p;z!==0?u=Di(z):(m&=b,m!==0&&(u=Di(m)))}else b=o&~p,b!==0?u=Di(b):m!==0&&(u=Di(m));if(u===0)return 0;if(n!==0&&n!==u&&(n&p)===0&&(p=u&-u,m=n&-n,p>=m||p===16&&(m&4194240)!==0))return n;if((u&4)!==0&&(u|=o&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=u;0<n;)o=31-Sn(n),p=1<<o,u|=e[o],n&=~p;return u}function Bg(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wg(e,n){for(var o=e.suspendedLanes,u=e.pingedLanes,p=e.expirationTimes,m=e.pendingLanes;0<m;){var b=31-Sn(m),z=1<<b,R=p[b];R===-1?((z&o)===0||(z&u)!==0)&&(p[b]=Bg(z,n)):R<=n&&(e.expiredLanes|=z),m&=~z}}function ma(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function kc(){var e=$o;return $o<<=1,($o&4194240)===0&&($o=64),e}function xa(e){for(var n=[],o=0;31>o;o++)n.push(e);return n}function Ni(e,n,o){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Sn(n),e[n]=o}function Ug(e,n){var o=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var u=e.eventTimes;for(e=e.expirationTimes;0<o;){var p=31-Sn(o),m=1<<p;n[p]=0,u[p]=-1,e[p]=-1,o&=~m}}function ya(e,n){var o=e.entangledLanes|=n;for(e=e.entanglements;o;){var u=31-Sn(o),p=1<<u;p&n|e[u]&n&&(e[u]|=n),o&=~p}}var Xe=0;function bc(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var wc,va,Sc,jc,Cc,ka=!1,Uo=[],nr=null,rr=null,ir=null,Fi=new Map,Oi=new Map,or=[],Hg="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 submit".split(" ");function zc(e,n){switch(e){case"focusin":case"focusout":nr=null;break;case"dragenter":case"dragleave":rr=null;break;case"mouseover":case"mouseout":ir=null;break;case"pointerover":case"pointerout":Fi.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Oi.delete(n.pointerId)}}function $i(e,n,o,u,p,m){return e===null||e.nativeEvent!==m?(e={blockedOn:n,domEventName:o,eventSystemFlags:u,nativeEvent:m,targetContainers:[p]},n!==null&&(n=eo(n),n!==null&&va(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,p!==null&&n.indexOf(p)===-1&&n.push(p),e)}function Vg(e,n,o,u,p){switch(n){case"focusin":return nr=$i(nr,e,n,o,u,p),!0;case"dragenter":return rr=$i(rr,e,n,o,u,p),!0;case"mouseover":return ir=$i(ir,e,n,o,u,p),!0;case"pointerover":var m=p.pointerId;return Fi.set(m,$i(Fi.get(m)||null,e,n,o,u,p)),!0;case"gotpointercapture":return m=p.pointerId,Oi.set(m,$i(Oi.get(m)||null,e,n,o,u,p)),!0}return!1}function Ec(e){var n=zr(e.target);if(n!==null){var o=Bn(n);if(o!==null){if(n=o.tag,n===13){if(n=No(o),n!==null){e.blockedOn=n,Cc(e.priority,function(){Sc(o)});return}}else if(n===3&&o.stateNode.current.memoizedState.isDehydrated){e.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ho(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var o=wa(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(o===null){o=e.nativeEvent;var u=new o.constructor(o.type,o);Tt=u,o.target.dispatchEvent(u),Tt=null}else return n=eo(o),n!==null&&va(n),e.blockedOn=o,!1;n.shift()}return!0}function _c(e,n,o){Ho(e)&&o.delete(n)}function qg(){ka=!1,nr!==null&&Ho(nr)&&(nr=null),rr!==null&&Ho(rr)&&(rr=null),ir!==null&&Ho(ir)&&(ir=null),Fi.forEach(_c),Oi.forEach(_c)}function Bi(e,n){e.blockedOn===n&&(e.blockedOn=null,ka||(ka=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,qg)))}function Wi(e){function n(p){return Bi(p,e)}if(0<Uo.length){Bi(Uo[0],e);for(var o=1;o<Uo.length;o++){var u=Uo[o];u.blockedOn===e&&(u.blockedOn=null)}}for(nr!==null&&Bi(nr,e),rr!==null&&Bi(rr,e),ir!==null&&Bi(ir,e),Fi.forEach(n),Oi.forEach(n),o=0;o<or.length;o++)u=or[o],u.blockedOn===e&&(u.blockedOn=null);for(;0<or.length&&(o=or[0],o.blockedOn===null);)Ec(o),o.blockedOn===null&&or.shift()}var Vr=T.ReactCurrentBatchConfig,Vo=!0;function Yg(e,n,o,u){var p=Xe,m=Vr.transition;Vr.transition=null;try{Xe=1,ba(e,n,o,u)}finally{Xe=p,Vr.transition=m}}function Kg(e,n,o,u){var p=Xe,m=Vr.transition;Vr.transition=null;try{Xe=4,ba(e,n,o,u)}finally{Xe=p,Vr.transition=m}}function ba(e,n,o,u){if(Vo){var p=wa(e,n,o,u);if(p===null)Oa(e,n,u,qo,o),zc(e,u);else if(Vg(p,e,n,o,u))u.stopPropagation();else if(zc(e,u),n&4&&-1<Hg.indexOf(e)){for(;p!==null;){var m=eo(p);if(m!==null&&wc(m),m=wa(e,n,o,u),m===null&&Oa(e,n,u,qo,o),m===p)break;p=m}p!==null&&u.stopPropagation()}else Oa(e,n,u,null,o)}}var qo=null;function wa(e,n,o,u){if(qo=null,e=Li(u),e=zr(e),e!==null)if(n=Bn(e),n===null)e=null;else if(o=n.tag,o===13){if(e=No(n),e!==null)return e;e=null}else if(o===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return qo=e,null}function Tc(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Pg()){case ga:return 1;case yc:return 4;case Fo:case Dg:return 16;case vc:return 536870912;default:return 16}default:return 16}}var lr=null,Sa=null,Yo=null;function Ic(){if(Yo)return Yo;var e,n=Sa,o=n.length,u,p="value"in lr?lr.value:lr.textContent,m=p.length;for(e=0;e<o&&n[e]===p[e];e++);var b=o-e;for(u=1;u<=b&&n[o-u]===p[m-u];u++);return Yo=p.slice(e,1<u?1-u:void 0)}function Ko(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Qo(){return!0}function Rc(){return!1}function Jt(e){function n(o,u,p,m,b){this._reactName=o,this._targetInst=p,this.type=u,this.nativeEvent=m,this.target=b,this.currentTarget=null;for(var z in e)e.hasOwnProperty(z)&&(o=e[z],this[z]=o?o(m):m[z]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Qo:Rc,this.isPropagationStopped=Rc,this}return S(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Qo)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Qo)},persist:function(){},isPersistent:Qo}),n}var qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ja=Jt(qr),Ui=S({},qr,{view:0,detail:0}),Qg=Jt(Ui),Ca,za,Hi,Go=S({},Ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_a,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!==Hi&&(Hi&&e.type==="mousemove"?(Ca=e.screenX-Hi.screenX,za=e.screenY-Hi.screenY):za=Ca=0,Hi=e),Ca)},movementY:function(e){return"movementY"in e?e.movementY:za}}),Mc=Jt(Go),Gg=S({},Go,{dataTransfer:0}),Xg=Jt(Gg),Zg=S({},Ui,{relatedTarget:0}),Ea=Jt(Zg),Jg=S({},qr,{animationName:0,elapsedTime:0,pseudoElement:0}),em=Jt(Jg),tm=S({},qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),nm=Jt(tm),rm=S({},qr,{data:0}),Ac=Jt(rm),im={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},om={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"},lm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function am(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=lm[e])?!!n[e]:!1}function _a(){return am}var sm=S({},Ui,{key:function(e){if(e.key){var n=im[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ko(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?om[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_a,charCode:function(e){return e.type==="keypress"?Ko(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ko(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),um=Jt(sm),cm=S({},Go,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lc=Jt(cm),dm=S({},Ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_a}),fm=Jt(dm),pm=S({},qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),hm=Jt(pm),gm=S({},Go,{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}),mm=Jt(gm),xm=[9,13,27,32],Ta=f&&"CompositionEvent"in window,Vi=null;f&&"documentMode"in document&&(Vi=document.documentMode);var ym=f&&"TextEvent"in window&&!Vi,Pc=f&&(!Ta||Vi&&8<Vi&&11>=Vi),Dc=" ",Nc=!1;function Fc(e,n){switch(e){case"keyup":return xm.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Oc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yr=!1;function vm(e,n){switch(e){case"compositionend":return Oc(n);case"keypress":return n.which!==32?null:(Nc=!0,Dc);case"textInput":return e=n.data,e===Dc&&Nc?null:e;default:return null}}function km(e,n){if(Yr)return e==="compositionend"||!Ta&&Fc(e,n)?(e=Ic(),Yo=Sa=lr=null,Yr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Pc&&n.locale!=="ko"?null:n.data;default:return null}}var bm={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 $c(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!bm[e.type]:n==="textarea"}function Bc(e,n,o,u){Lo(u),n=tl(n,"onChange"),0<n.length&&(o=new ja("onChange","change",null,o,u),e.push({event:o,listeners:n}))}var qi=null,Yi=null;function wm(e){od(e,0)}function Xo(e){var n=Zr(e);if(Ze(n))return e}function Sm(e,n){if(e==="change")return n}var Wc=!1;if(f){var Ia;if(f){var Ra="oninput"in document;if(!Ra){var Uc=document.createElement("div");Uc.setAttribute("oninput","return;"),Ra=typeof Uc.oninput=="function"}Ia=Ra}else Ia=!1;Wc=Ia&&(!document.documentMode||9<document.documentMode)}function Hc(){qi&&(qi.detachEvent("onpropertychange",Vc),Yi=qi=null)}function Vc(e){if(e.propertyName==="value"&&Xo(Yi)){var n=[];Bc(n,Yi,e,Li(e)),He(wm,n)}}function jm(e,n,o){e==="focusin"?(Hc(),qi=n,Yi=o,qi.attachEvent("onpropertychange",Vc)):e==="focusout"&&Hc()}function Cm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Xo(Yi)}function zm(e,n){if(e==="click")return Xo(n)}function Em(e,n){if(e==="input"||e==="change")return Xo(n)}function _m(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var jn=typeof Object.is=="function"?Object.is:_m;function Ki(e,n){if(jn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var o=Object.keys(e),u=Object.keys(n);if(o.length!==u.length)return!1;for(u=0;u<o.length;u++){var p=o[u];if(!h.call(n,p)||!jn(e[p],n[p]))return!1}return!0}function qc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Yc(e,n){var o=qc(e);e=0;for(var u;o;){if(o.nodeType===3){if(u=e+o.textContent.length,e<=n&&u>=n)return{node:o,offset:n-e};e=u}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=qc(o)}}function Kc(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Kc(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Qc(){for(var e=window,n=Ge();n instanceof e.HTMLIFrameElement;){try{var o=typeof n.contentWindow.location.href=="string"}catch{o=!1}if(o)e=n.contentWindow;else break;n=Ge(e.document)}return n}function Ma(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Tm(e){var n=Qc(),o=e.focusedElem,u=e.selectionRange;if(n!==o&&o&&o.ownerDocument&&Kc(o.ownerDocument.documentElement,o)){if(u!==null&&Ma(o)){if(n=u.start,e=u.end,e===void 0&&(e=n),"selectionStart"in o)o.selectionStart=n,o.selectionEnd=Math.min(e,o.value.length);else if(e=(n=o.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var p=o.textContent.length,m=Math.min(u.start,p);u=u.end===void 0?m:Math.min(u.end,p),!e.extend&&m>u&&(p=u,u=m,m=p),p=Yc(o,m);var b=Yc(o,u);p&&b&&(e.rangeCount!==1||e.anchorNode!==p.node||e.anchorOffset!==p.offset||e.focusNode!==b.node||e.focusOffset!==b.offset)&&(n=n.createRange(),n.setStart(p.node,p.offset),e.removeAllRanges(),m>u?(e.addRange(n),e.extend(b.node,b.offset)):(n.setEnd(b.node,b.offset),e.addRange(n)))}}for(n=[],e=o;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<n.length;o++)e=n[o],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Im=f&&"documentMode"in document&&11>=document.documentMode,Kr=null,Aa=null,Qi=null,La=!1;function Gc(e,n,o){var u=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;La||Kr==null||Kr!==Ge(u)||(u=Kr,"selectionStart"in u&&Ma(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Qi&&Ki(Qi,u)||(Qi=u,u=tl(Aa,"onSelect"),0<u.length&&(n=new ja("onSelect","select",null,n,o),e.push({event:n,listeners:u}),n.target=Kr)))}function Zo(e,n){var o={};return o[e.toLowerCase()]=n.toLowerCase(),o["Webkit"+e]="webkit"+n,o["Moz"+e]="moz"+n,o}var Qr={animationend:Zo("Animation","AnimationEnd"),animationiteration:Zo("Animation","AnimationIteration"),animationstart:Zo("Animation","AnimationStart"),transitionend:Zo("Transition","TransitionEnd")},Pa={},Xc={};f&&(Xc=document.createElement("div").style,"AnimationEvent"in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),"TransitionEvent"in window||delete Qr.transitionend.transition);function Jo(e){if(Pa[e])return Pa[e];if(!Qr[e])return e;var n=Qr[e],o;for(o in n)if(n.hasOwnProperty(o)&&o in Xc)return Pa[e]=n[o];return e}var Zc=Jo("animationend"),Jc=Jo("animationiteration"),ed=Jo("animationstart"),td=Jo("transitionend"),nd=new Map,rd="abort auxClick 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(" ");function ar(e,n){nd.set(e,n),c(n,[e])}for(var Da=0;Da<rd.length;Da++){var Na=rd[Da],Rm=Na.toLowerCase(),Mm=Na[0].toUpperCase()+Na.slice(1);ar(Rm,"on"+Mm)}ar(Zc,"onAnimationEnd"),ar(Jc,"onAnimationIteration"),ar(ed,"onAnimationStart"),ar("dblclick","onDoubleClick"),ar("focusin","onFocus"),ar("focusout","onBlur"),ar(td,"onTransitionEnd"),d("onMouseEnter",["mouseout","mouseover"]),d("onMouseLeave",["mouseout","mouseover"]),d("onPointerEnter",["pointerout","pointerover"]),d("onPointerLeave",["pointerout","pointerover"]),c("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),c("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),c("onBeforeInput",["compositionend","keypress","textInput","paste"]),c("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),c("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gi="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(" "),Am=new Set("cancel close invalid load scroll toggle".split(" ").concat(Gi));function id(e,n,o){var u=e.type||"unknown-event";e.currentTarget=o,It(u,n,void 0,e),e.currentTarget=null}function od(e,n){n=(n&4)!==0;for(var o=0;o<e.length;o++){var u=e[o],p=u.event;u=u.listeners;e:{var m=void 0;if(n)for(var b=u.length-1;0<=b;b--){var z=u[b],R=z.instance,B=z.currentTarget;if(z=z.listener,R!==m&&p.isPropagationStopped())break e;id(p,z,B),m=R}else for(b=0;b<u.length;b++){if(z=u[b],R=z.instance,B=z.currentTarget,z=z.listener,R!==m&&p.isPropagationStopped())break e;id(p,z,B),m=R}}}if(lt)throw e=Lt,lt=!1,Lt=null,e}function rt(e,n){var o=n[Va];o===void 0&&(o=n[Va]=new Set);var u=e+"__bubble";o.has(u)||(ld(n,e,2,!1),o.add(u))}function Fa(e,n,o){var u=0;n&&(u|=4),ld(o,e,u,n)}var el="_reactListening"+Math.random().toString(36).slice(2);function Xi(e){if(!e[el]){e[el]=!0,a.forEach(function(o){o!=="selectionchange"&&(Am.has(o)||Fa(o,!1,e),Fa(o,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[el]||(n[el]=!0,Fa("selectionchange",!1,n))}}function ld(e,n,o,u){switch(Tc(n)){case 1:var p=Yg;break;case 4:p=Kg;break;default:p=ba}o=p.bind(null,n,o,e),p=void 0,!Ke||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(p=!0),u?p!==void 0?e.addEventListener(n,o,{capture:!0,passive:p}):e.addEventListener(n,o,!0):p!==void 0?e.addEventListener(n,o,{passive:p}):e.addEventListener(n,o,!1)}function Oa(e,n,o,u,p){var m=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var b=u.tag;if(b===3||b===4){var z=u.stateNode.containerInfo;if(z===p||z.nodeType===8&&z.parentNode===p)break;if(b===4)for(b=u.return;b!==null;){var R=b.tag;if((R===3||R===4)&&(R=b.stateNode.containerInfo,R===p||R.nodeType===8&&R.parentNode===p))return;b=b.return}for(;z!==null;){if(b=zr(z),b===null)return;if(R=b.tag,R===5||R===6){u=m=b;continue e}z=z.parentNode}}u=u.return}He(function(){var B=m,re=Li(o),ie=[];e:{var ne=nd.get(e);if(ne!==void 0){var be=ja,Se=e;switch(e){case"keypress":if(Ko(o)===0)break e;case"keydown":case"keyup":be=um;break;case"focusin":Se="focus",be=Ea;break;case"focusout":Se="blur",be=Ea;break;case"beforeblur":case"afterblur":be=Ea;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":be=Mc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":be=Xg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":be=fm;break;case Zc:case Jc:case ed:be=em;break;case td:be=hm;break;case"scroll":be=Qg;break;case"wheel":be=mm;break;case"copy":case"cut":case"paste":be=nm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":be=Lc}var Ce=(n&4)!==0,gt=!Ce&&e==="scroll",F=Ce?ne!==null?ne+"Capture":null:ne;Ce=[];for(var L=B,O;L!==null;){O=L;var ce=O.stateNode;if(O.tag===5&&ce!==null&&(O=ce,F!==null&&(ce=qe(L,F),ce!=null&&Ce.push(Zi(L,ce,O)))),gt)break;L=L.return}0<Ce.length&&(ne=new be(ne,Se,null,o,re),ie.push({event:ne,listeners:Ce}))}}if((n&7)===0){e:{if(ne=e==="mouseover"||e==="pointerover",be=e==="mouseout"||e==="pointerout",ne&&o!==Tt&&(Se=o.relatedTarget||o.fromElement)&&(zr(Se)||Se[Wn]))break e;if((be||ne)&&(ne=re.window===re?re:(ne=re.ownerDocument)?ne.defaultView||ne.parentWindow:window,be?(Se=o.relatedTarget||o.toElement,be=B,Se=Se?zr(Se):null,Se!==null&&(gt=Bn(Se),Se!==gt||Se.tag!==5&&Se.tag!==6)&&(Se=null)):(be=null,Se=B),be!==Se)){if(Ce=Mc,ce="onMouseLeave",F="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(Ce=Lc,ce="onPointerLeave",F="onPointerEnter",L="pointer"),gt=be==null?ne:Zr(be),O=Se==null?ne:Zr(Se),ne=new Ce(ce,L+"leave",be,o,re),ne.target=gt,ne.relatedTarget=O,ce=null,zr(re)===B&&(Ce=new Ce(F,L+"enter",Se,o,re),Ce.target=O,Ce.relatedTarget=gt,ce=Ce),gt=ce,be&&Se)t:{for(Ce=be,F=Se,L=0,O=Ce;O;O=Gr(O))L++;for(O=0,ce=F;ce;ce=Gr(ce))O++;for(;0<L-O;)Ce=Gr(Ce),L--;for(;0<O-L;)F=Gr(F),O--;for(;L--;){if(Ce===F||F!==null&&Ce===F.alternate)break t;Ce=Gr(Ce),F=Gr(F)}Ce=null}else Ce=null;be!==null&&ad(ie,ne,be,Ce,!1),Se!==null&&gt!==null&&ad(ie,gt,Se,Ce,!0)}}e:{if(ne=B?Zr(B):window,be=ne.nodeName&&ne.nodeName.toLowerCase(),be==="select"||be==="input"&&ne.type==="file")var _e=Sm;else if($c(ne))if(Wc)_e=Em;else{_e=Cm;var Re=jm}else(be=ne.nodeName)&&be.toLowerCase()==="input"&&(ne.type==="checkbox"||ne.type==="radio")&&(_e=zm);if(_e&&(_e=_e(e,B))){Bc(ie,_e,o,re);break e}Re&&Re(e,ne,B),e==="focusout"&&(Re=ne._wrapperState)&&Re.controlled&&ne.type==="number"&&ee(ne,"number",ne.value)}switch(Re=B?Zr(B):window,e){case"focusin":($c(Re)||Re.contentEditable==="true")&&(Kr=Re,Aa=B,Qi=null);break;case"focusout":Qi=Aa=Kr=null;break;case"mousedown":La=!0;break;case"contextmenu":case"mouseup":case"dragend":La=!1,Gc(ie,o,re);break;case"selectionchange":if(Im)break;case"keydown":case"keyup":Gc(ie,o,re)}var Me;if(Ta)e:{switch(e){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else Yr?Fc(e,o)&&(Le="onCompositionEnd"):e==="keydown"&&o.keyCode===229&&(Le="onCompositionStart");Le&&(Pc&&o.locale!=="ko"&&(Yr||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&Yr&&(Me=Ic()):(lr=re,Sa="value"in lr?lr.value:lr.textContent,Yr=!0)),Re=tl(B,Le),0<Re.length&&(Le=new Ac(Le,e,null,o,re),ie.push({event:Le,listeners:Re}),Me?Le.data=Me:(Me=Oc(o),Me!==null&&(Le.data=Me)))),(Me=ym?vm(e,o):km(e,o))&&(B=tl(B,"onBeforeInput"),0<B.length&&(re=new Ac("onBeforeInput","beforeinput",null,o,re),ie.push({event:re,listeners:B}),re.data=Me))}od(ie,n)})}function Zi(e,n,o){return{instance:e,listener:n,currentTarget:o}}function tl(e,n){for(var o=n+"Capture",u=[];e!==null;){var p=e,m=p.stateNode;p.tag===5&&m!==null&&(p=m,m=qe(e,o),m!=null&&u.unshift(Zi(e,m,p)),m=qe(e,n),m!=null&&u.push(Zi(e,m,p))),e=e.return}return u}function Gr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function ad(e,n,o,u,p){for(var m=n._reactName,b=[];o!==null&&o!==u;){var z=o,R=z.alternate,B=z.stateNode;if(R!==null&&R===u)break;z.tag===5&&B!==null&&(z=B,p?(R=qe(o,m),R!=null&&b.unshift(Zi(o,R,z))):p||(R=qe(o,m),R!=null&&b.push(Zi(o,R,z)))),o=o.return}b.length!==0&&e.push({event:n,listeners:b})}var Lm=/\r\n?/g,Pm=/\u0000|\uFFFD/g;function sd(e){return(typeof e=="string"?e:""+e).replace(Lm,`
38
+ `).replace(Pm,"")}function nl(e,n,o){if(n=sd(n),sd(e)!==n&&o)throw Error(r(425))}function rl(){}var $a=null,Ba=null;function Wa(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Ua=typeof setTimeout=="function"?setTimeout:void 0,Dm=typeof clearTimeout=="function"?clearTimeout:void 0,ud=typeof Promise=="function"?Promise:void 0,Nm=typeof queueMicrotask=="function"?queueMicrotask:typeof ud<"u"?function(e){return ud.resolve(null).then(e).catch(Fm)}:Ua;function Fm(e){setTimeout(function(){throw e})}function Ha(e,n){var o=n,u=0;do{var p=o.nextSibling;if(e.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"){if(u===0){e.removeChild(p),Wi(n);return}u--}else o!=="$"&&o!=="$?"&&o!=="$!"||u++;o=p}while(o);Wi(n)}function sr(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function cd(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="$"||o==="$!"||o==="$?"){if(n===0)return e;n--}else o==="/$"&&n++}e=e.previousSibling}return null}var Xr=Math.random().toString(36).slice(2),An="__reactFiber$"+Xr,Ji="__reactProps$"+Xr,Wn="__reactContainer$"+Xr,Va="__reactEvents$"+Xr,Om="__reactListeners$"+Xr,$m="__reactHandles$"+Xr;function zr(e){var n=e[An];if(n)return n;for(var o=e.parentNode;o;){if(n=o[Wn]||o[An]){if(o=n.alternate,n.child!==null||o!==null&&o.child!==null)for(e=cd(e);e!==null;){if(o=e[An])return o;e=cd(e)}return n}e=o,o=e.parentNode}return null}function eo(e){return e=e[An]||e[Wn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Zr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function il(e){return e[Ji]||null}var qa=[],Jr=-1;function ur(e){return{current:e}}function it(e){0>Jr||(e.current=qa[Jr],qa[Jr]=null,Jr--)}function tt(e,n){Jr++,qa[Jr]=e.current,e.current=n}var cr={},Pt=ur(cr),Vt=ur(!1),Er=cr;function ei(e,n){var o=e.type.contextTypes;if(!o)return cr;var u=e.stateNode;if(u&&u.__reactInternalMemoizedUnmaskedChildContext===n)return u.__reactInternalMemoizedMaskedChildContext;var p={},m;for(m in o)p[m]=n[m];return u&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=p),p}function qt(e){return e=e.childContextTypes,e!=null}function ol(){it(Vt),it(Pt)}function dd(e,n,o){if(Pt.current!==cr)throw Error(r(168));tt(Pt,n),tt(Vt,o)}function fd(e,n,o){var u=e.stateNode;if(n=n.childContextTypes,typeof u.getChildContext!="function")return o;u=u.getChildContext();for(var p in u)if(!(p in n))throw Error(r(108,H(e)||"Unknown",p));return S({},o,u)}function ll(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cr,Er=Pt.current,tt(Pt,e),tt(Vt,Vt.current),!0}function pd(e,n,o){var u=e.stateNode;if(!u)throw Error(r(169));o?(e=fd(e,n,Er),u.__reactInternalMemoizedMergedChildContext=e,it(Vt),it(Pt),tt(Pt,e)):it(Vt),tt(Vt,o)}var Un=null,al=!1,Ya=!1;function hd(e){Un===null?Un=[e]:Un.push(e)}function Bm(e){al=!0,hd(e)}function dr(){if(!Ya&&Un!==null){Ya=!0;var e=0,n=Xe;try{var o=Un;for(Xe=1;e<o.length;e++){var u=o[e];do u=u(!0);while(u!==null)}Un=null,al=!1}catch(p){throw Un!==null&&(Un=Un.slice(e+1)),mc(ga,dr),p}finally{Xe=n,Ya=!1}}return null}var ti=[],ni=0,sl=null,ul=0,fn=[],pn=0,_r=null,Hn=1,Vn="";function Tr(e,n){ti[ni++]=ul,ti[ni++]=sl,sl=e,ul=n}function gd(e,n,o){fn[pn++]=Hn,fn[pn++]=Vn,fn[pn++]=_r,_r=e;var u=Hn;e=Vn;var p=32-Sn(u)-1;u&=~(1<<p),o+=1;var m=32-Sn(n)+p;if(30<m){var b=p-p%5;m=(u&(1<<b)-1).toString(32),u>>=b,p-=b,Hn=1<<32-Sn(n)+p|o<<p|u,Vn=m+e}else Hn=1<<m|o<<p|u,Vn=e}function Ka(e){e.return!==null&&(Tr(e,1),gd(e,1,0))}function Qa(e){for(;e===sl;)sl=ti[--ni],ti[ni]=null,ul=ti[--ni],ti[ni]=null;for(;e===_r;)_r=fn[--pn],fn[pn]=null,Vn=fn[--pn],fn[pn]=null,Hn=fn[--pn],fn[pn]=null}var en=null,tn=null,at=!1,Cn=null;function md(e,n){var o=xn(5,null,null,0);o.elementType="DELETED",o.stateNode=n,o.return=e,n=e.deletions,n===null?(e.deletions=[o],e.flags|=16):n.push(o)}function xd(e,n){switch(e.tag){case 5:var o=e.type;return n=n.nodeType!==1||o.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,en=e,tn=sr(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,en=e,tn=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(o=_r!==null?{id:Hn,overflow:Vn}:null,e.memoizedState={dehydrated:n,treeContext:o,retryLane:1073741824},o=xn(18,null,null,0),o.stateNode=n,o.return=e,e.child=o,en=e,tn=null,!0):!1;default:return!1}}function Ga(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xa(e){if(at){var n=tn;if(n){var o=n;if(!xd(e,n)){if(Ga(e))throw Error(r(418));n=sr(o.nextSibling);var u=en;n&&xd(e,n)?md(u,o):(e.flags=e.flags&-4097|2,at=!1,en=e)}}else{if(Ga(e))throw Error(r(418));e.flags=e.flags&-4097|2,at=!1,en=e}}}function yd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;en=e}function cl(e){if(e!==en)return!1;if(!at)return yd(e),at=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!Wa(e.type,e.memoizedProps)),n&&(n=tn)){if(Ga(e))throw vd(),Error(r(418));for(;n;)md(e,n),n=sr(n.nextSibling)}if(yd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var o=e.data;if(o==="/$"){if(n===0){tn=sr(e.nextSibling);break e}n--}else o!=="$"&&o!=="$!"&&o!=="$?"||n++}e=e.nextSibling}tn=null}}else tn=en?sr(e.stateNode.nextSibling):null;return!0}function vd(){for(var e=tn;e;)e=sr(e.nextSibling)}function ri(){tn=en=null,at=!1}function Za(e){Cn===null?Cn=[e]:Cn.push(e)}var Wm=T.ReactCurrentBatchConfig;function to(e,n,o){if(e=o.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(o._owner){if(o=o._owner,o){if(o.tag!==1)throw Error(r(309));var u=o.stateNode}if(!u)throw Error(r(147,e));var p=u,m=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===m?n.ref:(n=function(b){var z=p.refs;b===null?delete z[m]:z[m]=b},n._stringRef=m,n)}if(typeof e!="string")throw Error(r(284));if(!o._owner)throw Error(r(290,e))}return e}function dl(e,n){throw e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function kd(e){var n=e._init;return n(e._payload)}function bd(e){function n(F,L){if(e){var O=F.deletions;O===null?(F.deletions=[L],F.flags|=16):O.push(L)}}function o(F,L){if(!e)return null;for(;L!==null;)n(F,L),L=L.sibling;return null}function u(F,L){for(F=new Map;L!==null;)L.key!==null?F.set(L.key,L):F.set(L.index,L),L=L.sibling;return F}function p(F,L){return F=vr(F,L),F.index=0,F.sibling=null,F}function m(F,L,O){return F.index=O,e?(O=F.alternate,O!==null?(O=O.index,O<L?(F.flags|=2,L):O):(F.flags|=2,L)):(F.flags|=1048576,L)}function b(F){return e&&F.alternate===null&&(F.flags|=2),F}function z(F,L,O,ce){return L===null||L.tag!==6?(L=Us(O,F.mode,ce),L.return=F,L):(L=p(L,O),L.return=F,L)}function R(F,L,O,ce){var _e=O.type;return _e===X?re(F,L,O.props.children,ce,O.key):L!==null&&(L.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===he&&kd(_e)===L.type)?(ce=p(L,O.props),ce.ref=to(F,L,O),ce.return=F,ce):(ce=Pl(O.type,O.key,O.props,null,F.mode,ce),ce.ref=to(F,L,O),ce.return=F,ce)}function B(F,L,O,ce){return L===null||L.tag!==4||L.stateNode.containerInfo!==O.containerInfo||L.stateNode.implementation!==O.implementation?(L=Hs(O,F.mode,ce),L.return=F,L):(L=p(L,O.children||[]),L.return=F,L)}function re(F,L,O,ce,_e){return L===null||L.tag!==7?(L=Nr(O,F.mode,ce,_e),L.return=F,L):(L=p(L,O),L.return=F,L)}function ie(F,L,O){if(typeof L=="string"&&L!==""||typeof L=="number")return L=Us(""+L,F.mode,O),L.return=F,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case q:return O=Pl(L.type,L.key,L.props,null,F.mode,O),O.ref=to(F,null,L),O.return=F,O;case P:return L=Hs(L,F.mode,O),L.return=F,L;case he:var ce=L._init;return ie(F,ce(L._payload),O)}if(te(L)||G(L))return L=Nr(L,F.mode,O,null),L.return=F,L;dl(F,L)}return null}function ne(F,L,O,ce){var _e=L!==null?L.key:null;if(typeof O=="string"&&O!==""||typeof O=="number")return _e!==null?null:z(F,L,""+O,ce);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case q:return O.key===_e?R(F,L,O,ce):null;case P:return O.key===_e?B(F,L,O,ce):null;case he:return _e=O._init,ne(F,L,_e(O._payload),ce)}if(te(O)||G(O))return _e!==null?null:re(F,L,O,ce,null);dl(F,O)}return null}function be(F,L,O,ce,_e){if(typeof ce=="string"&&ce!==""||typeof ce=="number")return F=F.get(O)||null,z(L,F,""+ce,_e);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case q:return F=F.get(ce.key===null?O:ce.key)||null,R(L,F,ce,_e);case P:return F=F.get(ce.key===null?O:ce.key)||null,B(L,F,ce,_e);case he:var Re=ce._init;return be(F,L,O,Re(ce._payload),_e)}if(te(ce)||G(ce))return F=F.get(O)||null,re(L,F,ce,_e,null);dl(L,ce)}return null}function Se(F,L,O,ce){for(var _e=null,Re=null,Me=L,Le=L=0,Ct=null;Me!==null&&Le<O.length;Le++){Me.index>Le?(Ct=Me,Me=null):Ct=Me.sibling;var Qe=ne(F,Me,O[Le],ce);if(Qe===null){Me===null&&(Me=Ct);break}e&&Me&&Qe.alternate===null&&n(F,Me),L=m(Qe,L,Le),Re===null?_e=Qe:Re.sibling=Qe,Re=Qe,Me=Ct}if(Le===O.length)return o(F,Me),at&&Tr(F,Le),_e;if(Me===null){for(;Le<O.length;Le++)Me=ie(F,O[Le],ce),Me!==null&&(L=m(Me,L,Le),Re===null?_e=Me:Re.sibling=Me,Re=Me);return at&&Tr(F,Le),_e}for(Me=u(F,Me);Le<O.length;Le++)Ct=be(Me,F,Le,O[Le],ce),Ct!==null&&(e&&Ct.alternate!==null&&Me.delete(Ct.key===null?Le:Ct.key),L=m(Ct,L,Le),Re===null?_e=Ct:Re.sibling=Ct,Re=Ct);return e&&Me.forEach(function(kr){return n(F,kr)}),at&&Tr(F,Le),_e}function Ce(F,L,O,ce){var _e=G(O);if(typeof _e!="function")throw Error(r(150));if(O=_e.call(O),O==null)throw Error(r(151));for(var Re=_e=null,Me=L,Le=L=0,Ct=null,Qe=O.next();Me!==null&&!Qe.done;Le++,Qe=O.next()){Me.index>Le?(Ct=Me,Me=null):Ct=Me.sibling;var kr=ne(F,Me,Qe.value,ce);if(kr===null){Me===null&&(Me=Ct);break}e&&Me&&kr.alternate===null&&n(F,Me),L=m(kr,L,Le),Re===null?_e=kr:Re.sibling=kr,Re=kr,Me=Ct}if(Qe.done)return o(F,Me),at&&Tr(F,Le),_e;if(Me===null){for(;!Qe.done;Le++,Qe=O.next())Qe=ie(F,Qe.value,ce),Qe!==null&&(L=m(Qe,L,Le),Re===null?_e=Qe:Re.sibling=Qe,Re=Qe);return at&&Tr(F,Le),_e}for(Me=u(F,Me);!Qe.done;Le++,Qe=O.next())Qe=be(Me,F,Le,Qe.value,ce),Qe!==null&&(e&&Qe.alternate!==null&&Me.delete(Qe.key===null?Le:Qe.key),L=m(Qe,L,Le),Re===null?_e=Qe:Re.sibling=Qe,Re=Qe);return e&&Me.forEach(function(bx){return n(F,bx)}),at&&Tr(F,Le),_e}function gt(F,L,O,ce){if(typeof O=="object"&&O!==null&&O.type===X&&O.key===null&&(O=O.props.children),typeof O=="object"&&O!==null){switch(O.$$typeof){case q:e:{for(var _e=O.key,Re=L;Re!==null;){if(Re.key===_e){if(_e=O.type,_e===X){if(Re.tag===7){o(F,Re.sibling),L=p(Re,O.props.children),L.return=F,F=L;break e}}else if(Re.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===he&&kd(_e)===Re.type){o(F,Re.sibling),L=p(Re,O.props),L.ref=to(F,Re,O),L.return=F,F=L;break e}o(F,Re);break}else n(F,Re);Re=Re.sibling}O.type===X?(L=Nr(O.props.children,F.mode,ce,O.key),L.return=F,F=L):(ce=Pl(O.type,O.key,O.props,null,F.mode,ce),ce.ref=to(F,L,O),ce.return=F,F=ce)}return b(F);case P:e:{for(Re=O.key;L!==null;){if(L.key===Re)if(L.tag===4&&L.stateNode.containerInfo===O.containerInfo&&L.stateNode.implementation===O.implementation){o(F,L.sibling),L=p(L,O.children||[]),L.return=F,F=L;break e}else{o(F,L);break}else n(F,L);L=L.sibling}L=Hs(O,F.mode,ce),L.return=F,F=L}return b(F);case he:return Re=O._init,gt(F,L,Re(O._payload),ce)}if(te(O))return Se(F,L,O,ce);if(G(O))return Ce(F,L,O,ce);dl(F,O)}return typeof O=="string"&&O!==""||typeof O=="number"?(O=""+O,L!==null&&L.tag===6?(o(F,L.sibling),L=p(L,O),L.return=F,F=L):(o(F,L),L=Us(O,F.mode,ce),L.return=F,F=L),b(F)):o(F,L)}return gt}var ii=bd(!0),wd=bd(!1),fl=ur(null),pl=null,oi=null,Ja=null;function es(){Ja=oi=pl=null}function ts(e){var n=fl.current;it(fl),e._currentValue=n}function ns(e,n,o){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===o)break;e=e.return}}function li(e,n){pl=e,Ja=oi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(Yt=!0),e.firstContext=null)}function hn(e){var n=e._currentValue;if(Ja!==e)if(e={context:e,memoizedValue:n,next:null},oi===null){if(pl===null)throw Error(r(308));oi=e,pl.dependencies={lanes:0,firstContext:e}}else oi=oi.next=e;return n}var Ir=null;function rs(e){Ir===null?Ir=[e]:Ir.push(e)}function Sd(e,n,o,u){var p=n.interleaved;return p===null?(o.next=o,rs(n)):(o.next=p.next,p.next=o),n.interleaved=o,qn(e,u)}function qn(e,n){e.lanes|=n;var o=e.alternate;for(o!==null&&(o.lanes|=n),o=e,e=e.return;e!==null;)e.childLanes|=n,o=e.alternate,o!==null&&(o.childLanes|=n),o=e,e=e.return;return o.tag===3?o.stateNode:null}var fr=!1;function is(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jd(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Yn(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function pr(e,n,o){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(Ye&2)!==0){var p=u.pending;return p===null?n.next=n:(n.next=p.next,p.next=n),u.pending=n,qn(e,o)}return p=u.interleaved,p===null?(n.next=n,rs(u)):(n.next=p.next,p.next=n),u.interleaved=n,qn(e,o)}function hl(e,n,o){if(n=n.updateQueue,n!==null&&(n=n.shared,(o&4194240)!==0)){var u=n.lanes;u&=e.pendingLanes,o|=u,n.lanes=o,ya(e,o)}}function Cd(e,n){var o=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,o===u)){var p=null,m=null;if(o=o.firstBaseUpdate,o!==null){do{var b={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};m===null?p=m=b:m=m.next=b,o=o.next}while(o!==null);m===null?p=m=n:m=m.next=n}else p=m=n;o={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:m,shared:u.shared,effects:u.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=n:e.next=n,o.lastBaseUpdate=n}function gl(e,n,o,u){var p=e.updateQueue;fr=!1;var m=p.firstBaseUpdate,b=p.lastBaseUpdate,z=p.shared.pending;if(z!==null){p.shared.pending=null;var R=z,B=R.next;R.next=null,b===null?m=B:b.next=B,b=R;var re=e.alternate;re!==null&&(re=re.updateQueue,z=re.lastBaseUpdate,z!==b&&(z===null?re.firstBaseUpdate=B:z.next=B,re.lastBaseUpdate=R))}if(m!==null){var ie=p.baseState;b=0,re=B=R=null,z=m;do{var ne=z.lane,be=z.eventTime;if((u&ne)===ne){re!==null&&(re=re.next={eventTime:be,lane:0,tag:z.tag,payload:z.payload,callback:z.callback,next:null});e:{var Se=e,Ce=z;switch(ne=n,be=o,Ce.tag){case 1:if(Se=Ce.payload,typeof Se=="function"){ie=Se.call(be,ie,ne);break e}ie=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ce.payload,ne=typeof Se=="function"?Se.call(be,ie,ne):Se,ne==null)break e;ie=S({},ie,ne);break e;case 2:fr=!0}}z.callback!==null&&z.lane!==0&&(e.flags|=64,ne=p.effects,ne===null?p.effects=[z]:ne.push(z))}else be={eventTime:be,lane:ne,tag:z.tag,payload:z.payload,callback:z.callback,next:null},re===null?(B=re=be,R=ie):re=re.next=be,b|=ne;if(z=z.next,z===null){if(z=p.shared.pending,z===null)break;ne=z,z=ne.next,ne.next=null,p.lastBaseUpdate=ne,p.shared.pending=null}}while(!0);if(re===null&&(R=ie),p.baseState=R,p.firstBaseUpdate=B,p.lastBaseUpdate=re,n=p.shared.interleaved,n!==null){p=n;do b|=p.lane,p=p.next;while(p!==n)}else m===null&&(p.shared.lanes=0);Ar|=b,e.lanes=b,e.memoizedState=ie}}function zd(e,n,o){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var u=e[n],p=u.callback;if(p!==null){if(u.callback=null,u=o,typeof p!="function")throw Error(r(191,p));p.call(u)}}}var no={},Ln=ur(no),ro=ur(no),io=ur(no);function Rr(e){if(e===no)throw Error(r(174));return e}function os(e,n){switch(tt(io,n),tt(ro,e),tt(Ln,no),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:ae(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=ae(n,e)}it(Ln),tt(Ln,n)}function ai(){it(Ln),it(ro),it(io)}function Ed(e){Rr(io.current);var n=Rr(Ln.current),o=ae(n,e.type);n!==o&&(tt(ro,e),tt(Ln,o))}function ls(e){ro.current===e&&(it(Ln),it(ro))}var ut=ur(0);function ml(e){for(var n=e;n!==null;){if(n.tag===13){var o=n.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||o.data==="$?"||o.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var as=[];function ss(){for(var e=0;e<as.length;e++)as[e]._workInProgressVersionPrimary=null;as.length=0}var xl=T.ReactCurrentDispatcher,us=T.ReactCurrentBatchConfig,Mr=0,ct=null,kt=null,St=null,yl=!1,oo=!1,lo=0,Um=0;function Dt(){throw Error(r(321))}function cs(e,n){if(n===null)return!1;for(var o=0;o<n.length&&o<e.length;o++)if(!jn(e[o],n[o]))return!1;return!0}function ds(e,n,o,u,p,m){if(Mr=m,ct=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,xl.current=e===null||e.memoizedState===null?Ym:Km,e=o(u,p),oo){m=0;do{if(oo=!1,lo=0,25<=m)throw Error(r(301));m+=1,St=kt=null,n.updateQueue=null,xl.current=Qm,e=o(u,p)}while(oo)}if(xl.current=bl,n=kt!==null&&kt.next!==null,Mr=0,St=kt=ct=null,yl=!1,n)throw Error(r(300));return e}function fs(){var e=lo!==0;return lo=0,e}function Pn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?ct.memoizedState=St=e:St=St.next=e,St}function gn(){if(kt===null){var e=ct.alternate;e=e!==null?e.memoizedState:null}else e=kt.next;var n=St===null?ct.memoizedState:St.next;if(n!==null)St=n,kt=e;else{if(e===null)throw Error(r(310));kt=e,e={memoizedState:kt.memoizedState,baseState:kt.baseState,baseQueue:kt.baseQueue,queue:kt.queue,next:null},St===null?ct.memoizedState=St=e:St=St.next=e}return St}function ao(e,n){return typeof n=="function"?n(e):n}function ps(e){var n=gn(),o=n.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=e;var u=kt,p=u.baseQueue,m=o.pending;if(m!==null){if(p!==null){var b=p.next;p.next=m.next,m.next=b}u.baseQueue=p=m,o.pending=null}if(p!==null){m=p.next,u=u.baseState;var z=b=null,R=null,B=m;do{var re=B.lane;if((Mr&re)===re)R!==null&&(R=R.next={lane:0,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),u=B.hasEagerState?B.eagerState:e(u,B.action);else{var ie={lane:re,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null};R===null?(z=R=ie,b=u):R=R.next=ie,ct.lanes|=re,Ar|=re}B=B.next}while(B!==null&&B!==m);R===null?b=u:R.next=z,jn(u,n.memoizedState)||(Yt=!0),n.memoizedState=u,n.baseState=b,n.baseQueue=R,o.lastRenderedState=u}if(e=o.interleaved,e!==null){p=e;do m=p.lane,ct.lanes|=m,Ar|=m,p=p.next;while(p!==e)}else p===null&&(o.lanes=0);return[n.memoizedState,o.dispatch]}function hs(e){var n=gn(),o=n.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=e;var u=o.dispatch,p=o.pending,m=n.memoizedState;if(p!==null){o.pending=null;var b=p=p.next;do m=e(m,b.action),b=b.next;while(b!==p);jn(m,n.memoizedState)||(Yt=!0),n.memoizedState=m,n.baseQueue===null&&(n.baseState=m),o.lastRenderedState=m}return[m,u]}function _d(){}function Td(e,n){var o=ct,u=gn(),p=n(),m=!jn(u.memoizedState,p);if(m&&(u.memoizedState=p,Yt=!0),u=u.queue,gs(Md.bind(null,o,u,e),[e]),u.getSnapshot!==n||m||St!==null&&St.memoizedState.tag&1){if(o.flags|=2048,so(9,Rd.bind(null,o,u,p,n),void 0,null),jt===null)throw Error(r(349));(Mr&30)!==0||Id(o,n,p)}return p}function Id(e,n,o){e.flags|=16384,e={getSnapshot:n,value:o},n=ct.updateQueue,n===null?(n={lastEffect:null,stores:null},ct.updateQueue=n,n.stores=[e]):(o=n.stores,o===null?n.stores=[e]:o.push(e))}function Rd(e,n,o,u){n.value=o,n.getSnapshot=u,Ad(n)&&Ld(e)}function Md(e,n,o){return o(function(){Ad(n)&&Ld(e)})}function Ad(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!jn(e,o)}catch{return!0}}function Ld(e){var n=qn(e,1);n!==null&&Tn(n,e,1,-1)}function Pd(e){var n=Pn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ao,lastRenderedState:e},n.queue=e,e=e.dispatch=qm.bind(null,ct,e),[n.memoizedState,e]}function so(e,n,o,u){return e={tag:e,create:n,destroy:o,deps:u,next:null},n=ct.updateQueue,n===null?(n={lastEffect:null,stores:null},ct.updateQueue=n,n.lastEffect=e.next=e):(o=n.lastEffect,o===null?n.lastEffect=e.next=e:(u=o.next,o.next=e,e.next=u,n.lastEffect=e)),e}function Dd(){return gn().memoizedState}function vl(e,n,o,u){var p=Pn();ct.flags|=e,p.memoizedState=so(1|n,o,void 0,u===void 0?null:u)}function kl(e,n,o,u){var p=gn();u=u===void 0?null:u;var m=void 0;if(kt!==null){var b=kt.memoizedState;if(m=b.destroy,u!==null&&cs(u,b.deps)){p.memoizedState=so(n,o,m,u);return}}ct.flags|=e,p.memoizedState=so(1|n,o,m,u)}function Nd(e,n){return vl(8390656,8,e,n)}function gs(e,n){return kl(2048,8,e,n)}function Fd(e,n){return kl(4,2,e,n)}function Od(e,n){return kl(4,4,e,n)}function $d(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Bd(e,n,o){return o=o!=null?o.concat([e]):null,kl(4,4,$d.bind(null,n,e),o)}function ms(){}function Wd(e,n){var o=gn();n=n===void 0?null:n;var u=o.memoizedState;return u!==null&&n!==null&&cs(n,u[1])?u[0]:(o.memoizedState=[e,n],e)}function Ud(e,n){var o=gn();n=n===void 0?null:n;var u=o.memoizedState;return u!==null&&n!==null&&cs(n,u[1])?u[0]:(e=e(),o.memoizedState=[e,n],e)}function Hd(e,n,o){return(Mr&21)===0?(e.baseState&&(e.baseState=!1,Yt=!0),e.memoizedState=o):(jn(o,n)||(o=kc(),ct.lanes|=o,Ar|=o,e.baseState=!0),n)}function Hm(e,n){var o=Xe;Xe=o!==0&&4>o?o:4,e(!0);var u=us.transition;us.transition={};try{e(!1),n()}finally{Xe=o,us.transition=u}}function Vd(){return gn().memoizedState}function Vm(e,n,o){var u=xr(e);if(o={lane:u,action:o,hasEagerState:!1,eagerState:null,next:null},qd(e))Yd(n,o);else if(o=Sd(e,n,o,u),o!==null){var p=Wt();Tn(o,e,u,p),Kd(o,n,u)}}function qm(e,n,o){var u=xr(e),p={lane:u,action:o,hasEagerState:!1,eagerState:null,next:null};if(qd(e))Yd(n,p);else{var m=e.alternate;if(e.lanes===0&&(m===null||m.lanes===0)&&(m=n.lastRenderedReducer,m!==null))try{var b=n.lastRenderedState,z=m(b,o);if(p.hasEagerState=!0,p.eagerState=z,jn(z,b)){var R=n.interleaved;R===null?(p.next=p,rs(n)):(p.next=R.next,R.next=p),n.interleaved=p;return}}catch{}finally{}o=Sd(e,n,p,u),o!==null&&(p=Wt(),Tn(o,e,u,p),Kd(o,n,u))}}function qd(e){var n=e.alternate;return e===ct||n!==null&&n===ct}function Yd(e,n){oo=yl=!0;var o=e.pending;o===null?n.next=n:(n.next=o.next,o.next=n),e.pending=n}function Kd(e,n,o){if((o&4194240)!==0){var u=n.lanes;u&=e.pendingLanes,o|=u,n.lanes=o,ya(e,o)}}var bl={readContext:hn,useCallback:Dt,useContext:Dt,useEffect:Dt,useImperativeHandle:Dt,useInsertionEffect:Dt,useLayoutEffect:Dt,useMemo:Dt,useReducer:Dt,useRef:Dt,useState:Dt,useDebugValue:Dt,useDeferredValue:Dt,useTransition:Dt,useMutableSource:Dt,useSyncExternalStore:Dt,useId:Dt,unstable_isNewReconciler:!1},Ym={readContext:hn,useCallback:function(e,n){return Pn().memoizedState=[e,n===void 0?null:n],e},useContext:hn,useEffect:Nd,useImperativeHandle:function(e,n,o){return o=o!=null?o.concat([e]):null,vl(4194308,4,$d.bind(null,n,e),o)},useLayoutEffect:function(e,n){return vl(4194308,4,e,n)},useInsertionEffect:function(e,n){return vl(4,2,e,n)},useMemo:function(e,n){var o=Pn();return n=n===void 0?null:n,e=e(),o.memoizedState=[e,n],e},useReducer:function(e,n,o){var u=Pn();return n=o!==void 0?o(n):n,u.memoizedState=u.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},u.queue=e,e=e.dispatch=Vm.bind(null,ct,e),[u.memoizedState,e]},useRef:function(e){var n=Pn();return e={current:e},n.memoizedState=e},useState:Pd,useDebugValue:ms,useDeferredValue:function(e){return Pn().memoizedState=e},useTransition:function(){var e=Pd(!1),n=e[0];return e=Hm.bind(null,e[1]),Pn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,o){var u=ct,p=Pn();if(at){if(o===void 0)throw Error(r(407));o=o()}else{if(o=n(),jt===null)throw Error(r(349));(Mr&30)!==0||Id(u,n,o)}p.memoizedState=o;var m={value:o,getSnapshot:n};return p.queue=m,Nd(Md.bind(null,u,m,e),[e]),u.flags|=2048,so(9,Rd.bind(null,u,m,o,n),void 0,null),o},useId:function(){var e=Pn(),n=jt.identifierPrefix;if(at){var o=Vn,u=Hn;o=(u&~(1<<32-Sn(u)-1)).toString(32)+o,n=":"+n+"R"+o,o=lo++,0<o&&(n+="H"+o.toString(32)),n+=":"}else o=Um++,n=":"+n+"r"+o.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},Km={readContext:hn,useCallback:Wd,useContext:hn,useEffect:gs,useImperativeHandle:Bd,useInsertionEffect:Fd,useLayoutEffect:Od,useMemo:Ud,useReducer:ps,useRef:Dd,useState:function(){return ps(ao)},useDebugValue:ms,useDeferredValue:function(e){var n=gn();return Hd(n,kt.memoizedState,e)},useTransition:function(){var e=ps(ao)[0],n=gn().memoizedState;return[e,n]},useMutableSource:_d,useSyncExternalStore:Td,useId:Vd,unstable_isNewReconciler:!1},Qm={readContext:hn,useCallback:Wd,useContext:hn,useEffect:gs,useImperativeHandle:Bd,useInsertionEffect:Fd,useLayoutEffect:Od,useMemo:Ud,useReducer:hs,useRef:Dd,useState:function(){return hs(ao)},useDebugValue:ms,useDeferredValue:function(e){var n=gn();return kt===null?n.memoizedState=e:Hd(n,kt.memoizedState,e)},useTransition:function(){var e=hs(ao)[0],n=gn().memoizedState;return[e,n]},useMutableSource:_d,useSyncExternalStore:Td,useId:Vd,unstable_isNewReconciler:!1};function zn(e,n){if(e&&e.defaultProps){n=S({},n),e=e.defaultProps;for(var o in e)n[o]===void 0&&(n[o]=e[o]);return n}return n}function xs(e,n,o,u){n=e.memoizedState,o=o(u,n),o=o==null?n:S({},n,o),e.memoizedState=o,e.lanes===0&&(e.updateQueue.baseState=o)}var wl={isMounted:function(e){return(e=e._reactInternals)?Bn(e)===e:!1},enqueueSetState:function(e,n,o){e=e._reactInternals;var u=Wt(),p=xr(e),m=Yn(u,p);m.payload=n,o!=null&&(m.callback=o),n=pr(e,m,p),n!==null&&(Tn(n,e,p,u),hl(n,e,p))},enqueueReplaceState:function(e,n,o){e=e._reactInternals;var u=Wt(),p=xr(e),m=Yn(u,p);m.tag=1,m.payload=n,o!=null&&(m.callback=o),n=pr(e,m,p),n!==null&&(Tn(n,e,p,u),hl(n,e,p))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var o=Wt(),u=xr(e),p=Yn(o,u);p.tag=2,n!=null&&(p.callback=n),n=pr(e,p,u),n!==null&&(Tn(n,e,u,o),hl(n,e,u))}};function Qd(e,n,o,u,p,m,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,m,b):n.prototype&&n.prototype.isPureReactComponent?!Ki(o,u)||!Ki(p,m):!0}function Gd(e,n,o){var u=!1,p=cr,m=n.contextType;return typeof m=="object"&&m!==null?m=hn(m):(p=qt(n)?Er:Pt.current,u=n.contextTypes,m=(u=u!=null)?ei(e,p):cr),n=new n(o,m),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=wl,e.stateNode=n,n._reactInternals=e,u&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=p,e.__reactInternalMemoizedMaskedChildContext=m),n}function Xd(e,n,o,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(o,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(o,u),n.state!==e&&wl.enqueueReplaceState(n,n.state,null)}function ys(e,n,o,u){var p=e.stateNode;p.props=o,p.state=e.memoizedState,p.refs={},is(e);var m=n.contextType;typeof m=="object"&&m!==null?p.context=hn(m):(m=qt(n)?Er:Pt.current,p.context=ei(e,m)),p.state=e.memoizedState,m=n.getDerivedStateFromProps,typeof m=="function"&&(xs(e,n,m,o),p.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(n=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),n!==p.state&&wl.enqueueReplaceState(p,p.state,null),gl(e,o,p,u),p.state=e.memoizedState),typeof p.componentDidMount=="function"&&(e.flags|=4194308)}function si(e,n){try{var o="",u=n;do o+=je(u),u=u.return;while(u);var p=o}catch(m){p=`
39
+ Error generating stack: `+m.message+`
40
+ `+m.stack}return{value:e,source:n,stack:p,digest:null}}function vs(e,n,o){return{value:e,source:null,stack:o??null,digest:n??null}}function ks(e,n){try{console.error(n.value)}catch(o){setTimeout(function(){throw o})}}var Gm=typeof WeakMap=="function"?WeakMap:Map;function Zd(e,n,o){o=Yn(-1,o),o.tag=3,o.payload={element:null};var u=n.value;return o.callback=function(){Tl||(Tl=!0,Ps=u),ks(e,n)},o}function Jd(e,n,o){o=Yn(-1,o),o.tag=3;var u=e.type.getDerivedStateFromError;if(typeof u=="function"){var p=n.value;o.payload=function(){return u(p)},o.callback=function(){ks(e,n)}}var m=e.stateNode;return m!==null&&typeof m.componentDidCatch=="function"&&(o.callback=function(){ks(e,n),typeof u!="function"&&(gr===null?gr=new Set([this]):gr.add(this));var b=n.stack;this.componentDidCatch(n.value,{componentStack:b!==null?b:""})}),o}function ef(e,n,o){var u=e.pingCache;if(u===null){u=e.pingCache=new Gm;var p=new Set;u.set(n,p)}else p=u.get(n),p===void 0&&(p=new Set,u.set(n,p));p.has(o)||(p.add(o),e=cx.bind(null,e,n,o),n.then(e,e))}function tf(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function nf(e,n,o,u,p){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1&&(o.alternate===null?o.tag=17:(n=Yn(-1,1),n.tag=2,pr(o,n,1))),o.lanes|=1),e):(e.flags|=65536,e.lanes=p,e)}var Xm=T.ReactCurrentOwner,Yt=!1;function Bt(e,n,o,u){n.child=e===null?wd(n,null,o,u):ii(n,e.child,o,u)}function rf(e,n,o,u,p){o=o.render;var m=n.ref;return li(n,p),u=ds(e,n,o,u,m,p),o=fs(),e!==null&&!Yt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~p,Kn(e,n,p)):(at&&o&&Ka(n),n.flags|=1,Bt(e,n,u,p),n.child)}function of(e,n,o,u,p){if(e===null){var m=o.type;return typeof m=="function"&&!Ws(m)&&m.defaultProps===void 0&&o.compare===null&&o.defaultProps===void 0?(n.tag=15,n.type=m,lf(e,n,m,u,p)):(e=Pl(o.type,null,u,n,n.mode,p),e.ref=n.ref,e.return=n,n.child=e)}if(m=e.child,(e.lanes&p)===0){var b=m.memoizedProps;if(o=o.compare,o=o!==null?o:Ki,o(b,u)&&e.ref===n.ref)return Kn(e,n,p)}return n.flags|=1,e=vr(m,u),e.ref=n.ref,e.return=n,n.child=e}function lf(e,n,o,u,p){if(e!==null){var m=e.memoizedProps;if(Ki(m,u)&&e.ref===n.ref)if(Yt=!1,n.pendingProps=u=m,(e.lanes&p)!==0)(e.flags&131072)!==0&&(Yt=!0);else return n.lanes=e.lanes,Kn(e,n,p)}return bs(e,n,o,u,p)}function af(e,n,o){var u=n.pendingProps,p=u.children,m=e!==null?e.memoizedState:null;if(u.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(ci,nn),nn|=o;else{if((o&1073741824)===0)return e=m!==null?m.baseLanes|o:o,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,tt(ci,nn),nn|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},u=m!==null?m.baseLanes:o,tt(ci,nn),nn|=u}else m!==null?(u=m.baseLanes|o,n.memoizedState=null):u=o,tt(ci,nn),nn|=u;return Bt(e,n,p,o),n.child}function sf(e,n){var o=n.ref;(e===null&&o!==null||e!==null&&e.ref!==o)&&(n.flags|=512,n.flags|=2097152)}function bs(e,n,o,u,p){var m=qt(o)?Er:Pt.current;return m=ei(n,m),li(n,p),o=ds(e,n,o,u,m,p),u=fs(),e!==null&&!Yt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~p,Kn(e,n,p)):(at&&u&&Ka(n),n.flags|=1,Bt(e,n,o,p),n.child)}function uf(e,n,o,u,p){if(qt(o)){var m=!0;ll(n)}else m=!1;if(li(n,p),n.stateNode===null)jl(e,n),Gd(n,o,u),ys(n,o,u,p),u=!0;else if(e===null){var b=n.stateNode,z=n.memoizedProps;b.props=z;var R=b.context,B=o.contextType;typeof B=="object"&&B!==null?B=hn(B):(B=qt(o)?Er:Pt.current,B=ei(n,B));var re=o.getDerivedStateFromProps,ie=typeof re=="function"||typeof b.getSnapshotBeforeUpdate=="function";ie||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(z!==u||R!==B)&&Xd(n,b,u,B),fr=!1;var ne=n.memoizedState;b.state=ne,gl(n,u,b,p),R=n.memoizedState,z!==u||ne!==R||Vt.current||fr?(typeof re=="function"&&(xs(n,o,re,u),R=n.memoizedState),(z=fr||Qd(n,o,z,u,ne,R,B))?(ie||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(n.flags|=4194308)):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=R),b.props=u,b.state=R,b.context=B,u=z):(typeof b.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{b=n.stateNode,jd(e,n),z=n.memoizedProps,B=n.type===n.elementType?z:zn(n.type,z),b.props=B,ie=n.pendingProps,ne=b.context,R=o.contextType,typeof R=="object"&&R!==null?R=hn(R):(R=qt(o)?Er:Pt.current,R=ei(n,R));var be=o.getDerivedStateFromProps;(re=typeof be=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(z!==ie||ne!==R)&&Xd(n,b,u,R),fr=!1,ne=n.memoizedState,b.state=ne,gl(n,u,b,p);var Se=n.memoizedState;z!==ie||ne!==Se||Vt.current||fr?(typeof be=="function"&&(xs(n,o,be,u),Se=n.memoizedState),(B=fr||Qd(n,o,B,u,ne,Se,R)||!1)?(re||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(u,Se,R),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(u,Se,R)),typeof b.componentDidUpdate=="function"&&(n.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof b.componentDidUpdate!="function"||z===e.memoizedProps&&ne===e.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||z===e.memoizedProps&&ne===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=Se),b.props=u,b.state=Se,b.context=R,u=B):(typeof b.componentDidUpdate!="function"||z===e.memoizedProps&&ne===e.memoizedState||(n.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||z===e.memoizedProps&&ne===e.memoizedState||(n.flags|=1024),u=!1)}return ws(e,n,o,u,m,p)}function ws(e,n,o,u,p,m){sf(e,n);var b=(n.flags&128)!==0;if(!u&&!b)return p&&pd(n,o,!1),Kn(e,n,m);u=n.stateNode,Xm.current=n;var z=b&&typeof o.getDerivedStateFromError!="function"?null:u.render();return n.flags|=1,e!==null&&b?(n.child=ii(n,e.child,null,m),n.child=ii(n,null,z,m)):Bt(e,n,z,m),n.memoizedState=u.state,p&&pd(n,o,!0),n.child}function cf(e){var n=e.stateNode;n.pendingContext?dd(e,n.pendingContext,n.pendingContext!==n.context):n.context&&dd(e,n.context,!1),os(e,n.containerInfo)}function df(e,n,o,u,p){return ri(),Za(p),n.flags|=256,Bt(e,n,o,u),n.child}var Ss={dehydrated:null,treeContext:null,retryLane:0};function js(e){return{baseLanes:e,cachePool:null,transitions:null}}function ff(e,n,o){var u=n.pendingProps,p=ut.current,m=!1,b=(n.flags&128)!==0,z;if((z=b)||(z=e!==null&&e.memoizedState===null?!1:(p&2)!==0),z?(m=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(p|=1),tt(ut,p&1),e===null)return Xa(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(b=u.children,e=u.fallback,m?(u=n.mode,m=n.child,b={mode:"hidden",children:b},(u&1)===0&&m!==null?(m.childLanes=0,m.pendingProps=b):m=Dl(b,u,0,null),e=Nr(e,u,o,null),m.return=n,e.return=n,m.sibling=e,n.child=m,n.child.memoizedState=js(o),n.memoizedState=Ss,e):Cs(n,b));if(p=e.memoizedState,p!==null&&(z=p.dehydrated,z!==null))return Zm(e,n,b,u,z,p,o);if(m){m=u.fallback,b=n.mode,p=e.child,z=p.sibling;var R={mode:"hidden",children:u.children};return(b&1)===0&&n.child!==p?(u=n.child,u.childLanes=0,u.pendingProps=R,n.deletions=null):(u=vr(p,R),u.subtreeFlags=p.subtreeFlags&14680064),z!==null?m=vr(z,m):(m=Nr(m,b,o,null),m.flags|=2),m.return=n,u.return=n,u.sibling=m,n.child=u,u=m,m=n.child,b=e.child.memoizedState,b=b===null?js(o):{baseLanes:b.baseLanes|o,cachePool:null,transitions:b.transitions},m.memoizedState=b,m.childLanes=e.childLanes&~o,n.memoizedState=Ss,u}return m=e.child,e=m.sibling,u=vr(m,{mode:"visible",children:u.children}),(n.mode&1)===0&&(u.lanes=o),u.return=n,u.sibling=null,e!==null&&(o=n.deletions,o===null?(n.deletions=[e],n.flags|=16):o.push(e)),n.child=u,n.memoizedState=null,u}function Cs(e,n){return n=Dl({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function Sl(e,n,o,u){return u!==null&&Za(u),ii(n,e.child,null,o),e=Cs(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Zm(e,n,o,u,p,m,b){if(o)return n.flags&256?(n.flags&=-257,u=vs(Error(r(422))),Sl(e,n,b,u)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(m=u.fallback,p=n.mode,u=Dl({mode:"visible",children:u.children},p,0,null),m=Nr(m,p,b,null),m.flags|=2,u.return=n,m.return=n,u.sibling=m,n.child=u,(n.mode&1)!==0&&ii(n,e.child,null,b),n.child.memoizedState=js(b),n.memoizedState=Ss,m);if((n.mode&1)===0)return Sl(e,n,b,null);if(p.data==="$!"){if(u=p.nextSibling&&p.nextSibling.dataset,u)var z=u.dgst;return u=z,m=Error(r(419)),u=vs(m,u,void 0),Sl(e,n,b,u)}if(z=(b&e.childLanes)!==0,Yt||z){if(u=jt,u!==null){switch(b&-b){case 4:p=2;break;case 16:p=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(u.suspendedLanes|b))!==0?0:p,p!==0&&p!==m.retryLane&&(m.retryLane=p,qn(e,p),Tn(u,e,p,-1))}return Bs(),u=vs(Error(r(421))),Sl(e,n,b,u)}return p.data==="$?"?(n.flags|=128,n.child=e.child,n=dx.bind(null,e),p._reactRetry=n,null):(e=m.treeContext,tn=sr(p.nextSibling),en=n,at=!0,Cn=null,e!==null&&(fn[pn++]=Hn,fn[pn++]=Vn,fn[pn++]=_r,Hn=e.id,Vn=e.overflow,_r=n),n=Cs(n,u.children),n.flags|=4096,n)}function pf(e,n,o){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),ns(e.return,n,o)}function zs(e,n,o,u,p){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:o,tailMode:p}:(m.isBackwards=n,m.rendering=null,m.renderingStartTime=0,m.last=u,m.tail=o,m.tailMode=p)}function hf(e,n,o){var u=n.pendingProps,p=u.revealOrder,m=u.tail;if(Bt(e,n,u.children,o),u=ut.current,(u&2)!==0)u=u&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&pf(e,o,n);else if(e.tag===19)pf(e,o,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}u&=1}if(tt(ut,u),(n.mode&1)===0)n.memoizedState=null;else switch(p){case"forwards":for(o=n.child,p=null;o!==null;)e=o.alternate,e!==null&&ml(e)===null&&(p=o),o=o.sibling;o=p,o===null?(p=n.child,n.child=null):(p=o.sibling,o.sibling=null),zs(n,!1,p,o,m);break;case"backwards":for(o=null,p=n.child,n.child=null;p!==null;){if(e=p.alternate,e!==null&&ml(e)===null){n.child=p;break}e=p.sibling,p.sibling=o,o=p,p=e}zs(n,!0,o,null,m);break;case"together":zs(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function jl(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Kn(e,n,o){if(e!==null&&(n.dependencies=e.dependencies),Ar|=n.lanes,(o&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,o=vr(e,e.pendingProps),n.child=o,o.return=n;e.sibling!==null;)e=e.sibling,o=o.sibling=vr(e,e.pendingProps),o.return=n;o.sibling=null}return n.child}function Jm(e,n,o){switch(n.tag){case 3:cf(n),ri();break;case 5:Ed(n);break;case 1:qt(n.type)&&ll(n);break;case 4:os(n,n.stateNode.containerInfo);break;case 10:var u=n.type._context,p=n.memoizedProps.value;tt(fl,u._currentValue),u._currentValue=p;break;case 13:if(u=n.memoizedState,u!==null)return u.dehydrated!==null?(tt(ut,ut.current&1),n.flags|=128,null):(o&n.child.childLanes)!==0?ff(e,n,o):(tt(ut,ut.current&1),e=Kn(e,n,o),e!==null?e.sibling:null);tt(ut,ut.current&1);break;case 19:if(u=(o&n.childLanes)!==0,(e.flags&128)!==0){if(u)return hf(e,n,o);n.flags|=128}if(p=n.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),tt(ut,ut.current),u)break;return null;case 22:case 23:return n.lanes=0,af(e,n,o)}return Kn(e,n,o)}var gf,Es,mf,xf;gf=function(e,n){for(var o=n.child;o!==null;){if(o.tag===5||o.tag===6)e.appendChild(o.stateNode);else if(o.tag!==4&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return;o=o.return}o.sibling.return=o.return,o=o.sibling}},Es=function(){},mf=function(e,n,o,u){var p=e.memoizedProps;if(p!==u){e=n.stateNode,Rr(Ln.current);var m=null;switch(o){case"input":p=De(e,p),u=De(e,u),m=[];break;case"select":p=S({},p,{value:void 0}),u=S({},u,{value:void 0}),m=[];break;case"textarea":p=Oe(e,p),u=Oe(e,u),m=[];break;default:typeof p.onClick!="function"&&typeof u.onClick=="function"&&(e.onclick=rl)}vt(o,u);var b;o=null;for(B in p)if(!u.hasOwnProperty(B)&&p.hasOwnProperty(B)&&p[B]!=null)if(B==="style"){var z=p[B];for(b in z)z.hasOwnProperty(b)&&(o||(o={}),o[b]="")}else B!=="dangerouslySetInnerHTML"&&B!=="children"&&B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&B!=="autoFocus"&&(s.hasOwnProperty(B)?m||(m=[]):(m=m||[]).push(B,null));for(B in u){var R=u[B];if(z=p!=null?p[B]:void 0,u.hasOwnProperty(B)&&R!==z&&(R!=null||z!=null))if(B==="style")if(z){for(b in z)!z.hasOwnProperty(b)||R&&R.hasOwnProperty(b)||(o||(o={}),o[b]="");for(b in R)R.hasOwnProperty(b)&&z[b]!==R[b]&&(o||(o={}),o[b]=R[b])}else o||(m||(m=[]),m.push(B,o)),o=R;else B==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,z=z?z.__html:void 0,R!=null&&z!==R&&(m=m||[]).push(B,R)):B==="children"?typeof R!="string"&&typeof R!="number"||(m=m||[]).push(B,""+R):B!=="suppressContentEditableWarning"&&B!=="suppressHydrationWarning"&&(s.hasOwnProperty(B)?(R!=null&&B==="onScroll"&&rt("scroll",e),m||z===R||(m=[])):(m=m||[]).push(B,R))}o&&(m=m||[]).push("style",o);var B=m;(n.updateQueue=B)&&(n.flags|=4)}},xf=function(e,n,o,u){o!==u&&(n.flags|=4)};function uo(e,n){if(!at)switch(e.tailMode){case"hidden":n=e.tail;for(var o=null;n!==null;)n.alternate!==null&&(o=n),n=n.sibling;o===null?e.tail=null:o.sibling=null;break;case"collapsed":o=e.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function Nt(e){var n=e.alternate!==null&&e.alternate.child===e.child,o=0,u=0;if(n)for(var p=e.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags&14680064,u|=p.flags&14680064,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)o|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=u,e.childLanes=o,n}function ex(e,n,o){var u=n.pendingProps;switch(Qa(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(n),null;case 1:return qt(n.type)&&ol(),Nt(n),null;case 3:return u=n.stateNode,ai(),it(Vt),it(Pt),ss(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(e===null||e.child===null)&&(cl(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Cn!==null&&(Fs(Cn),Cn=null))),Es(e,n),Nt(n),null;case 5:ls(n);var p=Rr(io.current);if(o=n.type,e!==null&&n.stateNode!=null)mf(e,n,o,u,p),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!u){if(n.stateNode===null)throw Error(r(166));return Nt(n),null}if(e=Rr(Ln.current),cl(n)){u=n.stateNode,o=n.type;var m=n.memoizedProps;switch(u[An]=n,u[Ji]=m,e=(n.mode&1)!==0,o){case"dialog":rt("cancel",u),rt("close",u);break;case"iframe":case"object":case"embed":rt("load",u);break;case"video":case"audio":for(p=0;p<Gi.length;p++)rt(Gi[p],u);break;case"source":rt("error",u);break;case"img":case"image":case"link":rt("error",u),rt("load",u);break;case"details":rt("toggle",u);break;case"input":mt(u,m),rt("invalid",u);break;case"select":u._wrapperState={wasMultiple:!!m.multiple},rt("invalid",u);break;case"textarea":Ne(u,m),rt("invalid",u)}vt(o,m),p=null;for(var b in m)if(m.hasOwnProperty(b)){var z=m[b];b==="children"?typeof z=="string"?u.textContent!==z&&(m.suppressHydrationWarning!==!0&&nl(u.textContent,z,e),p=["children",z]):typeof z=="number"&&u.textContent!==""+z&&(m.suppressHydrationWarning!==!0&&nl(u.textContent,z,e),p=["children",""+z]):s.hasOwnProperty(b)&&z!=null&&b==="onScroll"&&rt("scroll",u)}switch(o){case"input":Fe(u),W(u,m,!0);break;case"textarea":Fe(u),$e(u);break;case"select":case"option":break;default:typeof m.onClick=="function"&&(u.onclick=rl)}u=p,n.updateQueue=u,u!==null&&(n.flags|=4)}else{b=p.nodeType===9?p:p.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=D(o)),e==="http://www.w3.org/1999/xhtml"?o==="script"?(e=b.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof u.is=="string"?e=b.createElement(o,{is:u.is}):(e=b.createElement(o),o==="select"&&(b=e,u.multiple?b.multiple=!0:u.size&&(b.size=u.size))):e=b.createElementNS(e,o),e[An]=n,e[Ji]=u,gf(e,n,!1,!1),n.stateNode=e;e:{switch(b=cn(o,u),o){case"dialog":rt("cancel",e),rt("close",e),p=u;break;case"iframe":case"object":case"embed":rt("load",e),p=u;break;case"video":case"audio":for(p=0;p<Gi.length;p++)rt(Gi[p],e);p=u;break;case"source":rt("error",e),p=u;break;case"img":case"image":case"link":rt("error",e),rt("load",e),p=u;break;case"details":rt("toggle",e),p=u;break;case"input":mt(e,u),p=De(e,u),rt("invalid",e);break;case"option":p=u;break;case"select":e._wrapperState={wasMultiple:!!u.multiple},p=S({},u,{value:void 0}),rt("invalid",e);break;case"textarea":Ne(e,u),p=Oe(e,u),rt("invalid",e);break;default:p=u}vt(o,p),z=p;for(m in z)if(z.hasOwnProperty(m)){var R=z[m];m==="style"?wn(e,R):m==="dangerouslySetInnerHTML"?(R=R?R.__html:void 0,R!=null&&Pe(e,R)):m==="children"?typeof R=="string"?(o!=="textarea"||R!=="")&&Ie(e,R):typeof R=="number"&&Ie(e,""+R):m!=="suppressContentEditableWarning"&&m!=="suppressHydrationWarning"&&m!=="autoFocus"&&(s.hasOwnProperty(m)?R!=null&&m==="onScroll"&&rt("scroll",e):R!=null&&w(e,m,R,b))}switch(o){case"input":Fe(e),W(e,u,!1);break;case"textarea":Fe(e),$e(e);break;case"option":u.value!=null&&e.setAttribute("value",""+pe(u.value));break;case"select":e.multiple=!!u.multiple,m=u.value,m!=null?ze(e,!!u.multiple,m,!1):u.defaultValue!=null&&ze(e,!!u.multiple,u.defaultValue,!0);break;default:typeof p.onClick=="function"&&(e.onclick=rl)}switch(o){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}}u&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return Nt(n),null;case 6:if(e&&n.stateNode!=null)xf(e,n,e.memoizedProps,u);else{if(typeof u!="string"&&n.stateNode===null)throw Error(r(166));if(o=Rr(io.current),Rr(Ln.current),cl(n)){if(u=n.stateNode,o=n.memoizedProps,u[An]=n,(m=u.nodeValue!==o)&&(e=en,e!==null))switch(e.tag){case 3:nl(u.nodeValue,o,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&nl(u.nodeValue,o,(e.mode&1)!==0)}m&&(n.flags|=4)}else u=(o.nodeType===9?o:o.ownerDocument).createTextNode(u),u[An]=n,n.stateNode=u}return Nt(n),null;case 13:if(it(ut),u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(at&&tn!==null&&(n.mode&1)!==0&&(n.flags&128)===0)vd(),ri(),n.flags|=98560,m=!1;else if(m=cl(n),u!==null&&u.dehydrated!==null){if(e===null){if(!m)throw Error(r(318));if(m=n.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(r(317));m[An]=n}else ri(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Nt(n),m=!1}else Cn!==null&&(Fs(Cn),Cn=null),m=!0;if(!m)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=o,n):(u=u!==null,u!==(e!==null&&e.memoizedState!==null)&&u&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(ut.current&1)!==0?bt===0&&(bt=3):Bs())),n.updateQueue!==null&&(n.flags|=4),Nt(n),null);case 4:return ai(),Es(e,n),e===null&&Xi(n.stateNode.containerInfo),Nt(n),null;case 10:return ts(n.type._context),Nt(n),null;case 17:return qt(n.type)&&ol(),Nt(n),null;case 19:if(it(ut),m=n.memoizedState,m===null)return Nt(n),null;if(u=(n.flags&128)!==0,b=m.rendering,b===null)if(u)uo(m,!1);else{if(bt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(b=ml(e),b!==null){for(n.flags|=128,uo(m,!1),u=b.updateQueue,u!==null&&(n.updateQueue=u,n.flags|=4),n.subtreeFlags=0,u=o,o=n.child;o!==null;)m=o,e=u,m.flags&=14680066,b=m.alternate,b===null?(m.childLanes=0,m.lanes=e,m.child=null,m.subtreeFlags=0,m.memoizedProps=null,m.memoizedState=null,m.updateQueue=null,m.dependencies=null,m.stateNode=null):(m.childLanes=b.childLanes,m.lanes=b.lanes,m.child=b.child,m.subtreeFlags=0,m.deletions=null,m.memoizedProps=b.memoizedProps,m.memoizedState=b.memoizedState,m.updateQueue=b.updateQueue,m.type=b.type,e=b.dependencies,m.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),o=o.sibling;return tt(ut,ut.current&1|2),n.child}e=e.sibling}m.tail!==null&&ht()>di&&(n.flags|=128,u=!0,uo(m,!1),n.lanes=4194304)}else{if(!u)if(e=ml(b),e!==null){if(n.flags|=128,u=!0,o=e.updateQueue,o!==null&&(n.updateQueue=o,n.flags|=4),uo(m,!0),m.tail===null&&m.tailMode==="hidden"&&!b.alternate&&!at)return Nt(n),null}else 2*ht()-m.renderingStartTime>di&&o!==1073741824&&(n.flags|=128,u=!0,uo(m,!1),n.lanes=4194304);m.isBackwards?(b.sibling=n.child,n.child=b):(o=m.last,o!==null?o.sibling=b:n.child=b,m.last=b)}return m.tail!==null?(n=m.tail,m.rendering=n,m.tail=n.sibling,m.renderingStartTime=ht(),n.sibling=null,o=ut.current,tt(ut,u?o&1|2:o&1),n):(Nt(n),null);case 22:case 23:return $s(),u=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==u&&(n.flags|=8192),u&&(n.mode&1)!==0?(nn&1073741824)!==0&&(Nt(n),n.subtreeFlags&6&&(n.flags|=8192)):Nt(n),null;case 24:return null;case 25:return null}throw Error(r(156,n.tag))}function tx(e,n){switch(Qa(n),n.tag){case 1:return qt(n.type)&&ol(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ai(),it(Vt),it(Pt),ss(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return ls(n),null;case 13:if(it(ut),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));ri()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return it(ut),null;case 4:return ai(),null;case 10:return ts(n.type._context),null;case 22:case 23:return $s(),null;case 24:return null;default:return null}}var Cl=!1,Ft=!1,nx=typeof WeakSet=="function"?WeakSet:Set,we=null;function ui(e,n){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(u){ft(e,n,u)}else o.current=null}function _s(e,n,o){try{o()}catch(u){ft(e,n,u)}}var yf=!1;function rx(e,n){if($a=Vo,e=Qc(),Ma(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var u=o.getSelection&&o.getSelection();if(u&&u.rangeCount!==0){o=u.anchorNode;var p=u.anchorOffset,m=u.focusNode;u=u.focusOffset;try{o.nodeType,m.nodeType}catch{o=null;break e}var b=0,z=-1,R=-1,B=0,re=0,ie=e,ne=null;t:for(;;){for(var be;ie!==o||p!==0&&ie.nodeType!==3||(z=b+p),ie!==m||u!==0&&ie.nodeType!==3||(R=b+u),ie.nodeType===3&&(b+=ie.nodeValue.length),(be=ie.firstChild)!==null;)ne=ie,ie=be;for(;;){if(ie===e)break t;if(ne===o&&++B===p&&(z=b),ne===m&&++re===u&&(R=b),(be=ie.nextSibling)!==null)break;ie=ne,ne=ie.parentNode}ie=be}o=z===-1||R===-1?null:{start:z,end:R}}else o=null}o=o||{start:0,end:0}}else o=null;for(Ba={focusedElem:e,selectionRange:o},Vo=!1,we=n;we!==null;)if(n=we,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,we=e;else for(;we!==null;){n=we;try{var Se=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(Se!==null){var Ce=Se.memoizedProps,gt=Se.memoizedState,F=n.stateNode,L=F.getSnapshotBeforeUpdate(n.elementType===n.type?Ce:zn(n.type,Ce),gt);F.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var O=n.stateNode.containerInfo;O.nodeType===1?O.textContent="":O.nodeType===9&&O.documentElement&&O.removeChild(O.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ce){ft(n,n.return,ce)}if(e=n.sibling,e!==null){e.return=n.return,we=e;break}we=n.return}return Se=yf,yf=!1,Se}function co(e,n,o){var u=n.updateQueue;if(u=u!==null?u.lastEffect:null,u!==null){var p=u=u.next;do{if((p.tag&e)===e){var m=p.destroy;p.destroy=void 0,m!==void 0&&_s(n,o,m)}p=p.next}while(p!==u)}}function zl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var u=o.create;o.destroy=u()}o=o.next}while(o!==n)}}function Ts(e){var n=e.ref;if(n!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof n=="function"?n(e):n.current=e}}function vf(e){var n=e.alternate;n!==null&&(e.alternate=null,vf(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[An],delete n[Ji],delete n[Va],delete n[Om],delete n[$m])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function kf(e){return e.tag===5||e.tag===3||e.tag===4}function bf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||kf(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Is(e,n,o){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?o.nodeType===8?o.parentNode.insertBefore(e,n):o.insertBefore(e,n):(o.nodeType===8?(n=o.parentNode,n.insertBefore(e,o)):(n=o,n.appendChild(e)),o=o._reactRootContainer,o!=null||n.onclick!==null||(n.onclick=rl));else if(u!==4&&(e=e.child,e!==null))for(Is(e,n,o),e=e.sibling;e!==null;)Is(e,n,o),e=e.sibling}function Rs(e,n,o){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?o.insertBefore(e,n):o.appendChild(e);else if(u!==4&&(e=e.child,e!==null))for(Rs(e,n,o),e=e.sibling;e!==null;)Rs(e,n,o),e=e.sibling}var Rt=null,En=!1;function hr(e,n,o){for(o=o.child;o!==null;)wf(e,n,o),o=o.sibling}function wf(e,n,o){if(Mn&&typeof Mn.onCommitFiberUnmount=="function")try{Mn.onCommitFiberUnmount(Oo,o)}catch{}switch(o.tag){case 5:Ft||ui(o,n);case 6:var u=Rt,p=En;Rt=null,hr(e,n,o),Rt=u,En=p,Rt!==null&&(En?(e=Rt,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):Rt.removeChild(o.stateNode));break;case 18:Rt!==null&&(En?(e=Rt,o=o.stateNode,e.nodeType===8?Ha(e.parentNode,o):e.nodeType===1&&Ha(e,o),Wi(e)):Ha(Rt,o.stateNode));break;case 4:u=Rt,p=En,Rt=o.stateNode.containerInfo,En=!0,hr(e,n,o),Rt=u,En=p;break;case 0:case 11:case 14:case 15:if(!Ft&&(u=o.updateQueue,u!==null&&(u=u.lastEffect,u!==null))){p=u=u.next;do{var m=p,b=m.destroy;m=m.tag,b!==void 0&&((m&2)!==0||(m&4)!==0)&&_s(o,n,b),p=p.next}while(p!==u)}hr(e,n,o);break;case 1:if(!Ft&&(ui(o,n),u=o.stateNode,typeof u.componentWillUnmount=="function"))try{u.props=o.memoizedProps,u.state=o.memoizedState,u.componentWillUnmount()}catch(z){ft(o,n,z)}hr(e,n,o);break;case 21:hr(e,n,o);break;case 22:o.mode&1?(Ft=(u=Ft)||o.memoizedState!==null,hr(e,n,o),Ft=u):hr(e,n,o);break;default:hr(e,n,o)}}function Sf(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new nx),n.forEach(function(u){var p=fx.bind(null,e,u);o.has(u)||(o.add(u),u.then(p,p))})}}function _n(e,n){var o=n.deletions;if(o!==null)for(var u=0;u<o.length;u++){var p=o[u];try{var m=e,b=n,z=b;e:for(;z!==null;){switch(z.tag){case 5:Rt=z.stateNode,En=!1;break e;case 3:Rt=z.stateNode.containerInfo,En=!0;break e;case 4:Rt=z.stateNode.containerInfo,En=!0;break e}z=z.return}if(Rt===null)throw Error(r(160));wf(m,b,p),Rt=null,En=!1;var R=p.alternate;R!==null&&(R.return=null),p.return=null}catch(B){ft(p,n,B)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)jf(n,e),n=n.sibling}function jf(e,n){var o=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(_n(n,e),Dn(e),u&4){try{co(3,e,e.return),zl(3,e)}catch(Ce){ft(e,e.return,Ce)}try{co(5,e,e.return)}catch(Ce){ft(e,e.return,Ce)}}break;case 1:_n(n,e),Dn(e),u&512&&o!==null&&ui(o,o.return);break;case 5:if(_n(n,e),Dn(e),u&512&&o!==null&&ui(o,o.return),e.flags&32){var p=e.stateNode;try{Ie(p,"")}catch(Ce){ft(e,e.return,Ce)}}if(u&4&&(p=e.stateNode,p!=null)){var m=e.memoizedProps,b=o!==null?o.memoizedProps:m,z=e.type,R=e.updateQueue;if(e.updateQueue=null,R!==null)try{z==="input"&&m.type==="radio"&&m.name!=null&&Et(p,m),cn(z,b);var B=cn(z,m);for(b=0;b<R.length;b+=2){var re=R[b],ie=R[b+1];re==="style"?wn(p,ie):re==="dangerouslySetInnerHTML"?Pe(p,ie):re==="children"?Ie(p,ie):w(p,re,ie,B)}switch(z){case"input":_t(p,m);break;case"textarea":ke(p,m);break;case"select":var ne=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!m.multiple;var be=m.value;be!=null?ze(p,!!m.multiple,be,!1):ne!==!!m.multiple&&(m.defaultValue!=null?ze(p,!!m.multiple,m.defaultValue,!0):ze(p,!!m.multiple,m.multiple?[]:"",!1))}p[Ji]=m}catch(Ce){ft(e,e.return,Ce)}}break;case 6:if(_n(n,e),Dn(e),u&4){if(e.stateNode===null)throw Error(r(162));p=e.stateNode,m=e.memoizedProps;try{p.nodeValue=m}catch(Ce){ft(e,e.return,Ce)}}break;case 3:if(_n(n,e),Dn(e),u&4&&o!==null&&o.memoizedState.isDehydrated)try{Wi(n.containerInfo)}catch(Ce){ft(e,e.return,Ce)}break;case 4:_n(n,e),Dn(e);break;case 13:_n(n,e),Dn(e),p=e.child,p.flags&8192&&(m=p.memoizedState!==null,p.stateNode.isHidden=m,!m||p.alternate!==null&&p.alternate.memoizedState!==null||(Ls=ht())),u&4&&Sf(e);break;case 22:if(re=o!==null&&o.memoizedState!==null,e.mode&1?(Ft=(B=Ft)||re,_n(n,e),Ft=B):_n(n,e),Dn(e),u&8192){if(B=e.memoizedState!==null,(e.stateNode.isHidden=B)&&!re&&(e.mode&1)!==0)for(we=e,re=e.child;re!==null;){for(ie=we=re;we!==null;){switch(ne=we,be=ne.child,ne.tag){case 0:case 11:case 14:case 15:co(4,ne,ne.return);break;case 1:ui(ne,ne.return);var Se=ne.stateNode;if(typeof Se.componentWillUnmount=="function"){u=ne,o=ne.return;try{n=u,Se.props=n.memoizedProps,Se.state=n.memoizedState,Se.componentWillUnmount()}catch(Ce){ft(u,o,Ce)}}break;case 5:ui(ne,ne.return);break;case 22:if(ne.memoizedState!==null){Ef(ie);continue}}be!==null?(be.return=ne,we=be):Ef(ie)}re=re.sibling}e:for(re=null,ie=e;;){if(ie.tag===5){if(re===null){re=ie;try{p=ie.stateNode,B?(m=p.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none"):(z=ie.stateNode,R=ie.memoizedProps.style,b=R!=null&&R.hasOwnProperty("display")?R.display:null,z.style.display=Ht("display",b))}catch(Ce){ft(e,e.return,Ce)}}}else if(ie.tag===6){if(re===null)try{ie.stateNode.nodeValue=B?"":ie.memoizedProps}catch(Ce){ft(e,e.return,Ce)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===e)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===e)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===e)break e;re===ie&&(re=null),ie=ie.return}re===ie&&(re=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:_n(n,e),Dn(e),u&4&&Sf(e);break;case 21:break;default:_n(n,e),Dn(e)}}function Dn(e){var n=e.flags;if(n&2){try{e:{for(var o=e.return;o!==null;){if(kf(o)){var u=o;break e}o=o.return}throw Error(r(160))}switch(u.tag){case 5:var p=u.stateNode;u.flags&32&&(Ie(p,""),u.flags&=-33);var m=bf(e);Rs(e,m,p);break;case 3:case 4:var b=u.stateNode.containerInfo,z=bf(e);Is(e,z,b);break;default:throw Error(r(161))}}catch(R){ft(e,e.return,R)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function ix(e,n,o){we=e,Cf(e)}function Cf(e,n,o){for(var u=(e.mode&1)!==0;we!==null;){var p=we,m=p.child;if(p.tag===22&&u){var b=p.memoizedState!==null||Cl;if(!b){var z=p.alternate,R=z!==null&&z.memoizedState!==null||Ft;z=Cl;var B=Ft;if(Cl=b,(Ft=R)&&!B)for(we=p;we!==null;)b=we,R=b.child,b.tag===22&&b.memoizedState!==null?_f(p):R!==null?(R.return=b,we=R):_f(p);for(;m!==null;)we=m,Cf(m),m=m.sibling;we=p,Cl=z,Ft=B}zf(e)}else(p.subtreeFlags&8772)!==0&&m!==null?(m.return=p,we=m):zf(e)}}function zf(e){for(;we!==null;){var n=we;if((n.flags&8772)!==0){var o=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:Ft||zl(5,n);break;case 1:var u=n.stateNode;if(n.flags&4&&!Ft)if(o===null)u.componentDidMount();else{var p=n.elementType===n.type?o.memoizedProps:zn(n.type,o.memoizedProps);u.componentDidUpdate(p,o.memoizedState,u.__reactInternalSnapshotBeforeUpdate)}var m=n.updateQueue;m!==null&&zd(n,m,u);break;case 3:var b=n.updateQueue;if(b!==null){if(o=null,n.child!==null)switch(n.child.tag){case 5:o=n.child.stateNode;break;case 1:o=n.child.stateNode}zd(n,b,o)}break;case 5:var z=n.stateNode;if(o===null&&n.flags&4){o=z;var R=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":R.autoFocus&&o.focus();break;case"img":R.src&&(o.src=R.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var B=n.alternate;if(B!==null){var re=B.memoizedState;if(re!==null){var ie=re.dehydrated;ie!==null&&Wi(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Ft||n.flags&512&&Ts(n)}catch(ne){ft(n,n.return,ne)}}if(n===e){we=null;break}if(o=n.sibling,o!==null){o.return=n.return,we=o;break}we=n.return}}function Ef(e){for(;we!==null;){var n=we;if(n===e){we=null;break}var o=n.sibling;if(o!==null){o.return=n.return,we=o;break}we=n.return}}function _f(e){for(;we!==null;){var n=we;try{switch(n.tag){case 0:case 11:case 15:var o=n.return;try{zl(4,n)}catch(R){ft(n,o,R)}break;case 1:var u=n.stateNode;if(typeof u.componentDidMount=="function"){var p=n.return;try{u.componentDidMount()}catch(R){ft(n,p,R)}}var m=n.return;try{Ts(n)}catch(R){ft(n,m,R)}break;case 5:var b=n.return;try{Ts(n)}catch(R){ft(n,b,R)}}}catch(R){ft(n,n.return,R)}if(n===e){we=null;break}var z=n.sibling;if(z!==null){z.return=n.return,we=z;break}we=n.return}}var ox=Math.ceil,El=T.ReactCurrentDispatcher,Ms=T.ReactCurrentOwner,mn=T.ReactCurrentBatchConfig,Ye=0,jt=null,xt=null,Mt=0,nn=0,ci=ur(0),bt=0,fo=null,Ar=0,_l=0,As=0,po=null,Kt=null,Ls=0,di=1/0,Qn=null,Tl=!1,Ps=null,gr=null,Il=!1,mr=null,Rl=0,ho=0,Ds=null,Ml=-1,Al=0;function Wt(){return(Ye&6)!==0?ht():Ml!==-1?Ml:Ml=ht()}function xr(e){return(e.mode&1)===0?1:(Ye&2)!==0&&Mt!==0?Mt&-Mt:Wm.transition!==null?(Al===0&&(Al=kc()),Al):(e=Xe,e!==0||(e=window.event,e=e===void 0?16:Tc(e.type)),e)}function Tn(e,n,o,u){if(50<ho)throw ho=0,Ds=null,Error(r(185));Ni(e,o,u),((Ye&2)===0||e!==jt)&&(e===jt&&((Ye&2)===0&&(_l|=o),bt===4&&yr(e,Mt)),Qt(e,u),o===1&&Ye===0&&(n.mode&1)===0&&(di=ht()+500,al&&dr()))}function Qt(e,n){var o=e.callbackNode;Wg(e,n);var u=Wo(e,e===jt?Mt:0);if(u===0)o!==null&&xc(o),e.callbackNode=null,e.callbackPriority=0;else if(n=u&-u,e.callbackPriority!==n){if(o!=null&&xc(o),n===1)e.tag===0?Bm(If.bind(null,e)):hd(If.bind(null,e)),Nm(function(){(Ye&6)===0&&dr()}),o=null;else{switch(bc(u)){case 1:o=ga;break;case 4:o=yc;break;case 16:o=Fo;break;case 536870912:o=vc;break;default:o=Fo}o=Ff(o,Tf.bind(null,e))}e.callbackPriority=n,e.callbackNode=o}}function Tf(e,n){if(Ml=-1,Al=0,(Ye&6)!==0)throw Error(r(327));var o=e.callbackNode;if(fi()&&e.callbackNode!==o)return null;var u=Wo(e,e===jt?Mt:0);if(u===0)return null;if((u&30)!==0||(u&e.expiredLanes)!==0||n)n=Ll(e,u);else{n=u;var p=Ye;Ye|=2;var m=Mf();(jt!==e||Mt!==n)&&(Qn=null,di=ht()+500,Pr(e,n));do try{sx();break}catch(z){Rf(e,z)}while(!0);es(),El.current=m,Ye=p,xt!==null?n=0:(jt=null,Mt=0,n=bt)}if(n!==0){if(n===2&&(p=ma(e),p!==0&&(u=p,n=Ns(e,p))),n===1)throw o=fo,Pr(e,0),yr(e,u),Qt(e,ht()),o;if(n===6)yr(e,u);else{if(p=e.current.alternate,(u&30)===0&&!lx(p)&&(n=Ll(e,u),n===2&&(m=ma(e),m!==0&&(u=m,n=Ns(e,m))),n===1))throw o=fo,Pr(e,0),yr(e,u),Qt(e,ht()),o;switch(e.finishedWork=p,e.finishedLanes=u,n){case 0:case 1:throw Error(r(345));case 2:Dr(e,Kt,Qn);break;case 3:if(yr(e,u),(u&130023424)===u&&(n=Ls+500-ht(),10<n)){if(Wo(e,0)!==0)break;if(p=e.suspendedLanes,(p&u)!==u){Wt(),e.pingedLanes|=e.suspendedLanes&p;break}e.timeoutHandle=Ua(Dr.bind(null,e,Kt,Qn),n);break}Dr(e,Kt,Qn);break;case 4:if(yr(e,u),(u&4194240)===u)break;for(n=e.eventTimes,p=-1;0<u;){var b=31-Sn(u);m=1<<b,b=n[b],b>p&&(p=b),u&=~m}if(u=p,u=ht()-u,u=(120>u?120:480>u?480:1080>u?1080:1920>u?1920:3e3>u?3e3:4320>u?4320:1960*ox(u/1960))-u,10<u){e.timeoutHandle=Ua(Dr.bind(null,e,Kt,Qn),u);break}Dr(e,Kt,Qn);break;case 5:Dr(e,Kt,Qn);break;default:throw Error(r(329))}}}return Qt(e,ht()),e.callbackNode===o?Tf.bind(null,e):null}function Ns(e,n){var o=po;return e.current.memoizedState.isDehydrated&&(Pr(e,n).flags|=256),e=Ll(e,n),e!==2&&(n=Kt,Kt=o,n!==null&&Fs(n)),e}function Fs(e){Kt===null?Kt=e:Kt.push.apply(Kt,e)}function lx(e){for(var n=e;;){if(n.flags&16384){var o=n.updateQueue;if(o!==null&&(o=o.stores,o!==null))for(var u=0;u<o.length;u++){var p=o[u],m=p.getSnapshot;p=p.value;try{if(!jn(m(),p))return!1}catch{return!1}}}if(o=n.child,n.subtreeFlags&16384&&o!==null)o.return=n,n=o;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function yr(e,n){for(n&=~As,n&=~_l,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var o=31-Sn(n),u=1<<o;e[o]=-1,n&=~u}}function If(e){if((Ye&6)!==0)throw Error(r(327));fi();var n=Wo(e,0);if((n&1)===0)return Qt(e,ht()),null;var o=Ll(e,n);if(e.tag!==0&&o===2){var u=ma(e);u!==0&&(n=u,o=Ns(e,u))}if(o===1)throw o=fo,Pr(e,0),yr(e,n),Qt(e,ht()),o;if(o===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,Dr(e,Kt,Qn),Qt(e,ht()),null}function Os(e,n){var o=Ye;Ye|=1;try{return e(n)}finally{Ye=o,Ye===0&&(di=ht()+500,al&&dr())}}function Lr(e){mr!==null&&mr.tag===0&&(Ye&6)===0&&fi();var n=Ye;Ye|=1;var o=mn.transition,u=Xe;try{if(mn.transition=null,Xe=1,e)return e()}finally{Xe=u,mn.transition=o,Ye=n,(Ye&6)===0&&dr()}}function $s(){nn=ci.current,it(ci)}function Pr(e,n){e.finishedWork=null,e.finishedLanes=0;var o=e.timeoutHandle;if(o!==-1&&(e.timeoutHandle=-1,Dm(o)),xt!==null)for(o=xt.return;o!==null;){var u=o;switch(Qa(u),u.tag){case 1:u=u.type.childContextTypes,u!=null&&ol();break;case 3:ai(),it(Vt),it(Pt),ss();break;case 5:ls(u);break;case 4:ai();break;case 13:it(ut);break;case 19:it(ut);break;case 10:ts(u.type._context);break;case 22:case 23:$s()}o=o.return}if(jt=e,xt=e=vr(e.current,null),Mt=nn=n,bt=0,fo=null,As=_l=Ar=0,Kt=po=null,Ir!==null){for(n=0;n<Ir.length;n++)if(o=Ir[n],u=o.interleaved,u!==null){o.interleaved=null;var p=u.next,m=o.pending;if(m!==null){var b=m.next;m.next=p,u.next=b}o.pending=u}Ir=null}return e}function Rf(e,n){do{var o=xt;try{if(es(),xl.current=bl,yl){for(var u=ct.memoizedState;u!==null;){var p=u.queue;p!==null&&(p.pending=null),u=u.next}yl=!1}if(Mr=0,St=kt=ct=null,oo=!1,lo=0,Ms.current=null,o===null||o.return===null){bt=1,fo=n,xt=null;break}e:{var m=e,b=o.return,z=o,R=n;if(n=Mt,z.flags|=32768,R!==null&&typeof R=="object"&&typeof R.then=="function"){var B=R,re=z,ie=re.tag;if((re.mode&1)===0&&(ie===0||ie===11||ie===15)){var ne=re.alternate;ne?(re.updateQueue=ne.updateQueue,re.memoizedState=ne.memoizedState,re.lanes=ne.lanes):(re.updateQueue=null,re.memoizedState=null)}var be=tf(b);if(be!==null){be.flags&=-257,nf(be,b,z,m,n),be.mode&1&&ef(m,B,n),n=be,R=B;var Se=n.updateQueue;if(Se===null){var Ce=new Set;Ce.add(R),n.updateQueue=Ce}else Se.add(R);break e}else{if((n&1)===0){ef(m,B,n),Bs();break e}R=Error(r(426))}}else if(at&&z.mode&1){var gt=tf(b);if(gt!==null){(gt.flags&65536)===0&&(gt.flags|=256),nf(gt,b,z,m,n),Za(si(R,z));break e}}m=R=si(R,z),bt!==4&&(bt=2),po===null?po=[m]:po.push(m),m=b;do{switch(m.tag){case 3:m.flags|=65536,n&=-n,m.lanes|=n;var F=Zd(m,R,n);Cd(m,F);break e;case 1:z=R;var L=m.type,O=m.stateNode;if((m.flags&128)===0&&(typeof L.getDerivedStateFromError=="function"||O!==null&&typeof O.componentDidCatch=="function"&&(gr===null||!gr.has(O)))){m.flags|=65536,n&=-n,m.lanes|=n;var ce=Jd(m,z,n);Cd(m,ce);break e}}m=m.return}while(m!==null)}Lf(o)}catch(_e){n=_e,xt===o&&o!==null&&(xt=o=o.return);continue}break}while(!0)}function Mf(){var e=El.current;return El.current=bl,e===null?bl:e}function Bs(){(bt===0||bt===3||bt===2)&&(bt=4),jt===null||(Ar&268435455)===0&&(_l&268435455)===0||yr(jt,Mt)}function Ll(e,n){var o=Ye;Ye|=2;var u=Mf();(jt!==e||Mt!==n)&&(Qn=null,Pr(e,n));do try{ax();break}catch(p){Rf(e,p)}while(!0);if(es(),Ye=o,El.current=u,xt!==null)throw Error(r(261));return jt=null,Mt=0,bt}function ax(){for(;xt!==null;)Af(xt)}function sx(){for(;xt!==null&&!Ag();)Af(xt)}function Af(e){var n=Nf(e.alternate,e,nn);e.memoizedProps=e.pendingProps,n===null?Lf(e):xt=n,Ms.current=null}function Lf(e){var n=e;do{var o=n.alternate;if(e=n.return,(n.flags&32768)===0){if(o=ex(o,n,nn),o!==null){xt=o;return}}else{if(o=tx(o,n),o!==null){o.flags&=32767,xt=o;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{bt=6,xt=null;return}}if(n=n.sibling,n!==null){xt=n;return}xt=n=e}while(n!==null);bt===0&&(bt=5)}function Dr(e,n,o){var u=Xe,p=mn.transition;try{mn.transition=null,Xe=1,ux(e,n,o,u)}finally{mn.transition=p,Xe=u}return null}function ux(e,n,o,u){do fi();while(mr!==null);if((Ye&6)!==0)throw Error(r(327));o=e.finishedWork;var p=e.finishedLanes;if(o===null)return null;if(e.finishedWork=null,e.finishedLanes=0,o===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var m=o.lanes|o.childLanes;if(Ug(e,m),e===jt&&(xt=jt=null,Mt=0),(o.subtreeFlags&2064)===0&&(o.flags&2064)===0||Il||(Il=!0,Ff(Fo,function(){return fi(),null})),m=(o.flags&15990)!==0,(o.subtreeFlags&15990)!==0||m){m=mn.transition,mn.transition=null;var b=Xe;Xe=1;var z=Ye;Ye|=4,Ms.current=null,rx(e,o),jf(o,e),Tm(Ba),Vo=!!$a,Ba=$a=null,e.current=o,ix(o),Lg(),Ye=z,Xe=b,mn.transition=m}else e.current=o;if(Il&&(Il=!1,mr=e,Rl=p),m=e.pendingLanes,m===0&&(gr=null),Ng(o.stateNode),Qt(e,ht()),n!==null)for(u=e.onRecoverableError,o=0;o<n.length;o++)p=n[o],u(p.value,{componentStack:p.stack,digest:p.digest});if(Tl)throw Tl=!1,e=Ps,Ps=null,e;return(Rl&1)!==0&&e.tag!==0&&fi(),m=e.pendingLanes,(m&1)!==0?e===Ds?ho++:(ho=0,Ds=e):ho=0,dr(),null}function fi(){if(mr!==null){var e=bc(Rl),n=mn.transition,o=Xe;try{if(mn.transition=null,Xe=16>e?16:e,mr===null)var u=!1;else{if(e=mr,mr=null,Rl=0,(Ye&6)!==0)throw Error(r(331));var p=Ye;for(Ye|=4,we=e.current;we!==null;){var m=we,b=m.child;if((we.flags&16)!==0){var z=m.deletions;if(z!==null){for(var R=0;R<z.length;R++){var B=z[R];for(we=B;we!==null;){var re=we;switch(re.tag){case 0:case 11:case 15:co(8,re,m)}var ie=re.child;if(ie!==null)ie.return=re,we=ie;else for(;we!==null;){re=we;var ne=re.sibling,be=re.return;if(vf(re),re===B){we=null;break}if(ne!==null){ne.return=be,we=ne;break}we=be}}}var Se=m.alternate;if(Se!==null){var Ce=Se.child;if(Ce!==null){Se.child=null;do{var gt=Ce.sibling;Ce.sibling=null,Ce=gt}while(Ce!==null)}}we=m}}if((m.subtreeFlags&2064)!==0&&b!==null)b.return=m,we=b;else e:for(;we!==null;){if(m=we,(m.flags&2048)!==0)switch(m.tag){case 0:case 11:case 15:co(9,m,m.return)}var F=m.sibling;if(F!==null){F.return=m.return,we=F;break e}we=m.return}}var L=e.current;for(we=L;we!==null;){b=we;var O=b.child;if((b.subtreeFlags&2064)!==0&&O!==null)O.return=b,we=O;else e:for(b=L;we!==null;){if(z=we,(z.flags&2048)!==0)try{switch(z.tag){case 0:case 11:case 15:zl(9,z)}}catch(_e){ft(z,z.return,_e)}if(z===b){we=null;break e}var ce=z.sibling;if(ce!==null){ce.return=z.return,we=ce;break e}we=z.return}}if(Ye=p,dr(),Mn&&typeof Mn.onPostCommitFiberRoot=="function")try{Mn.onPostCommitFiberRoot(Oo,e)}catch{}u=!0}return u}finally{Xe=o,mn.transition=n}}return!1}function Pf(e,n,o){n=si(o,n),n=Zd(e,n,1),e=pr(e,n,1),n=Wt(),e!==null&&(Ni(e,1,n),Qt(e,n))}function ft(e,n,o){if(e.tag===3)Pf(e,e,o);else for(;n!==null;){if(n.tag===3){Pf(n,e,o);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(gr===null||!gr.has(u))){e=si(o,e),e=Jd(n,e,1),n=pr(n,e,1),e=Wt(),n!==null&&(Ni(n,1,e),Qt(n,e));break}}n=n.return}}function cx(e,n,o){var u=e.pingCache;u!==null&&u.delete(n),n=Wt(),e.pingedLanes|=e.suspendedLanes&o,jt===e&&(Mt&o)===o&&(bt===4||bt===3&&(Mt&130023424)===Mt&&500>ht()-Ls?Pr(e,0):As|=o),Qt(e,n)}function Df(e,n){n===0&&((e.mode&1)===0?n=1:(n=Bo,Bo<<=1,(Bo&130023424)===0&&(Bo=4194304)));var o=Wt();e=qn(e,n),e!==null&&(Ni(e,n,o),Qt(e,o))}function dx(e){var n=e.memoizedState,o=0;n!==null&&(o=n.retryLane),Df(e,o)}function fx(e,n){var o=0;switch(e.tag){case 13:var u=e.stateNode,p=e.memoizedState;p!==null&&(o=p.retryLane);break;case 19:u=e.stateNode;break;default:throw Error(r(314))}u!==null&&u.delete(n),Df(e,o)}var Nf;Nf=function(e,n,o){if(e!==null)if(e.memoizedProps!==n.pendingProps||Vt.current)Yt=!0;else{if((e.lanes&o)===0&&(n.flags&128)===0)return Yt=!1,Jm(e,n,o);Yt=(e.flags&131072)!==0}else Yt=!1,at&&(n.flags&1048576)!==0&&gd(n,ul,n.index);switch(n.lanes=0,n.tag){case 2:var u=n.type;jl(e,n),e=n.pendingProps;var p=ei(n,Pt.current);li(n,o),p=ds(null,n,u,e,p,o);var m=fs();return n.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,qt(u)?(m=!0,ll(n)):m=!1,n.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,is(n),p.updater=wl,n.stateNode=p,p._reactInternals=n,ys(n,u,e,o),n=ws(null,n,u,!0,m,o)):(n.tag=0,at&&m&&Ka(n),Bt(null,n,p,o),n=n.child),n;case 16:u=n.elementType;e:{switch(jl(e,n),e=n.pendingProps,p=u._init,u=p(u._payload),n.type=u,p=n.tag=hx(u),e=zn(u,e),p){case 0:n=bs(null,n,u,e,o);break e;case 1:n=uf(null,n,u,e,o);break e;case 11:n=rf(null,n,u,e,o);break e;case 14:n=of(null,n,u,zn(u.type,e),o);break e}throw Error(r(306,u,""))}return n;case 0:return u=n.type,p=n.pendingProps,p=n.elementType===u?p:zn(u,p),bs(e,n,u,p,o);case 1:return u=n.type,p=n.pendingProps,p=n.elementType===u?p:zn(u,p),uf(e,n,u,p,o);case 3:e:{if(cf(n),e===null)throw Error(r(387));u=n.pendingProps,m=n.memoizedState,p=m.element,jd(e,n),gl(n,u,null,o);var b=n.memoizedState;if(u=b.element,m.isDehydrated)if(m={element:u,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},n.updateQueue.baseState=m,n.memoizedState=m,n.flags&256){p=si(Error(r(423)),n),n=df(e,n,u,o,p);break e}else if(u!==p){p=si(Error(r(424)),n),n=df(e,n,u,o,p);break e}else for(tn=sr(n.stateNode.containerInfo.firstChild),en=n,at=!0,Cn=null,o=wd(n,null,u,o),n.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(ri(),u===p){n=Kn(e,n,o);break e}Bt(e,n,u,o)}n=n.child}return n;case 5:return Ed(n),e===null&&Xa(n),u=n.type,p=n.pendingProps,m=e!==null?e.memoizedProps:null,b=p.children,Wa(u,p)?b=null:m!==null&&Wa(u,m)&&(n.flags|=32),sf(e,n),Bt(e,n,b,o),n.child;case 6:return e===null&&Xa(n),null;case 13:return ff(e,n,o);case 4:return os(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=ii(n,null,u,o):Bt(e,n,u,o),n.child;case 11:return u=n.type,p=n.pendingProps,p=n.elementType===u?p:zn(u,p),rf(e,n,u,p,o);case 7:return Bt(e,n,n.pendingProps,o),n.child;case 8:return Bt(e,n,n.pendingProps.children,o),n.child;case 12:return Bt(e,n,n.pendingProps.children,o),n.child;case 10:e:{if(u=n.type._context,p=n.pendingProps,m=n.memoizedProps,b=p.value,tt(fl,u._currentValue),u._currentValue=b,m!==null)if(jn(m.value,b)){if(m.children===p.children&&!Vt.current){n=Kn(e,n,o);break e}}else for(m=n.child,m!==null&&(m.return=n);m!==null;){var z=m.dependencies;if(z!==null){b=m.child;for(var R=z.firstContext;R!==null;){if(R.context===u){if(m.tag===1){R=Yn(-1,o&-o),R.tag=2;var B=m.updateQueue;if(B!==null){B=B.shared;var re=B.pending;re===null?R.next=R:(R.next=re.next,re.next=R),B.pending=R}}m.lanes|=o,R=m.alternate,R!==null&&(R.lanes|=o),ns(m.return,o,n),z.lanes|=o;break}R=R.next}}else if(m.tag===10)b=m.type===n.type?null:m.child;else if(m.tag===18){if(b=m.return,b===null)throw Error(r(341));b.lanes|=o,z=b.alternate,z!==null&&(z.lanes|=o),ns(b,o,n),b=m.sibling}else b=m.child;if(b!==null)b.return=m;else for(b=m;b!==null;){if(b===n){b=null;break}if(m=b.sibling,m!==null){m.return=b.return,b=m;break}b=b.return}m=b}Bt(e,n,p.children,o),n=n.child}return n;case 9:return p=n.type,u=n.pendingProps.children,li(n,o),p=hn(p),u=u(p),n.flags|=1,Bt(e,n,u,o),n.child;case 14:return u=n.type,p=zn(u,n.pendingProps),p=zn(u.type,p),of(e,n,u,p,o);case 15:return lf(e,n,n.type,n.pendingProps,o);case 17:return u=n.type,p=n.pendingProps,p=n.elementType===u?p:zn(u,p),jl(e,n),n.tag=1,qt(u)?(e=!0,ll(n)):e=!1,li(n,o),Gd(n,u,p),ys(n,u,p,o),ws(null,n,u,!0,e,o);case 19:return hf(e,n,o);case 22:return af(e,n,o)}throw Error(r(156,n.tag))};function Ff(e,n){return mc(e,n)}function px(e,n,o,u){this.tag=e,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xn(e,n,o,u){return new px(e,n,o,u)}function Ws(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hx(e){if(typeof e=="function")return Ws(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Y)return 11;if(e===K)return 14}return 2}function vr(e,n){var o=e.alternate;return o===null?(o=xn(e.tag,n,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=n,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,n=e.dependencies,o.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Pl(e,n,o,u,p,m){var b=2;if(u=e,typeof e=="function")Ws(e)&&(b=1);else if(typeof e=="string")b=5;else e:switch(e){case X:return Nr(o.children,p,m,n);case oe:b=8,p|=8;break;case me:return e=xn(12,o,n,p|2),e.elementType=me,e.lanes=m,e;case de:return e=xn(13,o,n,p),e.elementType=de,e.lanes=m,e;case J:return e=xn(19,o,n,p),e.elementType=J,e.lanes=m,e;case le:return Dl(o,p,m,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case E:b=10;break e;case Q:b=9;break e;case Y:b=11;break e;case K:b=14;break e;case he:b=16,u=null;break e}throw Error(r(130,e==null?e:typeof e,""))}return n=xn(b,o,n,p),n.elementType=e,n.type=u,n.lanes=m,n}function Nr(e,n,o,u){return e=xn(7,e,u,n),e.lanes=o,e}function Dl(e,n,o,u){return e=xn(22,e,u,n),e.elementType=le,e.lanes=o,e.stateNode={isHidden:!1},e}function Us(e,n,o){return e=xn(6,e,null,n),e.lanes=o,e}function Hs(e,n,o){return n=xn(4,e.children!==null?e.children:[],e.key,n),n.lanes=o,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function gx(e,n,o,u,p){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xa(0),this.expirationTimes=xa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xa(0),this.identifierPrefix=u,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function Vs(e,n,o,u,p,m,b,z,R){return e=new gx(e,n,o,z,R),n===1?(n=1,m===!0&&(n|=8)):n=0,m=xn(3,null,null,n),e.current=m,m.stateNode=e,m.memoizedState={element:u,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},is(m),e}function mx(e,n,o){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:P,key:u==null?null:""+u,children:e,containerInfo:n,implementation:o}}function Of(e){if(!e)return cr;e=e._reactInternals;e:{if(Bn(e)!==e||e.tag!==1)throw Error(r(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(qt(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(r(171))}if(e.tag===1){var o=e.type;if(qt(o))return fd(e,o,n)}return n}function $f(e,n,o,u,p,m,b,z,R){return e=Vs(o,u,!0,e,p,m,b,z,R),e.context=Of(null),o=e.current,u=Wt(),p=xr(o),m=Yn(u,p),m.callback=n??null,pr(o,m,p),e.current.lanes=p,Ni(e,p,u),Qt(e,u),e}function Nl(e,n,o,u){var p=n.current,m=Wt(),b=xr(p);return o=Of(o),n.context===null?n.context=o:n.pendingContext=o,n=Yn(m,b),n.payload={element:e},u=u===void 0?null:u,u!==null&&(n.callback=u),e=pr(p,n,b),e!==null&&(Tn(e,p,b,m),hl(e,p,b)),b}function Fl(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Bf(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var o=e.retryLane;e.retryLane=o!==0&&o<n?o:n}}function qs(e,n){Bf(e,n),(e=e.alternate)&&Bf(e,n)}function xx(){return null}var Wf=typeof reportError=="function"?reportError:function(e){console.error(e)};function Ys(e){this._internalRoot=e}Ol.prototype.render=Ys.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));Nl(e,n,null,null)},Ol.prototype.unmount=Ys.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Lr(function(){Nl(null,e,null,null)}),n[Wn]=null}};function Ol(e){this._internalRoot=e}Ol.prototype.unstable_scheduleHydration=function(e){if(e){var n=jc();e={blockedOn:null,target:e,priority:n};for(var o=0;o<or.length&&n!==0&&n<or[o].priority;o++);or.splice(o,0,e),o===0&&Ec(e)}};function Ks(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $l(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Uf(){}function yx(e,n,o,u,p){if(p){if(typeof u=="function"){var m=u;u=function(){var B=Fl(b);m.call(B)}}var b=$f(n,u,e,0,null,!1,!1,"",Uf);return e._reactRootContainer=b,e[Wn]=b.current,Xi(e.nodeType===8?e.parentNode:e),Lr(),b}for(;p=e.lastChild;)e.removeChild(p);if(typeof u=="function"){var z=u;u=function(){var B=Fl(R);z.call(B)}}var R=Vs(e,0,!1,null,null,!1,!1,"",Uf);return e._reactRootContainer=R,e[Wn]=R.current,Xi(e.nodeType===8?e.parentNode:e),Lr(function(){Nl(n,R,o,u)}),R}function Bl(e,n,o,u,p){var m=o._reactRootContainer;if(m){var b=m;if(typeof p=="function"){var z=p;p=function(){var R=Fl(b);z.call(R)}}Nl(n,b,e,p)}else b=yx(o,n,e,p,u);return Fl(b)}wc=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var o=Di(n.pendingLanes);o!==0&&(ya(n,o|1),Qt(n,ht()),(Ye&6)===0&&(di=ht()+500,dr()))}break;case 13:Lr(function(){var u=qn(e,1);if(u!==null){var p=Wt();Tn(u,e,1,p)}}),qs(e,1)}},va=function(e){if(e.tag===13){var n=qn(e,134217728);if(n!==null){var o=Wt();Tn(n,e,134217728,o)}qs(e,134217728)}},Sc=function(e){if(e.tag===13){var n=xr(e),o=qn(e,n);if(o!==null){var u=Wt();Tn(o,e,n,u)}qs(e,n)}},jc=function(){return Xe},Cc=function(e,n){var o=Xe;try{return Xe=e,n()}finally{Xe=o}},Pi=function(e,n,o){switch(n){case"input":if(_t(e,o),n=o.name,o.type==="radio"&&n!=null){for(o=e;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<o.length;n++){var u=o[n];if(u!==e&&u.form===e.form){var p=il(u);if(!p)throw Error(r(90));Ze(u),_t(u,p)}}}break;case"textarea":ke(e,o);break;case"select":n=o.value,n!=null&&ze(e,!!o.multiple,n,!1)}},$=Os,ue=Lr;var vx={usingClientEntryPoint:!1,Events:[eo,Zr,il,Lo,Po,Os]},go={findFiberByHostInstance:zr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},kx={bundleType:go.bundleType,version:go.version,rendererPackageName:go.rendererPackageName,rendererConfig:go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:T.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=hc(e),e===null?null:e.stateNode},findFiberByHostInstance:go.findFiberByHostInstance||xx,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wl.isDisabled&&Wl.supportsFiber)try{Oo=Wl.inject(kx),Mn=Wl}catch{}}return Gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vx,Gt.createPortal=function(e,n){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ks(n))throw Error(r(200));return mx(e,n,null,o)},Gt.createRoot=function(e,n){if(!Ks(e))throw Error(r(299));var o=!1,u="",p=Wf;return n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onRecoverableError!==void 0&&(p=n.onRecoverableError)),n=Vs(e,1,!1,null,null,o,!1,u,p),e[Wn]=n.current,Xi(e.nodeType===8?e.parentNode:e),new Ys(n)},Gt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=hc(n),e=e===null?null:e.stateNode,e},Gt.flushSync=function(e){return Lr(e)},Gt.hydrate=function(e,n,o){if(!$l(n))throw Error(r(200));return Bl(null,e,n,!0,o)},Gt.hydrateRoot=function(e,n,o){if(!Ks(e))throw Error(r(405));var u=o!=null&&o.hydratedSources||null,p=!1,m="",b=Wf;if(o!=null&&(o.unstable_strictMode===!0&&(p=!0),o.identifierPrefix!==void 0&&(m=o.identifierPrefix),o.onRecoverableError!==void 0&&(b=o.onRecoverableError)),n=$f(n,null,e,1,o??null,p,!1,m,b),e[Wn]=n.current,Xi(e),u)for(e=0;e<u.length;e++)o=u[e],p=o._getVersion,p=p(o._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[o,p]:n.mutableSourceEagerHydrationData.push(o,p);return new Ol(n)},Gt.render=function(e,n,o){if(!$l(n))throw Error(r(200));return Bl(null,e,n,!1,o)},Gt.unmountComponentAtNode=function(e){if(!$l(e))throw Error(r(40));return e._reactRootContainer?(Lr(function(){Bl(null,null,e,!1,function(){e._reactRootContainer=null,e[Wn]=null})}),!0):!1},Gt.unstable_batchedUpdates=Os,Gt.unstable_renderSubtreeIntoContainer=function(e,n,o,u){if(!$l(o))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Bl(e,n,o,!1,u)},Gt.version="18.3.1-next-f1338f8080-20240426",Gt}var Xf;function _x(){if(Xf)return Xs.exports;Xf=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),Xs.exports=Ex(),Xs.exports}var Zf;function Tx(){if(Zf)return Ul;Zf=1;var t=_x();return Ul.createRoot=t.createRoot,Ul.hydrateRoot=t.hydrateRoot,Ul}var Ix=Tx();const fh=I.createContext({theme:"dark",setTheme:()=>{}});function Hl({children:t}){const[i,r]=I.useState(()=>localStorage.getItem("vec-theme")??"dark"),a=s=>{r(s),localStorage.setItem("vec-theme",s),document.documentElement.setAttribute("data-theme",s)};return I.useEffect(()=>{document.documentElement.setAttribute("data-theme",i)},[]),l.jsx(fh.Provider,{value:{theme:i,setTheme:a},children:t})}const Rx=()=>I.useContext(fh);function ph(){const t=sessionStorage.getItem("vec-api-key");if(t)return t;const i=new URLSearchParams(window.location.search),r=i.get("key")??i.get("KEY")??"";if(r){sessionStorage.setItem("vec-api-key",r);const a=window.location.pathname+window.location.hash;return window.history.replaceState({},"",a),r}return""}function sa(){const t=ph();return t?{"X-API-Key":t}:{}}function $r(t){const i=ph();if(!i)return t;const r=t.includes("?")?"&":"?";return`${t}${r}key=${encodeURIComponent(i)}`}function wt(t,i=3e3){const[r,a]=I.useState(null),[s,c]=I.useState(!0),[d,f]=I.useState(null),[h,g]=I.useState(null),y=I.useCallback(async()=>{try{const x=await fetch(t,{headers:sa()});if(x.status===401){f("Unauthorized — add ?key=YOUR_API_KEY to the dashboard URL");return}if(!x.ok)throw new Error(`HTTP ${x.status}`);const v=await x.json();a(v),g(new Date),f(null)}catch(x){f(String(x))}finally{c(!1)}},[t]);return I.useEffect(()=>{y();const x=setInterval(y,i);return()=>clearInterval(x)},[y,i]),{data:r,loading:s,error:d,lastRefresh:h,refresh:y}}async function st(t,i){const r=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",...sa()},body:JSON.stringify(i)});if(!r.ok)throw new Error(`HTTP ${r.status}`);return r.json()}async function Mx(t,i){const r=await fetch(t,{method:"PATCH",headers:{"Content-Type":"application/json",...sa()},body:JSON.stringify(i)});if(!r.ok)throw new Error(`HTTP ${r.status}`);return r.json()}async function hh(t){const i=await fetch(t,{method:"DELETE",headers:sa()});if(!i.ok)throw new Error(`HTTP ${i.status}`);return i.json()}const gh=I.createContext({employees:null,loading:!0,refresh:async()=>{}});function Ax({children:t}){const{data:i,loading:r,refresh:a}=wt("/api/employees",1e4);return l.jsx(gh.Provider,{value:{employees:i,loading:r,refresh:a},children:t})}function jr(){return I.useContext(gh)}/**
41
+ * @license lucide-react v0.575.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const mh=(...t)=>t.filter((i,r,a)=>!!i&&i.trim()!==""&&a.indexOf(i)===r).join(" ").trim();/**
46
+ * @license lucide-react v0.575.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */const Lx=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
51
+ * @license lucide-react v0.575.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */const Px=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,a)=>a?a.toUpperCase():r.toLowerCase());/**
56
+ * @license lucide-react v0.575.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const Jf=t=>{const i=Px(t);return i.charAt(0).toUpperCase()+i.slice(1)};/**
61
+ * @license lucide-react v0.575.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */var Dx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
66
+ * @license lucide-react v0.575.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const Nx=t=>{for(const i in t)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};/**
71
+ * @license lucide-react v0.575.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const Fx=I.forwardRef(({color:t="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:a,className:s="",children:c,iconNode:d,...f},h)=>I.createElement("svg",{ref:h,...Dx,width:i,height:i,stroke:t,strokeWidth:a?Number(r)*24/Number(i):r,className:mh("lucide",s),...!c&&!Nx(f)&&{"aria-hidden":"true"},...f},[...d.map(([g,y])=>I.createElement(g,y)),...Array.isArray(c)?c:[c]]));/**
76
+ * @license lucide-react v0.575.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const xe=(t,i)=>{const r=I.forwardRef(({className:a,...s},c)=>I.createElement(Fx,{ref:c,iconNode:i,className:mh(`lucide-${Lx(Jf(t))}`,`lucide-${t}`,a),...s}));return r.displayName=Jf(t),r};/**
81
+ * @license lucide-react v0.575.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const Ox=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],$x=xe("activity",Ox);/**
86
+ * @license lucide-react v0.575.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const Bx=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Wx=xe("arrow-up",Bx);/**
91
+ * @license lucide-react v0.575.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const Ux=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],xh=xe("box",Ux);/**
96
+ * @license lucide-react v0.575.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const Hx=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Vx=xe("brain",Hx);/**
101
+ * @license lucide-react v0.575.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const qx=[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]],yh=xe("briefcase",qx);/**
106
+ * @license lucide-react v0.575.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const Yx=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],Kx=xe("bug",Yx);/**
111
+ * @license lucide-react v0.575.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const Qx=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],zi=xe("building-2",Qx);/**
116
+ * @license lucide-react v0.575.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const Gx=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],Xx=xe("calendar-days",Gx);/**
121
+ * @license lucide-react v0.575.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const Zx=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],Jx=xe("chart-column",Zx);/**
126
+ * @license lucide-react v0.575.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const ey=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],ty=xe("chart-line",ey);/**
131
+ * @license lucide-react v0.575.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const ny=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ii=xe("check",ny);/**
136
+ * @license lucide-react v0.575.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const ry=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ei=xe("chevron-down",ry);/**
141
+ * @license lucide-react v0.575.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const iy=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],oy=xe("chevron-left",iy);/**
146
+ * @license lucide-react v0.575.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const ly=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ep=xe("chevron-right",ly);/**
151
+ * @license lucide-react v0.575.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const ay=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],tp=xe("chevron-up",ay);/**
156
+ * @license lucide-react v0.575.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const sy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],uy=xe("circle-stop",sy);/**
161
+ * @license lucide-react v0.575.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const cy=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],dy=xe("clipboard-list",cy);/**
166
+ * @license lucide-react v0.575.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const fy=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],py=xe("code",fy);/**
171
+ * @license lucide-react v0.575.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const hy=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],gy=xe("columns-3",hy);/**
176
+ * @license lucide-react v0.575.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const my=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}]],xy=xe("compass",my);/**
181
+ * @license lucide-react v0.575.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const yy=[["path",{d:"M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z",key:"1t2lqe"}],["path",{d:"M10 21.9V14L2.1 9.1",key:"o7czzq"}],["path",{d:"m10 14 11.9-6.9",key:"zm5e20"}],["path",{d:"M14 19.8v-8.1",key:"159ecu"}],["path",{d:"M18 17.5V9.4",key:"11uown"}]],vy=xe("container",yy);/**
186
+ * @license lucide-react v0.575.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const ky=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Cu=xe("cpu",ky);/**
191
+ * @license lucide-react v0.575.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const by=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],zu=xe("database",by);/**
196
+ * @license lucide-react v0.575.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const wy=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Sy=xe("external-link",wy);/**
201
+ * @license lucide-react v0.575.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const jy=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ua=xe("eye",jy);/**
206
+ * @license lucide-react v0.575.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const Cy=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],zy=xe("file-text",Cy);/**
211
+ * @license lucide-react v0.575.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const Ey=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]],_y=xe("flask-conical",Ey);/**
216
+ * @license lucide-react v0.575.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const Ty=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Iy=xe("folder-open",Ty);/**
221
+ * @license lucide-react v0.575.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const Ry=[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]],My=xe("gamepad-2",Ry);/**
226
+ * @license lucide-react v0.575.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const Ay=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Ly=xe("globe",Ay);/**
231
+ * @license lucide-react v0.575.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const Py=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],np=xe("hash",Py);/**
236
+ * @license lucide-react v0.575.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const Dy=[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]],Ny=xe("headphones",Dy);/**
241
+ * @license lucide-react v0.575.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const Fy=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],Oy=xe("inbox",Fy);/**
246
+ * @license lucide-react v0.575.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const $y=[["path",{d:"M6 3h12",key:"ggurg9"}],["path",{d:"M6 8h12",key:"6g4wlu"}],["path",{d:"m6 13 8.5 8",key:"u1kupk"}],["path",{d:"M6 13h3",key:"wdp6ag"}],["path",{d:"M9 13c6.667 0 6.667-10 0-10",key:"1nkvk2"}]],By=xe("indian-rupee",$y);/**
251
+ * @license lucide-react v0.575.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const Wy=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],Uy=xe("layout-dashboard",Wy);/**
256
+ * @license lucide-react v0.575.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const Hy=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],Vy=xe("layout-grid",Hy);/**
261
+ * @license lucide-react v0.575.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const qy=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],Yy=xe("list",qy);/**
266
+ * @license lucide-react v0.575.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const Ky=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],Qy=xe("lock",Ky);/**
271
+ * @license lucide-react v0.575.0 - ISC
272
+ *
273
+ * This source code is licensed under the ISC license.
274
+ * See the LICENSE file in the root directory of this source tree.
275
+ */const Gy=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],Xy=xe("maximize-2",Gy);/**
276
+ * @license lucide-react v0.575.0 - ISC
277
+ *
278
+ * This source code is licensed under the ISC license.
279
+ * See the LICENSE file in the root directory of this source tree.
280
+ */const Zy=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],vh=xe("message-square",Zy);/**
281
+ * @license lucide-react v0.575.0 - ISC
282
+ *
283
+ * This source code is licensed under the ISC license.
284
+ * See the LICENSE file in the root directory of this source tree.
285
+ */const Jy=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Vu=xe("monitor",Jy);/**
286
+ * @license lucide-react v0.575.0 - ISC
287
+ *
288
+ * This source code is licensed under the ISC license.
289
+ * See the LICENSE file in the root directory of this source tree.
290
+ */const e1=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],t1=xe("moon",e1);/**
291
+ * @license lucide-react v0.575.0 - ISC
292
+ *
293
+ * This source code is licensed under the ISC license.
294
+ * See the LICENSE file in the root directory of this source tree.
295
+ */const n1=[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]],r1=xe("navigation",n1);/**
296
+ * @license lucide-react v0.575.0 - ISC
297
+ *
298
+ * This source code is licensed under the ISC license.
299
+ * See the LICENSE file in the root directory of this source tree.
300
+ */const i1=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],rp=xe("package",i1);/**
301
+ * @license lucide-react v0.575.0 - ISC
302
+ *
303
+ * This source code is licensed under the ISC license.
304
+ * See the LICENSE file in the root directory of this source tree.
305
+ */const o1=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],kh=xe("palette",o1);/**
306
+ * @license lucide-react v0.575.0 - ISC
307
+ *
308
+ * This source code is licensed under the ISC license.
309
+ * See the LICENSE file in the root directory of this source tree.
310
+ */const l1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],a1=xe("panel-left-close",l1);/**
311
+ * @license lucide-react v0.575.0 - ISC
312
+ *
313
+ * This source code is licensed under the ISC license.
314
+ * See the LICENSE file in the root directory of this source tree.
315
+ */const s1=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],u1=xe("panel-left-open",s1);/**
316
+ * @license lucide-react v0.575.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */const c1=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],d1=xe("pencil",c1);/**
321
+ * @license lucide-react v0.575.0 - ISC
322
+ *
323
+ * This source code is licensed under the ISC license.
324
+ * See the LICENSE file in the root directory of this source tree.
325
+ */const f1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Or=xe("plus",f1);/**
326
+ * @license lucide-react v0.575.0 - ISC
327
+ *
328
+ * This source code is licensed under the ISC license.
329
+ * See the LICENSE file in the root directory of this source tree.
330
+ */const p1=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],ip=xe("power",p1);/**
331
+ * @license lucide-react v0.575.0 - ISC
332
+ *
333
+ * This source code is licensed under the ISC license.
334
+ * See the LICENSE file in the root directory of this source tree.
335
+ */const h1=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],g1=xe("radio",h1);/**
336
+ * @license lucide-react v0.575.0 - ISC
337
+ *
338
+ * This source code is licensed under the ISC license.
339
+ * See the LICENSE file in the root directory of this source tree.
340
+ */const m1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],x1=xe("refresh-cw",m1);/**
341
+ * @license lucide-react v0.575.0 - ISC
342
+ *
343
+ * This source code is licensed under the ISC license.
344
+ * See the LICENSE file in the root directory of this source tree.
345
+ */const y1=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],v1=xe("rocket",y1);/**
346
+ * @license lucide-react v0.575.0 - ISC
347
+ *
348
+ * This source code is licensed under the ISC license.
349
+ * See the LICENSE file in the root directory of this source tree.
350
+ */const k1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],b1=xe("rotate-ccw",k1);/**
351
+ * @license lucide-react v0.575.0 - ISC
352
+ *
353
+ * This source code is licensed under the ISC license.
354
+ * See the LICENSE file in the root directory of this source tree.
355
+ */const w1=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],bh=xe("save",w1);/**
356
+ * @license lucide-react v0.575.0 - ISC
357
+ *
358
+ * This source code is licensed under the ISC license.
359
+ * See the LICENSE file in the root directory of this source tree.
360
+ */const S1=[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]],j1=xe("scale",S1);/**
361
+ * @license lucide-react v0.575.0 - ISC
362
+ *
363
+ * This source code is licensed under the ISC license.
364
+ * See the LICENSE file in the root directory of this source tree.
365
+ */const C1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Wr=xe("search",C1);/**
366
+ * @license lucide-react v0.575.0 - ISC
367
+ *
368
+ * This source code is licensed under the ISC license.
369
+ * See the LICENSE file in the root directory of this source tree.
370
+ */const z1=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],qu=xe("server",z1);/**
371
+ * @license lucide-react v0.575.0 - ISC
372
+ *
373
+ * This source code is licensed under the ISC license.
374
+ * See the LICENSE file in the root directory of this source tree.
375
+ */const E1=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],_1=xe("settings-2",E1);/**
376
+ * @license lucide-react v0.575.0 - ISC
377
+ *
378
+ * This source code is licensed under the ISC license.
379
+ * See the LICENSE file in the root directory of this source tree.
380
+ */const T1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],I1=xe("settings",T1);/**
381
+ * @license lucide-react v0.575.0 - ISC
382
+ *
383
+ * This source code is licensed under the ISC license.
384
+ * See the LICENSE file in the root directory of this source tree.
385
+ */const R1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],M1=xe("shield-check",R1);/**
386
+ * @license lucide-react v0.575.0 - ISC
387
+ *
388
+ * This source code is licensed under the ISC license.
389
+ * See the LICENSE file in the root directory of this source tree.
390
+ */const A1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],eu=xe("shield",A1);/**
391
+ * @license lucide-react v0.575.0 - ISC
392
+ *
393
+ * This source code is licensed under the ISC license.
394
+ * See the LICENSE file in the root directory of this source tree.
395
+ */const L1=[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]],P1=xe("smartphone",L1);/**
396
+ * @license lucide-react v0.575.0 - ISC
397
+ *
398
+ * This source code is licensed under the ISC license.
399
+ * See the LICENSE file in the root directory of this source tree.
400
+ */const D1=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],N1=xe("sparkles",D1);/**
401
+ * @license lucide-react v0.575.0 - ISC
402
+ *
403
+ * This source code is licensed under the ISC license.
404
+ * See the LICENSE file in the root directory of this source tree.
405
+ */const F1=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],O1=xe("star",F1);/**
406
+ * @license lucide-react v0.575.0 - ISC
407
+ *
408
+ * This source code is licensed under the ISC license.
409
+ * See the LICENSE file in the root directory of this source tree.
410
+ */const $1=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],B1=xe("sun",$1);/**
411
+ * @license lucide-react v0.575.0 - ISC
412
+ *
413
+ * This source code is licensed under the ISC license.
414
+ * See the LICENSE file in the root directory of this source tree.
415
+ */const W1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Sr=xe("trash-2",W1);/**
416
+ * @license lucide-react v0.575.0 - ISC
417
+ *
418
+ * This source code is licensed under the ISC license.
419
+ * See the LICENSE file in the root directory of this source tree.
420
+ */const U1=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],H1=xe("triangle-alert",U1);/**
421
+ * @license lucide-react v0.575.0 - ISC
422
+ *
423
+ * This source code is licensed under the ISC license.
424
+ * See the LICENSE file in the root directory of this source tree.
425
+ */const V1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],Zl=xe("user-plus",V1);/**
426
+ * @license lucide-react v0.575.0 - ISC
427
+ *
428
+ * This source code is licensed under the ISC license.
429
+ * See the LICENSE file in the root directory of this source tree.
430
+ */const q1=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],wi=xe("users",q1);/**
431
+ * @license lucide-react v0.575.0 - ISC
432
+ *
433
+ * This source code is licensed under the ISC license.
434
+ * See the LICENSE file in the root directory of this source tree.
435
+ */const Y1=[["path",{d:"m10.586 5.414-5.172 5.172",key:"4mc350"}],["path",{d:"m18.586 13.414-5.172 5.172",key:"8c96vv"}],["path",{d:"M6 12h12",key:"8npq4p"}],["circle",{cx:"12",cy:"20",r:"2",key:"144qzu"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}],["circle",{cx:"20",cy:"12",r:"2",key:"1xzzfp"}],["circle",{cx:"4",cy:"12",r:"2",key:"1hvhnz"}]],K1=xe("waypoints",Y1);/**
436
+ * @license lucide-react v0.575.0 - ISC
437
+ *
438
+ * This source code is licensed under the ISC license.
439
+ * See the LICENSE file in the root directory of this source tree.
440
+ */const Q1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Rn=xe("x",Q1);/**
441
+ * @license lucide-react v0.575.0 - ISC
442
+ *
443
+ * This source code is licensed under the ISC license.
444
+ * See the LICENSE file in the root directory of this source tree.
445
+ */const G1=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],X1=xe("zap",G1);/**
446
+ * @license lucide-react v0.575.0 - ISC
447
+ *
448
+ * This source code is licensed under the ISC license.
449
+ * See the LICENSE file in the root directory of this source tree.
450
+ */const Z1=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],wh=xe("zoom-in",Z1);/**
451
+ * @license lucide-react v0.575.0 - ISC
452
+ *
453
+ * This source code is licensed under the ISC license.
454
+ * See the LICENSE file in the root directory of this source tree.
455
+ */const J1=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]],Sh=xe("zoom-out",J1),e0=[{id:"dark",label:"Dark",icon:l.jsx(t1,{size:15}),desc:"Notion dark"},{id:"light",label:"Light",icon:l.jsx(B1,{size:15}),desc:"Notion light"},{id:"midnight",label:"Midnight",icon:l.jsx(N1,{size:15}),desc:"Deep indigo"}];function t0({onClose:t}){const{theme:i,setTheme:r}=Rx();return l.jsxs("div",{style:{position:"fixed",bottom:64,left:12,width:210,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:8,boxShadow:"var(--shadow-lg)",zIndex:1e3,overflow:"hidden"},children:[l.jsx("div",{style:{padding:"10px 14px 7px",fontSize:10.5,fontWeight:700,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.07em"},children:"Theme"}),e0.map(a=>l.jsxs("button",{className:`theme-option${i===a.id?" theme-active":""}`,onClick:()=>{r(a.id),t()},children:[l.jsx("span",{style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:7,background:i===a.id?"var(--accent-subtle)":"var(--bg-hover)",color:i===a.id?"var(--accent-light)":"var(--text-muted)",flexShrink:0},children:a.icon}),l.jsxs("div",{style:{flex:1},children:[l.jsx("div",{style:{fontSize:13,fontWeight:i===a.id?600:400},children:a.label}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:1},children:a.desc})]}),i===a.id&&l.jsx("span",{style:{color:"var(--accent-light)",display:"flex"},children:l.jsx(Ii,{size:14})})]},a.id)),l.jsx("div",{style:{height:6}})]})}const vn=18,n0=[{id:"overview",label:"Overview",icon:l.jsx(Uy,{size:vn})},{id:"kanban",label:"Kanban",icon:l.jsx(gy,{size:vn})},{id:"live",label:"Live",icon:l.jsx(Vu,{size:vn})},{id:"events",label:"Events",icon:l.jsx(Xx,{size:vn})},{id:"snoop",label:"Snoop",icon:l.jsx(ua,{size:vn})},{id:"directory",label:"Directory",icon:l.jsx(wi,{size:vn})},{id:"chat",label:"Chat",icon:l.jsx(vh,{size:vn})},{id:"finance",label:"Finance",icon:l.jsx(By,{size:vn})},{id:"settings",label:"Settings",icon:l.jsx(I1,{size:vn})}],r0=240,i0=56,o0="0.28s",l0="cubic-bezier(0.4,0,0.2,1)",rn=`${o0} ${l0}`;function a0({activeView:t,setActiveView:i}){const[r,a]=I.useState(!1),[s,c]=I.useState(()=>localStorage.getItem("sidebar-collapsed")==="true");function d(){c(g=>{const y=!g;return localStorage.setItem("sidebar-collapsed",String(y)),y})}const f=s?i0:r0,h=s?11:12;return l.jsxs(l.Fragment,{children:[l.jsxs("nav",{style:{width:f,minWidth:f,background:"var(--bg-primary)",display:"flex",flexDirection:"column",flexShrink:0,userSelect:"none",overflow:"hidden",transition:`width ${rn}, min-width ${rn}`},children:[l.jsxs("div",{style:{height:52,display:"flex",alignItems:"center",padding:"0 10px",flexShrink:0,overflow:"hidden"},children:[l.jsx("div",{style:{width:28,height:28,borderRadius:7,background:"var(--accent)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:700,color:"#fff",flexShrink:0,opacity:s?0:1,marginRight:s?-28:10,transition:`opacity ${rn}, margin-right ${rn}`},children:"O"}),l.jsx("span",{style:{fontSize:15,fontWeight:600,color:"var(--text-primary)",letterSpacing:"-0.01em",flex:1,minWidth:0,opacity:s?0:1,overflow:"hidden",whiteSpace:"nowrap",transition:`opacity ${rn}`},children:"OCTO-VEC"}),l.jsxs("button",{onClick:d,title:s?"Expand sidebar":"Collapse sidebar",style:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"none",borderRadius:7,background:"transparent",color:"var(--text-muted)",cursor:"pointer",flexShrink:0,padding:0,transition:"background 0.1s, color 0.1s"},onMouseEnter:g=>{g.currentTarget.style.background="var(--bg-hover)",g.currentTarget.style.color="var(--text-primary)"},onMouseLeave:g=>{g.currentTarget.style.background="transparent",g.currentTarget.style.color="var(--text-muted)"},children:[l.jsx("span",{style:{position:"absolute",display:"flex",opacity:s?0:1,transition:`opacity ${rn}`},children:l.jsx(a1,{size:vn})}),l.jsx("span",{style:{position:"absolute",display:"flex",opacity:s?1:0,transition:`opacity ${rn}`},children:l.jsx(u1,{size:vn})})]})]}),l.jsx("div",{style:{flex:1,overflowY:"auto",overflowX:"hidden",padding:s?"4px 8px":"4px 10px",display:"flex",flexDirection:"column",gap:2,transition:`padding ${rn}`},children:n0.map(g=>{const y=t===g.id;return l.jsxs("button",{"data-tour-id":g.id,title:s?g.label:void 0,onClick:()=>i(g.id),style:{width:"100%",height:38,display:"flex",alignItems:"center",gap:10,border:"none",borderRadius:7,paddingLeft:h,paddingRight:12,paddingTop:0,paddingBottom:0,background:y?"var(--bg-hover)":"transparent",color:y?"var(--text-primary)":"var(--text-muted)",cursor:"pointer",fontFamily:"inherit",fontSize:14,fontWeight:y?500:400,textAlign:"left",whiteSpace:"nowrap",overflow:"hidden",transition:`background 0.08s, color 0.08s, padding-left ${rn}`},onMouseEnter:x=>{y||(x.currentTarget.style.background="var(--bg-hover)",x.currentTarget.style.color="var(--text-secondary)")},onMouseLeave:x=>{y||(x.currentTarget.style.background=y?"var(--bg-hover)":"transparent",x.currentTarget.style.color=y?"var(--text-primary)":"var(--text-muted)")},children:[l.jsx("span",{style:{display:"flex",flexShrink:0},children:g.icon}),l.jsx("span",{style:{opacity:s?0:1,transition:`opacity ${rn}`,overflow:"hidden"},children:g.label})]},g.id)})}),l.jsx("div",{style:{padding:s?"4px 8px 10px":"4px 10px 10px",transition:`padding ${rn}`},children:l.jsxs("button",{title:s?"Theme":void 0,onClick:()=>a(g=>!g),style:{width:"100%",height:38,display:"flex",alignItems:"center",gap:10,border:"none",borderRadius:7,paddingLeft:h,paddingRight:12,paddingTop:0,paddingBottom:0,background:r?"var(--bg-hover)":"transparent",color:r?"var(--text-primary)":"var(--text-muted)",cursor:"pointer",fontFamily:"inherit",fontSize:14,fontWeight:400,textAlign:"left",whiteSpace:"nowrap",overflow:"hidden",transition:`background 0.08s, padding-left ${rn}`},onMouseEnter:g=>{g.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:g=>{r||(g.currentTarget.style.background="transparent")},children:[l.jsx("span",{style:{display:"flex",flexShrink:0},children:l.jsx(kh,{size:vn})}),l.jsx("span",{style:{opacity:s?0:1,transition:`opacity ${rn}`,overflow:"hidden"},children:"Theme"})]})})]}),r&&l.jsx(t0,{onClose:()=>a(!1)}),r&&l.jsx("div",{style:{position:"fixed",inset:0,zIndex:999},onClick:()=>a(!1)})]})}function s0(t,i){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const u0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,c0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,d0={};function op(t,i){return(d0.jsx?c0:u0).test(t)}const f0=/[ \t\n\f\r]/g;function p0(t){return typeof t=="object"?t.type==="text"?lp(t.value):!1:lp(t)}function lp(t){return t.replace(f0,"")===""}class Io{constructor(i,r,a){this.normal=r,this.property=i,a&&(this.space=a)}}Io.prototype.normal={};Io.prototype.property={};Io.prototype.space=void 0;function jh(t,i){const r={},a={};for(const s of t)Object.assign(r,s.property),Object.assign(a,s.normal);return new Io(r,a,i)}function Eu(t){return t.toLowerCase()}class Zt{constructor(i,r){this.attribute=r,this.property=i}}Zt.prototype.attribute="";Zt.prototype.booleanish=!1;Zt.prototype.boolean=!1;Zt.prototype.commaOrSpaceSeparated=!1;Zt.prototype.commaSeparated=!1;Zt.prototype.defined=!1;Zt.prototype.mustUseProperty=!1;Zt.prototype.number=!1;Zt.prototype.overloadedBoolean=!1;Zt.prototype.property="";Zt.prototype.spaceSeparated=!1;Zt.prototype.space=void 0;let h0=0;const Be=Hr(),yt=Hr(),_u=Hr(),se=Hr(),nt=Hr(),ji=Hr(),an=Hr();function Hr(){return 2**++h0}const Tu=Object.freeze(Object.defineProperty({__proto__:null,boolean:Be,booleanish:yt,commaOrSpaceSeparated:an,commaSeparated:ji,number:se,overloadedBoolean:_u,spaceSeparated:nt},Symbol.toStringTag,{value:"Module"})),tu=Object.keys(Tu);class Yu extends Zt{constructor(i,r,a,s){let c=-1;if(super(i,r),ap(this,"space",s),typeof a=="number")for(;++c<tu.length;){const d=tu[c];ap(this,tu[c],(a&Tu[d])===Tu[d])}}}Yu.prototype.defined=!0;function ap(t,i,r){r&&(t[i]=r)}function Ri(t){const i={},r={};for(const[a,s]of Object.entries(t.properties)){const c=new Yu(a,t.transform(t.attributes||{},a),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(a)&&(c.mustUseProperty=!0),i[a]=c,r[Eu(a)]=a,r[Eu(c.attribute)]=a}return new Io(i,r,t.space)}const Ch=Ri({properties:{ariaActiveDescendant:null,ariaAtomic:yt,ariaAutoComplete:null,ariaBusy:yt,ariaChecked:yt,ariaColCount:se,ariaColIndex:se,ariaColSpan:se,ariaControls:nt,ariaCurrent:null,ariaDescribedBy:nt,ariaDetails:null,ariaDisabled:yt,ariaDropEffect:nt,ariaErrorMessage:null,ariaExpanded:yt,ariaFlowTo:nt,ariaGrabbed:yt,ariaHasPopup:null,ariaHidden:yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nt,ariaLevel:se,ariaLive:null,ariaModal:yt,ariaMultiLine:yt,ariaMultiSelectable:yt,ariaOrientation:null,ariaOwns:nt,ariaPlaceholder:null,ariaPosInSet:se,ariaPressed:yt,ariaReadOnly:yt,ariaRelevant:null,ariaRequired:yt,ariaRoleDescription:nt,ariaRowCount:se,ariaRowIndex:se,ariaRowSpan:se,ariaSelected:yt,ariaSetSize:se,ariaSort:null,ariaValueMax:se,ariaValueMin:se,ariaValueNow:se,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function zh(t,i){return i in t?t[i]:i}function Eh(t,i){return zh(t,i.toLowerCase())}const g0=Ri({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ji,acceptCharset:nt,accessKey:nt,action:null,allow:null,allowFullScreen:Be,allowPaymentRequest:Be,allowUserMedia:Be,alt:null,as:null,async:Be,autoCapitalize:null,autoComplete:nt,autoFocus:Be,autoPlay:Be,blocking:nt,capture:null,charSet:null,checked:Be,cite:null,className:nt,cols:se,colSpan:null,content:null,contentEditable:yt,controls:Be,controlsList:nt,coords:se|ji,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Be,defer:Be,dir:null,dirName:null,disabled:Be,download:_u,draggable:yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Be,formTarget:null,headers:nt,height:se,hidden:_u,high:se,href:null,hrefLang:null,htmlFor:nt,httpEquiv:nt,id:null,imageSizes:null,imageSrcSet:null,inert:Be,inputMode:null,integrity:null,is:null,isMap:Be,itemId:null,itemProp:nt,itemRef:nt,itemScope:Be,itemType:nt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Be,low:se,manifest:null,max:null,maxLength:se,media:null,method:null,min:null,minLength:se,multiple:Be,muted:Be,name:null,nonce:null,noModule:Be,noValidate:Be,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:Be,optimum:se,pattern:null,ping:nt,placeholder:null,playsInline:Be,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Be,referrerPolicy:null,rel:nt,required:Be,reversed:Be,rows:se,rowSpan:se,sandbox:nt,scope:null,scoped:Be,seamless:Be,selected:Be,shadowRootClonable:Be,shadowRootDelegatesFocus:Be,shadowRootMode:null,shape:null,size:se,sizes:null,slot:null,span:se,spellCheck:yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:se,step:null,style:null,tabIndex:se,target:null,title:null,translate:null,type:null,typeMustMatch:Be,useMap:null,value:yt,width:se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nt,axis:null,background:null,bgColor:null,border:se,borderColor:null,bottomMargin:se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Be,declare:Be,event:null,face:null,frame:null,frameBorder:null,hSpace:se,leftMargin:se,link:null,longDesc:null,lowSrc:null,marginHeight:se,marginWidth:se,noResize:Be,noHref:Be,noShade:Be,noWrap:Be,object:null,profile:null,prompt:null,rev:null,rightMargin:se,rules:null,scheme:null,scrolling:yt,standby:null,summary:null,text:null,topMargin:se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Be,disableRemotePlayback:Be,prefix:null,property:null,results:se,security:null,unselectable:null},space:"html",transform:Eh}),m0=Ri({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:an,accentHeight:se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:se,amplitude:se,arabicForm:null,ascent:se,attributeName:null,attributeType:null,azimuth:se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:se,by:null,calcMode:null,capHeight:se,className:nt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:se,diffuseConstant:se,direction:null,display:null,dur:null,divisor:se,dominantBaseline:null,download:Be,dx:null,dy:null,edgeMode:null,editable:null,elevation:se,enableBackground:null,end:null,event:null,exponent:se,externalResourcesRequired:null,fill:null,fillOpacity:se,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ji,g2:ji,glyphName:ji,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:se,horizOriginX:se,horizOriginY:se,id:null,ideographic:se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:se,k:se,k1:se,k2:se,k3:se,k4:se,kernelMatrix:an,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:se,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:se,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:se,overlineThickness:se,paintOrder:null,panose1:null,path:null,pathLength:se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:se,pointsAtY:se,pointsAtZ:se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:an,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:an,rev:an,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:an,requiredFeatures:an,requiredFonts:an,requiredFormats:an,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:se,specularExponent:se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:se,strikethroughThickness:se,string:null,stroke:null,strokeDashArray:an,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:se,strokeOpacity:se,strokeWidth:null,style:null,surfaceScale:se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:an,tabIndex:se,tableValues:null,target:null,targetX:se,targetY:se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:an,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:se,underlineThickness:se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:se,values:null,vAlphabetic:se,vMathematical:se,vectorEffect:null,vHanging:se,vIdeographic:se,version:null,vertAdvY:se,vertOriginX:se,vertOriginY:se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:zh}),_h=Ri({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,i){return"xlink:"+i.slice(5).toLowerCase()}}),Th=Ri({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Eh}),Ih=Ri({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),x0={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"},y0=/[A-Z]/g,sp=/-[a-z]/g,v0=/^data[-\w.:]+$/i;function k0(t,i){const r=Eu(i);let a=i,s=Zt;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&v0.test(i)){if(i.charAt(4)==="-"){const c=i.slice(5).replace(sp,w0);a="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=i.slice(4);if(!sp.test(c)){let d=c.replace(y0,b0);d.charAt(0)!=="-"&&(d="-"+d),i="data"+d}}s=Yu}return new s(a,i)}function b0(t){return"-"+t.toLowerCase()}function w0(t){return t.charAt(1).toUpperCase()}const S0=jh([Ch,g0,_h,Th,Ih],"html"),Ku=jh([Ch,m0,_h,Th,Ih],"svg");function j0(t){return t.join(" ").trim()}var pi={},nu,up;function C0(){if(up)return nu;up=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
456
+ `,g="/",y="*",x="",v="comment",k="declaration";function j(N,_){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];_=_||{};var U=1,w=1;function T(J){var K=J.match(i);K&&(U+=K.length);var he=J.lastIndexOf(h);w=~he?J.length-he:w+J.length}function q(){var J={line:U,column:w};return function(K){return K.position=new P(J),me(),K}}function P(J){this.start=J,this.end={line:U,column:w},this.source=_.source}P.prototype.content=N;function X(J){var K=new Error(_.source+":"+U+":"+w+": "+J);if(K.reason=J,K.filename=_.source,K.line=U,K.column=w,K.source=N,!_.silent)throw K}function oe(J){var K=J.exec(N);if(K){var he=K[0];return T(he),N=N.slice(he.length),K}}function me(){oe(r)}function E(J){var K;for(J=J||[];K=Q();)K!==!1&&J.push(K);return J}function Q(){var J=q();if(!(g!=N.charAt(0)||y!=N.charAt(1))){for(var K=2;x!=N.charAt(K)&&(y!=N.charAt(K)||g!=N.charAt(K+1));)++K;if(K+=2,x===N.charAt(K-1))return X("End of comment missing");var he=N.slice(2,K-2);return w+=2,T(he),N=N.slice(K),w+=2,J({type:v,comment:he})}}function Y(){var J=q(),K=oe(a);if(K){if(Q(),!oe(s))return X("property missing ':'");var he=oe(c),le=J({type:k,property:M(K[0].replace(t,x)),value:he?M(he[0].replace(t,x)):x});return oe(d),le}}function de(){var J=[];E(J);for(var K;K=Y();)K!==!1&&(J.push(K),E(J));return J}return me(),de()}function M(N){return N?N.replace(f,x):x}return nu=j,nu}var cp;function z0(){if(cp)return pi;cp=1;var t=pi&&pi.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(pi,"__esModule",{value:!0}),pi.default=r;const i=t(C0());function r(a,s){let c=null;if(!a||typeof a!="string")return c;const d=(0,i.default)(a),f=typeof s=="function";return d.forEach(h=>{if(h.type!=="declaration")return;const{property:g,value:y}=h;f?s(g,y,h):y&&(c=c||{},c[g]=y)}),c}return pi}var xo={},dp;function E0(){if(dp)return xo;dp=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,c=function(g){return!g||r.test(g)||t.test(g)},d=function(g,y){return y.toUpperCase()},f=function(g,y){return"".concat(y,"-")},h=function(g,y){return y===void 0&&(y={}),c(g)?g:(g=g.toLowerCase(),y.reactCompat?g=g.replace(s,f):g=g.replace(a,f),g.replace(i,d))};return xo.camelCase=h,xo}var yo,fp;function _0(){if(fp)return yo;fp=1;var t=yo&&yo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},i=t(z0()),r=E0();function a(s,c){var d={};return!s||typeof s!="string"||(0,i.default)(s,function(f,h){f&&h&&(d[(0,r.camelCase)(f,c)]=h)}),d}return a.default=a,yo=a,yo}var T0=_0();const I0=dh(T0),Rh=Mh("end"),Qu=Mh("start");function Mh(t){return i;function i(r){const a=r&&r.position&&r.position[t]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function R0(t){const i=Qu(t),r=Rh(t);if(i&&r)return{start:i,end:r}}function jo(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?pp(t.position):"start"in t||"end"in t?pp(t):"line"in t||"column"in t?Iu(t):""}function Iu(t){return hp(t&&t.line)+":"+hp(t&&t.column)}function pp(t){return Iu(t&&t.start)+"-"+Iu(t&&t.end)}function hp(t){return t&&typeof t=="number"?t:1}class $t extends Error{constructor(i,r,a){super(),typeof r=="string"&&(a=r,r=void 0);let s="",c={},d=!1;if(r&&("line"in r&&"column"in r?c={place:r}:"start"in r&&"end"in r?c={place:r}:"type"in r?c={ancestors:[r],place:r.position}:c={...r}),typeof i=="string"?s=i:!c.cause&&i&&(d=!0,s=i.message,c.cause=i),!c.ruleId&&!c.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?c.ruleId=a:(c.source=a.slice(0,h),c.ruleId=a.slice(h+1))}if(!c.place&&c.ancestors&&c.ancestors){const h=c.ancestors[c.ancestors.length-1];h&&(c.place=h.position)}const f=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=jo(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=d&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}$t.prototype.file="";$t.prototype.name="";$t.prototype.reason="";$t.prototype.message="";$t.prototype.stack="";$t.prototype.column=void 0;$t.prototype.line=void 0;$t.prototype.ancestors=void 0;$t.prototype.cause=void 0;$t.prototype.fatal=void 0;$t.prototype.place=void 0;$t.prototype.ruleId=void 0;$t.prototype.source=void 0;const Gu={}.hasOwnProperty,M0=new Map,A0=/[A-Z]/g,L0=new Set(["table","tbody","thead","tfoot","tr"]),P0=new Set(["td","th"]),Ah="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function D0(t,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let a;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=H0(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=U0(r,i.jsx,i.jsxs)}const s={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:a,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?Ku:S0,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},c=Lh(s,t,void 0);return c&&typeof c!="string"?c:s.create(t,s.Fragment,{children:c||void 0},void 0)}function Lh(t,i,r){if(i.type==="element")return N0(t,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return F0(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return $0(t,i,r);if(i.type==="mdxjsEsm")return O0(t,i);if(i.type==="root")return B0(t,i,r);if(i.type==="text")return W0(t,i)}function N0(t,i,r){const a=t.schema;let s=a;i.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=Ku,t.schema=s),t.ancestors.push(i);const c=Dh(t,i.tagName,!1),d=V0(t,i);let f=Zu(t,i);return L0.has(i.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!p0(h):!0})),Ph(t,d,c,i),Xu(d,f),t.ancestors.pop(),t.schema=a,t.create(i,c,d,r)}function F0(t,i){if(i.data&&i.data.estree&&t.evaluater){const a=i.data.estree.body[0];return a.type,t.evaluater.evaluateExpression(a.expression)}_o(t,i.position)}function O0(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);_o(t,i.position)}function $0(t,i,r){const a=t.schema;let s=a;i.name==="svg"&&a.space==="html"&&(s=Ku,t.schema=s),t.ancestors.push(i);const c=i.name===null?t.Fragment:Dh(t,i.name,!0),d=q0(t,i),f=Zu(t,i);return Ph(t,d,c,i),Xu(d,f),t.ancestors.pop(),t.schema=a,t.create(i,c,d,r)}function B0(t,i,r){const a={};return Xu(a,Zu(t,i)),t.create(i,t.Fragment,a,r)}function W0(t,i){return i.value}function Ph(t,i,r,a){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(i.node=a)}function Xu(t,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(t.children=r)}}function U0(t,i,r){return a;function a(s,c,d,f){const g=Array.isArray(d.children)?r:i;return f?g(c,d,f):g(c,d)}}function H0(t,i){return r;function r(a,s,c,d){const f=Array.isArray(c.children),h=Qu(a);return i(s,c,d,f,{columnNumber:h?h.column-1:void 0,fileName:t,lineNumber:h?h.line:void 0},void 0)}}function V0(t,i){const r={};let a,s;for(s in i.properties)if(s!=="children"&&Gu.call(i.properties,s)){const c=Y0(t,s,i.properties[s]);if(c){const[d,f]=c;t.tableCellAlignToStyle&&d==="align"&&typeof f=="string"&&P0.has(i.tagName)?a=f:r[d]=f}}if(a){const c=r.style||(r.style={});c[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return r}function q0(t,i){const r={};for(const a of i.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&t.evaluater){const c=a.data.estree.body[0];c.type;const d=c.expression;d.type;const f=d.properties[0];f.type,Object.assign(r,t.evaluater.evaluateExpression(f.argument))}else _o(t,i.position);else{const s=a.name;let c;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&t.evaluater){const f=a.value.data.estree.body[0];f.type,c=t.evaluater.evaluateExpression(f.expression)}else _o(t,i.position);else c=a.value===null?!0:a.value;r[s]=c}return r}function Zu(t,i){const r=[];let a=-1;const s=t.passKeys?new Map:M0;for(;++a<i.children.length;){const c=i.children[a];let d;if(t.passKeys){const h=c.type==="element"?c.tagName:c.type==="mdxJsxFlowElement"||c.type==="mdxJsxTextElement"?c.name:void 0;if(h){const g=s.get(h)||0;d=h+"-"+g,s.set(h,g+1)}}const f=Lh(t,c,d);f!==void 0&&r.push(f)}return r}function Y0(t,i,r){const a=k0(t.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=a.commaSeparated?s0(r):j0(r)),a.property==="style"){let s=typeof r=="object"?r:K0(t,String(r));return t.stylePropertyNameCase==="css"&&(s=Q0(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&a.space?x0[a.property]||a.property:a.attribute,r]}}function K0(t,i){try{return I0(i,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const a=r,s=new $t("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=Ah+"#cannot-parse-style-attribute",s}}function Dh(t,i,r){let a;if(!r)a={type:"Literal",value:i};else if(i.includes(".")){const s=i.split(".");let c=-1,d;for(;++c<s.length;){const f=op(s[c])?{type:"Identifier",name:s[c]}:{type:"Literal",value:s[c]};d=d?{type:"MemberExpression",object:d,property:f,computed:!!(c&&f.type==="Literal"),optional:!1}:f}a=d}else a=op(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(a.type==="Literal"){const s=a.value;return Gu.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(a);_o(t)}function _o(t,i){const r=new $t("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=Ah+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Q0(t){const i={};let r;for(r in t)Gu.call(t,r)&&(i[G0(r)]=t[r]);return i}function G0(t){let i=t.replace(A0,X0);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function X0(t){return"-"+t.toLowerCase()}const ru={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"]},Z0={};function Ju(t,i){const r=Z0,a=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,s=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Nh(t,a,s)}function Nh(t,i,r){if(J0(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(i&&"alt"in t&&t.alt)return t.alt;if("children"in t)return gp(t.children,i,r)}return Array.isArray(t)?gp(t,i,r):""}function gp(t,i,r){const a=[];let s=-1;for(;++s<t.length;)a[s]=Nh(t[s],i,r);return a.join("")}function J0(t){return!!(t&&typeof t=="object")}const mp=document.createElement("i");function ec(t){const i="&"+t+";";mp.innerHTML=i;const r=mp.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===i?!1:r}function un(t,i,r,a){const s=t.length;let c=0,d;if(i<0?i=-i>s?0:s+i:i=i>s?s:i,r=r>0?r:0,a.length<1e4)d=Array.from(a),d.unshift(i,r),t.splice(...d);else for(r&&t.splice(i,r);c<a.length;)d=a.slice(c,c+1e4),d.unshift(i,0),t.splice(...d),c+=1e4,i+=1e4}function kn(t,i){return t.length>0?(un(t,t.length,0,i),t):i}const xp={}.hasOwnProperty;function Fh(t){const i={};let r=-1;for(;++r<t.length;)ev(i,t[r]);return i}function ev(t,i){let r;for(r in i){const s=(xp.call(t,r)?t[r]:void 0)||(t[r]={}),c=i[r];let d;if(c)for(d in c){xp.call(s,d)||(s[d]=[]);const f=c[d];tv(s[d],Array.isArray(f)?f:f?[f]:[])}}}function tv(t,i){let r=-1;const a=[];for(;++r<i.length;)(i[r].add==="after"?t:a).push(i[r]);un(t,0,0,a)}function Oh(t,i){const r=Number.parseInt(t,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function In(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ut=Cr(/[A-Za-z]/),Ot=Cr(/[\dA-Za-z]/),nv=Cr(/[#-'*+\--9=?A-Z^-~]/);function ra(t){return t!==null&&(t<32||t===127)}const Ru=Cr(/\d/),rv=Cr(/[\dA-Fa-f]/),iv=Cr(/[!-/:-@[-`{-~]/);function Ae(t){return t!==null&&t<-2}function Je(t){return t!==null&&(t<0||t===32)}function Ue(t){return t===-2||t===-1||t===32}const ca=Cr(new RegExp("\\p{P}|\\p{S}","u")),Ur=Cr(/\s/);function Cr(t){return i;function i(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function Mi(t){const i=[];let r=-1,a=0,s=0;for(;++r<t.length;){const c=t.charCodeAt(r);let d="";if(c===37&&Ot(t.charCodeAt(r+1))&&Ot(t.charCodeAt(r+2)))s=2;else if(c<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(c))||(d=String.fromCharCode(c));else if(c>55295&&c<57344){const f=t.charCodeAt(r+1);c<56320&&f>56319&&f<57344?(d=String.fromCharCode(c,f),s=1):d="�"}else d=String.fromCharCode(c);d&&(i.push(t.slice(a,r),encodeURIComponent(d)),a=r+s+1,d=""),s&&(r+=s,s=0)}return i.join("")+t.slice(a)}function Ve(t,i,r,a){const s=a?a-1:Number.POSITIVE_INFINITY;let c=0;return d;function d(h){return Ue(h)?(t.enter(r),f(h)):i(h)}function f(h){return Ue(h)&&c++<s?(t.consume(h),f):(t.exit(r),i(h))}}const ov={tokenize:lv};function lv(t){const i=t.attempt(this.parser.constructs.contentInitial,a,s);let r;return i;function a(f){if(f===null){t.consume(f);return}return t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Ve(t,i,"linePrefix")}function s(f){return t.enter("paragraph"),c(f)}function c(f){const h=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=h),r=h,d(f)}function d(f){if(f===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(f);return}return Ae(f)?(t.consume(f),t.exit("chunkText"),c):(t.consume(f),d)}}const av={tokenize:sv},yp={tokenize:uv};function sv(t){const i=this,r=[];let a=0,s,c,d;return f;function f(w){if(a<r.length){const T=r[a];return i.containerState=T[1],t.attempt(T[0].continuation,h,g)(w)}return g(w)}function h(w){if(a++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,s&&U();const T=i.events.length;let q=T,P;for(;q--;)if(i.events[q][0]==="exit"&&i.events[q][1].type==="chunkFlow"){P=i.events[q][1].end;break}_(a);let X=T;for(;X<i.events.length;)i.events[X][1].end={...P},X++;return un(i.events,q+1,0,i.events.slice(T)),i.events.length=X,g(w)}return f(w)}function g(w){if(a===r.length){if(!s)return v(w);if(s.currentConstruct&&s.currentConstruct.concrete)return j(w);i.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(yp,y,x)(w)}function y(w){return s&&U(),_(a),v(w)}function x(w){return i.parser.lazy[i.now().line]=a!==r.length,d=i.now().offset,j(w)}function v(w){return i.containerState={},t.attempt(yp,k,j)(w)}function k(w){return a++,r.push([i.currentConstruct,i.containerState]),v(w)}function j(w){if(w===null){s&&U(),_(0),t.consume(w);return}return s=s||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:c}),M(w)}function M(w){if(w===null){N(t.exit("chunkFlow"),!0),_(0),t.consume(w);return}return Ae(w)?(t.consume(w),N(t.exit("chunkFlow")),a=0,i.interrupt=void 0,f):(t.consume(w),M)}function N(w,T){const q=i.sliceStream(w);if(T&&q.push(null),w.previous=c,c&&(c.next=w),c=w,s.defineSkip(w.start),s.write(q),i.parser.lazy[w.start.line]){let P=s.events.length;for(;P--;)if(s.events[P][1].start.offset<d&&(!s.events[P][1].end||s.events[P][1].end.offset>d))return;const X=i.events.length;let oe=X,me,E;for(;oe--;)if(i.events[oe][0]==="exit"&&i.events[oe][1].type==="chunkFlow"){if(me){E=i.events[oe][1].end;break}me=!0}for(_(a),P=X;P<i.events.length;)i.events[P][1].end={...E},P++;un(i.events,oe+1,0,i.events.slice(X)),i.events.length=P}}function _(w){let T=r.length;for(;T-- >w;){const q=r[T];i.containerState=q[1],q[0].exit.call(i,t)}r.length=w}function U(){s.write([null]),c=void 0,s=void 0,i.containerState._closeFlow=void 0}}function uv(t,i,r){return Ve(t,t.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _i(t){if(t===null||Je(t)||Ur(t))return 1;if(ca(t))return 2}function da(t,i,r){const a=[];let s=-1;for(;++s<t.length;){const c=t[s].resolveAll;c&&!a.includes(c)&&(i=c(i,r),a.push(c))}return i}const Mu={name:"attention",resolveAll:cv,tokenize:dv};function cv(t,i){let r=-1,a,s,c,d,f,h,g,y;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(a=r;a--;)if(t[a][0]==="exit"&&t[a][1].type==="attentionSequence"&&t[a][1]._open&&i.sliceSerialize(t[a][1]).charCodeAt(0)===i.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[a][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[a][1].end.offset-t[a][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;h=t[a][1].end.offset-t[a][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const x={...t[a][1].end},v={...t[r][1].start};vp(x,-h),vp(v,h),d={type:h>1?"strongSequence":"emphasisSequence",start:x,end:{...t[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:v},c={type:h>1?"strongText":"emphasisText",start:{...t[a][1].end},end:{...t[r][1].start}},s={type:h>1?"strong":"emphasis",start:{...d.start},end:{...f.end}},t[a][1].end={...d.start},t[r][1].start={...f.end},g=[],t[a][1].end.offset-t[a][1].start.offset&&(g=kn(g,[["enter",t[a][1],i],["exit",t[a][1],i]])),g=kn(g,[["enter",s,i],["enter",d,i],["exit",d,i],["enter",c,i]]),g=kn(g,da(i.parser.constructs.insideSpan.null,t.slice(a+1,r),i)),g=kn(g,[["exit",c,i],["enter",f,i],["exit",f,i],["exit",s,i]]),t[r][1].end.offset-t[r][1].start.offset?(y=2,g=kn(g,[["enter",t[r][1],i],["exit",t[r][1],i]])):y=0,un(t,a-1,r-a+3,g),r=a+g.length-y-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function dv(t,i){const r=this.parser.constructs.attentionMarkers.null,a=this.previous,s=_i(a);let c;return d;function d(h){return c=h,t.enter("attentionSequence"),f(h)}function f(h){if(h===c)return t.consume(h),f;const g=t.exit("attentionSequence"),y=_i(h),x=!y||y===2&&s||r.includes(h),v=!s||s===2&&y||r.includes(a);return g._open=!!(c===42?x:x&&(s||!v)),g._close=!!(c===42?v:v&&(y||!x)),i(h)}}function vp(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const fv={name:"autolink",tokenize:pv};function pv(t,i,r){let a=0;return s;function s(k){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(k),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),c}function c(k){return Ut(k)?(t.consume(k),d):k===64?r(k):g(k)}function d(k){return k===43||k===45||k===46||Ot(k)?(a=1,f(k)):g(k)}function f(k){return k===58?(t.consume(k),a=0,h):(k===43||k===45||k===46||Ot(k))&&a++<32?(t.consume(k),f):(a=0,g(k))}function h(k){return k===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(k),t.exit("autolinkMarker"),t.exit("autolink"),i):k===null||k===32||k===60||ra(k)?r(k):(t.consume(k),h)}function g(k){return k===64?(t.consume(k),y):nv(k)?(t.consume(k),g):r(k)}function y(k){return Ot(k)?x(k):r(k)}function x(k){return k===46?(t.consume(k),a=0,y):k===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(k),t.exit("autolinkMarker"),t.exit("autolink"),i):v(k)}function v(k){if((k===45||Ot(k))&&a++<63){const j=k===45?v:x;return t.consume(k),j}return r(k)}}const Ro={partial:!0,tokenize:hv};function hv(t,i,r){return a;function a(c){return Ue(c)?Ve(t,s,"linePrefix")(c):s(c)}function s(c){return c===null||Ae(c)?i(c):r(c)}}const $h={continuation:{tokenize:mv},exit:xv,name:"blockQuote",tokenize:gv};function gv(t,i,r){const a=this;return s;function s(d){if(d===62){const f=a.containerState;return f.open||(t.enter("blockQuote",{_container:!0}),f.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(d),t.exit("blockQuoteMarker"),c}return r(d)}function c(d){return Ue(d)?(t.enter("blockQuotePrefixWhitespace"),t.consume(d),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(d))}}function mv(t,i,r){const a=this;return s;function s(d){return Ue(d)?Ve(t,c,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):c(d)}function c(d){return t.attempt($h,i,r)(d)}}function xv(t){t.exit("blockQuote")}const Bh={name:"characterEscape",tokenize:yv};function yv(t,i,r){return a;function a(c){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(c),t.exit("escapeMarker"),s}function s(c){return iv(c)?(t.enter("characterEscapeValue"),t.consume(c),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):r(c)}}const Wh={name:"characterReference",tokenize:vv};function vv(t,i,r){const a=this;let s=0,c,d;return f;function f(x){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(x),t.exit("characterReferenceMarker"),h}function h(x){return x===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(x),t.exit("characterReferenceMarkerNumeric"),g):(t.enter("characterReferenceValue"),c=31,d=Ot,y(x))}function g(x){return x===88||x===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(x),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),c=6,d=rv,y):(t.enter("characterReferenceValue"),c=7,d=Ru,y(x))}function y(x){if(x===59&&s){const v=t.exit("characterReferenceValue");return d===Ot&&!ec(a.sliceSerialize(v))?r(x):(t.enter("characterReferenceMarker"),t.consume(x),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return d(x)&&s++<c?(t.consume(x),y):r(x)}}const kp={partial:!0,tokenize:bv},bp={concrete:!0,name:"codeFenced",tokenize:kv};function kv(t,i,r){const a=this,s={partial:!0,tokenize:q};let c=0,d=0,f;return h;function h(P){return g(P)}function g(P){const X=a.events[a.events.length-1];return c=X&&X[1].type==="linePrefix"?X[2].sliceSerialize(X[1],!0).length:0,f=P,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(P)}function y(P){return P===f?(d++,t.consume(P),y):d<3?r(P):(t.exit("codeFencedFenceSequence"),Ue(P)?Ve(t,x,"whitespace")(P):x(P))}function x(P){return P===null||Ae(P)?(t.exit("codeFencedFence"),a.interrupt?i(P):t.check(kp,M,T)(P)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),v(P))}function v(P){return P===null||Ae(P)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),x(P)):Ue(P)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ve(t,k,"whitespace")(P)):P===96&&P===f?r(P):(t.consume(P),v)}function k(P){return P===null||Ae(P)?x(P):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),j(P))}function j(P){return P===null||Ae(P)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),x(P)):P===96&&P===f?r(P):(t.consume(P),j)}function M(P){return t.attempt(s,T,N)(P)}function N(P){return t.enter("lineEnding"),t.consume(P),t.exit("lineEnding"),_}function _(P){return c>0&&Ue(P)?Ve(t,U,"linePrefix",c+1)(P):U(P)}function U(P){return P===null||Ae(P)?t.check(kp,M,T)(P):(t.enter("codeFlowValue"),w(P))}function w(P){return P===null||Ae(P)?(t.exit("codeFlowValue"),U(P)):(t.consume(P),w)}function T(P){return t.exit("codeFenced"),i(P)}function q(P,X,oe){let me=0;return E;function E(K){return P.enter("lineEnding"),P.consume(K),P.exit("lineEnding"),Q}function Q(K){return P.enter("codeFencedFence"),Ue(K)?Ve(P,Y,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):Y(K)}function Y(K){return K===f?(P.enter("codeFencedFenceSequence"),de(K)):oe(K)}function de(K){return K===f?(me++,P.consume(K),de):me>=d?(P.exit("codeFencedFenceSequence"),Ue(K)?Ve(P,J,"whitespace")(K):J(K)):oe(K)}function J(K){return K===null||Ae(K)?(P.exit("codeFencedFence"),X(K)):oe(K)}}}function bv(t,i,r){const a=this;return s;function s(d){return d===null?r(d):(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),c)}function c(d){return a.parser.lazy[a.now().line]?r(d):i(d)}}const iu={name:"codeIndented",tokenize:Sv},wv={partial:!0,tokenize:jv};function Sv(t,i,r){const a=this;return s;function s(g){return t.enter("codeIndented"),Ve(t,c,"linePrefix",5)(g)}function c(g){const y=a.events[a.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?d(g):r(g)}function d(g){return g===null?h(g):Ae(g)?t.attempt(wv,d,h)(g):(t.enter("codeFlowValue"),f(g))}function f(g){return g===null||Ae(g)?(t.exit("codeFlowValue"),d(g)):(t.consume(g),f)}function h(g){return t.exit("codeIndented"),i(g)}}function jv(t,i,r){const a=this;return s;function s(d){return a.parser.lazy[a.now().line]?r(d):Ae(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),s):Ve(t,c,"linePrefix",5)(d)}function c(d){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?i(d):Ae(d)?s(d):r(d)}}const Cv={name:"codeText",previous:Ev,resolve:zv,tokenize:_v};function zv(t){let i=t.length-4,r=3,a,s;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[i][1].type==="lineEnding"||t[i][1].type==="space")){for(a=r;++a<i;)if(t[a][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(a=r-1,i++;++a<=i;)s===void 0?a!==i&&t[a][1].type!=="lineEnding"&&(s=a):(a===i||t[a][1].type==="lineEnding")&&(t[s][1].type="codeTextData",a!==s+2&&(t[s][1].end=t[a-1][1].end,t.splice(s+2,a-s-2),i-=a-s-2,a=s+2),s=void 0);return t}function Ev(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function _v(t,i,r){let a=0,s,c;return d;function d(x){return t.enter("codeText"),t.enter("codeTextSequence"),f(x)}function f(x){return x===96?(t.consume(x),a++,f):(t.exit("codeTextSequence"),h(x))}function h(x){return x===null?r(x):x===32?(t.enter("space"),t.consume(x),t.exit("space"),h):x===96?(c=t.enter("codeTextSequence"),s=0,y(x)):Ae(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),h):(t.enter("codeTextData"),g(x))}function g(x){return x===null||x===32||x===96||Ae(x)?(t.exit("codeTextData"),h(x)):(t.consume(x),g)}function y(x){return x===96?(t.consume(x),s++,y):s===a?(t.exit("codeTextSequence"),t.exit("codeText"),i(x)):(c.type="codeTextData",g(x))}}class Tv{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const a=r??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(i,a):i>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(i,r,a){const s=r||0;this.setCursor(Math.trunc(i));const c=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&vo(this.left,a),c.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),vo(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),vo(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);vo(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);vo(this.left,r.reverse())}}}function vo(t,i){let r=0;if(i.length<1e4)t.push(...i);else for(;r<i.length;)t.push(...i.slice(r,r+1e4)),r+=1e4}function Uh(t){const i={};let r=-1,a,s,c,d,f,h,g;const y=new Tv(t);for(;++r<y.length;){for(;r in i;)r=i[r];if(a=y.get(r),r&&a[1].type==="chunkFlow"&&y.get(r-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,c=0,c<h.length&&h[c][1].type==="lineEndingBlank"&&(c+=2),c<h.length&&h[c][1].type==="content"))for(;++c<h.length&&h[c][1].type!=="content";)h[c][1].type==="chunkText"&&(h[c][1]._isInFirstContentOfListItem=!0,c++);if(a[0]==="enter")a[1].contentType&&(Object.assign(i,Iv(y,r)),r=i[r],g=!0);else if(a[1]._container){for(c=r,s=void 0;c--;)if(d=y.get(c),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(s&&(y.get(s)[1].type="lineEndingBlank"),d[1].type="lineEnding",s=c);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;s&&(a[1].end={...y.get(s)[1].start},f=y.slice(s,r),f.unshift(a),y.splice(s,r-s+1,f))}}return un(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!g}function Iv(t,i){const r=t.get(i)[1],a=t.get(i)[2];let s=i-1;const c=[];let d=r._tokenizer;d||(d=a.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const f=d.events,h=[],g={};let y,x,v=-1,k=r,j=0,M=0;const N=[M];for(;k;){for(;t.get(++s)[1]!==k;);c.push(s),k._tokenizer||(y=a.sliceStream(k),k.next||y.push(null),x&&d.defineSkip(k.start),k._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(y),k._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),x=k,k=k.next}for(k=r;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(M=v+1,N.push(M),k._tokenizer=void 0,k.previous=void 0,k=k.next);for(d.events=[],k?(k._tokenizer=void 0,k.previous=void 0):N.pop(),v=N.length;v--;){const _=f.slice(N[v],N[v+1]),U=c.pop();h.push([U,U+_.length-1]),t.splice(U,2,_)}for(h.reverse(),v=-1;++v<h.length;)g[j+h[v][0]]=j+h[v][1],j+=h[v][1]-h[v][0]-1;return g}const Rv={resolve:Av,tokenize:Lv},Mv={partial:!0,tokenize:Pv};function Av(t){return Uh(t),t}function Lv(t,i){let r;return a;function a(f){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?c(f):Ae(f)?t.check(Mv,d,c)(f):(t.consume(f),s)}function c(f){return t.exit("chunkContent"),t.exit("content"),i(f)}function d(f){return t.consume(f),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,s}}function Pv(t,i,r){const a=this;return s;function s(d){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Ve(t,c,"linePrefix")}function c(d){if(d===null||Ae(d))return r(d);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?i(d):t.interrupt(a.parser.constructs.flow,r,i)(d)}}function Hh(t,i,r,a,s,c,d,f,h){const g=h||Number.POSITIVE_INFINITY;let y=0;return x;function x(_){return _===60?(t.enter(a),t.enter(s),t.enter(c),t.consume(_),t.exit(c),v):_===null||_===32||_===41||ra(_)?r(_):(t.enter(a),t.enter(d),t.enter(f),t.enter("chunkString",{contentType:"string"}),M(_))}function v(_){return _===62?(t.enter(c),t.consume(_),t.exit(c),t.exit(s),t.exit(a),i):(t.enter(f),t.enter("chunkString",{contentType:"string"}),k(_))}function k(_){return _===62?(t.exit("chunkString"),t.exit(f),v(_)):_===null||_===60||Ae(_)?r(_):(t.consume(_),_===92?j:k)}function j(_){return _===60||_===62||_===92?(t.consume(_),k):k(_)}function M(_){return!y&&(_===null||_===41||Je(_))?(t.exit("chunkString"),t.exit(f),t.exit(d),t.exit(a),i(_)):y<g&&_===40?(t.consume(_),y++,M):_===41?(t.consume(_),y--,M):_===null||_===32||_===40||ra(_)?r(_):(t.consume(_),_===92?N:M)}function N(_){return _===40||_===41||_===92?(t.consume(_),M):M(_)}}function Vh(t,i,r,a,s,c){const d=this;let f=0,h;return g;function g(k){return t.enter(a),t.enter(s),t.consume(k),t.exit(s),t.enter(c),y}function y(k){return f>999||k===null||k===91||k===93&&!h||k===94&&!f&&"_hiddenFootnoteSupport"in d.parser.constructs?r(k):k===93?(t.exit(c),t.enter(s),t.consume(k),t.exit(s),t.exit(a),i):Ae(k)?(t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),x(k))}function x(k){return k===null||k===91||k===93||Ae(k)||f++>999?(t.exit("chunkString"),y(k)):(t.consume(k),h||(h=!Ue(k)),k===92?v:x)}function v(k){return k===91||k===92||k===93?(t.consume(k),f++,x):x(k)}}function qh(t,i,r,a,s,c){let d;return f;function f(v){return v===34||v===39||v===40?(t.enter(a),t.enter(s),t.consume(v),t.exit(s),d=v===40?41:v,h):r(v)}function h(v){return v===d?(t.enter(s),t.consume(v),t.exit(s),t.exit(a),i):(t.enter(c),g(v))}function g(v){return v===d?(t.exit(c),h(d)):v===null?r(v):Ae(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),Ve(t,g,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===d||v===null||Ae(v)?(t.exit("chunkString"),g(v)):(t.consume(v),v===92?x:y)}function x(v){return v===d||v===92?(t.consume(v),y):y(v)}}function Co(t,i){let r;return a;function a(s){return Ae(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),r=!0,a):Ue(s)?Ve(t,a,r?"linePrefix":"lineSuffix")(s):i(s)}}const Dv={name:"definition",tokenize:Fv},Nv={partial:!0,tokenize:Ov};function Fv(t,i,r){const a=this;let s;return c;function c(k){return t.enter("definition"),d(k)}function d(k){return Vh.call(a,t,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(k)}function f(k){return s=In(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),k===58?(t.enter("definitionMarker"),t.consume(k),t.exit("definitionMarker"),h):r(k)}function h(k){return Je(k)?Co(t,g)(k):g(k)}function g(k){return Hh(t,y,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(k)}function y(k){return t.attempt(Nv,x,x)(k)}function x(k){return Ue(k)?Ve(t,v,"whitespace")(k):v(k)}function v(k){return k===null||Ae(k)?(t.exit("definition"),a.parser.defined.push(s),i(k)):r(k)}}function Ov(t,i,r){return a;function a(f){return Je(f)?Co(t,s)(f):r(f)}function s(f){return qh(t,c,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function c(f){return Ue(f)?Ve(t,d,"whitespace")(f):d(f)}function d(f){return f===null||Ae(f)?i(f):r(f)}}const $v={name:"hardBreakEscape",tokenize:Bv};function Bv(t,i,r){return a;function a(c){return t.enter("hardBreakEscape"),t.consume(c),s}function s(c){return Ae(c)?(t.exit("hardBreakEscape"),i(c)):r(c)}}const Wv={name:"headingAtx",resolve:Uv,tokenize:Hv};function Uv(t,i){let r=t.length-2,a=3,s,c;return t[a][1].type==="whitespace"&&(a+=2),r-2>a&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(a===r-1||r-4>a&&t[r-2][1].type==="whitespace")&&(r-=a+1===r?2:4),r>a&&(s={type:"atxHeadingText",start:t[a][1].start,end:t[r][1].end},c={type:"chunkText",start:t[a][1].start,end:t[r][1].end,contentType:"text"},un(t,a,r-a+1,[["enter",s,i],["enter",c,i],["exit",c,i],["exit",s,i]])),t}function Hv(t,i,r){let a=0;return s;function s(y){return t.enter("atxHeading"),c(y)}function c(y){return t.enter("atxHeadingSequence"),d(y)}function d(y){return y===35&&a++<6?(t.consume(y),d):y===null||Je(y)?(t.exit("atxHeadingSequence"),f(y)):r(y)}function f(y){return y===35?(t.enter("atxHeadingSequence"),h(y)):y===null||Ae(y)?(t.exit("atxHeading"),i(y)):Ue(y)?Ve(t,f,"whitespace")(y):(t.enter("atxHeadingText"),g(y))}function h(y){return y===35?(t.consume(y),h):(t.exit("atxHeadingSequence"),f(y))}function g(y){return y===null||y===35||Je(y)?(t.exit("atxHeadingText"),f(y)):(t.consume(y),g)}}const Vv=["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"],wp=["pre","script","style","textarea"],qv={concrete:!0,name:"htmlFlow",resolveTo:Qv,tokenize:Gv},Yv={partial:!0,tokenize:Zv},Kv={partial:!0,tokenize:Xv};function Qv(t){let i=t.length;for(;i--&&!(t[i][0]==="enter"&&t[i][1].type==="htmlFlow"););return i>1&&t[i-2][1].type==="linePrefix"&&(t[i][1].start=t[i-2][1].start,t[i+1][1].start=t[i-2][1].start,t.splice(i-2,2)),t}function Gv(t,i,r){const a=this;let s,c,d,f,h;return g;function g(C){return y(C)}function y(C){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(C),x}function x(C){return C===33?(t.consume(C),v):C===47?(t.consume(C),c=!0,M):C===63?(t.consume(C),s=3,a.interrupt?i:S):Ut(C)?(t.consume(C),d=String.fromCharCode(C),N):r(C)}function v(C){return C===45?(t.consume(C),s=2,k):C===91?(t.consume(C),s=5,f=0,j):Ut(C)?(t.consume(C),s=4,a.interrupt?i:S):r(C)}function k(C){return C===45?(t.consume(C),a.interrupt?i:S):r(C)}function j(C){const ge="CDATA[";return C===ge.charCodeAt(f++)?(t.consume(C),f===ge.length?a.interrupt?i:Y:j):r(C)}function M(C){return Ut(C)?(t.consume(C),d=String.fromCharCode(C),N):r(C)}function N(C){if(C===null||C===47||C===62||Je(C)){const ge=C===47,je=d.toLowerCase();return!ge&&!c&&wp.includes(je)?(s=1,a.interrupt?i(C):Y(C)):Vv.includes(d.toLowerCase())?(s=6,ge?(t.consume(C),_):a.interrupt?i(C):Y(C)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?r(C):c?U(C):w(C))}return C===45||Ot(C)?(t.consume(C),d+=String.fromCharCode(C),N):r(C)}function _(C){return C===62?(t.consume(C),a.interrupt?i:Y):r(C)}function U(C){return Ue(C)?(t.consume(C),U):E(C)}function w(C){return C===47?(t.consume(C),E):C===58||C===95||Ut(C)?(t.consume(C),T):Ue(C)?(t.consume(C),w):E(C)}function T(C){return C===45||C===46||C===58||C===95||Ot(C)?(t.consume(C),T):q(C)}function q(C){return C===61?(t.consume(C),P):Ue(C)?(t.consume(C),q):w(C)}function P(C){return C===null||C===60||C===61||C===62||C===96?r(C):C===34||C===39?(t.consume(C),h=C,X):Ue(C)?(t.consume(C),P):oe(C)}function X(C){return C===h?(t.consume(C),h=null,me):C===null||Ae(C)?r(C):(t.consume(C),X)}function oe(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Je(C)?q(C):(t.consume(C),oe)}function me(C){return C===47||C===62||Ue(C)?w(C):r(C)}function E(C){return C===62?(t.consume(C),Q):r(C)}function Q(C){return C===null||Ae(C)?Y(C):Ue(C)?(t.consume(C),Q):r(C)}function Y(C){return C===45&&s===2?(t.consume(C),he):C===60&&s===1?(t.consume(C),le):C===62&&s===4?(t.consume(C),A):C===63&&s===3?(t.consume(C),S):C===93&&s===5?(t.consume(C),G):Ae(C)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(Yv,V,de)(C)):C===null||Ae(C)?(t.exit("htmlFlowData"),de(C)):(t.consume(C),Y)}function de(C){return t.check(Kv,J,V)(C)}function J(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),K}function K(C){return C===null||Ae(C)?de(C):(t.enter("htmlFlowData"),Y(C))}function he(C){return C===45?(t.consume(C),S):Y(C)}function le(C){return C===47?(t.consume(C),d="",Z):Y(C)}function Z(C){if(C===62){const ge=d.toLowerCase();return wp.includes(ge)?(t.consume(C),A):Y(C)}return Ut(C)&&d.length<8?(t.consume(C),d+=String.fromCharCode(C),Z):Y(C)}function G(C){return C===93?(t.consume(C),S):Y(C)}function S(C){return C===62?(t.consume(C),A):C===45&&s===2?(t.consume(C),S):Y(C)}function A(C){return C===null||Ae(C)?(t.exit("htmlFlowData"),V(C)):(t.consume(C),A)}function V(C){return t.exit("htmlFlow"),i(C)}}function Xv(t,i,r){const a=this;return s;function s(d){return Ae(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),c):r(d)}function c(d){return a.parser.lazy[a.now().line]?r(d):i(d)}}function Zv(t,i,r){return a;function a(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(Ro,i,r)}}const Jv={name:"htmlText",tokenize:ek};function ek(t,i,r){const a=this;let s,c,d;return f;function f(S){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(S),h}function h(S){return S===33?(t.consume(S),g):S===47?(t.consume(S),q):S===63?(t.consume(S),w):Ut(S)?(t.consume(S),oe):r(S)}function g(S){return S===45?(t.consume(S),y):S===91?(t.consume(S),c=0,j):Ut(S)?(t.consume(S),U):r(S)}function y(S){return S===45?(t.consume(S),k):r(S)}function x(S){return S===null?r(S):S===45?(t.consume(S),v):Ae(S)?(d=x,le(S)):(t.consume(S),x)}function v(S){return S===45?(t.consume(S),k):x(S)}function k(S){return S===62?he(S):S===45?v(S):x(S)}function j(S){const A="CDATA[";return S===A.charCodeAt(c++)?(t.consume(S),c===A.length?M:j):r(S)}function M(S){return S===null?r(S):S===93?(t.consume(S),N):Ae(S)?(d=M,le(S)):(t.consume(S),M)}function N(S){return S===93?(t.consume(S),_):M(S)}function _(S){return S===62?he(S):S===93?(t.consume(S),_):M(S)}function U(S){return S===null||S===62?he(S):Ae(S)?(d=U,le(S)):(t.consume(S),U)}function w(S){return S===null?r(S):S===63?(t.consume(S),T):Ae(S)?(d=w,le(S)):(t.consume(S),w)}function T(S){return S===62?he(S):w(S)}function q(S){return Ut(S)?(t.consume(S),P):r(S)}function P(S){return S===45||Ot(S)?(t.consume(S),P):X(S)}function X(S){return Ae(S)?(d=X,le(S)):Ue(S)?(t.consume(S),X):he(S)}function oe(S){return S===45||Ot(S)?(t.consume(S),oe):S===47||S===62||Je(S)?me(S):r(S)}function me(S){return S===47?(t.consume(S),he):S===58||S===95||Ut(S)?(t.consume(S),E):Ae(S)?(d=me,le(S)):Ue(S)?(t.consume(S),me):he(S)}function E(S){return S===45||S===46||S===58||S===95||Ot(S)?(t.consume(S),E):Q(S)}function Q(S){return S===61?(t.consume(S),Y):Ae(S)?(d=Q,le(S)):Ue(S)?(t.consume(S),Q):me(S)}function Y(S){return S===null||S===60||S===61||S===62||S===96?r(S):S===34||S===39?(t.consume(S),s=S,de):Ae(S)?(d=Y,le(S)):Ue(S)?(t.consume(S),Y):(t.consume(S),J)}function de(S){return S===s?(t.consume(S),s=void 0,K):S===null?r(S):Ae(S)?(d=de,le(S)):(t.consume(S),de)}function J(S){return S===null||S===34||S===39||S===60||S===61||S===96?r(S):S===47||S===62||Je(S)?me(S):(t.consume(S),J)}function K(S){return S===47||S===62||Je(S)?me(S):r(S)}function he(S){return S===62?(t.consume(S),t.exit("htmlTextData"),t.exit("htmlText"),i):r(S)}function le(S){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),Z}function Z(S){return Ue(S)?Ve(t,G,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):G(S)}function G(S){return t.enter("htmlTextData"),d(S)}}const tc={name:"labelEnd",resolveAll:ik,resolveTo:ok,tokenize:lk},tk={tokenize:ak},nk={tokenize:sk},rk={tokenize:uk};function ik(t){let i=-1;const r=[];for(;++i<t.length;){const a=t[i][1];if(r.push(t[i]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",i+=s}}return t.length!==r.length&&un(t,0,t.length,r),t}function ok(t,i){let r=t.length,a=0,s,c,d,f;for(;r--;)if(s=t[r][1],c){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[r][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(d){if(t[r][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(c=r,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(d=r);const h={type:t[c][1].type==="labelLink"?"link":"image",start:{...t[c][1].start},end:{...t[t.length-1][1].end}},g={type:"label",start:{...t[c][1].start},end:{...t[d][1].end}},y={type:"labelText",start:{...t[c+a+2][1].end},end:{...t[d-2][1].start}};return f=[["enter",h,i],["enter",g,i]],f=kn(f,t.slice(c+1,c+a+3)),f=kn(f,[["enter",y,i]]),f=kn(f,da(i.parser.constructs.insideSpan.null,t.slice(c+a+4,d-3),i)),f=kn(f,[["exit",y,i],t[d-2],t[d-1],["exit",g,i]]),f=kn(f,t.slice(d+1)),f=kn(f,[["exit",h,i]]),un(t,c,t.length,f),t}function lk(t,i,r){const a=this;let s=a.events.length,c,d;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){c=a.events[s][1];break}return f;function f(v){return c?c._inactive?x(v):(d=a.parser.defined.includes(In(a.sliceSerialize({start:c.end,end:a.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(v),t.exit("labelMarker"),t.exit("labelEnd"),h):r(v)}function h(v){return v===40?t.attempt(tk,y,d?y:x)(v):v===91?t.attempt(nk,y,d?g:x)(v):d?y(v):x(v)}function g(v){return t.attempt(rk,y,x)(v)}function y(v){return i(v)}function x(v){return c._balanced=!0,r(v)}}function ak(t,i,r){return a;function a(x){return t.enter("resource"),t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),s}function s(x){return Je(x)?Co(t,c)(x):c(x)}function c(x){return x===41?y(x):Hh(t,d,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function d(x){return Je(x)?Co(t,h)(x):y(x)}function f(x){return r(x)}function h(x){return x===34||x===39||x===40?qh(t,g,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):y(x)}function g(x){return Je(x)?Co(t,y)(x):y(x)}function y(x){return x===41?(t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),t.exit("resource"),i):r(x)}}function sk(t,i,r){const a=this;return s;function s(f){return Vh.call(a,t,c,d,"reference","referenceMarker","referenceString")(f)}function c(f){return a.parser.defined.includes(In(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?i(f):r(f)}function d(f){return r(f)}}function uk(t,i,r){return a;function a(c){return t.enter("reference"),t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),s}function s(c){return c===93?(t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),t.exit("reference"),i):r(c)}}const ck={name:"labelStartImage",resolveAll:tc.resolveAll,tokenize:dk};function dk(t,i,r){const a=this;return s;function s(f){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(f),t.exit("labelImageMarker"),c}function c(f){return f===91?(t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelImage"),d):r(f)}function d(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):i(f)}}const fk={name:"labelStartLink",resolveAll:tc.resolveAll,tokenize:pk};function pk(t,i,r){const a=this;return s;function s(d){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelLink"),c}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?r(d):i(d)}}const ou={name:"lineEnding",tokenize:hk};function hk(t,i){return r;function r(a){return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),Ve(t,i,"linePrefix")}}const Jl={name:"thematicBreak",tokenize:gk};function gk(t,i,r){let a=0,s;return c;function c(g){return t.enter("thematicBreak"),d(g)}function d(g){return s=g,f(g)}function f(g){return g===s?(t.enter("thematicBreakSequence"),h(g)):a>=3&&(g===null||Ae(g))?(t.exit("thematicBreak"),i(g)):r(g)}function h(g){return g===s?(t.consume(g),a++,h):(t.exit("thematicBreakSequence"),Ue(g)?Ve(t,f,"whitespace")(g):f(g))}}const Xt={continuation:{tokenize:vk},exit:bk,name:"list",tokenize:yk},mk={partial:!0,tokenize:wk},xk={partial:!0,tokenize:kk};function yk(t,i,r){const a=this,s=a.events[a.events.length-1];let c=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,d=0;return f;function f(k){const j=a.containerState.type||(k===42||k===43||k===45?"listUnordered":"listOrdered");if(j==="listUnordered"?!a.containerState.marker||k===a.containerState.marker:Ru(k)){if(a.containerState.type||(a.containerState.type=j,t.enter(j,{_container:!0})),j==="listUnordered")return t.enter("listItemPrefix"),k===42||k===45?t.check(Jl,r,g)(k):g(k);if(!a.interrupt||k===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),h(k)}return r(k)}function h(k){return Ru(k)&&++d<10?(t.consume(k),h):(!a.interrupt||d<2)&&(a.containerState.marker?k===a.containerState.marker:k===41||k===46)?(t.exit("listItemValue"),g(k)):r(k)}function g(k){return t.enter("listItemMarker"),t.consume(k),t.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||k,t.check(Ro,a.interrupt?r:y,t.attempt(mk,v,x))}function y(k){return a.containerState.initialBlankLine=!0,c++,v(k)}function x(k){return Ue(k)?(t.enter("listItemPrefixWhitespace"),t.consume(k),t.exit("listItemPrefixWhitespace"),v):r(k)}function v(k){return a.containerState.size=c+a.sliceSerialize(t.exit("listItemPrefix"),!0).length,i(k)}}function vk(t,i,r){const a=this;return a.containerState._closeFlow=void 0,t.check(Ro,s,c);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,Ve(t,i,"listItemIndent",a.containerState.size+1)(f)}function c(f){return a.containerState.furtherBlankLines||!Ue(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,d(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,t.attempt(xk,i,d)(f))}function d(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,Ve(t,t.attempt(Xt,i,r),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function kk(t,i,r){const a=this;return Ve(t,s,"listItemIndent",a.containerState.size+1);function s(c){const d=a.events[a.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===a.containerState.size?i(c):r(c)}}function bk(t){t.exit(this.containerState.type)}function wk(t,i,r){const a=this;return Ve(t,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(c){const d=a.events[a.events.length-1];return!Ue(c)&&d&&d[1].type==="listItemPrefixWhitespace"?i(c):r(c)}}const Sp={name:"setextUnderline",resolveTo:Sk,tokenize:jk};function Sk(t,i){let r=t.length,a,s,c;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){a=r;break}t[r][1].type==="paragraph"&&(s=r)}else t[r][1].type==="content"&&t.splice(r,1),!c&&t[r][1].type==="definition"&&(c=r);const d={type:"setextHeading",start:{...t[a][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",c?(t.splice(s,0,["enter",d,i]),t.splice(c+1,0,["exit",t[a][1],i]),t[a][1].end={...t[c][1].end}):t[a][1]=d,t.push(["exit",d,i]),t}function jk(t,i,r){const a=this;let s;return c;function c(g){let y=a.events.length,x;for(;y--;)if(a.events[y][1].type!=="lineEnding"&&a.events[y][1].type!=="linePrefix"&&a.events[y][1].type!=="content"){x=a.events[y][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||x)?(t.enter("setextHeadingLine"),s=g,d(g)):r(g)}function d(g){return t.enter("setextHeadingLineSequence"),f(g)}function f(g){return g===s?(t.consume(g),f):(t.exit("setextHeadingLineSequence"),Ue(g)?Ve(t,h,"lineSuffix")(g):h(g))}function h(g){return g===null||Ae(g)?(t.exit("setextHeadingLine"),i(g)):r(g)}}const Ck={tokenize:zk};function zk(t){const i=this,r=t.attempt(Ro,a,t.attempt(this.parser.constructs.flowInitial,s,Ve(t,t.attempt(this.parser.constructs.flow,s,t.attempt(Rv,s)),"linePrefix")));return r;function a(c){if(c===null){t.consume(c);return}return t.enter("lineEndingBlank"),t.consume(c),t.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function s(c){if(c===null){t.consume(c);return}return t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),i.currentConstruct=void 0,r}}const Ek={resolveAll:Kh()},_k=Yh("string"),Tk=Yh("text");function Yh(t){return{resolveAll:Kh(t==="text"?Ik:void 0),tokenize:i};function i(r){const a=this,s=this.parser.constructs[t],c=r.attempt(s,d,f);return d;function d(y){return g(y)?c(y):f(y)}function f(y){if(y===null){r.consume(y);return}return r.enter("data"),r.consume(y),h}function h(y){return g(y)?(r.exit("data"),c(y)):(r.consume(y),h)}function g(y){if(y===null)return!0;const x=s[y];let v=-1;if(x)for(;++v<x.length;){const k=x[v];if(!k.previous||k.previous.call(a,a.previous))return!0}return!1}}}function Kh(t){return i;function i(r,a){let s=-1,c;for(;++s<=r.length;)c===void 0?r[s]&&r[s][1].type==="data"&&(c=s,s++):(!r[s]||r[s][1].type!=="data")&&(s!==c+2&&(r[c][1].end=r[s-1][1].end,r.splice(c+2,s-c-2),s=c+2),c=void 0);return t?t(r,a):r}}function Ik(t,i){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const a=t[r-1][1],s=i.sliceStream(a);let c=s.length,d=-1,f=0,h;for(;c--;){const g=s[c];if(typeof g=="string"){for(d=g.length;g.charCodeAt(d-1)===32;)f++,d--;if(d)break;d=-1}else if(g===-2)h=!0,f++;else if(g!==-1){c++;break}}if(i._contentTypeTextTrailing&&r===t.length&&(f=0),f){const g={type:r===t.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?d:a.start._bufferIndex+d,_index:a.start._index+c,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...g.start},a.start.offset===a.end.offset?Object.assign(a,g):(t.splice(r,0,["enter",g,i],["exit",g,i]),r+=2)}r++}return t}const Rk={42:Xt,43:Xt,45:Xt,48:Xt,49:Xt,50:Xt,51:Xt,52:Xt,53:Xt,54:Xt,55:Xt,56:Xt,57:Xt,62:$h},Mk={91:Dv},Ak={[-2]:iu,[-1]:iu,32:iu},Lk={35:Wv,42:Jl,45:[Sp,Jl],60:qv,61:Sp,95:Jl,96:bp,126:bp},Pk={38:Wh,92:Bh},Dk={[-5]:ou,[-4]:ou,[-3]:ou,33:ck,38:Wh,42:Mu,60:[fv,Jv],91:fk,92:[$v,Bh],93:tc,95:Mu,96:Cv},Nk={null:[Mu,Ek]},Fk={null:[42,95]},Ok={null:[]},$k=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Fk,contentInitial:Mk,disable:Ok,document:Rk,flow:Lk,flowInitial:Ak,insideSpan:Nk,string:Pk,text:Dk},Symbol.toStringTag,{value:"Module"}));function Bk(t,i,r){let a={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const s={},c=[];let d=[],f=[];const h={attempt:X(q),check:X(P),consume:U,enter:w,exit:T,interrupt:X(P,{interrupt:!0})},g={code:null,containerState:{},defineSkip:M,events:[],now:j,parser:t,previous:null,sliceSerialize:v,sliceStream:k,write:x};let y=i.tokenize.call(g,h);return i.resolveAll&&c.push(i),g;function x(Q){return d=kn(d,Q),N(),d[d.length-1]!==null?[]:(oe(i,0),g.events=da(c,g.events,g),g.events)}function v(Q,Y){return Uk(k(Q),Y)}function k(Q){return Wk(d,Q)}function j(){const{_bufferIndex:Q,_index:Y,line:de,column:J,offset:K}=a;return{_bufferIndex:Q,_index:Y,line:de,column:J,offset:K}}function M(Q){s[Q.line]=Q.column,E()}function N(){let Q;for(;a._index<d.length;){const Y=d[a._index];if(typeof Y=="string")for(Q=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===Q&&a._bufferIndex<Y.length;)_(Y.charCodeAt(a._bufferIndex));else _(Y)}}function _(Q){y=y(Q)}function U(Q){Ae(Q)?(a.line++,a.column=1,a.offset+=Q===-3?2:1,E()):Q!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===d[a._index].length&&(a._bufferIndex=-1,a._index++)),g.previous=Q}function w(Q,Y){const de=Y||{};return de.type=Q,de.start=j(),g.events.push(["enter",de,g]),f.push(de),de}function T(Q){const Y=f.pop();return Y.end=j(),g.events.push(["exit",Y,g]),Y}function q(Q,Y){oe(Q,Y.from)}function P(Q,Y){Y.restore()}function X(Q,Y){return de;function de(J,K,he){let le,Z,G,S;return Array.isArray(J)?V(J):"tokenize"in J?V([J]):A(J);function A(ye){return H;function H(pe){const fe=pe!==null&&ye[pe],Te=pe!==null&&ye.null,Fe=[...Array.isArray(fe)?fe:fe?[fe]:[],...Array.isArray(Te)?Te:Te?[Te]:[]];return V(Fe)(pe)}}function V(ye){return le=ye,Z=0,ye.length===0?he:C(ye[Z])}function C(ye){return H;function H(pe){return S=me(),G=ye,ye.partial||(g.currentConstruct=ye),ye.name&&g.parser.constructs.disable.null.includes(ye.name)?je():ye.tokenize.call(Y?Object.assign(Object.create(g),Y):g,h,ge,je)(pe)}}function ge(ye){return Q(G,S),K}function je(ye){return S.restore(),++Z<le.length?C(le[Z]):he}}}function oe(Q,Y){Q.resolveAll&&!c.includes(Q)&&c.push(Q),Q.resolve&&un(g.events,Y,g.events.length-Y,Q.resolve(g.events.slice(Y),g)),Q.resolveTo&&(g.events=Q.resolveTo(g.events,g))}function me(){const Q=j(),Y=g.previous,de=g.currentConstruct,J=g.events.length,K=Array.from(f);return{from:J,restore:he};function he(){a=Q,g.previous=Y,g.currentConstruct=de,g.events.length=J,f=K,E()}}function E(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function Wk(t,i){const r=i.start._index,a=i.start._bufferIndex,s=i.end._index,c=i.end._bufferIndex;let d;if(r===s)d=[t[r].slice(a,c)];else{if(d=t.slice(r,s),a>-1){const f=d[0];typeof f=="string"?d[0]=f.slice(a):d.shift()}c>0&&d.push(t[s].slice(0,c))}return d}function Uk(t,i){let r=-1;const a=[];let s;for(;++r<t.length;){const c=t[r];let d;if(typeof c=="string")d=c;else switch(c){case-5:{d="\r";break}case-4:{d=`
457
+ `;break}case-3:{d=`\r
458
+ `;break}case-2:{d=i?" ":" ";break}case-1:{if(!i&&s)continue;d=" ";break}default:d=String.fromCharCode(c)}s=c===-2,a.push(d)}return a.join("")}function Hk(t){const a={constructs:Fh([$k,...(t||{}).extensions||[]]),content:s(ov),defined:[],document:s(av),flow:s(Ck),lazy:{},string:s(_k),text:s(Tk)};return a;function s(c){return d;function d(f){return Bk(a,c,f)}}}function Vk(t){for(;!Uh(t););return t}const jp=/[\0\t\n\r]/g;function qk(){let t=1,i="",r=!0,a;return s;function s(c,d,f){const h=[];let g,y,x,v,k;for(c=i+(typeof c=="string"?c.toString():new TextDecoder(d||void 0).decode(c)),x=0,i="",r&&(c.charCodeAt(0)===65279&&x++,r=void 0);x<c.length;){if(jp.lastIndex=x,g=jp.exec(c),v=g&&g.index!==void 0?g.index:c.length,k=c.charCodeAt(v),!g){i=c.slice(x);break}if(k===10&&x===v&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),x<v&&(h.push(c.slice(x,v)),t+=v-x),k){case 0:{h.push(65533),t++;break}case 9:{for(y=Math.ceil(t/4)*4,h.push(-2);t++<y;)h.push(-1);break}case 10:{h.push(-4),t=1;break}default:a=!0,t=1}x=v+1}return f&&(a&&h.push(-5),i&&h.push(i),h.push(null)),h}}const Yk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Kk(t){return t.replace(Yk,Qk)}function Qk(t,i,r){if(i)return i;if(r.charCodeAt(0)===35){const s=r.charCodeAt(1),c=s===120||s===88;return Oh(r.slice(c?2:1),c?16:10)}return ec(r)||t}const Qh={}.hasOwnProperty;function Gk(t,i,r){return i&&typeof i=="object"&&(r=i,i=void 0),Xk(r)(Vk(Hk(r).document().write(qk()(t,i,!0))))}function Xk(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(ee),autolinkProtocol:me,autolinkEmail:me,atxHeading:c(mt),blockQuote:c(Te),characterEscape:me,characterReference:me,codeFenced:c(Fe),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:c(Fe,d),codeText:c(Ze,d),codeTextData:me,data:me,codeFlowValue:me,definition:c(Ge),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:c(De),hardBreakEscape:c(Et),hardBreakTrailing:c(Et),htmlFlow:c(_t,d),htmlFlowData:me,htmlText:c(_t,d),htmlTextData:me,image:c(W),label:d,link:c(ee),listItem:c(ze),listItemValue:v,listOrdered:c(te,x),listUnordered:c(te),paragraph:c(Oe),reference:C,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:c(mt),strong:c(Ne),thematicBreak:c($e)},exit:{atxHeading:h(),atxHeadingSequence:q,autolink:h(),autolinkEmail:fe,autolinkProtocol:pe,blockQuote:h(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:je,characterReferenceMarkerNumeric:je,characterReferenceValue:ye,characterReference:H,codeFenced:h(N),codeFencedFence:M,codeFencedFenceInfo:k,codeFencedFenceMeta:j,codeFlowValue:E,codeIndented:h(_),codeText:h(K),codeTextData:E,data:E,definition:h(),definitionDestinationString:T,definitionLabelString:U,definitionTitleString:w,emphasis:h(),hardBreakEscape:h(Y),hardBreakTrailing:h(Y),htmlFlow:h(de),htmlFlowData:E,htmlText:h(J),htmlTextData:E,image:h(le),label:G,labelText:Z,lineEnding:Q,link:h(he),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:ge,resourceDestinationString:S,resourceTitleString:A,resource:V,setextHeading:h(oe),setextHeadingLineSequence:X,setextHeadingText:P,strong:h(),thematicBreak:h()}};Gh(i,(t||{}).mdastExtensions||[]);const r={};return a;function a(D){let ae={type:"root",children:[]};const Ee={stack:[ae],tokenStack:[],config:i,enter:f,exit:g,buffer:d,resume:y,data:r},Pe=[];let Ie=-1;for(;++Ie<D.length;)if(D[Ie][1].type==="listOrdered"||D[Ie][1].type==="listUnordered")if(D[Ie][0]==="enter")Pe.push(Ie);else{const pt=Pe.pop();Ie=s(D,pt,Ie)}for(Ie=-1;++Ie<D.length;){const pt=i[D[Ie][0]];Qh.call(pt,D[Ie][1].type)&&pt[D[Ie][1].type].call(Object.assign({sliceSerialize:D[Ie][2].sliceSerialize},Ee),D[Ie][1])}if(Ee.tokenStack.length>0){const pt=Ee.tokenStack[Ee.tokenStack.length-1];(pt[1]||Cp).call(Ee,void 0,pt[0])}for(ae.position={start:br(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:br(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<i.transforms.length;)ae=i.transforms[Ie](ae)||ae;return ae}function s(D,ae,Ee){let Pe=ae-1,Ie=-1,pt=!1,bn,Ht,wn,$n;for(;++Pe<=Ee;){const vt=D[Pe];switch(vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{vt[0]==="enter"?Ie++:Ie--,$n=void 0;break}case"lineEndingBlank":{vt[0]==="enter"&&(bn&&!$n&&!Ie&&!wn&&(wn=Pe),$n=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$n=void 0}if(!Ie&&vt[0]==="enter"&&vt[1].type==="listItemPrefix"||Ie===-1&&vt[0]==="exit"&&(vt[1].type==="listUnordered"||vt[1].type==="listOrdered")){if(bn){let cn=Pe;for(Ht=void 0;cn--;){const Tt=D[cn];if(Tt[1].type==="lineEnding"||Tt[1].type==="lineEndingBlank"){if(Tt[0]==="exit")continue;Ht&&(D[Ht][1].type="lineEndingBlank",pt=!0),Tt[1].type="lineEnding",Ht=cn}else if(!(Tt[1].type==="linePrefix"||Tt[1].type==="blockQuotePrefix"||Tt[1].type==="blockQuotePrefixWhitespace"||Tt[1].type==="blockQuoteMarker"||Tt[1].type==="listItemIndent"))break}wn&&(!Ht||wn<Ht)&&(bn._spread=!0),bn.end=Object.assign({},Ht?D[Ht][1].start:vt[1].end),D.splice(Ht||Pe,0,["exit",bn,vt[2]]),Pe++,Ee++}if(vt[1].type==="listItemPrefix"){const cn={type:"listItem",_spread:!1,start:Object.assign({},vt[1].start),end:void 0};bn=cn,D.splice(Pe,0,["enter",cn,vt[2]]),Pe++,Ee++,wn=void 0,$n=!0}}}return D[ae][1]._spread=pt,Ee}function c(D,ae){return Ee;function Ee(Pe){f.call(this,D(Pe),Pe),ae&&ae.call(this,Pe)}}function d(){this.stack.push({type:"fragment",children:[]})}function f(D,ae,Ee){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([ae,Ee||void 0]),D.position={start:br(ae.start),end:void 0}}function h(D){return ae;function ae(Ee){D&&D.call(this,Ee),g.call(this,Ee)}}function g(D,ae){const Ee=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==D.type&&(ae?ae.call(this,D,Pe[0]):(Pe[1]||Cp).call(this,D,Pe[0]));else throw new Error("Cannot close `"+D.type+"` ("+jo({start:D.start,end:D.end})+"): it’s not open");Ee.position.end=br(D.end)}function y(){return Ju(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function v(D){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function k(){const D=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=D}function j(){const D=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=D}function M(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const D=this.resume(),ae=this.stack[this.stack.length-1];ae.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const D=this.resume(),ae=this.stack[this.stack.length-1];ae.value=D.replace(/(\r?\n|\r)$/g,"")}function U(D){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ae,Ee.identifier=In(this.sliceSerialize(D)).toLowerCase()}function w(){const D=this.resume(),ae=this.stack[this.stack.length-1];ae.title=D}function T(){const D=this.resume(),ae=this.stack[this.stack.length-1];ae.url=D}function q(D){const ae=this.stack[this.stack.length-1];if(!ae.depth){const Ee=this.sliceSerialize(D).length;ae.depth=Ee}}function P(){this.data.setextHeadingSlurpLineEnding=!0}function X(D){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function oe(){this.data.setextHeadingSlurpLineEnding=void 0}function me(D){const Ee=this.stack[this.stack.length-1].children;let Pe=Ee[Ee.length-1];(!Pe||Pe.type!=="text")&&(Pe=ke(),Pe.position={start:br(D.start),end:void 0},Ee.push(Pe)),this.stack.push(Pe)}function E(D){const ae=this.stack.pop();ae.value+=this.sliceSerialize(D),ae.position.end=br(D.end)}function Q(D){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ee=ae.children[ae.children.length-1];Ee.position.end=br(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(ae.type)&&(me.call(this,D),E.call(this,D))}function Y(){this.data.atHardBreak=!0}function de(){const D=this.resume(),ae=this.stack[this.stack.length-1];ae.value=D}function J(){const D=this.resume(),ae=this.stack[this.stack.length-1];ae.value=D}function K(){const D=this.resume(),ae=this.stack[this.stack.length-1];ae.value=D}function he(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=ae,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function le(){const D=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=ae,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function Z(D){const ae=this.sliceSerialize(D),Ee=this.stack[this.stack.length-2];Ee.label=Kk(ae),Ee.identifier=In(ae).toLowerCase()}function G(){const D=this.stack[this.stack.length-1],ae=this.resume(),Ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ee.type==="link"){const Pe=D.children;Ee.children=Pe}else Ee.alt=ae}function S(){const D=this.resume(),ae=this.stack[this.stack.length-1];ae.url=D}function A(){const D=this.resume(),ae=this.stack[this.stack.length-1];ae.title=D}function V(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function ge(D){const ae=this.resume(),Ee=this.stack[this.stack.length-1];Ee.label=ae,Ee.identifier=In(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function je(D){this.data.characterReferenceType=D.type}function ye(D){const ae=this.sliceSerialize(D),Ee=this.data.characterReferenceType;let Pe;Ee?(Pe=Oh(ae,Ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=ec(ae);const Ie=this.stack[this.stack.length-1];Ie.value+=Pe}function H(D){const ae=this.stack.pop();ae.position.end=br(D.end)}function pe(D){E.call(this,D);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(D)}function fe(D){E.call(this,D);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(D)}function Te(){return{type:"blockquote",children:[]}}function Fe(){return{type:"code",lang:null,meta:null,value:""}}function Ze(){return{type:"inlineCode",value:""}}function Ge(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function De(){return{type:"emphasis",children:[]}}function mt(){return{type:"heading",depth:0,children:[]}}function Et(){return{type:"break"}}function _t(){return{type:"html",value:""}}function W(){return{type:"image",title:null,url:"",alt:null}}function ee(){return{type:"link",title:null,url:"",children:[]}}function te(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function ze(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function Oe(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function ke(){return{type:"text",value:""}}function $e(){return{type:"thematicBreak"}}}function br(t){return{line:t.line,column:t.column,offset:t.offset}}function Gh(t,i){let r=-1;for(;++r<i.length;){const a=i[r];Array.isArray(a)?Gh(t,a):Zk(t,a)}}function Zk(t,i){let r;for(r in i)if(Qh.call(i,r))switch(r){case"canContainEols":{const a=i[r];a&&t[r].push(...a);break}case"transforms":{const a=i[r];a&&t[r].push(...a);break}case"enter":case"exit":{const a=i[r];a&&Object.assign(t[r],a);break}}}function Cp(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+jo({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+jo({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+jo({start:i.start,end:i.end})+") is still open")}function Jk(t){const i=this;i.parser=r;function r(a){return Gk(a,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function e2(t,i){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(i),!0)};return t.patch(i,r),t.applyData(i,r)}function t2(t,i){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,r),[t.applyData(i,r),{type:"text",value:`
459
+ `}]}function n2(t,i){const r=i.value?i.value+`
460
+ `:"",a={},s=i.lang?i.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let c={type:"element",tagName:"code",properties:a,children:[{type:"text",value:r}]};return i.meta&&(c.data={meta:i.meta}),t.patch(i,c),c=t.applyData(i,c),c={type:"element",tagName:"pre",properties:{},children:[c]},t.patch(i,c),c}function r2(t,i){const r={type:"element",tagName:"del",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function i2(t,i){const r={type:"element",tagName:"em",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function o2(t,i){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",a=String(i.identifier).toUpperCase(),s=Mi(a.toLowerCase()),c=t.footnoteOrder.indexOf(a);let d,f=t.footnoteCounts.get(a);f===void 0?(f=0,t.footnoteOrder.push(a),d=t.footnoteOrder.length):d=c+1,f+=1,t.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+s,id:r+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};t.patch(i,h);const g={type:"element",tagName:"sup",properties:{},children:[h]};return t.patch(i,g),t.applyData(i,g)}function l2(t,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function a2(t,i){if(t.options.allowDangerousHtml){const r={type:"raw",value:i.value};return t.patch(i,r),t.applyData(i,r)}}function Xh(t,i){const r=i.referenceType;let a="]";if(r==="collapsed"?a+="[]":r==="full"&&(a+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+a}];const s=t.all(i),c=s[0];c&&c.type==="text"?c.value="["+c.value:s.unshift({type:"text",value:"["});const d=s[s.length-1];return d&&d.type==="text"?d.value+=a:s.push({type:"text",value:a}),s}function s2(t,i){const r=String(i.identifier).toUpperCase(),a=t.definitionById.get(r);if(!a)return Xh(t,i);const s={src:Mi(a.url||""),alt:i.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const c={type:"element",tagName:"img",properties:s,children:[]};return t.patch(i,c),t.applyData(i,c)}function u2(t,i){const r={src:Mi(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"img",properties:r,children:[]};return t.patch(i,a),t.applyData(i,a)}function c2(t,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};t.patch(i,r);const a={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(i,a),t.applyData(i,a)}function d2(t,i){const r=String(i.identifier).toUpperCase(),a=t.definitionById.get(r);if(!a)return Xh(t,i);const s={href:Mi(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const c={type:"element",tagName:"a",properties:s,children:t.all(i)};return t.patch(i,c),t.applyData(i,c)}function f2(t,i){const r={href:Mi(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const a={type:"element",tagName:"a",properties:r,children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function p2(t,i,r){const a=t.all(i),s=r?h2(r):Zh(i),c={},d=[];if(typeof i.checked=="boolean"){const y=a[0];let x;y&&y.type==="element"&&y.tagName==="p"?x=y:(x={type:"element",tagName:"p",properties:{},children:[]},a.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),c.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const y=a[f];(s||f!==0||y.type!=="element"||y.tagName!=="p")&&d.push({type:"text",value:`
461
+ `}),y.type==="element"&&y.tagName==="p"&&!s?d.push(...y.children):d.push(y)}const h=a[a.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&d.push({type:"text",value:`
462
+ `});const g={type:"element",tagName:"li",properties:c,children:d};return t.patch(i,g),t.applyData(i,g)}function h2(t){let i=!1;if(t.type==="list"){i=t.spread||!1;const r=t.children;let a=-1;for(;!i&&++a<r.length;)i=Zh(r[a])}return i}function Zh(t){const i=t.spread;return i??t.children.length>1}function g2(t,i){const r={},a=t.all(i);let s=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++s<a.length;){const d=a[s];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const c={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:t.wrap(a,!0)};return t.patch(i,c),t.applyData(i,c)}function m2(t,i){const r={type:"element",tagName:"p",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function x2(t,i){const r={type:"root",children:t.wrap(t.all(i))};return t.patch(i,r),t.applyData(i,r)}function y2(t,i){const r={type:"element",tagName:"strong",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function v2(t,i){const r=t.all(i),a=r.shift(),s=[];if(a){const d={type:"element",tagName:"thead",properties:{},children:t.wrap([a],!0)};t.patch(i.children[0],d),s.push(d)}if(r.length>0){const d={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},f=Qu(i.children[1]),h=Rh(i.children[i.children.length-1]);f&&h&&(d.position={start:f,end:h}),s.push(d)}const c={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(i,c),t.applyData(i,c)}function k2(t,i,r){const a=r?r.children:void 0,c=(a?a.indexOf(i):1)===0?"th":"td",d=r&&r.type==="table"?r.align:void 0,f=d?d.length:i.children.length;let h=-1;const g=[];for(;++h<f;){const x=i.children[h],v={},k=d?d[h]:void 0;k&&(v.align=k);let j={type:"element",tagName:c,properties:v,children:[]};x&&(j.children=t.all(x),t.patch(x,j),j=t.applyData(x,j)),g.push(j)}const y={type:"element",tagName:"tr",properties:{},children:t.wrap(g,!0)};return t.patch(i,y),t.applyData(i,y)}function b2(t,i){const r={type:"element",tagName:"td",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}const zp=9,Ep=32;function w2(t){const i=String(t),r=/\r?\n|\r/g;let a=r.exec(i),s=0;const c=[];for(;a;)c.push(_p(i.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=r.exec(i);return c.push(_p(i.slice(s),s>0,!1)),c.join("")}function _p(t,i,r){let a=0,s=t.length;if(i){let c=t.codePointAt(a);for(;c===zp||c===Ep;)a++,c=t.codePointAt(a)}if(r){let c=t.codePointAt(s-1);for(;c===zp||c===Ep;)s--,c=t.codePointAt(s-1)}return s>a?t.slice(a,s):""}function S2(t,i){const r={type:"text",value:w2(String(i.value))};return t.patch(i,r),t.applyData(i,r)}function j2(t,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(i,r),t.applyData(i,r)}const C2={blockquote:e2,break:t2,code:n2,delete:r2,emphasis:i2,footnoteReference:o2,heading:l2,html:a2,imageReference:s2,image:u2,inlineCode:c2,linkReference:d2,link:f2,listItem:p2,list:g2,paragraph:m2,root:x2,strong:y2,table:v2,tableCell:b2,tableRow:k2,text:S2,thematicBreak:j2,toml:Vl,yaml:Vl,definition:Vl,footnoteDefinition:Vl};function Vl(){}const Jh=-1,fa=0,zo=1,ia=2,nc=3,rc=4,ic=5,oc=6,eg=7,tg=8,Tp=typeof self=="object"?self:globalThis,z2=(t,i)=>{const r=(s,c)=>(t.set(c,s),s),a=s=>{if(t.has(s))return t.get(s);const[c,d]=i[s];switch(c){case fa:case Jh:return r(d,s);case zo:{const f=r([],s);for(const h of d)f.push(a(h));return f}case ia:{const f=r({},s);for(const[h,g]of d)f[a(h)]=a(g);return f}case nc:return r(new Date(d),s);case rc:{const{source:f,flags:h}=d;return r(new RegExp(f,h),s)}case ic:{const f=r(new Map,s);for(const[h,g]of d)f.set(a(h),a(g));return f}case oc:{const f=r(new Set,s);for(const h of d)f.add(a(h));return f}case eg:{const{name:f,message:h}=d;return r(new Tp[f](h),s)}case tg:return r(BigInt(d),s);case"BigInt":return r(Object(BigInt(d)),s);case"ArrayBuffer":return r(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:f}=new Uint8Array(d);return r(new DataView(f),d)}}return r(new Tp[c](d),s)};return a},Ip=t=>z2(new Map,t)(0),hi="",{toString:E2}={},{keys:_2}=Object,ko=t=>{const i=typeof t;if(i!=="object"||!t)return[fa,i];const r=E2.call(t).slice(8,-1);switch(r){case"Array":return[zo,hi];case"Object":return[ia,hi];case"Date":return[nc,hi];case"RegExp":return[rc,hi];case"Map":return[ic,hi];case"Set":return[oc,hi];case"DataView":return[zo,r]}return r.includes("Array")?[zo,r]:r.includes("Error")?[eg,r]:[ia,r]},ql=([t,i])=>t===fa&&(i==="function"||i==="symbol"),T2=(t,i,r,a)=>{const s=(d,f)=>{const h=a.push(d)-1;return r.set(f,h),h},c=d=>{if(r.has(d))return r.get(d);let[f,h]=ko(d);switch(f){case fa:{let y=d;switch(h){case"bigint":f=tg,y=d.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+h);y=null;break;case"undefined":return s([Jh],d)}return s([f,y],d)}case zo:{if(h){let v=d;return h==="DataView"?v=new Uint8Array(d.buffer):h==="ArrayBuffer"&&(v=new Uint8Array(d)),s([h,[...v]],d)}const y=[],x=s([f,y],d);for(const v of d)y.push(c(v));return x}case ia:{if(h)switch(h){case"BigInt":return s([h,d.toString()],d);case"Boolean":case"Number":case"String":return s([h,d.valueOf()],d)}if(i&&"toJSON"in d)return c(d.toJSON());const y=[],x=s([f,y],d);for(const v of _2(d))(t||!ql(ko(d[v])))&&y.push([c(v),c(d[v])]);return x}case nc:return s([f,d.toISOString()],d);case rc:{const{source:y,flags:x}=d;return s([f,{source:y,flags:x}],d)}case ic:{const y=[],x=s([f,y],d);for(const[v,k]of d)(t||!(ql(ko(v))||ql(ko(k))))&&y.push([c(v),c(k)]);return x}case oc:{const y=[],x=s([f,y],d);for(const v of d)(t||!ql(ko(v)))&&y.push(c(v));return x}}const{message:g}=d;return s([f,{name:h,message:g}],d)};return c},Rp=(t,{json:i,lossy:r}={})=>{const a=[];return T2(!(i||r),!!i,new Map,a)(t),a},oa=typeof structuredClone=="function"?(t,i)=>i&&("json"in i||"lossy"in i)?Ip(Rp(t,i)):structuredClone(t):(t,i)=>Ip(Rp(t,i));function I2(t,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function R2(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function M2(t){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||I2,a=t.options.footnoteBackLabel||R2,s=t.options.footnoteLabel||"Footnotes",c=t.options.footnoteLabelTagName||"h2",d=t.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<t.footnoteOrder.length;){const g=t.footnoteById.get(t.footnoteOrder[h]);if(!g)continue;const y=t.all(g),x=String(g.identifier).toUpperCase(),v=Mi(x.toLowerCase());let k=0;const j=[],M=t.footnoteCounts.get(x);for(;M!==void 0&&++k<=M;){j.length>0&&j.push({type:"text",value:" "});let U=typeof r=="string"?r:r(h,k);typeof U=="string"&&(U={type:"text",value:U}),j.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+v+(k>1?"-"+k:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,k),className:["data-footnote-backref"]},children:Array.isArray(U)?U:[U]})}const N=y[y.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const U=N.children[N.children.length-1];U&&U.type==="text"?U.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...j)}else y.push(...j);const _={type:"element",tagName:"li",properties:{id:i+"fn-"+v},children:t.wrap(y,!0)};t.patch(g,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:c,properties:{...oa(d),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
463
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(f,!0)},{type:"text",value:`
464
+ `}]}}const pa=(function(t){if(t==null)return D2;if(typeof t=="function")return ha(t);if(typeof t=="object")return Array.isArray(t)?A2(t):L2(t);if(typeof t=="string")return P2(t);throw new Error("Expected function, string, or object as test")});function A2(t){const i=[];let r=-1;for(;++r<t.length;)i[r]=pa(t[r]);return ha(a);function a(...s){let c=-1;for(;++c<i.length;)if(i[c].apply(this,s))return!0;return!1}}function L2(t){const i=t;return ha(r);function r(a){const s=a;let c;for(c in t)if(s[c]!==i[c])return!1;return!0}}function P2(t){return ha(i);function i(r){return r&&r.type===t}}function ha(t){return i;function i(r,a,s){return!!(N2(r)&&t.call(this,r,typeof a=="number"?a:void 0,s||void 0))}}function D2(){return!0}function N2(t){return t!==null&&typeof t=="object"&&"type"in t}const ng=[],F2=!0,Au=!1,O2="skip";function rg(t,i,r,a){let s;typeof i=="function"&&typeof r!="function"?(a=r,r=i):s=i;const c=pa(s),d=a?-1:1;f(t,void 0,[])();function f(h,g,y){const x=h&&typeof h=="object"?h:{};if(typeof x.type=="string"){const k=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(h.type+(k?"<"+k+">":""))+")"})}return v;function v(){let k=ng,j,M,N;if((!i||c(h,g,y[y.length-1]||void 0))&&(k=$2(r(h,y)),k[0]===Au))return k;if("children"in h&&h.children){const _=h;if(_.children&&k[0]!==O2)for(M=(a?_.children.length:-1)+d,N=y.concat(_);M>-1&&M<_.children.length;){const U=_.children[M];if(j=f(U,M,N)(),j[0]===Au)return j;M=typeof j[1]=="number"?j[1]:M+d}}return k}}}function $2(t){return Array.isArray(t)?t:typeof t=="number"?[F2,t]:t==null?ng:[t]}function lc(t,i,r,a){let s,c,d;typeof i=="function"&&typeof r!="function"?(c=void 0,d=i,s=r):(c=i,d=r,s=a),rg(t,c,f,s);function f(h,g){const y=g[g.length-1],x=y?y.children.indexOf(h):void 0;return d(h,x,y)}}const Lu={}.hasOwnProperty,B2={};function W2(t,i){const r=i||B2,a=new Map,s=new Map,c=new Map,d={...C2,...r.handlers},f={all:g,applyData:H2,definitionById:a,footnoteById:s,footnoteCounts:c,footnoteOrder:[],handlers:d,one:h,options:r,patch:U2,wrap:q2};return lc(t,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const x=y.type==="definition"?a:s,v=String(y.identifier).toUpperCase();x.has(v)||x.set(v,y)}}),f;function h(y,x){const v=y.type,k=f.handlers[v];if(Lu.call(f.handlers,v)&&k)return k(f,y,x);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in y){const{children:M,...N}=y,_=oa(N);return _.children=f.all(y),_}return oa(y)}return(f.options.unknownHandler||V2)(f,y,x)}function g(y){const x=[];if("children"in y){const v=y.children;let k=-1;for(;++k<v.length;){const j=f.one(v[k],y);if(j){if(k&&v[k-1].type==="break"&&(!Array.isArray(j)&&j.type==="text"&&(j.value=Mp(j.value)),!Array.isArray(j)&&j.type==="element")){const M=j.children[0];M&&M.type==="text"&&(M.value=Mp(M.value))}Array.isArray(j)?x.push(...j):x.push(j)}}}return x}}function U2(t,i){t.position&&(i.position=R0(t))}function H2(t,i){let r=i;if(t&&t.data){const a=t.data.hName,s=t.data.hChildren,c=t.data.hProperties;if(typeof a=="string")if(r.type==="element")r.tagName=a;else{const d="children"in r?r.children:[r];r={type:"element",tagName:a,properties:{},children:d}}r.type==="element"&&c&&Object.assign(r.properties,oa(c)),"children"in r&&r.children&&s!==null&&s!==void 0&&(r.children=s)}return r}function V2(t,i){const r=i.data||{},a="value"in i&&!(Lu.call(r,"hProperties")||Lu.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:t.all(i)};return t.patch(i,a),t.applyData(i,a)}function q2(t,i){const r=[];let a=-1;for(i&&r.push({type:"text",value:`
465
+ `});++a<t.length;)a&&r.push({type:"text",value:`
466
+ `}),r.push(t[a]);return i&&t.length>0&&r.push({type:"text",value:`
467
+ `}),r}function Mp(t){let i=0,r=t.charCodeAt(i);for(;r===9||r===32;)i++,r=t.charCodeAt(i);return t.slice(i)}function Ap(t,i){const r=W2(t,i),a=r.one(t,void 0),s=M2(r),c=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&c.children.push({type:"text",value:`
468
+ `},s),c}function Y2(t,i){return t&&"run"in t?async function(r,a){const s=Ap(r,{file:a,...i});await t.run(s,a)}:function(r,a){return Ap(r,{file:a,...t||i})}}function Lp(t){if(t)throw t}var lu,Pp;function K2(){if(Pp)return lu;Pp=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(g){return typeof Array.isArray=="function"?Array.isArray(g):i.call(g)==="[object Array]"},c=function(g){if(!g||i.call(g)!=="[object Object]")return!1;var y=t.call(g,"constructor"),x=g.constructor&&g.constructor.prototype&&t.call(g.constructor.prototype,"isPrototypeOf");if(g.constructor&&!y&&!x)return!1;var v;for(v in g);return typeof v>"u"||t.call(g,v)},d=function(g,y){r&&y.name==="__proto__"?r(g,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):g[y.name]=y.newValue},f=function(g,y){if(y==="__proto__")if(t.call(g,y)){if(a)return a(g,y).value}else return;return g[y]};return lu=function h(){var g,y,x,v,k,j,M=arguments[0],N=1,_=arguments.length,U=!1;for(typeof M=="boolean"&&(U=M,M=arguments[1]||{},N=2),(M==null||typeof M!="object"&&typeof M!="function")&&(M={});N<_;++N)if(g=arguments[N],g!=null)for(y in g)x=f(M,y),v=f(g,y),M!==v&&(U&&v&&(c(v)||(k=s(v)))?(k?(k=!1,j=x&&s(x)?x:[]):j=x&&c(x)?x:{},d(M,{name:y,newValue:h(U,j,v)})):typeof v<"u"&&d(M,{name:y,newValue:v}));return M},lu}var Q2=K2();const au=dh(Q2);function Pu(t){if(typeof t!="object"||t===null)return!1;const i=Object.getPrototypeOf(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function G2(){const t=[],i={run:r,use:a};return i;function r(...s){let c=-1;const d=s.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);f(null,...s);function f(h,...g){const y=t[++c];let x=-1;if(h){d(h);return}for(;++x<s.length;)(g[x]===null||g[x]===void 0)&&(g[x]=s[x]);s=g,y?X2(y,f)(...g):d(null,...g)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),i}}function X2(t,i){let r;return a;function a(...d){const f=t.length>d.length;let h;f&&d.push(s);try{h=t.apply(this,d)}catch(g){const y=g;if(f&&r)throw y;return s(y)}f||(h&&h.then&&typeof h.then=="function"?h.then(c,s):h instanceof Error?s(h):c(h))}function s(d,...f){r||(r=!0,i(d,...f))}function c(d){s(null,d)}}const Nn={basename:Z2,dirname:J2,extname:eb,join:tb,sep:"/"};function Z2(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Mo(t);let r=0,a=-1,s=t.length,c;if(i===void 0||i.length===0||i.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(c){r=s+1;break}}else a<0&&(c=!0,a=s+1);return a<0?"":t.slice(r,a)}if(i===t)return"";let d=-1,f=i.length-1;for(;s--;)if(t.codePointAt(s)===47){if(c){r=s+1;break}}else d<0&&(c=!0,d=s+1),f>-1&&(t.codePointAt(s)===i.codePointAt(f--)?f<0&&(a=s):(f=-1,a=d));return r===a?a=d:a<0&&(a=t.length),t.slice(r,a)}function J2(t){if(Mo(t),t.length===0)return".";let i=-1,r=t.length,a;for(;--r;)if(t.codePointAt(r)===47){if(a){i=r;break}}else a||(a=!0);return i<0?t.codePointAt(0)===47?"/":".":i===1&&t.codePointAt(0)===47?"//":t.slice(0,i)}function eb(t){Mo(t);let i=t.length,r=-1,a=0,s=-1,c=0,d;for(;i--;){const f=t.codePointAt(i);if(f===47){if(d){a=i+1;break}continue}r<0&&(d=!0,r=i+1),f===46?s<0?s=i:c!==1&&(c=1):s>-1&&(c=-1)}return s<0||r<0||c===0||c===1&&s===r-1&&s===a+1?"":t.slice(s,r)}function tb(...t){let i=-1,r;for(;++i<t.length;)Mo(t[i]),t[i]&&(r=r===void 0?t[i]:r+"/"+t[i]);return r===void 0?".":nb(r)}function nb(t){Mo(t);const i=t.codePointAt(0)===47;let r=rb(t,!i);return r.length===0&&!i&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),i?"/"+r:r}function rb(t,i){let r="",a=0,s=-1,c=0,d=-1,f,h;for(;++d<=t.length;){if(d<t.length)f=t.codePointAt(d);else{if(f===47)break;f=47}if(f===47){if(!(s===d-1||c===1))if(s!==d-1&&c===2){if(r.length<2||a!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(h=r.lastIndexOf("/"),h!==r.length-1){h<0?(r="",a=0):(r=r.slice(0,h),a=r.length-1-r.lastIndexOf("/")),s=d,c=0;continue}}else if(r.length>0){r="",a=0,s=d,c=0;continue}}i&&(r=r.length>0?r+"/..":"..",a=2)}else r.length>0?r+="/"+t.slice(s+1,d):r=t.slice(s+1,d),a=d-s-1;s=d,c=0}else f===46&&c>-1?c++:c=-1}return r}function Mo(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const ib={cwd:ob};function ob(){return"/"}function Du(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function lb(t){if(typeof t=="string")t=new URL(t);else if(!Du(t)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(t.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return ab(t)}function ab(t){if(t.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const i=t.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const a=i.codePointAt(r+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(i)}const su=["history","path","basename","stem","extname","dirname"];class ig{constructor(i){let r;i?Du(i)?r={path:i}:typeof i=="string"||sb(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":ib.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<su.length;){const c=su[a];c in r&&r[c]!==void 0&&r[c]!==null&&(this[c]=c==="history"?[...r[c]]:r[c])}let s;for(s in r)su.includes(s)||(this[s]=r[s])}get basename(){return typeof this.path=="string"?Nn.basename(this.path):void 0}set basename(i){cu(i,"basename"),uu(i,"basename"),this.path=Nn.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?Nn.dirname(this.path):void 0}set dirname(i){Dp(this.basename,"dirname"),this.path=Nn.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?Nn.extname(this.path):void 0}set extname(i){if(uu(i,"extname"),Dp(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Nn.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){Du(i)&&(i=lb(i)),cu(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?Nn.basename(this.path,this.extname):void 0}set stem(i){cu(i,"stem"),uu(i,"stem"),this.path=Nn.join(this.dirname||"",i+(this.extname||""))}fail(i,r,a){const s=this.message(i,r,a);throw s.fatal=!0,s}info(i,r,a){const s=this.message(i,r,a);return s.fatal=void 0,s}message(i,r,a){const s=new $t(i,r,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function uu(t,i){if(t&&t.includes(Nn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Nn.sep+"`")}function cu(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function Dp(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function sb(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const ub=(function(t){const a=this.constructor.prototype,s=a[t],c=function(){return s.apply(c,arguments)};return Object.setPrototypeOf(c,a),c}),cb={}.hasOwnProperty;class ac extends ub{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=G2()}copy(){const i=new ac;let r=-1;for(;++r<this.attachers.length;){const a=this.attachers[r];i.use(...a)}return i.data(au(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(pu("data",this.frozen),this.namespace[i]=r,this):cb.call(this.namespace,i)&&this.namespace[i]||void 0:i?(pu("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=r.call(i,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=Yl(i),a=this.parser||this.Parser;return du("parse",a),a(String(r),r)}process(i,r){const a=this;return this.freeze(),du("process",this.parser||this.Parser),fu("process",this.compiler||this.Compiler),r?s(void 0,r):new Promise(s);function s(c,d){const f=Yl(i),h=a.parse(f);a.run(h,f,function(y,x,v){if(y||!x||!v)return g(y);const k=x,j=a.stringify(k,v);pb(j)?v.value=j:v.result=j,g(y,v)});function g(y,x){y||!x?d(y):c?c(x):r(void 0,x)}}}processSync(i){let r=!1,a;return this.freeze(),du("processSync",this.parser||this.Parser),fu("processSync",this.compiler||this.Compiler),this.process(i,s),Fp("processSync","process",r),a;function s(c,d){r=!0,Lp(c),a=d}}run(i,r,a){Np(i),this.freeze();const s=this.transformers;return!a&&typeof r=="function"&&(a=r,r=void 0),a?c(void 0,a):new Promise(c);function c(d,f){const h=Yl(r);s.run(i,h,g);function g(y,x,v){const k=x||i;y?f(y):d?d(k):a(void 0,k,v)}}}runSync(i,r){let a=!1,s;return this.run(i,r,c),Fp("runSync","run",a),s;function c(d,f){Lp(d),s=f,a=!0}}stringify(i,r){this.freeze();const a=Yl(r),s=this.compiler||this.Compiler;return fu("stringify",s),Np(i),s(i,a)}use(i,...r){const a=this.attachers,s=this.namespace;if(pu("use",this.frozen),i!=null)if(typeof i=="function")h(i,r);else if(typeof i=="object")Array.isArray(i)?f(i):d(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function c(g){if(typeof g=="function")h(g,[]);else if(typeof g=="object")if(Array.isArray(g)){const[y,...x]=g;h(y,x)}else d(g);else throw new TypeError("Expected usable value, not `"+g+"`")}function d(g){if(!("plugins"in g)&&!("settings"in g))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(g.plugins),g.settings&&(s.settings=au(!0,s.settings,g.settings))}function f(g){let y=-1;if(g!=null)if(Array.isArray(g))for(;++y<g.length;){const x=g[y];c(x)}else throw new TypeError("Expected a list of plugins, not `"+g+"`")}function h(g,y){let x=-1,v=-1;for(;++x<a.length;)if(a[x][0]===g){v=x;break}if(v===-1)a.push([g,...y]);else if(y.length>0){let[k,...j]=y;const M=a[v][1];Pu(M)&&Pu(k)&&(k=au(!0,M,k)),a[v]=[g,k,...j]}}}}const db=new ac().freeze();function du(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function fu(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function pu(t,i){if(i)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Np(t){if(!Pu(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Fp(t,i,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function Yl(t){return fb(t)?t:new ig(t)}function fb(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function pb(t){return typeof t=="string"||hb(t)}function hb(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const gb="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Op=[],$p={allowDangerousHtml:!0},mb=/^(https?|ircs?|mailto|xmpp)$/i,xb=[{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 Nu(t){const i=yb(t),r=vb(t);return kb(i.runSync(i.parse(r),r),t)}function yb(t){const i=t.rehypePlugins||Op,r=t.remarkPlugins||Op,a=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...$p}:$p;return db().use(Jk).use(r).use(Y2,a).use(i)}function vb(t){const i=t.children||"",r=new ig;return typeof i=="string"&&(r.value=i),r}function kb(t,i){const r=i.allowedElements,a=i.allowElement,s=i.components,c=i.disallowedElements,d=i.skipHtml,f=i.unwrapDisallowed,h=i.urlTransform||bb;for(const y of xb)Object.hasOwn(i,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+gb+y.id,void 0);return lc(t,g),D0(t,{Fragment:l.Fragment,components:s,ignoreInvalidStyle:!0,jsx:l.jsx,jsxs:l.jsxs,passKeys:!0,passNode:!0});function g(y,x,v){if(y.type==="raw"&&v&&typeof x=="number")return d?v.children.splice(x,1):v.children[x]={type:"text",value:y.value},x;if(y.type==="element"){let k;for(k in ru)if(Object.hasOwn(ru,k)&&Object.hasOwn(y.properties,k)){const j=y.properties[k],M=ru[k];(M===null||M.includes(y.tagName))&&(y.properties[k]=h(String(j||""),k,y))}}if(y.type==="element"){let k=r?!r.includes(y.tagName):c?c.includes(y.tagName):!1;if(!k&&a&&typeof x=="number"&&(k=!a(y,x,v)),k&&v&&typeof x=="number")return f&&y.children?v.children.splice(x,1,...y.children):v.children.splice(x,1),x}}}function bb(t){const i=t.indexOf(":"),r=t.indexOf("?"),a=t.indexOf("#"),s=t.indexOf("/");return i===-1||s!==-1&&i>s||r!==-1&&i>r||a!==-1&&i>a||mb.test(t.slice(0,i))?t:""}let wb=0;const Kl={};let Br={},wr=[],gi={},sc={},uc=[],Fu=!1,Ou={};const $u=new Set;function Bu(){for(const t of $u)t()}function Ql(t){return $u.add(t),()=>{$u.delete(t)}}function Sb(t){if(!t)return"";const i=Object.entries(t);return i.length===0?"":`(${i.map(([a,s])=>{const c=typeof s=="string"?s:JSON.stringify(s);return`${a}=${c&&c.length>60?c.substring(0,57)+"...":c}`}).join(", ")})`}function mi(t,i){Br={...Br,[t]:(Br[t]??"")+i},sc=Br}function ea(t){const i={...t,id:wb++,timestamp:Date.now()};wr=[...wr.slice(-299),i],uc=wr}function Bp(t,i,r){const a=wr[wr.length-1];if(a&&a.agentId===t&&a.type===i){const s=[...wr];s[s.length-1]={...a,content:a.content+r},wr=s,uc=wr}else ea({agentId:t,type:i,content:r})}function jb(t){try{const i=JSON.parse(t),{agentId:r,type:a,content:s}=i;switch(a){case"text":{mi(r,s),Bp(r,"text",s);break}case"tool_start":{const c=`> ${i.toolName??"tool"}${Sb(i.toolArgs)}
469
+ `;mi(r,c),ea({agentId:r,type:"tool_start",content:s,toolName:i.toolName,toolArgs:i.toolArgs});break}case"tool_end":{const c=i.toolResult?` ${i.isError?"x":"ok"} ${i.toolResult.substring(0,200)}
470
+ `:` ${i.isError?"x error":"ok done"}
471
+ `;mi(r,c),ea({agentId:r,type:"tool_end",content:s,toolName:i.toolName,toolResult:i.toolResult,isError:i.isError});break}case"thinking_start":{Kl[r]=!0,mi(r,"[thinking] ");break}case"thinking":{if(!Kl[r])break;mi(r,s),Bp(r,"thinking",s);break}case"thinking_end":{Kl[r]=!1,mi(r,`
472
+ `);break}case"agent_start":{Br={...Br,[r]:""},sc=Br,gi={...gi,[r]:!0},Ou=gi;break}case"agent_end":{Kl[r]=!1,gi={...gi,[r]:!1},Ou=gi,ea({agentId:r,type:"agent_end",content:""});break}default:break}Bu()}catch{}}function Cb(){const t=new EventSource($r("/api/stream"));t.onopen=()=>{Fu=!0,Bu()},t.onerror=()=>{Fu=!1,Bu()},t.onmessage=i=>{jb(i.data)}}Cb();function Ai(){const t=I.useSyncExternalStore(Ql,()=>sc),i=I.useSyncExternalStore(Ql,()=>uc),r=I.useSyncExternalStore(Ql,()=>Fu),a=I.useSyncExternalStore(Ql,()=>Ou);return{tokens:t,activity:i,connected:r,activeAgents:a}}function Ti({value:t,onChange:i,options:r,placeholder:a="Select...",alignRight:s=!0}){var g;const[c,d]=I.useState(!1),f=I.useRef(null),h=r.find(y=>y.value===t);return I.useEffect(()=>{if(!c)return;function y(x){f.current&&!f.current.contains(x.target)&&d(!1)}return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[c]),l.jsxs("div",{ref:f,style:{position:"relative",display:"inline-flex"},children:[l.jsxs("button",{onClick:()=>d(y=>!y),style:{display:"flex",alignItems:"center",gap:6,padding:"5px 10px 5px 10px",borderRadius:8,border:c?"1px solid var(--accent)":"1px solid var(--border)",background:"var(--bg-tertiary)",color:h&&h.value!==((g=r[0])==null?void 0:g.value)?"var(--text-primary)":"var(--text-muted)",fontSize:12,fontWeight:500,fontFamily:"inherit",cursor:"pointer",outline:"none",transition:"border-color 0.12s",whiteSpace:"nowrap"},children:[h!=null&&h.iconUrl?l.jsx("img",{src:h.iconUrl,alt:"",style:{width:14,height:14,flexShrink:0,borderRadius:2,filter:"var(--icon-filter, none)"}}):h!=null&&h.dot?l.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:h.dot,flexShrink:0}}):null,l.jsx("span",{children:(h==null?void 0:h.label)??a}),l.jsx(Ei,{size:12,style:{color:"var(--text-muted)",flexShrink:0,transform:c?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.18s ease"}})]}),c&&l.jsx("div",{style:{position:"absolute",top:"calc(100% + 4px)",...s?{right:0}:{left:0},minWidth:"100%",maxHeight:220,overflowY:"auto",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:10,boxShadow:"var(--shadow-lg)",zIndex:50,padding:4,animation:"fade-in 0.1s ease-out"},children:r.map(y=>{const x=y.value===t;return l.jsxs("button",{onClick:()=>{i(y.value),d(!1)},style:{width:"100%",display:"flex",alignItems:"center",gap:8,padding:"7px 10px",borderRadius:6,border:"none",background:x?"var(--bg-hover)":"transparent",color:x?"var(--text-primary)":"var(--text-secondary)",fontSize:12,fontWeight:x?500:400,fontFamily:"inherit",cursor:"pointer",textAlign:"left",whiteSpace:"nowrap",transition:"background 0.06s"},onMouseEnter:v=>{v.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:v=>{x||(v.currentTarget.style.background="transparent")},children:[y.iconUrl?l.jsx("img",{src:y.iconUrl,alt:"",style:{width:14,height:14,flexShrink:0,borderRadius:2,filter:"var(--icon-filter, none)"}}):y.dot?l.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:y.dot,flexShrink:0}}):null,l.jsx("span",{style:{flex:1},children:y.label}),x&&l.jsx("span",{style:{fontSize:11,color:"var(--accent)",flexShrink:0},children:"✓"})]},y.value)})})]})}const zb=[{status:"todo",label:"Todo",color:"var(--text-muted)"},{status:"in_progress",label:"In Progress",color:"var(--blue)"},{status:"completed",label:"Done",color:"var(--green)"},{status:"failed",label:"Failed",color:"var(--red)"},{status:"cancelled",label:"Cancelled",color:"var(--text-muted)"}];function Eb(t){const i=Math.floor((Date.now()-new Date(t).getTime())/6e4);if(i<1)return"now";if(i<60)return`${i}m`;const r=Math.floor(i/60);return r<24?`${r}h`:`${Math.floor(r/24)}d`}function _b({task:t,employees:i,streaming:r}){const[a,s]=I.useState(!1),c=i.find(f=>f.agent_key===t.agent_id),d=(c==null?void 0:c.color)||"var(--text-muted)";return l.jsxs("div",{className:"vec-card task-card fade-in",onClick:()=>s(f=>!f),style:{padding:"8px 10px",marginBottom:4},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5,marginBottom:4},children:[l.jsx("span",{style:{fontSize:10,color:"var(--text-muted)",fontFamily:"monospace"},children:t.task_id}),l.jsx("span",{style:{marginLeft:"auto",fontSize:10,color:"var(--text-muted)"},children:Eb(t.updated_at)})]}),l.jsx("div",{className:a?"md-content":"md-content md-clamp",style:{marginBottom:6},children:l.jsx(Nu,{children:t.description})}),a&&t.result&&l.jsx("div",{className:"md-content md-result",style:{marginBottom:6},children:l.jsx(Nu,{children:t.result})}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[l.jsx("div",{style:{width:16,height:16,borderRadius:4,background:d,opacity:.85,display:"flex",alignItems:"center",justifyContent:"center",fontSize:8,fontWeight:700,color:"#fff",flexShrink:0},children:c?c.name.charAt(0):t.agent_id.charAt(0).toUpperCase()}),l.jsx("span",{style:{fontSize:10.5,color:"var(--text-muted)",fontWeight:500},children:c?c.name.split(" ")[0]:t.agent_id}),r&&t.status==="in_progress"&&l.jsx("span",{style:{fontSize:9,color:"var(--blue)",fontWeight:500,marginLeft:"auto"},children:"working…"})]})]})}function Tb(){const{data:t}=wt("/api/tasks",3e3),{employees:i}=jr(),{activeAgents:r}=Ai(),[a,s]=I.useState("all"),c=t??[],d=i??[],f=a==="all"?c:c.filter(v=>v.agent_id===a),h=Array.from(new Set(c.map(v=>v.agent_id))),g=I.useMemo(()=>[{value:"all",label:"All agents"},...h.map(v=>{const k=d.find(j=>j.agent_key===v);return{value:v,label:k?k.name:v,dot:((k==null?void 0:k.color)??"").replace("var(--","").replace(")","")}})],[h,d]),x=f.length>0?130:void 0;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[l.jsxs("div",{className:"page-header",style:{display:"flex",alignItems:"center",gap:12},children:[l.jsxs("div",{children:[l.jsx("h1",{className:"page-title",children:"Kanban"}),l.jsxs("div",{className:"page-subtitle",children:[c.length," tasks"]})]}),l.jsx("div",{style:{marginLeft:"auto"},children:l.jsx(Ti,{value:a,onChange:s,options:g,placeholder:"All agents"})})]}),l.jsx("div",{style:{flex:1,minHeight:0,overflowX:"auto",overflowY:"hidden",padding:"12px 20px",display:"flex",gap:10,alignItems:"flex-start"},children:zb.map(v=>{const k=f.filter(j=>j.status===v.status);return l.jsxs("div",{style:{flex:1,minWidth:200,minHeight:x,maxHeight:"100%",display:"flex",flexDirection:"column",background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:8,overflow:"hidden"},children:[l.jsxs("div",{style:{padding:"10px 12px",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[l.jsx("div",{style:{width:8,height:8,borderRadius:"50%",background:v.color,flexShrink:0,opacity:.8}}),l.jsx("span",{style:{fontSize:12,fontWeight:500,color:"var(--text-primary)",flex:1},children:v.label}),l.jsx("span",{style:{fontSize:10,color:"var(--text-muted)",background:"var(--bg-tertiary)",padding:"1px 5px",borderRadius:4},children:k.length})]}),l.jsx("div",{style:{flex:"1 1 auto",minHeight:0,overflowY:"auto",padding:"8px 8px 4px"},children:k.length===0?l.jsx("div",{style:{textAlign:"center",color:"var(--text-muted)",fontSize:11,padding:"20px 0"},children:"No tasks"}):k.map(j=>l.jsx(_b,{task:j,employees:d,streaming:r[j.agent_id]??!1},j.task_id))})]},v.status)})})]})}function Ib(){const{data:t,lastRefresh:i}=wt("/api/tasks",3e3),{data:r}=wt("/api/events",3e3),{employees:a}=jr(),{tokens:s,connected:c,activeAgents:d}=Ai(),f=t??[],h=r??[],g=a??[],y=[{label:"Total",value:f.length,color:"var(--text-primary)"},{label:"In Progress",value:f.filter(v=>v.status==="in_progress").length,color:"var(--blue)"},{label:"Completed",value:f.filter(v=>v.status==="completed").length,color:"var(--green)"},{label:"Failed",value:f.filter(v=>v.status==="failed").length,color:"var(--red)"}],x=Object.keys(d).filter(v=>d[v]);return l.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"20px 24px"},children:[l.jsxs("div",{className:"page-header",style:{padding:"0 0 16px"},children:[l.jsx("h1",{className:"page-title",children:"Overview"}),l.jsxs("div",{className:"page-subtitle",children:[c?"Live":"Polling",i&&l.jsxs("span",{children:[" · ",i.toLocaleTimeString()]})]})]}),l.jsx("div",{style:{display:"flex",gap:8,marginBottom:20},children:y.map(v=>l.jsxs("div",{style:{flex:1,padding:"14px 16px",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8},children:[l.jsx("div",{style:{fontSize:22,fontWeight:700,color:v.color,lineHeight:1,fontVariantNumeric:"tabular-nums"},children:v.value}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:v.label})]},v.label))}),x.length>0&&l.jsxs("div",{style:{marginBottom:20},children:[l.jsx("div",{style:{fontSize:11,fontWeight:500,color:"var(--text-muted)",marginBottom:6,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Live"}),l.jsx("div",{style:{background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8,overflow:"hidden"},children:x.map((v,k)=>l.jsxs("div",{style:{padding:"10px 14px",borderBottom:k<x.length-1?"1px solid var(--border)":"none"},children:[l.jsx("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:3},children:l.jsx("span",{style:{fontSize:12,fontWeight:500,color:"var(--text-primary)"},children:v})}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontFamily:"monospace",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s[v].slice(-120)})]},v))})]}),l.jsxs("div",{style:{marginBottom:20},children:[l.jsx("div",{style:{fontSize:11,fontWeight:500,color:"var(--text-muted)",marginBottom:6,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Team"}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:g.map(v=>{const k=d[v.agent_key]??!1;return l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 10px",borderRadius:6,background:"var(--bg-card)",border:"1px solid var(--border)",fontSize:12},children:[l.jsx("span",{style:{fontWeight:500,color:k?"var(--text-primary)":"var(--text-muted)"},children:v.name.split(" ")[0]}),l.jsx("span",{style:{color:"var(--text-muted)",fontSize:11},children:v.role})]},v.employee_id)})})]}),l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:11,fontWeight:500,color:"var(--text-muted)",marginBottom:6,textTransform:"uppercase",letterSpacing:"0.04em"},children:"Recent Events"}),l.jsx("div",{style:{background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8,overflow:"hidden"},children:h.length===0?l.jsx("div",{style:{padding:14,fontSize:12,color:"var(--text-muted)"},children:"No events yet"}):h.slice(0,8).map((v,k)=>l.jsxs("div",{style:{display:"flex",gap:10,padding:"8px 14px",alignItems:"baseline",borderBottom:k<Math.min(7,h.length-1)?"1px solid var(--border)":"none"},children:[l.jsx("span",{style:{fontSize:10,color:"var(--text-muted)",fontFamily:"monospace",whiteSpace:"nowrap",minWidth:60},children:new Date(v.timestamp).toLocaleTimeString()}),l.jsx("span",{style:{fontSize:11,fontWeight:500,color:"var(--text-muted)",minWidth:28},children:v.agent_id}),l.jsx("span",{style:{fontSize:12,color:"var(--text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:v.message})]},k))})]})]})}const Rb={task_created:"var(--blue)",task_in_progress:"var(--yellow)",task_completed:"var(--green)",task_failed:"var(--red)",agent_thinking:"var(--purple)",agent_tool_call:"var(--orange)",message_sent:"var(--blue)"};function Mb(){const{data:t,lastRefresh:i}=wt("/api/events",2e3),[r,a]=I.useState("all"),s=t??[],c=["all",...Array.from(new Set(s.map(f=>f.agent_id).filter(Boolean)))],d=r==="all"?s:s.filter(f=>f.agent_id===r);return l.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[l.jsxs("div",{className:"page-header",style:{display:"flex",alignItems:"center",gap:10},children:[l.jsxs("div",{children:[l.jsx("h1",{className:"page-title",children:"Events"}),l.jsxs("div",{className:"page-subtitle",children:[d.length," events",i&&l.jsxs("span",{children:[" · ",i.toLocaleTimeString()]})]})]}),l.jsx("div",{style:{marginLeft:"auto",display:"flex",gap:2},children:c.map(f=>l.jsx("button",{className:`filter-tab${r===f?" active":""}`,onClick:()=>a(f),children:f==="all"?"All":f},f))})]}),l.jsx("div",{style:{flex:1,overflowY:"auto"},children:d.length===0?l.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"var(--text-muted)",fontSize:13},children:"No events"}):d.map((f,h)=>{const g=Rb[f.event_type]??"var(--text-muted)";return l.jsxs("div",{className:"fade-in",style:{display:"flex",gap:10,padding:"7px 24px",alignItems:"baseline",borderBottom:"1px solid var(--border)"},children:[l.jsx("span",{style:{fontSize:10,color:"var(--text-muted)",fontFamily:"monospace",whiteSpace:"nowrap",minWidth:60},children:new Date(f.timestamp).toLocaleTimeString()}),l.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:g,flexShrink:0}}),l.jsx("span",{style:{fontSize:11,fontWeight:500,color:g,minWidth:90,whiteSpace:"nowrap"},children:f.event_type.replace(/_/g," ")}),f.agent_id&&l.jsx("span",{style:{fontSize:11,color:"var(--text-muted)",fontWeight:500,minWidth:28},children:f.agent_id}),l.jsx("span",{style:{fontSize:12,color:"var(--text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:f.message})]},h)})})]})}function hu(t){const i=t.split(" ");return i.length>=2?(i[0][0]+i[i.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function Ab(){const{employees:t}=jr(),i=I.useMemo(()=>t??[],[t]),[r,a]=I.useState("pm"),[s,c]=I.useState(!1),{data:d,lastRefresh:f}=wt(`/api/inbox/${r}`,3e3),h=d??[],g=i.find(v=>v.agent_key===r),y=(g==null?void 0:g.name)??r,x=(g==null?void 0:g.color)??"var(--text-muted)";return l.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[l.jsxs("div",{className:"page-header",style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:16},children:[l.jsxs("div",{children:[l.jsx("div",{className:"page-title",children:"Snoop"}),l.jsxs("div",{className:"page-subtitle",children:[h.length," message",h.length!==1?"s":""," in inbox",f&&l.jsxs("span",{children:[" · ",f.toLocaleTimeString()]})]})]}),l.jsxs("div",{style:{position:"relative"},children:[l.jsxs("button",{onClick:()=>c(v=>!v),style:{display:"flex",alignItems:"center",gap:8,padding:"7px 14px",borderRadius:20,border:"1px solid var(--border)",background:"var(--bg-tertiary)",cursor:"pointer",fontFamily:"inherit",fontSize:12,fontWeight:500,color:"var(--text-primary)",transition:"border-color 0.08s"},children:[l.jsx("div",{style:{width:22,height:22,borderRadius:6,background:x,opacity:.9,display:"flex",alignItems:"center",justifyContent:"center",fontSize:9,fontWeight:600,color:"#fff"},children:(g==null?void 0:g.initials)??hu(y)}),l.jsx("span",{children:y}),l.jsx(Ei,{size:13,style:{color:"var(--text-muted)",transform:s?"rotate(180deg)":"none",transition:"transform 0.15s"}})]}),s&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{position:"fixed",inset:0,zIndex:50},onClick:()=>c(!1)}),l.jsx("div",{style:{position:"absolute",top:"calc(100% + 4px)",right:0,zIndex:51,background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:10,padding:4,width:220,maxHeight:320,overflowY:"auto",boxShadow:"var(--shadow-lg)"},children:i.map(v=>{const k=v.agent_key===r;return l.jsxs("button",{onClick:()=>{a(v.agent_key),c(!1)},style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"7px 10px",border:"none",borderRadius:7,background:k?"var(--bg-hover)":"transparent",color:k?"var(--text-primary)":"var(--text-secondary)",cursor:"pointer",fontFamily:"inherit",fontSize:12,fontWeight:k?500:400,textAlign:"left",transition:"background 0.06s"},onMouseEnter:j=>{k||(j.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:j=>{k||(j.currentTarget.style.background="transparent")},children:[l.jsx("div",{style:{width:24,height:24,borderRadius:6,flexShrink:0,background:v.color??"var(--text-muted)",opacity:.9,display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:600,color:"#fff"},children:v.initials??hu(v.name)}),l.jsxs("div",{style:{flex:1,minWidth:0},children:[l.jsx("div",{style:{fontSize:12},children:v.name}),l.jsxs("div",{style:{fontSize:10,color:"var(--text-muted)"},children:["@",v.agent_key]})]})]},v.agent_key)})})]})]})]}),l.jsx("div",{style:{flex:1,overflowY:"auto",padding:"4px 24px 20px"},children:h.length===0?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",gap:8,color:"var(--text-muted)"},children:[l.jsx(Oy,{size:32,style:{opacity:.4}}),l.jsx("span",{style:{fontSize:13},children:"Inbox empty"})]}):h.map((v,k)=>{const j=v.message??v.text??JSON.stringify(v),M=v.from_agent??v.sender??"system",N=v.to_agent??"pm",_=v.priority??"normal",U=v.timestamp,w=_==="priority"?"var(--red)":_==="high"?"var(--yellow)":"var(--text-muted)",T=i.find(q=>q.agent_key===M);return l.jsxs("div",{style:{padding:"12px 0",borderBottom:k<h.length-1?"1px solid var(--border)":"none",display:"flex",gap:10,alignItems:"flex-start"},children:[l.jsx("div",{style:{width:28,height:28,borderRadius:7,flexShrink:0,background:(T==null?void 0:T.color)??"var(--text-muted)",opacity:.85,display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,fontWeight:600,color:"#fff"},children:T?T.initials??hu(T.name):M.slice(0,2).toUpperCase()}),l.jsxs("div",{style:{flex:1,minWidth:0},children:[l.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:4,flexWrap:"wrap"},children:[l.jsx("span",{style:{fontSize:12,fontWeight:500,color:"var(--text-primary)"},children:(T==null?void 0:T.name)??M}),l.jsx("span",{style:{fontSize:11,color:"var(--text-muted)"},children:"→"}),l.jsx("span",{style:{fontSize:12,fontWeight:500,color:"var(--accent)"},children:N}),v.task_id&&l.jsx("span",{style:{fontSize:10,fontFamily:"monospace",color:"var(--text-muted)",background:"var(--bg-tertiary)",padding:"1px 5px",borderRadius:3},children:v.task_id}),l.jsx("span",{style:{marginLeft:"auto",fontSize:10,color:w,fontWeight:500},children:_}),U&&l.jsx("span",{style:{fontSize:10,color:"var(--text-muted)"},children:new Date(U).toLocaleTimeString()})]}),l.jsx("div",{style:{fontSize:12,color:"var(--text-secondary)",lineHeight:1.55,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:j})]})]},k)})})]})}function og({title:t,message:i,confirmLabel:r="Confirm",cancelLabel:a="Cancel",destructive:s=!1,onConfirm:c,onCancel:d}){return l.jsx("div",{onClick:d,style:{position:"fixed",inset:0,zIndex:9999,background:"rgba(0,0,0,0.5)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsxs("div",{onClick:f=>f.stopPropagation(),style:{width:380,borderRadius:16,background:"var(--bg-card)",border:"1px solid var(--border)",boxShadow:"var(--shadow-lg, 0 20px 60px rgba(0,0,0,0.4))",padding:"24px",animation:"fadeIn 0.15s ease"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,marginBottom:12},children:[l.jsx("div",{style:{width:36,height:36,borderRadius:10,flexShrink:0,background:s?"color-mix(in srgb, var(--red) 12%, transparent)":"color-mix(in srgb, var(--accent) 12%, transparent)",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(H1,{size:18,style:{color:s?"var(--red)":"var(--orange)"}})}),l.jsx("div",{style:{fontSize:15,fontWeight:600,color:"var(--text-primary)"},children:t})]}),l.jsx("div",{style:{fontSize:13,color:"var(--text-muted)",lineHeight:1.5,marginBottom:20,paddingLeft:48},children:i}),l.jsxs("div",{style:{display:"flex",justifyContent:"flex-end",gap:8},children:[l.jsx("button",{onClick:d,style:{padding:"8px 16px",borderRadius:8,border:"1px solid var(--border)",background:"var(--bg-hover)",color:"var(--text-secondary)",cursor:"pointer",fontSize:13,fontWeight:500,fontFamily:"inherit"},children:a}),l.jsx("button",{onClick:c,style:{padding:"8px 16px",borderRadius:8,border:"none",background:s?"var(--red)":"var(--accent)",color:"#fff",cursor:"pointer",fontSize:13,fontWeight:600,fontFamily:"inherit"},children:r})]})]})})}const la={"Project Manager":"var(--purple)","Senior Developer":"var(--blue)","Business Analyst":"var(--green)","QA Engineer":"var(--yellow)","Security Engineer":"var(--red)","DevOps Engineer":"var(--orange)","Technical Writer":"var(--purple)","Solutions Architect":"var(--blue)","Research Specialist":"var(--green)","Frontend Developer":"var(--blue)","Backend Developer":"var(--orange)","Mobile Developer":"var(--purple)","Data Engineer":"var(--green)","Database Administrator":"var(--blue)","ML/AI Engineer":"var(--green)","Site Reliability Engineer":"var(--orange)","Product Owner":"var(--blue)","UI/UX Designer":"var(--purple)","Scrum Master":"var(--purple)","Data Analyst":"var(--green)","Release Manager":"var(--green)","Compliance Officer":"var(--red)","Support Engineer":"var(--yellow)"},Wp={"Project Manager":yh,"Senior Developer":py,"Business Analyst":Jx,"QA Engineer":Kx,"Security Engineer":M1,"DevOps Engineer":vy,"Technical Writer":zy,"Solutions Architect":xy,"Research Specialist":_y,"Frontend Developer":Vu,"Backend Developer":qu,"Mobile Developer":P1,"Data Engineer":zu,"Database Administrator":zu,"ML/AI Engineer":Vx,"Site Reliability Engineer":$x,"Product Owner":dy,"UI/UX Designer":kh,"Scrum Master":wi,"Data Analyst":ty,"Release Manager":v1,"Compliance Officer":j1,"Support Engineer":Ny},Up=new Set(["message_agent","read_inbox"]),Lb=[{label:"Messaging",match:t=>t.includes("message")||t.includes("inbox")},{label:"Memory",match:t=>t.includes("memory")||t.includes("stm")||t.includes("ltm")||t.includes("sltm")},{label:"Tasks",match:t=>t.includes("task")||t.includes("assign")||t.includes("start")},{label:"Files",match:t=>t.includes("read")||t.includes("write")||t.includes("edit")||t.includes("file")||t.includes("find")||t.includes("grep")||t.includes("ls")},{label:"Shell",match:t=>t.includes("bash")||t.includes("shell")||t.includes("exec")},{label:"Directory",match:t=>t.includes("director")||t.includes("employee")||t.includes("lookup")},{label:"Utils",match:t=>t.includes("date")||t.includes("time")||t.includes("search")}],xi="cubic-bezier(0.16, 1, 0.3, 1)",yi="0.44s";function Hp(t){const i=t.split(" ");return i.length>=2?(i[0][0]+i[i.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function Pb(t){const i=new Set,r=[];for(const s of Lb){const c=t.filter(d=>!i.has(d)&&s.match(d));c.length&&(c.forEach(d=>i.add(d)),r.push({label:s.label,tools:c}))}const a=t.filter(s=>!i.has(s));return a.length&&r.push({label:"Other",tools:a}),r}function Vp({runtime:t}){return t?t.enabled?t.status==="paused"?l.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"2px 7px",borderRadius:4,background:"var(--yellow-bg, rgba(245,158,11,0.1))",color:"var(--yellow)",border:"1px solid var(--yellow)"},children:"PAUSED"}):null:l.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"2px 7px",borderRadius:4,background:"var(--bg-tertiary)",color:"var(--text-muted)",border:"1px solid var(--border)"},children:"DISABLED"}):null}const Db={Engineering:"var(--blue)",Management:"var(--purple)","Quality Assurance":"var(--yellow)",Security:"var(--red)",Operations:"var(--orange)",Research:"var(--green)",Documentation:"var(--purple)",Design:"var(--purple)",Data:"var(--green)",Support:"var(--yellow)"};function Nb(t){return Db[t]??"var(--accent)"}function Fb({templates:t,onHire:i,onClose:r}){const[a,s]=I.useState(""),[c,d]=I.useState(""),[f,h]=I.useState(!1),[g,y]=I.useState(""),[x,v]=I.useState(""),k=t.filter(T=>!T.mandatory),j=I.useMemo(()=>{if(!x.trim())return k;const T=x.toLowerCase();return k.filter(q=>q.role.toLowerCase().includes(T)||q.department.toLowerCase().includes(T)||q.default_skills.some(P=>P.toLowerCase().includes(T)))},[k,x]),M=I.useMemo(()=>{const T=new Map;for(const q of j){const P=T.get(q.department)??[];P.push(q),T.set(q.department,P)}return[...T.entries()]},[j]),N=k.find(T=>T.id===a);async function _(){if(!(!a||!c.trim())){h(!0),y("");try{await i(a,c.trim()),r()}catch(T){y(T.message??String(T))}finally{h(!1)}}}const U=N?Wp[N.role]:null,w=N?la[N.role]??"var(--accent)":"var(--accent)";return l.jsxs(l.Fragment,{children:[l.jsx("div",{onClick:r,style:{position:"fixed",inset:0,zIndex:100,background:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"}}),l.jsxs("div",{style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:101,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:14,padding:0,width:880,maxWidth:"94vw",height:540,maxHeight:"85vh",display:"flex",flexDirection:"column",boxShadow:"0 20px 60px rgba(0,0,0,0.45)",overflow:"hidden"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 20px 12px",borderBottom:"1px solid var(--border)",flexShrink:0},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[l.jsx("div",{style:{width:30,height:30,borderRadius:8,background:"var(--accent-subtle)",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx(Zl,{size:14,style:{color:"var(--accent)"}})}),l.jsx("div",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)"},children:"Hire New Agent"}),l.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)"},children:[k.length," roles available"]})]}),l.jsx("button",{onClick:r,style:{display:"flex",alignItems:"center",justifyContent:"center",width:26,height:26,border:"1px solid var(--border)",borderRadius:7,background:"var(--bg-tertiary)",color:"var(--text-muted)",cursor:"pointer",padding:0},onMouseEnter:T=>{T.currentTarget.style.background="var(--bg-hover)",T.currentTarget.style.color="var(--text-primary)"},onMouseLeave:T=>{T.currentTarget.style.background="var(--bg-tertiary)",T.currentTarget.style.color="var(--text-muted)"},children:l.jsx(Rn,{size:13})})]}),l.jsxs("div",{style:{flex:1,display:"flex",overflow:"hidden",minHeight:0},children:[l.jsxs("div",{style:{width:320,flexShrink:0,display:"flex",flexDirection:"column",borderRight:"1px solid var(--border)",overflow:"hidden"},children:[l.jsx("div",{style:{padding:"10px 14px 6px",flexShrink:0},children:l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:8,padding:"6px 10px"},children:[l.jsx(Wr,{size:13,style:{color:"var(--text-muted)",flexShrink:0}}),l.jsx("input",{value:x,onChange:T=>v(T.target.value),placeholder:"Search roles...",style:{border:"none",outline:"none",background:"transparent",color:"var(--text-primary)",fontSize:12,width:"100%",fontFamily:"inherit",padding:0}}),x&&l.jsx("button",{onClick:()=>v(""),style:{display:"flex",alignItems:"center",justifyContent:"center",width:14,height:14,border:"none",background:"var(--bg-hover)",color:"var(--text-muted)",cursor:"pointer",borderRadius:3,padding:0,flexShrink:0},children:l.jsx(Rn,{size:9})})]})}),l.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"6px 14px 12px"},children:[M.map(([T,q])=>{const P=Nb(T);return l.jsxs("div",{style:{marginBottom:10},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:5,padding:"0 4px"},children:[l.jsx(zi,{size:10,style:{color:P,opacity:.7}}),l.jsx("span",{style:{fontSize:10,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em"},children:T}),l.jsx("div",{style:{flex:1,height:1,background:"var(--border)",marginLeft:4}})]}),q.map(X=>{const oe=a===X.id,me=la[X.role]??P,E=Wp[X.role];return l.jsxs("button",{onClick:()=>s(X.id),style:{width:"100%",fontSize:12,padding:"8px 12px",borderRadius:8,cursor:"pointer",border:"1px solid",fontFamily:"inherit",fontWeight:500,borderColor:oe?"var(--accent)":"transparent",background:oe?"var(--accent-subtle)":"transparent",color:oe?"var(--accent)":"var(--text-secondary)",transition:"all 0.1s",display:"flex",alignItems:"center",gap:10,textAlign:"left",marginBottom:2},onMouseEnter:Q=>{oe||(Q.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:Q=>{oe||(Q.currentTarget.style.background=oe?"var(--accent-subtle)":"transparent")},children:[E?l.jsx(E,{size:16,style:{color:oe?"var(--accent)":me,flexShrink:0}}):l.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:oe?"var(--accent)":me,flexShrink:0}}),X.role]},X.id)})]},T)}),j.length===0&&l.jsx("div",{style:{padding:20,textAlign:"center",color:"var(--text-muted)",fontSize:12},children:x?`No roles matching "${x}"`:"No additional roles available."})]})]}),l.jsx("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:N?l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{padding:"18px 24px 14px",flexShrink:0,borderBottom:"1px solid var(--border)"},children:l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[l.jsx("div",{style:{width:40,height:40,borderRadius:10,background:w,opacity:.9,display:"flex",alignItems:"center",justifyContent:"center"},children:U?l.jsx(U,{size:20,style:{color:"#fff"}}):l.jsx(Zl,{size:18,style:{color:"#fff"}})}),l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)"},children:N.role}),l.jsxs("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:1},children:[N.department," · ",N.category==="pm"?"Management":"Specialist"]})]})]})}),l.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"16px 24px"},children:[l.jsxs("div",{style:{marginBottom:20},children:[l.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:8},children:"Job Description"}),l.jsx("div",{style:{fontSize:13,lineHeight:1.6,color:"var(--text-secondary)"},children:N.description||"No description available."})]}),l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",marginBottom:8},children:"Default Skills"}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:N.default_skills.map(T=>l.jsx("span",{style:{fontSize:11,fontWeight:500,padding:"4px 10px",borderRadius:6,background:"var(--bg-tertiary)",color:"var(--text-secondary)",border:"1px solid var(--border)"},children:T},T))})]})]}),l.jsxs("div",{style:{padding:"14px 24px 16px",borderTop:"1px solid var(--border)",flexShrink:0,background:"var(--bg-secondary)"},children:[l.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[l.jsx("input",{value:c,onChange:T=>d(T.target.value),onKeyDown:T=>T.key==="Enter"&&_(),placeholder:"Enter agent name...",style:{flex:1,fontSize:13,padding:"9px 14px",borderRadius:8,border:"1px solid var(--border)",background:"var(--bg-card)",color:"var(--text-primary)",fontFamily:"inherit",outline:"none",boxSizing:"border-box"},onFocus:T=>{T.currentTarget.style.borderColor="var(--accent)"},onBlur:T=>{T.currentTarget.style.borderColor="var(--border)"}}),l.jsxs("button",{onClick:_,disabled:f||!c.trim(),style:{fontSize:12,padding:"9px 22px",borderRadius:8,border:"none",background:"var(--accent)",color:"#fff",cursor:"pointer",fontFamily:"inherit",fontWeight:600,flexShrink:0,opacity:f||!c.trim()?.4:1,display:"flex",alignItems:"center",gap:6},children:[l.jsx(Zl,{size:13}),f?"Hiring...":"Hire Agent"]})]}),g&&l.jsx("div",{style:{fontSize:11,color:"var(--red)",marginTop:8,padding:"6px 10px",background:"var(--red-bg)",borderRadius:6,border:"1px solid rgba(232,100,90,0.15)"},children:g})]})]}):l.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",color:"var(--text-muted)",gap:12,padding:40},children:[l.jsx(yh,{size:32,style:{opacity:.3}}),l.jsx("div",{style:{fontSize:14,fontWeight:500},children:"Select a role"}),l.jsx("div",{style:{fontSize:12,textAlign:"center",maxWidth:240,lineHeight:1.5},children:"Choose a role from the list to see the job description and hire a new agent."})]})})]})]})]})}function Ob({agentId:t}){var U;const{data:i}=wt("/api/model-config",1e4),[r,a]=I.useState(!1),[s,c]=I.useState(""),[d,f]=I.useState(""),[h,g]=I.useState(!1),y=((i==null?void 0:i.providers)??[]).filter(w=>w.configured),x=(i==null?void 0:i.config.agentModels[t])??null,v=i==null?void 0:i.config.primary,k=x??v;I.useEffect(()=>{x?(c(x.provider),f(x.model)):v&&(c(v.provider),f(v.model))},[x==null?void 0:x.provider,x==null?void 0:x.model,v==null?void 0:v.provider,v==null?void 0:v.model]);const j=y.find(w=>w.id===s),M=(j==null?void 0:j.models)??[];async function N(){a(!0);try{await st("/api/agent-model",{agent_id:t,provider:s,model:d})}catch(w){console.error(w)}finally{a(!1),g(!1)}}async function _(){a(!0);try{await st("/api/agent-model",{agent_id:t})}catch(w){console.error(w)}finally{a(!1),g(!1)}}return i?l.jsxs("div",{style:{marginBottom:18},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[l.jsx(Cu,{size:13,style:{color:"var(--purple)"}}),l.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)"},children:"Model"}),x&&l.jsx("span",{style:{fontSize:9,fontWeight:600,padding:"2px 6px",borderRadius:4,background:"color-mix(in srgb, var(--purple) 12%, transparent)",color:"var(--purple)"},children:"OVERRIDE"})]}),!h&&l.jsx("button",{onClick:()=>g(!0),style:{fontSize:11,fontWeight:500,padding:"4px 12px",borderRadius:6,border:"1px solid var(--border)",background:"var(--bg-tertiary)",color:"var(--text-secondary)",cursor:"pointer",fontFamily:"inherit"},children:"Change"})]}),h?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderRadius:8,background:"var(--bg-tertiary)",border:"1px solid var(--border)"},children:[l.jsx(Ti,{value:s,onChange:w=>{c(w),f("")},options:y.map(w=>({value:w.id,label:w.name,iconUrl:w.iconUrl})),placeholder:"Provider...",alignRight:!1}),l.jsx(Ti,{value:d,onChange:f,options:M.map(w=>({value:w,label:w})),placeholder:`Select model (${M.length})...`,alignRight:!1}),l.jsx("button",{onClick:N,disabled:r||!d,style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:6,border:"none",flexShrink:0,background:d?"var(--accent)":"var(--bg-tertiary)",color:d?"#fff":"var(--text-muted)",cursor:d?"pointer":"default",padding:0},children:l.jsx(Ii,{size:13})}),x&&l.jsx("button",{onClick:_,disabled:r,title:"Reset to primary",style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,borderRadius:6,flexShrink:0,border:"1px solid var(--border)",background:"transparent",color:"var(--text-muted)",cursor:"pointer",padding:0},children:l.jsx(Rn,{size:12})}),l.jsx("button",{onClick:()=>g(!1),style:{fontSize:11,padding:"5px 10px",borderRadius:6,border:"1px solid var(--border)",background:"transparent",color:"var(--text-muted)",cursor:"pointer",fontFamily:"inherit",flexShrink:0},children:"Cancel"})]}):l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 12px",borderRadius:8,background:"var(--bg-tertiary)",border:"1px solid var(--border)"},children:[(()=>{const w=y.find(T=>T.id===(k==null?void 0:k.provider));return w?l.jsx("img",{src:w.iconUrl,alt:w.name,style:{width:20,height:20,flexShrink:0,borderRadius:3,filter:"var(--icon-filter, none)"},onError:T=>{T.target.style.display="none"}}):l.jsx("div",{style:{width:8,height:8,borderRadius:"50%",flexShrink:0,background:"var(--green)"}})})(),l.jsxs("div",{style:{flex:1},children:[l.jsx("div",{style:{fontSize:12,fontWeight:500,color:"var(--text-primary)"},children:((U=y.find(w=>w.id===(k==null?void 0:k.provider)))==null?void 0:U.name)??(k==null?void 0:k.provider)??"—"}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontFamily:"monospace"},children:(k==null?void 0:k.model)??"Not configured"})]}),!x&&l.jsx("span",{style:{fontSize:9,fontWeight:600,padding:"2px 6px",borderRadius:4,background:"var(--bg-card)",color:"var(--text-muted)",border:"1px solid var(--border)"},children:"PRIMARY"})]})]}):null}function $b({profile:t}){const[i,r]=I.useState(()=>new Set(t.enabled_tools)),[a,s]=I.useState(!1),c=JSON.stringify([...i].sort())!==JSON.stringify([...t.enabled_tools].sort());function d(y){Up.has(y)||r(x=>{const v=new Set(x);return v.has(y)?v.delete(y):v.add(y),v})}async function f(){s(!0);try{await st("/api/agent-config",{agent_id:t.agent_id,tools:Array.from(i)})}catch(y){console.error(y)}finally{s(!1)}}const h=Pb(t.all_tools),g=t.all_tools.filter(y=>i.has(y)).length;return l.jsxs("div",{children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:14},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[l.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)"},children:"Tools"}),l.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)",background:"var(--bg-tertiary)",padding:"2px 8px",borderRadius:5,fontFamily:"monospace"},children:[g,"/",t.all_tools.length]})]}),c&&l.jsx("button",{onClick:f,disabled:a,style:{fontSize:11,fontWeight:500,padding:"4px 14px",borderRadius:6,border:"none",background:"var(--accent)",color:"#fff",cursor:"pointer",fontFamily:"inherit",opacity:a?.5:1},children:a?"Saving...":"Save changes"})]}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(210px, 1fr))",gap:10},children:h.map(y=>l.jsxs("div",{style:{border:"1px solid var(--border)",borderRadius:8,overflow:"hidden"},children:[l.jsx("div",{style:{fontSize:10,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.05em",padding:"7px 12px 5px",background:"var(--bg-tertiary)",borderBottom:"1px solid var(--border)"},children:y.label}),y.tools.map((x,v)=>{const k=i.has(x),j=Up.has(x);return l.jsxs("div",{className:`tool-row${j?" locked":""}`,onClick:()=>d(x),style:{borderBottom:v<y.tools.length-1?"1px solid var(--border)":"none",height:32},children:[l.jsx("span",{style:{flex:1,fontSize:11,fontFamily:"monospace",color:k?"var(--text-primary)":"var(--text-muted)"},children:x}),j?l.jsx(Qy,{size:9,style:{color:"var(--text-muted)",flexShrink:0}}):l.jsx("div",{style:{width:28,height:16,borderRadius:8,flexShrink:0,background:k?"var(--green)":"var(--bg-tertiary)",border:k?"none":"1px solid var(--border)",position:"relative",transition:"background 0.15s",cursor:"pointer"},children:l.jsx("div",{style:{width:12,height:12,borderRadius:"50%",background:k?"#fff":"var(--text-muted)",position:"absolute",top:2,left:k?14:2,transition:"left 0.15s, background 0.15s"}})})]},x)})]},y.label))})]})}function Bb(){const{employees:t,refresh:i}=jr(),{data:r}=wt("/api/tasks",5e3),{data:a,refresh:s}=wt("/api/company",15e3),{data:c,refresh:d}=wt("/api/agents/runtime",4e3),{data:f}=wt("/api/role-templates",3e4),{tokens:h,activeAgents:g}=Ai(),[y,x]=I.useState(""),[v,k]=I.useState("grid"),[j,M]=I.useState({}),[N,_]=I.useState(!1),[U,w]=I.useState(null),[T,q]=I.useState(null),[P,X]=I.useState(null),[oe,me]=I.useState("idle"),E=I.useRef(null),Q=I.useRef(new Map),[Y,de]=I.useState(!1),[J,K]=I.useState(""),[he,le]=I.useState(!1),Z=I.useRef(null),G=t??[],S=r??[],A=(a==null?void 0:a.agents)??[],V=(c==null?void 0:c.agents)??[],C=(f==null?void 0:f.templates)??[],ge=oe==="entered",je=I.useMemo(()=>{const ee=new Map;for(const te of V)ee.set(te.agent_id,te);return ee},[V]),ye=I.useMemo(()=>{if(!y.trim())return G;const ee=y.toLowerCase();return G.filter(te=>te.name.toLowerCase().includes(ee)||te.role.toLowerCase().includes(ee)||te.agent_key.toLowerCase().includes(ee))},[G,y]),H=I.useMemo(()=>{const ee=new Map;for(const ze of ye){const Oe=ze.department??"Other";ee.has(Oe)||ee.set(Oe,[]),ee.get(Oe).push(ze)}const te=["Management","Product","Engineering","Analysis","Design","Documentation","Governance"];return[...ee.entries()].sort(([ze],[Oe])=>{const Ne=te.indexOf(ze),ke=te.indexOf(Oe);return Ne!==-1&&ke!==-1?Ne-ke:Ne!==-1?-1:ke!==-1?1:ze.localeCompare(Oe)})},[ye]),pe=I.useCallback(ee=>{const te=Q.current.get(ee),ze=E.current;if(!te||!ze)return;const Oe=te.getBoundingClientRect(),Ne=ze.getBoundingClientRect();X({top:Oe.top-Ne.top,left:Oe.left-Ne.left,width:Oe.width,height:Oe.height,rootW:Ne.width,rootH:Ne.height}),q(ee),de(!1),me("measure"),requestAnimationFrame(()=>{requestAnimationFrame(()=>me("entered"))})},[]),fe=I.useCallback(()=>{me("exiting"),setTimeout(()=>{q(null),X(null),me("idle")},450)},[]);async function Te(ee,te){M(ze=>({...ze,[ee]:"toggle"}));try{await st(`/api/agents/${ee}/toggle`,{enabled:te}),d(),i()}catch(ze){console.error(ze)}finally{M(ze=>({...ze,[ee]:null}))}}async function Fe(ee){w(null),M(te=>({...te,[ee]:"remove"}));try{await hh(`/api/agents/${ee}`),d(),i()}catch(te){console.error(te)}finally{M(te=>({...te,[ee]:null}))}}async function Ze(ee,te){await st("/api/agents",{template:ee,name:te}),d(),i()}function Ge(ee){const te=ee.agent_key,ze=la[ee.role]??"var(--text-muted)",Oe=g[te]??!1,Ne=je.get(te),ke=S.filter(Ie=>Ie.agent_id===te),$e=ke.filter(Ie=>Ie.status==="in_progress").length,D=ke.filter(Ie=>Ie.status==="completed").length,ae=ke.filter(Ie=>Ie.status==="todo").length,Ee=h[te]??"",Pe=(Ne==null?void 0:Ne.template)==="pm";return l.jsxs("div",{ref:Ie=>{Ie&&Q.current.set(te,Ie)},onClick:()=>pe(te),className:"card-hover",style:{background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:10,padding:14,cursor:"pointer",transition:"border-color 0.12s, box-shadow 0.12s",position:"relative",display:"flex",flexDirection:"column",gap:10,opacity:Ne&&!Ne.enabled?.55:1},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[l.jsxs("div",{style:{position:"relative",flexShrink:0},children:[l.jsx("div",{style:{width:36,height:36,borderRadius:9,background:ze,opacity:.9,display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:600,color:"#fff"},children:ee.initials??Hp(ee.name)}),Oe&&l.jsx("div",{style:{position:"absolute",bottom:-1,right:-1,width:9,height:9,borderRadius:"50%",background:"var(--green)",border:"2px solid var(--bg-card)"}})]}),l.jsxs("div",{style:{flex:1,minWidth:0},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[l.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:ee.name}),l.jsx(Vp,{runtime:Ne})]}),l.jsx("div",{style:{fontSize:11,color:ze,fontWeight:500,marginTop:1},children:ee.role})]}),l.jsxs("span",{style:{fontSize:10,fontFamily:"monospace",color:"var(--text-muted)",flexShrink:0},children:["@",te]})]}),ke.length>0&&l.jsxs("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[$e>0&&l.jsxs("span",{style:{fontSize:10,fontWeight:500,color:"var(--blue)",background:"var(--blue-bg, rgba(17,88,199,0.1))",padding:"2px 7px",borderRadius:4},children:[$e," active"]}),ae>0&&l.jsxs("span",{style:{fontSize:10,fontWeight:500,color:"var(--text-muted)",background:"var(--bg-tertiary)",padding:"2px 7px",borderRadius:4},children:[ae," pending"]}),D>0&&l.jsxs("span",{style:{fontSize:10,fontWeight:500,color:"var(--green)",background:"var(--green-bg, rgba(16,185,129,0.1))",padding:"2px 7px",borderRadius:4},children:[D," done"]})]}),Ee&&l.jsx("div",{style:{fontSize:10.5,fontFamily:"monospace",color:"var(--text-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",background:"var(--bg-tertiary)",padding:"4px 8px",borderRadius:5},children:Ee.length>120?Ee.slice(-120):Ee}),Ne&&!Pe&&l.jsxs("div",{style:{display:"flex",gap:4,marginTop:"auto"},onClick:Ie=>Ie.stopPropagation(),children:[l.jsxs("button",{onClick:()=>Te(te,!Ne.enabled),disabled:j[te]==="toggle",title:Ne.enabled?"Disable":"Enable",style:{display:"flex",alignItems:"center",gap:3,fontSize:10,fontWeight:600,padding:"3px 8px",borderRadius:5,border:"1px solid",cursor:"pointer",fontFamily:"inherit",borderColor:Ne.enabled?"var(--green)":"var(--border)",background:Ne.enabled?"var(--green-bg, rgba(16,185,129,0.1))":"var(--bg-tertiary)",color:Ne.enabled?"var(--green)":"var(--text-muted)",opacity:j[te]==="toggle"?.5:1},children:[l.jsx(ip,{size:10}),Ne.enabled?"On":"Off"]}),l.jsx("button",{onClick:()=>w(te),disabled:j[te]==="remove",title:"Remove",style:{display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:5,padding:0,marginLeft:"auto",border:"1px solid var(--border)",cursor:"pointer",background:"transparent",color:"var(--text-muted)",opacity:j[te]==="remove"?.5:1,transition:"color 0.08s, border-color 0.08s"},onMouseEnter:Ie=>{Ie.currentTarget.style.borderColor="var(--red)",Ie.currentTarget.style.color="var(--red)"},onMouseLeave:Ie=>{Ie.currentTarget.style.borderColor="var(--border)",Ie.currentTarget.style.color="var(--text-muted)"},children:l.jsx(Sr,{size:10})})]})]},te)}const De=T?G.find(ee=>ee.agent_key===T):null,mt=T?A.find(ee=>ee.agent_id===T):null,Et=De?la[De.role]??"var(--text-muted)":"var(--text-muted)",_t=T?S.filter(ee=>ee.agent_id===T):[],W=T?je.get(T):void 0;return l.jsxs("div",{ref:E,style:{position:"relative",display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[l.jsxs("div",{className:"page-header",style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:16},children:[l.jsxs("div",{children:[l.jsx("div",{className:"page-title",children:"Directory"}),l.jsx("div",{className:"page-subtitle",children:ye.length===G.length?`${G.length} employees`:`${ye.length} of ${G.length} employees`})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[l.jsx("div",{style:{display:"flex",borderRadius:8,overflow:"hidden",border:"1px solid var(--border)",flexShrink:0},children:[["grid",Vy,"Grid"],["department",zi,"Dept"]].map(([ee,te,ze])=>l.jsxs("button",{onClick:()=>k(ee),title:`${ze} view`,style:{display:"flex",alignItems:"center",gap:4,fontSize:11,fontWeight:500,padding:"5px 10px",border:"none",cursor:"pointer",fontFamily:"inherit",background:v===ee?"var(--accent)":"transparent",color:v===ee?"#fff":"var(--text-muted)",transition:"all 0.08s"},children:[l.jsx(te,{size:12}),ze]},ee))}),l.jsxs("button",{onClick:()=>_(!0),style:{display:"flex",alignItems:"center",gap:6,fontSize:12,fontWeight:600,padding:"7px 14px",borderRadius:20,border:"none",background:"var(--accent)",color:"#fff",cursor:"pointer",fontFamily:"inherit",flexShrink:0,transition:"opacity 0.08s"},onMouseEnter:ee=>{ee.currentTarget.style.opacity="0.85"},onMouseLeave:ee=>{ee.currentTarget.style.opacity="1"},children:[l.jsx(Zl,{size:13}),"Hire"]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:20,padding:"6px 14px",flexShrink:0},children:[l.jsx(Wr,{size:14,style:{color:"var(--text-muted)",flexShrink:0}}),l.jsx("input",{value:y,onChange:ee=>x(ee.target.value),placeholder:"Search...",style:{border:"none",outline:"none",background:"transparent",color:"var(--text-primary)",fontSize:12.5,width:180,fontFamily:"inherit",padding:0}}),y&&l.jsx("button",{onClick:()=>x(""),style:{display:"flex",alignItems:"center",justifyContent:"center",width:14,height:14,border:"none",background:"var(--bg-hover)",color:"var(--text-muted)",cursor:"pointer",borderRadius:3,padding:0,flexShrink:0},children:l.jsx(Rn,{size:9})})]})]})]}),l.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"4px 24px 20px"},children:[v==="department"?l.jsx("div",{children:H.map(([ee,te])=>l.jsxs("div",{style:{marginBottom:24},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10,paddingBottom:6,borderBottom:"1px solid var(--border)"},children:[l.jsx(zi,{size:14,style:{color:"var(--text-muted)"}}),l.jsx("span",{style:{fontSize:13,fontWeight:700,color:"var(--text-primary)",letterSpacing:"0.01em"},children:ee}),l.jsx("span",{style:{fontSize:11,color:"var(--text-muted)",background:"var(--bg-tertiary)",padding:"1px 8px",borderRadius:5,fontFamily:"monospace"},children:te.length})]}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:12},children:te.map(ze=>Ge(ze))})]},ee))}):l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(300px, 1fr))",gap:12},children:ye.map(ee=>Ge(ee))}),ye.length===0&&G.length>0&&l.jsxs("div",{style:{textAlign:"center",padding:"48px 24px",color:"var(--text-muted)",fontSize:13},children:["No employees matching “",y,"”"]})]}),T&&P&&l.jsx("div",{style:{position:"absolute",inset:0,zIndex:19,background:"var(--bg-card)",opacity:ge?1:0,transition:oe==="measure"?"none":"opacity 0.3s ease",pointerEvents:"none"}}),T&&P&&De&&(()=>{const ee=_t.filter(ke=>ke.status==="in_progress").length,te=_t.filter(ke=>ke.status==="completed").length,ze=_t.filter(ke=>ke.status==="todo").length,Oe=g[T]??!1,Ne=(W==null?void 0:W.template)==="pm";return l.jsx("div",{style:{position:"absolute",zIndex:20,top:ge?0:P.top,left:ge?0:P.left,width:ge?P.rootW:P.width,height:ge?P.rootH:P.height,background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:ge?0:8,overflow:"hidden",boxShadow:ge?"none":"var(--shadow-lg)",transition:oe==="measure"?"none":`top ${yi} ${xi}, left ${yi} ${xi}, width ${yi} ${xi}, height ${yi} ${xi}, border-radius ${yi} ${xi}, box-shadow ${yi} ${xi}`},children:l.jsxs("div",{style:{opacity:ge?1:0,transition:ge?"opacity 0.22s ease-in 0.2s":"opacity 0.1s ease-out",height:"100%",display:"flex",flexDirection:"column",overflow:"hidden"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"16px 24px",borderBottom:"1px solid var(--border)",flexShrink:0},children:[l.jsx("button",{onClick:fe,style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,border:"none",borderRadius:8,background:"var(--bg-tertiary)",color:"var(--text-secondary)",cursor:"pointer",flexShrink:0,padding:0,transition:"background 0.08s, color 0.08s"},onMouseEnter:ke=>{ke.currentTarget.style.background="var(--bg-hover)",ke.currentTarget.style.color="var(--text-primary)"},onMouseLeave:ke=>{ke.currentTarget.style.background="var(--bg-tertiary)",ke.currentTarget.style.color="var(--text-secondary)"},children:l.jsx(oy,{size:16})}),l.jsxs("div",{style:{position:"relative",flexShrink:0},children:[l.jsx("div",{style:{width:40,height:40,borderRadius:11,background:Et,opacity:.9,display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,fontWeight:600,color:"#fff"},children:Hp(De.name)}),Oe&&l.jsx("div",{style:{position:"absolute",bottom:-1,right:-1,width:10,height:10,borderRadius:"50%",background:"var(--green)",border:"2px solid var(--bg-card)"}})]}),l.jsxs("div",{style:{flex:1},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[Y?l.jsxs("form",{onSubmit:async ke=>{ke.preventDefault();const $e=J.trim();if(!$e||$e===De.name){de(!1);return}le(!0);try{await Mx(`/api/agents/${T}`,{name:$e}),d(),s()}catch{}le(!1),de(!1)},style:{display:"flex",alignItems:"center",gap:6},children:[l.jsx("input",{ref:Z,value:J,onChange:ke=>K(ke.target.value),onBlur:()=>{he||de(!1)},onKeyDown:ke=>{ke.key==="Escape"&&de(!1)},autoFocus:!0,style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",background:"var(--bg-tertiary)",border:"1px solid var(--accent)",borderRadius:6,padding:"2px 8px",fontFamily:"inherit",outline:"none",width:200}}),l.jsx("button",{type:"submit",disabled:he,style:{display:"flex",alignItems:"center",justifyContent:"center",width:26,height:26,borderRadius:6,border:"none",background:"var(--accent)",color:"#fff",cursor:"pointer",padding:0},children:l.jsx(Ii,{size:14})})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)"},children:De.name}),l.jsx("button",{onClick:()=>{K(De.name),de(!0)},title:"Rename agent",style:{display:"flex",alignItems:"center",justifyContent:"center",width:24,height:24,borderRadius:6,border:"none",background:"transparent",color:"var(--text-muted)",cursor:"pointer",padding:0,transition:"background 0.08s, color 0.08s"},onMouseEnter:ke=>{ke.currentTarget.style.background="var(--bg-hover)",ke.currentTarget.style.color="var(--text-primary)"},onMouseLeave:ke=>{ke.currentTarget.style.background="transparent",ke.currentTarget.style.color="var(--text-muted)"},children:l.jsx(d1,{size:13})})]}),l.jsx(Vp,{runtime:W})]}),l.jsxs("div",{style:{fontSize:12,color:Et,fontWeight:500,marginTop:1},children:[De.role," · @",T]})]}),W&&!Ne&&l.jsxs("div",{style:{display:"flex",gap:6,flexShrink:0,marginRight:8},children:[l.jsxs("button",{onClick:()=>Te(T,!W.enabled),disabled:j[T]==="toggle",title:W.enabled?"Disable agent":"Enable agent",style:{display:"flex",alignItems:"center",gap:4,fontSize:11,fontWeight:600,padding:"5px 12px",borderRadius:6,border:"1px solid",cursor:"pointer",fontFamily:"inherit",borderColor:W.enabled?"var(--green)":"var(--border)",background:W.enabled?"var(--green-bg, rgba(16,185,129,0.1))":"var(--bg-tertiary)",color:W.enabled?"var(--green)":"var(--text-muted)",opacity:j[T]==="toggle"?.5:1},children:[l.jsx(ip,{size:11}),W.enabled?"On":"Off"]}),l.jsx("button",{onClick:()=>{w(T),fe()},disabled:j[T]==="remove",title:"Remove agent",style:{display:"flex",alignItems:"center",justifyContent:"center",width:30,height:30,borderRadius:6,padding:0,border:"1px solid var(--border)",cursor:"pointer",background:"transparent",color:"var(--text-muted)",opacity:j[T]==="remove"?.5:1},onMouseEnter:ke=>{ke.currentTarget.style.borderColor="var(--red)",ke.currentTarget.style.color="var(--red)",ke.currentTarget.style.background="var(--red-bg, rgba(239,68,68,0.1))"},onMouseLeave:ke=>{ke.currentTarget.style.borderColor="var(--border)",ke.currentTarget.style.color="var(--text-muted)",ke.currentTarget.style.background="transparent"},children:l.jsx(Sr,{size:12})})]}),_t.length>0&&l.jsxs("div",{style:{display:"flex",gap:6,flexShrink:0},children:[ee>0&&l.jsxs("span",{style:{fontSize:11,fontWeight:500,color:"var(--blue)",background:"var(--blue-bg)",padding:"3px 10px",borderRadius:5},children:[ee," active"]}),ze>0&&l.jsxs("span",{style:{fontSize:11,fontWeight:500,color:"var(--text-muted)",background:"var(--bg-tertiary)",padding:"3px 10px",borderRadius:5},children:[ze," pending"]}),te>0&&l.jsxs("span",{style:{fontSize:11,fontWeight:500,color:"var(--green)",background:"var(--green-bg)",padding:"3px 10px",borderRadius:5},children:[te," done"]})]})]}),l.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"20px 24px 28px"},children:[l.jsx(Ob,{agentId:T}),mt&&l.jsx($b,{profile:mt},T)]})]})})})(),N&&l.jsx(Fb,{templates:C,onHire:Ze,onClose:()=>_(!1)}),U&&l.jsx(og,{title:"Remove Agent",message:`Remove agent @${U}? This will delete them from the roster and cannot be undone.`,confirmLabel:"Remove",destructive:!0,onConfirm:()=>Fe(U),onCancel:()=>w(null)})]})}function qp(t,i){const r=String(t);if(typeof i!="string")throw new TypeError("Expected character");let a=0,s=r.indexOf(i);for(;s!==-1;)a++,s=r.indexOf(i,s+i.length);return a}function Wb(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ub(t,i,r){const s=pa((r||{}).ignore||[]),c=Hb(i);let d=-1;for(;++d<c.length;)rg(t,"text",f);function f(g,y){let x=-1,v;for(;++x<y.length;){const k=y[x],j=v?v.children:void 0;if(s(k,j?j.indexOf(k):void 0,v))return;v=k}if(v)return h(g,y)}function h(g,y){const x=y[y.length-1],v=c[d][0],k=c[d][1];let j=0;const N=x.children.indexOf(g);let _=!1,U=[];v.lastIndex=0;let w=v.exec(g.value);for(;w;){const T=w.index,q={index:w.index,input:w.input,stack:[...y,g]};let P=k(...w,q);if(typeof P=="string"&&(P=P.length>0?{type:"text",value:P}:void 0),P===!1?v.lastIndex=T+1:(j!==T&&U.push({type:"text",value:g.value.slice(j,T)}),Array.isArray(P)?U.push(...P):P&&U.push(P),j=T+w[0].length,_=!0),!v.global)break;w=v.exec(g.value)}return _?(j<g.value.length&&U.push({type:"text",value:g.value.slice(j)}),x.children.splice(N,1,...U)):U=[g],N+U.length}}function Hb(t){const i=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let a=-1;for(;++a<r.length;){const s=r[a];i.push([Vb(s[0]),qb(s[1])])}return i}function Vb(t){return typeof t=="string"?new RegExp(Wb(t),"g"):t}function qb(t){return typeof t=="function"?t:function(){return t}}const gu="phrasing",mu=["autolink","link","image","label"];function Yb(){return{transforms:[ew],enter:{literalAutolink:Qb,literalAutolinkEmail:xu,literalAutolinkHttp:xu,literalAutolinkWww:xu},exit:{literalAutolink:Jb,literalAutolinkEmail:Zb,literalAutolinkHttp:Gb,literalAutolinkWww:Xb}}}function Kb(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:gu,notInConstruct:mu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:gu,notInConstruct:mu},{character:":",before:"[ps]",after:"\\/",inConstruct:gu,notInConstruct:mu}]}}function Qb(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function xu(t){this.config.enter.autolinkProtocol.call(this,t)}function Gb(t){this.config.exit.autolinkProtocol.call(this,t)}function Xb(t){this.config.exit.data.call(this,t);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(t)}function Zb(t){this.config.exit.autolinkEmail.call(this,t)}function Jb(t){this.exit(t)}function ew(t){Ub(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tw],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),nw]],{ignore:["link","linkReference"]})}function tw(t,i,r,a,s){let c="";if(!lg(s)||(/^w/i.test(i)&&(r=i+r,i="",c="http://"),!rw(r)))return!1;const d=iw(r+a);if(!d[0])return!1;const f={type:"link",title:null,url:c+i+d[0],children:[{type:"text",value:i+d[0]}]};return d[1]?[f,{type:"text",value:d[1]}]:f}function nw(t,i,r,a){return!lg(a,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+r,children:[{type:"text",value:i+"@"+r}]}}function rw(t){const i=t.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))}function iw(t){const i=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!i)return[t,void 0];t=t.slice(0,i.index);let r=i[0],a=r.indexOf(")");const s=qp(t,"(");let c=qp(t,")");for(;a!==-1&&s>c;)t+=r.slice(0,a+1),r=r.slice(a+1),a=r.indexOf(")"),c++;return[t,r]}function lg(t,i){const r=t.input.charCodeAt(t.index-1);return(t.index===0||Ur(r)||ca(r))&&(!i||r!==47)}ag.peek=pw;function ow(){this.buffer()}function lw(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function aw(){this.buffer()}function sw(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function uw(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=In(this.sliceSerialize(t)).toLowerCase(),r.label=i}function cw(t){this.exit(t)}function dw(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=In(this.sliceSerialize(t)).toLowerCase(),r.label=i}function fw(t){this.exit(t)}function pw(){return"["}function ag(t,i,r,a){const s=r.createTracker(a);let c=s.move("[^");const d=r.enter("footnoteReference"),f=r.enter("reference");return c+=s.move(r.safe(r.associationId(t),{after:"]",before:c})),f(),d(),c+=s.move("]"),c}function hw(){return{enter:{gfmFootnoteCallString:ow,gfmFootnoteCall:lw,gfmFootnoteDefinitionLabelString:aw,gfmFootnoteDefinition:sw},exit:{gfmFootnoteCallString:uw,gfmFootnoteCall:cw,gfmFootnoteDefinitionLabelString:dw,gfmFootnoteDefinition:fw}}}function gw(t){let i=!1;return t&&t.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:r,footnoteReference:ag},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(a,s,c,d){const f=c.createTracker(d);let h=f.move("[^");const g=c.enter("footnoteDefinition"),y=c.enter("label");return h+=f.move(c.safe(c.associationId(a),{before:h,after:"]"})),y(),h+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),h+=f.move((i?`
473
+ `:" ")+c.indentLines(c.containerFlow(a,f.current()),i?sg:mw))),g(),h}}function mw(t,i,r){return i===0?t:sg(t,i,r)}function sg(t,i,r){return(r?"":" ")+t}const xw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ug.peek=ww;function yw(){return{canContainEols:["delete"],enter:{strikethrough:kw},exit:{strikethrough:bw}}}function vw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xw}],handlers:{delete:ug}}}function kw(t){this.enter({type:"delete",children:[]},t)}function bw(t){this.exit(t)}function ug(t,i,r,a){const s=r.createTracker(a),c=r.enter("strikethrough");let d=s.move("~~");return d+=r.containerPhrasing(t,{...s.current(),before:d,after:"~"}),d+=s.move("~~"),c(),d}function ww(){return"~"}function Sw(t){return t.length}function jw(t,i){const r=i||{},a=(r.align||[]).concat(),s=r.stringLength||Sw,c=[],d=[],f=[],h=[];let g=0,y=-1;for(;++y<t.length;){const M=[],N=[];let _=-1;for(t[y].length>g&&(g=t[y].length);++_<t[y].length;){const U=Cw(t[y][_]);if(r.alignDelimiters!==!1){const w=s(U);N[_]=w,(h[_]===void 0||w>h[_])&&(h[_]=w)}M.push(U)}d[y]=M,f[y]=N}let x=-1;if(typeof a=="object"&&"length"in a)for(;++x<g;)c[x]=Yp(a[x]);else{const M=Yp(a);for(;++x<g;)c[x]=M}x=-1;const v=[],k=[];for(;++x<g;){const M=c[x];let N="",_="";M===99?(N=":",_=":"):M===108?N=":":M===114&&(_=":");let U=r.alignDelimiters===!1?1:Math.max(1,h[x]-N.length-_.length);const w=N+"-".repeat(U)+_;r.alignDelimiters!==!1&&(U=N.length+U+_.length,U>h[x]&&(h[x]=U),k[x]=U),v[x]=w}d.splice(1,0,v),f.splice(1,0,k),y=-1;const j=[];for(;++y<d.length;){const M=d[y],N=f[y];x=-1;const _=[];for(;++x<g;){const U=M[x]||"";let w="",T="";if(r.alignDelimiters!==!1){const q=h[x]-(N[x]||0),P=c[x];P===114?w=" ".repeat(q):P===99?q%2?(w=" ".repeat(q/2+.5),T=" ".repeat(q/2-.5)):(w=" ".repeat(q/2),T=w):T=" ".repeat(q)}r.delimiterStart!==!1&&!x&&_.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&U==="")&&(r.delimiterStart!==!1||x)&&_.push(" "),r.alignDelimiters!==!1&&_.push(w),_.push(U),r.alignDelimiters!==!1&&_.push(T),r.padding!==!1&&_.push(" "),(r.delimiterEnd!==!1||x!==g-1)&&_.push("|")}j.push(r.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return j.join(`
474
+ `)}function Cw(t){return t==null?"":String(t)}function Yp(t){const i=typeof t=="string"?t.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}function zw(t,i,r,a){const s=r.enter("blockquote"),c=r.createTracker(a);c.move("> "),c.shift(2);const d=r.indentLines(r.containerFlow(t,c.current()),Ew);return s(),d}function Ew(t,i,r){return">"+(r?"":" ")+t}function _w(t,i){return Kp(t,i.inConstruct,!0)&&!Kp(t,i.notInConstruct,!1)}function Kp(t,i,r){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return r;let a=-1;for(;++a<i.length;)if(t.includes(i[a]))return!0;return!1}function Qp(t,i,r,a){let s=-1;for(;++s<r.unsafe.length;)if(r.unsafe[s].character===`
475
+ `&&_w(r.stack,r.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
476
+ `}function Tw(t,i){const r=String(t);let a=r.indexOf(i),s=a,c=0,d=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++c>d&&(d=c):c=1,s=a+i.length,a=r.indexOf(i,s);return d}function Iw(t,i){return!!(i.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function Rw(t){const i=t.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function Mw(t,i,r,a){const s=Rw(r),c=t.value||"",d=s==="`"?"GraveAccent":"Tilde";if(Iw(t,r)){const x=r.enter("codeIndented"),v=r.indentLines(c,Aw);return x(),v}const f=r.createTracker(a),h=s.repeat(Math.max(Tw(c,s)+1,3)),g=r.enter("codeFenced");let y=f.move(h);if(t.lang){const x=r.enter(`codeFencedLang${d}`);y+=f.move(r.safe(t.lang,{before:y,after:" ",encode:["`"],...f.current()})),x()}if(t.lang&&t.meta){const x=r.enter(`codeFencedMeta${d}`);y+=f.move(" "),y+=f.move(r.safe(t.meta,{before:y,after:`
477
+ `,encode:["`"],...f.current()})),x()}return y+=f.move(`
478
+ `),c&&(y+=f.move(c+`
479
+ `)),y+=f.move(h),g(),y}function Aw(t,i,r){return(r?"":" ")+t}function cc(t){const i=t.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function Lw(t,i,r,a){const s=cc(r),c=s==='"'?"Quote":"Apostrophe",d=r.enter("definition");let f=r.enter("label");const h=r.createTracker(a);let g=h.move("[");return g+=h.move(r.safe(r.associationId(t),{before:g,after:"]",...h.current()})),g+=h.move("]: "),f(),!t.url||/[\0- \u007F]/.test(t.url)?(f=r.enter("destinationLiteral"),g+=h.move("<"),g+=h.move(r.safe(t.url,{before:g,after:">",...h.current()})),g+=h.move(">")):(f=r.enter("destinationRaw"),g+=h.move(r.safe(t.url,{before:g,after:t.title?" ":`
480
+ `,...h.current()}))),f(),t.title&&(f=r.enter(`title${c}`),g+=h.move(" "+s),g+=h.move(r.safe(t.title,{before:g,after:s,...h.current()})),g+=h.move(s),f()),d(),g}function Pw(t){const i=t.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function To(t){return"&#x"+t.toString(16).toUpperCase()+";"}function aa(t,i,r){const a=_i(t),s=_i(i);return a===void 0?s===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}cg.peek=Dw;function cg(t,i,r,a){const s=Pw(r),c=r.enter("emphasis"),d=r.createTracker(a),f=d.move(s);let h=d.move(r.containerPhrasing(t,{after:s,before:f,...d.current()}));const g=h.charCodeAt(0),y=aa(a.before.charCodeAt(a.before.length-1),g,s);y.inside&&(h=To(g)+h.slice(1));const x=h.charCodeAt(h.length-1),v=aa(a.after.charCodeAt(0),x,s);v.inside&&(h=h.slice(0,-1)+To(x));const k=d.move(s);return c(),r.attentionEncodeSurroundingInfo={after:v.outside,before:y.outside},f+h+k}function Dw(t,i,r){return r.options.emphasis||"*"}function Nw(t,i){let r=!1;return lc(t,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return r=!0,Au}),!!((!t.depth||t.depth<3)&&Ju(t)&&(i.options.setext||r))}function Fw(t,i,r,a){const s=Math.max(Math.min(6,t.depth||1),1),c=r.createTracker(a);if(Nw(t,r)){const y=r.enter("headingSetext"),x=r.enter("phrasing"),v=r.containerPhrasing(t,{...c.current(),before:`
481
+ `,after:`
482
+ `});return x(),y(),v+`
483
+ `+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
484
+ `))+1))}const d="#".repeat(s),f=r.enter("headingAtx"),h=r.enter("phrasing");c.move(d+" ");let g=r.containerPhrasing(t,{before:"# ",after:`
485
+ `,...c.current()});return/^[\t ]/.test(g)&&(g=To(g.charCodeAt(0))+g.slice(1)),g=g?d+" "+g:d,r.options.closeAtx&&(g+=" "+d),h(),f(),g}dg.peek=Ow;function dg(t){return t.value||""}function Ow(){return"<"}fg.peek=$w;function fg(t,i,r,a){const s=cc(r),c=s==='"'?"Quote":"Apostrophe",d=r.enter("image");let f=r.enter("label");const h=r.createTracker(a);let g=h.move("![");return g+=h.move(r.safe(t.alt,{before:g,after:"]",...h.current()})),g+=h.move("]("),f(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(f=r.enter("destinationLiteral"),g+=h.move("<"),g+=h.move(r.safe(t.url,{before:g,after:">",...h.current()})),g+=h.move(">")):(f=r.enter("destinationRaw"),g+=h.move(r.safe(t.url,{before:g,after:t.title?" ":")",...h.current()}))),f(),t.title&&(f=r.enter(`title${c}`),g+=h.move(" "+s),g+=h.move(r.safe(t.title,{before:g,after:s,...h.current()})),g+=h.move(s),f()),g+=h.move(")"),d(),g}function $w(){return"!"}pg.peek=Bw;function pg(t,i,r,a){const s=t.referenceType,c=r.enter("imageReference");let d=r.enter("label");const f=r.createTracker(a);let h=f.move("![");const g=r.safe(t.alt,{before:h,after:"]",...f.current()});h+=f.move(g+"]["),d();const y=r.stack;r.stack=[],d=r.enter("reference");const x=r.safe(r.associationId(t),{before:h,after:"]",...f.current()});return d(),r.stack=y,c(),s==="full"||!g||g!==x?h+=f.move(x+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function Bw(){return"!"}hg.peek=Ww;function hg(t,i,r){let a=t.value||"",s="`",c=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++c<r.unsafe.length;){const d=r.unsafe[c],f=r.compilePattern(d);let h;if(d.atBreak)for(;h=f.exec(a);){let g=h.index;a.charCodeAt(g)===10&&a.charCodeAt(g-1)===13&&g--,a=a.slice(0,g)+" "+a.slice(h.index+1)}}return s+a+s}function Ww(){return"`"}function gg(t,i){const r=Ju(t);return!!(!i.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}mg.peek=Uw;function mg(t,i,r,a){const s=cc(r),c=s==='"'?"Quote":"Apostrophe",d=r.createTracker(a);let f,h;if(gg(t,r)){const y=r.stack;r.stack=[],f=r.enter("autolink");let x=d.move("<");return x+=d.move(r.containerPhrasing(t,{before:x,after:">",...d.current()})),x+=d.move(">"),f(),r.stack=y,x}f=r.enter("link"),h=r.enter("label");let g=d.move("[");return g+=d.move(r.containerPhrasing(t,{before:g,after:"](",...d.current()})),g+=d.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=r.enter("destinationLiteral"),g+=d.move("<"),g+=d.move(r.safe(t.url,{before:g,after:">",...d.current()})),g+=d.move(">")):(h=r.enter("destinationRaw"),g+=d.move(r.safe(t.url,{before:g,after:t.title?" ":")",...d.current()}))),h(),t.title&&(h=r.enter(`title${c}`),g+=d.move(" "+s),g+=d.move(r.safe(t.title,{before:g,after:s,...d.current()})),g+=d.move(s),h()),g+=d.move(")"),f(),g}function Uw(t,i,r){return gg(t,r)?"<":"["}xg.peek=Hw;function xg(t,i,r,a){const s=t.referenceType,c=r.enter("linkReference");let d=r.enter("label");const f=r.createTracker(a);let h=f.move("[");const g=r.containerPhrasing(t,{before:h,after:"]",...f.current()});h+=f.move(g+"]["),d();const y=r.stack;r.stack=[],d=r.enter("reference");const x=r.safe(r.associationId(t),{before:h,after:"]",...f.current()});return d(),r.stack=y,c(),s==="full"||!g||g!==x?h+=f.move(x+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function Hw(){return"["}function dc(t){const i=t.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function Vw(t){const i=dc(t),r=t.options.bulletOther;if(!r)return i==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+r+"`) to be different");return r}function qw(t){const i=t.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function yg(t){const i=t.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function Yw(t,i,r,a){const s=r.enter("list"),c=r.bulletCurrent;let d=t.ordered?qw(r):dc(r);const f=t.ordered?d==="."?")":".":Vw(r);let h=i&&r.bulletLastUsed?d===r.bulletLastUsed:!1;if(!t.ordered){const y=t.children?t.children[0]:void 0;if((d==="*"||d==="-")&&y&&(!y.children||!y.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(h=!0),yg(r)===d&&y){let x=-1;for(;++x<t.children.length;){const v=t.children[x];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(d=f),r.bulletCurrent=d;const g=r.containerFlow(t,a);return r.bulletLastUsed=d,r.bulletCurrent=c,s(),g}function Kw(t){const i=t.options.listItemIndent||"one";if(i!=="tab"&&i!=="one"&&i!=="mixed")throw new Error("Cannot serialize items with `"+i+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return i}function Qw(t,i,r,a){const s=Kw(r);let c=r.bulletCurrent||dc(r);i&&i.type==="list"&&i.ordered&&(c=(typeof i.start=="number"&&i.start>-1?i.start:1)+(r.options.incrementListMarker===!1?0:i.children.indexOf(t))+c);let d=c.length+1;(s==="tab"||s==="mixed"&&(i&&i.type==="list"&&i.spread||t.spread))&&(d=Math.ceil(d/4)*4);const f=r.createTracker(a);f.move(c+" ".repeat(d-c.length)),f.shift(d);const h=r.enter("listItem"),g=r.indentLines(r.containerFlow(t,f.current()),y);return h(),g;function y(x,v,k){return v?(k?"":" ".repeat(d))+x:(k?c:c+" ".repeat(d-c.length))+x}}function Gw(t,i,r,a){const s=r.enter("paragraph"),c=r.enter("phrasing"),d=r.containerPhrasing(t,a);return c(),s(),d}const Xw=pa(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Zw(t,i,r,a){return(t.children.some(function(d){return Xw(d)})?r.containerPhrasing:r.containerFlow).call(r,t,a)}function Jw(t){const i=t.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}vg.peek=eS;function vg(t,i,r,a){const s=Jw(r),c=r.enter("strong"),d=r.createTracker(a),f=d.move(s+s);let h=d.move(r.containerPhrasing(t,{after:s,before:f,...d.current()}));const g=h.charCodeAt(0),y=aa(a.before.charCodeAt(a.before.length-1),g,s);y.inside&&(h=To(g)+h.slice(1));const x=h.charCodeAt(h.length-1),v=aa(a.after.charCodeAt(0),x,s);v.inside&&(h=h.slice(0,-1)+To(x));const k=d.move(s+s);return c(),r.attentionEncodeSurroundingInfo={after:v.outside,before:y.outside},f+h+k}function eS(t,i,r){return r.options.strong||"*"}function tS(t,i,r,a){return r.safe(t.value,a)}function nS(t){const i=t.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}function rS(t,i,r){const a=(yg(r)+(r.options.ruleSpaces?" ":"")).repeat(nS(r));return r.options.ruleSpaces?a.slice(0,-1):a}const kg={blockquote:zw,break:Qp,code:Mw,definition:Lw,emphasis:cg,hardBreak:Qp,heading:Fw,html:dg,image:fg,imageReference:pg,inlineCode:hg,link:mg,linkReference:xg,list:Yw,listItem:Qw,paragraph:Gw,root:Zw,strong:vg,text:tS,thematicBreak:rS};function iS(){return{enter:{table:oS,tableData:Gp,tableHeader:Gp,tableRow:aS},exit:{codeText:sS,table:lS,tableData:yu,tableHeader:yu,tableRow:yu}}}function oS(t){const i=t._align;this.enter({type:"table",align:i.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function lS(t){this.exit(t),this.data.inTable=void 0}function aS(t){this.enter({type:"tableRow",children:[]},t)}function yu(t){this.exit(t)}function Gp(t){this.enter({type:"tableCell",children:[]},t)}function sS(t){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,uS));const r=this.stack[this.stack.length-1];r.type,r.value=i,this.exit(t)}function uS(t,i){return i==="|"?i:t}function cS(t){const i=t||{},r=i.tableCellPadding,a=i.tablePipeAlign,s=i.stringLength,c=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
486
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:d,tableCell:h,tableRow:f}};function d(k,j,M,N){return g(y(k,M,N),k.align)}function f(k,j,M,N){const _=x(k,M,N),U=g([_]);return U.slice(0,U.indexOf(`
487
+ `))}function h(k,j,M,N){const _=M.enter("tableCell"),U=M.enter("phrasing"),w=M.containerPhrasing(k,{...N,before:c,after:c});return U(),_(),w}function g(k,j){return jw(k,{align:j,alignDelimiters:a,padding:r,stringLength:s})}function y(k,j,M){const N=k.children;let _=-1;const U=[],w=j.enter("table");for(;++_<N.length;)U[_]=x(N[_],j,M);return w(),U}function x(k,j,M){const N=k.children;let _=-1;const U=[],w=j.enter("tableRow");for(;++_<N.length;)U[_]=h(N[_],k,j,M);return w(),U}function v(k,j,M){let N=kg.inlineCode(k,j,M);return M.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function dS(){return{exit:{taskListCheckValueChecked:Xp,taskListCheckValueUnchecked:Xp,paragraph:pS}}}function fS(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hS}}}function Xp(t){const i=this.stack[this.stack.length-2];i.type,i.checked=t.type==="taskListCheckValueChecked"}function pS(t){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const a=r.children[0];if(a&&a.type==="text"){const s=i.children;let c=-1,d;for(;++c<s.length;){const f=s[c];if(f.type==="paragraph"){d=f;break}}d===r&&(a.value=a.value.slice(1),a.value.length===0?r.children.shift():r.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,r.position.start=Object.assign({},a.position.start)))}}this.exit(t)}function hS(t,i,r,a){const s=t.children[0],c=typeof t.checked=="boolean"&&s&&s.type==="paragraph",d="["+(t.checked?"x":" ")+"] ",f=r.createTracker(a);c&&f.move(d);let h=kg.listItem(t,i,r,{...a,...f.current()});return c&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,g)),h;function g(y){return y+d}}function gS(){return[Yb(),hw(),yw(),iS(),dS()]}function mS(t){return{extensions:[Kb(),gw(t),vw(),cS(t),fS()]}}const xS={tokenize:SS,partial:!0},bg={tokenize:jS,partial:!0},wg={tokenize:CS,partial:!0},Sg={tokenize:zS,partial:!0},yS={tokenize:ES,partial:!0},jg={name:"wwwAutolink",tokenize:bS,previous:zg},Cg={name:"protocolAutolink",tokenize:wS,previous:Eg},Zn={name:"emailAutolink",tokenize:kS,previous:_g},On={};function vS(){return{text:On}}let Fr=48;for(;Fr<123;)On[Fr]=Zn,Fr++,Fr===58?Fr=65:Fr===91&&(Fr=97);On[43]=Zn;On[45]=Zn;On[46]=Zn;On[95]=Zn;On[72]=[Zn,Cg];On[104]=[Zn,Cg];On[87]=[Zn,jg];On[119]=[Zn,jg];function kS(t,i,r){const a=this;let s,c;return d;function d(x){return!Wu(x)||!_g.call(a,a.previous)||fc(a.events)?r(x):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),f(x))}function f(x){return Wu(x)?(t.consume(x),f):x===64?(t.consume(x),h):r(x)}function h(x){return x===46?t.check(yS,y,g)(x):x===45||x===95||Ot(x)?(c=!0,t.consume(x),h):y(x)}function g(x){return t.consume(x),s=!0,h}function y(x){return c&&s&&Ut(a.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(x)):r(x)}}function bS(t,i,r){const a=this;return s;function s(d){return d!==87&&d!==119||!zg.call(a,a.previous)||fc(a.events)?r(d):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(xS,t.attempt(bg,t.attempt(wg,c),r),r)(d))}function c(d){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(d)}}function wS(t,i,r){const a=this;let s="",c=!1;return d;function d(x){return(x===72||x===104)&&Eg.call(a,a.previous)&&!fc(a.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(x),t.consume(x),f):r(x)}function f(x){if(Ut(x)&&s.length<5)return s+=String.fromCodePoint(x),t.consume(x),f;if(x===58){const v=s.toLowerCase();if(v==="http"||v==="https")return t.consume(x),h}return r(x)}function h(x){return x===47?(t.consume(x),c?g:(c=!0,h)):r(x)}function g(x){return x===null||ra(x)||Je(x)||Ur(x)||ca(x)?r(x):t.attempt(bg,t.attempt(wg,y),r)(x)}function y(x){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(x)}}function SS(t,i,r){let a=0;return s;function s(d){return(d===87||d===119)&&a<3?(a++,t.consume(d),s):d===46&&a===3?(t.consume(d),c):r(d)}function c(d){return d===null?r(d):i(d)}}function jS(t,i,r){let a,s,c;return d;function d(g){return g===46||g===95?t.check(Sg,h,f)(g):g===null||Je(g)||Ur(g)||g!==45&&ca(g)?h(g):(c=!0,t.consume(g),d)}function f(g){return g===95?a=!0:(s=a,a=void 0),t.consume(g),d}function h(g){return s||a||!c?r(g):i(g)}}function CS(t,i){let r=0,a=0;return s;function s(d){return d===40?(r++,t.consume(d),s):d===41&&a<r?c(d):d===33||d===34||d===38||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===60||d===63||d===93||d===95||d===126?t.check(Sg,i,c)(d):d===null||Je(d)||Ur(d)?i(d):(t.consume(d),s)}function c(d){return d===41&&a++,t.consume(d),s}}function zS(t,i,r){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(t.consume(f),a):f===38?(t.consume(f),c):f===93?(t.consume(f),s):f===60||f===null||Je(f)||Ur(f)?i(f):r(f)}function s(f){return f===null||f===40||f===91||Je(f)||Ur(f)?i(f):a(f)}function c(f){return Ut(f)?d(f):r(f)}function d(f){return f===59?(t.consume(f),a):Ut(f)?(t.consume(f),d):r(f)}}function ES(t,i,r){return a;function a(c){return t.consume(c),s}function s(c){return Ot(c)?r(c):i(c)}}function zg(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Je(t)}function Eg(t){return!Ut(t)}function _g(t){return!(t===47||Wu(t))}function Wu(t){return t===43||t===45||t===46||t===95||Ot(t)}function fc(t){let i=t.length,r=!1;for(;i--;){const a=t[i][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){r=!0;break}if(a._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const _S={tokenize:DS,partial:!0};function TS(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:AS,continuation:{tokenize:LS},exit:PS}},text:{91:{name:"gfmFootnoteCall",tokenize:MS},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:IS,resolveTo:RS}}}}function IS(t,i,r){const a=this;let s=a.events.length;const c=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let d;for(;s--;){const h=a.events[s][1];if(h.type==="labelImage"){d=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!d||!d._balanced)return r(h);const g=In(a.sliceSerialize({start:d.end,end:a.now()}));return g.codePointAt(0)!==94||!c.includes(g.slice(1))?r(h):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(h),t.exit("gfmFootnoteCallLabelMarker"),i(h))}}function RS(t,i){let r=t.length;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const c={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},d={type:"chunkString",contentType:"string",start:Object.assign({},c.start),end:Object.assign({},c.end)},f=[t[r+1],t[r+2],["enter",a,i],t[r+3],t[r+4],["enter",s,i],["exit",s,i],["enter",c,i],["enter",d,i],["exit",d,i],["exit",c,i],t[t.length-2],t[t.length-1],["exit",a,i]];return t.splice(r,t.length-r+1,...f),t}function MS(t,i,r){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c=0,d;return f;function f(x){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),h}function h(x){return x!==94?r(x):(t.enter("gfmFootnoteCallMarker"),t.consume(x),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",g)}function g(x){if(c>999||x===93&&!d||x===null||x===91||Je(x))return r(x);if(x===93){t.exit("chunkString");const v=t.exit("gfmFootnoteCallString");return s.includes(In(a.sliceSerialize(v)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):r(x)}return Je(x)||(d=!0),c++,t.consume(x),x===92?y:g}function y(x){return x===91||x===92||x===93?(t.consume(x),c++,g):g(x)}}function AS(t,i,r){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c,d=0,f;return h;function h(j){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(j),t.exit("gfmFootnoteDefinitionLabelMarker"),g}function g(j){return j===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(j),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):r(j)}function y(j){if(d>999||j===93&&!f||j===null||j===91||Je(j))return r(j);if(j===93){t.exit("chunkString");const M=t.exit("gfmFootnoteDefinitionLabelString");return c=In(a.sliceSerialize(M)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(j),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),v}return Je(j)||(f=!0),d++,t.consume(j),j===92?x:y}function x(j){return j===91||j===92||j===93?(t.consume(j),d++,y):y(j)}function v(j){return j===58?(t.enter("definitionMarker"),t.consume(j),t.exit("definitionMarker"),s.includes(c)||s.push(c),Ve(t,k,"gfmFootnoteDefinitionWhitespace")):r(j)}function k(j){return i(j)}}function LS(t,i,r){return t.check(Ro,i,t.attempt(_S,i,r))}function PS(t){t.exit("gfmFootnoteDefinition")}function DS(t,i,r){const a=this;return Ve(t,s,"gfmFootnoteDefinitionIndent",5);function s(c){const d=a.events[a.events.length-1];return d&&d[1].type==="gfmFootnoteDefinitionIndent"&&d[2].sliceSerialize(d[1],!0).length===4?i(c):r(c)}}function NS(t){let r=(t||{}).singleTilde;const a={name:"strikethrough",tokenize:c,resolveAll:s};return r==null&&(r=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(d,f){let h=-1;for(;++h<d.length;)if(d[h][0]==="enter"&&d[h][1].type==="strikethroughSequenceTemporary"&&d[h][1]._close){let g=h;for(;g--;)if(d[g][0]==="exit"&&d[g][1].type==="strikethroughSequenceTemporary"&&d[g][1]._open&&d[h][1].end.offset-d[h][1].start.offset===d[g][1].end.offset-d[g][1].start.offset){d[h][1].type="strikethroughSequence",d[g][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},d[g][1].start),end:Object.assign({},d[h][1].end)},x={type:"strikethroughText",start:Object.assign({},d[g][1].end),end:Object.assign({},d[h][1].start)},v=[["enter",y,f],["enter",d[g][1],f],["exit",d[g][1],f],["enter",x,f]],k=f.parser.constructs.insideSpan.null;k&&un(v,v.length,0,da(k,d.slice(g+1,h),f)),un(v,v.length,0,[["exit",x,f],["enter",d[h][1],f],["exit",d[h][1],f],["exit",y,f]]),un(d,g-1,h-g+3,v),h=g+v.length-2;break}}for(h=-1;++h<d.length;)d[h][1].type==="strikethroughSequenceTemporary"&&(d[h][1].type="data");return d}function c(d,f,h){const g=this.previous,y=this.events;let x=0;return v;function v(j){return g===126&&y[y.length-1][1].type!=="characterEscape"?h(j):(d.enter("strikethroughSequenceTemporary"),k(j))}function k(j){const M=_i(g);if(j===126)return x>1?h(j):(d.consume(j),x++,k);if(x<2&&!r)return h(j);const N=d.exit("strikethroughSequenceTemporary"),_=_i(j);return N._open=!_||_===2&&!!M,N._close=!M||M===2&&!!_,f(j)}}}class FS{constructor(){this.map=[]}add(i,r,a){OS(this,i,r,a)}consume(i){if(this.map.sort(function(c,d){return c[0]-d[0]}),this.map.length===0)return;let r=this.map.length;const a=[];for(;r>0;)r-=1,a.push(i.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),i.length=this.map[r][0];a.push(i.slice()),i.length=0;let s=a.pop();for(;s;){for(const c of s)i.push(c);s=a.pop()}this.map.length=0}}function OS(t,i,r,a){let s=0;if(!(r===0&&a.length===0)){for(;s<t.map.length;){if(t.map[s][0]===i){t.map[s][1]+=r,t.map[s][2].push(...a);return}s+=1}t.map.push([i,r,a])}}function $S(t,i){let r=!1;const a=[];for(;i<t.length;){const s=t[i];if(r){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[i-1][1].type==="tableDelimiterMarker"){const c=a.length-1;a[c]=a[c]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(r=!0);i+=1}return a}function BS(){return{flow:{null:{name:"table",tokenize:WS,resolveAll:US}}}}function WS(t,i,r){const a=this;let s=0,c=0,d;return f;function f(E){let Q=a.events.length-1;for(;Q>-1;){const J=a.events[Q][1].type;if(J==="lineEnding"||J==="linePrefix")Q--;else break}const Y=Q>-1?a.events[Q][1].type:null,de=Y==="tableHead"||Y==="tableRow"?P:h;return de===P&&a.parser.lazy[a.now().line]?r(E):de(E)}function h(E){return t.enter("tableHead"),t.enter("tableRow"),g(E)}function g(E){return E===124||(d=!0,c+=1),y(E)}function y(E){return E===null?r(E):Ae(E)?c>1?(c=0,a.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),k):r(E):Ue(E)?Ve(t,y,"whitespace")(E):(c+=1,d&&(d=!1,s+=1),E===124?(t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),d=!0,y):(t.enter("data"),x(E)))}function x(E){return E===null||E===124||Je(E)?(t.exit("data"),y(E)):(t.consume(E),E===92?v:x)}function v(E){return E===92||E===124?(t.consume(E),x):x(E)}function k(E){return a.interrupt=!1,a.parser.lazy[a.now().line]?r(E):(t.enter("tableDelimiterRow"),d=!1,Ue(E)?Ve(t,j,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):j(E))}function j(E){return E===45||E===58?N(E):E===124?(d=!0,t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),M):q(E)}function M(E){return Ue(E)?Ve(t,N,"whitespace")(E):N(E)}function N(E){return E===58?(c+=1,d=!0,t.enter("tableDelimiterMarker"),t.consume(E),t.exit("tableDelimiterMarker"),_):E===45?(c+=1,_(E)):E===null||Ae(E)?T(E):q(E)}function _(E){return E===45?(t.enter("tableDelimiterFiller"),U(E)):q(E)}function U(E){return E===45?(t.consume(E),U):E===58?(d=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(E),t.exit("tableDelimiterMarker"),w):(t.exit("tableDelimiterFiller"),w(E))}function w(E){return Ue(E)?Ve(t,T,"whitespace")(E):T(E)}function T(E){return E===124?j(E):E===null||Ae(E)?!d||s!==c?q(E):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(E)):q(E)}function q(E){return r(E)}function P(E){return t.enter("tableRow"),X(E)}function X(E){return E===124?(t.enter("tableCellDivider"),t.consume(E),t.exit("tableCellDivider"),X):E===null||Ae(E)?(t.exit("tableRow"),i(E)):Ue(E)?Ve(t,X,"whitespace")(E):(t.enter("data"),oe(E))}function oe(E){return E===null||E===124||Je(E)?(t.exit("data"),X(E)):(t.consume(E),E===92?me:oe)}function me(E){return E===92||E===124?(t.consume(E),oe):oe(E)}}function US(t,i){let r=-1,a=!0,s=0,c=[0,0,0,0],d=[0,0,0,0],f=!1,h=0,g,y,x;const v=new FS;for(;++r<t.length;){const k=t[r],j=k[1];k[0]==="enter"?j.type==="tableHead"?(f=!1,h!==0&&(Zp(v,i,h,g,y),y=void 0,h=0),g={type:"table",start:Object.assign({},j.start),end:Object.assign({},j.end)},v.add(r,0,[["enter",g,i]])):j.type==="tableRow"||j.type==="tableDelimiterRow"?(a=!0,x=void 0,c=[0,0,0,0],d=[0,r+1,0,0],f&&(f=!1,y={type:"tableBody",start:Object.assign({},j.start),end:Object.assign({},j.end)},v.add(r,0,[["enter",y,i]])),s=j.type==="tableDelimiterRow"?2:y?3:1):s&&(j.type==="data"||j.type==="tableDelimiterMarker"||j.type==="tableDelimiterFiller")?(a=!1,d[2]===0&&(c[1]!==0&&(d[0]=d[1],x=Gl(v,i,c,s,void 0,x),c=[0,0,0,0]),d[2]=r)):j.type==="tableCellDivider"&&(a?a=!1:(c[1]!==0&&(d[0]=d[1],x=Gl(v,i,c,s,void 0,x)),c=d,d=[c[1],r,0,0])):j.type==="tableHead"?(f=!0,h=r):j.type==="tableRow"||j.type==="tableDelimiterRow"?(h=r,c[1]!==0?(d[0]=d[1],x=Gl(v,i,c,s,r,x)):d[1]!==0&&(x=Gl(v,i,d,s,r,x)),s=0):s&&(j.type==="data"||j.type==="tableDelimiterMarker"||j.type==="tableDelimiterFiller")&&(d[3]=r)}for(h!==0&&Zp(v,i,h,g,y),v.consume(i.events),r=-1;++r<i.events.length;){const k=i.events[r];k[0]==="enter"&&k[1].type==="table"&&(k[1]._align=$S(i.events,r))}return t}function Gl(t,i,r,a,s,c){const d=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(c.end=Object.assign({},bi(i.events,r[0])),t.add(r[0],0,[["exit",c,i]]));const h=bi(i.events,r[1]);if(c={type:d,start:Object.assign({},h),end:Object.assign({},h)},t.add(r[1],0,[["enter",c,i]]),r[2]!==0){const g=bi(i.events,r[2]),y=bi(i.events,r[3]),x={type:f,start:Object.assign({},g),end:Object.assign({},y)};if(t.add(r[2],0,[["enter",x,i]]),a!==2){const v=i.events[r[2]],k=i.events[r[3]];if(v[1].end=Object.assign({},k[1].end),v[1].type="chunkText",v[1].contentType="text",r[3]>r[2]+1){const j=r[2]+1,M=r[3]-r[2]-1;t.add(j,M,[])}}t.add(r[3]+1,0,[["exit",x,i]])}return s!==void 0&&(c.end=Object.assign({},bi(i.events,s)),t.add(s,0,[["exit",c,i]]),c=void 0),c}function Zp(t,i,r,a,s){const c=[],d=bi(i.events,r);s&&(s.end=Object.assign({},d),c.push(["exit",s,i])),a.end=Object.assign({},d),c.push(["exit",a,i]),t.add(r+1,0,c)}function bi(t,i){const r=t[i],a=r[0]==="enter"?"start":"end";return r[1][a]}const HS={name:"tasklistCheck",tokenize:qS};function VS(){return{text:{91:HS}}}function qS(t,i,r){const a=this;return s;function s(h){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?r(h):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(h),t.exit("taskListCheckMarker"),c)}function c(h){return Je(h)?(t.enter("taskListCheckValueUnchecked"),t.consume(h),t.exit("taskListCheckValueUnchecked"),d):h===88||h===120?(t.enter("taskListCheckValueChecked"),t.consume(h),t.exit("taskListCheckValueChecked"),d):r(h)}function d(h){return h===93?(t.enter("taskListCheckMarker"),t.consume(h),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),f):r(h)}function f(h){return Ae(h)?i(h):Ue(h)?t.check({tokenize:YS},i,r)(h):r(h)}}function YS(t,i,r){return Ve(t,a,"whitespace");function a(s){return s===null?r(s):i(s)}}function KS(t){return Fh([vS(),TS(),NS(t),BS(),VS()])}const QS={};function GS(t){const i=this,r=t||QS,a=i.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),c=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),d=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(KS(r)),c.push(gS()),d.push(mS(r))}const vu=["SUNSET_COMPLETE","SUNRISE_","NO_ACTION_REQUIRED","MEMORY_UPDATED","JOURNAL_"],Jp=["#6366f1","#f43f5e","#10b981","#f59e0b","#8b5cf6","#ec4899","#14b8a6","#ef4444"];function ta(t){return t.split(" ").map(i=>i[0]).join("").toUpperCase().slice(0,2)}function XS(t){const i=new Date(t),r=new Date;return i.toDateString()===r.toDateString()?i.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):i.toLocaleDateString([],{month:"short",day:"numeric"})+" "+i.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}function ZS(){const[t,i]=I.useState(()=>sessionStorage.getItem("chat_selected_agent")??""),r=I.useCallback(W=>{sessionStorage.setItem("chat_selected_agent",W),i(W)},[]),[a,s]=I.useState(null),[c,d]=I.useState(""),[f,h]=I.useState(!1),[g,y]=I.useState(!1),[x,v]=I.useState(""),[k,j]=I.useState(""),[M,N]=I.useState("agents"),{data:_,refresh:U}=wt("/api/agent-groups",5e3),[w,T]=I.useState(!1),q=I.useRef(null),P=I.useRef(null),X=I.useRef(null),{data:oe,refresh:me}=wt("/api/chat-log",2e3),{employees:E}=jr(),{activeAgents:Q}=Ai(),Y=I.useMemo(()=>(E??[]).filter(ee=>ee.agent_key!=="user"),[E]),de=I.useMemo(()=>{let W=Y;if(k.trim()){const ze=k.toLowerCase();W=W.filter(Oe=>Oe.name.toLowerCase().includes(ze)||Oe.role.toLowerCase().includes(ze)||Oe.agent_key.toLowerCase().includes(ze))}const ee=oe??[],te=new Map;for(const ze of ee){if(vu.some(ke=>(ze.message??"").trim().startsWith(ke)))continue;const Oe=ze.from==="user"?ze.to:ze.from,Ne=new Date(ze.timestamp).getTime();(!te.has(Oe)||Ne>te.get(Oe))&&te.set(Oe,Ne)}return[...W].sort((ze,Oe)=>{const Ne=te.get(ze.agent_key)??0;return(te.get(Oe.agent_key)??0)-Ne})},[Y,k,oe]);I.useEffect(()=>{!t&&de.length>0&&r(de[0].agent_key)},[de,t]);const J=_??[],K=a?J.find(W=>W.id===a)??null:null,he=K!==null;function le(W){r(W),s(null)}function Z(W){s(W)}const G=Y.find(W=>W.agent_key===t),S=(G==null?void 0:G.name)??t,A=(G==null?void 0:G.role)??"",V=(G==null?void 0:G.color)||"var(--text-muted)",C=(G==null?void 0:G.initials)||(G?ta(G.name):t.slice(0,2).toUpperCase()),ge=(oe??[]).filter(W=>{if(he){if(W.group_id!==K.id)return!1}else if(!(W.from==="user"&&W.to===t)&&!(W.from===t&&W.to==="user"))return!1;return!vu.some(ee=>(W.message??"").trim().startsWith(ee))}),je=I.useMemo(()=>{if(!x.trim())return ge;const W=x.toLowerCase();return ge.filter(ee=>ee.message.toLowerCase().includes(W))},[ge,x]),ye=g?je:ge,H=I.useCallback(W=>(oe??[]).filter(ee=>!(ee.from===W&&ee.to==="user")&&!(ee.from==="user"&&ee.to===W)?!1:!vu.some(te=>(ee.message??"").trim().startsWith(te))).slice(-1)[0],[oe]);I.useEffect(()=>{var W;(W=q.current)==null||W.scrollIntoView({behavior:"smooth"})},[ge.length,t,a]),I.useEffect(()=>{var W;g&&((W=X.current)==null||W.focus())},[g]);async function pe(){var ee;const W=c.trim();if(!(!W||f)){h(!0),d("");try{he?await st("/api/send-group-message",{group_id:K.id,message:W}):await st("/api/send-message",{to:t,message:W}),await me()}catch{d(W)}finally{h(!1),(ee=P.current)==null||ee.focus()}}}const fe=he?K.members.some(W=>Q[W]):Q[t]??!1;async function Te(W,ee,te){var ze;try{const Oe=await st("/api/agent-groups",{name:W,members:ee,color:te});T(!1),await U(),(ze=Oe==null?void 0:Oe.group)!=null&&ze.id&&Z(Oe.group.id)}catch{}}async function Fe(W){try{await hh(`/api/agent-groups/${W}`),await U(),a===W&&(s(null),r("pm"))}catch{}}function Ze(W){return Y.find(ee=>ee.agent_key===W)}const Ge=he?K.name:S,De=he?`${K.members.length} members${fe?" — someone is typing...":""}`:fe?"typing...":A,mt=he?K.color:V,Et=he?K.name.slice(0,2).toUpperCase():C,_t=he?`Message ${K.name}...`:`Message ${S.split(" ")[0]}...`;return l.jsxs("div",{style:{display:"flex",height:"100%",overflow:"hidden"},children:[l.jsxs("div",{style:{width:270,flexShrink:0,borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column"},children:[l.jsxs("div",{className:"page-header",style:{paddingBottom:8},children:[l.jsx("div",{className:"page-title",children:"Chat"}),l.jsx("div",{className:"page-subtitle",children:"Direct messages with agents"})]}),l.jsx("div",{style:{display:"flex",gap:0,padding:"0 12px 8px",borderBottom:"1px solid var(--border)"},children:["agents","groups"].map(W=>l.jsx("button",{onClick:()=>N(W),style:{flex:1,padding:"6px 0",border:"none",background:"transparent",cursor:"pointer",fontFamily:"inherit",fontSize:12,fontWeight:M===W?600:400,color:M===W?"var(--accent)":"var(--text-muted)",borderBottom:M===W?"2px solid var(--accent)":"2px solid transparent",transition:"all 0.15s"},children:W==="agents"?"Agents":"Groups"},W))}),M==="agents"&&l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{padding:"8px 12px 4px"},children:l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:18,padding:"5px 12px"},children:[l.jsx(Wr,{size:13,style:{color:"var(--text-muted)",flexShrink:0}}),l.jsx("input",{value:k,onChange:W=>j(W.target.value),placeholder:"Search agents...",style:{flex:1,border:"none",outline:"none",background:"transparent",color:"var(--text-primary)",fontSize:12,fontFamily:"inherit"}}),k&&l.jsx("button",{onClick:()=>j(""),style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",display:"flex",padding:0},children:l.jsx(Rn,{size:11})})]})}),l.jsx("div",{style:{flex:1,overflowY:"auto",padding:"4px 10px 10px"},children:de.length===0?l.jsxs("div",{style:{padding:16,textAlign:"center",fontSize:12,color:"var(--text-muted)"},children:['No agents match "',k,'"']}):de.map(W=>{const ee=!he&&t===W.agent_key,te=H(W.agent_key),ze=Q[W.agent_key]??!1,Oe=W.color||"var(--text-muted)",Ne=W.initials||ta(W.name);return l.jsxs("button",{onClick:()=>le(W.agent_key),style:{width:"100%",display:"flex",alignItems:"center",gap:12,padding:"10px 12px",border:"none",borderRadius:10,background:ee?"var(--bg-hover)":"transparent",cursor:"pointer",textAlign:"left",fontFamily:"inherit",transition:"background 0.08s",marginBottom:2},onMouseEnter:ke=>{ee||(ke.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:ke=>{ee||(ke.currentTarget.style.background="transparent")},children:[l.jsx("div",{style:{width:36,height:36,borderRadius:10,background:Oe,opacity:.9,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:600,color:"#fff",flexShrink:0},children:Ne}),l.jsxs("div",{style:{flex:1,minWidth:0},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:6},children:[l.jsx("span",{style:{fontSize:13,fontWeight:ee?600:500,color:"var(--text-primary)"},children:W.name.split(" ")[0]}),te&&l.jsx("span",{style:{fontSize:10,color:"var(--text-muted)",flexShrink:0},children:XS(te.timestamp)})]}),l.jsx("div",{style:{fontSize:12,color:ze?"var(--green)":"var(--text-muted)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:1},children:ze?"typing...":te?`${te.from==="user"?"You: ":""}${te.message.slice(0,36)}`:W.role})]})]},W.agent_key)})})]}),M==="groups"&&l.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"8px 10px 10px",display:"flex",flexDirection:"column",gap:4},children:[l.jsxs("button",{onClick:()=>T(!0),style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",border:"1px dashed var(--border)",borderRadius:10,background:"transparent",cursor:"pointer",fontFamily:"inherit",color:"var(--text-muted)",fontSize:13,width:"100%",transition:"all 0.1s"},onMouseEnter:W=>{W.currentTarget.style.borderColor="var(--accent)",W.currentTarget.style.color="var(--accent)"},onMouseLeave:W=>{W.currentTarget.style.borderColor="var(--border)",W.currentTarget.style.color="var(--text-muted)"},children:[l.jsx(Or,{size:16}),"New Group"]}),J.length===0&&l.jsx("div",{style:{padding:"24px 12px",textAlign:"center",fontSize:12,color:"var(--text-muted)"},children:"No groups yet. Create one to broadcast messages to multiple agents."}),J.map(W=>{const ee=a===W.id;return l.jsxs("button",{onClick:()=>Z(W.id),style:{width:"100%",display:"flex",alignItems:"center",gap:12,padding:"10px 12px",border:"none",borderRadius:10,background:ee?"var(--bg-hover)":"transparent",cursor:"pointer",textAlign:"left",fontFamily:"inherit",transition:"background 0.08s"},onMouseEnter:te=>{ee||(te.currentTarget.style.background="var(--bg-hover)")},onMouseLeave:te=>{ee||(te.currentTarget.style.background="transparent")},children:[l.jsx("div",{style:{width:36,height:36,borderRadius:10,background:W.color,opacity:.9,display:"flex",alignItems:"center",justifyContent:"center",fontSize:14,color:"#fff",flexShrink:0},children:l.jsx(wi,{size:16})}),l.jsxs("div",{style:{flex:1,minWidth:0},children:[l.jsx("div",{style:{fontSize:13,fontWeight:ee?600:500,color:"var(--text-primary)"},children:W.name}),l.jsxs("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:1},children:[W.members.length," member",W.members.length!==1?"s":""]})]}),l.jsx("button",{onClick:te=>{te.stopPropagation(),Fe(W.id)},style:{background:"none",border:"none",cursor:"pointer",color:"var(--text-muted)",padding:4,display:"flex",borderRadius:6,transition:"color 0.1s"},onMouseEnter:te=>{te.currentTarget.style.color="var(--red, #ef4444)"},onMouseLeave:te=>{te.currentTarget.style.color="var(--text-muted)"},title:"Delete group",children:l.jsx(Sr,{size:13})})]},W.id)})]})]}),l.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",overflow:"hidden"},children:[l.jsxs("div",{style:{padding:"14px 24px",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",gap:12,flexShrink:0},children:[he?l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{width:32,height:32,borderRadius:9,background:mt,opacity:.9,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff"},children:l.jsx(wi,{size:15})}),l.jsxs("div",{style:{flex:1},children:[l.jsx("div",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)"},children:Ge}),l.jsxs("div",{style:{fontSize:12,color:fe?"var(--green)":"var(--text-muted)",display:"flex",alignItems:"center",gap:6},children:[De,l.jsxs("span",{style:{display:"flex",marginLeft:4},children:[K.members.slice(0,5).map((W,ee)=>{const te=Ze(W);return l.jsx("span",{title:(te==null?void 0:te.name)??W,style:{width:18,height:18,borderRadius:5,background:(te==null?void 0:te.color)||"var(--text-muted)",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:8,fontWeight:700,color:"#fff",marginLeft:ee===0?0:-5,border:"1.5px solid var(--bg-primary)",zIndex:5-ee},children:(te==null?void 0:te.initials)||W.slice(0,2).toUpperCase()},W)}),K.members.length>5&&l.jsxs("span",{style:{width:18,height:18,borderRadius:5,background:"var(--bg-hover)",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:8,fontWeight:600,color:"var(--text-muted)",marginLeft:-5,border:"1.5px solid var(--bg-primary)"},children:["+",K.members.length-5]})]})]})]})]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{style:{width:32,height:32,borderRadius:9,background:V,opacity:.9,display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:600,color:"#fff"},children:C}),l.jsxs("div",{style:{flex:1},children:[l.jsx("div",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)"},children:S}),l.jsx("div",{style:{fontSize:12,color:fe?"var(--green)":"var(--text-muted)"},children:fe?"typing...":A})]})]}),l.jsx("button",{onClick:()=>{y(!g),v("")},style:{background:g?"var(--bg-hover)":"transparent",border:"none",borderRadius:8,padding:6,cursor:"pointer",color:"var(--text-muted)",display:"flex",alignItems:"center",justifyContent:"center",transition:"background 0.1s"},title:"Search messages",children:g?l.jsx(Rn,{size:16}):l.jsx(Wr,{size:16})})]}),g&&l.jsxs("div",{style:{padding:"8px 24px",borderBottom:"1px solid var(--border)",flexShrink:0},children:[l.jsx("input",{ref:X,type:"text",value:x,onChange:W=>v(W.target.value),placeholder:"Search messages...",style:{width:"100%",padding:"6px 12px",border:"1px solid var(--border)",borderRadius:8,background:"var(--bg-tertiary)",color:"var(--text-primary)",fontSize:13,fontFamily:"inherit",outline:"none"},onKeyDown:W=>{W.key==="Escape"&&(y(!1),v(""))}}),x&&l.jsxs("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:[je.length," result",je.length!==1?"s":""]})]}),l.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"20px 24px",display:"flex",flexDirection:"column",gap:4},children:[ye.length===0?l.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:8},children:[l.jsx("div",{style:{width:48,height:48,borderRadius:14,background:mt,opacity:.15,display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx("div",{style:{width:48,height:48,borderRadius:14,background:mt,opacity:.6,display:"flex",alignItems:"center",justifyContent:"center",fontSize:16,fontWeight:700,color:"#fff"},children:he?l.jsx(wi,{size:20}):Et})}),l.jsx("div",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)",marginTop:4},children:Ge}),l.jsx("div",{style:{fontSize:13,color:"var(--text-muted)"},children:g&&x?"No matching messages":he?"Send a message to broadcast to all members":"Send a message to start the conversation"})]}):l.jsxs(l.Fragment,{children:[ye.map((W,ee)=>{var Pe;const te=W.from==="user",ze=ye[ee-1],Oe=ee===0||new Date(W.timestamp).toDateString()!==new Date((ze==null?void 0:ze.timestamp)??0).toDateString(),Ne=ze&&ze.from===W.from,ke=te?null:Ze(W.from),$e=te?"var(--accent)":(ke==null?void 0:ke.color)||"var(--text-muted)",D=te?"":(ke==null?void 0:ke.initials)||ta((ke==null?void 0:ke.name)||W.from),ae=te?"":((Pe=ke==null?void 0:ke.name)==null?void 0:Pe.split(" ")[0])||W.from,Ee=x.trim()?ej(W.message,x):W.message;return l.jsxs("div",{children:[Oe&&l.jsx("div",{style:{textAlign:"center",margin:"16px 0 12px"},children:l.jsx("span",{style:{fontSize:11,color:"var(--text-muted)",background:"var(--bg-tertiary)",padding:"3px 12px",borderRadius:6,fontWeight:500},children:new Date(W.timestamp).toDateString()===new Date().toDateString()?"Today":new Date(W.timestamp).toLocaleDateString([],{month:"short",day:"numeric",year:"numeric"})})}),l.jsxs("div",{style:{display:"flex",justifyContent:te?"flex-end":"flex-start",marginTop:Ne?2:10,alignItems:"flex-end",gap:8},children:[!te&&he&&l.jsx("div",{style:{width:28,flexShrink:0},children:!Ne&&l.jsx("div",{style:{width:28,height:28,borderRadius:8,background:$e,opacity:.9,display:"flex",alignItems:"center",justifyContent:"center",fontSize:9,fontWeight:700,color:"#fff"},children:D})}),l.jsxs("div",{style:{maxWidth:"65%",display:"flex",flexDirection:"column",alignItems:te?"flex-end":"flex-start"},children:[he&&!te&&!Ne&&l.jsx("div",{style:{fontSize:11,fontWeight:600,color:$e,marginBottom:2,paddingInline:4},children:ae}),l.jsxs("div",{className:te?void 0:"md-content",style:{padding:"8px 14px 6px",borderRadius:te?"14px 14px 4px 14px":"14px 14px 14px 4px",background:te?"var(--accent)":"var(--bg-tertiary)",color:te?"#fff":"var(--text-primary)",fontSize:13,lineHeight:1.55,wordBreak:"break-word"},children:[te?Ee:l.jsx(Nu,{remarkPlugins:[GS],components:{a:({href:Ie,children:pt})=>l.jsx("a",{href:Ie,target:"_blank",rel:"noopener noreferrer",children:pt})},children:W.message}),l.jsx("div",{style:{fontSize:10,lineHeight:1,color:te?"rgba(255,255,255,0.6)":"var(--text-muted)",textAlign:"right",marginTop:4},children:new Date(W.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]})]})]},W.id??ee)}),fe&&!g&&l.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:8,marginTop:10},children:[l.jsx("div",{style:{width:28,height:28,borderRadius:8,background:mt,opacity:.9,display:"flex",alignItems:"center",justifyContent:"center",fontSize:9,fontWeight:700,color:"#fff"},children:he?l.jsx(wi,{size:12}):C}),l.jsx("div",{style:{padding:"10px 16px",borderRadius:"14px 14px 14px 4px",background:"var(--bg-tertiary)",display:"flex",gap:4,alignItems:"center"},children:[0,1,2].map(W=>l.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:"var(--text-muted)",animation:`pulse-dot 1.2s ease-in-out ${W*.2}s infinite`}},W))})]})]}),l.jsx("div",{ref:q})]}),l.jsx("div",{style:{padding:"12px 24px 16px",flexShrink:0},children:l.jsxs("div",{style:{display:"flex",alignItems:"flex-end",gap:8,background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:24,padding:"6px 6px 6px 18px"},children:[l.jsx("textarea",{ref:P,value:c,onChange:W=>d(W.target.value),onKeyDown:W=>{W.key==="Enter"&&!W.shiftKey&&(W.preventDefault(),pe())},placeholder:_t,rows:1,style:{flex:1,border:"none",outline:"none",resize:"none",background:"transparent",color:"var(--text-primary)",fontSize:14,lineHeight:1.5,fontFamily:"inherit",maxHeight:120,overflowY:"auto",padding:"4px 0"},onInput:W=>{const ee=W.currentTarget;ee.style.height="auto",ee.style.height=Math.min(ee.scrollHeight,120)+"px"}}),l.jsx("button",{onClick:()=>void pe(),disabled:!c.trim()||f,style:{width:34,height:34,borderRadius:"50%",border:"none",background:c.trim()&&!f?"var(--accent)":"var(--bg-hover)",color:c.trim()&&!f?"#fff":"var(--text-muted)",cursor:c.trim()&&!f?"pointer":"default",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"background 0.15s"},children:l.jsx(Wx,{size:16,strokeWidth:2.5})})]})})]}),w&&l.jsx(JS,{agents:Y,onClose:()=>T(!1),onCreate:Te})]})}function JS({agents:t,onClose:i,onCreate:r}){const[a,s]=I.useState(""),[c,d]=I.useState(new Set),[f,h]=I.useState(Jp[0]),[g,y]=I.useState(""),x=I.useMemo(()=>{if(!g.trim())return t;const j=g.toLowerCase();return t.filter(M=>M.name.toLowerCase().includes(j)||M.role.toLowerCase().includes(j))},[t,g]);function v(j){d(M=>{const N=new Set(M);return N.has(j)?N.delete(j):N.add(j),N})}function k(){!a.trim()||c.size===0||r(a.trim(),Array.from(c),f)}return l.jsx("div",{style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.5)",backdropFilter:"blur(4px)",display:"flex",alignItems:"center",justifyContent:"center"},onClick:i,children:l.jsxs("div",{style:{background:"var(--bg-primary)",borderRadius:16,width:420,maxHeight:"80vh",display:"flex",flexDirection:"column",border:"1px solid var(--border)",boxShadow:"0 20px 60px rgba(0,0,0,0.3)"},onClick:j=>j.stopPropagation(),children:[l.jsxs("div",{style:{padding:"20px 24px 16px",borderBottom:"1px solid var(--border)"},children:[l.jsx("div",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)"},children:"Create Group"}),l.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:2},children:"Broadcast messages to multiple agents at once"})]}),l.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"16px 24px"},children:[l.jsxs("div",{style:{marginBottom:16},children:[l.jsx("label",{style:{fontSize:12,fontWeight:500,color:"var(--text-muted)",display:"block",marginBottom:6},children:"Group name"}),l.jsx("input",{value:a,onChange:j=>s(j.target.value),placeholder:"e.g. Backend Team",autoFocus:!0,style:{width:"100%",padding:"8px 12px",border:"1px solid var(--border)",borderRadius:8,background:"var(--bg-tertiary)",color:"var(--text-primary)",fontSize:13,fontFamily:"inherit",outline:"none",boxSizing:"border-box"}})]}),l.jsxs("div",{style:{marginBottom:16},children:[l.jsx("label",{style:{fontSize:12,fontWeight:500,color:"var(--text-muted)",display:"block",marginBottom:6},children:"Color"}),l.jsx("div",{style:{display:"flex",gap:6},children:Jp.map(j=>l.jsx("button",{onClick:()=>h(j),style:{width:24,height:24,borderRadius:6,border:"none",background:j,cursor:"pointer",outline:f===j?"2px solid var(--text-primary)":"none",outlineOffset:2,display:"flex",alignItems:"center",justifyContent:"center"},children:f===j&&l.jsx(Ii,{size:12,color:"#fff",strokeWidth:3})},j))})]}),l.jsxs("div",{style:{marginBottom:8},children:[l.jsxs("label",{style:{fontSize:12,fontWeight:500,color:"var(--text-muted)",display:"block",marginBottom:6},children:["Members (",c.size," selected)"]}),l.jsx("input",{value:g,onChange:j=>y(j.target.value),placeholder:"Search agents...",style:{width:"100%",padding:"6px 12px",border:"1px solid var(--border)",borderRadius:8,background:"var(--bg-tertiary)",color:"var(--text-primary)",fontSize:12,fontFamily:"inherit",outline:"none",boxSizing:"border-box"}})]}),l.jsx("div",{style:{maxHeight:240,overflowY:"auto",border:"1px solid var(--border)",borderRadius:8},children:x.map(j=>{const M=c.has(j.agent_key),N=j.initials||ta(j.name);return l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:10,padding:"8px 12px",cursor:"pointer",borderBottom:"1px solid var(--border)",background:M?"var(--bg-hover)":"transparent",transition:"background 0.08s"},children:[l.jsx("input",{type:"checkbox",checked:M,onChange:()=>v(j.agent_key),style:{accentColor:"var(--accent)"}}),l.jsx("div",{style:{width:26,height:26,borderRadius:7,background:j.color||"var(--text-muted)",opacity:.9,display:"flex",alignItems:"center",justifyContent:"center",fontSize:9,fontWeight:700,color:"#fff",flexShrink:0},children:N}),l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:13,fontWeight:500,color:"var(--text-primary)"},children:j.name}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)"},children:j.role})]})]},j.agent_key)})})]}),l.jsxs("div",{style:{padding:"16px 24px",borderTop:"1px solid var(--border)",display:"flex",justifyContent:"flex-end",gap:8},children:[l.jsx("button",{onClick:i,style:{padding:"8px 16px",border:"1px solid var(--border)",borderRadius:8,background:"transparent",color:"var(--text-primary)",cursor:"pointer",fontSize:13,fontFamily:"inherit"},children:"Cancel"}),l.jsx("button",{onClick:k,disabled:!a.trim()||c.size===0,style:{padding:"8px 20px",border:"none",borderRadius:8,background:a.trim()&&c.size>0?"var(--accent)":"var(--bg-hover)",color:a.trim()&&c.size>0?"#fff":"var(--text-muted)",cursor:a.trim()&&c.size>0?"pointer":"default",fontSize:13,fontWeight:600,fontFamily:"inherit",transition:"background 0.15s"},children:"Create Group"})]})]})})}function ej(t,i){if(!i.trim())return t;const r=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=t.split(new RegExp(`(${r})`,"gi"));return a.length===1?t:l.jsx(l.Fragment,{children:a.map((s,c)=>s.toLowerCase()===i.toLowerCase()?l.jsx("mark",{style:{background:"var(--yellow, #fbbf24)",color:"#000",borderRadius:2,padding:"0 1px"},children:s},c):s)})}function tj(t){const i=t.split(" ");return i.length>=2?(i[0][0]+i[i.length-1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function nj(t,i,r,a){return t.map((s,c)=>{const d=2*Math.PI*c/t.length-Math.PI/2;return{key:s.agent_key,name:s.name.split(" ")[0],initials:tj(s.name),x:i+a*Math.cos(d),y:r+a*Math.sin(d)}})}function rj(t){const i=new Map;for(const r of t){const a=`${r.from}->${r.to}`,s=new Date(r.ts).getTime(),c=i.get(a);c?(c.lastActivity=Math.max(c.lastActivity,s),c.count++):i.set(a,{from:r.from,to:r.to,lastActivity:s,count:1})}return Array.from(i.values())}function ij(t){const i=1-t;return 1-i*i*i}function vi(t){return getComputedStyle(document.documentElement).getPropertyValue(t).trim()}function ki(t){const i=t.match(/^#([0-9a-f]{6})$/i);if(i){const a=i[1];return[parseInt(a.slice(0,2),16),parseInt(a.slice(2,4),16),parseInt(a.slice(4,6),16)]}const r=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);return r?[+r[1],+r[2],+r[3]]:null}function zt(t,i){return`rgba(${t[0]},${t[1]},${t[2]},${i})`}function eh(){const t=ki(vi("--bg-tertiary"))??[30,30,30],i=ki(vi("--text-primary"))??[220,220,220],r=ki(vi("--text-muted"))??[140,140,140],a=ki(vi("--blue"))??ki(vi("--accent"))??[100,160,220],s=ki(vi("--border"))??[60,60,60];return{bg:t,text:i,muted:r,accent:a,border:s}}const ku={display:"flex",alignItems:"center",justifyContent:"center",width:30,height:30,border:"1px solid var(--border)",background:"var(--bg-card)",color:"var(--text-muted)",cursor:"pointer",padding:0,fontFamily:"inherit",transition:"background 0.15s, color 0.15s"};function oj(){const t=I.useRef(null),i=I.useRef(null),r=I.useRef(0),a=I.useRef([]),s=I.useRef([]),c=I.useRef(new Set),d=I.useRef(1),f=I.useRef(eh()),{activeAgents:h}=Ai(),{employees:g}=jr(),{data:y}=wt("/api/message-flow",3e3),x=g??[],v=y??[];I.useEffect(()=>{c.current=new Set(Object.keys(h).filter(_=>h[_]))},[h]),I.useEffect(()=>{s.current=rj(v)},[v]),I.useEffect(()=>{const _=setInterval(()=>{f.current=eh()},2e3);return()=>clearInterval(_)},[]);const k=I.useCallback(()=>{const _=t.current,U=i.current;if(!_||!U)return;const w=U.getBoundingClientRect(),T=window.devicePixelRatio||1;_.width=w.width*T,_.height=w.height*T,_.style.width=`${w.width}px`,_.style.height=`${w.height}px`;const q=w.width/2,P=w.height/2-10,X=Math.min(w.width/2,w.height/2)*.38;a.current=nj(x,q,P,X)},[x]);I.useEffect(()=>{k();const _=new ResizeObserver(()=>k());return i.current&&_.observe(i.current),()=>_.disconnect()},[k]),I.useEffect(()=>{const _=t.current;if(!_)return;function U(w){w.preventDefault();const T=w.deltaY>0?.92:1.08;d.current=Math.max(.3,Math.min(4,d.current*T))}return _.addEventListener("wheel",U,{passive:!1}),()=>_.removeEventListener("wheel",U)},[]);const j=I.useCallback(()=>{d.current=Math.min(4,d.current*1.3)},[]),M=I.useCallback(()=>{d.current=Math.max(.3,d.current/1.3)},[]),N=I.useCallback(()=>{d.current=1},[]);return I.useEffect(()=>{const _=t.current;if(!_)return;function U(){const w=_.getContext("2d");if(!w)return;const T=window.devicePixelRatio||1,q=_.width/T,P=_.height/T,X=f.current;w.save(),w.scale(T,T),w.clearRect(0,0,q,P);const oe=d.current;w.translate(q/2,P/2),w.scale(oe,oe),w.translate(-q/2,-P/2);const me=Date.now(),E=a.current,Q=s.current,Y=new Map(E.map(le=>[le.key,le])),de=c.current,J=22,K=2e4,he=new Set;for(const le of Q)he.add(`${le.from}:${le.to}`);for(let le=0;le<E.length;le++)for(let Z=le+1;Z<E.length;Z++){const G=E[le],S=E[Z],A=he.has(`${G.key}:${S.key}`)||he.has(`${S.key}:${G.key}`),V=(G.x+S.x)/2,C=(G.y+S.y)/2,ge=S.x-G.x,je=S.y-G.y,ye=Math.sqrt(ge*ge+je*je),H=-je/ye,pe=ge/ye,fe=ye*(A?.04:.02);w.beginPath(),w.moveTo(G.x,G.y),w.quadraticCurveTo(V+H*fe,C+pe*fe,S.x,S.y),w.strokeStyle=A?zt(X.muted,.12):zt(X.border,.08),w.lineWidth=A?1.2:.5,w.stroke()}for(const le of Q){const Z=me-le.lastActivity;if(Z>=K)continue;const G=Y.get(le.from),S=Y.get(le.to);if(!G||!S)continue;const A=Math.max(0,1-Z/K),V=(me-le.lastActivity)%1800/1800,C=ij(V),ge=S.x-G.x,je=S.y-G.y,ye=Math.sqrt(ge*ge+je*je),H=-je/ye,pe=ge/ye,fe=ye*.04,Te=(G.x+S.x)/2+H*fe,Fe=(G.y+S.y)/2+pe*fe,Ze=C,Ge=(1-Ze)*(1-Ze)*G.x+2*(1-Ze)*Ze*Te+Ze*Ze*S.x,De=(1-Ze)*(1-Ze)*G.y+2*(1-Ze)*Ze*Fe+Ze*Ze*S.y,mt=A*(1-V*.3),Et=w.createRadialGradient(Ge,De,0,Ge,De,18);Et.addColorStop(0,zt(X.accent,.25*mt)),Et.addColorStop(.5,zt(X.accent,.06*mt)),Et.addColorStop(1,zt(X.accent,0)),w.beginPath(),w.arc(Ge,De,18,0,Math.PI*2),w.fillStyle=Et,w.fill(),w.beginPath(),w.arc(Ge,De,2.5,0,Math.PI*2),w.fillStyle=zt(X.text,.8*mt),w.fill(),w.save(),w.beginPath(),w.moveTo(G.x,G.y),w.quadraticCurveTo(Te,Fe,Ge,De),w.strokeStyle=zt(X.accent,.12*mt),w.lineWidth=2,w.stroke(),w.restore()}for(const le of E){const Z=de.has(le.key);if(Z){const G=.5+.5*Math.sin(me/400),S=J+10+4*G,A=w.createRadialGradient(le.x,le.y,J*.5,le.x,le.y,S);A.addColorStop(0,zt(X.accent,.12+.08*G)),A.addColorStop(.6,zt(X.accent,.04+.03*G)),A.addColorStop(1,zt(X.accent,0)),w.beginPath(),w.arc(le.x,le.y,S,0,Math.PI*2),w.fillStyle=A,w.fill(),w.beginPath(),w.arc(le.x,le.y,J,0,Math.PI*2),w.fillStyle=zt(X.bg,.95),w.fill(),w.beginPath(),w.arc(le.x,le.y,J,0,Math.PI*2),w.strokeStyle=zt(X.accent,.4+.2*G),w.lineWidth=1.5,w.stroke()}else w.beginPath(),w.arc(le.x,le.y,J,0,Math.PI*2),w.fillStyle=zt(X.muted,.06),w.fill(),w.beginPath(),w.arc(le.x,le.y,J,0,Math.PI*2),w.strokeStyle=zt(X.border,.3),w.lineWidth=1,w.stroke();w.font="500 11px 'Inter', sans-serif",w.textAlign="center",w.textBaseline="middle",w.fillStyle=Z?zt(X.text,.85):zt(X.muted,.4),w.fillText(le.initials,le.x,le.y),w.font="400 10px 'Inter', sans-serif",w.fillStyle=Z?zt(X.text,.6):zt(X.muted,.25),w.fillText(le.name,le.x,le.y+J+12)}w.restore(),r.current=requestAnimationFrame(U)}return r.current=requestAnimationFrame(U),()=>cancelAnimationFrame(r.current)},[]),l.jsxs("div",{ref:i,style:{flex:1,position:"relative",overflow:"hidden"},children:[l.jsx("canvas",{ref:t,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),l.jsxs("div",{style:{position:"absolute",top:12,right:12,display:"flex",borderRadius:9,overflow:"hidden",border:"1px solid var(--border)",boxShadow:"var(--shadow)",zIndex:10},children:[l.jsx("button",{onClick:M,title:"Zoom out",style:{...ku,borderRadius:0,border:"none",borderRight:"1px solid var(--border)"},onMouseEnter:_=>{_.currentTarget.style.background="var(--bg-hover)",_.currentTarget.style.color="var(--text-primary)"},onMouseLeave:_=>{_.currentTarget.style.background="var(--bg-card)",_.currentTarget.style.color="var(--text-muted)"},children:l.jsx(Sh,{size:14})}),l.jsx("button",{onClick:N,title:"Fit to view",style:{...ku,borderRadius:0,border:"none",borderRight:"1px solid var(--border)"},onMouseEnter:_=>{_.currentTarget.style.background="var(--bg-hover)",_.currentTarget.style.color="var(--text-primary)"},onMouseLeave:_=>{_.currentTarget.style.background="var(--bg-card)",_.currentTarget.style.color="var(--text-muted)"},children:l.jsx(Xy,{size:14})}),l.jsx("button",{onClick:j,title:"Zoom in",style:{...ku,borderRadius:0,border:"none"},onMouseEnter:_=>{_.currentTarget.style.background="var(--bg-hover)",_.currentTarget.style.color="var(--text-primary)"},onMouseLeave:_=>{_.currentTarget.style.background="var(--bg-card)",_.currentTarget.style.color="var(--text-muted)"},children:l.jsx(wh,{size:14})})]})]})}function lj(t){return new Date(t).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function aj(t,i){for(let r=t.length-1;r>=0;r--)if(t[r].agentId===i)return t[r];return null}function sj({entry:t,isLast:i,color:r}){const a=t.type==="tool_start",s=t.type==="tool_end",c=t.type==="text",d=t.type==="thinking",f=t.type==="agent_end";let h="",g="";if(a){if(h=t.toolName??"tool",t.toolArgs){const j=Object.entries(t.toolArgs);j.length>0&&(g=j.map(([M,N])=>{const _=typeof N=="string"?N:JSON.stringify(N);return`${M}: ${_&&_.length>50?_.slice(0,47)+"...":_}`}).join(", "))}}else s?(h=`${t.toolName??"tool"} ${t.isError?"failed":"done"}`,t.toolResult&&(g=t.toolResult.length>120?t.toolResult.slice(0,117)+"...":t.toolResult)):c?(h="output",g=t.content.length>200?t.content.slice(0,197)+"...":t.content):d?(h="thinking",g=t.content.length>120?t.content.slice(0,117)+"...":t.content):f&&(h="finished");const y=a?8:f?7:5,x=s?t.isError?"var(--red)":"var(--green)":f?"var(--text-muted)":r,v=a?`2px solid ${r}`:"none",k=a?"transparent":x;return l.jsxs("div",{style:{display:"flex",gap:0,minHeight:24},children:[l.jsxs("div",{style:{width:24,display:"flex",flexDirection:"column",alignItems:"center",flexShrink:0},children:[l.jsx("div",{style:{width:y,height:y,borderRadius:"50%",background:k,border:v,marginTop:5,flexShrink:0,boxShadow:a||c?`0 0 5px ${r}`:"none"}}),!i&&l.jsx("div",{style:{width:1,flex:1,minHeight:6,background:"var(--border)"}})]}),l.jsxs("div",{style:{flex:1,paddingBottom:4,minWidth:0},children:[l.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:5,flexWrap:"wrap"},children:[l.jsx("span",{style:{fontSize:11,fontWeight:500,color:s&&t.isError?"var(--red)":"var(--text-primary)"},children:h}),l.jsx("span",{style:{fontSize:9,color:"var(--text-muted)",marginLeft:"auto",flexShrink:0},children:lj(t.timestamp)})]}),g&&l.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",lineHeight:1.4,marginTop:1,fontFamily:c||d?"inherit":"'Cascadia Code', 'Fira Code', monospace",whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:48,overflow:"hidden"},children:g})]})]})}function uj({name:t,role:i,items:r,active:a,color:s,agentKey:c}){const d=I.useRef(null),[f,h]=I.useState(""),[g,y]=I.useState(!1),[x,v]=I.useState(null);I.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[r.length]);async function k(){const M=f.trim();if(M){v("steer");try{await st("/api/steer",{agent_id:c,message:M}),h(""),y(!1)}catch(N){console.error(N)}finally{v(null)}}}async function j(){v("interrupt");try{await st("/api/interrupt",{agent_id:c,reason:"Interrupted via dashboard"})}catch(M){console.error(M)}finally{v(null)}}return l.jsxs("div",{style:{background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8,display:"flex",flexDirection:"column",overflow:"hidden",minHeight:160,maxHeight:360},children:[l.jsxs("div",{style:{padding:"7px 12px",borderBottom:"1px solid var(--border)",display:"flex",alignItems:"center",gap:8,flexShrink:0},children:[l.jsx("div",{style:{width:7,height:7,borderRadius:"50%",background:a?s:"var(--text-muted)",opacity:a?1:.3,boxShadow:a?`0 0 6px ${s}`:"none"}}),l.jsx("span",{style:{fontSize:12,fontWeight:600,color:s},children:t}),l.jsx("span",{style:{fontSize:10,color:"var(--text-muted)"},children:i}),l.jsx("span",{style:{marginLeft:"auto",fontSize:9,fontWeight:500,color:a?"var(--blue)":"var(--text-muted)"},children:a?"streaming":"idle"}),a&&l.jsxs(l.Fragment,{children:[l.jsx("button",{onClick:()=>y(!g),title:"Steer agent",style:{display:"flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:5,border:"none",padding:0,background:g?"var(--blue-bg)":"transparent",color:g?"var(--blue)":"var(--text-muted)",cursor:"pointer",transition:"all 0.1s"},children:l.jsx(r1,{size:11})}),l.jsx("button",{onClick:j,disabled:x==="interrupt",title:"Interrupt agent",style:{display:"flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:5,border:"none",padding:0,background:"transparent",color:"var(--text-muted)",cursor:"pointer",transition:"all 0.1s",opacity:x==="interrupt"?.5:1},onMouseEnter:M=>{M.currentTarget.style.color="var(--red)",M.currentTarget.style.background="var(--red-bg)"},onMouseLeave:M=>{M.currentTarget.style.color="var(--text-muted)",M.currentTarget.style.background="transparent"},children:l.jsx(uy,{size:11})})]})]}),g&&l.jsxs("div",{style:{display:"flex",gap:6,padding:"6px 10px",borderBottom:"1px solid var(--border)",flexShrink:0},children:[l.jsx("input",{value:f,onChange:M=>h(M.target.value),onKeyDown:M=>M.key==="Enter"&&k(),placeholder:"Steer message...",autoFocus:!0,style:{flex:1,fontSize:11,padding:"5px 8px",borderRadius:6,border:"1px solid var(--border)",background:"var(--bg-tertiary)",color:"var(--text-primary)",fontFamily:"inherit",outline:"none"}}),l.jsx("button",{onClick:k,disabled:x==="steer"||!f.trim(),style:{fontSize:11,padding:"5px 10px",borderRadius:6,border:"none",background:"var(--accent)",color:"#fff",cursor:"pointer",fontFamily:"inherit",fontWeight:500,opacity:x==="steer"||!f.trim()?.5:1},children:"Send"})]}),l.jsx("div",{ref:d,style:{flex:1,overflowY:"auto",padding:"8px 10px 6px",background:"var(--bg-tertiary)"},children:r.length===0?l.jsx("div",{style:{color:"var(--text-muted)",fontSize:11,padding:"12px 0",textAlign:"center"},children:"No activity yet"}):r.map((M,N)=>l.jsx(sj,{entry:M,isLast:N===r.length-1,color:s},M.id))})]})}function cj({activity:t,activeAgents:i,agents:r}){const a=t.filter(d=>d.type==="text"||d.type==="tool_start"||d.type==="tool_end"||d.type==="thinking"||d.type==="agent_end"),s=new Map;for(const d of a){const f=s.get(d.agentId)??[];f.push(d),s.set(d.agentId,f)}const c=[...r].sort((d,f)=>{const h=i[d.agent_key]?1:0,g=i[f.agent_key]?1:0;if(h!==g)return g-h;const y=s.has(d.agent_key)?1:0;return(s.has(f.agent_key)?1:0)-y});return l.jsx("div",{style:{flex:1,overflowY:"auto",padding:"12px 20px 60px",display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(340px, 1fr))",gap:10,alignContent:"start"},children:c.map(d=>l.jsx(uj,{name:d.name.split(" ")[0],role:d.role,items:s.get(d.agent_key)??[],active:i[d.agent_key]??!1,color:d.color||"var(--text-muted)",agentKey:d.agent_key},d.agent_key))})}const Eo={w:72,h:36},sn={cols:12,rows:8};function At(t,i){const r=sn.rows*Eo.w/2+60,a=60+Fn;return{x:r+(t-i)*Eo.w/2,y:a+(t+i)*Eo.h/2}}const Fn=80,Tg=(sn.cols+sn.rows)*Eo.w/2+140,Ig=(sn.cols+sn.rows)*Eo.h/2+180+Fn,bo=[{col:1,row:1},{col:2,row:1},{col:1,row:3},{col:2,row:3},{col:5,row:1},{col:6,row:1},{col:7,row:1},{col:5,row:2},{col:6,row:2},{col:7,row:2},{col:9,row:1},{col:10,row:1},{col:9,row:3},{col:10,row:3},{col:5,row:4},{col:6,row:4}],Uu={col:0,row:6},th=[{col:3,row:0},{col:8,row:0},{col:11,row:0},{col:0,row:4},{col:11,row:4},{col:3,row:6},{col:8,row:6}];function dj(){const t=At(0,0),i=At(sn.cols,0),r=At(sn.cols,sn.rows),a=At(0,sn.rows),s=`${t.x},${t.y} ${i.x},${i.y} ${r.x},${r.y} ${a.x},${a.y}`,c=[];for(let g=0;g<=sn.rows;g++){const y=At(0,g),x=At(sn.cols,g);c.push(l.jsx("line",{x1:y.x,y1:y.y,x2:x.x,y2:x.y},`r${g}`))}for(let g=0;g<=sn.cols;g++){const y=At(g,0),x=At(g,sn.rows);c.push(l.jsx("line",{x1:y.x,y1:y.y,x2:x.x,y2:x.y},`c${g}`))}const d=At(0,7),f=At(0,5.8),h=56;return l.jsxs("svg",{style:{position:"absolute",inset:0,width:Tg,height:Ig,pointerEvents:"none"},children:[l.jsx("polygon",{points:`${t.x},${t.y} ${a.x},${a.y} ${a.x},${a.y-Fn} ${t.x},${t.y-Fn}`,fill:"#7A7570"}),l.jsx("polygon",{points:`${f.x},${f.y} ${d.x},${d.y} ${d.x},${d.y-h} ${f.x},${f.y-h}`,fill:"#2A2520"}),l.jsx("polygon",{points:`${t.x},${t.y} ${i.x},${i.y} ${i.x},${i.y-Fn} ${t.x},${t.y-Fn}`,fill:"#908A84"}),l.jsx("line",{x1:t.x,y1:t.y-Fn,x2:a.x,y2:a.y-Fn,stroke:"#B0A8A0",strokeWidth:"2"}),l.jsx("line",{x1:t.x,y1:t.y-Fn,x2:i.x,y2:i.y-Fn,stroke:"#C0B8B0",strokeWidth:"2"}),l.jsx("line",{x1:t.x,y1:t.y,x2:a.x,y2:a.y,stroke:"rgba(0,0,0,0.15)",strokeWidth:"1"}),l.jsx("line",{x1:t.x,y1:t.y,x2:i.x,y2:i.y,stroke:"rgba(0,0,0,0.15)",strokeWidth:"1"}),l.jsx("polygon",{points:s,fill:"#C8B89A"}),l.jsx("polygon",{points:s,fill:"none",stroke:"rgba(0,0,0,0.1)",strokeWidth:"1"}),l.jsx("g",{stroke:"rgba(0,0,0,0.07)",strokeWidth:"0.5",children:c})]})}function fj({col:t,row:i,occupied:r}){const{x:a,y:s}=At(t,i),c=56,d=28,f=10,h=r?"#A0906C":"#888880",g=r?"#7A6C52":"#666660",y=r?"#8F8170":"#777770",x=20,v=14,k=6,j=c/2-x/2+3,M=r?"rgba(100,180,255,0.35)":"#1A1A1A";return l.jsx("div",{style:{position:"absolute",left:a-c/2,top:s-d/2-v-k,width:c,height:d+f+v+k,pointerEvents:"none",zIndex:Math.floor(s)},children:l.jsxs("svg",{width:c,height:d+f+v+k,style:{display:"block",overflow:"visible"},children:[l.jsx("ellipse",{cx:c/2,cy:d+f+v+k-2,rx:c/3,ry:4,fill:"rgba(0,0,0,0.1)"}),l.jsx("polygon",{points:`${c/2},${v+k} ${c},${d/2+v+k} ${c/2},${d+v+k} 0,${d/2+v+k}`,fill:h,stroke:"rgba(0,0,0,0.12)",strokeWidth:"0.5"}),l.jsx("polygon",{points:`0,${d/2+v+k} ${c/2},${d+v+k} ${c/2},${d+f+v+k} 0,${d/2+f+v+k}`,fill:g}),l.jsx("polygon",{points:`${c},${d/2+v+k} ${c/2},${d+v+k} ${c/2},${d+f+v+k} ${c},${d/2+f+v+k}`,fill:y}),l.jsx("rect",{x:c/2-2+3,y:v,width:4,height:k,fill:"#3A3A3A",rx:1}),l.jsx("ellipse",{cx:c/2+3,cy:v+k-1,rx:6,ry:2,fill:"#3A3A3A"}),l.jsx("rect",{x:j,y:0,width:x,height:v,rx:1,fill:"#2A2A2A"}),l.jsx("rect",{x:j+1.5,y:1.5,width:x-3,height:v-3,rx:.5,fill:M,className:r?"iso-monitor-active":void 0}),r&&l.jsx("line",{x1:j+2,y1:2,x2:j+x-2,y2:2,stroke:"rgba(150,200,255,0.5)",strokeWidth:"0.5"})]})})}const nh=["#3D2B1F","#8B4513","#F4C542","#CC3333","#555555","#1A1A1A"];function pj(t){let i=0;for(let r=0;r<t.length;r++)i=(i<<5)-i+t.charCodeAt(r)|0;return nh[Math.abs(i)%nh.length]}function hj({color:t,walking:i,agentKey:r}){const a=pj(r);return l.jsx("div",{className:i?"iso-walking":void 0,style:{width:22,height:38,position:"relative"},children:l.jsxs("svg",{width:22,height:38,style:{display:"block",overflow:"visible"},children:[l.jsx("ellipse",{cx:11,cy:36,rx:8,ry:3,fill:"rgba(0,0,0,0.15)"}),l.jsx("rect",{className:i?"iso-leg-l":void 0,x:5,y:27,width:4,height:9,rx:1,fill:"#3A3A4E",style:{transformOrigin:"7px 27px"}}),l.jsx("rect",{className:i?"iso-leg-r":void 0,x:13,y:27,width:4,height:9,rx:1,fill:"#3A3A4E",style:{transformOrigin:"15px 27px"}}),l.jsx("rect",{x:3,y:17,width:16,height:11,rx:2,fill:t}),l.jsx("rect",{className:i?"iso-arm-l":void 0,x:0,y:18,width:3,height:9,rx:1,fill:t,opacity:.85,style:{transformOrigin:"1.5px 18px"}}),l.jsx("rect",{className:i?"iso-arm-r":void 0,x:19,y:18,width:3,height:9,rx:1,fill:t,opacity:.85,style:{transformOrigin:"20.5px 18px"}}),l.jsx("rect",{x:9,y:14,width:4,height:4,fill:"#F0C8A0"}),l.jsx("rect",{x:5,y:5,width:12,height:11,rx:3,fill:"#F0C8A0"}),l.jsx("rect",{x:5,y:4,width:12,height:5,rx:2,fill:a}),l.jsx("rect",{x:8,y:9,width:1.5,height:1.5,rx:.5,fill:"#2A2A2A"}),l.jsx("rect",{x:12.5,y:9,width:1.5,height:1.5,rx:.5,fill:"#2A2A2A"})]})})}function gj({employee:t,col:i,row:r,walking:a,active:s,bubbleText:c,isToolUse:d}){const{x:f,y:h}=At(i,r),g=t.color||"var(--text-muted)";return l.jsxs("div",{style:{position:"absolute",left:f-11,top:h-50,transition:"left 2.5s ease-in-out, top 2.5s ease-in-out",zIndex:Math.floor(h)+1,display:"flex",flexDirection:"column",alignItems:"center"},children:[s&&l.jsx("div",{style:{position:"absolute",bottom:"calc(100% + 4px)",left:"50%",transform:"translateX(-50%)",animation:"iso-bubble-in 0.2s ease-out forwards",maxWidth:130,minWidth:40,background:"var(--bg-card)",border:"1px solid var(--border)",borderLeft:`3px solid ${g}`,borderRadius:"6px 6px 6px 2px",padding:"3px 6px",fontSize:9,lineHeight:"1.3",color:"var(--text-secondary)",fontFamily:d?"monospace":"inherit",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",boxShadow:"0 2px 6px rgba(0,0,0,0.2)",pointerEvents:"none"},children:c?c.slice(-50).replace(/\n/g," "):l.jsxs("span",{style:{display:"inline-flex",gap:2},children:[l.jsx("span",{className:"office-typing-dot"}),l.jsx("span",{className:"office-typing-dot"}),l.jsx("span",{className:"office-typing-dot"})]})}),l.jsx(hj,{color:g,walking:a,agentKey:t.agent_key}),l.jsxs("div",{style:{marginTop:3,background:"rgba(0,0,0,0.75)",borderRadius:10,padding:"1px 6px",display:"flex",alignItems:"center",gap:3,border:"1px solid rgba(255,255,255,0.08)"},children:[l.jsx("div",{style:{width:5,height:5,borderRadius:"50%",background:s?g:"rgba(255,255,255,0.25)",boxShadow:s?`0 0 4px ${g}`:"none"}}),l.jsx("span",{style:{fontSize:8,fontWeight:700,color:"#fff",letterSpacing:"0.02em",whiteSpace:"nowrap"},children:t.name.split(" ")[0]})]})]})}function mj({col:t,row:i}){const{x:r,y:a}=At(t+.35,i+.55),s=22,c=11,d=5,f=14;return l.jsx("div",{style:{position:"absolute",left:r-s/2,top:a-f-c/2,width:s,height:f+c+d,pointerEvents:"none",zIndex:Math.floor(a)-1},children:l.jsxs("svg",{width:s,height:f+c+d,style:{display:"block"},children:[l.jsx("line",{x1:3,y1:f+c,x2:3,y2:f+c+d,stroke:"#888890",strokeWidth:1.5}),l.jsx("line",{x1:s-3,y1:f+c,x2:s-3,y2:f+c+d,stroke:"#888890",strokeWidth:1.5}),l.jsx("line",{x1:s/2-4,y1:f+c+1,x2:s/2-4,y2:f+c+d,stroke:"#888890",strokeWidth:1}),l.jsx("line",{x1:s/2+4,y1:f+c+1,x2:s/2+4,y2:f+c+d,stroke:"#888890",strokeWidth:1}),l.jsx("polygon",{points:`${s/2},${f} ${s},${f+c/2} ${s/2},${f+c} 0,${f+c/2}`,fill:"#4A4A5A"}),l.jsx("polygon",{points:`0,${f+c/2} ${s/2},${f+c} ${s/2},${f+c+3} 0,${f+c/2+3}`,fill:"#38383E"}),l.jsx("polygon",{points:`${s},${f+c/2} ${s/2},${f+c} ${s/2},${f+c+3} ${s},${f+c/2+3}`,fill:"#424248"}),l.jsx("rect",{x:2,y:0,width:s-4,height:f,rx:2,fill:"#3A3A44"}),l.jsx("rect",{x:3,y:1,width:s-6,height:f-2,rx:1,fill:"#44444E"})]})})}function xj(){const{x:t,y:i}=At(Uu.col,Uu.row),r=20,a=10,s=20;return l.jsx("div",{style:{position:"absolute",left:t-r/2,top:i-s-a/2,width:r,height:a+s+8,pointerEvents:"none",zIndex:Math.floor(i)},children:l.jsxs("svg",{width:r,height:a+s+8,style:{display:"block",overflow:"visible"},children:[l.jsx("circle",{cx:10,cy:-2,r:2,fill:"rgba(255,255,255,0.2)",className:"iso-steam"}),l.jsx("circle",{cx:14,cy:-5,r:1.5,fill:"rgba(255,255,255,0.15)",className:"iso-steam-2"}),l.jsx("polygon",{points:`${r/2},0 ${r},${a/2} ${r/2},${a} 0,${a/2}`,fill:"#5A5A5A"}),l.jsx("polygon",{points:`0,${a/2} ${r/2},${a} ${r/2},${a+s} 0,${a/2+s}`,fill:"#404040"}),l.jsx("polygon",{points:`${r},${a/2} ${r/2},${a} ${r/2},${a+s} ${r},${a/2+s}`,fill:"#4A4A4A"}),l.jsx("rect",{x:r/2+2,y:a/2+3,width:6,height:4,rx:.5,fill:"rgba(0,150,255,0.3)"}),l.jsx("rect",{x:r/2-2,y:a+s-3,width:4,height:3,fill:"#333",rx:.5})]})})}function bu({col:t,row:i}){const{x:r,y:a}=At(t,i);return l.jsx("div",{style:{position:"absolute",left:r-10,top:a-28,width:20,height:32,pointerEvents:"none",zIndex:Math.floor(a)},children:l.jsxs("svg",{width:20,height:32,style:{display:"block"},children:[l.jsx("polygon",{points:"5,22 15,22 14,28 6,28",fill:"#8B6914"}),l.jsx("polygon",{points:"4,20 16,20 15,22 5,22",fill:"#A07818"}),l.jsx("ellipse",{cx:10,cy:12,rx:8,ry:7,fill:"#2D6A3F"}),l.jsx("ellipse",{cx:7,cy:8,rx:5,ry:5,fill:"#3D8A50"}),l.jsx("ellipse",{cx:14,cy:10,rx:5,ry:4,fill:"#1F4D2E"}),l.jsx("ellipse",{cx:10,cy:5,rx:4,ry:4,fill:"#4CA060"})]})})}function yj({col:t,row:i}){const{x:r,y:a}=At(t,i),s=44,c=22,d=8,f=[];for(let h=0;h<8;h++){const g=h/8*Math.PI*2-Math.PI/2;f.push(`${s+s*Math.cos(g)},${c+c*Math.sin(g)}`)}return l.jsx("div",{style:{position:"absolute",left:r-s,top:a-c,width:s*2,height:c*2+d,pointerEvents:"none",zIndex:Math.floor(a)},children:l.jsxs("svg",{width:s*2,height:c*2+d,style:{display:"block"},children:[l.jsx("ellipse",{cx:s,cy:c*2+d-2,rx:s-4,ry:6,fill:"rgba(0,0,0,0.08)"}),l.jsx("path",{d:`M ${s-s*Math.cos(Math.PI/8)},${c+c*Math.sin(Math.PI/8)}
488
+ L ${s-s*Math.cos(Math.PI/8)},${c+c*Math.sin(Math.PI/8)+d}
489
+ Q ${s},${c*2+d+4} ${s+s*Math.cos(Math.PI/8)},${c+c*Math.sin(Math.PI/8)+d}
490
+ L ${s+s*Math.cos(Math.PI/8)},${c+c*Math.sin(Math.PI/8)} Z`,fill:"#6B5940"}),l.jsx("polygon",{points:f.join(" "),fill:"#8B7355",stroke:"rgba(0,0,0,0.1)",strokeWidth:"0.5"})]})})}function vj({col:t,row:i}){const{x:r,y:a}=At(t,i),s=52,c=26,d=8,f=14;return l.jsx("div",{style:{position:"absolute",left:r-s/2,top:a-f-c/2,width:s,height:f+c+d,pointerEvents:"none",zIndex:Math.floor(a)},children:l.jsxs("svg",{width:s,height:f+c+d,style:{display:"block"},children:[l.jsx("polygon",{points:`${s/2},0 ${s},${c/2} ${s},${c/2+f} ${s/2},${f} 0,${c/2+f} 0,${c/2}`,fill:"#374151"}),l.jsx("polygon",{points:`${s/2},1 ${s-1},${c/2} ${s-1},${c/2+f-1} ${s/2},${f-1} 1,${c/2+f-1} 1,${c/2}`,fill:"#4A5568"}),l.jsx("polygon",{points:`${s/2},${f} ${s},${c/2+f} ${s/2},${c+f} 0,${c/2+f}`,fill:"#5A6A7E"}),l.jsx("polygon",{points:`0,${c/2+f} ${s/2},${c+f} ${s/2},${c+f+d} 0,${c/2+f+d}`,fill:"#3E4C5E"}),l.jsx("polygon",{points:`${s},${c/2+f} ${s/2},${c+f} ${s/2},${c+f+d} ${s},${c/2+f+d}`,fill:"#4A5A6E"})]})})}function kj({agents:t,activeAgents:i,tokens:r,activity:a}){const s=I.useMemo(()=>{const T=new Map;return t.forEach((q,P)=>T.set(q.agent_key,P%bo.length)),T},[t]),[c,d]=I.useState(new Map);I.useEffect(()=>{const T=new Map;t.forEach(q=>{const P=bo[s.get(q.agent_key)??0];T.set(q.agent_key,{col:P.col,row:P.row,walking:!1})}),d(T)},[t,s]),I.useEffect(()=>{const T=setInterval(()=>{d(q=>{const P=new Map(q);for(const[X,oe]of P){const me=s.get(X)??0,E=bo[me];if(i[X]){oe.col!==E.col||oe.row!==E.row?P.set(X,{col:E.col,row:E.row,walking:!0}):oe.walking&&P.set(X,{...oe,walking:!1});continue}if(oe.walking)P.set(X,{...oe,walking:!1});else if(Math.random()<.2){const Q=Math.random(),Y=Q<.1?Uu:Q<.5?th[Math.floor(Math.random()*th.length)]:E;P.set(X,{col:Y.col,row:Y.row,walking:!0})}}return P})},4e3);return()=>clearInterval(T)},[i,s]);const[f,h]=I.useState(1),[g,y]=I.useState({x:0,y:0}),x=I.useRef(!1),v=I.useRef({x:0,y:0,panX:0,panY:0}),k=I.useRef(null),j=T=>Math.min(3,Math.max(.3,T)),M=I.useCallback(T=>{T.preventDefault();const q=T.deltaY>0?-.1:.1;h(P=>j(P+q))},[]),N=I.useCallback(T=>{var q,P;T.button===0&&(x.current=!0,v.current={x:T.clientX,y:T.clientY,panX:g.x,panY:g.y},(P=(q=T.target).setPointerCapture)==null||P.call(q,T.pointerId))},[g]),_=I.useCallback(T=>{x.current&&y({x:v.current.panX+(T.clientX-v.current.x),y:v.current.panY+(T.clientY-v.current.y)})},[]),U=I.useCallback(()=>{x.current=!1},[]),w=I.useCallback(()=>{h(1),y({x:0,y:0})},[]);return l.jsxs("div",{ref:k,onWheel:M,onPointerDown:N,onPointerMove:_,onPointerUp:U,onPointerLeave:U,style:{flex:1,overflow:"hidden",position:"relative",cursor:x.current?"grabbing":"grab"},children:[l.jsxs("div",{style:{position:"absolute",top:12,right:12,zIndex:20,display:"flex",flexDirection:"column",gap:2,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:8,padding:3,boxShadow:"0 2px 8px rgba(0,0,0,0.2)"},children:[l.jsx("button",{onClick:()=>h(T=>j(T+.15)),title:"Zoom in",style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,border:"none",borderRadius:6,background:"transparent",color:"var(--text-muted)",cursor:"pointer"},onMouseEnter:T=>{T.currentTarget.style.background="var(--bg-hover)",T.currentTarget.style.color="var(--text-primary)"},onMouseLeave:T=>{T.currentTarget.style.background="transparent",T.currentTarget.style.color="var(--text-muted)"},children:l.jsx(wh,{size:14})}),l.jsxs("div",{style:{fontSize:9,textAlign:"center",color:"var(--text-muted)",padding:"1px 0"},children:[Math.round(f*100),"%"]}),l.jsx("button",{onClick:()=>h(T=>j(T-.15)),title:"Zoom out",style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,border:"none",borderRadius:6,background:"transparent",color:"var(--text-muted)",cursor:"pointer"},onMouseEnter:T=>{T.currentTarget.style.background="var(--bg-hover)",T.currentTarget.style.color="var(--text-primary)"},onMouseLeave:T=>{T.currentTarget.style.background="transparent",T.currentTarget.style.color="var(--text-muted)"},children:l.jsx(Sh,{size:14})}),l.jsx("button",{onClick:w,title:"Reset view",style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,border:"none",borderRadius:6,background:"transparent",color:"var(--text-muted)",cursor:"pointer"},onMouseEnter:T=>{T.currentTarget.style.background="var(--bg-hover)",T.currentTarget.style.color="var(--text-primary)"},onMouseLeave:T=>{T.currentTarget.style.background="transparent",T.currentTarget.style.color="var(--text-muted)"},children:l.jsx(b1,{size:14})})]}),l.jsxs("div",{style:{position:"relative",width:Tg,height:Ig,transform:`translate(${g.x}px, ${g.y}px) scale(${f})`,transformOrigin:"center center",transition:x.current?"none":"transform 0.15s ease-out",margin:"20px auto"},children:[l.jsx(dj,{}),l.jsx(bu,{col:4,row:0}),l.jsx(bu,{col:11,row:2.5}),l.jsx(bu,{col:0,row:5}),l.jsx(yj,{col:9,row:5.5}),l.jsx(vj,{col:2,row:6.5}),l.jsx(xj,{}),bo.map((T,q)=>{const P=t.some(X=>{const oe=c.get(X.agent_key);return oe&&oe.col===T.col&&oe.row===T.row});return l.jsx(fj,{col:T.col,row:T.row,occupied:P},`d${q}`)}),bo.map((T,q)=>l.jsx(mj,{col:T.col,row:T.row},`c${q}`)),t.map(T=>{const q=c.get(T.agent_key);if(!q)return null;const P=i[T.agent_key]??!1;let X="",oe=!1;if(P){const me=aj(a,T.agent_key);(me==null?void 0:me.type)==="tool_start"?(X=me.toolName??"tool",oe=!0):X=r[T.agent_key]??""}return l.jsx(gj,{employee:T,col:q.col,row:q.row,walking:q.walking,active:P,bubbleText:X,isToolUse:oe},T.agent_key)})]})]})}const bj=[{id:"live",label:"Live",icon:l.jsx(Vu,{size:14})},{id:"network",label:"Network",icon:l.jsx(K1,{size:14})},{id:"office",label:"Office",icon:l.jsx(zi,{size:14})}];function wj({mode:t,setMode:i}){return l.jsx("div",{style:{position:"absolute",bottom:16,left:"50%",transform:"translateX(-50%)",display:"flex",gap:2,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:10,padding:3,zIndex:10,boxShadow:"0 4px 16px rgba(0,0,0,0.25)"},children:bj.map(r=>{const a=t===r.id;return l.jsxs("button",{onClick:()=>i(r.id),style:{display:"flex",alignItems:"center",gap:5,padding:"5px 12px",borderRadius:8,border:"none",background:a?"var(--bg-hover)":"transparent",color:a?"var(--text-primary)":"var(--text-muted)",fontSize:11,fontWeight:a?500:400,cursor:"pointer",fontFamily:"inherit",transition:"background 0.08s, color 0.08s"},children:[r.icon,r.label]},r.id)})})}function Sj(){const[t,i]=I.useState("live"),{tokens:r,activity:a,connected:s,activeAgents:c}=Ai(),{employees:d}=jr(),{data:f}=wt("/api/message-flow",3e3),h=d??[],g=f??[],y=Object.keys(c).filter(v=>c[v]).length,x=h.length>0?h:Object.keys(r).map(v=>({employee_id:v,name:v,role:"",agent_key:v,status:"available"}));return l.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden",position:"relative"},children:[l.jsxs("div",{className:"page-header",children:[l.jsx("h1",{className:"page-title",children:"Live"}),l.jsxs("div",{className:"page-subtitle",children:[s?"Connected":"Disconnected"," · ",y," active"]})]}),t==="live"&&l.jsx(cj,{activity:a,activeAgents:c,agents:x}),t==="network"&&l.jsx(oj,{}),t==="office"&&l.jsx(kj,{agents:x,activeAgents:c,tokens:r,activity:a,flow:g}),l.jsx(wj,{mode:t,setMode:i})]})}function Gn(t){return t.toLocaleString("en-US")}function rh(t){return"$"+t.toLocaleString("en-US",{minimumFractionDigits:4,maximumFractionDigits:4})}function ih(t){const i=t>0&&t<1?4:2;return"$"+t.toLocaleString("en-US",{minimumFractionDigits:i,maximumFractionDigits:i})}function oh(t){const i=Date.now()-new Date(t).getTime(),r=Math.floor(i/6e4);if(r<1)return"just now";if(r<60)return`${r}m ago`;const a=Math.floor(r/60);return a<24?`${a}h ${r%60}m ago`:`${Math.floor(a/24)}d ago`}const lh="1fr 120px 80px 110px 110px 90px 90px",ah=["Management","Product","Engineering","Analysis","Design","Documentation","Governance"];function jj(t,i){return i==="none"?()=>0:(r,a)=>{let s;return t==="lastActivity"?s=new Date(r.lastActivity).getTime()-new Date(a.lastActivity).getTime():s=r[t]-a[t],i==="asc"?s:-s}}function Cj(){const{data:t,lastRefresh:i}=wt("/api/finance",5e3),{employees:r}=jr(),[a,s]=I.useState(!1),[c,d]=I.useState(!1),[f,h]=I.useState(""),[g,y]=I.useState("list"),[x,v]=I.useState("costUsd"),[k,j]=I.useState("none"),M=t==null?void 0:t.totals,N=(t==null?void 0:t.agents)??[],_=new Map((r??[]).map(E=>[E.agent_key,E]));function U(E){x===E?j(Q=>Q==="none"?"desc":Q==="desc"?"asc":"none"):(v(E),j("desc"))}const w=I.useMemo(()=>{let E=[...N];if(f.trim()){const Q=f.toLowerCase();E=E.filter(Y=>{const de=_.get(Y.agentId);return Y.agentId.toLowerCase().includes(Q)||((de==null?void 0:de.name)??"").toLowerCase().includes(Q)||((de==null?void 0:de.role)??"").toLowerCase().includes(Q)||(Y.model??"").toLowerCase().includes(Q)})}return E.sort(jj(x,k))},[N,_,f,x,k]),T=I.useMemo(()=>{const E=new Map;for(const Q of w){const Y=_.get(Q.agentId),de=(Y==null?void 0:Y.department)??"Other";E.has(de)||E.set(de,[]),E.get(de).push(Q)}return[...E.entries()].sort(([Q],[Y])=>{const de=ah.indexOf(Q),J=ah.indexOf(Y);return de!==-1&&J!==-1?de-J:de!==-1?-1:J!==-1?1:Q.localeCompare(Y)})},[w,_]),q=Math.max(1,...w.map(E=>E.totalTokens));async function P(){d(!1),s(!0);try{await st("/api/finance/reset",{})}finally{s(!1)}}function X(E,Q){var J;const Y=_.get(E.agentId),de=Math.max(2,E.totalTokens/q*100);return l.jsxs("div",{style:{borderBottom:Q?"none":"1px solid var(--border)"},children:[l.jsxs("div",{style:{display:"grid",gridTemplateColumns:lh,gap:8,padding:"10px 14px",alignItems:"center"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[l.jsx("div",{style:{width:28,height:28,borderRadius:6,background:"var(--accent)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700,color:"#fff",flexShrink:0},children:E.agentId.slice(0,2).toUpperCase()}),l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:13,fontWeight:500,color:"var(--text-primary)"},children:((J=Y==null?void 0:Y.name)==null?void 0:J.split(" ")[0])??E.agentId}),l.jsx("div",{style:{fontSize:10,color:"var(--text-muted)"},children:(Y==null?void 0:Y.role)??E.agentId})]})]}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontFamily:"monospace",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:E.model??"—"}),l.jsx("div",{style:{textAlign:"right",fontSize:13,fontWeight:500,color:"var(--text-primary)",fontVariantNumeric:"tabular-nums"},children:Gn(E.turns)}),l.jsx("div",{style:{textAlign:"right",fontSize:13,color:"var(--text-secondary)",fontVariantNumeric:"tabular-nums"},children:Gn(E.inputTokens)}),l.jsx("div",{style:{textAlign:"right",fontSize:13,color:"var(--text-secondary)",fontVariantNumeric:"tabular-nums"},children:Gn(E.outputTokens)}),l.jsx("div",{style:{textAlign:"right",fontSize:13,fontWeight:600,color:"var(--green)",fontVariantNumeric:"tabular-nums"},children:rh(E.costUsd)}),l.jsx("div",{style:{textAlign:"right",fontSize:11,color:"var(--text-muted)"},children:oh(E.lastActivity)})]}),l.jsx("div",{style:{padding:"0 14px 10px"},children:l.jsx("div",{style:{height:4,borderRadius:2,background:"var(--bg-hover)",overflow:"hidden"},children:l.jsx("div",{style:{height:"100%",borderRadius:2,width:`${de}%`,background:"var(--accent)",transition:"width 0.3s ease"}})})})]},E.agentId)}function oe({label:E,colKey:Q,align:Y="right"}){const de=x===Q&&k!=="none";return l.jsxs("button",{onClick:()=>U(Q),style:{display:"flex",alignItems:"center",gap:2,justifyContent:Y==="right"?"flex-end":"flex-start",background:"none",border:"none",padding:0,margin:0,cursor:"pointer",fontFamily:"inherit",fontSize:10,fontWeight:600,color:de?"var(--accent)":"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.04em",whiteSpace:"nowrap"},children:[E,de?k==="asc"?l.jsx(tp,{size:10,style:{flexShrink:0}}):l.jsx(Ei,{size:10,style:{flexShrink:0}}):l.jsxs("span",{style:{display:"inline-flex",flexDirection:"column",marginLeft:1,opacity:.3,lineHeight:0},children:[l.jsx(tp,{size:8,style:{marginBottom:-3}}),l.jsx(Ei,{size:8})]})]})}function me(){return l.jsxs("div",{style:{display:"grid",gridTemplateColumns:lh,gap:8,padding:"10px 14px",borderBottom:"1px solid var(--border)",fontSize:10,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.04em"},children:[l.jsx("span",{children:"Agent"}),l.jsx("span",{children:"Model"}),l.jsx(oe,{label:"Turns",colKey:"turns"}),l.jsx(oe,{label:"Input Tokens",colKey:"inputTokens"}),l.jsx(oe,{label:"Output Tokens",colKey:"outputTokens"}),l.jsx(oe,{label:"Cost ($)",colKey:"costUsd"}),l.jsx(oe,{label:"Last Active",colKey:"lastActivity"})]})}return l.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"20px 24px"},children:[l.jsxs("div",{className:"page-header",style:{padding:"0 0 16px",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l.jsxs("div",{children:[l.jsx("h1",{className:"page-title",children:"Finance"}),l.jsxs("div",{className:"page-subtitle",children:["Token usage & cost tracking",i&&l.jsxs("span",{children:[" · ",i.toLocaleTimeString()]})]})]}),l.jsx("button",{onClick:()=>d(!0),disabled:a,style:{padding:"6px 14px",borderRadius:6,border:"1px solid var(--border)",background:"var(--bg-hover)",color:"var(--text-muted)",cursor:"pointer",fontSize:12,fontFamily:"inherit"},children:a?"Resetting...":"Reset Data"})]}),M&&l.jsx("div",{style:{display:"flex",gap:8,marginBottom:20,flexWrap:"wrap"},children:[{label:"Total Spent",value:ih(M.totalCostUsd),sub:rh(M.totalCostUsd),color:"var(--green)"},{label:"Total Tokens",value:Gn(M.totalTokens),sub:`${Gn(M.totalInputTokens)} in / ${Gn(M.totalOutputTokens)} out`,color:"var(--blue)"},{label:"LLM Turns",value:Gn(M.totalTurns),sub:`${N.length} agents`,color:"var(--purple)"},{label:"Session Start",value:new Date(M.sessionStart).toLocaleDateString(),sub:oh(M.sessionStart),color:"var(--orange)"}].map(E=>l.jsxs("div",{style:{flex:"1 1 140px",padding:"14px 16px",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8},children:[l.jsx("div",{style:{fontSize:22,fontWeight:700,color:E.color,lineHeight:1,fontVariantNumeric:"tabular-nums"},children:E.value}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:E.label}),l.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:2},children:E.sub})]},E.label))}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:16,flexWrap:"wrap"},children:[l.jsx("div",{style:{display:"flex",borderRadius:8,overflow:"hidden",border:"1px solid var(--border)",flexShrink:0},children:[["list",Yy,"List"],["department",zi,"Dept"]].map(([E,Q,Y])=>l.jsxs("button",{onClick:()=>y(E),title:`${Y} view`,style:{display:"flex",alignItems:"center",gap:4,fontSize:11,fontWeight:500,padding:"5px 10px",border:"none",cursor:"pointer",fontFamily:"inherit",background:g===E?"var(--accent)":"transparent",color:g===E?"#fff":"var(--text-muted)",transition:"all 0.08s"},children:[l.jsx(Q,{size:12}),Y]},E))}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,background:"var(--bg-tertiary)",border:"1px solid var(--border)",borderRadius:20,padding:"6px 14px",flexShrink:0},children:[l.jsx(Wr,{size:14,style:{color:"var(--text-muted)",flexShrink:0}}),l.jsx("input",{value:f,onChange:E=>h(E.target.value),placeholder:"Search agents...",style:{border:"none",outline:"none",background:"transparent",color:"var(--text-primary)",fontSize:12.5,width:180,fontFamily:"inherit",padding:0}}),f&&l.jsx("button",{onClick:()=>h(""),style:{display:"flex",alignItems:"center",justifyContent:"center",width:14,height:14,border:"none",background:"var(--bg-hover)",color:"var(--text-muted)",cursor:"pointer",borderRadius:3,padding:0,flexShrink:0},children:l.jsx(Rn,{size:9})})]}),l.jsx("div",{style:{marginLeft:"auto",fontSize:10,color:"var(--text-muted)",fontStyle:"italic"},children:"Costs based on per-model pricing"})]}),l.jsx("div",{style:{marginBottom:20},children:w.length===0?l.jsx("div",{style:{padding:24,textAlign:"center",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8,color:"var(--text-muted)",fontSize:13},children:f?"No agents match your search.":"No usage data yet. Agents will appear here once they start processing tasks."}):g==="department"?l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:16},children:T.map(([E,Q])=>{const Y=Q.reduce((K,he)=>K+he.costUsd,0),de=Q.reduce((K,he)=>K+he.totalTokens,0),J=Q.reduce((K,he)=>K+he.turns,0);return l.jsxs("div",{children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:8,paddingBottom:6,borderBottom:"1px solid var(--border)"},children:[l.jsx(zi,{size:14,style:{color:"var(--text-muted)"}}),l.jsx("span",{style:{fontSize:13,fontWeight:700,color:"var(--text-primary)",letterSpacing:"0.01em"},children:E}),l.jsx("span",{style:{fontSize:11,color:"var(--text-muted)",background:"var(--bg-tertiary)",padding:"1px 8px",borderRadius:5,fontFamily:"monospace"},children:Q.length}),l.jsxs("div",{style:{marginLeft:"auto",display:"flex",gap:14,fontSize:11},children:[l.jsxs("span",{style:{color:"var(--text-muted)"},children:[Gn(J)," turns"]}),l.jsxs("span",{style:{color:"var(--text-muted)"},children:[Gn(de)," tokens"]}),l.jsx("span",{style:{color:"var(--green)",fontWeight:600,fontVariantNumeric:"tabular-nums"},children:ih(Y)})]})]}),l.jsxs("div",{style:{background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8,overflow:"hidden"},children:[me(),Q.map((K,he)=>X(K,he===Q.length-1))]})]},E)})}):l.jsxs("div",{style:{background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8,overflow:"hidden"},children:[me(),w.map((E,Q)=>X(E,Q===w.length-1))]})}),c&&l.jsx(og,{title:"Reset Finance Data",message:"This will clear all token usage and cost data for every agent. This action cannot be undone.",confirmLabel:"Reset Data",destructive:!0,onConfirm:P,onCancel:()=>d(!1)})]})}const wu={files:{label:"Files",color:"var(--green)"},"dev-tools":{label:"Dev Tools",color:"var(--accent)"},browser:{label:"Browser",color:"var(--blue)"},search:{label:"Search",color:"var(--orange)"},database:{label:"Database",color:"var(--purple)"},productivity:{label:"Productivity",color:"var(--yellow)"},cloud:{label:"Cloud",color:"var(--blue)"},design:{label:"Design",color:"var(--pink, var(--red))"},communication:{label:"Communication",color:"var(--blue)"},ai:{label:"AI",color:"var(--accent)"},other:{label:"Other",color:"var(--text-muted)"}},Ci=[{id:"filesystem",name:"Filesystem",description:"Secure file operations — read, write, search, and navigate directories with configurable access controls.",category:"files",package:"@modelcontextprotocol/server-filesystem",command:"npx",args:["-y","@modelcontextprotocol/server-filesystem","./"],envVars:{},tools:["read_text_file","write_file","edit_file","list_directory","search_files","directory_tree","move_file"],docsUrl:"https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem"},{id:"memory",name:"Memory",description:"Knowledge graph-based persistent memory. Store entities, observations, and relations across sessions.",category:"ai",package:"@modelcontextprotocol/server-memory",command:"npx",args:["-y","@modelcontextprotocol/server-memory"],envVars:{},tools:["create_entities","create_relations","add_observations","read_graph","search_nodes","open_nodes"],docsUrl:"https://github.com/modelcontextprotocol/servers/tree/main/src/memory"},{id:"github",name:"GitHub",description:"GitHub's official MCP server — repos, issues, PRs, Actions, code security, and more.",category:"dev-tools",package:"ghcr.io/github/github-mcp-server",command:"docker",args:["run","-i","--rm","-e","GITHUB_PERSONAL_ACCESS_TOKEN","ghcr.io/github/github-mcp-server"],envVars:{GITHUB_PERSONAL_ACCESS_TOKEN:"ghp_xxxxxxxxxxxx"},tools:["get_file_contents","create_or_update_file","create_issue","create_pull_request","search_code","list_commits"],docsUrl:"https://github.com/github/github-mcp-server"},{id:"git",name:"Git",description:"Read, search, and manipulate local Git repositories — status, diff, commit, branch, and log.",category:"dev-tools",package:"mcp-server-git",command:"uvx",args:["mcp-server-git","--repository","./"],envVars:{},tools:["git_status","git_diff_unstaged","git_diff_staged","git_commit","git_add","git_log","git_create_branch"],docsUrl:"https://github.com/modelcontextprotocol/servers/tree/main/src/git"},{id:"docker",name:"Docker",description:"Complete Docker management — containers, images, networks, and volumes via Docker socket.",category:"dev-tools",package:"@thelord/mcp-server-docker-npx",command:"npx",args:["-y","@thelord/mcp-server-docker-npx"],envVars:{},tools:["list_containers","create_container","start_container","stop_container","container_logs","list_images","pull_image"],docsUrl:"https://www.npmjs.com/package/@thelord/mcp-server-docker-npx"},{id:"sentry",name:"Sentry",description:"Connect to Sentry for error tracking — list projects, retrieve issues, analyze events, root cause analysis.",category:"dev-tools",package:"@sentry/mcp-server",command:"npx",args:["-y","@sentry/mcp-server"],envVars:{},tools:["list_projects","get_issue_details","get_event","search_errors"],docsUrl:"https://github.com/getsentry/sentry-mcp-stdio"},{id:"sequential-thinking",name:"Sequential Thinking",description:"Dynamic and reflective problem-solving through thought sequences. Helps break down complex problems.",category:"ai",package:"@modelcontextprotocol/server-sequential-thinking",command:"npx",args:["-y","@modelcontextprotocol/server-sequential-thinking"],envVars:{},tools:["sequentialthinking"],docsUrl:"https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking"},{id:"context7",name:"Context7",description:"Up-to-date, version-specific library documentation and code examples for AI coding assistants.",category:"ai",package:"@upstash/context7-mcp",command:"npx",args:["-y","@upstash/context7-mcp"],envVars:{},tools:["resolve-library-id","query-docs"],docsUrl:"https://github.com/upstash/context7"},{id:"playwright",name:"Playwright",description:"Browser automation by Microsoft — navigate, click, type, screenshot, and extract data from web pages.",category:"browser",package:"@playwright/mcp",command:"npx",args:["-y","@playwright/mcp@latest"],envVars:{},tools:["browser_navigate","browser_click","browser_type","browser_snapshot","browser_take_screenshot","browser_evaluate"],docsUrl:"https://github.com/microsoft/playwright-mcp"},{id:"fetch",name:"Fetch",description:"Fetch web content and convert HTML to markdown for efficient LLM consumption.",category:"browser",package:"@modelcontextprotocol/server-fetch",command:"npx",args:["-y","@modelcontextprotocol/server-fetch"],envVars:{},tools:["fetch"],docsUrl:"https://github.com/modelcontextprotocol/servers/tree/main/src/fetch"},{id:"puppeteer",name:"Puppeteer",description:"Browser automation via Puppeteer — navigate, click, fill forms, screenshot, and execute JavaScript.",category:"browser",package:"@modelcontextprotocol/server-puppeteer",command:"npx",args:["-y","@modelcontextprotocol/server-puppeteer"],envVars:{},tools:["puppeteer_navigate","puppeteer_screenshot","puppeteer_click","puppeteer_fill","puppeteer_evaluate"],docsUrl:"https://github.com/modelcontextprotocol/servers/tree/main/src/puppeteer"},{id:"brave-search",name:"Brave Search",description:"Web search, local search, image/video/news search via the Brave Search API.",category:"search",package:"@brave/brave-search-mcp-server",command:"npx",args:["-y","@brave/brave-search-mcp-server"],envVars:{BRAVE_API_KEY:"BSA_xxxxxxxxxxxx"},tools:["brave_web_search","brave_local_search","brave_image_search","brave_news_search"],docsUrl:"https://github.com/brave/brave-search-mcp-server"},{id:"exa",name:"Exa",description:"AI-powered web search, company research, code search, and URL content extraction.",category:"search",package:"exa-mcp-server",command:"npx",args:["-y","exa-mcp-server"],envVars:{EXA_API_KEY:"exa-xxxxxxxxxxxx"},tools:["web_search_exa","get_code_context_exa","company_research","crawling"],docsUrl:"https://github.com/exa-labs/exa-mcp-server"},{id:"postgres",name:"PostgreSQL",description:"Read-only access to PostgreSQL databases — schema inspection and safe query execution.",category:"database",package:"@modelcontextprotocol/server-postgres",command:"npx",args:["-y","@modelcontextprotocol/server-postgres","postgresql://localhost:5432/mydb"],envVars:{},tools:["query"],docsUrl:"https://github.com/modelcontextprotocol/servers"},{id:"sqlite",name:"SQLite",description:"SQLite database management — query, create tables, inspect schemas, and full CRUD operations.",category:"database",package:"mcp-server-sqlite-npx",command:"npx",args:["-y","mcp-server-sqlite-npx","./data.sqlite"],envVars:{},tools:["sqlite_get_catalog","sqlite_execute"],docsUrl:"https://github.com/johnnyoshika/mcp-server-sqlite-npx"},{id:"notion",name:"Notion",description:"Official Notion MCP — search, create, and update pages, databases, and blocks in your workspace.",category:"productivity",package:"@notionhq/notion-mcp-server",command:"npx",args:["-y","@notionhq/notion-mcp-server"],envVars:{NOTION_API_KEY:"ntn_xxxxxxxxxxxx"},tools:["notion_search","notion_get_page","notion_query_database","notion_create_page","notion_update_page"],docsUrl:"https://github.com/makenotion/notion-mcp-server"},{id:"linear",name:"Linear",description:"Interact with Linear project management — search, create, and update issues, projects, and teams.",category:"productivity",package:"mcp-remote",command:"npx",args:["-y","mcp-remote","https://mcp.linear.app/mcp"],envVars:{},tools:["search_issues","create_issue","update_issue","get_teams","get_my_issues"],docsUrl:"https://linear.app/docs/mcp"},{id:"slack",name:"Slack",description:"Interact with Slack workspaces — list channels, read/post messages, search, manage threads.",category:"communication",package:"@modelcontextprotocol/server-slack",command:"npx",args:["-y","@modelcontextprotocol/server-slack"],envVars:{SLACK_BOT_TOKEN:"xoxb-xxxxxxxxxxxx",SLACK_TEAM_ID:"T00000000"},tools:["list_channels","post_message","reply_to_thread","get_channel_history","search_messages"],docsUrl:"https://github.com/modelcontextprotocol/servers"},{id:"cloudflare",name:"Cloudflare",description:"Access the entire Cloudflare API (2,500+ endpoints) — DNS, Workers, R2, Zero Trust, and more.",category:"cloud",package:"@cloudflare/mcp-server-cloudflare",command:"npx",args:["-y","@cloudflare/mcp-server-cloudflare"],envVars:{},tools:["search","execute"],docsUrl:"https://github.com/cloudflare/mcp-server-cloudflare"},{id:"stripe",name:"Stripe",description:"Integrate with Stripe APIs — manage customers, products, payments, subscriptions, and invoices.",category:"cloud",package:"@stripe/mcp",command:"npx",args:["-y","@stripe/mcp","--tools=all","--api-key=YOUR_STRIPE_KEY"],envVars:{},tools:["customers.create","customers.read","products.create","invoices.create","payment_intents.create"],docsUrl:"https://docs.stripe.com/mcp"},{id:"figma",name:"Figma",description:"Access Figma design files — extract design tokens, components, layout data for code generation.",category:"design",package:"figma-developer-mcp",command:"npx",args:["-y","figma-developer-mcp","--stdio"],envVars:{FIGMA_API_KEY:"figd_xxxxxxxxxxxx"},tools:["get_file","get_file_nodes","get_image","get_component","get_styles"],docsUrl:"https://help.figma.com/hc/en-us/articles/32132100833559"},{id:"google-maps",name:"Google Maps",description:"Location services — geocoding, place search, directions, distance matrix, and elevation data.",category:"cloud",package:"@modelcontextprotocol/server-google-maps",command:"npx",args:["-y","@modelcontextprotocol/server-google-maps"],envVars:{GOOGLE_MAPS_API_KEY:"AIza_xxxxxxxxxxxx"},tools:["maps_geocode","maps_search_places","maps_directions","maps_distance_matrix","maps_elevation"],docsUrl:"https://github.com/modelcontextprotocol/servers"}];function Xl(t){return JSON.parse(JSON.stringify(t))}const zj=[{key:"general",label:"General",icon:l.jsx(_1,{size:15}),color:"var(--text-secondary)"},{key:"models",label:"Models",icon:l.jsx(xh,{size:15}),color:"var(--purple)"},{key:"channels",label:"Channels",icon:l.jsx(g1,{size:15}),color:"var(--blue)"},{key:"integrations",label:"Integrations",icon:l.jsx(X1,{size:15}),color:"var(--orange)"},{key:"mcp",label:"MCP Servers",icon:l.jsx(qu,{size:15}),color:"var(--green)"}];function sh({src:t,fallback:i,size:r=20}){const[a,s]=I.useState(!1);return a?l.jsx(l.Fragment,{children:i}):l.jsx("img",{src:t,alt:"",style:{width:r,height:r,borderRadius:3,filter:"var(--icon-filter, none)"},onError:()=>s(!0)})}function on({label:t,placeholder:i,value:r,onChange:a,isSecret:s=!0}){const[c,d]=I.useState(!1);return l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--text-muted)",marginBottom:5,textTransform:"uppercase",letterSpacing:"0.03em"},children:t}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[l.jsx("input",{type:s&&!c?"password":"text",placeholder:i,value:r,onChange:f=>a(f.target.value),autoComplete:"off",spellCheck:!1,style:{flex:1,padding:"8px 12px",borderRadius:8,border:"1px solid var(--border)",background:"var(--bg-tertiary)",color:"var(--text-primary)",fontSize:12,fontFamily:"monospace",outline:"none"},onFocus:f=>{f.target.style.borderColor="var(--accent)"},onBlur:f=>{f.target.style.borderColor="var(--border)"}}),s&&l.jsx("button",{onClick:()=>d(!c),style:{width:32,height:32,borderRadius:8,border:"1px solid var(--border)",background:"var(--bg-hover)",color:"var(--text-muted)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},title:c?"Hide":"Show",children:l.jsx(ua,{size:14})})]})]})}function ln({label:t,value:i,icon:r}){const a=typeof i=="boolean"?i?"Enabled":"Disabled":String(i),s=typeof i=="boolean";return l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 0",borderBottom:"1px solid var(--border)"},children:[r&&l.jsx("span",{style:{color:"var(--text-muted)",flexShrink:0,display:"flex"},children:r}),l.jsx("span",{style:{fontSize:13,color:"var(--text-secondary)",flex:1},children:t}),s?l.jsx("span",{style:{fontSize:11,fontWeight:600,padding:"3px 10px",borderRadius:5,background:i?"var(--green-bg)":"var(--bg-tertiary)",color:i?"var(--green)":"var(--text-muted)"},children:a}):l.jsx("span",{style:{fontSize:12,color:"var(--text-primary)",fontFamily:"monospace",background:"var(--bg-tertiary)",padding:"3px 10px",borderRadius:5},children:a})]})}function Ej({label:t,value:i,icon:r,onSave:a}){const[s,c]=I.useState(!1),[d,f]=I.useState(i),[h,g]=I.useState(!1);I.useEffect(()=>{f(i)},[i]);const y=async()=>{if(!d.trim()||d===i){c(!1);return}g(!0);try{await a(d.trim()),c(!1)}catch{}g(!1)};return l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"10px 0",borderBottom:"1px solid var(--border)"},children:[r&&l.jsx("span",{style:{color:"var(--text-muted)",flexShrink:0,display:"flex"},children:r}),l.jsx("span",{style:{fontSize:13,color:"var(--text-secondary)",flexShrink:0},children:t}),s?l.jsxs("div",{style:{flex:1,display:"flex",gap:6,alignItems:"center"},children:[l.jsx("input",{value:d,onChange:x=>f(x.target.value),onKeyDown:x=>{x.key==="Enter"&&y(),x.key==="Escape"&&c(!1)},autoFocus:!0,style:{flex:1,fontSize:12,fontFamily:"monospace",padding:"4px 8px",borderRadius:5,border:"1px solid var(--border)",background:"var(--bg-secondary)",color:"var(--text-primary)",outline:"none"}}),l.jsx("button",{onClick:y,disabled:h,style:{padding:"4px 10px",fontSize:11,fontWeight:600,borderRadius:5,border:"none",background:"var(--accent)",color:"#fff",cursor:"pointer",opacity:h?.6:1},children:h?"...":"Save"}),l.jsx("button",{onClick:()=>{f(i),c(!1)},style:{padding:"4px 8px",fontSize:11,borderRadius:5,border:"1px solid var(--border)",background:"transparent",color:"var(--text-muted)",cursor:"pointer"},children:"Cancel"})]}):l.jsxs("div",{style:{flex:1,display:"flex",alignItems:"center",gap:8,justifyContent:"flex-end"},children:[l.jsx("span",{style:{fontSize:12,color:"var(--text-primary)",fontFamily:"monospace",background:"var(--bg-tertiary)",padding:"3px 10px",borderRadius:5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:360},children:i}),l.jsx("button",{onClick:()=>c(!0),style:{padding:"3px 8px",fontSize:11,borderRadius:5,border:"1px solid var(--border)",background:"transparent",color:"var(--text-muted)",cursor:"pointer"},children:"Edit"})]})]})}function _j({tier:t,slot:i,color:r,icon:a,providers:s,onSave:c,saving:d}){const[f,h]=I.useState((i==null?void 0:i.provider)??""),[g,y]=I.useState((i==null?void 0:i.model)??""),[x,v]=I.useState(!1),k=s.find(q=>q.id===f),j=(k==null?void 0:k.models)??[],M=s.map(q=>({value:q.id,label:`${q.name} (${q.models.length})`,iconUrl:q.iconUrl})),N=j.map(q=>({value:q,label:q}));function _(q){h(q),y(""),v(!0)}function U(q){y(q),v(!0)}function w(){f&&g&&c({provider:f,model:g}),v(!1)}function T(){c(null),h(""),y(""),v(!1)}return l.jsxs("div",{style:{padding:"14px 16px",borderRadius:10,background:"var(--bg-card)",border:"1px solid var(--border)"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:12},children:[l.jsx("div",{style:{width:30,height:30,borderRadius:8,flexShrink:0,background:i?`color-mix(in srgb, ${r} 12%, transparent)`:"var(--bg-tertiary)",display:"flex",alignItems:"center",justifyContent:"center",color:i?r:"var(--text-muted)"},children:a}),l.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)",textTransform:"capitalize",flex:1},children:t}),i&&l.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"3px 8px",borderRadius:5,background:`color-mix(in srgb, ${r} 10%, transparent)`,color:r,letterSpacing:"0.04em"},children:"SET"})]}),l.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[l.jsx(Ti,{value:f,onChange:_,options:M,placeholder:"Select provider...",alignRight:!1}),f&&l.jsx(Ti,{value:g,onChange:U,options:N,placeholder:`Select model (${j.length})...`,alignRight:!1}),x&&g&&l.jsxs("button",{onClick:w,disabled:d,style:{display:"flex",alignItems:"center",justifyContent:"center",height:32,padding:"0 14px",borderRadius:7,border:"none",background:"var(--accent)",color:"#fff",fontSize:11,fontWeight:600,cursor:"pointer",fontFamily:"inherit",flexShrink:0,opacity:d?.5:1,transition:"opacity 0.12s"},children:[l.jsx(Ii,{size:12,style:{marginRight:4}})," Apply"]}),i&&!x&&l.jsx("button",{onClick:T,disabled:d,title:"Clear this tier",style:{display:"flex",alignItems:"center",justifyContent:"center",width:32,height:32,borderRadius:7,flexShrink:0,border:"1px solid var(--border)",background:"transparent",color:"var(--text-muted)",cursor:"pointer",padding:0,transition:"color 0.12s, border-color 0.12s"},children:l.jsx(Sr,{size:12})})]})]})}function Xn({title:t,count:i}){return l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,fontSize:11,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:10},children:[t,i!==void 0&&l.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"1px 6px",borderRadius:4,background:"var(--bg-tertiary)",color:"var(--text-muted)",fontVariantNumeric:"tabular-nums"},children:i})]})}function Tj(){const[t,i]=I.useState("general");I.useEffect(()=>{function $(ue){const ve=ue.detail;ve&&i(ve)}return window.addEventListener("settings-nav",$),()=>window.removeEventListener("settings-nav",$)},[]);const{data:r,refresh:a}=wt("/api/settings",1e4),{data:s,refresh:c}=wt("/api/model-config",1e4),[d,f]=I.useState(!1),[h,g]=I.useState(null),[y,x]=I.useState(""),[v,k]=I.useState(!1),[j,M]=I.useState({mcpServers:{}}),[N,_]=I.useState({servers:[]}),[U,w]=I.useState(!1),[T,q]=I.useState(!1),[P,X]=I.useState(null),[oe,me]=I.useState({}),[E,Q]=I.useState(null),[Y,de]=I.useState(null),[J,K]=I.useState({}),[he,le]=I.useState(!1),[Z,G]=I.useState(null),[S,A]=I.useState(!1),[V,C]=I.useState(null),[ge,je]=I.useState(null),[ye,H]=I.useState({}),[pe,fe]=I.useState(!1),{data:Te}=wt("/api/docker-status",3e4),Fe=I.useCallback(async()=>{try{const $=await fetch($r("/api/channel-config")).then(ue=>ue.json());Q($)}catch{}},[]),Ze=I.useCallback(async()=>{try{const $=await fetch($r("/api/integration-config")).then(ue=>ue.json());C($)}catch{}},[]);I.useEffect(()=>{Fe()},[Fe]),I.useEffect(()=>{Ze()},[Ze]),I.useEffect(()=>{const $=setInterval(Fe,8e3);return()=>clearInterval($)},[Fe]);const Ge=I.useCallback(async()=>{try{const[$,ue]=await Promise.all([fetch($r("/api/mcp-config")).then(He=>He.json()),fetch($r("/api/mcp-status")).then(He=>He.json())]);M($),_(ue);const ve={};for(const He of Object.keys($.mcpServers??{}))ve[He]=!0;me(ve)}catch{De("Failed to load MCP config")}},[]);I.useEffect(()=>{Ge()},[Ge]);function De($){X($),setTimeout(()=>X(null),3e3)}async function mt($,ue){f(!0);try{await st("/api/model-config",{[$]:ue}),c(),De(`${$.charAt(0).toUpperCase()+$.slice(1)} model updated`)}catch{De("Failed to save model config")}finally{f(!1)}}async function Et($,ue){k(!0);try{await st("/api/provider-key",{provider:$,key:ue}),c(),De("API key saved"),g(null),x("")}catch{De("Failed to save API key")}finally{k(!1)}}async function _t($,ue){fe(!0);try{const ve=await st("/api/integration-config",{[$]:ue});ve!=null&&ve.ok?(C(ve.config),De(`${$.charAt(0).toUpperCase()+$.slice(1)} saved`),je(null),H({})):De("Save failed")}catch{De("Save failed")}finally{fe(!1)}}async function W($,ue){fe(!0);try{const ve=V==null?void 0:V[$],He=ve&&typeof ve=="object"?{...ve,enabled:!ue}:{enabled:!ue},qe=await st("/api/integration-config",{[$]:He});qe!=null&&qe.ok&&(C(qe.config),De(`${$} ${ue?"disabled":"enabled"}`))}catch{De("Toggle failed")}finally{fe(!1)}}function ee($,ue){M(ve=>{const He=Xl(ve);return He.mcpServers[$]={...He.mcpServers[$],...ue},He}),q(!0)}function te($){M(ue=>{const ve=Xl(ue);return delete ve.mcpServers[$],ve}),q(!0)}function ze($){const ue=prompt("Environment variable name:");ue!=null&&ue.trim()&&ee($,{env:{...j.mcpServers[$].env,[ue.trim()]:""}})}function Oe($,ue){const ve={...j.mcpServers[$].env};delete ve[ue],ee($,{env:ve})}async function Ne(){w(!0);try{const $=await st("/api/mcp-config",j);$!=null&&$.ok?(q(!1),De("Saved! Restart server to apply changes."),Ge()):De("Save failed")}catch{De("Save failed")}finally{w(!1)}}const ke=Object.keys(j.mcpServers),$e=r,D=V??($e==null?void 0:$e.integrations)??null,ae=(s==null?void 0:s.providers.filter($=>$.configured).length)??0,Ee=[E==null?void 0:E.telegram.configured,E==null?void 0:E.slack.configured,E==null?void 0:E.discord.configured].filter(Boolean).length,Pe=D?[D.searxng.configured&&D.searxng.enabled,D.sonarqube.configured&&D.sonarqube.enabled,D.gitleaks.enabled,D.semgrep.enabled,D.trivy.enabled].filter(Boolean).length:0,Ie=N.servers.filter($=>$.connected).length;function pt(){return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[$e&&l.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[{label:"Company",value:$e.system.companyName,color:"var(--accent)"},{label:"Provider",value:$e.llm.provider,color:"var(--purple)"},{label:"Model",value:$e.llm.model.split("/").pop()??$e.llm.model,color:"var(--blue)"},{label:"Dashboard",value:`:${$e.system.dashboardPort}`,color:"var(--green)"}].map($=>l.jsxs("div",{style:{flex:"1 1 120px",padding:"14px 16px",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8},children:[l.jsx("div",{style:{fontSize:16,fontWeight:700,color:$.color,lineHeight:1.2,fontVariantNumeric:"tabular-nums"},children:$.value}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:$.label})]},$.label))}),l.jsxs("div",{children:[l.jsx(Xn,{title:"System"}),l.jsx("div",{className:"vec-card",style:{padding:"4px 16px"},children:$e?l.jsxs(l.Fragment,{children:[l.jsx(ln,{label:"Company Name",value:$e.system.companyName,icon:l.jsx(Ly,{size:13})}),l.jsx(Ej,{label:"Workspace",value:$e.system.workspace,icon:l.jsx(Iy,{size:13}),onSave:async $=>{await st($r("/api/workspace"),{path:$}),a()}}),l.jsx(ln,{label:"CLI Enabled",value:$e.system.cliEnabled}),l.jsx(ln,{label:"PM Proactive Loop",value:$e.proactive.enabled}),$e.proactive.enabled&&l.jsx(ln,{label:"Proactive Interval",value:`${$e.proactive.intervalSecs}s`}),l.jsx(ln,{label:"Dashboard Port",value:$e.system.dashboardPort,icon:l.jsx(np,{size:13})}),l.jsx(ln,{label:"Debounce Window",value:`${$e.system.debounceMs}ms`}),l.jsx(ln,{label:"Context Window",value:`${($e.system.contextWindow/1e3).toFixed(0)}K tokens`}),l.jsx(ln,{label:"Compact Threshold",value:`${($e.system.compactThreshold*100).toFixed(0)}%`})]}):l.jsx("div",{style:{padding:20,color:"var(--text-muted)",fontSize:12,textAlign:"center"},children:"Loading..."})})]}),l.jsxs("div",{children:[l.jsx(Xn,{title:"LLM Defaults"}),l.jsx("div",{className:"vec-card",style:{padding:"4px 16px"},children:$e?l.jsxs(l.Fragment,{children:[l.jsx(ln,{label:"Provider",value:$e.llm.provider,icon:l.jsx(Cu,{size:13})}),l.jsx(ln,{label:"Model",value:$e.llm.model,icon:l.jsx(xh,{size:13})}),l.jsx(ln,{label:"Thinking Level",value:$e.llm.thinkingLevel}),l.jsx(ln,{label:"Temperature",value:$e.llm.temperature}),l.jsx(ln,{label:"Max Tokens",value:$e.llm.maxTokens.toLocaleString()})]}):l.jsx("div",{style:{padding:20,color:"var(--text-muted)",fontSize:12,textAlign:"center"},children:"Loading..."})}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:8,paddingLeft:2},children:"Environment defaults — overridden by model priority tiers when set."})]})]})}function bn(){if(!s)return l.jsx("div",{style:{padding:20,color:"var(--text-muted)",fontSize:12,textAlign:"center"},children:"Loading..."});const $=s.providers.filter(ve=>ve.configured),ue=s.providers.filter(ve=>!ve.configured);return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[l.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[{label:"Providers Ready",value:String($.length),color:"var(--green)"},{label:"Total Models",value:String(s.providers.reduce((ve,He)=>ve+He.models.length,0)),color:"var(--blue)"},{label:"Priority Tiers Set",value:String([s.config.primary,s.config.secondary,s.config.fallback].filter(Boolean).length)+"/3",color:"var(--purple)"},{label:"Agent Overrides",value:String(Object.keys(s.config.agentModels).length),color:"var(--orange)"}].map(ve=>l.jsxs("div",{style:{flex:"1 1 120px",padding:"14px 16px",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8},children:[l.jsx("div",{style:{fontSize:22,fontWeight:700,color:ve.color,lineHeight:1,fontVariantNumeric:"tabular-nums"},children:ve.value}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:ve.label})]},ve.label))}),l.jsxs("div",{children:[l.jsx(Xn,{title:"Configured Providers",count:$.length}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:8},children:$.map(ve=>l.jsx(uh,{provider:ve,onClick:()=>{g(ve.id),x("")}},ve.id))})]}),ue.length>0&&l.jsxs("div",{children:[l.jsx(Xn,{title:"Available Providers",count:ue.length}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(200px, 1fr))",gap:8},children:ue.map(ve=>l.jsx(uh,{provider:ve,onClick:()=>{g(ve.id),x("")}},ve.id))})]}),l.jsxs("div",{children:[l.jsx(Xn,{title:"Model Priority"}),l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:8},children:["primary","secondary","fallback"].map(ve=>{const He=s.config[ve],qe={primary:"var(--accent)",secondary:"var(--yellow)",fallback:"var(--text-muted)"},Ke={primary:l.jsx(O1,{size:14}),secondary:l.jsx(Cu,{size:14}),fallback:l.jsx(eu,{size:14})},et=s.providers.filter(dt=>dt.configured);return l.jsx(_j,{tier:ve,slot:He,color:qe[ve],icon:Ke[ve],providers:et,onSave:dt=>mt(ve,dt),saving:d},ve)})})]}),Object.keys(s.config.agentModels).length>0&&l.jsxs("div",{children:[l.jsx(Xn,{title:"Agent Overrides",count:Object.keys(s.config.agentModels).length}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:6},children:Object.entries(s.config.agentModels).map(([ve,He])=>l.jsxs("span",{style:{fontSize:12,padding:"6px 12px",borderRadius:7,background:"var(--bg-card)",border:"1px solid var(--border)",color:"var(--text-secondary)",fontFamily:"monospace"},children:["@",ve," → ",He.provider,"/",He.model.split("/").pop()]},ve))}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:8,paddingLeft:2},children:"Per-agent models can be configured from the Directory view."})]})]})}function Ht($){de($),K({}),G(null)}function wn(){de(null),K({}),G(null)}async function $n(){if(Y){le(!0),G(null);try{const $={channel:Y};$.botToken=J.botToken??"",Y==="slack"&&($.appToken=J.appToken??"");const ue=await st("/api/channel-test",$);G(ue.ok?{ok:!0,msg:`Connected as "${ue.botName}"`}:{ok:!1,msg:ue.error??"Test failed"})}catch{G({ok:!1,msg:"Connection failed"})}finally{le(!1)}}}async function vt(){if(Y){A(!0);try{const $={channel:Y};$.botToken=J.botToken??"",Y==="telegram"?$.chatId=J.chatId??"":(Y==="slack"&&($.appToken=J.appToken??""),$.channelId=J.channelId??"");const ue=await st("/api/channel-config",$);ue.ok?(await st("/api/channel-restart",{channel:Y}),await Fe(),wn(),De(`${{telegram:"Telegram",slack:"Slack",discord:"Discord"}[Y]??Y} connected`)):De(ue.error??"Save failed")}catch{De("Save failed")}finally{A(!1)}}}async function cn($){try{const ue={telegram:"Telegram",slack:"Slack",discord:"Discord"};await st("/api/channel-disconnect",{channel:$}),await Fe(),De(`${ue[$]??$} disconnected`)}catch{De("Disconnect failed")}}function Tt($,ue,ve,He,qe,Ke){const et=Y===$,dt=(ue==null?void 0:ue.configured)??!1,dn=(ue==null?void 0:ue.connected)??!1;return l.jsxs("div",{style:{padding:"18px 20px",borderRadius:12,background:"var(--bg-card)",border:`1px solid ${et?Ke:"var(--border)"}`,transition:"border-color 0.15s"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,marginBottom:et?16:0},children:[l.jsx("div",{style:{width:42,height:42,borderRadius:10,background:dt?`color-mix(in srgb, ${Ke} 10%, transparent)`:"var(--bg-tertiary)",display:"flex",alignItems:"center",justifyContent:"center",color:dt?Ke:"var(--text-muted)",flexShrink:0},children:l.jsx(sh,{src:He,fallback:qe,size:22})}),l.jsxs("div",{style:{flex:1,minWidth:0},children:[l.jsx("div",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)"},children:ve}),dt&&!et&&l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2},children:$==="telegram"?`Chat ID: ${(ue==null?void 0:ue.chatId)??""}`:`Channel: ${(ue==null?void 0:ue.channelId)??""}`})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[dt&&l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:5},children:[l.jsx("div",{style:{width:7,height:7,borderRadius:"50%",background:dn?"var(--green)":"var(--red)",boxShadow:dn?"0 0 6px var(--green)":"none"}}),l.jsx("span",{style:{fontSize:10,fontWeight:500,color:dn?"var(--green)":"var(--red)"},children:dn?"Online":"Offline"})]}),l.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"4px 10px",borderRadius:6,background:dt?"color-mix(in srgb, var(--green) 10%, transparent)":"var(--bg-tertiary)",color:dt?"var(--green)":"var(--text-muted)",border:`1px solid ${dt?"color-mix(in srgb, var(--green) 18%, transparent)":"var(--border)"}`,flexShrink:0,letterSpacing:"0.04em"},children:dt?"CONFIGURED":"NOT SET"})]})]}),!et&&l.jsxs("div",{style:{display:"flex",gap:8,marginTop:12},children:[l.jsx("button",{onClick:()=>Ht($),style:{padding:"7px 16px",borderRadius:8,fontSize:12,fontWeight:500,border:"1px solid var(--border)",background:"var(--bg-hover)",color:"var(--text-primary)",cursor:"pointer",fontFamily:"inherit"},children:dt?"Update":"Configure"}),dt&&l.jsx("button",{onClick:()=>cn($),style:{padding:"7px 16px",borderRadius:8,fontSize:12,fontWeight:500,border:"1px solid color-mix(in srgb, var(--red) 30%, transparent)",background:"color-mix(in srgb, var(--red) 8%, transparent)",color:"var(--red)",cursor:"pointer",fontFamily:"inherit"},children:"Disconnect"})]}),et&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[$==="telegram"?l.jsxs(l.Fragment,{children:[l.jsx(on,{label:"Bot Token",placeholder:"Paste your bot token from @BotFather",value:J.botToken??"",onChange:ot=>K(lt=>({...lt,botToken:ot}))}),l.jsx(on,{label:"Chat ID",placeholder:"Your authorized chat ID",value:J.chatId??"",onChange:ot=>K(lt=>({...lt,chatId:ot})),isSecret:!1})]}):$==="slack"?l.jsxs(l.Fragment,{children:[l.jsx(on,{label:"Bot Token",placeholder:"xoxb-...",value:J.botToken??"",onChange:ot=>K(lt=>({...lt,botToken:ot}))}),l.jsx(on,{label:"App Token",placeholder:"xapp-...",value:J.appToken??"",onChange:ot=>K(lt=>({...lt,appToken:ot}))}),l.jsx(on,{label:"Channel ID",placeholder:"C0123456789",value:J.channelId??"",onChange:ot=>K(lt=>({...lt,channelId:ot})),isSecret:!1})]}):l.jsxs(l.Fragment,{children:[l.jsx(on,{label:"Bot Token",placeholder:"Paste your bot token from Discord Developer Portal",value:J.botToken??"",onChange:ot=>K(lt=>({...lt,botToken:ot}))}),l.jsx(on,{label:"Channel ID",placeholder:"Right-click channel → Copy Channel ID",value:J.channelId??"",onChange:ot=>K(lt=>({...lt,channelId:ot})),isSecret:!1})]}),Z&&l.jsxs("div",{style:{padding:"8px 12px",borderRadius:8,fontSize:12,background:Z.ok?"color-mix(in srgb, var(--green) 8%, transparent)":"color-mix(in srgb, var(--red) 8%, transparent)",color:Z.ok?"var(--green)":"var(--red)",border:`1px solid ${Z.ok?"color-mix(in srgb, var(--green) 20%, transparent)":"color-mix(in srgb, var(--red) 20%, transparent)"}`,display:"flex",alignItems:"center",gap:8},children:[Z.ok?l.jsx(Ii,{size:14}):l.jsx(Rn,{size:14}),Z.msg]}),l.jsxs("div",{style:{display:"flex",gap:8,marginTop:4},children:[l.jsx("button",{onClick:$n,disabled:he||!J.botToken,style:{padding:"8px 16px",borderRadius:8,fontSize:12,fontWeight:500,border:"1px solid var(--border)",background:"var(--bg-hover)",color:"var(--text-primary)",cursor:he?"wait":"pointer",fontFamily:"inherit",opacity:he||!J.botToken?.5:1},children:he?"Testing...":"Test Connection"}),l.jsx("button",{onClick:vt,disabled:S||!J.botToken,style:{padding:"8px 16px",borderRadius:8,fontSize:12,fontWeight:600,border:"none",background:Ke,color:"#fff",cursor:S?"wait":"pointer",fontFamily:"inherit",opacity:S||!J.botToken?.5:1},children:S?"Saving...":"Save & Connect"}),l.jsx("button",{onClick:wn,style:{padding:"8px 16px",borderRadius:8,fontSize:12,fontWeight:500,border:"1px solid var(--border)",background:"transparent",color:"var(--text-muted)",cursor:"pointer",fontFamily:"inherit"},children:"Cancel"})]})]})]})}function Li(){return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[l.jsxs("div",{style:{display:"flex",gap:8},children:[l.jsxs("div",{style:{flex:"1 1 140px",padding:"14px 16px",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8},children:[l.jsx("div",{style:{fontSize:22,fontWeight:700,color:"var(--blue)",lineHeight:1,fontVariantNumeric:"tabular-nums"},children:Ee}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"Active Channels"})]}),l.jsxs("div",{style:{flex:"1 1 140px",padding:"14px 16px",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8},children:[l.jsx("div",{style:{fontSize:22,fontWeight:700,color:"var(--text-muted)",lineHeight:1,fontVariantNumeric:"tabular-nums"},children:3-Ee}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"Not Configured"})]})]}),l.jsxs("div",{children:[l.jsx(Xn,{title:"Communication Channels"}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[Tt("telegram",E==null?void 0:E.telegram,"Telegram","/icons/integrations/telegram.svg",l.jsx(vh,{size:18}),"var(--blue)"),Tt("slack",E==null?void 0:E.slack,"Slack","/icons/integrations/slack.svg",l.jsx(np,{size:18}),"var(--purple)"),Tt("discord",E==null?void 0:E.discord,"Discord","/icons/integrations/discord.svg",l.jsx(My,{size:18}),"#5865F2")]})]})]})}function Pi($){if(!D)return;if(ge===$){je(null);return}const ue={searxng:{url:D.searxng.url},sonarqube:{hostUrl:D.sonarqube.hostUrl,token:"",projectBaseKey:D.sonarqube.projectBaseKey,scannerImage:D.sonarqube.scannerImage},gitleaks:{image:D.gitleaks.image},semgrep:{image:D.semgrep.image},trivy:{image:D.trivy.image}};H(ue[$]??{}),je($)}function Jn($,ue,ve,He,qe,Ke,et,dt,dn){const ot=ge===$,lt=et&&dt,Lt=ye,tr=(It,Bn)=>H(No=>({...No,[It]:Bn})),Do={gitleaks:"zricethezav/gitleaks:latest",semgrep:"semgrep/semgrep",trivy:"aquasec/trivy:latest"};return l.jsxs("div",{style:{padding:"18px 20px",borderRadius:12,background:"var(--bg-card)",border:`1px solid ${ot?qe:"var(--border)"}`,transition:"border-color 0.15s"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,marginBottom:ot?16:0},children:[l.jsx("div",{style:{width:42,height:42,borderRadius:10,background:lt?`color-mix(in srgb, ${qe} 10%, transparent)`:"var(--bg-tertiary)",display:"flex",alignItems:"center",justifyContent:"center",color:lt?qe:"var(--text-muted)",flexShrink:0},children:l.jsx(sh,{src:ve,fallback:He,size:22})}),l.jsxs("div",{style:{flex:1,minWidth:0},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[l.jsx("span",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)"},children:ue}),l.jsx("span",{style:{fontSize:9,fontWeight:600,padding:"2px 6px",borderRadius:4,background:`color-mix(in srgb, ${qe} 10%, transparent)`,color:qe,letterSpacing:"0.04em"},children:Ke})]}),!ot&&l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:2,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:dn})]}),l.jsx("div",{style:{display:"flex",alignItems:"center",gap:8},children:l.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"4px 10px",borderRadius:6,background:lt?"color-mix(in srgb, var(--green) 10%, transparent)":"var(--bg-tertiary)",color:lt?"var(--green)":"var(--text-muted)",border:`1px solid ${lt?"color-mix(in srgb, var(--green) 18%, transparent)":"var(--border)"}`,flexShrink:0,letterSpacing:"0.04em",cursor:"pointer"},onClick:It=>{It.stopPropagation(),W($,dt)},children:dt?"ENABLED":"DISABLED"})})]}),!ot&&l.jsxs("div",{style:{display:"flex",gap:8,marginTop:12},children:[l.jsx("button",{onClick:()=>Pi($),style:{padding:"7px 16px",borderRadius:8,fontSize:12,fontWeight:500,border:"1px solid var(--border)",background:"var(--bg-hover)",color:"var(--text-primary)",cursor:"pointer",fontFamily:"inherit"},children:"Configure"}),dt&&l.jsx("button",{onClick:()=>W($,!0),style:{padding:"7px 16px",borderRadius:8,fontSize:12,fontWeight:500,border:"1px solid color-mix(in srgb, var(--red) 30%, transparent)",background:"color-mix(in srgb, var(--red) 8%, transparent)",color:"var(--red)",cursor:"pointer",fontFamily:"inherit"},children:"Disable"}),!dt&&l.jsx("button",{onClick:()=>W($,!1),style:{padding:"7px 16px",borderRadius:8,fontSize:12,fontWeight:500,border:"1px solid color-mix(in srgb, var(--green) 30%, transparent)",background:"color-mix(in srgb, var(--green) 8%, transparent)",color:"var(--green)",cursor:"pointer",fontFamily:"inherit"},children:"Enable"})]}),ot&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12},children:[$==="searxng"&&l.jsx(on,{label:"SearXNG URL",placeholder:"http://localhost:8080",value:Lt.url??"",onChange:It=>tr("url",It),isSecret:!1}),$==="sonarqube"&&l.jsxs(l.Fragment,{children:[l.jsx(on,{label:"Host URL",placeholder:"http://localhost:9000",value:Lt.hostUrl??"",onChange:It=>tr("hostUrl",It),isSecret:!1}),l.jsx(on,{label:"Token",placeholder:"squ_...",value:Lt.token??"",onChange:It=>tr("token",It)}),l.jsx(on,{label:"Project Base Key",placeholder:"vec",value:Lt.projectBaseKey??"",onChange:It=>tr("projectBaseKey",It),isSecret:!1}),l.jsx(on,{label:"Scanner Docker Image",placeholder:"sonarsource/sonar-scanner-cli:latest",value:Lt.scannerImage??"",onChange:It=>tr("scannerImage",It),isSecret:!1})]}),($==="gitleaks"||$==="semgrep"||$==="trivy")&&l.jsx(on,{label:"Docker Image",placeholder:Do[$]??"",value:Lt.image??"",onChange:It=>tr("image",It),isSecret:!1}),l.jsxs("div",{style:{display:"flex",gap:8,marginTop:4},children:[l.jsx("button",{onClick:()=>je(null),style:{padding:"8px 16px",borderRadius:8,fontSize:12,fontWeight:500,border:"1px solid var(--border)",background:"var(--bg-hover)",color:"var(--text-primary)",cursor:"pointer",fontFamily:"inherit"},children:"Cancel"}),l.jsx("button",{disabled:pe,onClick:()=>{$==="searxng"?_t("searxng",{url:Lt.url||"",enabled:!0}):$==="sonarqube"?_t("sonarqube",{hostUrl:Lt.hostUrl||"http://localhost:9000",token:Lt.token||"",projectBaseKey:Lt.projectBaseKey||"vec",scannerImage:Lt.scannerImage||"sonarsource/sonar-scanner-cli:latest",enabled:!0}):_t($,{image:Lt.image||Do[$]||"",enabled:!0})},style:{padding:"8px 16px",borderRadius:8,fontSize:12,fontWeight:600,border:"none",background:qe,color:"#fff",cursor:pe?"wait":"pointer",fontFamily:"inherit",opacity:pe?.5:1},children:pe?"Saving...":"Save"})]})]})]})}function er(){const $="/icons/integrations",ue=[{title:"Search",color:"var(--green)",items:[{key:"searxng",name:"SearXNG",logoUrl:`${$}/searxng.svg`,fallbackIcon:l.jsx(Wr,{size:16}),configured:(D==null?void 0:D.searxng.configured)??!1,enabled:(D==null?void 0:D.searxng.enabled)??!1,detail:D!=null&&D.searxng.configured?D.searxng.url:"Not configured",color:"var(--green)",subtitle:"WEB SEARCH"}]},{title:"Code Quality",color:"var(--blue)",items:[{key:"sonarqube",name:"SonarQube",logoUrl:`${$}/sonarqube.svg`,fallbackIcon:l.jsx(ua,{size:16}),configured:(D==null?void 0:D.sonarqube.configured)??!1,enabled:(D==null?void 0:D.sonarqube.enabled)??!1,detail:D!=null&&D.sonarqube.configured?`${D.sonarqube.hostUrl} (${D.sonarqube.projectBaseKey})`:"Not configured",color:"var(--blue)",subtitle:"ANALYSIS"}]},{title:"Security Scanners",color:"var(--red)",items:[{key:"gitleaks",name:"Gitleaks",logoUrl:`${$}/gitleaks.svg`,fallbackIcon:l.jsx(eu,{size:16}),configured:!0,enabled:(D==null?void 0:D.gitleaks.enabled)??!0,detail:`Image: ${(D==null?void 0:D.gitleaks.image)??"zricethezav/gitleaks:latest"}`,color:"var(--red)",subtitle:"SECRETS"},{key:"semgrep",name:"Semgrep",logoUrl:`${$}/semgrep.svg`,fallbackIcon:l.jsx(eu,{size:16}),configured:!0,enabled:(D==null?void 0:D.semgrep.enabled)??!0,detail:`Image: ${(D==null?void 0:D.semgrep.image)??"semgrep/semgrep"}`,color:"var(--orange)",subtitle:"SAST"},{key:"trivy",name:"Trivy",logoUrl:`${$}/trivy.svg`,fallbackIcon:l.jsx(zu,{size:16}),configured:!0,enabled:(D==null?void 0:D.trivy.enabled)??!0,detail:`Image: ${(D==null?void 0:D.trivy.image)??"aquasec/trivy:latest"}`,color:"var(--purple)",subtitle:"SCA"}]}],ve=ue.flatMap(Ke=>Ke.items),He=ve.filter(Ke=>Ke.configured&&Ke.enabled).length,qe=(D==null?void 0:D.postTaskScansEnabled)??!1;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[Te&&!Te.running&&l.jsxs("div",{style:{padding:"14px 18px",borderRadius:10,background:Te.installed?"rgba(245,158,11,0.08)":"rgba(239,68,68,0.08)",border:`1px solid ${Te.installed?"rgba(245,158,11,0.2)":"rgba(239,68,68,0.2)"}`,display:"flex",alignItems:"center",gap:12},children:[l.jsx("div",{style:{width:32,height:32,borderRadius:8,background:Te.installed?"rgba(245,158,11,0.12)":"rgba(239,68,68,0.12)",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:Te.installed?"var(--orange)":"var(--red)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"}),l.jsx("line",{x1:"12",y1:"9",x2:"12",y2:"13"}),l.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}),l.jsxs("div",{style:{flex:1},children:[l.jsx("div",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)"},children:Te.installed?"Docker Not Running":"Docker Not Installed"}),l.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",marginTop:2},children:Te.installed?"Docker is installed but the daemon isn't running. Start Docker to use scanners.":"Security scanners (Gitleaks, Semgrep, Trivy, SonarQube) require Docker to run."})]}),!Te.installed&&l.jsx("a",{href:"https://docs.docker.com/get-docker/",target:"_blank",rel:"noopener noreferrer",style:{padding:"6px 14px",borderRadius:6,fontSize:12,fontWeight:600,background:"var(--accent)",color:"#fff",textDecoration:"none",flexShrink:0,whiteSpace:"nowrap"},children:"Get Docker"})]}),l.jsxs("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[[{label:"Active",value:String(He),color:"var(--green)"},{label:"Total",value:String(ve.length),color:"var(--orange)"}].map(Ke=>l.jsxs("div",{style:{flex:"1 1 120px",padding:"14px 16px",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8},children:[l.jsx("div",{style:{fontSize:22,fontWeight:700,color:Ke.color,lineHeight:1,fontVariantNumeric:"tabular-nums"},children:Ke.value}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:Ke.label})]},Ke.label)),l.jsxs("div",{onClick:async()=>{fe(!0);try{const Ke=await st("/api/integration-config",{postTaskScansEnabled:!qe});Ke!=null&&Ke.ok&&(C(Ke.config),De(`Post-task scans ${qe?"disabled":"enabled"}`))}catch{De("Toggle failed")}finally{fe(!1)}},style:{flex:"1 1 120px",padding:"14px 16px",background:"var(--bg-card)",border:`1px solid ${qe?"color-mix(in srgb, var(--green) 25%, transparent)":"var(--border)"}`,borderRadius:8,cursor:"pointer",transition:"border-color 0.15s"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[l.jsx("div",{style:{fontSize:22,fontWeight:700,color:qe?"var(--green)":"var(--text-muted)",lineHeight:1},children:qe?"ON":"OFF"}),l.jsx("div",{style:{width:7,height:7,borderRadius:"50%",background:qe?"var(--green)":"var(--text-muted)",boxShadow:qe?"0 0 6px var(--green)":"none",opacity:qe?1:.4}})]}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:"Post-Task Scans"})]})]}),ue.map(Ke=>l.jsxs("div",{children:[l.jsx(Xn,{title:Ke.title,count:Ke.items.length}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(340px, 1fr))",gap:10},children:Ke.items.map(et=>l.jsx("div",{children:Jn(et.key,et.name,et.logoUrl,et.fallbackIcon,et.color,et.subtitle,et.configured,et.enabled,et.detail)},et.key))})]},Ke.title))]})}function Ao(){return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:24},children:[l.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[{label:"Configured",value:String(ke.length),color:"var(--blue)"},{label:"Connected",value:String(Ie),color:"var(--green)"},{label:"Tools Available",value:String(N.servers.reduce(($,ue)=>$+ue.tools.length,0)),color:"var(--purple)"},{label:"Directory",value:String(Ci.length),color:"var(--text-muted)"}].map($=>l.jsxs("div",{style:{flex:"1 1 100px",padding:"14px 16px",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8},children:[l.jsx("div",{style:{fontSize:22,fontWeight:700,color:$.color,lineHeight:1,fontVariantNumeric:"tabular-nums"},children:$.value}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:4},children:$.label})]},$.label))}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[l.jsx("div",{style:{flex:1}}),l.jsxs("button",{onClick:Ge,style:Si,title:"Refresh status",children:[l.jsx(x1,{size:12})," Refresh"]}),T&&l.jsxs("button",{onClick:Ne,disabled:U,style:{display:"flex",alignItems:"center",gap:5,padding:"6px 14px",borderRadius:7,border:"none",background:"var(--accent)",color:"#fff",cursor:U?"wait":"pointer",fontSize:11,fontWeight:600,fontFamily:"inherit",opacity:U?.7:1,transition:"opacity 0.12s"},children:[l.jsx(bh,{size:11})," ",U?"Saving...":"Save Changes"]})]}),l.jsx(Aj,{activeServerNames:ke,mcpConfig:j,mcpStatus:N,onAdd:($,ue)=>{const ve={};for(const He of Object.keys($.envVars))ve[He]=(ue==null?void 0:ue[He])??"";M(He=>{const qe=Xl(He);return qe.mcpServers[$.id]={command:$.command,args:[...$.args],env:ve},qe}),q(!0),De(`Added "${$.name}" — click Save to apply`)},onRemove:$=>{te($)},onAddCustom:($,ue)=>{M(ve=>{const He=Xl(ve);return He.mcpServers[$]=ue,He}),me(ve=>({...ve,[$]:!0})),q(!0),De(`Added "${$}" — click Save to apply`)},onUpdateCustom:($,ue)=>{ee($,ue)},onRemoveCustomEnv:($,ue)=>{Oe($,ue)},onAddCustomEnv:$=>{ze($)},expanded:oe,onToggleExpand:$=>{me(ue=>({...ue,[$]:!ue[$]}))}})]})}const Lo={general:pt,models:bn,channels:Li,integrations:er,mcp:Ao},Po={general:null,models:ae>0?String(ae):null,channels:Ee>0?String(Ee):null,integrations:Pe>0?String(Pe):null,mcp:ke.length>0?String(ke.length):null};return l.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",overflow:"hidden"},children:[l.jsxs("div",{className:"page-header",style:{padding:"24px 28px 16px"},children:[l.jsx("h1",{className:"page-title",children:"Settings"}),l.jsx("div",{className:"page-subtitle",children:"System configuration, integrations & MCP servers"})]}),l.jsxs("div",{style:{flex:1,display:"flex",overflow:"hidden"},children:[l.jsx("div",{style:{width:190,flexShrink:0,padding:"12px 12px 20px",borderRight:"1px solid var(--border)",display:"flex",flexDirection:"column",gap:2,overflow:"auto"},children:zj.map($=>{const ue=t===$.key,ve=Po[$.key];return l.jsxs("button",{"data-tour-id":`settings-${$.key}`,onClick:()=>i($.key),style:{display:"flex",alignItems:"center",gap:10,padding:"9px 12px",borderRadius:7,border:"none",background:ue?"var(--bg-hover)":"transparent",color:ue?"var(--text-primary)":"var(--text-secondary)",fontSize:13,fontWeight:ue?500:400,cursor:"pointer",fontFamily:"inherit",textAlign:"left",width:"100%",transition:"background 0.08s, color 0.08s"},children:[l.jsx("span",{style:{color:ue?$.color:"var(--text-muted)",display:"flex",transition:"color 0.08s"},children:$.icon}),l.jsx("span",{style:{flex:1},children:$.label}),ve&&l.jsx("span",{style:{fontSize:10,fontWeight:600,padding:"1px 6px",borderRadius:4,background:ue?`color-mix(in srgb, ${$.color} 12%, transparent)`:"var(--bg-tertiary)",color:ue?$.color:"var(--text-muted)",fontVariantNumeric:"tabular-nums",transition:"background 0.08s, color 0.08s"},children:ve})]},$.key)})}),l.jsx("div",{style:{flex:1,overflow:"auto",padding:"20px 28px 28px"},children:Lo[t]()})]}),h&&s&&(()=>{const $=s.providers.find(ue=>ue.id===h);return $?l.jsx(Ij,{provider:$,onClose:()=>{g(null),x("")},onSave:ue=>Et($.id,ue),saving:v}):null})(),P&&l.jsx("div",{style:{position:"fixed",bottom:24,right:24,background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:8,padding:"10px 18px",fontSize:13,color:"var(--text-primary)",boxShadow:"var(--shadow-lg)",zIndex:9999,animation:"fade-in 0.12s ease-out"},children:P})]})}function uh({provider:t,onClick:i}){return l.jsxs("button",{onClick:i,style:{display:"flex",alignItems:"center",gap:10,padding:"12px 14px",borderRadius:10,width:"100%",background:"var(--bg-card)",border:"1px solid var(--border)",cursor:"pointer",fontFamily:"inherit",textAlign:"left",transition:"border-color 0.12s, background 0.12s"},onMouseEnter:r=>{r.currentTarget.style.borderColor="var(--accent)",r.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:r=>{r.currentTarget.style.borderColor="var(--border)",r.currentTarget.style.background="var(--bg-card)"},children:[l.jsx("img",{src:t.iconUrl,alt:t.name,style:{width:28,height:28,flexShrink:0,borderRadius:6,filter:"var(--icon-filter, none)"},onError:r=>{r.target.style.display="none"}}),l.jsxs("div",{style:{flex:1,minWidth:0},children:[l.jsx("div",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)"},children:t.name}),l.jsxs("div",{style:{fontSize:10,color:"var(--text-muted)",fontFamily:"monospace"},children:[t.models.length," model",t.models.length!==1?"s":""]})]}),l.jsx("div",{style:{width:8,height:8,borderRadius:"50%",flexShrink:0,background:t.configured?"var(--green)":"var(--text-muted)",opacity:t.configured?1:.3}})]})}function Ij({provider:t,onClose:i,onSave:r,saving:a}){const[s,c]=I.useState(""),[d,f]=I.useState(!1);return l.jsxs(l.Fragment,{children:[l.jsx("div",{onClick:i,style:{position:"fixed",inset:0,zIndex:100,background:"rgba(0,0,0,0.6)",backdropFilter:"blur(8px)",WebkitBackdropFilter:"blur(8px)"}}),l.jsxs("div",{style:{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",zIndex:101,background:"var(--bg-secondary)",border:"1px solid var(--border)",borderRadius:16,width:440,maxWidth:"92vw",boxShadow:"0 24px 80px rgba(0,0,0,0.5), 0 0 0 1px var(--border)",overflow:"hidden",animation:"fade-in 0.12s ease-out"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"18px 22px 14px",borderBottom:"1px solid var(--border)"},children:[l.jsx("img",{src:t.iconUrl,alt:t.name,style:{width:34,height:34,borderRadius:8,filter:"var(--icon-filter, none)"},onError:h=>{h.target.style.display="none"}}),l.jsxs("div",{style:{flex:1},children:[l.jsx("div",{style:{fontSize:15,fontWeight:600,color:"var(--text-primary)"},children:t.name}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",marginTop:1},children:t.configured?"Update API key":"Configure API key"})]}),l.jsx("button",{onClick:i,style:{display:"flex",alignItems:"center",justifyContent:"center",width:28,height:28,border:"1px solid var(--border)",borderRadius:8,background:"var(--bg-tertiary)",color:"var(--text-muted)",cursor:"pointer",padding:0,transition:"all 0.12s"},onMouseEnter:h=>{h.currentTarget.style.background="var(--bg-hover)",h.currentTarget.style.color="var(--text-primary)"},onMouseLeave:h=>{h.currentTarget.style.background="var(--bg-tertiary)",h.currentTarget.style.color="var(--text-muted)"},children:l.jsx(Rn,{size:14})})]}),l.jsxs("div",{style:{padding:"18px 22px 22px",display:"flex",flexDirection:"column",gap:16},children:[l.jsxs("div",{style:{display:"flex",gap:12,flexWrap:"wrap"},children:[l.jsxs("div",{style:{flex:"1 1 100px",padding:"10px 14px",borderRadius:8,background:"var(--bg-card)",border:"1px solid var(--border)"},children:[l.jsx("div",{style:{fontSize:18,fontWeight:700,color:"var(--purple)",lineHeight:1,fontVariantNumeric:"tabular-nums"},children:t.models.length}),l.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:3},children:"Models"})]}),l.jsxs("div",{style:{flex:"1 1 100px",padding:"10px 14px",borderRadius:8,background:"var(--bg-card)",border:"1px solid var(--border)"},children:[l.jsx("div",{style:{fontSize:12,fontWeight:600,lineHeight:1.2,color:t.configured?"var(--green)":"var(--text-muted)"},children:t.configured?"Active":"Not Set"}),l.jsx("div",{style:{fontSize:10,color:"var(--text-muted)",marginTop:3},children:"Status"})]})]}),t.models.length>0&&l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:11,fontWeight:600,color:"var(--text-muted)",textTransform:"uppercase",letterSpacing:"0.04em",marginBottom:6},children:"Available Models"}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4,maxHeight:80,overflowY:"auto"},children:t.models.map(h=>l.jsx("span",{style:{fontSize:10,padding:"3px 8px",borderRadius:5,background:"var(--bg-tertiary)",color:"var(--text-secondary)",fontFamily:"monospace",border:"1px solid var(--border)"},children:h.split("/").pop()},h))})]}),l.jsxs("div",{children:[l.jsxs("label",{style:{fontSize:12,fontWeight:500,color:"var(--text-secondary)",marginBottom:6,display:"block"},children:["API Key",l.jsx("span",{style:{fontWeight:400,marginLeft:6,opacity:.6,fontFamily:"monospace",fontSize:11},children:t.envKey})]}),l.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[l.jsx("input",{value:s,onChange:h=>c(h.target.value),placeholder:`Paste your ${t.name} API key...`,type:d?"text":"password",autoFocus:!0,style:{...yn,flex:1,fontSize:13,fontFamily:"monospace",padding:"10px 12px"},onKeyDown:h=>h.key==="Enter"&&s.trim()&&r(s)}),l.jsx("button",{onClick:()=>f(h=>!h),style:{display:"flex",alignItems:"center",justifyContent:"center",width:36,height:36,borderRadius:8,flexShrink:0,border:"1px solid var(--border)",background:"var(--bg-tertiary)",color:d?"var(--accent)":"var(--text-muted)",cursor:"pointer",padding:0,transition:"color 0.12s"},title:d?"Hide key":"Show key",children:l.jsx(ua,{size:14})})]})]}),l.jsxs("div",{style:{display:"flex",gap:8,justifyContent:"flex-end",marginTop:4},children:[l.jsx("button",{onClick:i,style:{...Si,padding:"8px 16px",fontSize:12,borderRadius:8},children:"Cancel"}),l.jsxs("button",{onClick:()=>s.trim()&&r(s),disabled:!s.trim()||a,style:{display:"flex",alignItems:"center",gap:6,padding:"8px 20px",borderRadius:8,border:"none",background:s.trim()?"var(--accent)":"var(--bg-tertiary)",color:s.trim()?"#fff":"var(--text-muted)",fontSize:12,fontWeight:600,cursor:s.trim()?"pointer":"default",fontFamily:"inherit",opacity:a?.6:1,transition:"opacity 0.12s, background 0.12s"},children:[l.jsx(bh,{size:13})," ",a?"Saving...":"Save Key"]})]})]})]})]})}const Rj=new Set(Ci.map(t=>t.id)),Mj=Array.from(new Set(Ci.map(t=>t.category)));function Aj({activeServerNames:t,mcpConfig:i,mcpStatus:r,onAdd:a,onRemove:s,onAddCustom:c,onUpdateCustom:d,onRemoveCustomEnv:f,onAddCustomEnv:h,expanded:g,onToggleExpand:y}){const[x,v]=I.useState(""),[k,j]=I.useState("all"),[M,N]=I.useState(!1),[_,U]=I.useState(null),[w,T]=I.useState({}),[q,P]=I.useState(!1),[X,oe]=I.useState(""),[me,E]=I.useState("npx"),[Q,Y]=I.useState(""),[de,J]=I.useState(""),[K,he]=I.useState(""),[le,Z]=I.useState({}),G=t.filter(H=>!Rj.has(H)),S=Ci.filter(H=>t.includes(H.id)),A=x.toLowerCase(),V=Ci.filter(H=>!(t.includes(H.id)||k!=="all"&&H.category!==k||A&&!H.name.toLowerCase().includes(A)&&!H.description.toLowerCase().includes(A)&&!H.tools.some(pe=>pe.toLowerCase().includes(A)))),C=[{value:"all",label:"All Categories"},...Mj.map(H=>({value:H,label:wu[H].label}))];function ge(H){if(Object.keys(H.envVars).length>0){U(H);const fe={};for(const Te of Object.keys(H.envVars))fe[Te]="";T(fe)}else a(H)}function je(){_&&(a(_,w),U(null),T({}))}function ye(){const H=X.trim().toLowerCase().replace(/[^a-z0-9_-]/g,"");H&&(t.includes(H)||(c(H,{command:me.trim(),args:Q.split(`
491
+ `).map(pe=>pe.trim()).filter(Boolean),env:{...le}}),P(!1),oe(""),E("npx"),Y(""),Z({})))}return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:20},children:[(S.length>0||G.length>0)&&l.jsxs("div",{children:[l.jsx(Xn,{title:"Active Servers",count:t.length}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[S.map(H=>{const pe=r.servers.find(Te=>Te.name===H.id),fe=wu[H.category];return l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",borderRadius:8,background:"var(--bg-card)",border:"1px solid var(--border)"},children:[l.jsx("div",{style:{width:7,height:7,borderRadius:"50%",flexShrink:0,background:pe!=null&&pe.connected?"var(--green)":"var(--text-muted)",opacity:pe!=null&&pe.connected?1:.35}}),l.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)",flex:1},children:H.name}),l.jsx("span",{style:{fontSize:9,fontWeight:600,padding:"2px 6px",borderRadius:4,background:`color-mix(in srgb, ${fe.color} 10%, transparent)`,color:fe.color},children:fe.label}),(pe==null?void 0:pe.connected)&&l.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)",fontVariantNumeric:"tabular-nums"},children:[pe.tools.length," tool",pe.tools.length!==1?"s":""]}),l.jsx("button",{onClick:()=>s(H.id),style:{display:"flex",padding:4,border:"none",borderRadius:4,background:"transparent",color:"var(--text-muted)",cursor:"pointer",transition:"color 0.08s"},onMouseEnter:Te=>{Te.currentTarget.style.color="var(--red)"},onMouseLeave:Te=>{Te.currentTarget.style.color="var(--text-muted)"},title:"Remove",children:l.jsx(Sr,{size:12})})]},H.id)}),G.map(H=>{const pe=i.mcpServers[H];if(!pe)return null;const fe=r.servers.find(Fe=>Fe.name===H),Te=g[H]??!1;return l.jsxs("div",{style:{borderRadius:8,overflow:"hidden",background:"var(--bg-card)",border:"1px solid var(--border)"},children:[l.jsxs("div",{onClick:()=>y(H),style:{display:"flex",alignItems:"center",gap:12,padding:"10px 14px",cursor:"pointer",borderBottom:Te?"1px solid var(--border)":"none"},children:[Te?l.jsx(Ei,{size:12,style:{color:"var(--text-muted)"}}):l.jsx(ep,{size:12,style:{color:"var(--text-muted)"}}),l.jsx("div",{style:{width:7,height:7,borderRadius:"50%",flexShrink:0,background:fe!=null&&fe.connected?"var(--green)":"var(--text-muted)",opacity:fe!=null&&fe.connected?1:.35}}),l.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)",flex:1},children:H}),l.jsx("span",{style:{fontSize:9,fontWeight:600,padding:"2px 6px",borderRadius:4,background:"var(--bg-tertiary)",color:"var(--text-muted)"},children:"CUSTOM"}),(fe==null?void 0:fe.connected)&&l.jsxs("span",{style:{fontSize:11,color:"var(--text-muted)"},children:[fe.tools.length," tool",fe.tools.length!==1?"s":""]}),l.jsx("button",{onClick:Fe=>{Fe.stopPropagation(),s(H)},title:"Remove",style:{display:"flex",padding:4,border:"none",borderRadius:4,background:"transparent",color:"var(--text-muted)",cursor:"pointer",transition:"color 0.08s"},onMouseEnter:Fe=>{Fe.currentTarget.style.color="var(--red)"},onMouseLeave:Fe=>{Fe.currentTarget.style.color="var(--text-muted)"},children:l.jsx(Sr,{size:12})})]}),Te&&l.jsxs("div",{style:{padding:14,display:"flex",flexDirection:"column",gap:12},children:[l.jsx(wo,{label:"Command",hint:"e.g. npx, node, python",children:l.jsx("input",{value:pe.command,onChange:Fe=>d(H,{command:Fe.target.value}),placeholder:"npx",style:yn})}),l.jsx(wo,{label:"Arguments",hint:"One per line",children:l.jsx("textarea",{value:(pe.args??[]).join(`
492
+ `),onChange:Fe=>d(H,{args:Fe.target.value.split(`
493
+ `)}),placeholder:`-y
494
+ @your/mcp-package
495
+ --flag`,rows:3,style:{...yn,resize:"vertical",fontFamily:"monospace",fontSize:12,lineHeight:1.6}})}),l.jsxs("div",{children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:6},children:[l.jsx("label",{style:na,children:"Environment Variables"}),l.jsxs("button",{onClick:()=>h(H),style:Si,children:[l.jsx(Or,{size:12})," Add"]})]}),Object.keys(pe.env??{}).length===0?l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",fontStyle:"italic"},children:"No environment variables"}):l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:Object.entries(pe.env??{}).map(([Fe,Ze])=>l.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[l.jsx("span",{style:{fontSize:12,fontFamily:"monospace",color:"var(--text-secondary)",minWidth:100,flexShrink:0},children:Fe}),l.jsx("input",{value:Ze,onChange:Ge=>d(H,{env:{...pe.env,[Fe]:Ge.target.value}}),placeholder:"value",style:{...yn,flex:1}}),l.jsx("button",{onClick:()=>f(H,Fe),style:{display:"flex",padding:4,border:"none",background:"transparent",color:"var(--text-muted)",cursor:"pointer",borderRadius:4,transition:"color 0.08s"},onMouseEnter:Ge=>{Ge.currentTarget.style.color="var(--red)"},onMouseLeave:Ge=>{Ge.currentTarget.style.color="var(--text-muted)"},children:l.jsx(Sr,{size:13})})]},Fe))})]}),(fe==null?void 0:fe.connected)&&fe.tools.length>0&&l.jsxs("div",{children:[l.jsx("label",{style:na,children:"Discovered Tools"}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginTop:4},children:fe.tools.map(Fe=>l.jsx("span",{style:{fontSize:11,padding:"2px 8px",borderRadius:4,background:"var(--bg-tertiary)",color:"var(--text-secondary)",fontFamily:"monospace"},children:Fe},Fe))})]})]})]},H)})]})]}),l.jsxs("div",{children:[l.jsxs("button",{onClick:()=>N(H=>!H),style:{display:"flex",alignItems:"center",gap:8,width:"100%",padding:"10px 14px",borderRadius:8,border:"1px solid var(--border)",background:M?"var(--bg-card)":"transparent",color:"var(--text-primary)",cursor:"pointer",fontSize:13,fontWeight:500,fontFamily:"inherit",transition:"background 0.1s, border-color 0.1s"},children:[M?l.jsx(Ei,{size:14,style:{color:"var(--text-muted)"}}):l.jsx(ep,{size:14,style:{color:"var(--text-muted)"}}),l.jsx(rp,{size:14,style:{color:"var(--green)"}}),l.jsx("span",{style:{flex:1,textAlign:"left"},children:"Browse Server Directory"}),l.jsxs("span",{style:{fontSize:10,fontWeight:600,padding:"2px 8px",borderRadius:4,background:"var(--bg-tertiary)",color:"var(--text-muted)",fontVariantNumeric:"tabular-nums"},children:[Ci.length," available"]})]}),M&&l.jsxs("div",{style:{marginTop:10,animation:"fade-in 0.12s ease-out"},children:[l.jsxs("div",{style:{display:"flex",gap:8,marginBottom:12,alignItems:"center"},children:[l.jsxs("div",{style:{position:"relative",flex:1,minWidth:160},children:[l.jsx(Wr,{size:13,style:{position:"absolute",left:10,top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)",pointerEvents:"none"}}),l.jsx("input",{value:x,onChange:H=>v(H.target.value),placeholder:"Search servers...",style:{...yn,paddingLeft:30}})]}),l.jsx("div",{style:{width:160,flexShrink:0},children:l.jsx(Ti,{value:k,onChange:H=>j(H),options:C,placeholder:"Category",alignRight:!0})})]}),_&&l.jsxs("div",{style:{background:"var(--bg-card)",border:"1px solid var(--accent)",borderRadius:8,padding:14,marginBottom:12,animation:"fade-in 0.12s ease-out"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:10},children:[l.jsx(rp,{size:14,style:{color:"var(--accent)"}}),l.jsxs("div",{style:{flex:1},children:[l.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)"},children:_.name}),l.jsx("span",{style:{fontSize:11,color:"var(--text-muted)",marginLeft:8},children:"Set environment variables"})]}),l.jsx("button",{onClick:()=>{U(null),T({})},style:{display:"flex",padding:4,border:"none",borderRadius:4,background:"transparent",color:"var(--text-muted)",cursor:"pointer"},children:l.jsx(Rn,{size:14})})]}),l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:Object.entries(_.envVars).map(([H,pe])=>l.jsxs("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[l.jsx("span",{style:{fontSize:11,fontFamily:"monospace",color:"var(--text-secondary)",minWidth:130,flexShrink:0},children:H}),l.jsx("input",{value:w[H]??"",onChange:fe=>T(Te=>({...Te,[H]:fe.target.value})),placeholder:pe,type:"password",style:{...yn,flex:1,fontFamily:"monospace",fontSize:12},onKeyDown:fe=>fe.key==="Enter"&&je()})]},H))}),l.jsxs("div",{style:{display:"flex",gap:8,marginTop:10,justifyContent:"flex-end"},children:[l.jsx("button",{onClick:()=>{U(null),T({})},style:Si,children:"Cancel"}),l.jsxs("button",{onClick:je,style:{display:"flex",alignItems:"center",gap:5,padding:"6px 14px",borderRadius:7,border:"none",background:"var(--accent)",color:"#fff",cursor:"pointer",fontSize:11,fontWeight:600,fontFamily:"inherit"},children:[l.jsx(Or,{size:12})," Add"]})]})]}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(260px, 1fr))",gap:8},children:V.map(H=>{const pe=wu[H.category];return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:6,padding:"12px 14px",borderRadius:8,background:"var(--bg-card)",border:"1px solid var(--border)",transition:"border-color 0.12s"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[l.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)",flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:H.name}),l.jsx("span",{style:{fontSize:9,fontWeight:600,padding:"2px 6px",borderRadius:4,background:`color-mix(in srgb, ${pe.color} 10%, transparent)`,color:pe.color,flexShrink:0},children:pe.label})]}),l.jsx("div",{style:{fontSize:11,color:"var(--text-muted)",lineHeight:1.4,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:H.description}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,marginTop:"auto"},children:[l.jsxs("span",{style:{fontSize:10,color:"var(--text-muted)",fontFamily:"monospace",flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[H.tools.slice(0,3).join(", "),H.tools.length>3?` +${H.tools.length-3}`:""]}),Object.keys(H.envVars).length>0&&l.jsx("span",{style:{fontSize:9,padding:"2px 5px",borderRadius:3,background:"var(--yellow-bg)",color:"var(--yellow)",flexShrink:0},children:"KEY"}),H.docsUrl&&l.jsx("a",{href:H.docsUrl,target:"_blank",rel:"noopener noreferrer",style:{display:"flex",padding:3,borderRadius:4,color:"var(--text-muted)",flexShrink:0},title:"Docs",children:l.jsx(Sy,{size:11})}),l.jsxs("button",{onClick:()=>ge(H),style:{display:"flex",alignItems:"center",gap:4,padding:"4px 10px",borderRadius:5,border:"none",background:"var(--accent)",color:"#fff",cursor:"pointer",fontSize:10,fontWeight:600,fontFamily:"inherit",flexShrink:0},children:[l.jsx(Or,{size:10})," Add"]})]})]},H.id)})}),V.length===0&&l.jsx("div",{style:{textAlign:"center",padding:"20px 0",color:"var(--text-muted)",fontSize:12},children:"No servers match your search."})]})]}),q?l.jsxs("div",{style:{background:"var(--bg-card)",border:"1px solid var(--accent)",borderRadius:8,padding:14,animation:"fade-in 0.12s ease-out"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[l.jsx(qu,{size:14,style:{color:"var(--accent)"}}),l.jsx("span",{style:{fontSize:13,fontWeight:600,color:"var(--text-primary)",flex:1},children:"Custom Server"}),l.jsx("button",{onClick:()=>P(!1),style:{display:"flex",padding:4,border:"none",borderRadius:4,background:"transparent",color:"var(--text-muted)",cursor:"pointer"},children:l.jsx(Rn,{size:14})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[l.jsxs("div",{style:{display:"flex",gap:8},children:[l.jsx("div",{style:{flex:1},children:l.jsx(wo,{label:"Name",hint:"e.g. my-server",children:l.jsx("input",{value:X,onChange:H=>oe(H.target.value),placeholder:"my-custom-server",style:yn})})}),l.jsx("div",{style:{flex:1},children:l.jsx(wo,{label:"Command",hint:"e.g. npx, node",children:l.jsx("input",{value:me,onChange:H=>E(H.target.value),placeholder:"npx",style:yn})})})]}),l.jsx(wo,{label:"Arguments",hint:"One per line",children:l.jsx("textarea",{value:Q,onChange:H=>Y(H.target.value),placeholder:`-y
496
+ @your/mcp-package`,rows:2,style:{...yn,resize:"vertical",fontFamily:"monospace",fontSize:12,lineHeight:1.6}})}),l.jsxs("div",{children:[l.jsx("label",{style:na,children:"Environment Variables"}),Object.keys(le).length>0&&l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6,marginBottom:8},children:Object.entries(le).map(([H,pe])=>l.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[l.jsx("span",{style:{fontSize:11,fontFamily:"monospace",color:"var(--text-secondary)",minWidth:100,flexShrink:0},children:H}),l.jsx("input",{value:pe,onChange:fe=>Z(Te=>({...Te,[H]:fe.target.value})),placeholder:"value",style:{...yn,flex:1}}),l.jsx("button",{onClick:()=>Z(fe=>{const Te={...fe};return delete Te[H],Te}),style:{display:"flex",padding:4,border:"none",background:"transparent",color:"var(--text-muted)",cursor:"pointer",borderRadius:4},children:l.jsx(Sr,{size:12})})]},H))}),l.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[l.jsx("input",{value:de,onChange:H=>J(H.target.value),placeholder:"VAR_NAME",style:{...yn,flex:1,fontFamily:"monospace",fontSize:12}}),l.jsx("input",{value:K,onChange:H=>he(H.target.value),placeholder:"value",style:{...yn,flex:1,fontSize:12}}),l.jsx("button",{onClick:()=>{de.trim()&&(Z(H=>({...H,[de.trim()]:K})),J(""),he(""))},style:Si,children:l.jsx(Or,{size:12})})]})]})]}),l.jsxs("div",{style:{display:"flex",gap:8,marginTop:12,justifyContent:"flex-end"},children:[l.jsx("button",{onClick:()=>P(!1),style:Si,children:"Cancel"}),l.jsxs("button",{onClick:ye,disabled:!X.trim()||!me.trim(),style:{display:"flex",alignItems:"center",gap:5,padding:"6px 14px",borderRadius:7,border:"none",background:X.trim()&&me.trim()?"var(--accent)":"var(--bg-tertiary)",color:X.trim()&&me.trim()?"#fff":"var(--text-muted)",cursor:X.trim()&&me.trim()?"pointer":"default",fontSize:11,fontWeight:600,fontFamily:"inherit"},children:[l.jsx(Or,{size:12})," Add Server"]})]})]}):l.jsxs("button",{onClick:()=>P(!0),style:{display:"flex",alignItems:"center",gap:6,width:"100%",padding:"10px 14px",borderRadius:8,border:"1px dashed var(--border)",background:"transparent",color:"var(--text-muted)",cursor:"pointer",fontSize:12,fontFamily:"inherit",transition:"border-color 0.12s, color 0.12s"},onMouseEnter:H=>{H.currentTarget.style.borderColor="var(--accent)",H.currentTarget.style.color="var(--text-primary)"},onMouseLeave:H=>{H.currentTarget.style.borderColor="var(--border)",H.currentTarget.style.color="var(--text-muted)"},children:[l.jsx(Or,{size:14})," Add Custom Server"]})]})}const yn={padding:"7px 10px",borderRadius:6,border:"1px solid var(--border)",background:"var(--bg-tertiary)",color:"var(--text-primary)",fontSize:13,fontFamily:"inherit",outline:"none",width:"100%"},na={fontSize:12,fontWeight:500,color:"var(--text-muted)",marginBottom:4,display:"block"},Si={display:"flex",alignItems:"center",gap:5,padding:"6px 10px",borderRadius:6,border:"1px solid var(--border)",background:"var(--bg-tertiary)",color:"var(--text-secondary)",cursor:"pointer",fontSize:11,fontFamily:"inherit",transition:"background 0.08s, color 0.08s"};function wo({label:t,hint:i,children:r}){return l.jsxs("div",{children:[l.jsxs("label",{style:na,children:[t,i&&l.jsx("span",{style:{fontWeight:400,marginLeft:6,opacity:.7},children:i})]}),r]})}function So({visible:t,children:i}){const[r,a]=I.useState(t),[s,c]=I.useState(!1);return I.useEffect(()=>{if(t)a(!0),requestAnimationFrame(()=>requestAnimationFrame(()=>c(!0)));else{c(!1);const d=setTimeout(()=>a(!1),700);return()=>clearTimeout(d)}},[t]),r?l.jsx("div",{style:{position:"absolute",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",opacity:s?1:0,transform:s?"translateY(0) scale(1)":"translateY(60px) scale(0.97)",transition:"opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1)",pointerEvents:s?"auto":"none"},children:i}):null}const ch=["Hello.","Hey there.","Welcome.","Bonjour.","Howdy.","Namaste.","Hola.","Let's go."];function Lj(){const[t,i]=I.useState(0),[r,a]=I.useState(0),[s,c]=I.useState(!1),d=ch[t];return I.useEffect(()=>{const f=s?50:110,h=1600,g=400;if(!s&&r===d.length){const x=setTimeout(()=>c(!0),h);return()=>clearTimeout(x)}if(s&&r===0){const x=setTimeout(()=>{i(v=>(v+1)%ch.length),c(!1)},g);return()=>clearTimeout(x)}const y=setTimeout(()=>{a(x=>x+(s?-1:1))},f);return()=>clearTimeout(y)},[r,s,d]),l.jsxs(l.Fragment,{children:[d.slice(0,r),l.jsx("span",{style:{display:"inline-block",width:4,height:"0.82em",background:"var(--text-primary)",marginLeft:4,verticalAlign:"baseline",borderRadius:1,animation:"ob-blink 1s step-end infinite"}})]})}function Su({icon:t,title:i,desc:r,color:a,delay:s}){const[c,d]=I.useState(!1);return I.useEffect(()=>{const f=setTimeout(()=>d(!0),s);return()=>clearTimeout(f)},[s]),l.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:16,padding:"18px 22px",background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:16,width:"100%",maxWidth:340,opacity:c?1:0,transform:c?"translateY(0)":"translateY(30px)",transition:"all 0.8s cubic-bezier(0.16,1,0.3,1)"},children:[l.jsx("div",{style:{width:44,height:44,borderRadius:12,flexShrink:0,background:`color-mix(in srgb, ${a} 12%, transparent)`,display:"flex",alignItems:"center",justifyContent:"center",color:a},children:t}),l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:i}),l.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",lineHeight:1.5},children:r})]})]})}function Pj({onComplete:t}){const[i,r]=I.useState(0),[a,s]=I.useState(""),[c,d]=I.useState(""),[f,h]=I.useState(!1),[g,y]=I.useState(!1),x=I.useRef(null),v=I.useRef(null);I.useEffect(()=>{i===2&&setTimeout(()=>{var w;return(w=x.current)==null?void 0:w.focus()},800),i===3&&setTimeout(()=>{var w;return(w=v.current)==null?void 0:w.focus()},800)},[i]);const k=I.useCallback(()=>r(w=>w+1),[]),j=I.useCallback(()=>r(w=>w-1),[]);async function M(){h(!0);try{await st("/api/onboarding",{name:a||"User",role:c||"Founder & CEO"})}catch{}h(!1),y(!0),setTimeout(t,1200)}const N={width:"100%",maxWidth:440,padding:"18px 0",fontSize:28,fontWeight:600,fontFamily:"inherit",background:"transparent",border:"none",borderBottom:"2px solid var(--border)",color:"var(--text-primary)",outline:"none",textAlign:"center",letterSpacing:"-0.02em",transition:"border-color 0.3s",caretColor:"var(--accent)"},_=w=>({padding:"12px 40px",borderRadius:980,fontSize:14,fontWeight:600,border:"none",color:"#fff",cursor:"pointer",fontFamily:"inherit",background:w?"var(--accent)":"var(--bg-tertiary)",transition:"all 0.3s",opacity:w?1:.5}),U={padding:"12px 28px",borderRadius:980,fontSize:14,fontWeight:500,border:"1px solid var(--border)",background:"transparent",color:"var(--text-secondary)",cursor:"pointer",fontFamily:"inherit",transition:"background 0.15s"};return l.jsxs("div",{style:{position:"fixed",inset:0,zIndex:9999,background:"var(--bg-primary)",overflow:"hidden",opacity:g?0:1,transform:g?"scale(1.08)":"scale(1)",transition:"opacity 1s cubic-bezier(0.16,1,0.3,1), transform 1s cubic-bezier(0.16,1,0.3,1)"},children:[l.jsx(So,{visible:i===0,children:l.jsxs("div",{onClick:k,style:{cursor:"pointer",display:"flex",flexDirection:"column",alignItems:"center",gap:48,width:"100%",height:"100%",justifyContent:"center"},children:[l.jsx("h1",{style:{fontSize:"clamp(64px, 12vw, 140px)",fontWeight:700,letterSpacing:"-0.04em",lineHeight:1,margin:0,color:"var(--text-primary)",userSelect:"none"},children:l.jsx(Lj,{})}),l.jsxs("div",{style:{fontSize:13,fontWeight:500,color:"var(--text-muted)",letterSpacing:"0.04em",opacity:0,animation:"ob-hint-in 1s ease-out 3s forwards",display:"flex",alignItems:"center",gap:8},children:[l.jsx("span",{style:{width:20,height:20,borderRadius:6,border:"1.5px solid var(--text-muted)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:10,flexShrink:0},children:l.jsx("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:l.jsx("path",{d:"M5 12h14M12 5l7 7-7 7"})})}),"Click anywhere to continue"]})]})}),l.jsx(So,{visible:i===1,children:l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:48,padding:"0 24px"},children:[l.jsxs("div",{style:{textAlign:"center",maxWidth:500},children:[l.jsxs("h2",{style:{fontSize:"clamp(28px, 5vw, 44px)",fontWeight:700,color:"var(--text-primary)",letterSpacing:"-0.03em",lineHeight:1.15,margin:0},children:["Meet your",l.jsx("br",{}),l.jsx("span",{style:{color:"var(--accent)"},children:"AI workforce."})]}),l.jsxs("p",{style:{fontSize:16,color:"var(--text-muted)",marginTop:16,lineHeight:1.7,maxWidth:380,marginLeft:"auto",marginRight:"auto"},children:["Autonomous agents that code, review, deploy,",l.jsx("br",{}),"and communicate — all managed from one place."]})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:12,width:"100%",maxWidth:340,alignItems:"center"},children:[l.jsx(Su,{icon:l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),l.jsx("path",{d:"m9 12 2 2 4-4"})]}),title:"Task Automation",desc:"Assign tasks and watch AI agents break them down and execute.",color:"var(--accent)",delay:300}),l.jsx(Su,{icon:l.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M12 20h9"}),l.jsx("path",{d:"M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4Z"})]}),title:"Live Coding",desc:"Watch agents write, review, and refactor code in real time.",color:"var(--green)",delay:500}),l.jsx(Su,{icon:l.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),title:"Security Scanning",desc:"Automated vulnerability scanning after every task.",color:"var(--red)",delay:700})]}),l.jsx("button",{onClick:k,style:{..._(!0),opacity:0,animation:"ob-fade-up 0.6s ease-out 0.9s forwards"},onMouseEnter:w=>{w.currentTarget.style.transform="scale(1.04)"},onMouseLeave:w=>{w.currentTarget.style.transform="scale(1)"},children:"Continue"})]})}),l.jsx(So,{visible:i===2,children:l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:48,padding:"0 24px"},children:[l.jsxs("div",{style:{textAlign:"center"},children:[l.jsx("p",{style:{fontSize:13,fontWeight:600,color:"var(--accent)",letterSpacing:"0.08em",textTransform:"uppercase",marginBottom:12},children:"STEP 1 OF 2"}),l.jsxs("h2",{style:{fontSize:"clamp(28px, 5vw, 44px)",fontWeight:700,color:"var(--text-primary)",letterSpacing:"-0.03em",lineHeight:1.15,margin:0},children:["What should we",l.jsx("br",{}),"call you?"]})]}),l.jsxs("div",{style:{width:"100%",maxWidth:440},children:[l.jsx("input",{ref:x,type:"text",placeholder:"Your name",value:a,onChange:w=>s(w.target.value),onKeyDown:w=>{w.key==="Enter"&&a.trim()&&k()},onFocus:w=>{w.currentTarget.style.borderBottomColor="var(--accent)"},onBlur:w=>{w.currentTarget.style.borderBottomColor="var(--border)"},style:N}),l.jsx("div",{style:{fontSize:13,color:"var(--text-muted)",textAlign:"center",marginTop:14},children:"Your agents will use this to address you."})]}),l.jsxs("div",{style:{display:"flex",gap:16,alignItems:"center"},children:[l.jsx("button",{onClick:j,style:U,onMouseEnter:w=>{w.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:w=>{w.currentTarget.style.background="transparent"},children:"Back"}),l.jsx("button",{onClick:k,style:_(!!a.trim()),onMouseEnter:w=>{a.trim()&&(w.currentTarget.style.transform="scale(1.04)")},onMouseLeave:w=>{w.currentTarget.style.transform="scale(1)"},children:"Continue"})]})]})}),l.jsx(So,{visible:i===3,children:l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:40,padding:"0 24px"},children:[l.jsxs("div",{style:{textAlign:"center"},children:[l.jsx("p",{style:{fontSize:13,fontWeight:600,color:"var(--accent)",letterSpacing:"0.08em",textTransform:"uppercase",marginBottom:12},children:"STEP 2 OF 2"}),l.jsxs("h2",{style:{fontSize:"clamp(28px, 5vw, 44px)",fontWeight:700,color:"var(--text-primary)",letterSpacing:"-0.03em",lineHeight:1.15,margin:0},children:["What do you do",a?",":"?",l.jsx("br",{}),a&&l.jsxs("span",{style:{color:"var(--accent)"},children:[a,"?"]})]})]}),l.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:10,justifyContent:"center",maxWidth:480},children:["Founder & CEO","CTO","Engineering Lead","Product Manager","Developer","Designer","Data Scientist","Student"].map(w=>l.jsx("button",{onClick:()=>d(w),style:{padding:"10px 20px",borderRadius:980,fontSize:14,fontWeight:500,border:`1.5px solid ${c===w?"var(--accent)":"var(--border)"}`,background:c===w?"color-mix(in srgb, var(--accent) 10%, transparent)":"transparent",color:c===w?"var(--accent)":"var(--text-secondary)",cursor:"pointer",fontFamily:"inherit",transition:"all 0.25s cubic-bezier(0.16,1,0.3,1)",transform:c===w?"scale(1.05)":"scale(1)"},onMouseEnter:T=>{c!==w&&(T.currentTarget.style.borderColor="var(--text-muted)")},onMouseLeave:T=>{c!==w&&(T.currentTarget.style.borderColor="var(--border)")},children:w},w))}),l.jsx("div",{style:{width:"100%",maxWidth:380},children:l.jsx("input",{ref:v,type:"text",placeholder:"Or type your own...",value:c,onChange:w=>d(w.target.value),onKeyDown:w=>{w.key==="Enter"&&c.trim()&&k()},onFocus:w=>{w.currentTarget.style.borderBottomColor="var(--accent)"},onBlur:w=>{w.currentTarget.style.borderBottomColor="var(--border)"},style:{...N,fontSize:20,maxWidth:380}})}),l.jsxs("div",{style:{display:"flex",gap:16,alignItems:"center"},children:[l.jsx("button",{onClick:j,style:U,onMouseEnter:w=>{w.currentTarget.style.background="var(--bg-hover)"},onMouseLeave:w=>{w.currentTarget.style.background="transparent"},children:"Back"}),l.jsx("button",{onClick:k,style:_(!!c.trim()),onMouseEnter:w=>{c.trim()&&(w.currentTarget.style.transform="scale(1.04)")},onMouseLeave:w=>{w.currentTarget.style.transform="scale(1)"},children:"Continue"})]})]})}),l.jsx(So,{visible:i===4,children:l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:48,padding:"0 24px"},children:[l.jsxs("div",{style:{textAlign:"center"},children:[l.jsxs("h2",{style:{fontSize:"clamp(36px, 7vw, 72px)",fontWeight:700,letterSpacing:"-0.04em",lineHeight:1.1,margin:0,color:"var(--text-primary)"},children:["Welcome,",l.jsx("br",{}),l.jsxs("span",{style:{color:"var(--accent)"},children:[a||"User","."]})]}),l.jsxs("p",{style:{fontSize:17,color:"var(--text-muted)",marginTop:20,lineHeight:1.7},children:[c||"Founder & CEO"," — your AI team is ready."]})]}),l.jsxs("div",{style:{position:"relative",width:200,height:200},children:[[{color:"var(--accent)",angle:0,label:"PM"},{color:"var(--green)",angle:60,label:"DEV"},{color:"var(--purple)",angle:120,label:"QA"},{color:"var(--orange)",angle:180,label:"SEC"},{color:"var(--red)",angle:240,label:"OPS"},{color:"var(--blue)",angle:300,label:"DOC"}].map((w,T)=>{const q=w.angle*Math.PI/180,P=80,X=100+Math.cos(q)*P-20,oe=100+Math.sin(q)*P-20;return l.jsx("div",{style:{position:"absolute",left:X,top:oe,width:40,height:40,borderRadius:12,display:"flex",alignItems:"center",justifyContent:"center",background:`color-mix(in srgb, ${w.color} 15%, var(--bg-card))`,border:`1.5px solid color-mix(in srgb, ${w.color} 25%, transparent)`,fontSize:9,fontWeight:700,color:w.color,letterSpacing:"0.02em",opacity:0,animation:`ob-fade-up 0.5s ease-out ${.2+T*.1}s forwards`},children:w.label},T)}),l.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:52,height:52,borderRadius:16,background:"var(--accent)",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"12",cy:"12",r:"3"}),l.jsx("path",{d:"M12 1v4M12 19v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M1 12h4M19 12h4M4.22 19.78l2.83-2.83M16.95 7.05l2.83-2.83"})]})})]}),l.jsx("button",{onClick:M,disabled:f,style:{padding:"16px 56px",borderRadius:980,fontSize:16,fontWeight:600,border:"none",color:"#fff",cursor:f?"wait":"pointer",fontFamily:"inherit",background:"var(--accent)",transition:"transform 0.2s, opacity 0.2s",opacity:f?.6:1},onMouseEnter:w=>{f||(w.currentTarget.style.transform="scale(1.06)")},onMouseLeave:w=>{w.currentTarget.style.transform="scale(1)"},children:f?"Setting up...":"Launch Dashboard"})]})}),i>0&&l.jsx("div",{style:{position:"absolute",bottom:40,left:"50%",transform:"translateX(-50%)",display:"flex",gap:6},children:[1,2,3,4].map(w=>l.jsx("div",{style:{width:i===w?28:6,height:6,borderRadius:3,background:w<=i?"var(--accent)":"var(--border)",opacity:w<=i?1:.4,transition:"all 0.5s cubic-bezier(0.16,1,0.3,1)"}},w))}),l.jsx("style",{children:`
497
+ @keyframes ob-blink {
498
+ 0%, 100% { opacity: 1; }
499
+ 50% { opacity: 0; }
500
+ }
501
+ @keyframes ob-hint-in {
502
+ from { opacity: 0; transform: translateY(8px); }
503
+ to { opacity: 0.6; transform: translateY(0); }
504
+ }
505
+ @keyframes ob-fade-up {
506
+ from { opacity: 0; transform: translateY(20px); }
507
+ to { opacity: 1; transform: translateY(0); }
508
+ }
509
+ `})]})}const ju=[{targetId:"overview",title:"Overview",description:"Your command center. See agent statuses, active tasks, recent events, and system health at a glance.",position:"right"},{targetId:"kanban",title:"Kanban Board",description:"Manage tasks visually. Drag and drop between columns. Assign work to AI agents and track progress.",position:"right"},{targetId:"live",title:"Live View",description:"Watch your AI agents work in real time. See their code output streaming live as they execute tasks.",position:"right"},{targetId:"events",title:"Events",description:"A timeline of everything happening — task completions, agent messages, errors, and system events.",position:"right"},{targetId:"snoop",title:"Snoop",description:"Peek into the internal message queue. See what agents are saying to each other behind the scenes.",position:"right"},{targetId:"directory",title:"Agent Directory",description:"Your AI team roster. Configure each agent's model, tools, and capabilities. Hire new agents or disable existing ones.",position:"right"},{targetId:"chat",title:"Chat",description:"Talk directly with any agent or create group conversations. Like Slack, but for your AI workforce.",position:"right"},{targetId:"finance",title:"Finance",description:"Track token usage and costs across all agents. See per-model pricing and department breakdowns.",position:"right"},{targetId:"settings",title:"Settings",description:"Configure channels (Telegram, Slack, Discord), integrations, security scanners, and system preferences.",position:"right"},{targetId:"settings-models",title:"Set Up Your AI Models",description:"Select a provider (OpenAI, Anthropic, Google, etc.), choose a model, and paste your API key. Click Save — your agents will start using it immediately. You can configure primary, secondary, and fallback models.",position:"right"}];function Dj({rect:t}){if(!t)return null;const i=6,r=10;return l.jsxs("svg",{style:{position:"fixed",inset:0,zIndex:1e4,pointerEvents:"none"},width:"100%",height:"100%",children:[l.jsx("defs",{children:l.jsxs("mask",{id:"tour-mask",children:[l.jsx("rect",{width:"100%",height:"100%",fill:"white"}),l.jsx("rect",{x:t.left-i,y:t.top-i,width:t.width+i*2,height:t.height+i*2,rx:r,ry:r,fill:"black"})]})}),l.jsx("rect",{width:"100%",height:"100%",fill:"rgba(0,0,0,0.55)",mask:"url(#tour-mask)"})]})}function Nj({rect:t,step:i,stepIdx:r,total:a,onNext:s,onPrev:c,onSkip:d}){let g,y,x;return i.position==="right"?(g=t.top+t.height/2-60,y=t.right+16,x={position:"absolute",left:-7,top:24,width:0,height:0,borderTop:"8px solid transparent",borderBottom:"8px solid transparent",borderRight:"8px solid var(--bg-card)"}):(g=t.bottom+16,y=t.left+t.width/2-320/2,x={position:"absolute",top:-7,left:320/2-8,width:0,height:0,borderLeft:"8px solid transparent",borderRight:"8px solid transparent",borderBottom:"8px solid var(--bg-card)"}),g<12&&(g=12),y<12&&(y=12),y+320>window.innerWidth-12&&(y=window.innerWidth-320-12),l.jsxs("div",{style:{position:"fixed",top:g,left:y,width:320,zIndex:10001,background:"var(--bg-card)",border:"1px solid var(--border)",borderRadius:14,padding:"20px 22px 16px",boxShadow:"0 12px 48px rgba(0,0,0,0.35)",animation:"tour-pop 0.3s cubic-bezier(0.16,1,0.3,1)"},children:[l.jsx("div",{style:x}),l.jsxs("div",{style:{fontSize:11,fontWeight:600,color:"var(--accent)",letterSpacing:"0.06em",marginBottom:8},children:[r+1," OF ",a]}),l.jsx("div",{style:{fontSize:16,fontWeight:700,color:"var(--text-primary)",marginBottom:6},children:i.title}),l.jsx("div",{style:{fontSize:13,color:"var(--text-secondary)",lineHeight:1.6,marginBottom:18},children:i.description}),l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l.jsx("button",{onClick:d,style:{padding:"6px 0",border:"none",background:"transparent",color:"var(--text-muted)",cursor:"pointer",fontFamily:"inherit",fontSize:12,fontWeight:500},onMouseEnter:v=>{v.currentTarget.style.color="var(--text-secondary)"},onMouseLeave:v=>{v.currentTarget.style.color="var(--text-muted)"},children:"Skip tour"}),l.jsxs("div",{style:{display:"flex",gap:8},children:[r>0&&l.jsx("button",{onClick:c,style:{padding:"7px 16px",borderRadius:8,fontSize:12,fontWeight:500,border:"1px solid var(--border)",background:"transparent",color:"var(--text-secondary)",cursor:"pointer",fontFamily:"inherit"},children:"Back"}),l.jsx("button",{onClick:s,style:{padding:"7px 20px",borderRadius:8,fontSize:12,fontWeight:600,border:"none",background:"var(--accent)",color:"#fff",cursor:"pointer",fontFamily:"inherit"},children:r===a-1?"Finish":"Next"})]})]}),l.jsx("div",{style:{height:3,borderRadius:2,background:"var(--border)",marginTop:14,overflow:"hidden"},children:l.jsx("div",{style:{height:"100%",borderRadius:2,background:"var(--accent)",width:`${(r+1)/a*100}%`,transition:"width 0.3s ease-out"}})})]})}function Fj({onStart:t,onSkip:i}){const[r,a]=I.useState(!1),[s,c]=I.useState(!1);I.useEffect(()=>{requestAnimationFrame(()=>requestAnimationFrame(()=>a(!0)))},[]);function d(h){c(!0),setTimeout(h,600)}const f=[{icon:l.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--accent)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),l.jsx("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),l.jsx("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),l.jsx("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]}),title:"Kanban Board",desc:"Drag-and-drop task management. Assign work to AI agents and track progress across columns.",color:"var(--accent)"},{icon:l.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),l.jsx("path",{d:"M8 21h8M12 17v4"})]}),title:"Live Agent View",desc:"Watch AI agents write code, reason through problems, and build software in real time.",color:"var(--green)"},{icon:l.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--purple)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),title:"Agent Chat",desc:"Talk to any agent directly or create team group chats. Like Slack for your AI workforce.",color:"var(--purple)"},{icon:l.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--red)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"})}),title:"Security Scanning",desc:"Gitleaks, Semgrep, and Trivy run automatically after every task. Catch vulnerabilities early.",color:"var(--red)"},{icon:l.jsx("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--orange)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:l.jsx("path",{d:"M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"})}),title:"Cost Tracking",desc:"Monitor per-agent token usage, model costs, and department budgets with real-time analytics.",color:"var(--orange)"},{icon:l.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--blue)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"}),l.jsx("circle",{cx:"9",cy:"7",r:"4"}),l.jsx("path",{d:"M22 21v-2a4 4 0 0 0-3-3.87"}),l.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}),title:"Agent Directory",desc:"Manage your AI team. Configure models, tools, and capabilities for each specialist agent.",color:"var(--blue)"},{icon:l.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--yellow)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("circle",{cx:"12",cy:"12",r:"10"}),l.jsx("polyline",{points:"12 6 12 12 16 14"})]}),title:"Event Timeline",desc:"Every task completion, agent message, error, and system event logged in a searchable timeline.",color:"var(--yellow)"},{icon:l.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"var(--green)",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[l.jsx("path",{d:"M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"}),l.jsx("polyline",{points:"22,6 12,13 2,6"})]}),title:"Multi-Channel",desc:"Connect via Telegram, Slack, Discord, or the web dashboard. Talk to agents from anywhere.",color:"var(--green)"}];return l.jsxs("div",{style:{position:"fixed",inset:0,zIndex:1e4,background:"var(--bg-primary)",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",opacity:r?1:0,transform:s?"translateX(-100%)":"translateX(0)",transition:s?"transform 0.6s cubic-bezier(0.4,0,0.2,1), opacity 0.4s ease-out 0.2s":"opacity 0.5s ease-out"},children:[l.jsx("button",{onClick:()=>d(i),style:{position:"fixed",top:20,right:24,zIndex:10001,padding:"7px 18px",borderRadius:980,fontSize:12,fontWeight:500,border:"1px solid var(--border)",background:"color-mix(in srgb, var(--bg-card) 80%, transparent)",backdropFilter:"blur(8px)",color:"var(--text-muted)",cursor:"pointer",fontFamily:"inherit",transition:"color 0.15s, border-color 0.15s",opacity:0,animation:"tour-pop 0.4s ease-out 0.5s forwards"},onMouseEnter:h=>{h.currentTarget.style.color="var(--text-primary)",h.currentTarget.style.borderColor="var(--text-muted)"},onMouseLeave:h=>{h.currentTarget.style.color="var(--text-muted)",h.currentTarget.style.borderColor="var(--border)"},children:"Skip"}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",width:"100%",maxWidth:920,padding:"0 40px 0 40px"},children:[l.jsx("div",{style:{width:48,height:48,borderRadius:14,marginBottom:14,background:"var(--accent)",display:"flex",alignItems:"center",justifyContent:"center",fontSize:20,fontWeight:700,color:"#fff",opacity:0,animation:"tour-pop 0.5s ease-out 0.1s forwards"},children:"O"}),l.jsx("h1",{style:{fontSize:"clamp(24px, 4vw, 34px)",fontWeight:700,color:"var(--text-primary)",letterSpacing:"-0.03em",lineHeight:1.15,margin:0,textAlign:"center",opacity:0,animation:"tour-pop 0.5s ease-out 0.2s forwards"},children:"Welcome to OCTO VEC"}),l.jsx("p",{style:{fontSize:14,color:"var(--text-muted)",marginTop:8,lineHeight:1.6,maxWidth:400,textAlign:"center",opacity:0,animation:"tour-pop 0.5s ease-out 0.35s forwards"},children:"Your autonomous AI workforce. Here's everything you can do from this dashboard."}),l.jsx("div",{style:{width:"100%",marginTop:28,display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:12},children:f.map((h,g)=>l.jsxs("div",{style:{padding:"18px 16px",borderRadius:14,background:"var(--bg-card)",border:"1px solid var(--border)",opacity:0,animation:`tour-pop 0.5s ease-out ${.4+g*.06}s forwards`,transition:"border-color 0.15s, transform 0.15s"},onMouseEnter:y=>{y.currentTarget.style.borderColor=h.color,y.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:y=>{y.currentTarget.style.borderColor="var(--border)",y.currentTarget.style.transform="translateY(0)"},children:[l.jsx("div",{style:{width:38,height:38,borderRadius:10,marginBottom:12,background:`color-mix(in srgb, ${h.color} 10%, transparent)`,display:"flex",alignItems:"center",justifyContent:"center"},children:h.icon}),l.jsx("div",{style:{fontSize:14,fontWeight:600,color:"var(--text-primary)",marginBottom:5},children:h.title}),l.jsx("div",{style:{fontSize:12,color:"var(--text-muted)",lineHeight:1.6},children:h.desc})]},g))})]}),l.jsx("button",{onClick:()=>d(t),style:{position:"fixed",right:16,top:"50%",transform:"translateY(-50%)",width:56,height:56,borderRadius:"50%",border:"1px solid rgba(255,255,255,0.12)",background:"rgba(255,255,255,0.06)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",opacity:0,animation:"tour-pop 0.6s ease-out 1s forwards",transition:"background 0.2s, border-color 0.2s, transform 0.2s",padding:0},onMouseEnter:h=>{h.currentTarget.style.background="rgba(255,255,255,0.14)",h.currentTarget.style.borderColor="rgba(255,255,255,0.25)",h.currentTarget.style.transform="translateY(-50%) scale(1.08)"},onMouseLeave:h=>{h.currentTarget.style.background="rgba(255,255,255,0.06)",h.currentTarget.style.borderColor="rgba(255,255,255,0.12)",h.currentTarget.style.transform="translateY(-50%) scale(1)"},children:l.jsx("div",{style:{animation:"tour-pulse 2s ease-in-out infinite",display:"flex",alignItems:"center",justifyContent:"center"},children:l.jsx("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"none",children:l.jsx("path",{d:"M9 5l7 7-7 7",stroke:"#fff",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l.jsx("style",{children:`
510
+ @keyframes tour-pop {
511
+ from { opacity: 0; transform: translateY(10px) scale(0.97); }
512
+ to { opacity: 1; transform: translateY(0) scale(1); }
513
+ }
514
+ @keyframes tour-pulse {
515
+ 0%, 100% { transform: translateX(0); opacity: 1; }
516
+ 50% { transform: translateX(4px); opacity: 0.85; }
517
+ }
518
+ `})]})}function Oj({onDone:t,setActiveView:i}){const[r,a]=I.useState(0),[s,c]=I.useState(null),d=I.useRef(0),f=ju[r];I.useEffect(()=>{if(f.targetId.startsWith("settings-")){i("settings");const x=f.targetId.replace("settings-","");setTimeout(()=>{window.dispatchEvent(new CustomEvent("settings-nav",{detail:x}))},100)}else i(f.targetId)},[f.targetId,i]);const h=I.useCallback(()=>{const x=document.querySelector(`[data-tour-id="${f.targetId}"]`);x&&c(x.getBoundingClientRect()),d.current=requestAnimationFrame(h)},[f]);I.useEffect(()=>(d.current=requestAnimationFrame(h),()=>cancelAnimationFrame(d.current)),[h]);function g(){Rg(),i("settings"),window.dispatchEvent(new CustomEvent("settings-nav",{detail:"models"})),t()}function y(x){a(x)}return l.jsxs(l.Fragment,{children:[l.jsx(Dj,{rect:s}),s&&l.jsx(Nj,{rect:s,step:f,stepIdx:r,total:ju.length,onNext:()=>{r<ju.length-1?y(r+1):g()},onPrev:()=>y(Math.max(0,r-1)),onSkip:g}),l.jsx("div",{onClick:g,style:{position:"fixed",inset:0,zIndex:9999,cursor:"default"}}),l.jsx("style",{children:`
519
+ @keyframes tour-pop {
520
+ from { opacity: 0; transform: translateY(10px) scale(0.97); }
521
+ to { opacity: 1; transform: translateY(0) scale(1); }
522
+ }
523
+ `})]})}function Rg(){st("/api/tour-done",{}).catch(()=>{})}function $j(){const[t,i]=I.useState(()=>{const f=localStorage.getItem("active-view");return f&&["overview","kanban","events","snoop","directory","chat","live","finance","settings"].includes(f)?f:"kanban"}),[r,a]=I.useState(null),[s,c]=I.useState(null);I.useEffect(()=>{fetch($r("/api/onboarding")).then(f=>f.ok?f.json():null).then(f=>{if(!f){a(!1);return}const h=!f.done;a(h),!h&&!f.tourDone&&c("splash")}).catch(()=>a(!1))},[]);function d(f){localStorage.setItem("active-view",f),i(f)}return r===null?l.jsx(Hl,{children:l.jsx("div",{style:{height:"100vh",display:"flex",alignItems:"center",justifyContent:"center",background:"var(--bg-primary)"}})}):r?l.jsx(Hl,{children:l.jsx(Pj,{onComplete:()=>{a(!1),c("splash")}})}):s==="splash"?l.jsx(Hl,{children:l.jsx(Fj,{onStart:()=>c("walkthrough"),onSkip:()=>{Rg(),c(null)}})}):l.jsx(Hl,{children:l.jsx(Ax,{children:l.jsxs("div",{style:{display:"flex",height:"100vh",overflow:"hidden",background:"var(--bg-primary)"},children:[l.jsx(a0,{activeView:t,setActiveView:d}),l.jsxs("main",{style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column",background:"var(--bg-card)",borderRadius:14,margin:8,boxShadow:"var(--shadow-lg)",border:"1px solid var(--border)"},children:[t==="overview"&&l.jsx(Ib,{}),t==="kanban"&&l.jsx(Tb,{}),t==="events"&&l.jsx(Mb,{}),t==="snoop"&&l.jsx(Ab,{}),t==="directory"&&l.jsx(Bb,{}),t==="chat"&&l.jsx(ZS,{}),t==="live"&&l.jsx(Sj,{}),t==="finance"&&l.jsx(Cj,{}),t==="settings"&&l.jsx(Tj,{})]}),s==="walkthrough"&&l.jsx(Oj,{onDone:()=>c(null),setActiveView:d})]})})})}Ix.createRoot(document.getElementById("root")).render(l.jsx(I.StrictMode,{children:l.jsx($j,{})}));