cli-jaw 2.0.4 → 2.0.5

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 (624) hide show
  1. package/README.ja.md +17 -0
  2. package/README.ko.md +17 -0
  3. package/README.md +17 -0
  4. package/README.zh-CN.md +16 -1
  5. package/dist/bin/cli-jaw.js +7 -1
  6. package/dist/bin/cli-jaw.js.map +1 -1
  7. package/dist/bin/commands/browser.js +5 -0
  8. package/dist/bin/commands/browser.js.map +1 -1
  9. package/dist/bin/commands/connector.js +227 -0
  10. package/dist/bin/commands/connector.js.map +1 -0
  11. package/dist/bin/commands/dashboard-memory.js +243 -0
  12. package/dist/bin/commands/dashboard-memory.js.map +1 -0
  13. package/dist/bin/commands/dashboard.js +5 -0
  14. package/dist/bin/commands/dashboard.js.map +1 -1
  15. package/dist/bin/commands/dispatch-helpers.js +17 -0
  16. package/dist/bin/commands/dispatch-helpers.js.map +1 -0
  17. package/dist/bin/commands/dispatch.js +8 -3
  18. package/dist/bin/commands/dispatch.js.map +1 -1
  19. package/dist/bin/commands/doctor.js +34 -8
  20. package/dist/bin/commands/doctor.js.map +1 -1
  21. package/dist/bin/commands/reminders.js +105 -0
  22. package/dist/bin/commands/reminders.js.map +1 -0
  23. package/dist/bin/postinstall.js +26 -0
  24. package/dist/bin/postinstall.js.map +1 -1
  25. package/dist/server.js +71 -9
  26. package/dist/server.js.map +1 -1
  27. package/dist/src/agent/events.js +58 -30
  28. package/dist/src/agent/events.js.map +1 -1
  29. package/dist/src/agent/spawn.js +20 -3
  30. package/dist/src/agent/spawn.js.map +1 -1
  31. package/dist/src/agent/tool-timeout.js +27 -0
  32. package/dist/src/agent/tool-timeout.js.map +1 -0
  33. package/dist/src/agent/watchdog.js +20 -3
  34. package/dist/src/agent/watchdog.js.map +1 -1
  35. package/dist/src/browser/launch-policy.js +1 -1
  36. package/dist/src/browser/launch-policy.js.map +1 -1
  37. package/dist/src/browser/web-ai/chatgpt-model.js +102 -19
  38. package/dist/src/browser/web-ai/chatgpt-model.js.map +1 -1
  39. package/dist/src/browser/web-ai/chatgpt-response.js +30 -1
  40. package/dist/src/browser/web-ai/chatgpt-response.js.map +1 -1
  41. package/dist/src/browser/web-ai/chatgpt.js +55 -8
  42. package/dist/src/browser/web-ai/chatgpt.js.map +1 -1
  43. package/dist/src/browser/web-ai/diagnostics.js +1 -0
  44. package/dist/src/browser/web-ai/diagnostics.js.map +1 -1
  45. package/dist/src/browser/web-ai/gemini-live.js +24 -3
  46. package/dist/src/browser/web-ai/gemini-live.js.map +1 -1
  47. package/dist/src/browser/web-ai/interstitial.js +64 -0
  48. package/dist/src/browser/web-ai/interstitial.js.map +1 -0
  49. package/dist/src/browser/web-ai/session.js +12 -0
  50. package/dist/src/browser/web-ai/session.js.map +1 -1
  51. package/dist/src/browser/web-ai/watcher.js +25 -7
  52. package/dist/src/browser/web-ai/watcher.js.map +1 -1
  53. package/dist/src/cli/connector.js +60 -0
  54. package/dist/src/cli/connector.js.map +1 -0
  55. package/dist/src/cli/handlers-runtime.js +39 -0
  56. package/dist/src/cli/handlers-runtime.js.map +1 -1
  57. package/dist/src/cli/reminders.js +29 -0
  58. package/dist/src/cli/reminders.js.map +1 -0
  59. package/dist/src/core/cli-detect.js +161 -0
  60. package/dist/src/core/cli-detect.js.map +1 -0
  61. package/dist/src/core/config.js +9 -22
  62. package/dist/src/core/config.js.map +1 -1
  63. package/dist/src/core/db.js +14 -1
  64. package/dist/src/core/db.js.map +1 -1
  65. package/dist/src/core/settings-merge.js +2 -2
  66. package/dist/src/core/settings-merge.js.map +1 -1
  67. package/dist/src/jaw-ceo/completion.js +101 -0
  68. package/dist/src/jaw-ceo/completion.js.map +1 -0
  69. package/dist/src/jaw-ceo/confirmations.js +39 -0
  70. package/dist/src/jaw-ceo/confirmations.js.map +1 -0
  71. package/dist/src/jaw-ceo/coordinator-admin.js +295 -0
  72. package/dist/src/jaw-ceo/coordinator-admin.js.map +1 -0
  73. package/dist/src/jaw-ceo/coordinator-completions.js +201 -0
  74. package/dist/src/jaw-ceo/coordinator-completions.js.map +1 -0
  75. package/dist/src/jaw-ceo/coordinator-realtime-tools.js +108 -0
  76. package/dist/src/jaw-ceo/coordinator-realtime-tools.js.map +1 -0
  77. package/dist/src/jaw-ceo/coordinator-types.js +2 -0
  78. package/dist/src/jaw-ceo/coordinator-types.js.map +1 -0
  79. package/dist/src/jaw-ceo/coordinator-utils.js +86 -0
  80. package/dist/src/jaw-ceo/coordinator-utils.js.map +1 -0
  81. package/dist/src/jaw-ceo/coordinator-workers.js +234 -0
  82. package/dist/src/jaw-ceo/coordinator-workers.js.map +1 -0
  83. package/dist/src/jaw-ceo/coordinator.js +116 -0
  84. package/dist/src/jaw-ceo/coordinator.js.map +1 -0
  85. package/dist/src/jaw-ceo/docs-edit.js +142 -0
  86. package/dist/src/jaw-ceo/docs-edit.js.map +1 -0
  87. package/dist/src/jaw-ceo/openai-key.js +22 -0
  88. package/dist/src/jaw-ceo/openai-key.js.map +1 -0
  89. package/dist/src/jaw-ceo/policy.js +92 -0
  90. package/dist/src/jaw-ceo/policy.js.map +1 -0
  91. package/dist/src/jaw-ceo/realtime-sideband.js +372 -0
  92. package/dist/src/jaw-ceo/realtime-sideband.js.map +1 -0
  93. package/dist/src/jaw-ceo/store.js +206 -0
  94. package/dist/src/jaw-ceo/store.js.map +1 -0
  95. package/dist/src/jaw-ceo/transcript-persistence.js +28 -0
  96. package/dist/src/jaw-ceo/transcript-persistence.js.map +1 -0
  97. package/dist/src/jaw-ceo/types.js +2 -0
  98. package/dist/src/jaw-ceo/types.js.map +1 -0
  99. package/dist/src/manager/connector/audit-log.js +95 -0
  100. package/dist/src/manager/connector/audit-log.js.map +1 -0
  101. package/dist/src/manager/connector/routes.js +251 -0
  102. package/dist/src/manager/connector/routes.js.map +1 -0
  103. package/dist/src/manager/connector/types.js +2 -0
  104. package/dist/src/manager/connector/types.js.map +1 -0
  105. package/dist/src/manager/memory/embedding/hybrid-search.js +61 -0
  106. package/dist/src/manager/memory/embedding/hybrid-search.js.map +1 -0
  107. package/dist/src/manager/memory/embedding/index.js +6 -0
  108. package/dist/src/manager/memory/embedding/index.js.map +1 -0
  109. package/dist/src/manager/memory/embedding/provider.js +187 -0
  110. package/dist/src/manager/memory/embedding/provider.js.map +1 -0
  111. package/dist/src/manager/memory/embedding/state-machine.js +68 -0
  112. package/dist/src/manager/memory/embedding/state-machine.js.map +1 -0
  113. package/dist/src/manager/memory/embedding/sync.js +156 -0
  114. package/dist/src/manager/memory/embedding/sync.js.map +1 -0
  115. package/dist/src/manager/memory/embedding/vec-store.js +166 -0
  116. package/dist/src/manager/memory/embedding/vec-store.js.map +1 -0
  117. package/dist/src/manager/memory/federation.js +56 -0
  118. package/dist/src/manager/memory/federation.js.map +1 -0
  119. package/dist/src/manager/memory/index.js +5 -0
  120. package/dist/src/manager/memory/index.js.map +1 -0
  121. package/dist/src/manager/memory/instance-discovery.js +83 -0
  122. package/dist/src/manager/memory/instance-discovery.js.map +1 -0
  123. package/dist/src/manager/memory/result-rerank.js +28 -0
  124. package/dist/src/manager/memory/result-rerank.js.map +1 -0
  125. package/dist/src/manager/memory/types.js +2 -0
  126. package/dist/src/manager/memory/types.js.map +1 -0
  127. package/dist/src/manager/observability.js.map +1 -1
  128. package/dist/src/manager/process-verify.js +4 -1
  129. package/dist/src/manager/process-verify.js.map +1 -1
  130. package/dist/src/manager/registry.js +59 -1
  131. package/dist/src/manager/registry.js.map +1 -1
  132. package/dist/src/manager/reminders/api.js +16 -0
  133. package/dist/src/manager/reminders/api.js.map +1 -0
  134. package/dist/src/manager/reminders/dispatcher.js +40 -0
  135. package/dist/src/manager/reminders/dispatcher.js.map +1 -0
  136. package/dist/src/manager/reminders/due-time.js +16 -0
  137. package/dist/src/manager/reminders/due-time.js.map +1 -0
  138. package/dist/src/manager/reminders/instance-link.js +22 -0
  139. package/dist/src/manager/reminders/instance-link.js.map +1 -0
  140. package/dist/src/manager/reminders/routes.js +170 -0
  141. package/dist/src/manager/reminders/routes.js.map +1 -0
  142. package/dist/src/manager/reminders/scheduler.js +67 -0
  143. package/dist/src/manager/reminders/scheduler.js.map +1 -0
  144. package/dist/src/manager/reminders/store.js +311 -0
  145. package/dist/src/manager/reminders/store.js.map +1 -0
  146. package/dist/src/manager/routes/dashboard-memory.js +380 -0
  147. package/dist/src/manager/routes/dashboard-memory.js.map +1 -0
  148. package/dist/src/manager/server.js +209 -4
  149. package/dist/src/manager/server.js.map +1 -1
  150. package/dist/src/manager/worker-messages.js +60 -0
  151. package/dist/src/manager/worker-messages.js.map +1 -0
  152. package/dist/src/manager/workspace/routes.js +240 -0
  153. package/dist/src/manager/workspace/routes.js.map +1 -0
  154. package/dist/src/manager/workspace/store.js +369 -0
  155. package/dist/src/manager/workspace/store.js.map +1 -0
  156. package/dist/src/manager/workspace/types.js +5 -0
  157. package/dist/src/manager/workspace/types.js.map +1 -0
  158. package/dist/src/memory/indexing.js +38 -11
  159. package/dist/src/memory/indexing.js.map +1 -1
  160. package/dist/src/memory/shared.js +6 -0
  161. package/dist/src/memory/shared.js.map +1 -1
  162. package/dist/src/orchestrator/parser.js +3 -8
  163. package/dist/src/orchestrator/parser.js.map +1 -1
  164. package/dist/src/prompt/builder.js +35 -16
  165. package/dist/src/prompt/builder.js.map +1 -1
  166. package/dist/src/prompt/templates/a1-system.md +23 -1
  167. package/dist/src/reminders/jaw-reminders-bridge.js +313 -0
  168. package/dist/src/reminders/jaw-reminders-bridge.js.map +1 -0
  169. package/dist/src/reminders/types.js +7 -0
  170. package/dist/src/reminders/types.js.map +1 -0
  171. package/dist/src/routes/jaw-ceo.js +290 -0
  172. package/dist/src/routes/jaw-ceo.js.map +1 -0
  173. package/dist/src/routes/jaw-memory.js +37 -1
  174. package/dist/src/routes/jaw-memory.js.map +1 -1
  175. package/dist/src/routes/settings.js +47 -12
  176. package/dist/src/routes/settings.js.map +1 -1
  177. package/package.json +4 -1
  178. package/public/css/chat.css +90 -12
  179. package/public/css/diagram.css +9 -9
  180. package/public/css/modals.css +60 -1
  181. package/public/css/sidebar.css +18 -0
  182. package/public/dist/assets/{AdvancedExport-DJZ2VmBR.js → AdvancedExport-BAdZUC-6.js} +1 -1
  183. package/public/dist/assets/{Agent-CgpLT8IY.js → Agent-DNpehKB2.js} +1 -1
  184. package/public/dist/assets/{Browser-CrkiQoB8.js → Browser-BsdxDVgM.js} +1 -1
  185. package/public/dist/assets/{ChannelsDiscord-CVUC22D4.js → ChannelsDiscord-Dg_jto6l.js} +1 -1
  186. package/public/dist/assets/{ChannelsTelegram-DEatIQNM.js → ChannelsTelegram-DGyZfJGS.js} +1 -1
  187. package/public/dist/assets/DashboardEmbeddingSection-BYdGgqg7.js +2 -0
  188. package/public/dist/assets/{DashboardMeta-BKoxRc7i.js → DashboardMeta-CAH9ONTb.js} +1 -1
  189. package/public/dist/assets/{Display-DnNGV9Km.js → Display-DM_yvyKL.js} +1 -1
  190. package/public/dist/assets/{Employees-DZ2iJYKy.js → Employees-CuYuTy0R.js} +1 -1
  191. package/public/dist/assets/{HealthBadge-Cq2c7G9s.js → HealthBadge-Dtr-dDnw.js} +1 -1
  192. package/public/dist/assets/{Heartbeat-BML6eTXZ.js → Heartbeat-C-vq02MW.js} +1 -1
  193. package/public/dist/assets/{InlineWarn-BooBRm7o.js → InlineWarn-E64UaKFh.js} +1 -1
  194. package/public/dist/assets/{Mcp-BlEviQ3h.js → Mcp-Dlp2X7X7.js} +1 -1
  195. package/public/dist/assets/{Memory-BRyH80He.js → Memory-BPKWJDXK.js} +1 -1
  196. package/public/dist/assets/MilkdownWysiwygEditor-Ctww8i0L.js +160 -0
  197. package/public/dist/assets/{ModelProvider-DxyR7EL9.js → ModelProvider-Bd6vGkXT.js} +1 -1
  198. package/public/dist/assets/{Network-DDOOESh1.js → Network-Df1R2YcQ.js} +1 -1
  199. package/public/dist/assets/{Permissions-Br0eSbKb.js → Permissions-BKJ5K6EL.js} +1 -1
  200. package/public/dist/assets/{Permissions-QHkzStqQ.js → Permissions-CcWZoOVP.js} +1 -1
  201. package/public/dist/assets/{Profile-C79NKumk.js → Profile-DZ7xf1WZ.js} +1 -1
  202. package/public/dist/assets/{Prompts-BmiIDiXW.js → Prompts-Bh5DYt8e.js} +1 -1
  203. package/public/dist/assets/{SpeechKeys-B8304XJK.js → SpeechKeys-CQwtVxOP.js} +1 -1
  204. package/public/dist/assets/app-BxsIleo0.js +32 -0
  205. package/public/dist/assets/app-CB9n5A77.css +1 -0
  206. package/public/dist/assets/architecture-YZFGNWBL-BRI-0IaU.js +1 -0
  207. package/public/dist/assets/{architectureDiagram-Q4EWVU46-D0VjH4Hz.js → architectureDiagram-Q4EWVU46-z0JCgZrJ.js} +1 -1
  208. package/public/dist/assets/{blockDiagram-DXYQGD6D-CY4ROZPD.js → blockDiagram-DXYQGD6D-KaOz3aFS.js} +1 -1
  209. package/public/dist/assets/{c4Diagram-AHTNJAMY-CXSKBhA5.js → c4Diagram-AHTNJAMY-Bp2QLC-s.js} +1 -1
  210. package/public/dist/assets/channel-jLopKIgm.js +1 -0
  211. package/public/dist/assets/{chunk-2KRD3SAO-DKaML5Aw.js → chunk-2KRD3SAO-C8hJZPJu.js} +1 -1
  212. package/public/dist/assets/{chunk-336JU56O-CU3sZss9.js → chunk-336JU56O-CAt5aBOe.js} +1 -1
  213. package/public/dist/assets/chunk-426QAEUC-atJRhvKN.js +1 -0
  214. package/public/dist/assets/{chunk-4BX2VUAB-X0ZSlark.js → chunk-4BX2VUAB-Cm3KqBkS.js} +1 -1
  215. package/public/dist/assets/{chunk-4TB4RGXK-DxI0GIVy.js → chunk-4TB4RGXK-BD7UhIN8.js} +1 -1
  216. package/public/dist/assets/chunk-55IACEB6-CAWcPDdr.js +1 -0
  217. package/public/dist/assets/{chunk-5FUZZQ4R-BqlA0aLQ.js → chunk-5FUZZQ4R-Cg1pzs6p.js} +1 -1
  218. package/public/dist/assets/{chunk-5PVQY5BW-BVW1DG4s.js → chunk-5PVQY5BW-otv3HwE_.js} +1 -1
  219. package/public/dist/assets/{chunk-67CJDMHE-Blm2TZ-J.js → chunk-67CJDMHE-AU2iOKLT.js} +1 -1
  220. package/public/dist/assets/{chunk-7N4EOEYR-BoIOnnji.js → chunk-7N4EOEYR-BTIS4jBw.js} +1 -1
  221. package/public/dist/assets/{chunk-AA7GKIK3-Dsfi7oEW.js → chunk-AA7GKIK3-c9UUJO_T.js} +1 -1
  222. package/public/dist/assets/{chunk-BSJP7CBP-DMGz9IOn.js → chunk-BSJP7CBP-DnSYKjii.js} +1 -1
  223. package/public/dist/assets/{chunk-CIAEETIT-T5_zEp7h.js → chunk-CIAEETIT-Dwbln6rM.js} +1 -1
  224. package/public/dist/assets/{chunk-EDXVE4YY-DjfvQwok.js → chunk-EDXVE4YY-COudQKkJ.js} +1 -1
  225. package/public/dist/assets/{chunk-ENJZ2VHE-LawplD1x.js → chunk-ENJZ2VHE-PT_jAckw.js} +1 -1
  226. package/public/dist/assets/{chunk-FMBD7UC4-C7tckXtF.js → chunk-FMBD7UC4-6yXYicjw.js} +1 -1
  227. package/public/dist/assets/{chunk-FOC6F5B3-xPGbUzqY.js → chunk-FOC6F5B3-BqDmFFeg.js} +1 -1
  228. package/public/dist/assets/{chunk-ICPOFSXX-Cdp_Bt1o.js → chunk-ICPOFSXX-P6V6jqiT.js} +2 -2
  229. package/public/dist/assets/{chunk-K5T4RW27-BwIFil23.js → chunk-K5T4RW27-C42sOmZR.js} +1 -1
  230. package/public/dist/assets/{chunk-KGLVRYIC-BsNQ1OkZ.js → chunk-KGLVRYIC-K-BVa8b2.js} +1 -1
  231. package/public/dist/assets/{chunk-LIHQZDEY-DbaX7k3n.js → chunk-LIHQZDEY-Xw9ZX8of.js} +1 -1
  232. package/public/dist/assets/{chunk-ORNJ4GCN-C6D0ZHHr.js → chunk-ORNJ4GCN-CEXU6WaD.js} +1 -1
  233. package/public/dist/assets/{chunk-OYMX7WX6-C1WV9uUT.js → chunk-OYMX7WX6-DmJG2z1S.js} +1 -1
  234. package/public/dist/assets/chunk-QZHKN3VN-BkVLii_3.js +1 -0
  235. package/public/dist/assets/{chunk-U2HBQHQK-B-5yzlzA.js → chunk-U2HBQHQK-Ny6UwUgK.js} +1 -1
  236. package/public/dist/assets/{chunk-X2U36JSP-yL0Tpsl1.js → chunk-X2U36JSP-CoMFMVNF.js} +1 -1
  237. package/public/dist/assets/{chunk-XPW4576I-CeaUaSCU.js → chunk-XPW4576I-CmAz5C-j.js} +1 -1
  238. package/public/dist/assets/{chunk-YZCP3GAM-CASMOrQq.js → chunk-YZCP3GAM-c7FYtZME.js} +1 -1
  239. package/public/dist/assets/{chunk-ZZ45TVLE-B4c7TOr9.js → chunk-ZZ45TVLE-D5oxCC1O.js} +1 -1
  240. package/public/dist/assets/classDiagram-6PBFFD2Q-BgOyAynm.js +1 -0
  241. package/public/dist/assets/classDiagram-v2-HSJHXN6E-5gBdoVH9.js +1 -0
  242. package/public/dist/assets/{cose-bilkent-S5V4N54A-B21AcnwY.js → cose-bilkent-S5V4N54A-CvH6qY_r.js} +1 -1
  243. package/public/dist/assets/{dagre-DzTKkA3a.js → dagre--20B2-ZQ.js} +1 -1
  244. package/public/dist/assets/{dagre-KV5264BT-fAyzMxIJ.js → dagre-KV5264BT-CQ0wo0ma.js} +1 -1
  245. package/public/dist/assets/{diagram-5BDNPKRD-O30SB9_x.js → diagram-5BDNPKRD-Cl4PzCD0.js} +1 -1
  246. package/public/dist/assets/{diagram-G4DWMVQ6-DZ1S54sq.js → diagram-G4DWMVQ6-_aP6kMTh.js} +1 -1
  247. package/public/dist/assets/{diagram-MMDJMWI5-DRO_GSWW.js → diagram-MMDJMWI5-J1l6Q0JG.js} +1 -1
  248. package/public/dist/assets/{diagram-TYMM5635-BxWgQj5r.js → diagram-TYMM5635-B_Xoa1Gp.js} +1 -1
  249. package/public/dist/assets/{dist-W51oDoeA.js → dist-2oDfqE98.js} +1 -1
  250. package/public/dist/assets/{dist-BZosRD2u.js → dist-55MYVjjj.js} +1 -1
  251. package/public/dist/assets/dist-B1p80u1b.js +1 -0
  252. package/public/dist/assets/{dist-Bd9PlnQm.js → dist-B1rKu9eP.js} +1 -1
  253. package/public/dist/assets/{dist-Ch5VAlV9.js → dist-B6G8pbap.js} +1 -1
  254. package/public/dist/assets/{dist-CpUK8ypo.js → dist-BA7sRne4.js} +1 -1
  255. package/public/dist/assets/{dist-eU7TyC86.js → dist-BDMNMdPF.js} +1 -1
  256. package/public/dist/assets/{dist-DFYRUAjN.js → dist-BGzHP3f8.js} +1 -1
  257. package/public/dist/assets/dist-BKyzWv22.js +1 -0
  258. package/public/dist/assets/{dist-BNfXO3Yr.js → dist-BTp_Oy_x.js} +1 -1
  259. package/public/dist/assets/{dist-BD0UXfgF2.js → dist-BhzKO6nt2.js} +1 -1
  260. package/public/dist/assets/{dist-BUnPYbK3.js → dist-BjqyutOM.js} +1 -1
  261. package/public/dist/assets/dist-BoG5I6U5.js +1 -0
  262. package/public/dist/assets/{dist-yHP6L0Ty.js → dist-BuaQLcgQ.js} +1 -1
  263. package/public/dist/assets/{dist-DZsFVYF4.js → dist-C0sOT_UM.js} +5 -5
  264. package/public/dist/assets/{dist-CIuXW-sc.js → dist-C5S-Rbvc.js} +1 -1
  265. package/public/dist/assets/{dist-Db16ogVk.js → dist-C9LWf2uC.js} +1 -1
  266. package/public/dist/assets/{dist-urPTQzXL.js → dist-CCKktDoF.js} +1 -1
  267. package/public/dist/assets/{dist-D7bCuS3f.js → dist-CEDX2HGI.js} +1 -1
  268. package/public/dist/assets/dist-Ch6JG5jE.js +23 -0
  269. package/public/dist/assets/{dist-SU-YTAIg.js → dist-CkMC2PPt.js} +1 -1
  270. package/public/dist/assets/dist-CxJpXP6s.js +1 -0
  271. package/public/dist/assets/dist-DNLFuTrS.js +1 -0
  272. package/public/dist/assets/{dist-CL4PTYWf.js → dist-DdhWu7OM.js} +1 -1
  273. package/public/dist/assets/{dist-D6cUXP7K.js → dist-G7QUHtDS.js} +1 -1
  274. package/public/dist/assets/{dist-UYn7T-GH.js → dist-W7IGn2ug.js} +1 -1
  275. package/public/dist/assets/{dist-Cp42cMcI.js → dist-wdLr2dSH.js} +1 -1
  276. package/public/dist/assets/{dockerfile-zC7EsydA.js → dockerfile-CrC2HXHP.js} +1 -1
  277. package/public/dist/assets/employees-CIkIyvtL.js +33 -0
  278. package/public/dist/assets/{erDiagram-SMLLAGMA-oYlCN-2d.js → erDiagram-SMLLAGMA-BvtqhMsS.js} +1 -1
  279. package/public/dist/assets/{error-normalize-5n-zlEQ3.js → error-normalize-CkhPeQYx.js} +1 -1
  280. package/public/dist/assets/esm-BmJkIat2.js +4 -0
  281. package/public/dist/assets/{factor-DSufIRGh.js → factor-1CttFx2G.js} +1 -1
  282. package/public/dist/assets/{fields-BtncIZYA.js → fields-BISouxp2.js} +1 -1
  283. package/public/dist/assets/{flowDiagram-DWJPFMVM-er6Wfb34.js → flowDiagram-DWJPFMVM-C_F0rqqT.js} +1 -1
  284. package/public/dist/assets/{ganttDiagram-T4ZO3ILL-Co2j1qn3.js → ganttDiagram-T4ZO3ILL-B5S8EZRg.js} +1 -1
  285. package/public/dist/assets/gitGraph-7Q5UKJZL-DTTW6pxr.js +1 -0
  286. package/public/dist/assets/{gitGraphDiagram-UUTBAWPF-clYndUgV.js → gitGraphDiagram-UUTBAWPF-DMGzYJeb.js} +1 -1
  287. package/public/dist/assets/{graphlib-BjOif-SH.js → graphlib-CZk_Ii16.js} +1 -1
  288. package/public/dist/assets/idb-cache-BnZfG5FD.js +1 -0
  289. package/public/dist/assets/info-OMHHGYJF-BU-iuaSm.js +1 -0
  290. package/public/dist/assets/{infoDiagram-42DDH7IO-uYs7OoSA.js → infoDiagram-42DDH7IO-dzSaYFFK.js} +1 -1
  291. package/public/dist/assets/{ishikawaDiagram-UXIWVN3A-32bIEtCb.js → ishikawaDiagram-UXIWVN3A-DZW-Nqsf.js} +1 -1
  292. package/public/dist/assets/javascript-BhB45e0W.js +1 -0
  293. package/public/dist/assets/{journeyDiagram-VCZTEJTY-hBNsU7mK.js → journeyDiagram-VCZTEJTY-ByVRJxVF.js} +1 -1
  294. package/public/dist/assets/{kanban-definition-6JOO6SKY-DoepMHBI.js → kanban-definition-6JOO6SKY-xwN0YCW2.js} +1 -1
  295. package/public/dist/assets/katex-DamPUmTE.js +1 -0
  296. package/public/dist/assets/manager-B84u-pcn.js +25 -0
  297. package/public/dist/assets/manager-DMg_sTEP.css +1 -0
  298. package/public/dist/assets/memory-BV62wlsG.js +1 -0
  299. package/public/dist/assets/{memory-dJGp6QBv.js → memory-CnBc2_Va.js} +1 -1
  300. package/public/dist/assets/mermaid-loader-DxFGz4EE.js +1 -0
  301. package/public/dist/assets/{mermaid-parser.core-CrXy-45O.js → mermaid-parser.core-CMIZ0my_.js} +1 -1
  302. package/public/dist/assets/mermaid-preprocess-p7OIpOon.js +5 -0
  303. package/public/dist/assets/mermaid.core-CicVBD9l.js +1 -0
  304. package/public/dist/assets/{mermaid.core-DYApH8sc.js → mermaid.core-Dj6viEzN.js} +2 -2
  305. package/public/dist/assets/{mindmap-definition-QFDTVHPH-C-QWWjaf.js → mindmap-definition-QFDTVHPH-Chqgsh1N.js} +1 -1
  306. package/public/dist/assets/{nsis-DLskXEqR.js → nsis-_CjIiUyF.js} +1 -1
  307. package/public/dist/assets/packet-4T2RLAQJ-DzmBsAf0.js +1 -0
  308. package/public/dist/assets/{page-shell-D5tbivHH.js → page-shell-CTxVDJ8Y.js} +1 -1
  309. package/public/dist/assets/pie-ZZUOXDRM-DyG1KzTn.js +1 -0
  310. package/public/dist/assets/{pieDiagram-DEJITSTG-DvMWxH5R.js → pieDiagram-DEJITSTG-DJLiSymi.js} +1 -1
  311. package/public/dist/assets/{pug-B2rz0Rz1.js → pug-CbR8lCtK.js} +1 -1
  312. package/public/dist/assets/{quadrantDiagram-34T5L4WZ-DjoQDyzO.js → quadrantDiagram-34T5L4WZ-qcnWmcRr.js} +1 -1
  313. package/public/dist/assets/radar-PYXPWWZC-CEBZARUu.js +1 -0
  314. package/public/dist/assets/render-lpTpN1El.js +28 -0
  315. package/public/dist/assets/{requirementDiagram-MS252O5E-sQav3xIA.js → requirementDiagram-MS252O5E-wnPtv0LG.js} +1 -1
  316. package/public/dist/assets/{sankeyDiagram-XADWPNL6-DkdEFMeo.js → sankeyDiagram-XADWPNL6-Bn3pUd_K.js} +1 -1
  317. package/public/dist/assets/{sequenceDiagram-FGHM5R23-kaplo282.js → sequenceDiagram-FGHM5R23-DfxcHSdj.js} +1 -1
  318. package/public/dist/assets/settings-CfAXLa8a.js +1 -0
  319. package/public/dist/assets/{settings-C7QWaUHB.js → settings-FWgmcubl.js} +8 -8
  320. package/public/dist/assets/sidebar-Cwt0FxQl.js +14 -0
  321. package/public/dist/assets/skills-D-qUVJ-e.js +1 -0
  322. package/public/dist/assets/{skills-CHkTgM7L.js → skills-DDmTyywh.js} +2 -2
  323. package/public/dist/assets/slash-commands-BfI19vIz.js +1 -0
  324. package/public/dist/assets/{slash-commands-2ThyUGvX.js → slash-commands-D5y5AVvS.js} +1 -1
  325. package/public/dist/assets/{stateDiagram-FHFEXIEX-B2L3h2aE.js → stateDiagram-FHFEXIEX-CiR7P2OG.js} +1 -1
  326. package/public/dist/assets/stateDiagram-v2-QKLJ7IA2-BaWWpysK.js +1 -0
  327. package/public/dist/assets/{timeline-definition-GMOUNBTQ-_Nnp2LU-.js → timeline-definition-GMOUNBTQ-DUz1-iOx.js} +1 -1
  328. package/public/dist/assets/{trace-drawer-Dis80M6X.js → trace-drawer-DVF5F1df.js} +1 -1
  329. package/public/dist/assets/treeView-SZITEDCU-D5-TP7Qp.js +1 -0
  330. package/public/dist/assets/treemap-W4RFUUIX-BQhm_ZSp.js +1 -0
  331. package/public/dist/assets/ui-BJXY16Dk.js +140 -0
  332. package/public/dist/assets/ui-BXm3OPPh.js +1 -0
  333. package/public/dist/assets/{vendor-render-984tPmpy.js → vendor-render-DEStnpJ8.js} +22 -22
  334. package/public/dist/assets/{vennDiagram-DHZGUBPP-vNU8EDoW.js → vennDiagram-DHZGUBPP-CYu7SDdG.js} +1 -1
  335. package/public/dist/assets/wardley-RL74JXVD-CpnBMRe0.js +1 -0
  336. package/public/dist/assets/{wardleyDiagram-NUSXRM2D-DB2wK0zr.js → wardleyDiagram-NUSXRM2D-CLAhOzap.js} +1 -1
  337. package/public/dist/assets/wiki-link-suggestions-LQuYT22G.js +23 -0
  338. package/public/dist/assets/{xychartDiagram-5P7HB3ND-CisgDiJM.js → xychartDiagram-5P7HB3ND-DLnY9i8z.js} +1 -1
  339. package/public/dist/index.html +36 -12
  340. package/public/dist/manager/index.html +2 -2
  341. package/public/index.html +34 -10
  342. package/public/js/features/chat-messages.ts +132 -0
  343. package/public/js/features/chat-scroll.ts +226 -0
  344. package/public/js/features/employees.ts +4 -1
  345. package/public/js/features/help-content.ts +11 -1
  346. package/public/js/features/help-dialog.ts +78 -17
  347. package/public/js/features/message-actions.ts +157 -0
  348. package/public/js/features/message-history.ts +138 -0
  349. package/public/js/features/message-item-html.ts +34 -0
  350. package/public/js/features/preview-shortcut-bridge.ts +29 -0
  351. package/public/js/features/process-block-dom.ts +175 -0
  352. package/public/js/features/process-log-adapter.ts +104 -0
  353. package/public/js/features/settings-cli-status.ts +52 -1
  354. package/public/js/features/settings.ts +1 -0
  355. package/public/js/features/sidebar.ts +7 -1
  356. package/public/js/features/ui-status.ts +47 -0
  357. package/public/js/main.ts +10 -3
  358. package/public/js/render/code-copy.ts +47 -0
  359. package/public/js/render/delegations.ts +10 -0
  360. package/public/js/render/file-links.ts +150 -0
  361. package/public/js/render/highlight.ts +83 -0
  362. package/public/js/render/html.ts +26 -0
  363. package/public/js/render/markdown.ts +84 -0
  364. package/public/js/render/math.ts +76 -0
  365. package/public/js/render/mermaid-preprocess.ts +77 -0
  366. package/public/js/render/mermaid.ts +267 -0
  367. package/public/js/render/post-render.ts +35 -0
  368. package/public/js/render/sanitize.ts +51 -0
  369. package/public/js/render/svg-actions.ts +291 -0
  370. package/public/js/render.ts +17 -1081
  371. package/public/js/ui.ts +23 -841
  372. package/public/js/virtual-scroll-bootstrap.ts +18 -5
  373. package/public/js/virtual-scroll.ts +17 -0
  374. package/public/js/ws.ts +5 -0
  375. package/public/locales/en.json +76 -1
  376. package/public/locales/ja.json +74 -1
  377. package/public/locales/ko.json +76 -1
  378. package/public/locales/zh.json +74 -1
  379. package/public/manager/src/App.tsx +143 -258
  380. package/public/manager/src/AppChrome.tsx +144 -0
  381. package/public/manager/src/InstancePreview.tsx +18 -0
  382. package/public/manager/src/SidebarRailRouter.tsx +229 -0
  383. package/public/manager/src/components/ActivityTimeline.tsx +9 -1
  384. package/public/manager/src/components/ProcessControlPanel.tsx +3 -0
  385. package/public/manager/src/components/SidebarRail.tsx +22 -0
  386. package/public/manager/src/components/Workbench.tsx +17 -13
  387. package/public/manager/src/components/WorkbenchHeader.tsx +44 -33
  388. package/public/manager/src/components/WorkspaceLayout.tsx +3 -0
  389. package/public/manager/src/dashboard-board/DashboardBoardSidebar.tsx +1 -1
  390. package/public/manager/src/dashboard-board/DashboardBoardWorkspace.tsx +6 -0
  391. package/public/manager/src/dashboard-features.ts +4 -1
  392. package/public/manager/src/dashboard-reminders/DashboardRemindersSidebar.tsx +157 -0
  393. package/public/manager/src/dashboard-reminders/DashboardRemindersWorkspace.tsx +502 -0
  394. package/public/manager/src/dashboard-reminders/InlineReminderTitle.tsx +78 -0
  395. package/public/manager/src/dashboard-reminders/ReminderDetailPopover.tsx +118 -0
  396. package/public/manager/src/dashboard-reminders/reminder-order.ts +45 -0
  397. package/public/manager/src/dashboard-reminders/reminders-api.ts +126 -0
  398. package/public/manager/src/dashboard-reminders/reminders-view-model.ts +63 -0
  399. package/public/manager/src/dashboard-reminders/useDashboardReminderDrag.ts +55 -0
  400. package/public/manager/src/dashboard-reminders/useRemindersFeed.ts +72 -0
  401. package/public/manager/src/dashboard-schedule/DashboardScheduleWorkspace.tsx +10 -4
  402. package/public/manager/src/dashboard-settings/DashboardEmbeddingSection.tsx +350 -0
  403. package/public/manager/src/dashboard-settings/DashboardSettingsSidebar.tsx +6 -2
  404. package/public/manager/src/dashboard-settings/DashboardSettingsWorkspace.tsx +217 -6
  405. package/public/manager/src/dashboard-settings/dashboard-settings-ui.ts +2 -0
  406. package/public/manager/src/dashboard-url-state.ts +15 -0
  407. package/public/manager/src/help/HelpDrawer.tsx +5 -6
  408. package/public/manager/src/help/HelpTopicButton.tsx +23 -0
  409. package/public/manager/src/help/help-shortcuts.ts +7 -0
  410. package/public/manager/src/help/helpContent.tsx +155 -5
  411. package/public/manager/src/hooks/useDashboardView.ts +12 -1
  412. package/public/manager/src/hooks/useInstanceMessageEvents.ts +3 -1
  413. package/public/manager/src/jaw-ceo/JawCeoConsole.tsx +108 -0
  414. package/public/manager/src/jaw-ceo/JawCeoConsolePanels.tsx +331 -0
  415. package/public/manager/src/jaw-ceo/JawCeoSettingsPanel.tsx +94 -0
  416. package/public/manager/src/jaw-ceo/JawCeoTabs.tsx +28 -0
  417. package/public/manager/src/jaw-ceo/JawCeoVoiceOverlay.tsx +34 -0
  418. package/public/manager/src/jaw-ceo/JawCeoWorkbenchButton.tsx +61 -0
  419. package/public/manager/src/jaw-ceo/api.ts +169 -0
  420. package/public/manager/src/jaw-ceo/jaw-ceo-console.css +481 -0
  421. package/public/manager/src/jaw-ceo/jaw-ceo-virtual.css +24 -0
  422. package/public/manager/src/jaw-ceo/jaw-ceo.css +429 -0
  423. package/public/manager/src/jaw-ceo/types.ts +164 -0
  424. package/public/manager/src/jaw-ceo/useJawCeo.ts +235 -0
  425. package/public/manager/src/jaw-ceo/useJawCeoConsoleModel.ts +67 -0
  426. package/public/manager/src/jaw-ceo/useJawCeoDashboardBridge.tsx +76 -0
  427. package/public/manager/src/jaw-ceo/useJawCeoVirtualTimeline.ts +109 -0
  428. package/public/manager/src/jaw-ceo/useJawCeoVoice.ts +219 -0
  429. package/public/manager/src/jaw-ceo/voice-cues.ts +34 -0
  430. package/public/manager/src/jaw-ceo/voice-session.ts +87 -0
  431. package/public/manager/src/main.tsx +10 -0
  432. package/public/manager/src/manager-components.css +7 -0
  433. package/public/manager/src/manager-dashboard-board-sidebar-scroll.css +64 -0
  434. package/public/manager/src/manager-dashboard-reminders-parity.css +156 -0
  435. package/public/manager/src/manager-dashboard-reminders-priority.css +164 -0
  436. package/public/manager/src/manager-dashboard-reminders.css +482 -0
  437. package/public/manager/src/manager-dashboard-schedule.css +12 -0
  438. package/public/manager/src/manager-dashboard-settings.css +16 -2
  439. package/public/manager/src/manager-help.css +27 -0
  440. package/public/manager/src/manager-layout.css +19 -0
  441. package/public/manager/src/manager-notes.css +13 -4
  442. package/public/manager/src/manager-p0-1-1.css +3 -3
  443. package/public/manager/src/manager-polish.css +7 -3
  444. package/public/manager/src/manager-shortcuts.ts +116 -0
  445. package/public/manager/src/notes/MarkdownEditor.tsx +20 -3
  446. package/public/manager/src/notes/MarkdownPreview.tsx +10 -1
  447. package/public/manager/src/notes/NotesFrontmatterStrip.tsx +61 -0
  448. package/public/manager/src/notes/NotesQuickSwitcher.tsx +187 -0
  449. package/public/manager/src/notes/NotesSidebar.tsx +36 -14
  450. package/public/manager/src/notes/NotesWorkspace.tsx +63 -4
  451. package/public/manager/src/notes/frontmatter-preview.ts +16 -0
  452. package/public/manager/src/notes/notes-quick-switcher.css +151 -0
  453. package/public/manager/src/notes/notes-tags.css +292 -0
  454. package/public/manager/src/notes/notes-types.ts +4 -0
  455. package/public/manager/src/notes/rendering/MarkdownRenderer.tsx +67 -3
  456. package/public/manager/src/notes/rendering/MermaidBlock.tsx +11 -1
  457. package/public/manager/src/notes/useNoteDocument.ts +14 -2
  458. package/public/manager/src/notes/useNotesModel.ts +39 -2
  459. package/public/manager/src/notes/wiki-link-codemirror-completion.ts +55 -0
  460. package/public/manager/src/notes/wiki-link-rendering.ts +129 -0
  461. package/public/manager/src/notes/wiki-link-resolver.ts +220 -0
  462. package/public/manager/src/notes/wiki-link-suggestions.ts +153 -0
  463. package/public/manager/src/notes/wysiwyg/MilkdownWysiwygEditor.tsx +126 -79
  464. package/public/manager/src/notes/wysiwyg/WysiwygFrontmatterPanel.tsx +93 -0
  465. package/public/manager/src/notes/wysiwyg/milkdown-code-block-view.ts +11 -0
  466. package/public/manager/src/notes/wysiwyg/milkdown-editor-utils.ts +32 -0
  467. package/public/manager/src/notes/wysiwyg/milkdown-math.ts +9 -0
  468. package/public/manager/src/notes/wysiwyg/milkdown-wikilink-completion.ts +195 -0
  469. package/public/manager/src/notes/wysiwyg/milkdown-wikilink-plugin.ts +152 -0
  470. package/public/manager/src/notes/wysiwyg/milkdown-wysiwyg-types.ts +13 -0
  471. package/public/manager/src/notes/wysiwyg/wysiwyg-fixtures.ts +4 -0
  472. package/public/manager/src/notes/wysiwyg/wysiwyg-frontmatter.ts +155 -0
  473. package/public/manager/src/settings/pages/Embedding.tsx +382 -0
  474. package/public/manager/src/settings-embedding.css +168 -0
  475. package/public/manager/src/types.ts +12 -2
  476. package/scripts/install-officecli.sh +3 -1
  477. package/scripts/install-wsl.sh +65 -11
  478. package/public/dist/assets/MilkdownWysiwygEditor-DIebNZF7.js +0 -52
  479. package/public/dist/assets/app-CphocJzo.css +0 -1
  480. package/public/dist/assets/app-DJ8ys0j5.js +0 -32
  481. package/public/dist/assets/architecture-YZFGNWBL-VpdnYwVC.js +0 -1
  482. package/public/dist/assets/channel-xhp7drfS.js +0 -1
  483. package/public/dist/assets/chunk-426QAEUC-DadS7Aoc.js +0 -1
  484. package/public/dist/assets/chunk-55IACEB6-Cr281urY.js +0 -1
  485. package/public/dist/assets/chunk-QZHKN3VN-BYRU3VjK.js +0 -1
  486. package/public/dist/assets/classDiagram-6PBFFD2Q-Brk35lpl.js +0 -1
  487. package/public/dist/assets/classDiagram-v2-HSJHXN6E-CVZHK0Hg.js +0 -1
  488. package/public/dist/assets/dist-BsT5UdNP.js +0 -1
  489. package/public/dist/assets/dist-ClqO40BE.js +0 -1
  490. package/public/dist/assets/dist-CxeLAw2Y.js +0 -1
  491. package/public/dist/assets/dist-D2SH8nxa.js +0 -1
  492. package/public/dist/assets/dist-DfodGES_.js +0 -23
  493. package/public/dist/assets/dist-l9HH00ip.js +0 -1
  494. package/public/dist/assets/employees-RJ_wRL09.js +0 -33
  495. package/public/dist/assets/gitGraph-7Q5UKJZL-CBKRRUZJ.js +0 -1
  496. package/public/dist/assets/idb-cache-C5ilDI6r.js +0 -1
  497. package/public/dist/assets/info-OMHHGYJF-BqzRlF_E.js +0 -1
  498. package/public/dist/assets/insert-image-markdown-kk053MvN.js +0 -22
  499. package/public/dist/assets/javascript-DT-6B2IU.js +0 -1
  500. package/public/dist/assets/katex-CS4w7U2j.js +0 -1
  501. package/public/dist/assets/manager-DAe38I94.js +0 -25
  502. package/public/dist/assets/manager-fQR46YFa.css +0 -1
  503. package/public/dist/assets/memory-w3yQettQ.js +0 -1
  504. package/public/dist/assets/mermaid-loader-BEFIOoJn.js +0 -1
  505. package/public/dist/assets/mermaid.core-D0tXHgVC.js +0 -1
  506. package/public/dist/assets/packet-4T2RLAQJ-D7VqJs5z.js +0 -1
  507. package/public/dist/assets/pie-ZZUOXDRM-FbISwuBg.js +0 -1
  508. package/public/dist/assets/radar-PYXPWWZC-CLzM3m4R.js +0 -1
  509. package/public/dist/assets/render-KVGsbWj1.js +0 -31
  510. package/public/dist/assets/settings-DmUCo6lz.js +0 -1
  511. package/public/dist/assets/skills-SxG_nfwn.js +0 -1
  512. package/public/dist/assets/slash-commands-BxJkKdhB.js +0 -1
  513. package/public/dist/assets/stateDiagram-v2-QKLJ7IA2-DScAhoyh.js +0 -1
  514. package/public/dist/assets/treeView-SZITEDCU-HJajkeQK.js +0 -1
  515. package/public/dist/assets/treemap-W4RFUUIX-CsRQ896G.js +0 -1
  516. package/public/dist/assets/ui-LhD1VfQs.js +0 -1
  517. package/public/dist/assets/ui-kS1ZJfez.js +0 -143
  518. package/public/dist/assets/wardley-RL74JXVD-DMQFnlJp.js +0 -1
  519. package/public/dist/assets/ws-DVE3eWRj.js +0 -14
  520. /package/public/dist/assets/{agent-meta-DHddpWHQ.js → agent-meta-C1pQzExf.js} +0 -0
  521. /package/public/dist/assets/{apl-1H3fJ-n9.js → apl-HYRstREL.js} +0 -0
  522. /package/public/dist/assets/{asciiarmor-_1f4lqIZ.js → asciiarmor-BDXCrhAK.js} +0 -0
  523. /package/public/dist/assets/{asn1-B_wp1Pdt.js → asn1-CnSBhb0M.js} +0 -0
  524. /package/public/dist/assets/{asterisk-9Hxmlnbz.js → asterisk-AqV7rnIi.js} +0 -0
  525. /package/public/dist/assets/{brainfuck-C-PAVNT8.js → brainfuck-Dv46-iL9.js} +0 -0
  526. /package/public/dist/assets/{chunk-AGHRB4JF-EroDCcEL.js → chunk-AGHRB4JF-DIMn8T3_.js} +0 -0
  527. /package/public/dist/assets/{clike-DAVXDhrz.js → clike-GRffz5hY.js} +0 -0
  528. /package/public/dist/assets/{clojure-BIpQu4v4.js → clojure-DzgT_fqE.js} +0 -0
  529. /package/public/dist/assets/{cmake-YlOBEvgc.js → cmake-Co1237r5.js} +0 -0
  530. /package/public/dist/assets/{cobol-CU8lw6mH.js → cobol-rUaLketb.js} +0 -0
  531. /package/public/dist/assets/{coffeescript-DKG8mABL.js → coffeescript-DQyfHE86.js} +0 -0
  532. /package/public/dist/assets/{commonlisp-CbWboHR_.js → commonlisp-Buue1PGW.js} +0 -0
  533. /package/public/dist/assets/{constants-CYjOMbjf.js → constants-4A2GptQT.js} +0 -0
  534. /package/public/dist/assets/{crystal-WWs3Njra.js → crystal-BMWO0kOJ.js} +0 -0
  535. /package/public/dist/assets/{css-C9qNtc8P.js → css-DaxibPo5.js} +0 -0
  536. /package/public/dist/assets/{cypher-DglnWVZO.js → cypher-CmpGfiBR.js} +0 -0
  537. /package/public/dist/assets/{cytoscape.esm-BH6rhG9A.js → cytoscape.esm-zT8GwLFm.js} +0 -0
  538. /package/public/dist/assets/{d-DiNW6jcC.js → d-qmdtoIzU.js} +0 -0
  539. /package/public/dist/assets/{diff-PxsoX0eK.js → diff-B40m6u1h.js} +0 -0
  540. /package/public/dist/assets/{dist-BRFvH5ne.js → dist-BJyDhGpS.js} +0 -0
  541. /package/public/dist/assets/{dtd-BSiaE0hE.js → dtd-569ynYVj.js} +0 -0
  542. /package/public/dist/assets/{dylan-GcUJt0a5.js → dylan-Dxolp30i.js} +0 -0
  543. /package/public/dist/assets/{ebnf-DSIN9Ycp.js → ebnf-BZiX9Iq3.js} +0 -0
  544. /package/public/dist/assets/{ecl-LP9l5g0J.js → ecl-B8F1Q0oZ.js} +0 -0
  545. /package/public/dist/assets/{eiffel-CqpH5qaY.js → eiffel-Bv8Kvgh1.js} +0 -0
  546. /package/public/dist/assets/{elm-Dw3cJ7hz.js → elm-QWXQaIis.js} +0 -0
  547. /package/public/dist/assets/{erlang-DL9rpJep.js → erlang-CuDGzTGm.js} +0 -0
  548. /package/public/dist/assets/{fcl-DUmfTiJ7.js → fcl-BiFeqtHf.js} +0 -0
  549. /package/public/dist/assets/{forth-BSp-YOKj.js → forth-R7Uc2VcL.js} +0 -0
  550. /package/public/dist/assets/{fortran-BtIRmo6s.js → fortran-kDRG6BzW.js} +0 -0
  551. /package/public/dist/assets/{gas-okqIRy8I.js → gas-CyRkuC5T.js} +0 -0
  552. /package/public/dist/assets/{gherkin-DIlSAX9i.js → gherkin-BE0p00ey.js} +0 -0
  553. /package/public/dist/assets/{groovy-Dn6VQ7le.js → groovy-B_Sh3D1t.js} +0 -0
  554. /package/public/dist/assets/{haskell-DxXJRRAf.js → haskell-DWXgCy4o.js} +0 -0
  555. /package/public/dist/assets/{haxe-Cf0nItU4.js → haxe-xGxZ54Hv.js} +0 -0
  556. /package/public/dist/assets/{http-C3zQeWFV.js → http-CKv9cSBA.js} +0 -0
  557. /package/public/dist/assets/{idb-cache-CjnC_K0x.js → idb-cache-CZ3JdK8r.js} +0 -0
  558. /package/public/dist/assets/{idl-BvqkcZq5.js → idl-DmlI3XzS.js} +0 -0
  559. /package/public/dist/assets/{javascript-D1nkUbtD.js → javascript-j6r5uf_k.js} +0 -0
  560. /package/public/dist/assets/{jsx-runtime-DOs-BiPY.js → jsx-runtime-BjL7qHh8.js} +0 -0
  561. /package/public/dist/assets/{julia-CCUCEuMJ.js → julia-CQSp9Qa0.js} +0 -0
  562. /package/public/dist/assets/{livescript-DJ-6Zja2.js → livescript-CqvtVTlb.js} +0 -0
  563. /package/public/dist/assets/{locale-f397XJgr.js → locale-BHMJIzyw.js} +0 -0
  564. /package/public/dist/assets/{lua-CxE7YJaJ.js → lua-DazQKUZ0.js} +0 -0
  565. /package/public/dist/assets/{mathematica-oNEp3xtK.js → mathematica-DqhJVCs9.js} +0 -0
  566. /package/public/dist/assets/{mbox-AvjHxuWl.js → mbox-Dsyo1_UL.js} +0 -0
  567. /package/public/dist/assets/{mirc-CiJGiXcS.js → mirc-D7ThhoF-.js} +0 -0
  568. /package/public/dist/assets/{mllike-CV8oQtvy.js → mllike-EPZ6pqQD.js} +0 -0
  569. /package/public/dist/assets/{modelica-M4BAagfL.js → modelica-PU45hbqg.js} +0 -0
  570. /package/public/dist/assets/{mscgen-3QXoaqEl.js → mscgen-DEnh2Ojr.js} +0 -0
  571. /package/public/dist/assets/{mumps-BZoVj2VG.js → mumps-8GhR7rRa.js} +0 -0
  572. /package/public/dist/assets/{nginx-CBycrar_.js → nginx-CXwagpwp.js} +0 -0
  573. /package/public/dist/assets/{ntriples-BzBBWYSl.js → ntriples-BDQxxstw.js} +0 -0
  574. /package/public/dist/assets/{octave-BeIsGSMy.js → octave-2c90WnyU.js} +0 -0
  575. /package/public/dist/assets/{oz-DdNR63iD.js → oz-CO0rQ8EL.js} +0 -0
  576. /package/public/dist/assets/{pascal-BvmM4Y7z.js → pascal-CcVwOGeN.js} +0 -0
  577. /package/public/dist/assets/{path-utils-BuEEtj9w.js → path-utils-DySmCVZK.js} +0 -0
  578. /package/public/dist/assets/{perl-DFibaVbf.js → perl-B9UvGoAV.js} +0 -0
  579. /package/public/dist/assets/{pig-DyLcrln-.js → pig-Cd1f86ZJ.js} +0 -0
  580. /package/public/dist/assets/{powershell-CDOpEwhN.js → powershell-DV4cOnkJ.js} +0 -0
  581. /package/public/dist/assets/{preload-helper-CMqhPRCH.js → preload-helper-DuH3-WbD.js} +0 -0
  582. /package/public/dist/assets/{properties-Ju2yMwi3.js → properties-DaSVPhrZ.js} +0 -0
  583. /package/public/dist/assets/{protobuf-CfKx2SfO.js → protobuf-CEtFnY22.js} +0 -0
  584. /package/public/dist/assets/{puppet-dmjzqANu.js → puppet-Ca0DHfcW.js} +0 -0
  585. /package/public/dist/assets/{python-D9BZyYi1.js → python-ydzCwWG-.js} +0 -0
  586. /package/public/dist/assets/{q-C68SC4ma.js → q-Cl8kzQmk.js} +0 -0
  587. /package/public/dist/assets/{r-DP6KYC7N.js → r-DKZPJFrD.js} +0 -0
  588. /package/public/dist/assets/{rough.esm-BRGGwqOp.js → rough.esm-Dnk3WN4D.js} +0 -0
  589. /package/public/dist/assets/{rpm-DH2Z4z_v.js → rpm-D0lqeHoZ.js} +0 -0
  590. /package/public/dist/assets/{ruby-CwiqsW2a.js → ruby-RVmtmNDw.js} +0 -0
  591. /package/public/dist/assets/{sas-Btq5K1IU.js → sas-CEzodAB7.js} +0 -0
  592. /package/public/dist/assets/{scheme-BvG_RNGf.js → scheme-Pqmt6dh3.js} +0 -0
  593. /package/public/dist/assets/{settings-client-ajlwI-oK.js → settings-client-BN3XzwEo.js} +0 -0
  594. /package/public/dist/assets/{shell-waWIPbLL.js → shell-CLG3zy-u.js} +0 -0
  595. /package/public/dist/assets/{sieve-wIycBENd.js → sieve-C95IWC3O.js} +0 -0
  596. /package/public/dist/assets/{simple-mode-lHvrAolQ.js → simple-mode-B9ErAHMD.js} +0 -0
  597. /package/public/dist/assets/{smalltalk-SHoYQOtw.js → smalltalk-4cL-gRJb.js} +0 -0
  598. /package/public/dist/assets/{solr-D1Apesak.js → solr-CEA7oOx_.js} +0 -0
  599. /package/public/dist/assets/{sparql-BJozOrmN.js → sparql-w8kHjP6I.js} +0 -0
  600. /package/public/dist/assets/{spreadsheet-71jLW2fq.js → spreadsheet-C8bDfTgC.js} +0 -0
  601. /package/public/dist/assets/{sql-BaHU6gLz.js → sql-BrKz8968.js} +0 -0
  602. /package/public/dist/assets/{stex-BuVGLRtt.js → stex-xFw1nXeT.js} +0 -0
  603. /package/public/dist/assets/{stylus-Cqweyusm.js → stylus-gS_68vPk.js} +0 -0
  604. /package/public/dist/assets/{swift-Dx3m4XfV.js → swift-D5lXmY2d.js} +0 -0
  605. /package/public/dist/assets/{tcl-5yXjCZ8e.js → tcl-D-41REtC.js} +0 -0
  606. /package/public/dist/assets/{textile-9HVfsYV6.js → textile-D-Znao0j.js} +0 -0
  607. /package/public/dist/assets/{tiddlywiki-DlSf8L__.js → tiddlywiki-Co8lXJKd.js} +0 -0
  608. /package/public/dist/assets/{tiki-CDZRH0A4.js → tiki-DsiNRYMP.js} +0 -0
  609. /package/public/dist/assets/{toml-BgjfE0Y7.js → toml-CaVZGou4.js} +0 -0
  610. /package/public/dist/assets/{troff-B4ZrJIrZ.js → troff-DJvDVr-d.js} +0 -0
  611. /package/public/dist/assets/{ttcn-BJIiaYhP.js → ttcn-DAC92l4d.js} +0 -0
  612. /package/public/dist/assets/{ttcn-cfg-PZp_QKQg.js → ttcn-cfg-C0X-mYlr.js} +0 -0
  613. /package/public/dist/assets/{turtle--ft5y7IN.js → turtle-D6WHyCrL.js} +0 -0
  614. /package/public/dist/assets/{vb-DL6cecZs.js → vb-CEo_ccq3.js} +0 -0
  615. /package/public/dist/assets/{vbscript-Bb1xiv7E.js → vbscript-B_PKDV1v.js} +0 -0
  616. /package/public/dist/assets/{velocity-DKS9ZfbJ.js → velocity-ClKnKBLH.js} +0 -0
  617. /package/public/dist/assets/{vendor-utils-CWelFt6C.js → vendor-utils-IVTPs69f.js} +0 -0
  618. /package/public/dist/assets/{verilog-DSfhYFaT.js → verilog-Pnuspgw6.js} +0 -0
  619. /package/public/dist/assets/{vhdl-CFTSUmh9.js → vhdl-CZnyY4fs.js} +0 -0
  620. /package/public/dist/assets/{w3c-keyname-IiiZScED.js → w3c-keyname-DJlC6DTY.js} +0 -0
  621. /package/public/dist/assets/{webidl-C-IpKmuN.js → webidl-DHr762Dm.js} +0 -0
  622. /package/public/dist/assets/{xquery-9pXYEith.js → xquery-5-FiyUtN.js} +0 -0
  623. /package/public/dist/assets/{yacas-CqSYoSTv.js → yacas-GlqsXIeT.js} +0 -0
  624. /package/public/dist/assets/{z80-BltHQfm4.js → z80-CI7N40Oo.js} +0 -0
@@ -0,0 +1,25 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-render-Bjnw0wQ6.css"])))=>i.map(i=>d[i]);
2
+ import{o as e,r as t,t as n}from"./rolldown-runtime-DE9SaGGd.js";import{A as r}from"./vendor-render-DEStnpJ8.js";import{t as i}from"./preload-helper-DuH3-WbD.js";import{n as a,t as o}from"./mermaid-preprocess-p7OIpOon.js";import{a as s,i as c,n as l,r as u,t as d}from"./esm-BmJkIat2.js";import{n as f,t as p}from"./jsx-runtime-BjL7qHh8.js";import{$ as m,A as h,B as g,D as _,E as v,G as y,H as b,I as x,J as S,K as ee,L as te,M as C,N as ne,O as re,P as ie,Q as ae,U as oe,V as se,W as ce,X as le,Y as w,Z as T,_ as ue,a as de,at as fe,b as pe,c as me,d as E,et as he,f as ge,g as _e,h as ve,i as ye,it as be,j as xe,k as Se,l as Ce,m as we,n as Te,nt as Ee,ot as De,p as D,q as Oe,r as ke,rt as Ae,t as je,tt as Me,u as Ne,v as Pe,y as Fe}from"./wiki-link-suggestions-LQuYT22G.js";import{n as Ie}from"./settings-client-BN3XzwEo.js";import{t as Le}from"./error-normalize-CkhPeQYx.js";import{$ as Re,A as ze,At as Be,B as Ve,Ct as He,Dt as Ue,E as We,F as Ge,Ft as O,It as Ke,J as qe,Lt as Je,M as Ye,Mt as Xe,Nt as Ze,O as Qe,P as $e,Pt as et,Q as tt,R as k,Rt as nt,S as rt,St as it,T as at,Tt as ot,X as st,Y as A,Z as ct,_t as lt,a as ut,at as dt,b as ft,bt as j,ct as pt,dt as mt,et as ht,f as gt,ft as _t,g as vt,gt as yt,it as bt,jt as xt,k as St,kt as Ct,l as M,mt as wt,o as Tt,ot as Et,p as Dt,pt as Ot,q as kt,rt as At,st as jt,tt as Mt,u as Nt,ut as Pt,vt as Ft,xt as N,yt as It}from"./dist-BA7sRne4.js";import{c as Lt,i as Rt,l as zt,n as Bt,o as Vt,r as Ht}from"./dist-BoG5I6U5.js";import{a as Ut}from"./dist-BTp_Oy_x.js";var Wt=n((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,ie());else{var t=n(l);t!==null&&se(x,t.startTime-e)}}var S=!1,ee=-1,te=5,C=-1;function ne(){return g?!0:!(e.unstable_now()-C<te)}function re(){if(g=!1,S){var t=e.unstable_now();C=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(ee),ee=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&se(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():S=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=re,ie=function(){oe.postMessage(null)}}else ie=function(){_(re,0)};function se(t,n){ee=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):te=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(ee),ee=-1):h=!0,se(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ie()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Gt=n(((e,t)=>{t.exports=Wt()})),Kt=n((e=>{var t=f();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.5`})),qt=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Kt()})),Jt=n((e=>{var t=Gt(),n=f(),r=qt();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),te=Symbol.for(`react.suspense_list`),C=Symbol.for(`react.memo`),ne=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),ie=Symbol.for(`react.memo_cache_sentinel`),ae=Symbol.iterator;function oe(e){return typeof e!=`object`||!e?null:(e=ae&&e[ae]||e[`@@iterator`],typeof e==`function`?e:null)}var se=Symbol.for(`react.client.reference`);function ce(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===se?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case ee:return`Suspense`;case te:return`SuspenseList`;case re:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case C:return t=e.displayName||null,t===null?ce(e.type)||`Memo`:t;case ne:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var le=Array.isArray,w=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},de=[],fe=-1;function pe(e){return{current:e}}function me(e){0>fe||(e.current=de[fe],de[fe]=null,fe--)}function E(e,t){fe++,de[fe]=e.current,e.current=t}var he=pe(null),ge=pe(null),_e=pe(null),ve=pe(null);function ye(e,t){switch(E(_e,t),E(ge,e),E(he,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}me(he),E(he,e)}function be(){me(he),me(ge),me(_e)}function xe(e){e.memoizedState!==null&&E(ve,e);var t=he.current,n=Hd(t,e.type);t!==n&&(E(ge,e),E(he,n))}function Se(e){ge.current===e&&(me(he),me(ge)),ve.current===e&&(me(ve),Qf._currentValue=ue)}var Ce,we;function Te(e){if(Ce===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||``,we=-1<e.stack.indexOf(`
3
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
+ `+Ce+e+we}var Ee=!1;function De(e,t){if(!e||Ee)return``;Ee=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
+ `),l=s.split(`
6
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ee=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Te(n):``}function D(e,t){switch(e.tag){case 26:case 27:case 5:return Te(e.type);case 16:return Te(`Lazy`);case 13:return e.child!==t&&t!==null?Te(`Suspense Fallback`):Te(`Suspense`);case 19:return Te(`SuspenseList`);case 0:case 15:return De(e.type,!1);case 11:return De(e.type.render,!1);case 1:return De(e.type,!0);case 31:return Te(`Activity`);default:return``}}function Oe(e){try{var t=``,n=null;do t+=D(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
+ Error generating stack: `+e.message+`
9
+ `+e.stack}}var ke=Object.prototype.hasOwnProperty,Ae=t.unstable_scheduleCallback,je=t.unstable_cancelCallback,Me=t.unstable_shouldYield,Ne=t.unstable_requestPaint,Pe=t.unstable_now,Fe=t.unstable_getCurrentPriorityLevel,Ie=t.unstable_ImmediatePriority,Le=t.unstable_UserBlockingPriority,Re=t.unstable_NormalPriority,ze=t.unstable_LowPriority,Be=t.unstable_IdlePriority,Ve=t.log,He=t.unstable_setDisableYieldValue,Ue=null,We=null;function Ge(e){if(typeof Ve==`function`&&He(e),We&&typeof We.setStrictMode==`function`)try{We.setStrictMode(Ue,e)}catch{}}var O=Math.clz32?Math.clz32:Je,Ke=Math.log,qe=Math.LN2;function Je(e){return e>>>=0,e===0?32:31-(Ke(e)/qe|0)|0}var Ye=256,Xe=262144,Ze=4194304;function Qe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function $e(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Qe(n))):i=Qe(o):i=Qe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Qe(n))):i=Qe(o)):i=Qe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function et(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function tt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function k(){var e=Ze;return Ze<<=1,!(Ze&62914560)&&(Ze=4194304),e}function nt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function rt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function it(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-O(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&at(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function at(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-O(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ot(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-O(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function st(e,t){var n=t&-t;return n=n&42?1:A(n),(n&(e.suspendedLanes|t))===0?n:0}function A(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ct(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function lt(){var e=T.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function ut(e,t){var n=T.p;try{return T.p=e,t()}finally{T.p=n}}var dt=Math.random().toString(36).slice(2),ft=`__reactFiber$`+dt,j=`__reactProps$`+dt,pt=`__reactContainer$`+dt,mt=`__reactEvents$`+dt,ht=`__reactListeners$`+dt,gt=`__reactHandles$`+dt,_t=`__reactResources$`+dt,vt=`__reactMarker$`+dt;function yt(e){delete e[ft],delete e[j],delete e[mt],delete e[ht],delete e[gt]}function bt(e){var t=e[ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pt]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[ft])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function xt(e){if(e=e[ft]||e[pt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function St(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Ct(e){var t=e[_t];return t||=e[_t]={hoistableStyles:new Map,hoistableScripts:new Map},t}function M(e){e[vt]=!0}var wt=new Set,Tt={};function Et(e,t){Dt(e,t),Dt(e+`Capture`,t)}function Dt(e,t){for(Tt[e]=t,e=0;e<t.length;e++)wt.add(t[e])}var Ot=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),kt={},At={};function jt(e){return ke.call(At,e)?!0:ke.call(kt,e)?!1:Ot.test(e)?At[e]=!0:(kt[e]=!0,!1)}function Mt(e,t,n){if(jt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Nt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Pt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Ft(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function N(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function It(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lt(e){if(!e._valueTracker){var t=N(e)?`checked`:`value`;e._valueTracker=It(e,t,``+e[t])}}function Rt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=N(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function zt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Bt=/[\n"\\]/g;function Vt(e){return e.replace(Bt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Ht(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Ft(t)):e.value!==``+Ft(t)&&(e.value=``+Ft(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Wt(e,o,Ft(n)):Wt(e,o,Ft(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Ft(s):e.removeAttribute(`name`)}function Ut(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Lt(e);return}n=n==null?``:``+Ft(n),t=t==null?n:``+Ft(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Lt(e)}function Wt(e,t,n){t===`number`&&zt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Kt(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Ft(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Jt(e,t,n){if(t!=null&&(t=``+Ft(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Ft(n)}function Yt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(le(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Ft(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Lt(e)}function P(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Xt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Zt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Xt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Qt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Zt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Zt(e,o,t[o])}function $t(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var F=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),en=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function tn(e){return en.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function nn(){}var rn=null;function an(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var on=null,sn=null;function cn(e){var t=xt(e);if(t&&(e=t.stateNode)){var n=e[j]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Ht(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Vt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[j]||null;if(!a)throw Error(i(90));Ht(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Rt(r)}break a;case`textarea`:Jt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Kt(e,!!n.multiple,t,!1)}}}var ln=!1;function un(e,t,n){if(ln)return e(t,n);ln=!0;try{return e(t)}finally{if(ln=!1,(on!==null||sn!==null)&&(bu(),on&&(t=on,e=sn,sn=on=null,cn(t),e)))for(t=0;t<e.length;t++)cn(e[t])}}function dn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[j]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var fn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),pn=!1;if(fn)try{var mn={};Object.defineProperty(mn,`passive`,{get:function(){pn=!0}}),window.addEventListener(`test`,mn,mn),window.removeEventListener(`test`,mn,mn)}catch{pn=!1}var hn=null,gn=null,_n=null;function vn(){if(_n)return _n;var e,t=gn,n=t.length,r,i=`value`in hn?hn.value:hn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return _n=i.slice(e,1<r?1-r:void 0)}function yn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bn(){return!0}function xn(){return!1}function Sn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?bn:xn,this.isPropagationStopped=xn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=bn)},persist:function(){},isPersistent:bn}),t}var Cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wn=Sn(Cn),Tn=p({},Cn,{view:0,detail:0}),En=Sn(Tn),Dn,On,kn,An=p({},Tn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==kn&&(kn&&e.type===`mousemove`?(Dn=e.screenX-kn.screenX,On=e.screenY-kn.screenY):On=Dn=0,kn=e),Dn)},movementY:function(e){return`movementY`in e?e.movementY:On}}),jn=Sn(An),Mn=Sn(p({},An,{dataTransfer:0})),Nn=Sn(p({},Tn,{relatedTarget:0})),Pn=Sn(p({},Cn,{animationName:0,elapsedTime:0,pseudoElement:0})),Fn=Sn(p({},Cn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),In=Sn(p({},Cn,{data:0})),Ln={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Rn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},zn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Bn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zn[e])?!!t[e]:!1}function Vn(){return Bn}var Hn=Sn(p({},Tn,{key:function(e){if(e.key){var t=Ln[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=yn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Rn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vn,charCode:function(e){return e.type===`keypress`?yn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?yn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Un=Sn(p({},An,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Wn=Sn(p({},Tn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vn})),Gn=Sn(p({},Cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Kn=Sn(p({},An,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),qn=Sn(p({},Cn,{newState:0,oldState:0})),Jn=[9,13,27,32],Yn=fn&&`CompositionEvent`in window,Xn=null;fn&&`documentMode`in document&&(Xn=document.documentMode);var Zn=fn&&`TextEvent`in window&&!Xn,Qn=fn&&(!Yn||Xn&&8<Xn&&11>=Xn),$n=` `,er=!1;function tr(e,t){switch(e){case`keyup`:return Jn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function nr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var rr=!1;function ir(e,t){switch(e){case`compositionend`:return nr(t);case`keypress`:return t.which===32?(er=!0,$n):null;case`textInput`:return e=t.data,e===$n&&er?null:e;default:return null}}function ar(e,t){if(rr)return e===`compositionend`||!Yn&&tr(e,t)?(e=vn(),_n=gn=hn=null,rr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return Qn&&t.locale!==`ko`?null:t.data;default:return null}}var or={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!or[e.type]:t===`textarea`}function cr(e,t,n,r){on?sn?sn.push(r):sn=[r]:on=r,t=Ed(t,`onChange`),0<t.length&&(n=new wn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var lr=null,ur=null;function dr(e){yd(e,0)}function fr(e){if(Rt(St(e)))return e}function pr(e,t){if(e===`change`)return t}var mr=!1;if(fn){var hr;if(fn){var gr=`oninput`in document;if(!gr){var _r=document.createElement(`div`);_r.setAttribute(`oninput`,`return;`),gr=typeof _r.oninput==`function`}hr=gr}else hr=!1;mr=hr&&(!document.documentMode||9<document.documentMode)}function vr(){lr&&(lr.detachEvent(`onpropertychange`,yr),ur=lr=null)}function yr(e){if(e.propertyName===`value`&&fr(ur)){var t=[];cr(t,ur,e,an(e)),un(dr,t)}}function br(e,t,n){e===`focusin`?(vr(),lr=t,ur=n,lr.attachEvent(`onpropertychange`,yr)):e===`focusout`&&vr()}function xr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return fr(ur)}function Sr(e,t){if(e===`click`)return fr(t)}function Cr(e,t){if(e===`input`||e===`change`)return fr(t)}function wr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Tr=typeof Object.is==`function`?Object.is:wr;function Er(e,t){if(Tr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ke.call(t,i)||!Tr(e[i],t[i]))return!1}return!0}function Dr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Or(e,t){var n=Dr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Dr(n)}}function kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ar(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=zt(e.document)}return t}function jr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Mr=fn&&`documentMode`in document&&11>=document.documentMode,Nr=null,Pr=null,Fr=null,Ir=!1;function Lr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ir||Nr==null||Nr!==zt(r)||(r=Nr,`selectionStart`in r&&jr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Fr&&Er(Fr,r)||(Fr=r,r=Ed(Pr,`onSelect`),0<r.length&&(t=new wn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Nr)))}function Rr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var zr={animationend:Rr(`Animation`,`AnimationEnd`),animationiteration:Rr(`Animation`,`AnimationIteration`),animationstart:Rr(`Animation`,`AnimationStart`),transitionrun:Rr(`Transition`,`TransitionRun`),transitionstart:Rr(`Transition`,`TransitionStart`),transitioncancel:Rr(`Transition`,`TransitionCancel`),transitionend:Rr(`Transition`,`TransitionEnd`)},Br={},Vr={};fn&&(Vr=document.createElement(`div`).style,`AnimationEvent`in window||(delete zr.animationend.animation,delete zr.animationiteration.animation,delete zr.animationstart.animation),`TransitionEvent`in window||delete zr.transitionend.transition);function Hr(e){if(Br[e])return Br[e];if(!zr[e])return e;var t=zr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vr)return Br[e]=t[n];return e}var Ur=Hr(`animationend`),Wr=Hr(`animationiteration`),Gr=Hr(`animationstart`),Kr=Hr(`transitionrun`),qr=Hr(`transitionstart`),Jr=Hr(`transitioncancel`),Yr=Hr(`transitionend`),Xr=new Map,Zr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Zr.push(`scrollEnd`);function Qr(e,t){Xr.set(e,t),Et(t,[e])}var $r=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ei=[],ti=0,ni=0;function ri(){for(var e=ti,t=ni=ti=0;t<e;){var n=ei[t];ei[t++]=null;var r=ei[t];ei[t++]=null;var i=ei[t];ei[t++]=null;var a=ei[t];if(ei[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&si(n,i,a)}}function ii(e,t,n,r){ei[ti++]=e,ei[ti++]=t,ei[ti++]=n,ei[ti++]=r,ni|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ai(e,t,n,r){return ii(e,t,n,r),ci(e)}function oi(e,t){return ii(e,null,null,t),ci(e)}function si(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-O(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ci(e){if(50<du)throw du=0,fu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var li={};function ui(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function di(e,t,n,r){return new ui(e,t,n,r)}function fi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pi(e,t){var n=e.alternate;return n===null?(n=di(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function mi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function hi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)fi(e)&&(s=1);else if(typeof e==`string`)s=Uf(e,n,he.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case re:return e=di(31,n,t,a),e.elementType=re,e.lanes=o,e;case _:return gi(n.children,a,o,t);case v:s=8,a|=24;break;case y:return e=di(12,n,t,a|2),e.elementType=y,e.lanes=o,e;case ee:return e=di(13,n,t,a),e.elementType=ee,e.lanes=o,e;case te:return e=di(19,n,t,a),e.elementType=te,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case x:s=10;break a;case b:s=9;break a;case S:s=11;break a;case C:s=14;break a;case ne:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=di(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function gi(e,t,n,r){return e=di(7,e,r,t),e.lanes=n,e}function _i(e,t,n){return e=di(6,e,null,t),e.lanes=n,e}function vi(e){var t=di(18,null,null,0);return t.stateNode=e,t}function yi(e,t,n){return t=di(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var bi=new WeakMap;function xi(e,t){if(typeof e==`object`&&e){var n=bi.get(e);return n===void 0?(t={value:e,source:t,stack:Oe(t)},bi.set(e,t),t):n}return{value:e,source:t,stack:Oe(t)}}var Si=[],Ci=0,wi=null,Ti=0,Ei=[],Di=0,Oi=null,ki=1,Ai=``;function ji(e,t){Si[Ci++]=Ti,Si[Ci++]=wi,wi=e,Ti=t}function Mi(e,t,n){Ei[Di++]=ki,Ei[Di++]=Ai,Ei[Di++]=Oi,Oi=e;var r=ki;e=Ai;var i=32-O(r)-1;r&=~(1<<i),n+=1;var a=32-O(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,ki=1<<32-O(t)+i|n<<i|r,Ai=a+e}else ki=1<<a|n<<i|r,Ai=e}function Ni(e){e.return!==null&&(ji(e,1),Mi(e,1,0))}function Pi(e){for(;e===wi;)wi=Si[--Ci],Si[Ci]=null,Ti=Si[--Ci],Si[Ci]=null;for(;e===Oi;)Oi=Ei[--Di],Ei[Di]=null,Ai=Ei[--Di],Ei[Di]=null,ki=Ei[--Di],Ei[Di]=null}function Fi(e,t){Ei[Di++]=ki,Ei[Di++]=Ai,Ei[Di++]=Oi,ki=t.id,Ai=t.overflow,Oi=e}var I=null,Ii=null,L=!1,Li=null,Ri=!1,zi=Error(i(519));function Bi(e){throw Ki(xi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),zi}function Vi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ft]=e,t[j]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),Ut(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Yt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=nn),t=!0):t=!1,t||Bi(e,!0)}function Hi(e){for(I=e.return;I;)switch(I.tag){case 5:case 31:case 13:Ri=!1;return;case 27:case 3:Ri=!0;return;default:I=I.return}}function Ui(e){if(e!==I)return!1;if(!L)return Hi(e),L=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&Ii&&Bi(e),Hi(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=uf(e)}else t===27?(t=Ii,Zd(e.type)?(e=lf,lf=null,Ii=e):Ii=t):Ii=I?cf(e.stateNode.nextSibling):null;return!0}function Wi(){Ii=I=null,L=!1}function Gi(){var e=Li;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),Li=null),e}function Ki(e){Li===null?Li=[e]:Li.push(e)}var qi=pe(null),Ji=null,Yi=null;function Xi(e,t,n){E(qi,t._currentValue),t._currentValue=n}function Zi(e){e._currentValue=qi.current,me(qi)}function Qi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function $i(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Qi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),Qi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ea(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Tr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ve.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&$i(t,e,n,r),t.flags|=262144}function ta(e){for(e=e.firstContext;e!==null;){if(!Tr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function na(e){Ji=e,Yi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ra(e){return aa(Ji,e)}function ia(e,t){return Ji===null&&na(e),aa(e,t)}function aa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Yi===null){if(e===null)throw Error(i(308));Yi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Yi=Yi.next=t;return n}var oa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},sa=t.unstable_scheduleCallback,ca=t.unstable_NormalPriority,la={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ua(){return{controller:new oa,data:new Map,refCount:0}}function da(e){e.refCount--,e.refCount===0&&sa(ca,function(){e.controller.abort()})}var fa=null,pa=0,ma=0,ha=null;function ga(e,t){if(fa===null){var n=fa=[];pa=0,ma=dd(),ha={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return pa++,t.then(_a,_a),t}function _a(){if(--pa===0&&fa!==null){ha!==null&&(ha.status=`fulfilled`);var e=fa;fa=null,ma=0,ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function va(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ya=w.S;w.S=function(e,t){eu=Pe(),typeof t==`object`&&t&&typeof t.then==`function`&&ga(e,t),ya!==null&&ya(e,t)};var ba=pe(null);function xa(){var e=ba.current;return e===null?U.pooledCache:e}function Sa(e,t){t===null?E(ba,ba.current):E(ba,t.pool)}function Ca(){var e=xa();return e===null?null:{parent:la._currentValue,pool:e}}var wa=Error(i(460)),Ta=Error(i(474)),Ea=Error(i(542)),Da={then:function(){}};function Oa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(nn,nn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e;default:if(typeof t.status==`string`)t.then(nn,nn);else{if(e=U,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e}throw ja=t,wa}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ja=e,wa):e}}var ja=null;function Ma(){if(ja===null)throw Error(i(459));var e=ja;return ja=null,e}function Na(e){if(e===wa||e===Ea)throw Error(i(483))}var Pa=null,Fa=0;function Ia(e){var t=Fa;return Fa+=1,Pa===null&&(Pa=[]),ka(Pa,e,t)}function La(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ra(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=pi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=_i(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ne&&Aa(i)===t.type)?(t=a(t,n.props),La(t,n),t.return=e,t):(t=hi(n.type,n.key,n.props,null,e.mode,r),La(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=yi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=gi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=_i(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=hi(t.type,t.key,t.props,null,e.mode,n),La(n,t),n.return=e,n;case g:return t=yi(t,e.mode,n),t.return=e,t;case ne:return t=Aa(t),f(e,t,n)}if(le(t)||oe(t))return t=gi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ia(t),n);if(t.$$typeof===x)return f(e,ia(e,t),n);Ra(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case ne:return n=Aa(n),p(e,t,n,r)}if(le(n)||oe(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ia(n),r);if(n.$$typeof===x)return p(e,t,ia(e,n),r);Ra(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ne:return r=Aa(r),m(e,t,n,r,i)}if(le(r)||oe(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ia(r),i);if(r.$$typeof===x)return m(e,t,n,ia(t,r),i);Ra(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),L&&ji(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return L&&ji(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),L&&ji(i,h),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),L&&ji(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return L&&ji(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),L&&ji(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ne&&Aa(l)===r.type){n(e,r.sibling),c=a(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=gi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=hi(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=yi(o,e.mode,c),c.return=e,e=c}return s(e);case ne:return o=Aa(o),b(e,r,o,c)}if(le(o))return v(e,r,o,c);if(oe(o)){if(l=oe(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ia(o),c);if(o.$$typeof===x)return b(e,r,ia(e,o),c);Ra(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=_i(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=b(e,t,n,r);return Pa=null,i}catch(t){if(t===wa||t===Ea)throw t;var a=di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,H&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ci(e),si(e,null,n),t}return ii(e,r,t,n),ci(e)}function qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}function Ja(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ya=!1;function Xa(){if(Ya){var e=ha;if(e!==null)throw e}}function Za(e,t,n,r){Ya=!1;var i=e.updateQueue;Ha=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(G&f)===f:(r&f)===f){f!==0&&f===ma&&(Ya=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:Ha=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),q|=o,e.lanes=o,e.memoizedState=d}}function Qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function $a(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Qa(n[e],t)}var eo=pe(null),to=pe(0);function no(e,t){e=ql,E(to,e),E(eo,t),ql=e|t.baseLanes}function ro(){E(to,ql),E(eo,eo.current)}function io(){ql=to.current,me(eo),me(to)}var ao=pe(null),oo=null;function so(e){var t=e.alternate;E(po,po.current&1),E(ao,e),oo===null&&(t===null||eo.current!==null||t.memoizedState!==null)&&(oo=e)}function co(e){E(po,po.current),E(ao,e),oo===null&&(oo=e)}function lo(e){e.tag===22?(E(po,po.current),E(ao,e),oo===null&&(oo=e)):uo(e)}function uo(){E(po,po.current),E(ao,ao.current)}function fo(e){me(ao),oo===e&&(oo=null),me(po)}var po=pe(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ho=0,R=null,z=null,go=null,_o=!1,vo=!1,yo=!1,bo=0,xo=0,So=null,Co=0;function wo(){throw Error(i(321))}function To(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tr(e[n],t[n]))return!1;return!0}function Eo(e,t,n,r,i,a){return ho=a,R=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?Us:Ws,yo=!1,a=n(r,i),yo=!1,vo&&(a=Oo(t,n,r,i)),Do(e),a}function Do(e){w.H=Hs;var t=z!==null&&z.next!==null;if(ho=0,go=z=R=null,_o=!1,xo=0,So=null,t)throw Error(i(300));e===null||sc||(e=e.dependencies,e!==null&&ta(e)&&(sc=!0))}function Oo(e,t,n,r){R=e;var a=0;do{if(vo&&(So=null),xo=0,vo=!1,25<=a)throw Error(i(301));if(a+=1,go=z=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}w.H=Gs,o=t(n,r)}while(vo);return o}function ko(){var e=w.H,t=e.useState()[0];return t=typeof t.then==`function`?Io(t):t,e=e.useState()[0],(z===null?null:z.memoizedState)!==e&&(R.flags|=1024),t}function Ao(){var e=bo!==0;return bo=0,e}function jo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Mo(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}ho=0,go=z=R=null,vo=!1,xo=bo=0,So=null}function No(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return go===null?R.memoizedState=go=e:go=go.next=e,go}function Po(){if(z===null){var e=R.alternate;e=e===null?null:e.memoizedState}else e=z.next;var t=go===null?R.memoizedState:go.next;if(t!==null)go=t,z=e;else{if(e===null)throw R.alternate===null?Error(i(467)):Error(i(310));z=e,e={memoizedState:z.memoizedState,baseState:z.baseState,baseQueue:z.baseQueue,queue:z.queue,next:null},go===null?R.memoizedState=go=e:go=go.next=e}return go}function Fo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Io(e){var t=xo;return xo+=1,So===null&&(So=[]),e=ka(So,e,t),t=R,(go===null?t.memoizedState:go.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?Us:Ws),e}function Lo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Io(e);if(e.$$typeof===x)return ra(e)}throw Error(i(438,String(e)))}function Ro(e){var t=null,n=R.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=R.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Fo(),R.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ie;return t.index++,n}function zo(e,t){return typeof t==`function`?t(e):t}function Bo(e){return Vo(Po(),z,e)}function Vo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(ho&f)===f:(G&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ma&&(d=!0);else if((ho&p)===p){u=u.next,p===ma&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,R.lanes|=p,q|=p;f=u.action,yo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,R.lanes|=f,q|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Tr(o,e.memoizedState)&&(sc=!0,d&&(n=ha,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ho(e){var t=Po(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Tr(o,t.memoizedState)||(sc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Uo(e,t,n){var r=R,a=Po(),o=L;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Tr((z||a).memoizedState,n);if(s&&(a.memoizedState=n,sc=!0),a=a.queue,ms(Ko.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||go!==null&&go.memoizedState.tag&1){if(r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,a,n,t),null),U===null)throw Error(i(349));o||ho&127||Wo(r,t,n)}return n}function Wo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=R.updateQueue,t===null?(t=Fo(),R.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Go(e,t,n,r){t.value=n,t.getSnapshot=r,qo(t)&&Jo(e)}function Ko(e,t,n){return n(function(){qo(t)&&Jo(e)})}function qo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tr(e,n)}catch{return!0}}function Jo(e){var t=oi(e,2);t!==null&&hu(t,e,2)}function Yo(e){var t=No();if(typeof e==`function`){var n=e;if(e=n(),yo){Ge(!0);try{n()}finally{Ge(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:e},t}function Xo(e,t,n,r){return e.baseState=n,Vo(e,z,typeof r==`function`?r:zo)}function Zo(e,t,n,r,a){if(zs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};w.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Qo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Qo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=w.T,o={};w.T=o;try{var s=n(i,r),c=w.S;c!==null&&c(o,s),$o(e,t,s)}catch(n){ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),w.T=a}}else try{a=n(i,r),$o(e,t,a)}catch(n){ts(e,t,n)}}function $o(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){es(e,t,n)},function(n){return ts(e,t,n)}):es(e,t,n)}function es(e,t,n){t.status=`fulfilled`,t.value=n,ns(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qo(e,n)))}function ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,ns(t),t=t.next;while(t!==r)}e.action=null}function ns(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rs(e,t){return t}function is(e,t){if(L){var n=U.formState;if(n!==null){a:{var r=R;if(L){if(Ii){b:{for(var i=Ii,a=Ri;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ii=cf(i.nextSibling),r=i.data===`F!`;break a}}Bi(r)}r=!1}r&&(t=n[0])}}return n=No(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:t},n.queue=r,n=Is.bind(null,R,r),r.dispatch=n,r=Yo(!1),a=Rs.bind(null,R,!1,r.queue),r=No(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zo.bind(null,R,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function as(e){return os(Po(),z,e)}function os(e,t,n){if(t=Vo(e,t,rs)[0],e=Bo(zo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Io(t)}catch(e){throw e===wa?Ea:e}else r=t;t=Po();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(R.flags|=2048,ls(9,{destroy:void 0},ss.bind(null,i,n),null)),[r,a,e]}function ss(e,t){e.action=t}function cs(e){var t=Po(),n=z;if(n!==null)return os(t,n,e);Po(),t=t.memoizedState,n=Po();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function ls(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=R.updateQueue,t===null&&(t=Fo(),R.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function us(){return Po().memoizedState}function ds(e,t,n,r){var i=No();R.flags|=e,i.memoizedState=ls(1|t,{destroy:void 0},n,r===void 0?null:r)}function fs(e,t,n,r){var i=Po();r=r===void 0?null:r;var a=i.memoizedState.inst;z!==null&&r!==null&&To(r,z.memoizedState.deps)?i.memoizedState=ls(t,a,n,r):(R.flags|=e,i.memoizedState=ls(1|t,a,n,r))}function ps(e,t){ds(8390656,8,e,t)}function ms(e,t){fs(2048,8,e,t)}function hs(e){R.flags|=4;var t=R.updateQueue;if(t===null)t=Fo(),R.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function gs(e){var t=Po().memoizedState;return hs({ref:t,nextImpl:e}),function(){if(H&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function _s(e,t){return fs(4,2,e,t)}function vs(e,t){return fs(4,4,e,t)}function ys(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bs(e,t,n){n=n==null?null:n.concat([e]),fs(4,4,ys.bind(null,t,e),n)}function xs(){}function Ss(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&To(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Cs(e,t){var n=Po();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&To(t,r[1]))return r[0];if(r=e(),yo){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r}function ws(e,t,n){return n===void 0||ho&1073741824&&!(G&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),R.lanes|=e,q|=e,n)}function Ts(e,t,n,r){return Tr(n,t)?n:eo.current===null?!(ho&42)||ho&1073741824&&!(G&261930)?(sc=!0,e.memoizedState=n):(e=mu(),R.lanes|=e,q|=e,t):(e=ws(e,n,r),Tr(e,t)||(sc=!0),e)}function Es(e,t,n,r,i){var a=T.p;T.p=a!==0&&8>a?a:8;var o=w.T,s={};w.T=s,Rs(e,!1,t,n);try{var c=i(),l=w.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ls(e,t,va(c,r),pu(e)):Ls(e,t,r,pu(e))}catch(n){Ls(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{T.p=a,o!==null&&s.types!==null&&(o.types=s.types),w.T=o}}function Ds(){}function Os(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ks(e).queue;Es(e,a,t,ue,n===null?Ds:function(){return As(e),n(r)})}function ks(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:ue},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function As(e){var t=ks(e);t.next===null&&(t=e.alternate.memoizedState),Ls(e,t.next.queue,{},pu())}function js(){return ra(Qf)}function Ms(){return Po().memoizedState}function Ns(){return Po().memoizedState}function Ps(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=Ga(n);var r=Ka(t,e,n);r!==null&&(hu(r,t,n),qa(r,t,n)),t={cache:ua()},e.payload=t;return}t=t.return}}function Fs(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},zs(e)?Bs(t,n):(n=ai(e,t,n,r),n!==null&&(hu(n,e,r),Vs(n,t,r)))}function Is(e,t,n){Ls(e,t,n,pu())}function Ls(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(zs(e))Bs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Tr(s,o))return ii(e,t,i,0),U===null&&ri(),!1}catch{}if(n=ai(e,t,i,r),n!==null)return hu(n,e,r),Vs(n,t,r),!0}return!1}function Rs(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},zs(e)){if(t)throw Error(i(479))}else t=ai(e,n,r,2),t!==null&&hu(t,e,2)}function zs(e){var t=e.alternate;return e===R||t!==null&&t===R}function Bs(e,t){vo=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ot(e,n)}}var Hs={readContext:ra,use:Lo,useCallback:wo,useContext:wo,useEffect:wo,useImperativeHandle:wo,useLayoutEffect:wo,useInsertionEffect:wo,useMemo:wo,useReducer:wo,useRef:wo,useState:wo,useDebugValue:wo,useDeferredValue:wo,useTransition:wo,useSyncExternalStore:wo,useId:wo,useHostTransitionStatus:wo,useFormState:wo,useActionState:wo,useOptimistic:wo,useMemoCache:wo,useCacheRefresh:wo};Hs.useEffectEvent=wo;var Us={readContext:ra,use:Lo,useCallback:function(e,t){return No().memoizedState=[e,t===void 0?null:t],e},useContext:ra,useEffect:ps,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ds(4194308,4,ys.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ds(4194308,4,e,t)},useInsertionEffect:function(e,t){ds(4,2,e,t)},useMemo:function(e,t){var n=No();t=t===void 0?null:t;var r=e();if(yo){Ge(!0);try{e()}finally{Ge(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=No();if(n!==void 0){var i=n(t);if(yo){Ge(!0);try{n(t)}finally{Ge(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Fs.bind(null,R,e),[r.memoizedState,e]},useRef:function(e){var t=No();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=Is.bind(null,R,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xs,useDeferredValue:function(e,t){return ws(No(),e,t)},useTransition:function(){var e=Yo(!1);return e=Es.bind(null,R,e.queue,!0,!1),No().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=R,a=No();if(L){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),U===null)throw Error(i(349));G&127||Wo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ps(Ko.bind(null,r,o,e),[e]),r.flags|=2048,ls(9,{destroy:void 0},Go.bind(null,r,o,n,t),null),n},useId:function(){var e=No(),t=U.identifierPrefix;if(L){var n=Ai,r=ki;n=(r&~(1<<32-O(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=bo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Co++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:js,useFormState:is,useActionState:is,useOptimistic:function(e){var t=No();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Rs.bind(null,R,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ro,useCacheRefresh:function(){return No().memoizedState=Ps.bind(null,R)},useEffectEvent:function(e){var t=No(),n={impl:e};return t.memoizedState=n,function(){if(H&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Ws={readContext:ra,use:Lo,useCallback:Ss,useContext:ra,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Bo,useRef:us,useState:function(){return Bo(zo)},useDebugValue:xs,useDeferredValue:function(e,t){return Ts(Po(),z.memoizedState,e,t)},useTransition:function(){var e=Bo(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:as,useActionState:as,useOptimistic:function(e,t){return Xo(Po(),z,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Ws.useEffectEvent=gs;var Gs={readContext:ra,use:Lo,useCallback:Ss,useContext:ra,useEffect:ms,useImperativeHandle:bs,useInsertionEffect:_s,useLayoutEffect:vs,useMemo:Cs,useReducer:Ho,useRef:us,useState:function(){return Ho(zo)},useDebugValue:xs,useDeferredValue:function(e,t){var n=Po();return z===null?ws(n,e,t):Ts(n,z.memoizedState,e,t)},useTransition:function(){var e=Ho(zo)[0],t=Po().memoizedState;return[typeof e==`boolean`?e:Io(e),t]},useSyncExternalStore:Uo,useId:Ms,useHostTransitionStatus:js,useFormState:cs,useActionState:cs,useOptimistic:function(e,t){var n=Po();return z===null?(n.baseState=e,[e,n.queue.dispatch]):Xo(n,z,e,t)},useMemoCache:Ro,useCacheRefresh:Ns};Gs.useEffectEvent=gs;function Ks(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var qs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ga(r);i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(hu(t,e,r),qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=Ga(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(hu(t,e,r),qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=Ga(n);r.tag=2,t!=null&&(r.callback=t),t=Ka(e,r,n),t!==null&&(hu(t,e,n),qa(t,e,n))}};function Js(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Er(n,r)||!Er(i,a):!0}function Ys(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&qs.enqueueReplaceState(t,t.state,null)}function Xs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Zs(e){$r(e)}function Qs(e){console.error(e)}function $s(e){$r(e)}function ec(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){return n=Ga(n),n.tag=3,n.payload={element:null},n.callback=function(){ec(e,t)},n}function rc(e){return e=Ga(e),e.tag=3,e}function ic(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){tc(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function ac(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ea(t,n,a,!0),n=ao.current,n!==null){switch(n.tag){case 31:case 13:return oo===null?Du():n.alternate===null&&Jl===0&&(Jl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,a)),!1;case 22:return n.flags|=65536,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,a)),!1}throw Error(i(435,n.tag))}return Gu(e,r,a),Du(),!1}if(L)return t=ao.current,t===null?(r!==zi&&(t=Error(i(423),{cause:r}),Ki(xi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=xi(r,n),a=nc(e.stateNode,r,a),Ja(e,a),Jl!==4&&(Jl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==zi&&(e=Error(i(422),{cause:r}),Ki(xi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=xi(o,n),Xl===null?Xl=[o]:Xl.push(o),Jl!==4&&(Jl=2),t===null)return!0;r=xi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=nc(n.stateNode,r,e),Ja(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(ru===null||!ru.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=rc(a),ic(a,e,n,r),Ja(n,a),!1}n=n.return}while(n!==null);return!1}var oc=Error(i(461)),sc=!1;function cc(e,t,n,r){t.child=e===null?Va(t,null,n,r):Ba(t,e.child,n,r)}function lc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return na(t),r=Eo(e,t,n,o,a,i),s=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(L&&s&&Ni(t),t.flags|=1,cc(e,t,r,i),t.child)}function uc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!fi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dc(e,t,a,r,i)):(e=hi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Pc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Er:n,n(o,r)&&e.ref===t.ref)return Nc(e,t,i)}return t.flags|=1,e=pi(a,r),e.ref=t.ref,e.return=t,t.child=e}function dc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Er(a,r)&&e.ref===t.ref)if(sc=!1,t.pendingProps=r=a,Pc(e,i))e.flags&131072&&(sc=!0);else return t.lanes=e.lanes,Nc(e,t,i)}return yc(e,t,n,r,i)}function fc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return mc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Sa(t,a===null?null:a.cachePool),a===null?ro():no(t,a),lo(t);else return r=t.lanes=536870912,mc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Sa(t,null),ro(),uo(t)):(Sa(t,a.cachePool),no(t,a),uo(t),t.memoizedState=null);return cc(e,t,i,n),t.child}function pc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mc(e,t,n,r,i){var a=xa();return a=a===null?null:{parent:la._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Sa(t,null),ro(),lo(t),e!==null&&ea(e,t,r,!0),t.childLanes=i,null}function hc(e,t){return t=Oc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gc(e,t,n){return Ba(t,e.child,null,n),e=hc(t,t.pendingProps),e.flags|=2,fo(t),t.memoizedState=null,e}function _c(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(L){if(r.mode===`hidden`)return e=hc(t,r),t.lanes=536870912,pc(null,e);if(co(t),(e=Ii)?(e=rf(e,Ri),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi===null?null:{id:ki,overflow:Ai},retryLane:536870912,hydrationErrors:null},n=vi(e),n.return=t,t.child=n,I=t,Ii=null)):e=null,e===null)throw Bi(t);return t.lanes=536870912,null}return hc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(co(t),a)if(t.flags&256)t.flags&=-257,t=gc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(sc||ea(e,t,n,!1),a=(n&e.childLanes)!==0,sc||a){if(r=U,r!==null&&(s=st(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,oi(e,s),hu(r,e,s),oc;Du(),t=gc(e,t,n)}else e=o.treeContext,Ii=cf(s.nextSibling),I=t,L=!0,Li=null,Ri=!1,e!==null&&Fi(t,e),t=hc(t,r),t.flags|=4096;return t}return e=pi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function vc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function yc(e,t,n,r,i){return na(t),n=Eo(e,t,n,r,void 0,i),r=Ao(),e!==null&&!sc?(jo(e,t,i),Nc(e,t,i)):(L&&r&&Ni(t),t.flags|=1,cc(e,t,n,i),t.child)}function bc(e,t,n,r,i,a){return na(t),t.updateQueue=null,n=Oo(t,r,n,i),Do(e),r=Ao(),e!==null&&!sc?(jo(e,t,a),Nc(e,t,a)):(L&&r&&Ni(t),t.flags|=1,cc(e,t,n,a),t.child)}function xc(e,t,n,r,i){if(na(t),t.stateNode===null){var a=li,o=n.contextType;typeof o==`object`&&o&&(a=ra(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=qs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ua(t),o=n.contextType,a.context=typeof o==`object`&&o?ra(o):li,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ks(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&qs.enqueueReplaceState(a,a.state,null),Za(t,r,a,i),Xa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Xs(n,s);a.props=c;var l=a.context,u=n.contextType;o=li,typeof u==`object`&&u&&(o=ra(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Ys(t,a,r,o),Ha=!1;var f=t.memoizedState;a.state=f,Za(t,r,a,i),Xa(),l=t.memoizedState,s||f!==l||Ha?(typeof d==`function`&&(Ks(t,n,d,r),l=t.memoizedState),(c=Ha||Js(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Wa(e,t),o=t.memoizedProps,u=Xs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=li,typeof l==`object`&&l&&(c=ra(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Ys(t,a,r,c),Ha=!1,f=t.memoizedState,a.state=f,Za(t,r,a,i),Xa();var p=t.memoizedState;o!==d||f!==p||Ha||e!==null&&e.dependencies!==null&&ta(e.dependencies)?(typeof s==`function`&&(Ks(t,n,s,r),p=t.memoizedState),(u=Ha||Js(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ta(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,vc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ba(t,e.child,null,i),t.child=Ba(t,null,n,i)):cc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Nc(e,t,i),e}function Sc(e,t,n,r){return Wi(),t.flags|=256,cc(e,t,n,r),t.child}var Cc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wc(e){return{baseLanes:e,cachePool:Ca()}}function Tc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Y),e}function Ec(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(po.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(L){if(a?so(t):uo(t),(e=Ii)?(e=rf(e,Ri),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Oi===null?null:{id:ki,overflow:Ai},retryLane:536870912,hydrationErrors:null},n=vi(e),n.return=t,t.child=n,I=t,Ii=null)):e=null,e===null)throw Bi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(uo(t),a=t.mode,c=Oc({mode:`hidden`,children:c},a),r=gi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(null,r)):(so(t),Dc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(so(t),t.flags&=-257,t=kc(e,t,n)):t.memoizedState===null?(uo(t),c=r.fallback,a=t.mode,r=Oc({mode:`visible`,children:r.children},a),c=gi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ba(t,e.child,null,n),r=t.child,r.memoizedState=wc(n),r.childLanes=Tc(e,s,n),t.memoizedState=Cc,t=pc(null,r)):(uo(t),t.child=e.child,t.flags|=128,t=null);else if(so(t),of(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Ki({value:r,source:null,stack:null}),t=kc(e,t,n)}else if(sc||ea(e,t,n,!1),s=(n&e.childLanes)!==0,sc||s){if(s=U,s!==null&&(r=st(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,oi(e,r),hu(s,e,r),oc;af(c)||Du(),t=kc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ii=cf(c.nextSibling),I=t,L=!0,Li=null,Ri=!1,e!==null&&Fi(t,e),t=Dc(t,r.children),t.flags|=4096);return t}return a?(uo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=pi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=gi(c,a,n,null),c.flags|=2):c=pi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,pc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=wc(n):(a=c.cachePool,a===null?a=Ca():(l=la._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Tc(e,s,n),t.memoizedState=Cc,pc(e.child,r)):(so(t),n=e.child,e=n.sibling,n=pi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Dc(e,t){return t=Oc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Oc(e,t){return e=di(22,e,null,t),e.lanes=0,e}function kc(e,t,n){return Ba(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ac(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qi(e.return,t,n)}function jc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Mc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=po.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,E(po,o),cc(e,t,r,n),r=L?Ti:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ac(e,n,t);else if(e.tag===19)Ac(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),jc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}jc(t,!0,n,null,a,r);break;case`together`:jc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Nc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),q|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ea(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=pi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Pc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&ta(e))):!0}function Fc(e,t,n){switch(t.tag){case 3:ye(t,t.stateNode.containerInfo),Xi(t,la,e.memoizedState.cache),Wi();break;case 27:case 5:xe(t);break;case 4:ye(t,t.stateNode.containerInfo);break;case 10:Xi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,co(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(so(t),e=Nc(e,t,n),e===null?null:e.sibling):Ec(e,t,n):(so(t),t.flags|=128,null);so(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(ea(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Mc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),E(po,po.current),r)break;return null;case 22:return t.lanes=0,fc(e,t,n,t.pendingProps);case 24:Xi(t,la,e.memoizedState.cache)}return Nc(e,t,n)}function Ic(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)sc=!0;else{if(!Pc(e,n)&&!(t.flags&128))return sc=!1,Fc(e,t,n);sc=!!(e.flags&131072)}else sc=!1,L&&t.flags&1048576&&Mi(t,Ti,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Aa(t.elementType),t.type=e,typeof e==`function`)fi(e)?(r=Xs(e,r),t.tag=1,t=xc(null,t,e,r,n)):(t.tag=0,t=yc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===S){t.tag=11,t=lc(null,t,e,r,n);break a}else if(a===C){t.tag=14,t=uc(null,t,e,r,n);break a}}throw t=ce(e)||e,Error(i(306,t,``))}}return t;case 0:return yc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Xs(r,t.pendingProps),xc(e,t,r,a,n);case 3:a:{if(ye(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Wa(e,t),Za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Xi(t,la,r),r!==o.cache&&$i(t,[la],n,!0),Xa(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sc(e,t,r,n);break a}else if(r!==a){a=xi(Error(i(424)),t),Ki(a),t=Sc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ii=cf(e.firstChild),I=t,L=!0,Li=null,Ri=!0,n=Va(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wi(),r===a){t=Nc(e,t,n);break a}cc(e,t,r,n)}t=t.child}return t;case 26:return vc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:L||(n=t.type,e=t.pendingProps,r=Bd(_e.current).createElement(n),r[ft]=t,r[j]=e,Pd(r,n,e),M(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return xe(t),e===null&&L&&(r=t.stateNode=ff(t.type,t.pendingProps,_e.current),I=t,Ri=!0,a=Ii,Zd(t.type)?(lf=a,Ii=cf(r.firstChild)):Ii=a),cc(e,t,t.pendingProps.children,n),vc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&L&&((a=r=Ii)&&(r=tf(r,t.type,t.pendingProps,Ri),r===null?a=!1:(t.stateNode=r,I=t,Ii=cf(r.firstChild),Ri=!1,a=!0)),a||Bi(t)),xe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Ud(a,o)?r=null:s!==null&&Ud(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Eo(e,t,ko,null,null,n),Qf._currentValue=a),vc(e,t),cc(e,t,r,n),t.child;case 6:return e===null&&L&&((e=n=Ii)&&(n=nf(n,t.pendingProps,Ri),n===null?e=!1:(t.stateNode=n,I=t,Ii=null,e=!0)),e||Bi(t)),null;case 13:return Ec(e,t,n);case 4:return ye(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ba(t,null,r,n):cc(e,t,r,n),t.child;case 11:return lc(e,t,t.type,t.pendingProps,n);case 7:return cc(e,t,t.pendingProps,n),t.child;case 8:return cc(e,t,t.pendingProps.children,n),t.child;case 12:return cc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Xi(t,t.type,r.value),cc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,na(t),a=ra(a),r=r(a),t.flags|=1,cc(e,t,r,n),t.child;case 14:return uc(e,t,t.type,t.pendingProps,n);case 15:return dc(e,t,t.type,t.pendingProps,n);case 19:return Mc(e,t,n);case 31:return _c(e,t,n);case 22:return fc(e,t,n,t.pendingProps);case 24:return na(t),r=ra(la),e===null?(a=xa(),a===null&&(a=U,o=ua(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ua(t),Xi(t,la,a)):((e.lanes&n)!==0&&(Wa(e,t),Za(t,null,null,n),Xa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Xi(t,la,r),r!==a.cache&&$i(t,[la],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Xi(t,la,r))),cc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Lc(e){e.flags|=4}function Rc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw ja=Da,Ta}else e.flags&=-16777217}function zc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw ja=Da,Ta}function Bc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:k(),e.lanes|=t,X|=t)}function Vc(e,t){if(!L)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function B(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Hc(e,t,n){var r=t.pendingProps;switch(Pi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return B(t),null;case 1:return B(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Zi(la),be(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ui(t)?Lc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Gi())),B(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Lc(t),o===null?(B(t),Rc(t,a,null,r,n)):(B(t),zc(t,o))):o?o===e.memoizedState?(B(t),t.flags&=-16777217):(Lc(t),B(t),zc(t,o)):(e=e.memoizedProps,e!==r&&Lc(t),B(t),Rc(t,a,e,r,n)),null;case 27:if(Se(t),n=_e.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return B(t),null}e=he.current,Ui(t)?Vi(t,e):(e=ff(a,r,n),t.stateNode=e,Lc(t))}return B(t),null;case 5:if(Se(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return B(t),null}if(o=he.current,Ui(t))Vi(t,o);else{var s=Bd(_e.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ft]=t,o[j]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Pd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Lc(t)}}return B(t),Rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Lc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=_e.current,Ui(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=I,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Bi(t,!0)}else e=Bd(e).createTextNode(r),e[ft]=t,t.stateNode=e}return B(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ui(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ft]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),e=!1}else n=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(fo(t),t):(fo(t),null);if(t.flags&128)throw Error(i(558))}return B(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ui(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ft]=t}else Wi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;B(t),a=!1}else a=Gi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(fo(t),t):(fo(t),null)}return fo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bc(t,t.updateQueue),B(t),null);case 4:return be(),e===null&&Sd(t.stateNode.containerInfo),B(t),null;case 10:return Zi(t.type),B(t),null;case 19:if(me(po),r=t.memoizedState,r===null)return B(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Vc(r,!1);else{if(Jl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=mo(e),o!==null){for(t.flags|=128,Vc(r,!1),e=o.updateQueue,t.updateQueue=e,Bc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)mi(n,e),n=n.sibling;return E(po,po.current&1|2),L&&ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Pe()>tu&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304)}else{if(!a)if(e=mo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Bc(t,e),Vc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!L)return B(t),null}else 2*Pe()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,a=!0,Vc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(B(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Pe(),e.sibling=null,n=po.current,E(po,a?n&1|2:n&1),L&&ji(t,r.treeForkCount),e);case 22:case 23:return fo(t),io(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(B(t),t.subtreeFlags&6&&(t.flags|=8192)):B(t),n=t.updateQueue,n!==null&&Bc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&me(ba),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Zi(la),B(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Uc(e,t){switch(Pi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zi(la),be(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Se(t),null;case 31:if(t.memoizedState!==null){if(fo(t),t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(fo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Wi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(po),null;case 4:return be(),null;case 10:return Zi(t.type),null;case 22:case 23:return fo(t),io(),e!==null&&me(ba),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zi(la),null;case 25:return null;default:return null}}function Wc(e,t){switch(Pi(t),t.tag){case 3:Zi(la),be();break;case 26:case 27:case 5:Se(t);break;case 4:be();break;case 31:t.memoizedState!==null&&fo(t);break;case 13:fo(t);break;case 19:me(po);break;case 10:Zi(t.type);break;case 22:case 23:fo(t),io(),e!==null&&me(ba);break;case 24:Zi(la)}}function Gc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Kc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function qc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{$a(t,n)}catch(t){Z(e,e.return,t)}}}function Jc(e,t,n){n.props=Xs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Yc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Xc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Zc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[j]=t}catch(t){Z(e,e.return,t)}}function $c(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function el(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||$c(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nn));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(tl(e,t,n),e=e.sibling;e!==null;)tl(e,t,n),e=e.sibling}function nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[ft]=e,t[j]=n}catch(t){Z(e,e.return,t)}}var il=!1,al=!1,ol=!1,sl=typeof WeakSet==`function`?WeakSet:Set,cl=null;function ll(e,t){if(e=e.containerInfo,Rd=sp,e=Ar(e),jr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,cl=t;cl!==null;)if(t=cl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,cl=e;else for(;cl!==null;){switch(t=cl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Xs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,cl=e;break}cl=t.return}}function ul(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Tl(e,n),r&4&&Gc(5,n);break;case 1:if(Tl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Xs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&qc(n),r&512&&Yc(n,n.return);break;case 3:if(Tl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{$a(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&rl(n);case 26:case 5:Tl(e,n),t===null&&r&4&&Zc(n),r&512&&Yc(n,n.return);break;case 12:Tl(e,n);break;case 31:Tl(e,n),r&4&&gl(e,n);break;case 13:Tl(e,n),r&4&&_l(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||il,!r){t=t!==null&&t.memoizedState!==null||al,i=il;var a=al;il=r,(al=t)&&!a?Dl(e,n,(n.subtreeFlags&8772)!=0):Tl(e,n),il=i,al=a}break;case 30:break;default:Tl(e,n)}}function dl(e){var t=e.alternate;t!==null&&(e.alternate=null,dl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&yt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var fl=null,pl=!1;function ml(e,t,n){for(n=n.child;n!==null;)hl(e,t,n),n=n.sibling}function hl(e,t,n){if(We&&typeof We.onCommitFiberUnmount==`function`)try{We.onCommitFiberUnmount(Ue,n)}catch{}switch(n.tag){case 26:al||Xc(n,t),ml(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:al||Xc(n,t);var r=fl,i=pl;Zd(n.type)&&(fl=n.stateNode,pl=!1),ml(e,t,n),pf(n.stateNode),fl=r,pl=i;break;case 5:al||Xc(n,t);case 6:if(r=fl,i=pl,fl=null,ml(e,t,n),fl=r,pl=i,fl!==null)if(pl)try{(fl.nodeType===9?fl.body:fl.nodeName===`HTML`?fl.ownerDocument.body:fl).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{fl.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:fl!==null&&(pl?(e=fl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(fl,n.stateNode));break;case 4:r=fl,i=pl,fl=n.stateNode.containerInfo,pl=!0,ml(e,t,n),fl=r,pl=i;break;case 0:case 11:case 14:case 15:Kc(2,n,t),al||Kc(4,n,t),ml(e,t,n);break;case 1:al||(Xc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Jc(n,t,r)),ml(e,t,n);break;case 21:ml(e,t,n);break;case 22:al=(r=al)||n.memoizedState!==null,ml(e,t,n),al=r;break;default:ml(e,t,n)}}function gl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function _l(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function vl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new sl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new sl),t;default:throw Error(i(435,e.tag))}}function yl(e,t){var n=vl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function bl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){fl=c.stateNode,pl=!1;break a}break;case 5:fl=c.stateNode,pl=!1;break a;case 3:case 4:fl=c.stateNode.containerInfo,pl=!0;break a}c=c.return}if(fl===null)throw Error(i(160));hl(o,s,a),fl=null,pl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Sl(t,e),t=t.sibling}var xl=null;function Sl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:bl(t,e),Cl(e),r&4&&(Kc(3,e,e.return),Gc(3,e),Kc(5,e,e.return));break;case 1:bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),r&64&&il&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=xl;if(bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[vt]||o[ft]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Pd(o,r,n),o[ft]=e,M(o),r=o;break a;case`link`:var s=Vf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Vf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Pd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ft]=e,M(o),r=o}e.stateNode=r}else Hf(a,e.type,e.stateNode);else e.stateNode=If(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Qc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Hf(a,e.type,e.stateNode):If(a,r,e.memoizedProps))}break;case 27:bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),n!==null&&r&4&&Qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(bl(t,e),Cl(e),r&512&&(al||n===null||Xc(n,n.return)),e.flags&32){a=e.stateNode;try{P(a,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Qc(e,a,n===null?a:n.memoizedProps)),r&1024&&(ol=!0);break;case 6:if(bl(t,e),Cl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,a=xl,xl=gf(t.containerInfo),bl(t,e),xl=a,Cl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}ol&&(ol=!1,wl(e));break;case 4:r=xl,xl=gf(e.stateNode.containerInfo),bl(t,e),Cl(e),xl=r;break;case 12:bl(t,e),Cl(e);break;case 31:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 13:bl(t,e),Cl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Pe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=il,d=al;if(il=u||a,al=d||l,bl(t,e),al=d,il=u,Cl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||il||al||El(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,yl(e,n))));break;case 19:bl(t,e),Cl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,yl(e,r)));break;case 30:break;case 21:break;default:bl(t,e),Cl(e)}}function Cl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if($c(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;nl(e,el(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(P(o,``),n.flags&=-33),nl(e,el(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;tl(e,el(e),s);break;default:throw Error(i(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Tl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ul(e,t.alternate,t),t=t.sibling}function El(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Kc(4,t,t.return),El(t);break;case 1:Xc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Jc(t,t.return,n),El(t);break;case 27:pf(t.stateNode);case 26:case 5:Xc(t,t.return),El(t);break;case 22:t.memoizedState===null&&El(t);break;case 30:El(t);break;default:El(t)}e=e.sibling}}function Dl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Dl(i,a,n),Gc(4,a);break;case 1:if(Dl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Qa(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&qc(a),Yc(a,a.return);break;case 27:rl(a);case 26:case 5:Dl(i,a,n),n&&r===null&&o&4&&Zc(a),Yc(a,a.return);break;case 12:Dl(i,a,n);break;case 31:Dl(i,a,n),n&&o&4&&gl(i,a);break;case 13:Dl(i,a,n),n&&o&4&&_l(i,a);break;case 22:a.memoizedState===null&&Dl(i,a,n),Yc(a,a.return);break;case 30:break;default:Dl(i,a,n)}t=t.sibling}}function Ol(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&da(n))}function kl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e))}function Al(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jl(e,t,n,r),t=t.sibling}function jl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Al(e,t,n,r),i&2048&&Gc(9,t);break;case 1:Al(e,t,n,r);break;case 3:Al(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&da(e)));break;case 12:if(i&2048){Al(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Al(e,t,n,r);break;case 31:Al(e,t,n,r);break;case 13:Al(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Al(e,t,n,r):(a._visibility|=2,Ml(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Al(e,t,n,r):V(e,t),i&2048&&Ol(o,t);break;case 24:Al(e,t,n,r),i&2048&&kl(t.alternate,t);break;default:Al(e,t,n,r)}}function Ml(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Ml(a,o,s,c,i),Gc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Ml(a,o,s,c,i)):u._visibility&2?Ml(a,o,s,c,i):V(a,o),i&&l&2048&&Ol(o.alternate,o);break;case 24:Ml(a,o,s,c,i),i&&l&2048&&kl(o.alternate,o);break;default:Ml(a,o,s,c,i)}t=t.sibling}}function V(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:V(n,r),i&2048&&Ol(r.alternate,r);break;case 24:V(n,r),i&2048&&kl(r.alternate,r);break;default:V(n,r)}t=t.sibling}}var Nl=8192;function Pl(e,t,n){if(e.subtreeFlags&Nl)for(e=e.child;e!==null;)Fl(e,t,n),e=e.sibling}function Fl(e,t,n){switch(e.tag){case 26:Pl(e,t,n),e.flags&Nl&&e.memoizedState!==null&&Gf(n,xl,e.memoizedState,e.memoizedProps);break;case 5:Pl(e,t,n);break;case 3:case 4:var r=xl;xl=gf(e.stateNode.containerInfo),Pl(e,t,n),xl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Nl,Nl=16777216,Pl(e,t,n),Nl=r):Pl(e,t,n));break;default:Pl(e,t,n)}}function Il(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ll(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cl=r,Bl(r,e)}Il(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rl(e),e=e.sibling}function Rl(e){switch(e.tag){case 0:case 11:case 15:Ll(e),e.flags&2048&&Kc(9,e,e.return);break;case 3:Ll(e);break;case 12:Ll(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,zl(e)):Ll(e);break;default:Ll(e)}}function zl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cl=r,Bl(r,e)}Il(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Kc(8,t,t.return),zl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,zl(t));break;default:zl(t)}e=e.sibling}}function Bl(e,t){for(;cl!==null;){var n=cl;switch(n.tag){case 0:case 11:case 15:Kc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:da(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cl=r;else a:for(n=e;cl!==null;){r=cl;var i=r.sibling,a=r.return;if(dl(r),r===n){cl=null;break a}if(i!==null){i.return=a,cl=i;break a}cl=a}}}var Vl={getCacheForType:function(e){var t=ra(la),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ra(la).controller.signal}},Hl=typeof WeakMap==`function`?WeakMap:Map,H=0,U=null,W=null,G=0,K=0,Ul=null,Wl=!1,Gl=!1,Kl=!1,ql=0,Jl=0,q=0,J=0,Yl=0,Y=0,X=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return H&2&&G!==0?G&-G:w.T===null?lt():dd()}function mu(){if(Y===0)if(!(G&536870912)||L){var e=Xe;Xe<<=1,!(Xe&3932160)&&(Xe=262144),Y=e}else Y=536870912;return e=ao.current,e!==null&&(e.flags|=32),Y}function hu(e,t,n){(e===U&&(K===2||K===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,G,Y,!1)),rt(e,n),(!(H&2)||e!==U)&&(e===U&&(!(H&2)&&(J|=n),Jl===4&&yu(e,G,Y,!1)),rd(e))}function gu(e,t,n){if(H&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||et(e,t),a=r?Au(e,t):Ou(e,t,!0),o=r;do{if(a===0){Gl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!vu(n)){a=Ou(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,s).flags|=256),s=Ou(c,s,!1),s!==2){if(Kl&&!l){c.errorRecoveryDisabledLanes|=o,J|=o,a=4;break a}o=Zl,Zl=a,o!==null&&(Zl===null?Zl=o:Zl.push.apply(Zl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Y,!Wl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=$l+300-Pe(),10<a)){if(yu(r,t,Y,!Wl),$e(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Y,J,X,Wl,o,`Throttled`,-0,0),a);break a}_u(r,n,Zl,nu,Ql,t,Y,J,X,Wl,o,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nn},Fl(t,a,d);var m=(a&62914560)===a?$l-Pe():(a&4194048)===a?eu-Pe():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Tr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~Yl,t&=~J,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-O(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&at(e,n,t)}function bu(){return H&6?!0:(id(0,!1),!1)}function xu(){if(W!==null){if(K===0)var e=W.return;else e=W,Yi=Ji=null,Mo(e),Pa=null,Fa=0,e=W;for(;e!==null;)Wc(e.alternate,e),e=e.return;W=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),U=e,W=n=pi(e.current,null),G=t,K=0,Ul=null,Wl=!1,Gl=et(e,t),Kl=!1,X=Y=Yl=J=q=Jl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-O(r),a=1<<i;t|=e[i],r&=~a}return ql=t,ri(),n}function Cu(e,t){R=null,w.H=Hs,t===wa||t===Ea?(t=Ma(),K=3):t===Ta?(t=Ma(),K=4):K=t===oc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ul=t,W===null&&(Jl=1,ec(e,xi(t,e.current)))}function wu(){var e=ao.current;return e===null?!0:(G&4194048)===G?oo===null:(G&62914560)===G||G&536870912?e===oo:!1}function Tu(){var e=w.H;return w.H=Hs,e===null?Hs:e}function Eu(){var e=w.A;return w.A=Vl,e}function Du(){Jl=4,Wl||(G&4194048)!==G&&ao.current!==null||(Gl=!0),!(q&134217727)&&!(J&134217727)||U===null||yu(U,G,Y,!1)}function Ou(e,t,n){var r=H;H|=2;var i=Tu(),a=Eu();(U!==e||G!==t)&&(nu=null,Su(e,t)),t=!1;var o=Jl;a:do try{if(K!==0&&W!==null){var s=W,c=Ul;switch(K){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:ao.current===null&&(t=!0);var l=K;if(K=0,Ul=null,Pu(e,s,c,l),n&&Gl){o=0;break a}break;default:l=K,K=0,Ul=null,Pu(e,s,c,l)}}ku(),o=Jl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Yi=Ji=null,H=r,w.H=i,w.A=a,W===null&&(U=null,G=0,ri()),o}function ku(){for(;W!==null;)Mu(W)}function Au(e,t){var n=H;H|=2;var r=Tu(),a=Eu();U!==e||G!==t?(nu=null,tu=Pe()+500,Su(e,t)):Gl=et(e,t);a:do try{if(K!==0&&W!==null){t=W;var o=Ul;b:switch(K){case 1:K=0,Ul=null,Pu(e,t,o,1);break;case 2:case 9:if(Oa(o)){K=0,Ul=null,Nu(t);break}t=function(){K!==2&&K!==9||U!==e||(K=7),rd(e)},o.then(t,t);break a;case 3:K=7;break a;case 4:K=5;break a;case 7:Oa(o)?(K=0,Ul=null,Nu(t)):(K=0,Ul=null,Pu(e,t,o,7));break;case 5:var s=null;switch(W.tag){case 26:s=W.memoizedState;case 5:case 27:var c=W;if(s?Wf(s):c.stateNode.complete){K=0,Ul=null;var l=c.sibling;if(l!==null)W=l;else{var u=c.return;u===null?W=null:(W=u,Fu(u))}break b}}K=0,Ul=null,Pu(e,t,o,5);break;case 6:K=0,Ul=null,Pu(e,t,o,6);break;case 8:xu(),Jl=6;break a;default:throw Error(i(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Yi=Ji=null,w.H=r,w.A=a,H=n,W===null?(U=null,G=0,ri(),Jl):0}function ju(){for(;W!==null&&!Me();)Mu(W)}function Mu(e){var t=Ic(e.alternate,e,ql);e.memoizedProps=e.pendingProps,t===null?Fu(e):W=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=bc(n,t,t.pendingProps,t.type,void 0,G);break;case 11:t=bc(n,t,t.pendingProps,t.type.render,t.ref,G);break;case 5:Mo(t);default:Wc(n,t),t=W=mi(t,ql),t=Ic(n,t,ql)}e.memoizedProps=e.pendingProps,t===null?Fu(e):W=t}function Pu(e,t,n,r){Yi=Ji=null,Mo(t),Pa=null,Fa=0;var i=t.return;try{if(ac(e,i,t,n,G)){Jl=1,ec(e,xi(n,e.current)),W=null;return}}catch(t){if(i!==null)throw W=i,t;Jl=1,ec(e,xi(n,e.current)),W=null;return}t.flags&32768?(L||r===1?e=!0:Gl||G&536870912?e=!1:(Wl=e=!0,(r===2||r===9||r===3||r===6)&&(r=ao.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Wl);return}e=t.return;var n=Hc(t.alternate,t,ql);if(n!==null){W=n;return}if(t=t.sibling,t!==null){W=t;return}W=t=e}while(t!==null);Jl===0&&(Jl=5)}function Iu(e,t){do{var n=Uc(e.alternate,e);if(n!==null){n.flags&=32767,W=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){W=e;return}W=e=n}while(e!==null);Jl=6,W=null}function Lu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(H&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ni,it(e,n,o,s,c,l),e===U&&(W=U=null,G=0),ou=t,au=e,su=n,cu=o,lu=a,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Re,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=w.T,w.T=null,a=T.p,T.p=2,s=H,H|=4;try{ll(e,t,n)}finally{H=s,T.p=a,w.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=w.T,w.T=null;var r=T.p;T.p=2;var i=H;H|=4;try{Sl(t,e);var a=zd,o=Ar(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&kr(s.ownerDocument.documentElement,s)){if(c!==null&&jr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Or(s,h),v=Or(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{H=i,T.p=r,w.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=w.T,w.T=null;var r=T.p;T.p=2;var i=H;H|=4;try{ul(e,t.alternate,t)}finally{H=i,T.p=r,w.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Ne();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),ct(n),t=t.stateNode,We&&typeof We.onCommitFiberRoot==`function`)try{We.onCommitFiberRoot(Ue,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=w.T,i=T.p,T.p=2,w.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{w.T=t,T.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,da(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=ct(su),r=w.T,a=T.p;try{T.p=32>n?32:n,w.T=null,n=lu,lu=null;var o=au,s=su;if(iu=0,ou=au=null,su=0,H&6)throw Error(i(331));var c=H;if(H|=4,Rl(o.current),jl(o,o.current,s,n),H=c,id(0,!1),We&&typeof We.onPostCommitFiberRoot==`function`)try{We.onPostCommitFiberRoot(Ue,o)}catch{}return!0}finally{T.p=a,w.T=r,Vu(e,t)}}function Wu(e,t,n){t=xi(n,t),t=nc(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(rt(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=xi(n,e),n=rc(2),r=Ka(t,n,2),r!==null&&(ic(n,r,t,e),rt(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Kl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,U===e&&(G&n)===n&&(Jl===4||Jl===3&&(G&62914560)===G&&300>Pe()-$l?!(H&2)&&Su(e,0):Yl|=n,X===G&&(X=0)),rd(e)}function qu(e,t){t===0&&(t=k()),e=oi(e,t),e!==null&&(rt(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Ae(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-O(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=G,a=$e(r,r===U?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||et(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Pe(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-O(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=tt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=U,n=G,n=$e(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(K===2||K===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&je(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||et(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&je(r),ct(n)){case 2:case 8:n=Le;break;case 32:n=Re;break;case 268435456:n=Be;break;default:n=Re}return r=cd.bind(null,e),n=Ae(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&je(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=G;return r=$e(e,e===U?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Pe()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){H&6?Ae(Ie,ad):od()})}function dd(){if(nd===0){var e=ma;e===0&&(e=Ye,Ye<<=1,!(Ye&261888)&&(Ye=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:tn(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[j]||null).action),o=r.submitter;o&&(t=(t=o[j]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new wn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Os(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Os(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Zr.length;hd++){var gd=Zr[hd];Qr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Qr(Ur,`onAnimationEnd`),Qr(Wr,`onAnimationIteration`),Qr(Gr,`onAnimationStart`),Qr(`dblclick`,`onDoubleClick`),Qr(`focusin`,`onFocus`),Qr(`focusout`,`onBlur`),Qr(Kr,`onTransitionRun`),Qr(qr,`onTransitionStart`),Qr(Jr,`onTransitionCancel`),Qr(Yr,`onTransitionEnd`),Dt(`onMouseEnter`,[`mouseout`,`mouseover`]),Dt(`onMouseLeave`,[`mouseout`,`mouseover`]),Dt(`onPointerEnter`,[`pointerout`,`pointerover`]),Dt(`onPointerLeave`,[`pointerout`,`pointerover`]),Et(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Et(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Et(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Et(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Et(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Et(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){$r(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){$r(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[mt];n===void 0&&(n=t[mt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,wt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!pn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=bt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}un(function(){var r=a,i=an(n),s=[];a:{var c=Xr.get(e);if(c!==void 0){var l=wn,u=e;switch(e){case`keypress`:if(yn(n)===0)break a;case`keydown`:case`keyup`:l=Hn;break;case`focusin`:u=`focus`,l=Nn;break;case`focusout`:u=`blur`,l=Nn;break;case`beforeblur`:case`afterblur`:l=Nn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=jn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Mn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Wn;break;case Ur:case Wr:case Gr:l=Pn;break;case Yr:l=Gn;break;case`scroll`:case`scrollend`:l=En;break;case`wheel`:l=Kn;break;case`copy`:case`cut`:case`paste`:l=Fn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Un;break;case`toggle`:case`beforetoggle`:l=qn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=dn(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==rn&&(u=n.relatedTarget||n.fromElement)&&(bt(u)||u[pt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?bt(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=jn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Un,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:St(l),h=u==null?c:St(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,bt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?St(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=pr;else if(sr(c))if(mr)v=Cr;else{v=xr;var y=br}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&$t(r.elementType)&&(v=pr):v=Sr;if(v&&=v(e,r)){cr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Wt(c,`number`,c.value)}switch(y=r?St(r):window,e){case`focusin`:(sr(y)||y.contentEditable===`true`)&&(Nr=y,Pr=r,Fr=null);break;case`focusout`:Fr=Pr=Nr=null;break;case`mousedown`:Ir=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Ir=!1,Lr(s,n,i);break;case`selectionchange`:if(Mr)break;case`keydown`:case`keyup`:Lr(s,n,i)}var b;if(Yn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else rr?tr(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Qn&&n.locale!==`ko`&&(rr||x!==`onCompositionStart`?x===`onCompositionEnd`&&rr&&(b=vn()):(hn=i,gn=`value`in hn?hn.value:hn.textContent,rr=!0)),y=Ed(r,x),0<y.length&&(x=new In(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=nr(n),b!==null&&(x.data=b)))),(b=Zn?ir(e,n):ar(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new In(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),md(s,e,r,n,i)}yd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=dn(e,n),i!=null&&r.unshift(Td(e,i,a)),i=dn(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=dn(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=dn(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
10
+ `).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||P(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&P(e,``+r);break;case`className`:Nt(e,`class`,r);break;case`tabIndex`:Nt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Nt(e,n,r);break;case`style`:Qt(e,r,o);break;case`data`:if(t!==`object`){Nt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,a.name,a,null),$(e,t,`formEncType`,a.formEncType,a,null),$(e,t,`formMethod`,a.formMethod,a,null),$(e,t,`formTarget`,a.formTarget,a,null)):($(e,t,`encType`,a.encType,a,null),$(e,t,`method`,a.method,a,null),$(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=tn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=tn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),Mt(e,`popover`,r);break;case`xlinkActuate`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Pt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Pt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Mt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=F.get(n)||n,Mt(e,n,r))}}function Nd(e,t,n,r,a,o){switch(n){case`style`:Qt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?P(e,r):(typeof r==`number`||typeof r==`bigint`)&&P(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=nn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Tt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[j]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Mt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,o,s,n,null)}}a&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:$(e,t,r,d,n,null)}}Ut(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Q(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:$(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Kt(e,!!r,n,!0):Kt(e,!!r,t,!1);return;case`textarea`:for(s in Q(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:$(e,t,s,c,n,null)}Yt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:$(e,t,u,r,n,null)}return;default:if($t(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Ht(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||$(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&$(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Kt(e,!!n,n?[]:``,!1):Kt(e,!!n,t,!0)):Kt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&$(e,t,s,a,r,o)}Jt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:$(e,t,u,p,r,m)}return;default:if($t(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[vt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),yt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[vt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);yt(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=T.d;T.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=xt(e);t!==null&&t.tag===5&&t.type===`form`?As(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=Vt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),M(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Vt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Vt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Vt(n.imageSizes)+`"]`)):i+=`[href="`+Vt(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),M(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Vt(r)+`"][href="`+Vt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=p({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),M(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=Ct(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);M(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=Ct(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),M(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=Ct(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),M(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var a=(a=_e.current)?gf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=Ct(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var o=Ct(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(jf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),o||Nf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=Ct(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Af(e){return`href="`+Vt(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),M(t),e.head.appendChild(t))}function Pf(e){return`[src="`+Vt(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Vt(n.href)+`"]`);if(r)return t.instance=r,M(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),M(r),Pd(r,`style`,a),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Af(n.href);var o=e.querySelector(jf(a));if(o)return t.state.loading|=4,t.instance=o,M(o),o;r=Mf(n),(a=mf.get(a))&&Rf(r,a),o=(e.ownerDocument||e).createElement(`link`),M(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Pd(o,`link`,r),t.state.loading|=4,Lf(o,n.precedence,e),t.instance=o;case`script`:return o=Pf(n.src),(a=e.querySelector(Ff(o)))?(t.instance=a,M(a),a):(r=n,(a=mf.get(o))&&(r=p({},n),zf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),M(a),Pd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[vt]||a[ft]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,M(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),M(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:x,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nt(0),this.hiddenUpdates=nt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=di(3,null,null,t),e.current=a,a.stateNode=e,t=ua(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function tp(e){return e?(e=li,e):li}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ga(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ka(e,r,t),n!==null&&(hu(n,e,t),qa(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=oi(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=A(t);var n=oi(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=w.T;w.T=null;var a=T.p;try{T.p=2,up(e,t,n,r)}finally{T.p=a,w.T=i}}function lp(e,t,n,r){var i=w.T;w.T=null;var a=T.p;try{T.p=8,up(e,t,n,r)}finally{T.p=a,w.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=xt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Qe(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-O(o);s.entanglements[1]|=c,o&=~c}rd(a),!(H&6)&&(tu=Pe()+500,id(0,!1))}}break;case 31:case 13:s=oi(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=an(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=bt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Fe()){case Ie:return 2;case Le:return 8;case Re:case ze:return 32;case Be:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=xt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=bt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ut(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ut(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);rn=r,n.target.dispatchEvent(r),rn=null}else return t=xt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=xt(n);a!==null&&(e.splice(t,3),t-=3,Os(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[j]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[j]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[pt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=lt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.5`)throw Error(i(527,Lp,`19.2.5`));T.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.5`,rendererPackageName:`react-dom`,currentDispatcherRef:w,reconcilerVersion:`19.2.5`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ue=zp.inject(Rp),We=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Zs,s=Qs,c=$s;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[pt]=t.current,Sd(e),new Fp(t)}})),Yt=n(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Jt()})),P=e(f(),1),Xt=Yt();async function Zt(e){let t=Math.max(1,e.maxAttempts??16),n=Math.max(50,e.intervalMs??500),r=null;for(let i=1;i<=t;i+=1){if(e.signal?.aborted)return{settled:!1,attempts:i-1,instance:r};let a=new AbortController,o=()=>a.abort();e.signal?.addEventListener(`abort`,o,{once:!0});try{r=await e.fetchOnce(e.port,a.signal)}catch{r=null}finally{e.signal?.removeEventListener(`abort`,o)}if(e.onAttempt?.(r,i),Qt(r,e))return{settled:!0,attempts:i,instance:r};if(i===t)break;await $t(n,e.signal)}return{settled:!1,attempts:t,instance:r}}function Qt(e,t){return t.expected===`online`?e?.status===`online`:t.expected===`offline`?e?e.status!==`online`:!0:t.expected===`restart-detected`?!e||e.status!==`online`||typeof e.uptime!=`number`?!1:typeof t.previousUptime==`number`?e.uptime<t.previousUptime:!0:!1}function $t(e,t){return new Promise(n=>{let r=setTimeout(()=>{i(),n()},e);function i(){clearTimeout(r),t?.removeEventListener(`abort`,a)}function a(){i(),n()}if(t?.aborted){i(),n();return}t?.addEventListener(`abort`,a,{once:!0})})}var F=p();function en({value:e,onChange:t}){return(0,F.jsx)(`div`,{className:`settings-sidebar-search`,children:(0,F.jsx)(`input`,{type:`search`,value:e,onChange:e=>t(e.target.value),placeholder:`Search settings…`,"aria-label":`Search settings`,spellCheck:!1,autoComplete:`off`})})}var tn=[`runtime`,`identity`,`channels`,`automation`,`integrations`,`network-security`,`advanced`],nn={runtime:`Runtime`,identity:`Identity`,channels:`Channels`,automation:`Automation`,integrations:`Integrations`,"network-security":`Network & security`,advanced:`Advanced`};function rn(e,t){let n=t.trim().toLowerCase();return n?e.filter(e=>e.label.toLowerCase().includes(n)||e.id.toLowerCase().includes(n)):e.slice()}function an(e){let t=new Map;for(let n of e){let e=t.get(n.group)||[];e.push(n),t.set(n.group,e)}return tn.filter(e=>(t.get(e)?.length??0)>0).map(e=>({group:e,label:nn[e],items:t.get(e)??[]}))}var on=[{id:`agent`,label:`Agent`,group:`runtime`},{id:`model`,label:`Model defaults`,group:`runtime`},{id:`profile`,label:`Profile`,group:`identity`},{id:`display`,label:`Display`,group:`identity`},{id:`channels-telegram`,label:`Channels — Telegram`,group:`channels`},{id:`channels-discord`,label:`Channels — Discord`,group:`channels`},{id:`heartbeat`,label:`Heartbeat & schedules`,group:`automation`},{id:`memory`,label:`Memory`,group:`automation`},{id:`speech`,label:`Speech & keys`,group:`integrations`},{id:`prompts`,label:`Prompts`,group:`integrations`},{id:`mcp`,label:`MCP servers`,group:`integrations`},{id:`browser`,label:`Browser / CDP`,group:`integrations`},{id:`network`,label:`Network`,group:`network-security`},{id:`permissions`,label:`Permissions`,group:`network-security`},{id:`dashboard-meta`,label:`Dashboard meta`,group:`advanced`},{id:`advanced-export`,label:`Export / import`,group:`advanced`}];function sn({activeId:e,onSelect:t}){let[n,r]=(0,P.useState)(``),[i,a]=(0,P.useState)(new Set),o=an(rn(on,n)),s=(0,P.useCallback)(e=>{a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);return(0,F.jsxs)(`nav`,{className:`settings-sidebar`,"aria-label":`Settings categories`,children:[(0,F.jsx)(en,{value:n,onChange:r}),o.length===0?(0,F.jsx)(`p`,{className:`settings-sidebar-empty`,children:`No matches.`}):null,o.map(({group:n,label:r,items:a})=>{let o=i.has(n);return(0,F.jsxs)(`section`,{className:`settings-sidebar-group`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`settings-sidebar-group-header`,"aria-expanded":!o,"aria-controls":`settings-sidebar-group-${n}`,onClick:()=>s(n),children:[(0,F.jsx)(`span`,{className:`settings-sidebar-group-caret`,"aria-hidden":`true`,children:o?`▸`:`▾`}),(0,F.jsx)(`span`,{className:`settings-sidebar-group-label`,children:r})]}),o?null:(0,F.jsx)(`div`,{id:`settings-sidebar-group-${n}`,role:`tablist`,className:`settings-sidebar-group-items`,children:a.map(n=>{let r=n.id===e;return(0,F.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":r,"aria-current":r?`page`:void 0,className:`settings-sidebar-item${r?` is-active`:``}`,onClick:()=>t(n.id),children:n.label},n.id)})})]},n)})]})}function cn(){let e=new Map,t=new Set;function n(){for(let e of t)e()}return{pending:e,isDirty:()=>Array.from(e.values()).some(e=>!ln(e.value,e.original)),set(t,r){if(ln(r.value,r.original)){e.has(t)&&(e.delete(t),n());return}e.set(t,r),n()},remove(t){e.delete(t)&&n()},clear(){e.size!==0&&(e.clear(),n())},saveBundle(){let t={};for(let[n,r]of e)r.valid&&(t[n]=r.value);return t},subscribe(e){return t.add(e),()=>{t.delete(e)}}}}function ln(e,t){return e===t?!0:typeof e!=`object`||typeof t!=`object`||e===null||t===null?!1:Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):JSON.stringify(e)===JSON.stringify(t)}function un({isDirty:e,saving:t,pendingCount:n,error:r,onDiscard:i,onSave:a}){return!e&&!t&&!r?null:(0,F.jsxs)(`div`,{className:`settings-save-bar`,role:`region`,"aria-label":`Save changes`,"data-testid":`settings-save-bar`,children:[r?(0,F.jsx)(`span`,{className:`settings-save-bar-error`,role:`alert`,children:r}):(0,F.jsx)(`span`,{className:`settings-save-bar-status muted`,children:n===0?`No pending changes.`:`${n} pending change${n===1?``:`s`}`}),(0,F.jsx)(`button`,{type:`button`,className:`settings-action settings-action-discard`,onClick:i,disabled:t||!e,children:`Discard`}),(0,F.jsx)(`button`,{type:`button`,className:`settings-action settings-action-save`,onClick:a,disabled:t||!e,"aria-keyshortcuts":`Meta+S Control+S`,children:t?`Saving…`:`Save`})]})}function dn({kind:e,message:t,onDismiss:n,timeoutMs:r=3500}){return(0,P.useEffect)(()=>{if(r<=0)return;let e=setTimeout(n,r);return()=>clearTimeout(e)},[n,r]),(0,F.jsxs)(`div`,{className:`settings-toast settings-toast-${e}`,role:`status`,"aria-live":`polite`,children:[(0,F.jsx)(`span`,{className:`settings-toast-message`,children:t}),(0,F.jsx)(`button`,{type:`button`,className:`settings-toast-dismiss`,"aria-label":`Dismiss notification`,onClick:n,children:`×`})]})}function fn({enabled:e,containerRef:t,onSave:n}){(0,P.useEffect)(()=>{if(!e)return;function r(e){if(e.key!==`s`&&e.key!==`S`||!(e.metaKey||e.ctrlKey)||e.altKey||e.shiftKey)return;let r=t.current;if(!r)return;let i=e.target,a=i instanceof Node?i:null;a&&!r.contains(a)||(e.preventDefault(),n())}return document.addEventListener(`keydown`,r),()=>document.removeEventListener(`keydown`,r)},[e,t,n])}var pn={agent:(0,P.lazy)(()=>i(()=>import(`./Agent-DNpehKB2.js`),[])),profile:(0,P.lazy)(()=>i(()=>import(`./Profile-DZ7xf1WZ.js`),[])),display:(0,P.lazy)(()=>i(()=>import(`./Display-DM_yvyKL.js`),[])),model:(0,P.lazy)(()=>i(()=>import(`./ModelProvider-Bd6vGkXT.js`),[])),"channels-telegram":(0,P.lazy)(()=>i(()=>import(`./ChannelsTelegram-DGyZfJGS.js`),[])),"channels-discord":(0,P.lazy)(()=>i(()=>import(`./ChannelsDiscord-Dg_jto6l.js`),[])),speech:(0,P.lazy)(()=>i(()=>import(`./SpeechKeys-CQwtVxOP.js`),[])),heartbeat:(0,P.lazy)(()=>i(()=>import(`./Heartbeat-C-vq02MW.js`),[])),memory:(0,P.lazy)(()=>i(()=>import(`./Memory-BPKWJDXK.js`),[])),employees:(0,P.lazy)(()=>i(()=>import(`./Employees-CuYuTy0R.js`),[])),network:(0,P.lazy)(()=>i(()=>import(`./Network-Df1R2YcQ.js`),[])),permissions:(0,P.lazy)(()=>i(()=>import(`./Permissions-CcWZoOVP.js`),[])),prompts:(0,P.lazy)(()=>i(()=>import(`./Prompts-Bh5DYt8e.js`),[])),mcp:(0,P.lazy)(()=>i(()=>import(`./Mcp-Dlp2X7X7.js`),[])),browser:(0,P.lazy)(()=>i(()=>import(`./Browser-BsdxDVgM.js`),[])),"dashboard-meta":(0,P.lazy)(()=>i(()=>import(`./DashboardMeta-CAH9ONTb.js`),[])),"advanced-export":(0,P.lazy)(()=>i(()=>import(`./AdvancedExport-BAdZUC-6.js`),[]))};function mn(){let e=(0,P.useRef)(null);return e.current===null&&(e.current=cn()),e.current}function hn(e){return(0,P.useSyncExternalStore)((0,P.useCallback)(t=>e.subscribe(t),[e]),(0,P.useCallback)(()=>e.isDirty(),[e]),(0,P.useCallback)(()=>!1,[]))}function gn(e){return(0,P.useSyncExternalStore)((0,P.useCallback)(t=>e.subscribe(t),[e]),(0,P.useCallback)(()=>e.pending.size,[e]),(0,P.useCallback)(()=>0,[]))}function _n({port:e,instanceUrl:t,onDirtyChange:n,onSaved:r}){let[i,a]=(0,P.useState)(`agent`),o=mn(),s=hn(o),c=gn(o),l=(0,P.useMemo)(()=>Ie(e),[e]),u=(0,P.useRef)(null),[d,f]=(0,P.useState)(!1),[p,m]=(0,P.useState)(null),[h,g]=(0,P.useState)(null),_=(0,P.useRef)(null),v=(0,P.useCallback)(e=>{u.current=e},[]);(0,P.useEffect)(()=>{o.clear(),u.current=null,m(null),g(null)},[e,o]),(0,P.useEffect)(()=>{n?.(s)},[s,n]),(0,P.useEffect)(()=>()=>n?.(!1),[n]);let y=(0,P.useCallback)(e=>{e!==i&&(d||o.isDirty()&&!window.confirm(`Discard unsaved changes?`)||(o.clear(),m(null),g(null),u.current=null,a(e)))},[i,o,d]),b=(0,P.useCallback)(()=>{d||(o.clear(),m(null))},[o,d]),x=(0,P.useCallback)(async()=>{if(d)return;let e=u.current;if(m(null),!e){o.clear();return}f(!0);try{await e(),r?.(),g({kind:`ok`,message:`Saved.`})}catch(e){let t=Le(e);m(t),g({kind:`err`,message:`Failed: ${t}`})}finally{f(!1)}},[o,r,d]);fn({enabled:s&&!d,containerRef:_,onSave:()=>{x()}});let S=pn[i];return(0,F.jsxs)(`div`,{className:`settings-shell`,ref:_,children:[(0,F.jsx)(sn,{activeId:i,onSelect:y}),(0,F.jsxs)(`section`,{className:`settings-page`,"aria-live":`polite`,children:[(0,F.jsx)(P.Suspense,{fallback:(0,F.jsx)(`div`,{className:`settings-loading`,children:`Loading…`}),children:S?(0,F.jsx)(S,{port:e,instanceUrl:t,client:l,dirty:o,registerSave:v}):(0,F.jsx)(`div`,{className:`settings-placeholder`,children:`This page lands in a later phase.`})}),(0,F.jsx)(un,{isDirty:s,saving:d,pendingCount:c,error:p,onDiscard:b,onSave:()=>void x()}),h?(0,F.jsx)(dn,{kind:h.kind,message:h.message,onDismiss:()=>g(null)}):null]})]})}function vn(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(null),[i,a]=(0,P.useState)(null),o=e?.managed.length||0;(0,P.useEffect)(()=>{s()},[]);async function s(){try{t(await ae())}catch(e){a(e.message)}}async function c(e,n){r(e),a(null);try{t(await n()),a(`${e} complete.`)}catch(e){a(e.message)}finally{r(null)}}function l(){o!==0&&window.confirm(`Stop ${o} dashboard-managed server${o===1?``:`s`}?`)&&c(`Stop all managed`,fe)}return(0,F.jsxs)(`section`,{className:`process-control-panel`,"aria-label":`Process control`,children:[(0,F.jsxs)(`div`,{className:`process-control-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Process control`}),(0,F.jsxs)(`strong`,{children:[o,` managed`]})]}),(0,F.jsx)(`button`,{type:`button`,onClick:s,disabled:n!=null,children:`Refresh`})]}),(0,F.jsxs)(`div`,{className:`process-control-actions`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:l,disabled:n!=null||o===0,children:`Stop all managed`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void c(`Adopt/recover managed`,se),disabled:n!=null,children:`Adopt/recover`}),(0,F.jsx)(`button`,{type:`button`,disabled:!0,title:e?.unsupported.reason||`Planned`,children:`Force release port`})]}),(0,F.jsx)(`p`,{className:`process-control-hint`,children:`Stop all affects only dashboard-managed servers. Adopt/recover reconnects known managed process records without stopping external instances.`}),(0,F.jsxs)(`div`,{className:`process-control-list`,children:[e?.managed.map(e=>(0,F.jsxs)(`div`,{className:`process-control-row`,children:[(0,F.jsxs)(`span`,{children:[`:`,e.port]}),(0,F.jsx)(`strong`,{children:e.pid?`pid ${e.pid}`:`pid n/a`}),(0,F.jsx)(`em`,{children:e.proof})]},e.port)),o===0&&(0,F.jsx)(`p`,{children:`No dashboard-managed servers are registered.`})]}),i&&(0,F.jsx)(`p`,{className:`process-control-message`,children:i})]})}function yn(e){let t=e.instance;return(0,F.jsxs)(`section`,{className:`detail-panel`,"aria-label":`Selected instance detail`,children:[e.activeTab===`overview`&&(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`div`,{className:`overview-grid`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Status`}),(0,F.jsx)(`strong`,{children:t?.status||`n/a`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`CLI`}),(0,F.jsx)(`strong`,{children:t?.currentCli||`n/a`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Model`}),(0,F.jsx)(`strong`,{children:t?.currentModel||`n/a`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Owner`}),(0,F.jsx)(`strong`,{children:t?.lifecycle?.owner||`n/a`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Version`}),(0,F.jsx)(`strong`,{children:t?.version||`n/a`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Group`}),(0,F.jsx)(`strong`,{children:t?.group||`ungrouped`})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:`Reason`}),(0,F.jsx)(`strong`,{children:t?.lifecycle?.reason||t?.healthReason||`ok`})]})]}),(0,F.jsx)(vn,{})]}),e.activeTab===`logs`&&(0,F.jsx)(`div`,{className:`detail-empty`,children:`Logs stream is planned for phase 10.7. Recent dashboard events are available in the activity dock.`}),e.activeTab===`settings`&&t&&(0,F.jsx)(_n,{port:t.port,instanceUrl:`http://localhost:${t.port}`,...e.onSettingsDirtyChange===void 0?{}:{onDirtyChange:e.onSettingsDirtyChange},...e.onSettingsSaved===void 0?{}:{onSaved:e.onSettingsSaved}},t.port),e.activeTab===`settings`&&!t&&(0,F.jsx)(`div`,{className:`detail-empty`,children:`Select an instance to configure it.`})]})}function bn(e){return(0,F.jsxs)(`div`,{className:`empty-navigator`,role:`status`,"aria-live":`polite`,children:[(0,F.jsx)(`p`,{className:`empty-navigator-headline`,children:`No Jaw instances detected on the scanned range.`}),(0,F.jsxs)(`p`,{className:`empty-navigator-subline`,children:[`Currently scanning ports `,e.rangeFrom,`–`,e.rangeTo,`. Try widening the range, or start a Jaw with the command below.`]}),(0,F.jsxs)(`code`,{className:`empty-navigator-code`,"aria-label":`Suggested command`,children:[`jaw serve --port `,e.rangeFrom]})]})}var xn={start:`starting…`,stop:`stopping…`,restart:`restarting…`,perm:`registering…`,unperm:`unregistering…`};function Sn(e){return`instance-status status-${e}`}var Cn=()=>(0,F.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,fill:`currentColor`,"aria-hidden":`true`,children:(0,F.jsx)(`rect`,{x:`3`,y:`3`,width:`10`,height:`10`,rx:`1.5`})}),wn=()=>(0,F.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`12`,height:`12`,stroke:`currentColor`,strokeWidth:`1.5`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{d:`M6.5 3.5H4a1 1 0 0 0-1 1V12a1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1V9.5`}),(0,F.jsx)(`path`,{d:`M9.5 2.5h4v4`}),(0,F.jsx)(`path`,{d:`M13.5 2.5 8 8`})]});function Tn(e){let t=e.instance.lifecycle,n=t?.reason||e.instance.healthReason||`ok`,[r,i]=(0,P.useState)(!1),[a,o]=(0,P.useState)(e.instance.label||e.profile?.label||e.label),[s,c]=(0,P.useState)(!1),[l,u]=(0,P.useState)(null);function d(e){e.stopPropagation()}let f=e.transitioning?xn[e.transitioning]:null,p=`${Sn(e.instance.status)}${f?` is-transitioning`:``}${e.agentBusy?` is-busy`:``}`,m=e.instance.label||e.profile?.label||e.label;async function h(t){t.preventDefault(),t.stopPropagation(),c(!0),u(null);try{await e.onInstanceLabelSave(e.instance.port,a),i(!1)}catch(e){u(e.message)}finally{c(!1)}}return(0,F.jsxs)(`article`,{className:`instance-row density-${e.density||`comfortable`} priority-${e.priority||`normal`} ${e.selected?`is-selected`:``}${f?` is-transitioning-row`:``}`,children:[(0,F.jsxs)(`button`,{className:`instance-row-select`,type:`button`,"aria-pressed":e.selected,onClick:()=>{e.onSelect(e.instance)},children:[(0,F.jsxs)(`div`,{className:`instance-row-main`,children:[(0,F.jsx)(`span`,{className:p,"aria-label":e.instance.status}),(0,F.jsxs)(`div`,{className:`instance-row-title`,children:[(0,F.jsxs)(`div`,{className:`instance-row-title-line`,children:[(0,F.jsx)(`strong`,{children:e.instance.favorite?`Pinned ${m}`:m}),e.activityUnreadCount?(0,F.jsxs)(`span`,{className:`instance-unread-badge`,"aria-label":`${e.activityUnreadCount} unread activity`,children:[`(`,e.activityUnreadCount>99?`99+`:e.activityUnreadCount,`)`]}):null]}),f&&(0,F.jsx)(`span`,{children:(0,F.jsx)(`em`,{className:`instance-row-transition`,children:f})})]}),(0,F.jsxs)(`div`,{className:`instance-row-quick`,onClick:d,children:[(0,F.jsx)(`button`,{type:`button`,className:`quick-btn action-stop`,onClick:t=>{d(t),e.onLifecycle(`stop`,e.instance)},disabled:!t?.canStop||e.busy,title:`Stop`,"aria-label":`Stop`,children:(0,F.jsx)(Cn,{})}),(0,F.jsx)(`a`,{className:`quick-btn action-open${e.instance.ok?``:` is-disabled`}`,href:e.instance.ok?e.instance.url:void 0,target:e.instance.ok?`_blank`:void 0,rel:e.instance.ok?`noreferrer`:void 0,title:`Open in new tab`,"aria-label":`Open`,"aria-disabled":!e.instance.ok||void 0,tabIndex:e.instance.ok?void 0:-1,onClick:t=>{if(!e.instance.ok){t.preventDefault();return}d(t),e.onMarkActivitySeen(e.instance.port)},children:(0,F.jsx)(wn,{})}),(0,F.jsxs)(`span`,{className:`port`,children:[`:`,e.instance.port]})]})]}),(0,F.jsxs)(`div`,{className:`instance-row-meta`,children:[e.showLatestActivityTitle!==!1&&e.latestActivityTitle&&(0,F.jsx)(`span`,{className:`instance-row-activity-title`,children:e.latestActivityTitle}),e.showRuntimeLine!==!1&&(0,F.jsxs)(`span`,{className:`instance-row-runtime`,children:[e.instance.currentCli||`cli n/a`,` / `,e.instance.currentModel||`model n/a`]}),(0,F.jsxs)(`span`,{className:`instance-row-version`,children:[`v`,e.instance.version||`n/a`,` · `,e.uptime]}),(0,F.jsxs)(`span`,{className:`instance-row-reason`,children:[new Date(e.instance.lastCheckedAt).toLocaleTimeString(),` · `,n]})]})]}),e.showInlineLabelEditor!==!1&&r?(0,F.jsxs)(`form`,{className:`instance-label-edit-form`,onSubmit:e=>void h(e),onClick:d,children:[(0,F.jsx)(`input`,{className:`instance-label-input`,value:a,maxLength:120,"aria-label":`Rename ${m}`,onChange:e=>o(e.target.value)}),(0,F.jsx)(`button`,{className:`instance-label-save`,type:`submit`,disabled:s,children:`Save`}),(0,F.jsx)(`button`,{className:`instance-label-cancel`,type:`button`,disabled:s,onClick:()=>{o(e.instance.label||e.profile?.label||e.label),u(null),i(!1)},children:`Cancel`}),l&&(0,F.jsx)(`span`,{className:`instance-label-error`,children:l})]}):e.showInlineLabelEditor===!1?null:(0,F.jsx)(`button`,{className:`instance-label-edit-button`,type:`button`,"aria-label":`Rename ${m}`,title:`Rename`,onClick:t=>{d(t),o(e.instance.label||e.profile?.label||e.label),u(null),i(!0)},children:(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`13`,height:`13`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{d:`M12 20h9`}),(0,F.jsx)(`path`,{d:`M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z`})]})}),e.showSelectedActions!==!1&&(0,F.jsxs)(`div`,{className:`instance-actions`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:t=>{d(t),e.onPreview(e.instance)},disabled:!e.instance.ok,children:`Preview`}),(0,F.jsx)(`button`,{type:`button`,className:`action-start`,onClick:t=>{d(t),e.onLifecycle(`start`,e.instance)},disabled:!t?.canStart||e.busy,title:t?.commandPreview?.join(` `),children:`Start`}),(0,F.jsx)(`button`,{type:`button`,onClick:t=>{d(t),e.onLifecycle(`perm`,e.instance)},disabled:!t?.canPerm||e.busy,title:`Register as persistent service`,children:`Perm`}),(0,F.jsx)(`button`,{type:`button`,onClick:t=>{d(t),e.onLifecycle(`restart`,e.instance)},disabled:!t?.canRestart||e.busy,children:`Restart`})]})]})}function En(e,t){return e.filter(e=>!t.has(e.port))}function Dn(e,t){let n=new Set,r=t==null?[]:e.filter(e=>e.port===t),i=En(e,n).filter(e=>e.favorite);i.forEach(e=>n.add(e.port));let a=new Map;for(let t of En(e,n)){if(!t.group)continue;let e=a.get(t.group)||[];e.push(t),a.set(t.group,e),n.add(t.port)}let o=En(e,n),s=o.filter(e=>e.status===`online`),c=o.filter(e=>[`timeout`,`error`,`unknown`].includes(e.status)),l=o.filter(e=>e.status===`offline`);return[{id:`active`,label:`Active`,instances:r},{id:`favorites`,label:`Pinned`,instances:i},...Array.from(a.entries()).map(([e,t])=>({id:`group-${e}`,label:e,instances:t})),{id:`running`,label:`Running`,instances:s},{id:`attention`,label:`Attention`,instances:c},{id:`offline`,label:`Offline`,instances:l}].filter(e=>e.instances.length>0)}function On(e,t,n){return(0,F.jsx)(Tn,{instance:t,...n===void 0?{}:{profile:n},selected:e.selectedPort===t.port,busy:e.lifecycleBusyPort===t.port,transitioning:e.transitioningPort===t.port&&e.transitionAction||null,activityUnreadCount:e.activityUnreadByPort?.[t.port]||0,latestActivityTitle:e.latestTitleByPort?.[t.port]||null,agentBusy:e.busyPorts?.has(t.port)||!1,...e.showLatestActivityTitles===void 0?{}:{showLatestActivityTitle:e.showLatestActivityTitles},...e.showInlineLabelEditor===void 0?{}:{showInlineLabelEditor:e.showInlineLabelEditor},...e.showSidebarRuntimeLine===void 0?{}:{showRuntimeLine:e.showSidebarRuntimeLine},...e.showSelectedRowActions===void 0?{}:{showSelectedActions:e.showSelectedRowActions},label:e.getLabel(t),uptime:e.formatUptime(t.uptime),onSelect:e.onSelect,onPreview:e.onPreview,onMarkActivitySeen:e.onMarkActivitySeen,onInstanceLabelSave:e.onInstanceLabelSave,onLifecycle:e.onLifecycle},t.port)}function kn(e,t,n=new Map){return Dn(t,e.selectedPort).map(t=>(0,F.jsxs)(`section`,{className:`instance-group`,"aria-label":`${t.label} instances`,children:[(0,F.jsxs)(`div`,{className:`instance-group-header`,children:[(0,F.jsx)(`span`,{children:t.label}),(0,F.jsx)(`strong`,{children:t.instances.length})]}),t.instances.map(t=>On(e,t,t.profileId?n.get(t.profileId):void 0))]},t.id))}function An(e){let t=Dn(e.instances,e.selectedPort),n=new Map((e.profiles||[]).map(e=>[e.profileId,e]));return t.length===0&&n.size===0?(0,F.jsx)(`section`,{className:`state`,children:`No matching instances found.`}):n.size>0?(0,F.jsx)(`div`,{className:`instance-groups profile-instance-groups is-profile-merged`,children:kn(e,e.instances,n)}):(0,F.jsx)(`div`,{className:`instance-groups`,children:kn(e,e.instances)})}function jn(e){let t=!e.error&&!e.loading&&e.instances.length===0&&!e.instances.some(e=>e.hidden),n=e.selectedInstance&&!e.filtered.some(t=>t.port===e.selectedInstance?.port)?[e.selectedInstance,...e.filtered]:e.filtered;return(0,F.jsxs)(F.Fragment,{children:[e.error&&(0,F.jsxs)(`section`,{className:`state error-state`,children:[`Scan failed: `,e.error]}),!e.error&&e.loading&&(0,F.jsx)(`section`,{className:`state`,children:`Scanning local Jaw instances...`}),t&&e.data?.manager&&(0,F.jsx)(bn,{rangeFrom:e.data.manager.rangeFrom,rangeTo:e.data.manager.rangeTo}),!e.error&&!t&&(0,F.jsx)(An,{instances:n,selectedPort:e.selectedInstance?.port||null,lifecycleBusyPort:e.lifecycleBusyPort,transitioningPort:e.transitioningPort,transitionAction:e.transitionAction,activityUnreadByPort:e.activityUnreadByPort,latestTitleByPort:e.latestTitleByPort,...e.busyPorts===void 0?{}:{busyPorts:e.busyPorts},showLatestActivityTitles:e.showLatestActivityTitles,showInlineLabelEditor:e.showInlineLabelEditor,showSidebarRuntimeLine:e.showSidebarRuntimeLine,showSelectedRowActions:e.showSelectedRowActions,profiles:e.profiles,getLabel:e.getLabel,formatUptime:e.formatUptime,onSelect:e.onSelect,onPreview:e.onPreview,onMarkActivitySeen:e.onMarkActivitySeen,onInstanceLabelSave:e.onInstanceLabelSave,onLifecycle:e.onLifecycle})]})}function Mn(e){let t=e.count==null?``:` ${e.count}`;return(0,F.jsxs)(`button`,{type:`button`,className:`profile-chip ${e.active?`is-active`:``}`,onClick:()=>e.onToggle(e.profile.profileId),"aria-pressed":e.active,title:e.profile.homePath,children:[(0,F.jsx)(`span`,{children:e.profile.label}),t&&(0,F.jsx)(`strong`,{children:t})]})}async function Nn(){let e=await fetch(`/api/dashboard/desktop-status`);if(!e.ok)throw Error(`desktop status failed: ${e.status}`);return await e.json()}function Pn(){let e=window.location.pathname+window.location.search;window.location.href=`jaw://open?path=${encodeURIComponent(e)}`}function Fn(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(!1);return(0,P.useEffect)(()=>{let e=!1;return Nn().then(n=>{e||t(n)}).catch(()=>{e||r(!0)}),()=>{e=!0}},[]),e?.inDesktop?(0,F.jsx)(`span`,{className:`desktop-status-badge`,title:`cli-jaw Desktop ${e.version}`,children:`Running in cli-jaw Desktop`}):!e&&!n?null:(0,F.jsx)(`button`,{type:`button`,className:`desktop-open-button`,onClick:Pn,title:e?.downloadUrl||`Open this dashboard path in cli-jaw Desktop`,children:`Open in Desktop App`})}function In(e){return(0,F.jsx)(`div`,{className:`command-center command-bar`,children:(0,F.jsxs)(`div`,{className:`command-primary`,children:[e.mobileMenuButton,(0,F.jsx)(`div`,{className:`command-title`,children:e.title}),(0,F.jsx)(`div`,{className:`command-search`,children:e.search}),(0,F.jsx)(`div`,{className:`command-actions`,children:e.actions})]})})}var Ln=[{value:`auto`,label:`Auto`,hint:`Follow OS preference`},{value:`light`,label:`Light`,hint:`Always light theme`},{value:`dark`,label:`Dark`,hint:`Always dark theme`}];function Rn(e){return(0,F.jsx)(`div`,{className:`theme-switch`,role:`radiogroup`,"aria-label":`Theme`,children:Ln.map(t=>{let n=e.theme===t.value;return(0,F.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":n,title:t.hint,className:n?`is-active`:``,onClick:()=>e.onChange(t.value),children:t.label},t.value)})})}function zn(e){return(0,F.jsx)(In,{mobileMenuButton:(0,F.jsx)(`button`,{className:`drawer-trigger`,type:`button`,onClick:e.onOpenDrawer,"aria-label":`Open sidebar`,children:`☰`}),title:(0,F.jsxs)(`h1`,{className:`manager-brand-heading`,"aria-label":`CLI-JAW Dashboard`,children:[(0,F.jsx)(`span`,{className:`manager-brand-wordmark`,children:`CLI-JAW`}),(0,F.jsx)(`span`,{className:`manager-brand-dash`,children:`DASH`})]}),search:(0,F.jsxs)(`div`,{className:`search-input-wrapper`,children:[(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`14`,height:`14`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,F.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,F.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),(0,F.jsx)(`input`,{value:e.query,onChange:t=>e.onQueryChange(t.target.value),placeholder:`Search port, home, CLI, model`,"aria-label":`Search instances`})]}),actions:(0,F.jsxs)(`div`,{className:`command-actions-group`,children:[(0,F.jsx)(Fn,{}),(0,F.jsx)(`button`,{type:`button`,className:`command-palette-trigger`,onClick:e.onOpenPalette,"aria-label":`Open command palette`,title:`Open command palette (⌘K / Ctrl+K)`,children:(0,F.jsx)(`span`,{"aria-hidden":`true`,children:`⌘K`})}),(0,F.jsx)(Rn,{theme:e.theme,onChange:e.onThemeChange}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onRefresh,disabled:e.loading,children:e.loading?`Scanning`:`Refresh`})]})})}var Bn=8,Vn=5;function Hn(e,t,n){if(!n)return!0;let r=n.toLowerCase();return[String(e.port),t,e.url,e.workingDir,e.currentCli].some(e=>{if(!e)return!1;let t=String(e).toLowerCase();return t.startsWith(r)?!0:RegExp(`(^|[^\\p{L}\\p{N}])${Un(r)}`,`u`).test(t)})}function Un(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Wn(e){let[t,n]=(0,P.useState)(``),[r,i]=(0,P.useState)(0),a=(0,P.useRef)(null),o=(0,P.useRef)(null);(0,P.useEffect)(()=>{e.open&&(n(``),i(0),requestAnimationFrame(()=>a.current?.focus()))},[e.open]),(0,P.useEffect)(()=>{if(!e.open)return;function t(t){t.key===`Escape`&&(t.preventDefault(),e.onClose())}return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e.open,e.onClose]);let s=(0,P.useMemo)(()=>e.instances.filter(n=>Hn(n,e.getLabel(n),t)).slice(0,Bn),[e.instances,e.getLabel,t]),c=(0,P.useMemo)(()=>[{id:`refresh`,label:`Refresh scan`,hint:`Re-scan local ports`,run:e.onRefresh},{id:`theme`,label:`Theme: cycle (current ${e.theme})`,hint:`Auto → Light → Dark`,run:e.onCycleTheme},{id:`hidden`,label:e.showHidden?`Hide hidden instances`:`Show hidden instances`,run:e.onToggleHidden},...e.selectedInstance?[{id:`open`,label:`Open ${e.selectedInstance.url} in new tab`,run:e.onOpenSelected}]:[]].slice(0,Vn),[e.onRefresh,e.theme,e.onCycleTheme,e.showHidden,e.onToggleHidden,e.selectedInstance,e.onOpenSelected]),l=(0,P.useMemo)(()=>{let e=[];for(let t of s)e.push({kind:`instance`,instance:t});for(let t of c)e.push({kind:`action`,action:t});return e},[s,c]);(0,P.useEffect)(()=>{r>=l.length&&i(Math.max(0,l.length-1))},[l.length,r]);function u(t){let n=l[t];n&&(n.kind===`instance`?e.onSelectInstance(n.instance):n.action.run(),e.onClose())}function d(e){e.key===`ArrowDown`?(e.preventDefault(),i(e=>Math.min(l.length-1,e+1))):e.key===`ArrowUp`?(e.preventDefault(),i(e=>Math.max(0,e-1))):e.key===`Enter`&&(e.preventDefault(),u(r))}return e.open?(0,F.jsx)(`div`,{className:`command-palette-backdrop`,role:`presentation`,onClick:e.onClose,children:(0,F.jsxs)(`div`,{className:`command-palette`,role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,onClick:e=>e.stopPropagation(),children:[(0,F.jsx)(`input`,{ref:a,className:`command-palette-input`,placeholder:`Go to instance, or run an action…`,value:t,onChange:e=>{n(e.target.value),i(0)},onKeyDown:d,"aria-label":`Command query`}),(0,F.jsxs)(`div`,{className:`command-palette-list`,ref:o,children:[s.length>0&&(0,F.jsxs)(`div`,{className:`command-palette-section`,role:`group`,"aria-label":`Go to instance`,children:[(0,F.jsx)(`header`,{className:`command-palette-section-header`,children:`Go to instance`}),s.map((t,n)=>{let a=n;return(0,F.jsxs)(`button`,{type:`button`,className:a===r?`command-palette-item is-active`:`command-palette-item`,onMouseEnter:()=>i(a),onClick:()=>u(a),children:[(0,F.jsxs)(`span`,{className:`command-palette-port`,children:[`:`,t.port]}),(0,F.jsx)(`span`,{className:`command-palette-label`,children:e.getLabel(t)})]},t.port)})]}),c.length>0&&(0,F.jsxs)(`div`,{className:`command-palette-section`,role:`group`,"aria-label":`Actions`,children:[(0,F.jsx)(`header`,{className:`command-palette-section-header`,children:`Actions`}),c.map((e,t)=>{let n=s.length+t;return(0,F.jsxs)(`button`,{type:`button`,className:n===r?`command-palette-item is-active`:`command-palette-item`,onMouseEnter:()=>i(n),onClick:()=>u(n),children:[(0,F.jsx)(`span`,{className:`command-palette-label`,children:e.label}),e.hint&&(0,F.jsx)(`span`,{className:`command-palette-hint`,children:e.hint})]},e.id)})]}),l.length===0&&(0,F.jsx)(`p`,{className:`command-palette-empty`,children:`No matches.`})]}),(0,F.jsxs)(`footer`,{className:`command-palette-footer`,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`↑↓`}),` navigate`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`Enter`}),` select`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`Esc`}),` close`]})]})]})}):null}function Gn(e){let t={"--activity-dock-height":`${e.activityHeight}px`};return(0,F.jsxs)(`main`,{className:`dashboard-shell manager-shell${e.sidebarCollapsed?` is-sidebar-collapsed`:``}`,style:t,children:[(0,F.jsx)(`header`,{className:`manager-command`,children:e.commandBar}),e.workspace]})}var Kn=[`focusInstances`,`focusActiveSession`,`focusNotes`,`previousInstance`,`nextInstance`],qn={focusInstances:`Alt+I`,focusActiveSession:`Alt+P`,focusNotes:`Alt+N`,previousInstance:`Alt+K`,nextInstance:`Alt+J`};function Jn(e){let t=e.trim().toLowerCase();return t?t===`space`?` `:t.length===1?t:t===`arrowup`?`arrowup`:t===`arrowdown`?`arrowdown`:t===`arrowleft`?`arrowleft`:t===`arrowright`?`arrowright`:t:``}function Yn(e){let t=e.split(`+`).map(e=>e.trim()).filter(Boolean);if(t.length===0)return null;let n={key:``,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1};for(let e of t){let t=e.toLowerCase();t===`alt`||t===`option`?n.altKey=!0:t===`ctrl`||t===`control`?n.ctrlKey=!0:t===`meta`||t===`cmd`||t===`command`?n.metaKey=!0:t===`shift`?n.shiftKey=!0:n.key=Jn(e)}return n.key?n:null}function Xn(e){let t=e&&typeof e==`object`?e:{},n={...qn};for(let e of Kn){let r=t[e];n[e]=typeof r==`string`&&r.trim()?r:qn[e]}return n}function Zn(e){let t=Jn(e.key);return t.length===1?t:e.altKey&&e.code?.startsWith(`Key`)?e.code.slice(3).toLowerCase():t}function Qn(e,t){let n=Yn(t);return n?e.altKey===n.altKey&&e.ctrlKey===n.ctrlKey&&e.metaKey===n.metaKey&&e.shiftKey===n.shiftKey&&Zn(e)===n.key:!1}function $n(e,t){let n=Xn(t);for(let t of Kn)if(Qn(e,n[t]))return t;return null}function er(e){return e.split(`+`).map(e=>e.trim()).filter(Boolean).join(` + `)}function tr(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;let t=e.tagName.toLowerCase();return t===`input`||t===`textarea`||t===`select`?!0:!!e.closest(`[contenteditable="true"], .cm-editor, .ProseMirror, [data-milkdown-root]`)}var nr=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`실행 중인 jaw 인스턴스를 보고, 미리보기·로그·설정을 다루는 곳이에요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsx)(`li`,{children:`좌측 네비게이터에서 인스턴스를 골라 우측 Workbench(Overview / Preview / Logs / Settings)에서 작업하실 수 있어요.`}),(0,F.jsx)(`li`,{children:`우측 상단 상태 점이 초록이면 온라인, 회색이면 오프라인이에요.`}),(0,F.jsx)(`li`,{children:`인스턴스에 직접 메시지를 보내실 땐 Preview 탭의 채팅 입력을 쓰세요.`})]}),(0,F.jsxs)(`div`,{className:`help-deep`,children:[(0,F.jsx)(`h4`,{children:`빠른 판단 기준`}),(0,F.jsx)(`table`,{className:`help-table`,children:(0,F.jsxs)(`tbody`,{children:[(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Preview`}),(0,F.jsx)(`td`,{children:`실제 인스턴스 화면을 보거나 메시지를 보낼 때`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Logs`}),(0,F.jsx)(`td`,{children:`응답이 멈췄거나 dispatch 실패 원인을 확인할 때`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Settings`}),(0,F.jsx)(`td`,{children:`해당 인스턴스의 CLI, 모델, 권한을 조정할 때`})]})]})})]}),(0,F.jsxs)(`p`,{className:`help-tip`,children:[`인스턴스가 안 보이시면 터미널에서 `,(0,F.jsx)(`code`,{children:`cli-jaw start`}),`로 새 jaw를 띄워보세요. 자동으로 목록에 떠요.`]})]}),rr=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`사람이 먼저 일반 칸반 블럭을 만들고, 실행 인스턴스 블럭을 그 안에 붙이는 계층형 보드예요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsxs)(`li`,{children:[`레인 5개는 `,(0,F.jsx)(`strong`,{children:`Backlog / Ready / In Progress / Review / Done`}),` 순서예요. Backlog는 아직 commit 전 옵션, Ready는 바로 pull 가능한 작업이에요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Overall`}),`은 5열 전체 보드이고, 사이드바에서 각 레인을 누르면 해당 레인만 보는 detail 화면으로 전환돼요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Done`}),`은 Overall에서 최근 4개만 full card로 보여주고, 나머지는 `,(0,F.jsx)(`strong`,{children:`+ N more`}),`를 눌러 Done detail 화면에서 2줄 row로 확인해요.`]}),(0,F.jsxs)(`li`,{children:[`각 레인 하단의 `,(0,F.jsx)(`strong`,{children:`+ Add task`}),`로 일반 칸반 블럭을 만들고, 그 블럭 제목에 쿼리나 작업 메모를 적으시면 돼요.`]}),(0,F.jsxs)(`li`,{children:[`좌측 `,(0,F.jsx)(`strong`,{children:`Running`}),` 섹션에는 현재 실행 중인 인스턴스만 인스턴스 블럭으로 보여요.`]}),(0,F.jsx)(`li`,{children:`인스턴스 블럭을 일반 칸반 블럭 안의 드롭 영역으로 끌어 넣으면 내부 자식 블럭으로 병합돼요. 인스턴스 실행에는 영향 없어요.`}),(0,F.jsxs)(`li`,{children:[`일반 칸반 블럭은 직접 드래그해서 다른 레인으로 옮길 수 있고, `,(0,F.jsx)(`strong`,{children:`Move`}),` / `,(0,F.jsx)(`strong`,{children:`Delete`}),`도 유지돼요.`]})]}),(0,F.jsxs)(`div`,{className:`help-deep`,children:[(0,F.jsx)(`h4`,{children:`상태를 나눠 쓰는 법`}),(0,F.jsx)(`table`,{className:`help-table`,children:(0,F.jsxs)(`tbody`,{children:[(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Ready`}),(0,F.jsx)(`td`,{children:`바로 구현하거나 검증할 수 있는 작업`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Review`}),(0,F.jsx)(`td`,{children:`직원 감사, Pro 검증, 수동 smoke가 필요한 작업`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Done`}),(0,F.jsx)(`td`,{children:`커밋, 푸시, 이슈 close까지 끝난 작업`})]})]})})]}),(0,F.jsx)(`p`,{className:`help-tip`,children:`인스턴스가 없어도 일반 칸반 블럭은 계속 남아요. 쿼리·아이디어·작업 단위를 먼저 적고, 필요할 때만 실행 인스턴스를 붙이면 돼요.`})]}),ir=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`매니저가 1분마다 틱을 돌면서 대시보드에 등록된 자동화 작업을 일괄 dispatch 해주는 곳이에요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Today / Upcoming / Recurring / Blocked`}),` 그룹으로 정리되고, `,(0,F.jsx)(`code`,{children:`cron`}),`·`,(0,F.jsx)(`code`,{children:`runAt`}),`·target port를 함께 저장해요.`]}),(0,F.jsx)(`li`,{children:`Run 버튼으로 즉시 dispatch, 대상 인스턴스가 바쁘면 자동 큐잉이에요. last/next 컬럼으로 실행 이력이 보여요.`}),(0,F.jsxs)(`li`,{children:[`예전엔 인스턴스마다 자기 `,(0,F.jsx)(`code`,{children:`heartbeat.json`}),`을 setInterval로 돌리던 구조였는데, 지금은 `,(0,F.jsx)(`strong`,{children:`매니저가 단일 ticker`}),`로 돌려요. heartbeat.json은 legacy로만 표시되고 자동 실행은 안 돼요.`]})]}),(0,F.jsxs)(`div`,{className:`help-deep`,children:[(0,F.jsx)(`h4`,{children:`실패를 볼 때`}),(0,F.jsx)(`table`,{className:`help-table`,children:(0,F.jsxs)(`tbody`,{children:[(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`queued`}),(0,F.jsx)(`td`,{children:`대상 인스턴스가 바빠서 대기 중`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`blocked`}),(0,F.jsx)(`td`,{children:`비활성화했거나 실행 조건이 아직 맞지 않음`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`last/next`}),(0,F.jsx)(`td`,{children:`최근 실행 결과와 다음 실행 예측을 확인하는 기준`})]})]})})]}),(0,F.jsx)(`p`,{className:`help-tip`,children:`새 작업은 여기서 만들고, 기존 heartbeat job은 같은 cron으로 옮겨 등록하시면 돼요. 마이그레이션 자동화는 추후 추가됩니다.`})]}),ar=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(`p`,{className:`help-lead`,children:[(0,F.jsx)(`code`,{children:`~/.cli-jaw-dashboard/notes/`}),`의 마크다운 파일을 직접 편집하는 노트장이에요.`]}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsxs)(`li`,{children:[`좌측 트리에서 파일 선택, 우측에서 `,(0,F.jsx)(`strong`,{children:`Raw / Preview / WYSIWYG`}),` 모드로 편집하실 수 있어요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`kbd`,{children:`⌘/Ctrl + S`}),`로 저장, `,(0,F.jsx)(`kbd`,{children:`⌘/Ctrl + E`}),`로 모드 순환 전환이에요.`]}),(0,F.jsx)(`li`,{children:`파일이 외부에서 바뀌면 충돌 알림이 떠요 — Reload / Overwrite / Keep local 중 선택하세요.`})]}),(0,F.jsxs)(`p`,{className:`help-tip`,children:[`💡 좌측 트리 상단 `,(0,F.jsx)(`strong`,{children:`+ New`}),`로 첫 노트를 만들어 보세요. 폴더는 `,(0,F.jsx)(`code`,{children:`folder/note.md`}),` 처럼 한 번에 만드실 수 있어요.`]})]}),or=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`Jaw Reminders 스냅샷을 대시보드에서 읽고 확인하는 미러 화면이에요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`All / Focused / Scheduled / High / Done`}),` 보기로 현재 reminder 상태를 훑어볼 수 있어요.`]}),(0,F.jsx)(`li`,{children:`Refresh는 외부 Jaw Reminders 스냅샷을 다시 읽어서 대시보드용 row로 반영해요.`}),(0,F.jsx)(`li`,{children:`원본 reminder 저장소가 없거나 형식이 맞지 않아도 대시보드는 기존 미러 데이터를 유지하고 상태 메시지만 보여줘요.`})]}),(0,F.jsxs)(`div`,{className:`help-deep`,children:[(0,F.jsx)(`h4`,{children:`Matrix 보기`}),(0,F.jsx)(`table`,{className:`help-table`,children:(0,F.jsxs)(`tbody`,{children:[(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Top Priority`}),(0,F.jsx)(`td`,{children:`지금 먼저 처리할 3개를 따로 고정`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Important`}),(0,F.jsx)(`td`,{children:`중요하지만 급하지 않은 장기 작업`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Waiting`}),(0,F.jsx)(`td`,{children:`다른 사람, 직원, 외부 검증을 기다리는 작업`})]})]})})]}),(0,F.jsx)(`p`,{className:`help-tip`,children:`Reminders는 실험 기능이라 개발 모드 또는 실험 플래그가 켜진 빌드에서만 보여요.`})]}),sr=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`대시보드 외형과 동작 옵션을 조정하는 곳이에요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsx)(`li`,{children:`사이드바 폭, 워드랩, 테마 같은 표시 옵션을 바꾸실 수 있어요.`}),(0,F.jsxs)(`li`,{children:[`인스턴스 자체 설정이 아니라 `,(0,F.jsx)(`strong`,{children:`이 대시보드 UI의 환경설정`}),`이에요.`]}),(0,F.jsx)(`li`,{children:`변경 사항은 즉시 저장돼요.`})]}),(0,F.jsxs)(`div`,{className:`help-deep`,children:[(0,F.jsx)(`h4`,{children:`설정 범위`}),(0,F.jsx)(`table`,{className:`help-table`,children:(0,F.jsxs)(`tbody`,{children:[(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Display`}),(0,F.jsx)(`td`,{children:`목록, 언어, 단축키 같은 dashboard UI 선호도`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Activity`}),(0,F.jsx)(`td`,{children:`최근 작업 제목이 어떤 인스턴스에서 준비됐는지 확인`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`Instance settings`}),(0,F.jsx)(`td`,{children:`개별 인스턴스 동작은 Instances workspace에서 수정`})]})]})})]}),(0,F.jsxs)(`p`,{className:`help-tip`,children:[`인스턴스 동작을 바꾸시려면 여기가 아니라 `,(0,F.jsx)(`strong`,{children:`Instances → 해당 인스턴스 → Settings 탭`}),`으로 가세요.`]})]}),cr=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`반복 작업을 줄이는 Manager 전역 단축키예요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`kbd`,{children:`?`}),`는 이 도움말을 열어요. 입력창, 노트 에디터, WYSIWYG 편집 중에는 글자 입력을 방해하지 않아요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`kbd`,{children:er(qn.focusInstances)}),`는 Instances workspace로 이동해요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`kbd`,{children:er(qn.focusActiveSession)}),`는 선택된 인스턴스의 Preview 탭으로 이동해요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`kbd`,{children:er(qn.focusNotes)}),`는 Notes workspace로 이동해요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`kbd`,{children:er(qn.previousInstance)}),` / `,(0,F.jsx)(`kbd`,{children:er(qn.nextInstance)}),`는 현재 필터된 인스턴스 목록에서 이전/다음 행을 선택해요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`kbd`,{children:`⌘/Ctrl + S`}),`는 Notes와 Settings처럼 저장 가능한 화면에서 현재 편집 내용을 저장해요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`kbd`,{children:`⌘/Ctrl + E`}),`는 Notes 편집 모드를 순환해요.`]}),(0,F.jsx)(`li`,{children:`Manager 단축키는 Dashboard settings에서 켜고 끄거나 keymap을 바꿀 수 있어요.`}),(0,F.jsx)(`li`,{children:`Preview 탭을 보는 동안 새 activity는 읽음으로 처리되고, 다른 탭에 있을 때는 Activity Dock에 쌓여요.`})]}),(0,F.jsxs)(`div`,{className:`help-deep`,children:[(0,F.jsx)(`h4`,{children:`충돌이 날 때`}),(0,F.jsx)(`table`,{className:`help-table`,children:(0,F.jsxs)(`tbody`,{children:[(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`입력 중`}),(0,F.jsx)(`td`,{children:`글자 입력을 우선하고 전역 shortcut은 실행하지 않음`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`브라우저 충돌`}),(0,F.jsx)(`td`,{children:`Dashboard settings에서 keymap을 바꾸는 것이 안전함`})]}),(0,F.jsxs)(`tr`,{children:[(0,F.jsx)(`th`,{children:`도움말`}),(0,F.jsxs)(`td`,{children:[(0,F.jsx)(`kbd`,{children:`?`}),`는 현재 workspace 도움말과 shortcut 도움말의 진입점`]})]})]})})]}),(0,F.jsx)(`p`,{className:`help-tip`,children:`단축키는 브라우저 기본 단축키와 에디터 입력을 우선합니다.`})]}),lr=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`jaw는 Boss가 직접 처리할지, Employee에게 보낼지 상황에 따라 나눠요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Boss`}),`는 현재 대화의 주 작업자예요. 단일 파일 수정, 상태 확인, GitHub 정리는 보통 Boss가 직접 처리해요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Employee`}),`는 `,(0,F.jsx)(`code`,{children:`cli-jaw dispatch`}),`로 보내는 독립 작업자예요. Backend, Frontend, Docs 같은 역할별 검증에 씁니다.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`PABCD`}),`에서는 A phase가 plan audit, B phase가 read-only verification 중심이에요. 구현은 Boss가 직접 합니다.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`$computer-use`}),` 요청은 desktop-control 규칙을 따라 real desktop 또는 browser automation 경로로 라우팅돼요.`]})]}),(0,F.jsx)(`p`,{className:`help-tip`,children:`직원이 다른 repo로 착각하지 않도록 dispatch task에는 현재 repo 절대경로를 함께 넣는 게 원칙이에요.`})]}),ur=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`Process 상태는 인스턴스 실행과 Manager가 관리하는 preview/runtime 상태를 구분해서 봐야 해요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`online`}),`은 인스턴스 health check가 통과한 상태예요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`offline / timeout / error`}),`는 프로세스가 없거나, 응답이 늦거나, health check가 실패한 상태예요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`managed`}),`는 Manager가 띄우거나 복구 대상으로 추적하는 서버예요.`]}),(0,F.jsx)(`li`,{children:`탭 전환 후 Preview가 다시 붙을 수 있지만, 인스턴스의 실제 실행 여부는 health/status 쪽을 기준으로 보세요.`})]}),(0,F.jsx)(`p`,{className:`help-tip`,children:`Process UI가 비어 보이면 먼저 Refresh로 registry와 health 상태를 다시 읽어보세요.`})]}),dr=(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`p`,{className:`help-lead`,children:`실행 상태를 바꾸는 버튼은 현재 선택한 인스턴스나 Manager-managed 프로세스에 영향을 줘요.`}),(0,F.jsxs)(`ul`,{className:`help-bullets`,children:[(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Stop`}),`은 대상 인스턴스를 중지해요. service-owned 인스턴스는 persistent service 제거까지 포함될 수 있어요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Restart`}),`는 새 실행으로 바뀌므로 uptime과 elapsed time 판단 기준이 다시 시작돼요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Stop all managed`}),`는 Manager가 추적 중인 서버들을 한 번에 중지해요. 외부에서 직접 띄운 프로세스는 대상으로 삼지 않아요.`]}),(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`strong`,{children:`Adopt/recover`}),`는 남아 있는 managed process 기록을 다시 연결하려는 복구 작업이에요.`]})]}),(0,F.jsx)(`p`,{className:`help-tip`,children:`위험 작업은 가능한 한 확인창을 거치며, 진행 후 상태가 애매하면 Refresh로 실제 health를 확인하세요.`})]}),fr={instances:{title:`Instances`,subtitle:`인스턴스 운영`,body:nr},board:{title:`Board`,subtitle:`Cross-instance Kanban`,body:rr},schedule:{title:`Schedule`,subtitle:`시간 기반 작업`,body:ir},reminders:{title:`Reminders`,subtitle:`Jaw Reminders mirror`,body:or},notes:{title:`Notes`,subtitle:`마크다운 노트`,body:ar},settings:{title:`Settings`,subtitle:`대시보드 설정`,body:sr},shortcuts:{title:`Shortcuts`,subtitle:`전역 키보드 도움말`,body:cr},routing:{title:`Routing`,subtitle:`Boss / Employee 작업 흐름`,body:lr},processLifecycle:{title:`Process lifecycle`,subtitle:`인스턴스와 managed process 상태`,body:ur},dangerousActions:{title:`Dangerous actions`,subtitle:`중지·재시작·복구 작업 영향`,body:dr}};function pr({open:e,topic:t,onClose:n}){let r=(0,P.useRef)(null);if((0,P.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,t),r.current?.focus(),()=>document.removeEventListener(`keydown`,t)},[e,n]),!e)return null;let i=fr[t];return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`help-drawer-overlay`,onClick:n,"aria-hidden":`true`}),(0,F.jsxs)(`aside`,{className:`help-drawer`,role:`dialog`,"aria-modal":`true`,"aria-label":`${i.title} help`,children:[(0,F.jsxs)(`header`,{className:`help-drawer-header`,children:[(0,F.jsxs)(`div`,{className:`help-drawer-title`,children:[(0,F.jsx)(`span`,{className:`help-drawer-eyebrow`,children:`현재 모드`}),(0,F.jsx)(`h3`,{children:i.title}),(0,F.jsx)(`span`,{className:`help-drawer-subtitle`,children:i.subtitle})]}),(0,F.jsx)(`button`,{ref:r,type:`button`,className:`help-drawer-close`,onClick:n,"aria-label":`Close help`,children:`×`})]}),(0,F.jsx)(`div`,{className:`help-drawer-body`,children:i.body}),(0,F.jsx)(`footer`,{className:`help-drawer-footer`,children:(0,F.jsx)(`span`,{children:`사이드바 도움말은 현재 모드를 따르고, ? 키는 단축키 도움말을 열어요.`})})]})]})}function mr(e){switch(e.kind){case`scan-completed`:return{at:e.at,source:`scan`,message:`range ${e.from}-${e.to}, ${e.reachable} reachable`};case`scan-failed`:return{at:e.at,source:`error`,message:e.reason};case`lifecycle-result`:return{at:e.at,source:e.action,message:`:${e.port} ${e.status}`};case`health-changed`:return{at:e.at,source:`health`,message:`:${e.port} ${e.from} → ${e.to}`};case`instance-message`:{let t=e.title?.trim();return{at:e.at,source:`:${e.port}`,message:`${e.role}: ${t||`message #${e.messageId}`}`}}case`version-mismatch`:return{at:e.at,source:`version`,message:`:${e.port} ${e.expected||`?`} → ${e.seen}`};case`port-collision`:return{at:e.at,source:`collision`,message:`:${e.port} pids ${e.pids.join(`, `)}`};default:return{at:new Date().toISOString(),source:`event`,message:`unknown event`}}}var hr={now:`Now`,earlier:`Earlier today`,yesterday:`Yesterday`,older:`Older`},gr=[`now`,`earlier`,`yesterday`,`older`],_r=300*1e3;function vr(e,t){return typeof e==`string`?{at:t,message:e}:`kind`in e?mr(e):e}function yr(e,t){let n=Date.parse(e);if(Number.isNaN(n))return`older`;if(t.getTime()-n<=_r)return`now`;let r=new Date(t);if(r.setHours(0,0,0,0),n>=r.getTime())return`earlier`;let i=new Date(r);return i.setDate(i.getDate()-1),n>=i.getTime()?`yesterday`:`older`}function br(e,t){let n=new Date(e);return Number.isNaN(n.getTime())?`—`:t===`now`||t===`earlier`?n.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`}):t===`yesterday`?`Yesterday ${n.toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}`:n.toLocaleDateString([],{month:`short`,day:`numeric`})}function xr(e){let t=(0,P.useMemo)(()=>{let t=new Date,n=t.toISOString(),r={now:[],earlier:[],yesterday:[],older:[]};for(let i of e.entries){let e=vr(i,n),a=yr(e.at,t);r[a].push({...e,_bucket:a})}return r},[e.entries]);return e.entries.length===0?(0,F.jsx)(`div`,{className:`activity-list activity-list-empty`,role:`status`,children:(0,F.jsx)(`p`,{children:e.emptyMessage||`Activity will appear here as scans, lifecycle changes, and registry updates happen.`})}):(0,F.jsx)(`div`,{className:`activity-list`,role:`list`,"aria-label":`Recent activity grouped by time`,children:gr.map(e=>{let n=t[e];return n.length===0?null:(0,F.jsxs)(`section`,{className:`activity-group`,"aria-label":hr[e],children:[(0,F.jsx)(`header`,{className:`activity-group-header`,children:hr[e]}),n.map((t,n)=>(0,F.jsxs)(`article`,{className:`activity-entry`,role:`listitem`,children:[(0,F.jsx)(`time`,{className:`activity-entry-time`,dateTime:t.at,children:br(t.at,t._bucket)}),t.source&&(0,F.jsx)(`span`,{className:`activity-entry-source`,children:t.source}),(0,F.jsx)(`p`,{className:`activity-entry-message`,children:t.message})]},`${e}-${n}`))]},e)})})}var Sr=88,Cr=320;function wr(e){return Math.min(Cr,Math.max(Sr,Math.round(e)))}function Tr(e){let t=(0,P.useRef)(null),{onHeightChange:n}=e,r=Er(e);(0,P.useEffect)(()=>{function e(e){let r=t.current;r&&n(wr(r.startHeight+r.startY-e.clientY))}function r(){t.current=null,document.body.classList.remove(`is-resizing-activity`)}return document.addEventListener(`pointermove`,e),document.addEventListener(`pointerup`,r),()=>{document.removeEventListener(`pointermove`,e),document.removeEventListener(`pointerup`,r),document.body.classList.remove(`is-resizing-activity`)}},[n]);function i(n){e.collapsed||(n.preventDefault(),t.current={startY:n.clientY,startHeight:e.height},document.body.classList.add(`is-resizing-activity`))}return(0,F.jsxs)(`aside`,{className:`activity-dock ${e.collapsed?`is-collapsed`:``}`,"aria-label":`Activity dock`,children:[(0,F.jsx)(`button`,{className:`activity-resize-handle`,type:`button`,"aria-label":`Resize activity dock`,title:`Resize activity dock`,onPointerDown:i,disabled:e.collapsed}),(0,F.jsxs)(`div`,{className:`activity-header`,children:[(0,F.jsx)(`span`,{children:`Activity`}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onToggle,children:e.collapsed?`Expand`:`Collapse`})]}),!e.collapsed&&(0,F.jsx)(xr,{entries:r})]})}function Er(e){return(0,P.useMemo)(()=>{let t=[];if(e.events&&e.events.length>0)for(let n of e.events)t.push(n);let n=new Date().toISOString();return e.error&&t.push({at:n,source:`error`,message:e.error}),e.registryMessage&&t.push({at:n,source:`registry`,message:e.registryMessage}),e.lifecycleMessage&&t.push({at:n,source:`lifecycle`,message:e.lifecycleMessage}),t.length===0&&t.push({at:n,source:`scan`,message:e.loading?`scanning local ports`:`no recent activity`}),t},[e.events,e.loading,e.error,e.registryMessage,e.lifecycleMessage])}function Dr(e){let{children:t,onClose:n,open:r}=e,i=(0,P.useRef)(null),a=(0,P.useRef)(null);return(0,P.useEffect)(()=>{if(r)return a.current=document.activeElement,i.current?.focus(),()=>a.current?.focus()},[r]),(0,P.useEffect)(()=>{if(!r)return;function e(e){e.key===`Escape`&&n()}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[n,r]),r?(0,F.jsx)(`div`,{className:`drawer-backdrop`,onClick:n,children:(0,F.jsxs)(`aside`,{className:`instance-drawer`,role:`dialog`,"aria-modal":`true`,"aria-label":`Instance drawer`,onClick:e=>e.stopPropagation(),children:[(0,F.jsxs)(`div`,{className:`drawer-header`,children:[(0,F.jsx)(`span`,{children:`Instances`}),(0,F.jsx)(`button`,{ref:i,type:`button`,onClick:n,children:`Close`})]}),(0,F.jsxs)(`div`,{className:`drawer-body`,children:[e.profileFilters&&(0,F.jsx)(`div`,{className:`drawer-profile-filters`,children:e.profileFilters}),t]})]})}):null}function Or(e){return e.collapsed?(0,F.jsx)(`div`,{className:`instance-navigator is-collapsed`,children:e.children}):(0,F.jsxs)(`section`,{className:`instance-navigator`,"aria-label":`Instance navigator`,children:[(0,F.jsxs)(`header`,{className:`instance-navigator-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`eyebrow`,children:`Navigator`}),(0,F.jsx)(`strong`,{children:e.active?`:${e.active.port}`:`No active target`})]}),(0,F.jsxs)(`span`,{children:[e.hiddenCount,` hidden`]})]}),(0,F.jsx)(`div`,{className:`instance-navigator-scroll`,children:e.children})]})}function kr(e){return(0,F.jsxs)(`div`,{className:`mobile-nav-actions`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:e.onOpenInstances,children:`Instances`}),(0,F.jsx)(`button`,{type:`button`,className:e.activeTab===`preview`?`is-active`:``,onClick:()=>e.onSelectTab(`preview`),children:`Preview`}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onToggleActivity,children:`Activity`}),(0,F.jsx)(`button`,{type:`button`,className:e.activeTab===`settings`?`is-active`:``,onClick:()=>e.onSelectTab(`settings`),children:`More`})]})}function Ar({direction:e}){return(0,F.jsx)(`svg`,{className:`rail-collapse-chevron`,viewBox:`0 0 16 20`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:(0,F.jsx)(`polyline`,{points:e===`left`?`11 4 5 10 11 16`:`5 4 11 10 5 16`})})}function jr(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`rect`,{x:`3`,y:`4`,width:`14`,height:`10`,rx:`1.5`}),(0,F.jsx)(`path`,{d:`M8 17h4M10 14v3`})]})}function Mr(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`path`,{d:`M6 3h6l3 3v11H6z`}),(0,F.jsx)(`path`,{d:`M12 3v4h3M8 10h5M8 13h5`})]})}function Nr(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`rect`,{x:`3`,y:`4`,width:`14`,height:`12`,rx:`1.5`}),(0,F.jsx)(`path`,{d:`M7 4v12M13 4v12`})]})}function Pr(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`rect`,{x:`3`,y:`5`,width:`14`,height:`12`,rx:`1.5`}),(0,F.jsx)(`path`,{d:`M3 9h14M7 3v4M13 3v4`})]})}function Fr(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`path`,{d:`M5 4h10v13H5z`}),(0,F.jsx)(`path`,{d:`M8 2v4M12 2v4M8 10h4M8 13h3`})]})}function Ir(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}),(0,F.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`})]})}function Lr(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`circle`,{cx:`10`,cy:`10`,r:`7`}),(0,F.jsx)(`path`,{d:`M7.6 7.6a2.4 2.4 0 0 1 4.8 0c0 1.4-1.6 1.7-2.2 2.5-.3.4-.3.8-.3 1.2`}),(0,F.jsx)(`circle`,{cx:`10`,cy:`14.2`,r:`0.6`,fill:`currentColor`,stroke:`none`})]})}function Rr(e){let t=!e.collapsed,n=t?`Collapse navigation`:`Expand navigation`;return(0,F.jsxs)(`div`,{className:`sidebar-rail`,children:[(0,F.jsx)(`button`,{className:`rail-collapse-button`,type:`button`,onClick:e.onToggleSidebar,"aria-label":n,"aria-expanded":t,"aria-pressed":e.collapsed,"aria-controls":`manager-sidebar-list`,title:n,children:(0,F.jsx)(Ar,{direction:t?`left`:`right`})}),(0,F.jsx)(`button`,{className:`rail-button rail-workspace-button${e.mode===`instances`?` is-active`:``}`,type:`button`,onClick:()=>e.onModeChange(`instances`),"aria-label":`Instances`,"aria-pressed":e.mode===`instances`,title:`Instances`,children:(0,F.jsx)(jr,{})}),(0,F.jsx)(`button`,{className:`rail-button rail-workspace-button${e.mode===`board`?` is-active`:``}`,type:`button`,onClick:()=>e.onModeChange(`board`),"aria-label":`Board`,"aria-pressed":e.mode===`board`,title:`Board`,children:(0,F.jsx)(Nr,{})}),e.scheduleWorkspaceEnabled?(0,F.jsx)(`button`,{className:`rail-button rail-workspace-button${e.mode===`schedule`?` is-active`:``}`,type:`button`,onClick:()=>e.onModeChange(`schedule`),"aria-label":`Schedule`,"aria-pressed":e.mode===`schedule`,title:`Schedule`,children:(0,F.jsx)(Pr,{})}):null,e.remindersWorkspaceEnabled?(0,F.jsx)(`button`,{className:`rail-button rail-workspace-button${e.mode===`reminders`?` is-active`:``}`,type:`button`,onClick:()=>e.onModeChange(`reminders`),"aria-label":`Reminders`,"aria-pressed":e.mode===`reminders`,title:`Reminders`,children:(0,F.jsx)(Fr,{})}):null,(0,F.jsx)(`button`,{className:`rail-button rail-workspace-button${e.mode===`notes`?` is-active`:``}`,type:`button`,onClick:()=>e.onModeChange(`notes`),"aria-label":`Notes`,"aria-pressed":e.mode===`notes`,title:`Notes`,children:(0,F.jsx)(Mr,{})}),(0,F.jsx)(`button`,{className:`rail-button rail-workspace-button${e.mode===`settings`?` is-active`:``}`,type:`button`,onClick:()=>e.onModeChange(`settings`),"aria-label":`Dashboard settings`,"aria-pressed":e.mode===`settings`,title:`Dashboard settings`,children:(0,F.jsx)(Ir,{})}),(0,F.jsx)(`div`,{className:`rail-spacer`}),(0,F.jsx)(`button`,{className:`rail-button rail-help-button${e.helpOpen?` is-active`:``}`,type:`button`,onClick:e.onToggleHelp,"aria-label":`Help guide`,"aria-pressed":e.helpOpen,"aria-expanded":e.helpOpen,title:`Help (?)`,children:(0,F.jsx)(Lr,{})}),(0,F.jsx)(`span`,{className:`rail-status-dot`,"aria-label":`${e.onlineCount} online instances`})]})}var zr=[`overview`,`preview`,`logs`,`settings`];function Br(e){return e[0].toUpperCase()+e.slice(1)}function Vr(e){return(0,F.jsxs)(`section`,{className:`workbench workbench-${e.mode}`,"aria-label":`Selected instance workbench`,children:[(0,F.jsxs)(`div`,{className:`workbench-header`,children:[e.header,(0,F.jsxs)(`div`,{className:`workbench-mode-bar`,children:[(0,F.jsx)(`div`,{className:`workbench-mode-tabs`,role:`tablist`,"aria-label":`Workbench modes`,children:zr.map(t=>(0,F.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e.mode===t,className:e.mode===t?`is-active`:``,onClick:()=>e.onModeChange(t),children:Br(t)},t))}),e.modeActions]})]}),(0,F.jsxs)(`div`,{className:`workbench-body`,children:[e.mode===`overview`&&(0,F.jsx)(`div`,{className:`workbench-panel workbench-panel-overview`,children:e.overview},`overview`),(0,F.jsx)(`div`,{className:`workbench-panel workbench-panel-preview`,hidden:e.mode!==`preview`,"aria-hidden":e.mode!==`preview`,"data-preview-host":`persistent`,children:e.preview},`preview`),e.mode===`logs`&&(0,F.jsx)(`div`,{className:`workbench-panel workbench-panel-logs`,children:e.logs},`logs`),e.mode===`settings`&&(0,F.jsx)(`div`,{className:`workbench-panel workbench-panel-settings`,children:e.settings},`settings`)]})]})}function Hr(e){let t={"--activity-dock-height":`${e.inspectorHeight}px`};return(0,F.jsxs)(`div`,{className:[`manager-workspace`,e.sidebarCollapsed&&`is-sidebar-collapsed`,e.inspectorCollapsed&&`is-inspector-collapsed`,e.sidePanel&&`is-side-panel-open`,e.drawerOpen&&`is-drawer-open`].filter(Boolean).join(` `),style:t,children:[e.drawerOpen&&(0,F.jsx)(`div`,{className:`drawer-backdrop`,onClick:e.onCloseDrawer}),(0,F.jsx)(`aside`,{className:`manager-sidebar`,"aria-label":`Jaw instances`,children:e.navigator}),(0,F.jsx)(`section`,{className:`manager-detail`,"aria-label":`Manager workbench`,children:e.workbench}),(0,F.jsx)(`section`,{className:`manager-activity`,"aria-label":`Manager inspector`,children:e.inspector}),e.sidePanel&&(0,F.jsx)(`aside`,{className:`manager-ceo-panel`,"aria-label":`Jaw CEO console`,children:e.sidePanel}),(0,F.jsx)(`nav`,{className:`manager-mobile-nav`,"aria-label":`Mobile dashboard navigation`,children:e.mobileNav}),e.drawer]})}function Ur(e){return e===`127.0.0.1`||e===`localhost`||e===`::1`||e===`[::1]`}function Wr(e){return e===`dark`||e===`light`}function Gr(e,t){let n=t||(typeof window<`u`?window.location.href:``);if(!n||e.startsWith(`/`))return e;try{let t=new URL(e),r=new URL(n);return Ur(t.hostname)&&Ur(r.hostname)&&(t.hostname=r.hostname),t.toString()}catch{return e}}function Kr(e,t){if(!t)return e;let n=e.startsWith(`/`),r=new URL(e,`http://jaw.local`);return r.searchParams.set(`jawTheme`,t),n?`${r.pathname}${r.search}${r.hash}`:r.toString()}function qr(e,t,n){if(!e)return{canPreview:!1,src:null,reason:`Select an online instance to preview.`,transport:`none`,warning:null};if(!e.ok)return{canPreview:!1,src:null,reason:`Preview is only available for online instances.`,transport:`none`,warning:null};let r=t?.manager.proxy;if(!r?.enabled)return{canPreview:!1,src:null,reason:`Proxy preview is not available.`,transport:`none`,warning:null};if(e.port<r.allowedFrom||e.port>r.allowedTo)return{canPreview:!1,src:null,reason:`This port is outside the proxy allowlist.`,transport:`none`,warning:null};let i=r.preview?.instances[String(e.port)],a=Wr(n)?n:null;return r.preview?.enabled&&i?.status===`ready`&&i.url?{canPreview:!0,src:Kr(Gr(i.url),a),reason:null,transport:`origin-port`,warning:`origin proxy ready`}:{canPreview:!0,src:Kr(`${r.basePath||`/i`}/${e.port}/`,a),reason:null,transport:`legacy-path`,warning:`legacy proxy fallback`}}function Jr(e,t){if(typeof window>`u`)return`http://localhost`;try{let e=t?.contentWindow?.location.origin;if(e&&e!==`null`)return e}catch{}let n=new URL(e,window.location.href).origin;return n===`null`?null:n}function Yr(e,t,n){let r=e?.contentWindow;if(!r)return;let i=Jr(t,e);if(!(!i||i===`null`))try{r.postMessage({type:`jaw-preview-theme-sync`,theme:n},i)}catch(e){console.warn(`[manager-preview] theme sync skipped`,e)}}function Xr(e){let t=(0,P.useRef)(null),n=(0,P.useRef)(null),r=qr(e.instance,e.data,e.theme),i=e.instance?.ok?`Preview is off. Turn it on from the header to mount the iframe.`:r.reason,a=(0,P.useCallback)(()=>{!e.enabled||!r.canPreview||!r.src||n.current===r.src&&Yr(t.current,r.src,e.theme)},[e.enabled,e.theme,r.canPreview,r.src]);(0,P.useEffect)(()=>{a()},[a]);let o=(0,P.useRef)(!1);return(0,P.useEffect)(()=>{let n=o.current;if(o.current=e.active,!n&&e.active&&t.current?.contentWindow&&r.src){let e=Jr(r.src,t.current);if(e&&e!==`null`)try{t.current.contentWindow.postMessage({type:`jaw-preview-visibility`,visible:!0},e)}catch{}}},[e.active,r.src]),(0,F.jsxs)(`aside`,{className:`preview-panel`,"aria-label":`Instance preview`,children:[(!e.enabled||!r.canPreview)&&(0,F.jsx)(`div`,{className:`preview-empty`,children:i}),e.enabled&&r.canPreview&&r.src&&(0,F.jsx)(`iframe`,{title:`Jaw instance ${e.instance?.port} preview`,ref:t,className:`preview-frame`,src:r.src,sandbox:`allow-forms allow-modals allow-popups allow-same-origin allow-scripts allow-downloads`,allow:`clipboard-read; clipboard-write; microphone`,onLoad:()=>{n.current=r.src,a()}},`${e.instance?.port||`none`}:${e.refreshKey}`)]})}var Zr={ko:{navLabel:`대시보드 설정 섹션`,eyebrow:`대시보드`,title:`설정`,sections:{display:{label:`사이드바 행`,hint:`밀도와 행 안 컨트롤`},activity:{label:`미리보기와 활동`,hint:`제목 출처와 기본값`},embedding:{label:`임베딩 검색`,hint:`Provider와 벡터 인덱스`}}},en:{navLabel:`Dashboard settings sections`,eyebrow:`Dashboard`,title:`Settings`,sections:{display:{label:`Sidebar rows`,hint:`Density and inline controls`},activity:{label:`Preview & activity`,hint:`Title source and defaults`},embedding:{label:`Embedding search`,hint:`Provider and vector index`}}},zh:{navLabel:`仪表盘设置分区`,eyebrow:`仪表盘`,title:`设置`,sections:{display:{label:`侧边栏列表`,hint:`密度与行内控件`},activity:{label:`预览与活动`,hint:`标题来源与默认值`},embedding:{label:`嵌入搜索`,hint:`Provider 与向量索引`}}},ja:{navLabel:`ダッシュボード設定セクション`,eyebrow:`ダッシュボード`,title:`設定`,sections:{display:{label:`サイドバーの行`,hint:`密度と行内コントロール`},activity:{label:`プレビューとアクティビティ`,hint:`タイトルの取得元と既定値`},embedding:{label:`エンベディング検索`,hint:`Provider とベクトルインデックス`}}}},Qr=[`display`,`activity`,`embedding`];function $r(e){let t=Zr[e.locale]||Zr.ko;return(0,F.jsxs)(`nav`,{className:`dashboard-settings-sidebar`,"aria-label":t.navLabel,children:[(0,F.jsxs)(`div`,{className:`dashboard-settings-sidebar-header`,children:[(0,F.jsx)(`span`,{className:`eyebrow`,children:t.eyebrow}),(0,F.jsx)(`strong`,{children:t.title})]}),(0,F.jsx)(`div`,{className:`dashboard-settings-sidebar-list`,children:Qr.map(n=>(0,F.jsxs)(`button`,{className:`dashboard-settings-sidebar-button${e.activeSection===n?` is-active`:``}`,type:`button`,"aria-pressed":e.activeSection===n,onClick:()=>e.onSectionChange(n),children:[(0,F.jsx)(`span`,{children:t.sections[n].label}),(0,F.jsx)(`small`,{children:t.sections[n].hint})]},n))})]})}function ei(e){return(0,F.jsx)(`button`,{type:`button`,className:e.className?`help-topic-button ${e.className}`:`help-topic-button`,"aria-label":e.label,title:e.label,onClick:()=>e.onOpen(e.topic),children:`?`})}var ti=(0,P.lazy)(()=>i(()=>import(`./DashboardEmbeddingSection-BYdGgqg7.js`).then(e=>({default:e.DashboardEmbeddingSection})),[])),ni=[{value:`ko`,label:`한국어 (ko)`},{value:`en`,label:`English (en)`},{value:`zh`,label:`中文 (zh)`},{value:`ja`,label:`日本語 (ja)`}];function ri(e){return ni.find(t=>t.value===e)?.value??`ko`}var ii={ko:{ariaLabel:`대시보드 설정`,eyebrow:`매니저 환경설정`,title:`대시보드 설정`,displayTitle:`인스턴스 목록 표시`,displayDescription:`이 설정은 왼쪽 인스턴스 목록과 저장된 매니저 UI 환경설정에만 적용됩니다.`,activityTitle:`미리보기와 활동`,activityDescription:`최근 작업 제목은 각 인스턴스 서버의 endpoint 버전에 따라 달라집니다.`,embeddingTitle:`임베딩 검색`,embeddingDescription:`벡터 임베딩 provider를 설정하고 메모리 인덱스를 관리합니다.`,fields:{activity:{label:`최근 작업 미리보기`,scope:`왼쪽 인스턴스 목록`,description:`요약 endpoint를 지원하는 인스턴스에서 최신 user 또는 assistant 메시지를 정리한 한 줄을 표시합니다.`},rename:{label:`이름 변경 컨트롤`,scope:`왼쪽 인스턴스 목록`,description:`대시보드 전용 인스턴스 이름을 편집하는 연필 버튼을 표시합니다.`},runtime:{label:`런타임 줄`,scope:`왼쪽 인스턴스 목록`,description:`각 인스턴스 이름 아래에 codex / gpt-5.5 같은 CLI와 모델 정보를 표시합니다.`},actions:{label:`확장 행 액션`,scope:`선택된 인스턴스 행`,description:`선택된 인스턴스 행에 Preview, Open, Start, Stop, Restart 버튼을 표시합니다.`},language:{label:`언어`,scope:`전체 Jaw UI`,description:`i18n을 지원하는 매니저 대시보드 화면에 사용할 언어를 저장합니다.`},shortcuts:{label:`전역 단축키`,scope:`Manager dashboard`,description:`입력창과 에디터 바깥에서만 작동하는 Manager 이동 단축키를 켭니다.`},shortcutFocusInstances:{label:`인스턴스 목록`,scope:`단축키`,description:`Instances workspace로 이동합니다.`},shortcutFocusActiveSession:{label:`활성 세션`,scope:`단축키`,description:`선택된 인스턴스의 Preview 탭으로 이동합니다.`},shortcutFocusNotes:{label:`노트`,scope:`단축키`,description:`Notes workspace로 이동합니다.`},shortcutPreviousInstance:{label:`이전 인스턴스`,scope:`단축키`,description:`현재 필터 목록에서 이전 인스턴스를 선택합니다.`},shortcutNextInstance:{label:`다음 인스턴스`,scope:`단축키`,description:`현재 필터 목록에서 다음 인스턴스를 선택합니다.`}},support:{ariaLabel:`작업 제목 출처 준비 상태`,ready:`준비됨`,legacy:`레거시 endpoint`,offline:`오프라인`,empty:`현재 표시할 인스턴스가 없습니다.`,restart:`최근 작업 제목을 사용하려면 레거시 인스턴스를 재시작하세요.`}},en:{ariaLabel:`Dashboard settings`,eyebrow:`Manager preferences`,title:`Dashboard settings`,displayTitle:`Instance list display`,displayDescription:`These controls only affect the left instance list and saved manager UI preferences.`,activityTitle:`Preview & activity`,activityDescription:`Latest activity titles depend on each instance server endpoint version.`,embeddingTitle:`Embedding search`,embeddingDescription:`Configure a vector embedding provider and manage the memory index.`,fields:{activity:{label:`Recent activity preview`,scope:`Left instance list`,description:`Show one cleaned line from the latest user or assistant message when the instance supports the summary endpoint.`},rename:{label:`Rename control`,scope:`Left instance list`,description:`Show the pencil button for editing the dashboard-only instance label.`},runtime:{label:`Runtime line`,scope:`Left instance list`,description:`Show CLI and model text, for example codex / gpt-5.5, under each instance label.`},actions:{label:`Expanded row actions`,scope:`Selected instance row`,description:`Show Preview, Open, Start, Stop, and Restart buttons on the selected instance row.`},language:{label:`Language`,scope:`Global Jaw UI`,description:`Sets the saved manager dashboard locale for i18n-aware surfaces.`},shortcuts:{label:`Global shortcuts`,scope:`Manager dashboard`,description:`Enable Manager navigation shortcuts outside inputs and editors.`},shortcutFocusInstances:{label:`Instance list`,scope:`Shortcut`,description:`Move to the Instances workspace.`},shortcutFocusActiveSession:{label:`Active session`,scope:`Shortcut`,description:`Move to the selected instance Preview tab.`},shortcutFocusNotes:{label:`Notes`,scope:`Shortcut`,description:`Move to the Notes workspace.`},shortcutPreviousInstance:{label:`Previous instance`,scope:`Shortcut`,description:`Select the previous instance in the current filtered list.`},shortcutNextInstance:{label:`Next instance`,scope:`Shortcut`,description:`Select the next instance in the current filtered list.`}},support:{ariaLabel:`Activity title source readiness`,ready:`Ready`,legacy:`Legacy endpoint`,offline:`Offline`,empty:`No instances are currently visible.`,restart:`Restart legacy instances to enable latest activity titles.`}},zh:{ariaLabel:`仪表盘设置`,eyebrow:`管理器偏好`,title:`仪表盘设置`,displayTitle:`实例列表显示`,displayDescription:`这些设置只影响左侧实例列表与已保存的管理器界面偏好。`,activityTitle:`预览与活动`,activityDescription:`最近活动标题取决于各实例服务器的 endpoint 版本。`,embeddingTitle:`嵌入搜索`,embeddingDescription:`向量嵌入 Provider 设置与内存索引管理。`,fields:{activity:{label:`最近活动预览`,scope:`左侧实例列表`,description:`当实例支持摘要 endpoint 时,显示最近一条 user 或 assistant 消息整理后的单行内容。`},rename:{label:`重命名控件`,scope:`左侧实例列表`,description:`显示用于编辑仪表盘内实例标签的铅笔按钮。`},runtime:{label:`运行时信息行`,scope:`左侧实例列表`,description:`在每个实例标签下方显示 CLI 与模型信息,例如 codex / gpt-5.5。`},actions:{label:`展开行操作`,scope:`已选中的实例行`,description:`在已选中的实例行上显示 Preview、Open、Start、Stop、Restart 按钮。`},language:{label:`语言`,scope:`整个 Jaw 界面`,description:`为支持 i18n 的管理器仪表盘界面设置已保存的语言。`},shortcuts:{label:`全局快捷键`,scope:`Manager dashboard`,description:`在输入框和编辑器外启用 Manager 导航快捷键。`},shortcutFocusInstances:{label:`实例列表`,scope:`快捷键`,description:`切换到 Instances 工作区。`},shortcutFocusActiveSession:{label:`活动会话`,scope:`快捷键`,description:`切换到已选实例的 Preview 标签。`},shortcutFocusNotes:{label:`Notes`,scope:`快捷键`,description:`切换到 Notes 工作区。`},shortcutPreviousInstance:{label:`上一个实例`,scope:`快捷键`,description:`选择当前筛选列表中的上一个实例。`},shortcutNextInstance:{label:`下一个实例`,scope:`快捷键`,description:`选择当前筛选列表中的下一个实例。`}},support:{ariaLabel:`活动标题来源就绪状态`,ready:`就绪`,legacy:`旧版 endpoint`,offline:`离线`,empty:`当前没有可显示的实例。`,restart:`请重启旧版实例以启用最近活动标题。`}},ja:{ariaLabel:`ダッシュボード設定`,eyebrow:`マネージャー環境設定`,title:`ダッシュボード設定`,displayTitle:`インスタンス一覧の表示`,displayDescription:`これらの設定は左側のインスタンス一覧と保存済みのマネージャー UI 設定にのみ反映されます。`,activityTitle:`プレビューとアクティビティ`,activityDescription:`最近のアクティビティタイトルは各インスタンスサーバーの endpoint バージョンによって変わります。`,embeddingTitle:`エンベディング検索`,embeddingDescription:`ベクトルエンベディング Provider の設定とメモリインデックスの管理。`,fields:{activity:{label:`最近のアクティビティのプレビュー`,scope:`左側のインスタンス一覧`,description:`サマリ endpoint をサポートするインスタンスでは、直近の user または assistant メッセージを整形した 1 行を表示します。`},rename:{label:`名前変更コントロール`,scope:`左側のインスタンス一覧`,description:`ダッシュボード専用のインスタンス表示名を編集する鉛筆ボタンを表示します。`},runtime:{label:`ランタイム行`,scope:`左側のインスタンス一覧`,description:`各インスタンス名の下に codex / gpt-5.5 のような CLI とモデル情報を表示します。`},actions:{label:`展開行アクション`,scope:`選択中のインスタンス行`,description:`選択中のインスタンス行に Preview、Open、Start、Stop、Restart のボタンを表示します。`},language:{label:`言語`,scope:`Jaw UI 全体`,description:`i18n 対応のマネージャーダッシュボード画面で使用する言語を保存します。`},shortcuts:{label:`グローバルショートカット`,scope:`Manager dashboard`,description:`入力欄とエディタ外で Manager ナビゲーションショートカットを有効にします。`},shortcutFocusInstances:{label:`インスタンス一覧`,scope:`ショートカット`,description:`Instances ワークスペースへ移動します。`},shortcutFocusActiveSession:{label:`アクティブセッション`,scope:`ショートカット`,description:`選択中インスタンスの Preview タブへ移動します。`},shortcutFocusNotes:{label:`Notes`,scope:`ショートカット`,description:`Notes ワークスペースへ移動します。`},shortcutPreviousInstance:{label:`前のインスタンス`,scope:`ショートカット`,description:`現在のフィルタ一覧で前のインスタンスを選択します。`},shortcutNextInstance:{label:`次のインスタンス`,scope:`ショートカット`,description:`現在のフィルタ一覧で次のインスタンスを選択します。`}},support:{ariaLabel:`アクティビティタイトル取得元の準備状態`,ready:`準備完了`,legacy:`旧 endpoint`,offline:`オフライン`,empty:`現在表示できるインスタンスはありません。`,restart:`最新のアクティビティタイトルを使うには、旧バージョンのインスタンスを再起動してください。`}}};function ai(e){return(0,F.jsxs)(`div`,{className:`dashboard-settings-row`,children:[(0,F.jsxs)(`div`,{className:`dashboard-settings-row-main`,children:[(0,F.jsxs)(`label`,{className:`dashboard-settings-row-heading`,htmlFor:e.id,children:[(0,F.jsx)(`span`,{children:e.label}),(0,F.jsx)(`span`,{className:`dashboard-settings-row-scope`,children:e.scope})]}),(0,F.jsx)(`p`,{className:`dashboard-settings-row-description`,children:e.description})]}),(0,F.jsx)(`div`,{className:`dashboard-settings-row-control`,children:e.children})]})}function oi(e){return(0,F.jsx)(ai,{id:e.id,label:e.label,scope:e.scope,description:e.description,children:(0,F.jsx)(`input`,{id:e.id,className:`dashboard-settings-toggle`,type:`checkbox`,checked:e.value,onChange:t=>e.onChange(t.currentTarget.checked)})})}function si(e){return(0,F.jsx)(ai,{id:e.id,label:e.label,scope:e.scope,description:e.description,children:(0,F.jsx)(`select`,{id:e.id,className:`dashboard-settings-select`,value:e.value,onChange:t=>e.onChange(ri(t.currentTarget.value)),children:e.options.map(e=>(0,F.jsx)(`option`,{value:e.value,children:e.label},e.value))})})}function ci(e){return(0,F.jsx)(ai,{id:`dashboard-shortcut-${e.action}`,label:e.label,scope:e.scope,description:e.description,children:(0,F.jsx)(`input`,{id:`dashboard-shortcut-${e.action}`,className:`dashboard-settings-shortcut-input`,type:`text`,value:e.value,"aria-label":`${e.label} shortcut`,placeholder:`Alt+I`,onChange:t=>e.onChange(e.action,t.currentTarget.value)})})}function li(e){return e===`focusInstances`?`shortcutFocusInstances`:e===`focusActiveSession`?`shortcutFocusActiveSession`:e===`focusNotes`?`shortcutFocusNotes`:e===`previousInstance`?`shortcutPreviousInstance`:`shortcutNextInstance`}function ui({support:e,locale:t}){let n=e.ready+e.legacy+e.offline,r=ii[t].support;return(0,F.jsxs)(`div`,{className:`dashboard-settings-status-grid`,"aria-label":r.ariaLabel,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:r.ready}),(0,F.jsx)(`strong`,{children:e.ready})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:r.legacy}),(0,F.jsx)(`strong`,{children:e.legacy})]}),(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{children:r.offline}),(0,F.jsx)(`strong`,{children:e.offline})]}),(0,F.jsx)(`p`,{children:n===0?r.empty:r.restart})]})}function di(e){let t=ri(e.ui.locale),n=ii[t];(0,P.useEffect)(()=>{document.documentElement.lang=t},[t]);function r(t,n){e.onUiPatch({dashboardShortcutKeymap:{...e.ui.dashboardShortcutKeymap,[t]:n}})}return(0,F.jsxs)(`main`,{className:`dashboard-settings-workspace`,"aria-label":n.ariaLabel,children:[(0,F.jsxs)(`header`,{className:`dashboard-settings-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`span`,{className:`eyebrow`,children:n.eyebrow}),(0,F.jsx)(`h2`,{children:n.title})]}),(0,F.jsx)(ei,{topic:`settings`,label:`Open Settings help`,onOpen:e.onOpenHelpTopic})]}),e.activeSection===`display`?(0,F.jsxs)(`section`,{className:`dashboard-settings-section`,children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`h3`,{children:n.displayTitle}),(0,F.jsx)(`p`,{children:n.displayDescription})]}),(0,F.jsxs)(`div`,{className:`dashboard-settings-field-list`,children:[(0,F.jsx)(oi,{id:`dashboard-show-activity-title`,label:n.fields.activity.label,scope:n.fields.activity.scope,value:e.ui.showLatestActivityTitles,description:n.fields.activity.description,onChange:t=>e.onUiPatch({showLatestActivityTitles:t})}),(0,F.jsx)(oi,{id:`dashboard-show-label-editor`,label:n.fields.rename.label,scope:n.fields.rename.scope,value:e.ui.showInlineLabelEditor,description:n.fields.rename.description,onChange:t=>e.onUiPatch({showInlineLabelEditor:t})}),(0,F.jsx)(oi,{id:`dashboard-show-runtime-line`,label:n.fields.runtime.label,scope:n.fields.runtime.scope,value:e.ui.showSidebarRuntimeLine,description:n.fields.runtime.description,onChange:t=>e.onUiPatch({showSidebarRuntimeLine:t})}),(0,F.jsx)(oi,{id:`dashboard-show-row-actions`,label:n.fields.actions.label,scope:n.fields.actions.scope,value:e.ui.showSelectedRowActions,description:n.fields.actions.description,onChange:t=>e.onUiPatch({showSelectedRowActions:t})}),(0,F.jsx)(si,{id:`dashboard-locale`,label:n.fields.language.label,scope:n.fields.language.scope,value:t,options:ni,description:n.fields.language.description,onChange:t=>e.onUiPatch({locale:t})}),(0,F.jsx)(oi,{id:`dashboard-shortcuts-enabled`,label:n.fields.shortcuts.label,scope:n.fields.shortcuts.scope,value:e.ui.dashboardShortcutsEnabled,description:n.fields.shortcuts.description,onChange:t=>e.onUiPatch({dashboardShortcutsEnabled:t})}),Kn.map(t=>{let i=n.fields[li(t)];return(0,F.jsx)(ci,{action:t,label:i.label,scope:i.scope,value:e.ui.dashboardShortcutKeymap[t],description:`${i.description} Current: ${er(e.ui.dashboardShortcutKeymap[t])}`,onChange:r},t)})]})]}):e.activeSection===`activity`?(0,F.jsxs)(`section`,{className:`dashboard-settings-section`,children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`h3`,{children:n.activityTitle}),(0,F.jsx)(`p`,{children:n.activityDescription})]}),(0,F.jsx)(ui,{support:e.titleSupport,locale:t})]}):(0,F.jsxs)(`section`,{className:`dashboard-settings-section`,children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`h3`,{children:n.embeddingTitle}),(0,F.jsx)(`p`,{children:n.embeddingDescription})]}),(0,F.jsx)(P.Suspense,{fallback:(0,F.jsx)(`p`,{children:`Loading...`}),children:(0,F.jsx)(ti,{})})]})]})}function fi({expanded:e}){return(0,F.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,className:`notes-tree-chevron`,children:(0,F.jsx)(`path`,{d:e?`M4 6l4 4 4-4`:`M6 4l4 4-4 4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,strokeLinejoin:`round`})})}function pi({open:e}){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-icon`,children:[(0,F.jsx)(`path`,{d:`M2.5 5.2h5.1l1.2 1.5h6.7v6.7a1.4 1.4 0 0 1-1.4 1.4H3.9a1.4 1.4 0 0 1-1.4-1.4V5.2Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:e?`M2.8 7.1h12.7`:`M2.8 5.2h4.8`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function mi(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-icon`,children:[(0,F.jsx)(`path`,{d:`M5 2.8h5.2L13.5 6v9.2H5V2.8Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M10.2 2.8V6h3.3M6.9 9h4.4M6.9 11.5h3.3`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function hi(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-action-icon`,children:[(0,F.jsx)(`path`,{d:`M5 2.8h5.2L13.5 6v9.2H5V2.8Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M9.2 8.1v4.2M7.1 10.2h4.2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function gi(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-action-icon`,children:[(0,F.jsx)(`path`,{d:`M2.5 5.2h5.1l1.2 1.5h6.7v6.7a1.4 1.4 0 0 1-1.4 1.4H3.9a1.4 1.4 0 0 1-1.4-1.4V5.2Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M9 8.3v4M7 10.3h4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function _i(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-action-icon`,children:[(0,F.jsx)(`path`,{d:`M14.2 6.3A5.5 5.5 0 0 0 4 5.2L3 6.6M3.8 11.7A5.5 5.5 0 0 0 14 12.8l1-1.4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`M3 3.5v3.1h3.1M15 14.5v-3.1h-3.1`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function vi(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-action-icon`,children:[(0,F.jsx)(`path`,{d:`M4 12.8 3.5 15l2.2-.5 7.7-7.7-1.7-1.7L4 12.8Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,F.jsx)(`path`,{d:`m10.9 5.9 1.7 1.7`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function yi(e){return e.dataTransfer.getData(`application/x-cli-jaw-note-path`)||e.dataTransfer.getData(`text/plain`)||null}function bi(e){return Array.from(e.dataTransfer.types).some(e=>e===`application/x-cli-jaw-note-path`||e===`text/plain`)}function xi(e,t){let n=[];for(let r of e)n.push(r.path),r.kind===`folder`&&t.has(r.path)&&r.children&&n.push(...xi(r.children,t));return n}function Si(e,t){for(let n of e)t.set(n.path,n.kind),n.kind===`folder`&&n.children&&Si(n.children,t)}function Ci(e,t){let n=[];for(let r of e){let e=t.get(r);e&&n.push({path:r,kind:e})}return n}function wi(e){if(!(e instanceof HTMLElement))return!1;let t=e.tagName.toLowerCase();return e.isContentEditable||t===`input`||t===`textarea`||t===`select`}function Ti(e,t,n){let r=e.indexOf(t),i=e.indexOf(n);if(r===-1||i===-1)return new Set([n]);let a=Math.min(r,i),o=Math.max(r,i);return new Set(e.slice(a,o+1))}function Ei(e,t,n){if(e.key===`F2`){e.preventDefault(),n.onRenamePath(t.path,t.kind);return}if(e.key===`Delete`||e.key===`Backspace`){if(e.preventDefault(),n.multiSelected.size>1&&n.multiSelected.has(t.path)){let e=Ci(n.multiSelected,n.pathKindLookup);e.length>0&&n.onTrashPaths(e);return}n.onTrashPath(t.path,t.kind);return}if(e.key===`Enter`){if(e.preventDefault(),t.kind===`folder`){n.onSelectFolder?.(t.path),n.toggleFolder?.(t.path);return}n.onSelectPath(t.path)}}function Di(e,t,n,r,i,a,o,s,c){let l=e.path===t.selectedPath,u=o.has(e.path);if(e.kind===`folder`){let l=n.has(e.path),d=e.path===t.selectedFolderPath,f=e.children||[];return(0,F.jsxs)(`li`,{className:`notes-tree-folder`,children:[(0,F.jsxs)(`div`,{className:`notes-tree-folder-row ${d?`is-folder-selected`:``} ${i===e.path?`is-drop-target`:``} ${u?`is-multi-selected`:``}`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`notes-tree-folder-button`,"aria-expanded":l,draggable:!0,onDragStart:t=>{t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`application/x-cli-jaw-note-path`,e.path),t.dataTransfer.setData(`text/plain`,e.path)},onClick:n=>{if(n.shiftKey||n.metaKey||n.ctrlKey){c(e.path,n);return}c(e.path,n),t.onSelectFolder(e.path),r(e.path)},onDragOver:t=>{t.preventDefault(),t.stopPropagation(),a(e.path)},onDragLeave:e=>{e.stopPropagation(),a(null)},onDrop:n=>{n.preventDefault(),n.stopPropagation();let r=yi(n);a(null),r&&r!==e.path&&!e.path.startsWith(`${r}/`)&&t.onMovePath(r,e.path)},onKeyDown:n=>{if(n.key===`ArrowRight`&&!l){n.preventDefault(),r(e.path);return}if(n.key===`ArrowLeft`&&l){n.preventDefault(),r(e.path);return}Ei(n,e,{toggleFolder:r,onSelectPath:t.onSelectPath,onSelectFolder:t.onSelectFolder,onRenamePath:t.onRenamePath,onTrashPath:t.onTrashPath,onTrashPaths:t.onTrashPaths,multiSelected:o,pathKindLookup:s})},children:[(0,F.jsx)(fi,{expanded:l}),(0,F.jsx)(pi,{open:l}),(0,F.jsx)(`span`,{children:e.name})]}),(0,F.jsx)(`button`,{type:`button`,className:`notes-tree-inline-action`,title:`Rename folder`,"aria-label":`Rename folder ${e.name}`,onClick:n=>{n.stopPropagation(),t.onRenamePath(e.path,e.kind)},children:(0,F.jsx)(vi,{})})]}),l&&f.length>0&&(0,F.jsx)(`ul`,{children:f.map(e=>Di(e,t,n,r,i,a,o,s,c))})]},e.path)}let d=e.path===t.dirtyPath;return(0,F.jsx)(`li`,{children:(0,F.jsxs)(`div`,{className:`notes-tree-file-row ${l?`is-selected`:``} ${d?`is-dirty`:``} ${u?`is-multi-selected`:``}`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`notes-tree-file-button`,"aria-current":l?`page`:void 0,draggable:!0,onDragStart:t=>{t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(`application/x-cli-jaw-note-path`,e.path),t.dataTransfer.setData(`text/plain`,e.path)},onClick:n=>{if(n.shiftKey||n.metaKey||n.ctrlKey){c(e.path,n);return}c(e.path,n),t.onSelectPath(e.path)},onKeyDown:n=>Ei(n,e,{onSelectPath:t.onSelectPath,onRenamePath:t.onRenamePath,onTrashPath:t.onTrashPath,onTrashPaths:t.onTrashPaths,multiSelected:o,pathKindLookup:s}),children:[(0,F.jsx)(mi,{}),(0,F.jsx)(`span`,{children:e.name}),d&&(0,F.jsx)(`span`,{className:`notes-tree-dirty-dot`,"aria-label":`Unsaved changes`})]}),(0,F.jsx)(`button`,{type:`button`,className:`notes-tree-inline-action`,title:`Rename`,"aria-label":`Rename ${e.name}`,onClick:n=>{n.stopPropagation(),t.onRenamePath(e.path,e.kind)},children:(0,F.jsx)(vi,{})})]})},e.path)}function Oi(e){let[t,n]=(0,P.useState)(()=>new Set),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(()=>new Set),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(null);function d(e){n(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}let f=xi(e.entries,t),p=(0,P.useMemo)(()=>{let t=new Map;return Si(e.entries,t),t},[e.entries]);function m(){if(a.size===0)return;let t=Ci(a,p);t.length!==0&&e.onTrashPaths(t)}let h=(0,P.useCallback)((t,n)=>{u(t),n.shiftKey&&s?o(Ti(f,s,t)):n.metaKey||n.ctrlKey?(o(n=>{let r=new Set(n);return r.size===0&&e.selectedPath&&r.add(e.selectedPath),r.has(t)?r.delete(t):r.add(t),r}),c(t)):(a.size>0&&o(new Set),c(t))},[s,f,a.size,e.selectedPath]);return(0,P.useEffect)(()=>{e.selectedPath&&c(e.selectedPath)},[e.selectedPath]),(0,P.useEffect)(()=>{l&&!p.has(l)&&u(null),a.size!==0&&o(e=>{let t=!1,n=new Set;for(let r of e)p.has(r)?n.add(r):t=!0;return t?n:e})},[l,a.size,p]),(0,P.useEffect)(()=>{function t(t){if(!(t.metaKey||t.ctrlKey)||!t.shiftKey||t.key.toLowerCase()!==`c`||wi(t.target))return;let n=e.notesRoot;if(!n)return;let r=a.size>0?Array.from(a):l&&p.has(l)?[l]:e.selectedPath?[e.selectedPath]:[];if(r.length===0)return;t.preventDefault();let i=r.map(e=>`${n}/${e}`).join(`
11
+ `);navigator.clipboard.writeText(i)}return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[l,a,p,e.selectedPath,e.notesRoot]),(0,P.useEffect)(()=>{function t(t){if(t.defaultPrevented||!(t.metaKey||t.ctrlKey)||t.key!==`Delete`&&t.key!==`Backspace`||wi(t.target))return;let n=a.size>0?Ci(a,p):e.selectedFolderPath&&p.get(e.selectedFolderPath)===`folder`?[{path:e.selectedFolderPath,kind:`folder`}]:e.selectedPath&&p.get(e.selectedPath)===`file`?[{path:e.selectedPath,kind:`file`}]:[];n.length!==0&&(t.preventDefault(),n.length>1?e.onTrashPaths(n):e.onTrashPath(n[0].path,n[0].kind))}return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[a,p,e]),(0,F.jsxs)(`div`,{className:`notes-tree-body ${r===null?`is-root-drop-target`:``}`,onDragOver:e=>{bi(e)&&(e.preventDefault(),i(null))},onDrop:t=>{let n=yi(t);n&&(t.preventDefault(),e.onMovePath(n,null))},children:[a.size>0&&(0,F.jsxs)(`div`,{className:`notes-tree-selection-info`,children:[a.size,` selected`,(0,F.jsx)(`button`,{type:`button`,className:`notes-tree-selection-delete`,onClick:m,disabled:a.size===0,children:`Delete`}),(0,F.jsx)(`button`,{type:`button`,className:`notes-tree-clear-selection`,onClick:()=>o(new Set),children:`Clear`})]}),e.loading&&(0,F.jsx)(`div`,{className:`notes-tree-state`,children:`Loading notes...`}),!e.loading&&e.entries.length===0&&(0,F.jsx)(`div`,{className:`notes-tree-state`,children:`No notes or folders`}),!e.loading&&e.entries.length>0&&(0,F.jsx)(`ul`,{className:`notes-tree-list`,children:e.entries.map(n=>Di(n,e,t,d,r,i,a,p,h))})]})}var ki=2,Ai=275,ji=20;function Mi(e){return e instanceof DOMException&&e.name===`AbortError`}function Ni(e){let[t,n]=(0,P.useState)(``),[r,i]=(0,P.useState)([]),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(null),l=(0,P.useRef)(null),u=(0,P.useRef)(null),d=(0,P.useRef)(null),f=(0,P.useCallback)(()=>{u.current&&clearTimeout(u.current),u.current=null,d.current?.abort(),d.current=null},[]);(0,P.useEffect)(()=>{l.current?.focus()},[e.focusToken]),(0,P.useEffect)(()=>()=>f(),[f]);let p=(0,P.useCallback)(e=>{let t=e.trim();if(f(),c(null),t.length<ki){i([]),o(!1);return}let n=new AbortController;d.current=n,o(!0),be(t,{limit:ji,signal:n.signal}).then(e=>{n.signal.aborted||i(e)}).catch(e=>{n.signal.aborted||Mi(e)||(i([]),c(e.message||`Search failed`))}).finally(()=>{n.signal.aborted||o(!1)})},[f]);function m(e){n(e),u.current&&clearTimeout(u.current),u.current=setTimeout(()=>p(e),Ai)}function h(t){t.key===`Escape`&&(t.preventDefault(),e.onModeChange(`files`))}return(0,F.jsxs)(`section`,{className:`notes-search-sidebar`,"aria-label":`Search notes`,onKeyDown:h,children:[(0,F.jsx)(`div`,{className:`notes-search-sidebar-header`,children:(0,F.jsx)(`input`,{ref:l,className:`notes-search-input`,type:`search`,placeholder:`Search notes`,value:t,onChange:e=>m(e.currentTarget.value),"aria-label":`Search notes`})}),(0,F.jsxs)(`div`,{className:`notes-search-sidebar-results`,"aria-live":`polite`,children:[a&&(0,F.jsx)(`div`,{className:`notes-search-loading`,children:`Searching...`}),s&&(0,F.jsx)(`div`,{className:`notes-search-error`,children:s}),!s&&r.map(t=>(0,F.jsxs)(`button`,{type:`button`,className:`notes-search-result`,onClick:()=>e.onSelect(t.path),children:[(0,F.jsx)(`span`,{className:`notes-search-result-path`,children:t.path}),(0,F.jsx)(`span`,{className:`notes-search-result-line`,children:t.kind===`path`?`Path match`:`Line ${t.line}`}),(0,F.jsx)(`span`,{className:`notes-search-result-context`,children:t.context})]},`${t.kind}:${t.path}:${t.line}:${t.context}`)),!a&&!s&&t.trim().length>=ki&&r.length===0&&(0,F.jsx)(`div`,{className:`notes-search-empty`,children:`No results`})]})]})}var Pi=new EventTarget,Fi=`dashboard:invalidate`;function I(e){Pi.dispatchEvent(new CustomEvent(Fi,{detail:e}))}function Ii(e,t,n){function r(r){let i=r.detail;i.topics.includes(e)&&(n&&i.sourceId===n||t(i))}return Pi.addEventListener(Fi,r),()=>Pi.removeEventListener(Fi,r)}function L(e,t){let n=e.split(`/`).filter(Boolean),r=n[n.length-1];return r?t?`${t}/${r}`:r:e}function Li(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]||e}function Ri(e){let t=e.split(`/`).filter(Boolean);return t.length<=1?null:t.slice(0,-1).join(`/`)}function zi(e,t,n){let r=n===`file`&&!t.endsWith(`.md`)?`${t}.md`:t;if(r.includes(`/`))return r;let i=Ri(e);return i?`${i}/${r}`:r}function Bi(e,t,n){return e?e===t?n:e.startsWith(`${t}/`)?`${n}/${e.slice(t.length+1)}`:e:null}function Vi(e,t){return t?t===e||t.startsWith(`${e}/`):!1}function Hi(e,t,n){return n?t===`folder`?Vi(e,n):n===e:!1}function Ui(e,t,n){let r=t===`folder`?`Move folder "${e}" and all child notes to trash?`:`Move note "${e}" to trash?`;return n?`${r}\n\nThere are unsaved changes inside this target.`:r}function Wi(e,t){let n=e.filter(e=>e.kind===`file`).length,r=e.length-n,i=[];r>0&&i.push(`${r} folder${r===1?``:`s`}`),n>0&&i.push(`${n} note${n===1?``:`s`}`);let a=`Move ${i.length>0?i.join(` + `):`${e.length} items`} to trash?`;return t?`${a}\n\nThere are unsaved changes inside this selection.`:a}function Gi(){return(0,F.jsxs)(`svg`,{viewBox:`0 0 18 18`,"aria-hidden":`true`,className:`notes-tree-action-icon`,children:[(0,F.jsx)(`path`,{d:`M7.8 3.2a4.6 4.6 0 1 1 0 9.2 4.6 4.6 0 0 1 0-9.2Z`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`}),(0,F.jsx)(`path`,{d:`m11.3 11.3 3.2 3.2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`})]})}function Ki(e){let t={"--notes-tree-width":`${e.treeWidth}px`},[n,r]=(0,P.useState)(null),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(null);async function c(){let t=o?`${o}/untitled.md`:`untitled.md`,n=window.prompt(`Note path`,t);if(n)try{a(null);let t=await b(n.endsWith(`.md`)?n:`${n}.md`,``);e.onSelectedPathChange(t.path),await e.onRefreshTree(t.path),I({topics:[`notes`],reason:`note:created`,source:`ui`,sourceId:`notes-sidebar`})}catch(e){r(e.message)}}(0,P.useEffect)(()=>{function e(e){!e.altKey||e.metaKey||e.ctrlKey||e.shiftKey||e.key.toLowerCase()!==`n`||(e.preventDefault(),c())}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)});async function l(){let t=o?`${o}/new-folder`:`new-folder`,n=window.prompt(`Folder path`,t);if(n)try{a(null),s((await oe(n)).path),await e.onRefreshTree(),I({topics:[`notes`],reason:`folder:created`,source:`ui`,sourceId:`notes-sidebar`})}catch(e){r(e.message)}}async function u(t,n){let i=L(t,n);if(t!==i)try{a(null);let n=await Me(t,i);e.selectedPath===t&&e.onSelectedPathChange(n.to),await e.onRefreshTree(n.to),I({topics:[`notes`],reason:`note:moved`,source:`ui`,sourceId:`notes-sidebar`})}catch(e){r(e.message)}}async function d(t,n){let i=n===`folder`?`Rename folder`:`Rename note`,c=window.prompt(i,Li(t));if(!c)return;let l=zi(t,c,n);if(l!==t)try{a(null);let n=await Me(t,l),r=Bi(e.selectedPath,n.from,n.to),i=Bi(o,n.from,n.to);i!==o&&s(i),r!==e.selectedPath&&e.onSelectedPathChange(r),await e.onRefreshTree(r),I({topics:[`notes`],reason:`note:renamed`,source:`ui`,sourceId:`notes-sidebar`})}catch(e){r(e.message)}}async function f(t){if(t.length===0)return;if(t.length===1){await p(t[0].path,t[0].kind);return}let n=t.some(t=>Hi(t.path,t.kind,e.dirtyPath));if(!window.confirm(Wi(t,n)))return;a(null);let i=0,c=!1,l=!1,u=null;for(let n of t)try{await De(n.path,n.kind),i+=1,c||(n.kind===`folder`?Vi(n.path,e.selectedPath):e.selectedPath===n.path)&&(c=!0),!l&&n.kind===`folder`&&Vi(n.path,o)&&(l=!0)}catch(e){u=`Failed at ${n.path}: ${e.message}`;break}c&&e.onSelectedPathChange(null),l&&s(null),u?(r(u),a(i>0?`Moved ${i} of ${t.length} to trash before stopping.`:null)):a(`Moved ${i} item${i===1?``:`s`} to trash.`),await e.onRefreshTree(c?null:e.selectedPath),I({topics:[`notes`],reason:`notes:batch-trashed`,source:`ui`,sourceId:`notes-sidebar`})}async function p(t,n){let i=Hi(t,n,e.dirtyPath);if(window.confirm(Ui(t,n,i)))try{a(null);let r=await De(t,n),i=n===`folder`?Vi(t,e.selectedPath):e.selectedPath===t,c=n===`folder`?Vi(t,o):!1;i&&e.onSelectedPathChange(null),c&&s(null);let l=r.deletedTo===`os-trash`?`OS trash`:`dashboard trash`,u=r.deletedTo===`dashboard-trash`&&r.restoreHint?` Restore from: ${r.restoreHint}`:``;a(`Moved ${r.path} to ${l}.${u}`),await e.onRefreshTree(i?null:e.selectedPath),I({topics:[`notes`],reason:`note:trashed`,source:`ui`,sourceId:`notes-sidebar`})}catch(e){r(e.message)}}return(0,F.jsxs)(`aside`,{className:`notes-tree`,style:t,children:[(e.error||n)&&(0,F.jsx)(`section`,{className:`state error-state`,children:e.error||n}),i&&(0,F.jsx)(`section`,{className:`state notes-status-state`,children:i}),(0,F.jsxs)(`div`,{className:`notes-tree-header`,children:[(0,F.jsx)(`strong`,{children:`Notes`}),(0,F.jsxs)(`div`,{className:`notes-tree-actions`,children:[(0,F.jsx)(`button`,{type:`button`,className:e.mode===`search`?`is-active`:``,onClick:()=>{e.mode===`search`?e.onModeChange(`files`):e.onOpenSearch()},title:`Search notes`,"aria-label":`Search notes`,"aria-pressed":e.mode===`search`,children:(0,F.jsx)(Gi,{})}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void c(),title:`New note`,"aria-label":`New note`,children:(0,F.jsx)(hi,{})}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void l(),title:`New folder`,"aria-label":`New folder`,children:(0,F.jsx)(gi,{})}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void e.onRefreshTree(),disabled:e.loading,title:`Refresh notes`,"aria-label":`Refresh notes`,children:(0,F.jsx)(_i,{})})]})]}),e.mode===`files`?(0,F.jsxs)(F.Fragment,{children:[e.tagFilter&&(0,F.jsxs)(`div`,{className:`notes-tag-filter-banner`,role:`status`,children:[(0,F.jsxs)(`span`,{className:`notes-tag-filter-banner-meta`,children:[(0,F.jsxs)(`span`,{children:[`Tag: #`,e.tagFilter]}),e.selectedHiddenByFilter&&(0,F.jsx)(`span`,{className:`notes-tag-filter-banner-hint`,children:`Selected note hidden by filter`})]}),(0,F.jsx)(`button`,{type:`button`,className:`notes-tag-filter-clear`,onClick:e.onClearTagFilter,children:`Clear`})]}),(0,F.jsx)(Oi,{entries:e.tree,selectedPath:e.selectedPath,selectedFolderPath:o,dirtyPath:e.dirtyPath,loading:e.loading,notesRoot:e.notesRoot,onSelectPath:e.onSelectedPathChange,onSelectFolder:s,onMovePath:(e,t)=>void u(e,t),onRenamePath:(e,t)=>void d(e,t),onTrashPath:(e,t)=>void p(e,t),onTrashPaths:e=>void f(e)})]}):(0,F.jsx)(Ni,{focusToken:e.searchFocusToken,onSelect:e.onSelectedPathChange,onModeChange:e.onModeChange})]})}function qi(){return qi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qi.apply(null,arguments)}function Ji(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Yi=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=ea(e.state,n.from);return r.line?Zi(e):r.block?$i(e):!1};function Xi(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var Zi=Xi(aa,0),Qi=Xi(ia,0),$i=Xi((e,t)=>ia(e,t,ra(t)),0);function ea(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var ta=50;function na(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-ta,r),o=e.sliceDoc(i,i+ta),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=2*ta?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+ta),d=e.sliceDoc(i-ta,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function ra(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function ia(e,t,n=t.selection.ranges){let r=n.map(e=>ea(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>na(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function aa(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=ea(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}else if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var oa=lt.define(),sa=lt.define(),ca=He.define(),la=He.define({combine(e){return O(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),ua=Be.define({create(){return ka.empty},update(e,t){let n=t.state.facet(la),r=t.annotation(oa);if(r){let i=_a.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?va(o,o.length,n.minDepth,i):wa(o,t.startState.selection),new ka(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(sa);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(Xe.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=_a.fromTransaction(t),o=t.annotation(Xe.time),s=t.annotation(Xe.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new ka(e.done.map(_a.fromJSON),e.undone.map(_a.fromJSON))}});function da(e={}){return[ua,la.of(e),A.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?pa:e.inputType==`historyRedo`?ma:null;return n?(e.preventDefault(),n(t)):!1}})]}function fa(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(ua,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var pa=fa(0,!1),ma=fa(1,!1),ha=fa(0,!0),ga=fa(1,!0),_a=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&It.fromJSON(t.changes),[],t.mapped&&Ft.fromJSON(t.mapped),t.startSelection&&N.fromJSON(t.startSelection),t.selectionsAfter.map(N.fromJSON))}static fromTransaction(t,n){let r=Sa;for(let e of t.startState.facet(ca)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,Sa)}static selection(t){return new e(void 0,Sa,void 0,void 0,t)}};function va(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function ya(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function ba(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function xa(e,t){return e.length?t.length?e.concat(t):e:t}var Sa=[],Ca=200;function wa(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Ca));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),va(e,e.length-1,1e9,n.setSelAfter(r)))}else return[_a.selection([t])]}function Ta(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function Ea(e,t){if(!e.length)return e;let n=e.length,r=Sa;for(;n;){let i=Da(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}else t=i.mapped,n--,r=i.selectionsAfter}return r.length?[_a.selection(r)]:Sa}function Da(e,t,n){let r=xa(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):Sa,n);if(!e.changes)return _a.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new _a(i,Ct.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var Oa=/^(input\.type|delete)($|\.)/,ka=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||Oa.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,ya(s.changes,t.changes))||r==`input.type.compose`)?va(o,o.length-1,i.minDepth,new _a(t.changes.compose(s.changes),xa(Ct.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,Sa)):va(o,o.length,i.minDepth,t),new e(o,Sa,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:Sa;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&ba(a[a.length-1],t)?this:new e(wa(this.done,t),this.undone,n,r)}addMapping(t){return new e(Ea(this.done,t),Ea(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:oa.of({side:e,rest:Ta(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?Sa:r.slice(0,r.length-1);return i.mapped&&(n=Ea(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:oa.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}else return null}};ka.empty=new ka(Sa,Sa);var Aa=[{key:`Mod-z`,run:pa,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:ma,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:ma,preventDefault:!0},{key:`Mod-u`,run:ha,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:ga,preventDefault:!0}];function ja(e,t){return N.create(e.ranges.map(t),e.mainIndex)}function Ma(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function Na({state:e,dispatch:t},n){let r=ja(e.selection,n);return r.eq(e.selection,!0)?!1:(t(Ma(e,r)),!0)}function Pa(e,t){return N.cursor(t?e.to:e.from)}function Fa(e,t){return Na(e,n=>n.empty?e.moveByChar(n,t):Pa(n,t))}function Ia(e){return e.textDirectionAt(e.state.selection.main.head)==qe.LTR}var La=e=>Fa(e,!Ia(e)),Ra=e=>Fa(e,Ia(e));function za(e,t){return Na(e,n=>n.empty?e.moveByGroup(n,t):Pa(n,t))}var Ba=e=>za(e,!Ia(e)),Va=e=>za(e,Ia(e));typeof Intl<`u`&&Intl.Segmenter;function Ha(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function Ua(e,t,n){let r=Ge(e).resolveInner(t.head),i=n?Ve.closedBy:Ve.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;Ha(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?Ye(e,r.from,1):Ye(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,N.cursor(s,n?-1:1)}var Wa=e=>Na(e,t=>Ua(e.state,t,!Ia(e))),Ga=e=>Na(e,t=>Ua(e.state,t,Ia(e)));function Ka(e,t){return Na(e,n=>{if(!n.empty)return Pa(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var qa=e=>Ka(e,!1),Ja=e=>Ka(e,!0);function Ya(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(A.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function Xa(e,t){let n=Ya(e),{state:r}=e,i=ja(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):Pa(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=A.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(Ma(r,i),{effects:a}),!0}var Za=e=>Xa(e,!1),Qa=e=>Xa(e,!0);function $a(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=N.cursor(r.from+n))}return i}var eo=e=>Na(e,t=>$a(e,t,!0)),to=e=>Na(e,t=>$a(e,t,!1)),no=e=>Na(e,t=>$a(e,t,!Ia(e))),ro=e=>Na(e,t=>$a(e,t,Ia(e))),io=e=>Na(e,t=>N.cursor(e.lineBlockAt(t.head).from,1)),ao=e=>Na(e,t=>N.cursor(e.lineBlockAt(t.head).to,-1));function oo(e,t,n){let r=!1,i=ja(e.selection,t=>{let i=Ye(e,t.head,-1)||Ye(e,t.head,1)||t.head>0&&Ye(e,t.head-1,1)||t.head<e.doc.length&&Ye(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?N.range(t.anchor,a):N.cursor(a)});return r?(t(Ma(e,i)),!0):!1}var so=({state:e,dispatch:t})=>oo(e,t,!1);function co(e,t){let n=ja(e.state.selection,e=>{let n=t(e);return N.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0,n.assoc)});return n.eq(e.state.selection)?!1:(e.dispatch(Ma(e.state,n)),!0)}function lo(e,t){return co(e,n=>e.moveByChar(n,t))}var uo=e=>lo(e,!Ia(e)),fo=e=>lo(e,Ia(e));function po(e,t){return co(e,n=>e.moveByGroup(n,t))}var mo=e=>po(e,!Ia(e)),ho=e=>po(e,Ia(e)),R=e=>co(e,t=>Ua(e.state,t,!Ia(e))),z=e=>co(e,t=>Ua(e.state,t,Ia(e)));function go(e,t){return co(e,n=>e.moveVertically(n,t))}var _o=e=>go(e,!1),vo=e=>go(e,!0);function yo(e,t){return co(e,n=>e.moveVertically(n,t,Ya(e).height))}var bo=e=>yo(e,!1),xo=e=>yo(e,!0),So=e=>co(e,t=>$a(e,t,!0)),Co=e=>co(e,t=>$a(e,t,!1)),wo=e=>co(e,t=>$a(e,t,!Ia(e))),To=e=>co(e,t=>$a(e,t,Ia(e))),Eo=e=>co(e,t=>N.cursor(e.lineBlockAt(t.head).from)),Do=e=>co(e,t=>N.cursor(e.lineBlockAt(t.head).to)),Oo=({state:e,dispatch:t})=>(t(Ma(e,{anchor:0})),!0),ko=({state:e,dispatch:t})=>(t(Ma(e,{anchor:e.doc.length})),!0),Ao=({state:e,dispatch:t})=>(t(Ma(e,{anchor:e.selection.main.anchor,head:0})),!0),jo=({state:e,dispatch:t})=>(t(Ma(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),Mo=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),No=({state:e,dispatch:t})=>{let n=Qo(e).map(({from:t,to:n})=>N.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:N.create(n),userEvent:`select`})),!0},Po=({state:e,dispatch:t})=>{let n=ja(e.selection,t=>{let n=Ge(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return N.range(n.to,n.from)}return t});return n.eq(e.selection)?!1:(t(Ma(e,n)),!0)};function Fo(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}else if(r.head==n.head)break;else n=r}}return i.length==r.ranges.length?!1:(e.dispatch(Ma(n,N.create(i,i.length-1))),!0)}var Io=e=>Fo(e,!1),Lo=e=>Fo(e,!0),Ro=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=N.create([n.main]):n.main.empty||(r=N.create([N.cursor(n.main.head)])),r?(t(Ma(e,r)),!0):!1};function zo(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=Bo(e,o,!1)):o>i&&(n=`delete.forward`,o=Bo(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=Bo(e,i,!1),a=Bo(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:N.cursor(i,i<r.head?-1:1)}});return i.changes.empty?!1:(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?A.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function Bo(e,t,n){if(e instanceof A)for(let r of e.state.facet(A.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var Vo=(e,t,n)=>zo(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=Ke(s,a.tabSize)%at(a)||at(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=Je(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=Je(o.text,c-o.from,!1,!1)+o.from);return c}),Ho=e=>Vo(e,!1,!0),Uo=e=>Vo(e,!0,!1),Wo=(e,t)=>zo(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=Je(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),Go=e=>Wo(e,!1),Ko=e=>Wo(e,!0),qo=e=>zo(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),Jo=e=>zo(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),Yo=e=>zo(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),Xo=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:xt.of([``,``])},range:N.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},Zo=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:Je(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:Je(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:N.cursor(a)}});return n.changes.empty?!1:(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function Qo(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function $o(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of Qo(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(N.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(N.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:N.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var es=({state:e,dispatch:t})=>$o(e,t,!1),ts=({state:e,dispatch:t})=>$o(e,t,!0);function ns(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of Qo(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var rs=({state:e,dispatch:t})=>ns(e,t,!1),is=({state:e,dispatch:t})=>ns(e,t,!0),as=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Qo(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=ja(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function os(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=Ge(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(Ve.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var ss=ls(!1),cs=ls(!0);function ls(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&os(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new Tt(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=We(s,r);for(c??=Ke(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,St(t,c)];return o&&l.push(St(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:xt.of(l)},range:N.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function us(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:N.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var ds=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new Tt(e,{overrideIndentation:e=>n[e]??-1}),i=us(e,(t,i,a)=>{let o=We(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=St(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},fs=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(us(e,(t,n)=>{n.push({from:t.from,insert:e.facet(ze)})}),{userEvent:`input.indent`})),!0),ps=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(us(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=Ke(r,e.tabSize),a=0,o=St(e,Math.max(0,i-at(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),ms=e=>(e.setTabFocusMode(),!0),hs=[{key:`Ctrl-b`,run:La,shift:uo,preventDefault:!0},{key:`Ctrl-f`,run:Ra,shift:fo},{key:`Ctrl-p`,run:qa,shift:_o},{key:`Ctrl-n`,run:Ja,shift:vo},{key:`Ctrl-a`,run:io,shift:Eo},{key:`Ctrl-e`,run:ao,shift:Do},{key:`Ctrl-d`,run:Uo},{key:`Ctrl-h`,run:Ho},{key:`Ctrl-k`,run:qo},{key:`Ctrl-Alt-h`,run:Go},{key:`Ctrl-o`,run:Xo},{key:`Ctrl-t`,run:Zo},{key:`Ctrl-v`,run:Qa}],gs=[{key:`ArrowLeft`,run:La,shift:uo,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:Ba,shift:mo,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:no,shift:wo,preventDefault:!0},{key:`ArrowRight`,run:Ra,shift:fo,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:Va,shift:ho,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:ro,shift:To,preventDefault:!0},{key:`ArrowUp`,run:qa,shift:_o,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:Oo,shift:Ao},{mac:`Ctrl-ArrowUp`,run:Za,shift:bo},{key:`ArrowDown`,run:Ja,shift:vo,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:ko,shift:jo},{mac:`Ctrl-ArrowDown`,run:Qa,shift:xo},{key:`PageUp`,run:Za,shift:bo},{key:`PageDown`,run:Qa,shift:xo},{key:`Home`,run:to,shift:Co,preventDefault:!0},{key:`Mod-Home`,run:Oo,shift:Ao},{key:`End`,run:eo,shift:So,preventDefault:!0},{key:`Mod-End`,run:ko,shift:jo},{key:`Enter`,run:ss,shift:ss},{key:`Mod-a`,run:Mo},{key:`Backspace`,run:Ho,shift:Ho,preventDefault:!0},{key:`Delete`,run:Uo,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:Go,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:Ko,preventDefault:!0},{mac:`Mod-Backspace`,run:Jo,preventDefault:!0},{mac:`Mod-Delete`,run:Yo,preventDefault:!0}].concat(hs.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),_s=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:Wa,shift:R},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:Ga,shift:z},{key:`Alt-ArrowUp`,run:es},{key:`Shift-Alt-ArrowUp`,run:rs},{key:`Alt-ArrowDown`,run:ts},{key:`Shift-Alt-ArrowDown`,run:is},{key:`Mod-Alt-ArrowUp`,run:Io},{key:`Mod-Alt-ArrowDown`,run:Lo},{key:`Escape`,run:Ro},{key:`Mod-Enter`,run:cs},{key:`Alt-l`,mac:`Ctrl-l`,run:No},{key:`Mod-i`,run:Po,preventDefault:!0},{key:`Mod-[`,run:ps},{key:`Mod-]`,run:fs},{key:`Mod-Alt-\\`,run:ds},{key:`Shift-Mod-k`,run:as},{key:`Shift-Mod-\\`,run:so},{key:`Mod-/`,run:Yi},{key:`Alt-A`,run:Qi},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:ms}].concat(gs),vs={key:`Tab`,run:fs,shift:ps},ys=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,bs=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(ys(e)):ys,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Ze(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=nt(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=et(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n,a=!0;;e++){let n=r.charCodeAt(e),o=this.match(n,i,a,this.bufferPos+this.bufferStart,e==r.length-1);if(o)return this.value=o,this;if(e==r.length-1)break;a&&e<t.length&&t.charCodeAt(e)==n?i++:a=!1}}}match(e,t,n,r,i){let a=null;for(let t=0;t<this.matches.length;){let n=this.matches[t],o=!1;this.query.charCodeAt(n.index)==e&&(n.index==this.query.length-1?a={from:n.from,to:r,precise:i&&n.precise}:(n.index++,o=!0)),o?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:t,to:r,precise:n&&i}:this.matches.push({from:t,index:1,precise:n})),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}};typeof Symbol<`u`&&(bs.prototype[Symbol.iterator]=function(){return this});var xs={from:-1,to:-1,match:/.*/.exec(``),precise:!0},Ss=`gm`+(/x/.unicode==null?``:`u`),Cs=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=xs,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new Es(e,t,n,r,i);this.re=new RegExp(t,Ss+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter(),this.curLineStart=e.lineAt(r).from,this.matchPos=Os(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=Os(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},ws=new WeakMap,Ts=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=ws.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return ws.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),ws.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},Es=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=xs,this.matchPos=Os(e,r),this.re=new RegExp(t,Ss+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=Ts.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,precise:!0,match:t},this.matchPos=Os(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Ts.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(Cs.prototype[Symbol.iterator]=Es.prototype[Symbol.iterator]=function(){return this});function Ds(e){try{return new RegExp(e,Ss),!0}catch{return!1}}function Os(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var ks=e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:r,result:i}=Ot(e,{label:t.phrase(`Go to line`),input:{type:`text`,name:`line`,value:n},focus:!0,submitLabel:t.phrase(`go`)});return i.then(n=>{let i=n&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.elements.line.value);if(!i){e.dispatch({effects:r});return}let a=t.doc.lineAt(t.selection.main.head),[,o,s,c,l]=i,u=c?+c.slice(1):0,d=s?+s:a.number;if(s&&l){let e=d/100;o&&(e=e*(o==`-`?-1:1)+a.number/t.doc.lines),d=Math.round(t.doc.lines*e)}else s&&o&&(d=d*(o==`-`?-1:1)+a.number);let f=t.doc.line(Math.max(1,Math.min(t.doc.lines,d))),p=N.cursor(f.from+Math.max(0,Math.min(u,f.length)));e.dispatch({effects:[r,A.scrollIntoView(p.from,{y:`center`})],selection:p})}),!0},As={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},js=He.define({combine(e){return O(e,As,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Ms(e){let t=[Rs,Ls];return e&&t.push(js.of(e)),t}var Ns=kt.mark({class:`cm-selectionMatch`}),Ps=kt.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function Fs(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=j.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=j.Word)}function Is(e,t,n,r){return e(t.sliceDoc(n,n+1))==j.Word&&e(t.sliceDoc(r-1,r))==j.Word}var Ls=st.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(js),{state:n}=e,r=n.selection;if(r.ranges.length>1)return kt.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return kt.none;let e=n.wordAt(i.head);if(!e)return kt.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return kt.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(Fs(o,n,i.from,i.to)&&Is(o,n,i.from,i.to)))return kt.none}else if(a=n.sliceDoc(i.from,i.to),!a)return kt.none}let s=[];for(let r of e.visibleRanges){let e=new bs(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||Fs(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(Ps.range(r,a)):(r>=i.to||a<=i.from)&&s.push(Ns.range(r,a)),s.length>t.maxMatches))return kt.none}}return kt.set(s)}},{decorations:e=>e.decorations}),Rs=A.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),zs=({state:e,dispatch:t})=>{let{selection:n}=e,r=N.create(n.ranges.map(t=>e.wordAt(t.head)||N.cursor(t.head)),n.mainIndex);return r.eq(n)?!1:(t(e.update({selection:r})),!0)};function Bs(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new bs(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new bs(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var Vs=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return zs({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=Bs(e,r);return i?(t(e.update({selection:e.selection.addRange(N.range(i.from,i.to),!1),effects:A.scrollIntoView(i.to)})),!0):!1},Hs=He.define({combine(e){return O(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Sc(e),scrollToMatch:e=>A.scrollIntoView(e)})}}),Us=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||Ds(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`
12
+ `:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new ec(this):new Js(this)}getCursor(e,t=0,n){let r=e.doc?e:it.create({doc:e});return n??=r.doc.length,this.regexp?Xs(this,r,t,n):Ks(this,r,t,n)}},Ws=class{constructor(e){this.spec=e}};function Gs(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function Ks(e,t,n,r){let i;return e.wholeWord&&(i=qs(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=Gs(e.test,t,i)),new bs(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function qs(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(Zs(i,n-a))!=j.Word||t(Qs(i,n-a))!=j.Word)&&(t(Qs(i,r-a))!=j.Word||t(Zs(i,r-a))!=j.Word))}var Js=class extends Ws{constructor(e){super(e)}nextMatch(e,t,n){let r=Ks(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=Ks(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=Ks(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Ks(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Ks(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function Ys(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function Xs(e,t,n,r){let i;return e.wholeWord&&(i=$s(t.charCategorizer(t.selection.main.head))),e.test&&(i=Ys(e.test,t,i)),new Cs(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function Zs(e,t){return e.slice(Je(e,t,!1),t)}function Qs(e,t){return e.slice(t,Je(e,t))}function $s(e){return(t,n,r)=>!r[0].length||(e(Zs(r.input,r.index))!=j.Word||e(Qs(r.input,r.index))!=j.Word)&&(e(Qs(r.input,r.index+r[0].length))!=j.Word||e(Zs(r.input,r.index+r[0].length))!=j.Word)}var ec=class extends Ws{nextMatch(e,t,n){let r=Xs(this.spec,e,n,e.doc.length).next();return r.done&&(r=Xs(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=Xs(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=Xs(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Xs(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},tc=Ct.define(),nc=Ct.define(),rc=Be.define({create(e){return new ic(gc(e).create(),null)},update(e,t){for(let n of t.effects)n.is(tc)?e=new ic(n.value.create(),e.panel):n.is(nc)&&(e=new ic(e.query,n.value?hc:null));return e},provide:e=>wt.from(e,e=>e.panel)}),ic=class{constructor(e,t){this.query=e,this.panel=t}},ac=kt.mark({class:`cm-searchMatch`}),oc=kt.mark({class:`cm-searchMatch cm-searchMatch-selected`}),sc=st.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(rc))}update(e){let t=e.state.field(rc);(t!=e.startState.field(rc)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return kt.none;let{view:n}=this,r=new Ue;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?oc:ac)})}return r.finish()}},{decorations:e=>e.decorations});function cc(e){return t=>{let n=t.state.field(rc,!1);return n&&n.query.spec.valid?e(t,n):yc(t)}}var lc=cc((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=N.single(r.from,r.to),a=e.state.facet(Hs);return e.dispatch({selection:i,effects:[Ec(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),vc(e),!0}),uc=cc((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=N.single(i.from,i.to),o=e.state.facet(Hs);return e.dispatch({selection:a,effects:[Ec(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),vc(e),!0}),dc=cc((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:N.create(n.map(e=>N.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),fc=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new bs(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(N.range(t.value.from,t.value.to))}return t(e.update({selection:N.create(a,o),userEvent:`select.search.matches`})),!0},pc=cc((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.precise?o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),u.push(A.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`))):o=t.nextMatch(n,o.from,o.to);let d=e.state.changes(s);return o&&(c=N.single(o.from,o.to).map(d),u.push(Ec(e,o)),u.push(n.facet(Hs).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),mc=cc((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:a}=r;a&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:A.announce.of(r),userEvent:`input.replace.all`}),!0});function hc(e){return e.state.facet(Hs).createPanel(e)}function gc(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(Hs);return new Us({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function _c(e){let t=Mt(e,hc);return t&&t.dom.querySelector(`[main-field]`)}function vc(e){let t=_c(e);t&&t==e.root.activeElement&&t.select()}var yc=e=>{let t=e.state.field(rc,!1);if(t&&t.panel){let n=_c(e);if(n&&n!=e.root.activeElement){let r=gc(e.state,t.query.spec);r.valid&&e.dispatch({effects:tc.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[nc.of(!0),t?tc.of(gc(e.state,t.query.spec)):Ct.appendConfig.of(Oc)]});return!0},bc=e=>{let t=e.state.field(rc,!1);if(!t||!t.panel)return!1;let n=Mt(e,hc);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:nc.of(!1)}),!0},xc=[{key:`Mod-f`,run:yc,scope:`editor search-panel`},{key:`F3`,run:lc,shift:uc,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:lc,shift:uc,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:bc,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:fc},{key:`Mod-Alt-g`,run:ks},{key:`Mod-d`,run:Vs,preventDefault:!0}],Sc=class{constructor(e){this.view=e;let t=this.query=e.state.field(rc).query.spec;this.commit=this.commit.bind(this),this.searchField=yt(`input`,{value:t.search,placeholder:Cc(e,`Find`),"aria-label":Cc(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=yt(`input`,{value:t.replace,placeholder:Cc(e,`Replace`),"aria-label":Cc(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=yt(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=yt(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=yt(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return yt(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=yt(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>lc(e),[Cc(e,`next`)]),n(`prev`,()=>uc(e),[Cc(e,`previous`)]),n(`select`,()=>dc(e),[Cc(e,`all`)]),yt(`label`,null,[this.caseField,Cc(e,`match case`)]),yt(`label`,null,[this.reField,Cc(e,`regexp`)]),yt(`label`,null,[this.wordField,Cc(e,`by word`)]),...e.state.readOnly?[]:[yt(`br`),this.replaceField,n(`replace`,()=>pc(e),[Cc(e,`replace`)]),n(`replaceAll`,()=>mc(e),[Cc(e,`replace all`)])],yt(`button`,{name:`close`,onclick:()=>bc(e),"aria-label":Cc(e,`close`),type:`button`},[`×`])])}commit(){let e=new Us({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:tc.of(e)}))}keydown(e){_t(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?uc:lc)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),pc(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(tc)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Hs).top}};function Cc(e,t){return e.state.phrase(t)}var wc=30,Tc=/[\s\.,:;?!]/;function Ec(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-wc),o=Math.min(i,n+wc),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<wc;e++)if(!Tc.test(s[e+1])&&Tc.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-wc;e--)if(!Tc.test(s[e-1])&&Tc.test(s[e])){s=s.slice(0,e);break}}return A.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var Dc=A.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),Oc=[rc,ot.low(sc),Dc],kc=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},Ac=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,n,r){let i=r.facet(Uc).markerFilter;i&&(t=i(t,r));let a=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new Ue,s=[],c=0,l=r.doc.iter(),u=0,d=r.doc.length;for(let e=0;;){let t=e==a.length?null:a[e];if(!t&&!s.length)break;let n,r;if(s.length)n=c,r=s.reduce((e,t)=>Math.min(e,t.to),t&&t.from>n?t.from:1e8);else{if(n=t.from,n>d)break;r=t.to,s.push(t),e++}for(;e<a.length;){let t=a[e];if(t.from==n&&(t.to>t.from||t.to==n))s.push(t),e++,r=Math.min(t.to,r);else{r=Math.min(t.from,r);break}}r=Math.min(r,d);let i=!1;if(s.some(e=>e.from==n&&(e.to==r||r==d))&&(i=n==r,!i&&r-n<10)){let e=n-(u+l.value.length);e>0&&(l.next(e),u=n);for(let e=n;;){if(e>=r){i=!0;break}if(!l.lineBreak&&u+l.value.length>e)break;e=u+l.value.length,u+=l.value.length,l.next()}}let f=el(s);if(i)o.add(n,n,kt.widget({widget:new qc(f),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);o.add(n,r,kt.mark({class:`cm-lintRange cm-lintRange-`+f+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>r)}))}if(c=r,c==d)break;for(let e=0;e<s.length;e++)s[e].to<=c&&s.splice(e--,1)}let f=o.finish();return new e(f,n,jc(f))}};function jc(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0))if(!r)r=new kc(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new kc(r.from,n,r.diagnostic)}),r}function Mc(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(Uc).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(Pc))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function Nc(e,t){return e.field(Lc,!1)?t:t.concat(Ct.appendConfig.of(tl))}var Pc=Ct.define(),Fc=Ct.define(),Ic=Ct.define(),Lc=Be.define({create(){return new Ac(kt.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=jc(n,e.selected.diagnostic,i)||jc(n,null,i)}!n.size&&i&&t.state.facet(Uc).autoPanel&&(i=null),e=new Ac(n,i,r)}for(let n of t.effects)if(n.is(Pc)){let r=t.state.facet(Uc).autoPanel?n.value.length?Yc.open:null:e.panel;e=Ac.init(n.value,r,t.state)}else n.is(Fc)?e=new Ac(e.diagnostics,n.value?Yc.open:null,e.selected):n.is(Ic)&&(e=new Ac(e.diagnostics,e.panel,n.value));return e},provide:e=>[wt.from(e,e=>e.panel),A.decorations.from(e,e=>e.diagnostics)]}),Rc=kt.mark({class:`cm-lintRange cm-lintRange-active`});function zc(e,t,n){let{diagnostics:r}=e.state.field(Lc),i,a=-1,o=-1;r.between(t-+(n<0),t+ +(n>0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=s.diagnostics,a=e,o=r,!1});let s=e.state.facet(Uc).tooltipFilter;return i&&s&&(i=s(i,e.state)),i?{pos:a,end:o,above:e.state.doc.lineAt(a).to<o,create(){return{dom:Bc(e,i)}}}:null}function Bc(e,t){return yt(`ul`,{class:`cm-tooltip-lint`},t.map(t=>Kc(e,t,!1)))}var Vc=e=>{let t=e.state.field(Lc,!1);(!t||!t.panel)&&e.dispatch({effects:Nc(e.state,[Fc.of(!0)])});let n=Mt(e,Yc.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},B=e=>{let t=e.state.field(Lc,!1);return!t||!t.panel?!1:(e.dispatch({effects:Fc.of(!1)}),!0)},Hc=[{key:`Mod-Shift-m`,run:Vc,preventDefault:!0},{key:`F8`,run:e=>{let t=e.state.field(Lc,!1);if(!t)return!1;let n=e.state.selection.main,r=jc(t.diagnostics,null,n.to+1);return!r&&(r=jc(t.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],Uc=He.define({combine(e){return{sources:e.map(e=>e.source).filter(e=>e!=null),...O(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:Wc,tooltipFilter:Wc,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})}}});function Wc(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function Gc(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue actions}}t.push(``)}return t}function Kc(e,t,n){let r=n?Gc(t.actions):[];return yt(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},yt(`span`,{class:`cm-diagnosticText`},t.renderMessage?t.renderMessage(e):t.message),t.actions?.map((n,i)=>{let a=!1,o=r=>{if(r.preventDefault(),a)return;a=!0;let i=jc(e.state.field(Lc).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,c=r[i]?s.indexOf(r[i]):-1,l=c<0?s:[s.slice(0,c),yt(`u`,s.slice(c,c+1)),s.slice(c+1)];return yt(`button`,{type:`button`,class:`cm-diagnosticAction`+(n.markClass?` `+n.markClass:``),onclick:o,onmousedown:o,"aria-label":` Action: ${s}${c<0?``:` (access key "${r[i]})"`}.`},l)}),t.source&&yt(`div`,{class:`cm-diagnosticSource`},t.source))}var qc=class extends ct{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return yt(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},Jc=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=Kc(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},Yc=class e{constructor(e){this.view=e,this.items=[],this.list=yt(`ul`,{tabIndex:0,role:`listbox`,"aria-label":this.view.state.phrase(`Diagnostics`),onkeydown:t=>{if(!(t.ctrlKey||t.altKey||t.metaKey)){if(t.keyCode==27)B(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:n}=this.items[this.selectedIndex],r=Gc(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=jc(this.view.state.field(Lc).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}else return;t.preventDefault()}},onclick:e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)}}),this.dom=yt(`div`,{class:`cm-panel-lint`},this.list,yt(`button`,{type:`button`,name:`close`,"aria-label":this.view.state.phrase(`close`),onclick:()=>B(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(Lc).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Lc),n=0,r=!1,i=null,a=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:s})=>{for(let e of s.diagnostics){if(a.has(e))continue;a.add(e);let o=-1,s;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(s=new Jc(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute(`aria-selected`)||(s.dom.setAttribute(`aria-selected`,`true`),i=s):s.dom.hasAttribute(`aria-selected`)&&s.dom.removeAttribute(`aria-selected`),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new Jc(this.view,{from:-1,to:-1,severity:`info`,message:this.view.state.phrase(`No diagnostics`)})),r=!0),i?(this.list.setAttribute(`aria-activedescendant`,i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute(`aria-activedescendant`),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=jc(this.view.state.field(Lc).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:Ic.of(t)})}static open(t){return new e(t)}};function Xc(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function Zc(e){return Xc(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,`width="6" height="3"`)}var Qc=A.baseTheme({".cm-diagnostic":{padding:`3px 6px 3px 8px`,marginLeft:`-1px`,display:`block`,whiteSpace:`pre-wrap`},".cm-diagnostic-error":{borderLeft:`5px solid #d11`},".cm-diagnostic-warning":{borderLeft:`5px solid orange`},".cm-diagnostic-info":{borderLeft:`5px solid #999`},".cm-diagnostic-hint":{borderLeft:`5px solid #66d`},".cm-diagnosticAction":{font:`inherit`,border:`none`,padding:`2px 4px`,backgroundColor:`#444`,color:`white`,borderRadius:`3px`,marginLeft:`8px`,cursor:`pointer`},".cm-diagnosticSource":{fontSize:`70%`,opacity:.7},".cm-lintRange":{backgroundPosition:`left bottom`,backgroundRepeat:`repeat-x`,paddingBottom:`0.7px`},".cm-lintRange-error":{backgroundImage:Zc(`#d11`)},".cm-lintRange-warning":{backgroundImage:Zc(`orange`)},".cm-lintRange-info":{backgroundImage:Zc(`#999`)},".cm-lintRange-hint":{backgroundImage:Zc(`#66d`)},".cm-lintRange-active":{backgroundColor:`#ffdd9980`},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:`relative`,"&:after":{content:`""`,position:`absolute`,bottom:0,left:`-2px`,borderLeft:`3px solid transparent`,borderRight:`3px solid transparent`,borderBottom:`4px solid #d11`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`orange`}},".cm-lintPoint-info":{"&:after":{borderBottomColor:`#999`}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:`#66d`}},".cm-panel.cm-panel-lint":{position:`relative`,"& ul":{maxHeight:`100px`,overflowY:`auto`,"& [aria-selected]":{backgroundColor:`#ddd`,"& u":{textDecoration:`underline`}},"&:focus [aria-selected]":{background_fallback:`#bdf`,backgroundColor:`Highlight`,color_fallback:`white`,color:`HighlightText`},"& u":{textDecoration:`none`},padding:0,margin:0},"& [name=close]":{position:`absolute`,top:`0`,right:`2px`,background:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:`#86714a80`},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:`#2e343e`}}});function $c(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function el(e){let t=`hint`,n=1;for(let r of e){let e=$c(r.severity);e>n&&(n=e,t=r.severity)}return t}var tl=[Lc,A.decorations.compute([Lc],e=>{let{selected:t,panel:n}=e.field(Lc);return!t||!n||t.from==t.to?kt.none:kt.set([Rc.range(t.from,t.to)])}),Et(zc,{hideOn:Mc}),Qc],nl=function(e){e===void 0&&(e={});var{crosshairCursor:t=!1}=e,n=[];e.closeBracketsKeymap!==!1&&(n=n.concat(Rt)),e.defaultKeymap!==!1&&(n=n.concat(_s)),e.searchKeymap!==!1&&(n=n.concat(xc)),e.historyKeymap!==!1&&(n=n.concat(Aa)),e.foldKeymap!==!1&&(n=n.concat(rt)),e.completionKeymap!==!1&&(n=n.concat(Vt)),e.lintKeymap!==!1&&(n=n.concat(Hc));var r=[];return e.lineNumbers!==!1&&r.push(pt()),e.highlightActiveLineGutter!==!1&&r.push(bt()),e.highlightSpecialChars!==!1&&r.push(dt()),e.history!==!1&&r.push(da()),e.foldGutter!==!1&&r.push(ft()),e.drawSelection!==!1&&r.push(Re()),e.dropCursor!==!1&&r.push(ht()),e.allowMultipleSelections!==!1&&r.push(it.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&r.push(Qe()),e.syntaxHighlighting!==!1&&r.push($e(vt,{fallback:!0})),e.bracketMatching!==!1&&r.push(Dt()),e.closeBrackets!==!1&&r.push(Ht()),e.autocompletion!==!1&&r.push(Bt()),e.rectangularSelection!==!1&&r.push(mt()),t!==!1&&r.push(tt()),e.highlightActiveLine!==!1&&r.push(At()),e.highlightSelectionMatches!==!1&&r.push(Ms()),e.tabSize&&typeof e.tabSize==`number`&&r.push(ze.of(` `.repeat(e.tabSize))),r.concat([jt.of(n.flat())]).filter(Boolean)},rl=`#e5c07b`,il=`#e06c75`,al=`#56b6c2`,ol=`#ffffff`,sl=`#abb2bf`,cl=`#7d8799`,ll=`#61afef`,ul=`#98c379`,dl=`#d19a66`,fl=`#c678dd`,pl=`#21252b`,ml=`#2c313a`,hl=`#282c34`,gl=`#353a42`,_l=`#3E4451`,vl=`#528bff`,yl=[A.theme({"&":{color:sl,backgroundColor:hl},".cm-content":{caretColor:vl},".cm-cursor, .cm-dropCursor":{borderLeftColor:vl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:_l},".cm-panels":{backgroundColor:pl,color:sl},".cm-panels.cm-panels-top":{borderBottom:`2px solid black`},".cm-panels.cm-panels-bottom":{borderTop:`2px solid black`},".cm-searchMatch":{backgroundColor:`#72a1ff59`,outline:`1px solid #457dff`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:`#6199ff2f`},".cm-activeLine":{backgroundColor:`#6699ff0b`},".cm-selectionMatch":{backgroundColor:`#aafe661a`},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:`#bad0f847`},".cm-gutters":{backgroundColor:hl,color:cl,border:`none`},".cm-activeLineGutter":{backgroundColor:ml},".cm-foldPlaceholder":{backgroundColor:`transparent`,border:`none`,color:`#ddd`},".cm-tooltip":{border:`none`,backgroundColor:gl},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:`transparent`,borderBottomColor:`transparent`},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:gl,borderBottomColor:gl},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:ml,color:sl}}},{dark:!0}),$e(ut.define([{tag:k.keyword,color:fl},{tag:[k.name,k.deleted,k.character,k.propertyName,k.macroName],color:il},{tag:[k.function(k.variableName),k.labelName],color:ll},{tag:[k.color,k.constant(k.name),k.standard(k.name)],color:dl},{tag:[k.definition(k.name),k.separator],color:sl},{tag:[k.typeName,k.className,k.number,k.changed,k.annotation,k.modifier,k.self,k.namespace],color:rl},{tag:[k.operator,k.operatorKeyword,k.url,k.escape,k.regexp,k.link,k.special(k.string)],color:al},{tag:[k.meta,k.comment],color:cl},{tag:k.strong,fontWeight:`bold`},{tag:k.emphasis,fontStyle:`italic`},{tag:k.strikethrough,textDecoration:`line-through`},{tag:k.link,color:cl,textDecoration:`underline`},{tag:k.heading,fontWeight:`bold`,color:il},{tag:[k.atom,k.bool,k.special(k.variableName)],color:dl},{tag:[k.processingInstruction,k.string,k.inserted],color:ul},{tag:k.invalid,color:ol}]))],bl=A.theme({"&":{backgroundColor:`#fff`}},{dark:!1}),xl=function(e){e===void 0&&(e={});var{indentWithTab:t=!0,editable:n=!0,readOnly:r=!1,theme:i=`light`,placeholder:a=``,basicSetup:o=!0}=e,s=[];switch(t&&s.unshift(jt.of([vs])),o&&(typeof o==`boolean`?s.unshift(nl()):s.unshift(nl(o))),a&&s.unshift(Pt(a)),i){case`light`:s.push(bl);break;case`dark`:s.push(yl);break;case`none`:break;default:s.push(i);break}return n===!1&&s.push(A.editable.of(!1)),r&&s.push(it.readOnly.of(!0)),[...s]},Sl=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(e=>!e.empty)}),Cl=class{constructor(e,t){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=t,this.timeoutMS=t,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(e=>{try{e()}catch(e){console.error(`TimeoutLatch callback error:`,e)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}},wl=class{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}},Tl=null,El=()=>typeof window>`u`?new wl:(Tl||=new wl,Tl),Dl=lt.define(),Ol=200,kl=[];function Al(e){var{value:t,selection:n,onChange:r,onStatistics:i,onCreateEditor:a,onUpdate:o,extensions:s=kl,autoFocus:c,theme:l=`light`,height:u=null,minHeight:d=null,maxHeight:f=null,width:p=null,minWidth:m=null,maxWidth:h=null,placeholder:g=``,editable:_=!0,readOnly:v=!1,indentWithTab:y=!0,basicSetup:b=!0,root:x,initialState:S}=e,[ee,te]=(0,P.useState)(),[C,ne]=(0,P.useState)(),[re,ie]=(0,P.useState)(),ae=(0,P.useState)(()=>({current:null}))[0],oe=(0,P.useState)(()=>({current:null}))[0],se=A.theme({"&":{height:u,minHeight:d,maxHeight:f,width:p,minWidth:m,maxWidth:h},"& .cm-scroller":{height:`100% !important`}}),ce=[A.updateListener.of(e=>{e.docChanged&&typeof r==`function`&&!e.transactions.some(e=>e.annotation(Dl))&&(ae.current?ae.current.reset():(ae.current=new Cl(()=>{if(oe.current){var e=oe.current;oe.current=null,e()}ae.current=null},Ol),El().add(ae.current)),r(e.state.doc.toString(),e)),i&&i(Sl(e))}),se,...xl({theme:l,editable:_,readOnly:v,placeholder:g,indentWithTab:y,basicSetup:b})];return o&&typeof o==`function`&&ce.push(A.updateListener.of(o)),ce=ce.concat(s),(0,P.useLayoutEffect)(()=>{if(ee&&!re){var e={doc:t,selection:n,extensions:ce},r=S?it.fromJSON(S.json,e,S.fields):it.create(e);if(ie(r),!C){var i=new A({state:r,parent:ee,root:x});ne(i),a&&a(i,r)}}return()=>{C&&(ie(void 0),ne(void 0))}},[ee,re]),(0,P.useEffect)(()=>{e.container&&te(e.container)},[e.container]),(0,P.useEffect)(()=>()=>{C&&(C.destroy(),ne(void 0)),ae.current&&=(ae.current.cancel(),null)},[C]),(0,P.useEffect)(()=>{c&&C&&C.focus()},[c,C]),(0,P.useEffect)(()=>{C&&C.dispatch({effects:Ct.reconfigure.of(ce)})},[l,s,u,d,f,p,m,h,g,_,v,y,b,r,o]),(0,P.useEffect)(()=>{if(t!==void 0){var e=C?C.state.doc.toString():``;if(C&&t!==e){var n=ae.current&&!ae.current.isDone,r=()=>{C&&t!==C.state.doc.toString()&&C.dispatch({changes:{from:0,to:C.state.doc.toString().length,insert:t||``},annotations:[Dl.of(!0)]})};n?oe.current=r:r()}}},[t,C]),{state:re,setState:ie,view:C,setView:ne,container:ee,setContainer:te}}var jl=[`className`,`value`,`selection`,`extensions`,`onChange`,`onStatistics`,`onCreateEditor`,`onUpdate`,`autoFocus`,`theme`,`height`,`minHeight`,`maxHeight`,`width`,`minWidth`,`maxWidth`,`basicSetup`,`placeholder`,`indentWithTab`,`editable`,`readOnly`,`root`,`initialState`],Ml=(0,P.forwardRef)((e,t)=>{var{className:n,value:r=``,selection:i,extensions:a=[],onChange:o,onStatistics:s,onCreateEditor:c,onUpdate:l,autoFocus:u,theme:d=`light`,height:f,minHeight:p,maxHeight:m,width:h,minWidth:g,maxWidth:_,basicSetup:v,placeholder:y,indentWithTab:b,editable:x,readOnly:S,root:ee,initialState:te}=e,C=Ji(e,jl),ne=(0,P.useRef)(null),{state:re,view:ie,container:ae,setContainer:oe}=Al({root:ee,value:r,autoFocus:u,theme:d,height:f,minHeight:p,maxHeight:m,width:h,minWidth:g,maxWidth:_,basicSetup:v,placeholder:y,indentWithTab:b,editable:x,readOnly:S,selection:i,onChange:o,onStatistics:s,onCreateEditor:c,onUpdate:l,extensions:a,initialState:te});(0,P.useImperativeHandle)(t,()=>({editor:ne.current,state:re,view:ie}),[ne,ae,re,ie]);var se=(0,P.useCallback)(e=>{ne.current=e,oe(e)},[oe]);if(typeof r!=`string`)throw Error(`value must be typeof string but got `+typeof r);return(0,F.jsx)(`div`,qi({ref:se,className:(typeof d==`string`?`cm-theme-`+d:`cm-theme`)+(n?` `+n:``)},C))});Ml.displayName=`CodeMirror`;function V(e){return new Nt(gt.define(e))}function Nl(e){return i(()=>import(`./dist-C5S-Rbvc.js`).then(t=>t.sql({dialect:t[e]})),[])}var Pl=[M.of({name:`C`,extensions:[`c`,`h`,`ino`],load(){return i(()=>import(`./dist-C9LWf2uC.js`).then(e=>e.cpp()),[])}}),M.of({name:`C++`,alias:[`cpp`],extensions:[`cpp`,`c++`,`cc`,`cxx`,`hpp`,`h++`,`hh`,`hxx`],load(){return i(()=>import(`./dist-C9LWf2uC.js`).then(e=>e.cpp()),[])}}),M.of({name:`CQL`,alias:[`cassandra`],extensions:[`cql`],load(){return Nl(`Cassandra`)}}),M.of({name:`CSS`,extensions:[`css`],load(){return i(()=>import(`./dist-B1p80u1b.js`).then(e=>e.css()),[])}}),M.of({name:`Go`,extensions:[`go`],load(){return i(()=>import(`./dist-C0sOT_UM.js`).then(e=>e.go()),[])}}),M.of({name:`HTML`,alias:[`xhtml`],extensions:[`html`,`htm`,`handlebars`,`hbs`],load(){return i(()=>import(`./dist-DNLFuTrS.js`).then(e=>e.html()),[])}}),M.of({name:`Java`,extensions:[`java`],load(){return i(()=>import(`./dist-55MYVjjj.js`).then(e=>e.java()),[])}}),M.of({name:`JavaScript`,alias:[`ecmascript`,`js`,`node`],extensions:[`js`,`mjs`,`cjs`],load(){return i(()=>import(`./dist-CxJpXP6s.js`).then(e=>e.javascript()),[])}}),M.of({name:`Jinja`,extensions:[`j2`,`jinja`,`jinja2`],load(){return i(()=>import(`./dist-BGzHP3f8.js`).then(e=>e.jinja()),[])}}),M.of({name:`JSON`,alias:[`json5`],extensions:[`json`,`map`],load(){return i(()=>import(`./dist-CEDX2HGI.js`).then(e=>e.json()),[])}}),M.of({name:`JSX`,extensions:[`jsx`],load(){return i(()=>import(`./dist-CxJpXP6s.js`).then(e=>e.javascript({jsx:!0})),[])}}),M.of({name:`LESS`,extensions:[`less`],load(){return i(()=>import(`./dist-B6G8pbap.js`).then(e=>e.less()),[])}}),M.of({name:`Liquid`,extensions:[`liquid`],load(){return i(()=>import(`./dist-wdLr2dSH.js`).then(e=>e.liquid()),[])}}),M.of({name:`MariaDB SQL`,load(){return Nl(`MariaSQL`)}}),M.of({name:`Markdown`,extensions:[`md`,`markdown`,`mkd`],load(){return i(()=>import(`./dist-BKyzWv22.js`).then(e=>e.markdown()),[])}}),M.of({name:`MS SQL`,load(){return Nl(`MSSQL`)}}),M.of({name:`MySQL`,load(){return Nl(`MySQL`)}}),M.of({name:`PHP`,extensions:[`php`,`php3`,`php4`,`php5`,`php7`,`phtml`],load(){return i(()=>import(`./dist-BDMNMdPF.js`).then(e=>e.php()),[])}}),M.of({name:`PLSQL`,extensions:[`pls`],load(){return Nl(`PLSQL`)}}),M.of({name:`PostgreSQL`,load(){return Nl(`PostgreSQL`)}}),M.of({name:`Python`,extensions:[`BUILD`,`bzl`,`py`,`pyw`],filename:/^(BUCK|BUILD)$/,load(){return i(()=>import(`./dist-CCKktDoF.js`).then(e=>e.python()),[])}}),M.of({name:`Rust`,extensions:[`rs`],load(){return i(()=>import(`./dist-G7QUHtDS.js`).then(e=>e.rust()),[])}}),M.of({name:`Sass`,extensions:[`sass`],load(){return i(()=>import(`./dist-B1rKu9eP.js`).then(e=>e.sass({indented:!0})),[])}}),M.of({name:`SCSS`,extensions:[`scss`],load(){return i(()=>import(`./dist-B1rKu9eP.js`).then(e=>e.sass()),[])}}),M.of({name:`SQL`,extensions:[`sql`],load(){return Nl(`StandardSQL`)}}),M.of({name:`SQLite`,load(){return Nl(`SQLite`)}}),M.of({name:`TSX`,extensions:[`tsx`],load(){return i(()=>import(`./dist-CxJpXP6s.js`).then(e=>e.javascript({jsx:!0,typescript:!0})),[])}}),M.of({name:`TypeScript`,alias:[`ts`],extensions:[`ts`,`mts`,`cts`],load(){return i(()=>import(`./dist-CxJpXP6s.js`).then(e=>e.javascript({typescript:!0})),[])}}),M.of({name:`WebAssembly`,extensions:[`wat`,`wast`],load(){return i(()=>import(`./dist-DdhWu7OM.js`).then(e=>e.wast()),[])}}),M.of({name:`XML`,alias:[`rss`,`wsdl`,`xsd`],extensions:[`xml`,`xsl`,`xsd`,`svg`],load(){return i(()=>import(`./dist-BhzKO6nt2.js`).then(e=>e.xml()),[])}}),M.of({name:`YAML`,alias:[`yml`],extensions:[`yaml`,`yml`],load(){return i(()=>import(`./dist-BuaQLcgQ.js`).then(e=>e.yaml()),[])}}),M.of({name:`APL`,extensions:[`dyalog`,`apl`],load(){return i(()=>import(`./apl-HYRstREL.js`).then(e=>V(e.apl)),[])}}),M.of({name:`PGP`,alias:[`asciiarmor`],extensions:[`asc`,`pgp`,`sig`],load(){return i(()=>import(`./asciiarmor-BDXCrhAK.js`).then(e=>V(e.asciiArmor)),[])}}),M.of({name:`ASN.1`,extensions:[`asn`,`asn1`],load(){return i(()=>import(`./asn1-CnSBhb0M.js`).then(e=>V(e.asn1({}))),[])}}),M.of({name:`Asterisk`,filename:/^extensions\.conf$/i,load(){return i(()=>import(`./asterisk-AqV7rnIi.js`).then(e=>V(e.asterisk)),[])}}),M.of({name:`Brainfuck`,extensions:[`b`,`bf`],load(){return i(()=>import(`./brainfuck-Dv46-iL9.js`).then(e=>V(e.brainfuck)),[])}}),M.of({name:`Cobol`,extensions:[`cob`,`cpy`],load(){return i(()=>import(`./cobol-rUaLketb.js`).then(e=>V(e.cobol)),[])}}),M.of({name:`C#`,alias:[`csharp`,`cs`],extensions:[`cs`],load(){return i(()=>import(`./clike-GRffz5hY.js`).then(e=>V(e.csharp)),[])}}),M.of({name:`Clojure`,extensions:[`clj`,`cljc`,`cljx`],load(){return i(()=>import(`./clojure-DzgT_fqE.js`).then(e=>V(e.clojure)),[])}}),M.of({name:`ClojureScript`,extensions:[`cljs`],load(){return i(()=>import(`./clojure-DzgT_fqE.js`).then(e=>V(e.clojure)),[])}}),M.of({name:`Closure Stylesheets (GSS)`,extensions:[`gss`],load(){return i(()=>import(`./css-DaxibPo5.js`).then(e=>V(e.gss)),[])}}),M.of({name:`CMake`,extensions:[`cmake`,`cmake.in`],filename:/^CMakeLists\.txt$/,load(){return i(()=>import(`./cmake-Co1237r5.js`).then(e=>V(e.cmake)),[])}}),M.of({name:`CoffeeScript`,alias:[`coffee`,`coffee-script`],extensions:[`coffee`],load(){return i(()=>import(`./coffeescript-DQyfHE86.js`).then(e=>V(e.coffeeScript)),[])}}),M.of({name:`Common Lisp`,alias:[`lisp`],extensions:[`cl`,`lisp`,`el`],load(){return i(()=>import(`./commonlisp-Buue1PGW.js`).then(e=>V(e.commonLisp)),[])}}),M.of({name:`Cypher`,extensions:[`cyp`,`cypher`],load(){return i(()=>import(`./cypher-CmpGfiBR.js`).then(e=>V(e.cypher)),[])}}),M.of({name:`Cython`,extensions:[`pyx`,`pxd`,`pxi`],load(){return i(()=>import(`./python-ydzCwWG-.js`).then(e=>V(e.cython)),[])}}),M.of({name:`Crystal`,extensions:[`cr`],load(){return i(()=>import(`./crystal-BMWO0kOJ.js`).then(e=>V(e.crystal)),[])}}),M.of({name:`D`,extensions:[`d`],load(){return i(()=>import(`./d-qmdtoIzU.js`).then(e=>V(e.d)),[])}}),M.of({name:`Dart`,extensions:[`dart`],load(){return i(()=>import(`./clike-GRffz5hY.js`).then(e=>V(e.dart)),[])}}),M.of({name:`diff`,extensions:[`diff`,`patch`],load(){return i(()=>import(`./diff-B40m6u1h.js`).then(e=>V(e.diff)),[])}}),M.of({name:`Dockerfile`,filename:/^Dockerfile$/,load(){return i(()=>import(`./dockerfile-CrC2HXHP.js`).then(e=>V(e.dockerFile)),[])}}),M.of({name:`DTD`,extensions:[`dtd`],load(){return i(()=>import(`./dtd-569ynYVj.js`).then(e=>V(e.dtd)),[])}}),M.of({name:`Dylan`,extensions:[`dylan`,`dyl`,`intr`],load(){return i(()=>import(`./dylan-Dxolp30i.js`).then(e=>V(e.dylan)),[])}}),M.of({name:`EBNF`,load(){return i(()=>import(`./ebnf-BZiX9Iq3.js`).then(e=>V(e.ebnf)),[])}}),M.of({name:`ECL`,extensions:[`ecl`],load(){return i(()=>import(`./ecl-B8F1Q0oZ.js`).then(e=>V(e.ecl)),[])}}),M.of({name:`edn`,extensions:[`edn`],load(){return i(()=>import(`./clojure-DzgT_fqE.js`).then(e=>V(e.clojure)),[])}}),M.of({name:`Eiffel`,extensions:[`e`],load(){return i(()=>import(`./eiffel-Bv8Kvgh1.js`).then(e=>V(e.eiffel)),[])}}),M.of({name:`Elm`,extensions:[`elm`],load(){return i(()=>import(`./elm-QWXQaIis.js`).then(e=>V(e.elm)),[])}}),M.of({name:`Erlang`,extensions:[`erl`],load(){return i(()=>import(`./erlang-CuDGzTGm.js`).then(e=>V(e.erlang)),[])}}),M.of({name:`Esper`,load(){return i(()=>import(`./sql-BrKz8968.js`).then(e=>V(e.esper)),[])}}),M.of({name:`Factor`,extensions:[`factor`],load(){return i(()=>import(`./factor-1CttFx2G.js`).then(e=>V(e.factor)),[])}}),M.of({name:`FCL`,load(){return i(()=>import(`./fcl-BiFeqtHf.js`).then(e=>V(e.fcl)),[])}}),M.of({name:`Forth`,extensions:[`forth`,`fth`,`4th`],load(){return i(()=>import(`./forth-R7Uc2VcL.js`).then(e=>V(e.forth)),[])}}),M.of({name:`Fortran`,extensions:[`f`,`for`,`f77`,`f90`,`f95`],load(){return i(()=>import(`./fortran-kDRG6BzW.js`).then(e=>V(e.fortran)),[])}}),M.of({name:`F#`,alias:[`fsharp`],extensions:[`fs`],load(){return i(()=>import(`./mllike-EPZ6pqQD.js`).then(e=>V(e.fSharp)),[])}}),M.of({name:`Gas`,extensions:[`s`],load(){return i(()=>import(`./gas-CyRkuC5T.js`).then(e=>V(e.gas)),[])}}),M.of({name:`Gherkin`,extensions:[`feature`],load(){return i(()=>import(`./gherkin-BE0p00ey.js`).then(e=>V(e.gherkin)),[])}}),M.of({name:`Groovy`,extensions:[`groovy`,`gradle`],filename:/^Jenkinsfile$/,load(){return i(()=>import(`./groovy-B_Sh3D1t.js`).then(e=>V(e.groovy)),[])}}),M.of({name:`Haskell`,extensions:[`hs`],load(){return i(()=>import(`./haskell-DWXgCy4o.js`).then(e=>V(e.haskell)),[])}}),M.of({name:`Haxe`,extensions:[`hx`],load(){return i(()=>import(`./haxe-xGxZ54Hv.js`).then(e=>V(e.haxe)),[])}}),M.of({name:`HXML`,extensions:[`hxml`],load(){return i(()=>import(`./haxe-xGxZ54Hv.js`).then(e=>V(e.hxml)),[])}}),M.of({name:`HTTP`,load(){return i(()=>import(`./http-CKv9cSBA.js`).then(e=>V(e.http)),[])}}),M.of({name:`IDL`,extensions:[`pro`],load(){return i(()=>import(`./idl-DmlI3XzS.js`).then(e=>V(e.idl)),[])}}),M.of({name:`JSON-LD`,alias:[`jsonld`],extensions:[`jsonld`],load(){return i(()=>import(`./javascript-BhB45e0W.js`).then(e=>V(e.jsonld)),[])}}),M.of({name:`Julia`,extensions:[`jl`],load(){return i(()=>import(`./julia-CQSp9Qa0.js`).then(e=>V(e.julia)),[])}}),M.of({name:`Kotlin`,extensions:[`kt`,`kts`],load(){return i(()=>import(`./clike-GRffz5hY.js`).then(e=>V(e.kotlin)),[])}}),M.of({name:`LiveScript`,alias:[`ls`],extensions:[`ls`],load(){return i(()=>import(`./livescript-CqvtVTlb.js`).then(e=>V(e.liveScript)),[])}}),M.of({name:`Lua`,extensions:[`lua`],load(){return i(()=>import(`./lua-DazQKUZ0.js`).then(e=>V(e.lua)),[])}}),M.of({name:`mIRC`,extensions:[`mrc`],load(){return i(()=>import(`./mirc-D7ThhoF-.js`).then(e=>V(e.mirc)),[])}}),M.of({name:`Mathematica`,extensions:[`m`,`nb`,`wl`,`wls`],load(){return i(()=>import(`./mathematica-DqhJVCs9.js`).then(e=>V(e.mathematica)),[])}}),M.of({name:`Modelica`,extensions:[`mo`],load(){return i(()=>import(`./modelica-PU45hbqg.js`).then(e=>V(e.modelica)),[])}}),M.of({name:`MUMPS`,extensions:[`mps`],load(){return i(()=>import(`./mumps-8GhR7rRa.js`).then(e=>V(e.mumps)),[])}}),M.of({name:`Mbox`,extensions:[`mbox`],load(){return i(()=>import(`./mbox-Dsyo1_UL.js`).then(e=>V(e.mbox)),[])}}),M.of({name:`Nginx`,filename:/nginx.*\.conf$/i,load(){return i(()=>import(`./nginx-CXwagpwp.js`).then(e=>V(e.nginx)),[])}}),M.of({name:`NSIS`,extensions:[`nsh`,`nsi`],load(){return i(()=>import(`./nsis-_CjIiUyF.js`).then(e=>V(e.nsis)),[])}}),M.of({name:`NTriples`,extensions:[`nt`,`nq`],load(){return i(()=>import(`./ntriples-BDQxxstw.js`).then(e=>V(e.ntriples)),[])}}),M.of({name:`Objective-C`,alias:[`objective-c`,`objc`],extensions:[`m`],load(){return i(()=>import(`./clike-GRffz5hY.js`).then(e=>V(e.objectiveC)),[])}}),M.of({name:`Objective-C++`,alias:[`objective-c++`,`objc++`],extensions:[`mm`],load(){return i(()=>import(`./clike-GRffz5hY.js`).then(e=>V(e.objectiveCpp)),[])}}),M.of({name:`OCaml`,extensions:[`ml`,`mli`,`mll`,`mly`],load(){return i(()=>import(`./mllike-EPZ6pqQD.js`).then(e=>V(e.oCaml)),[])}}),M.of({name:`Octave`,extensions:[`m`],load(){return i(()=>import(`./octave-2c90WnyU.js`).then(e=>V(e.octave)),[])}}),M.of({name:`Oz`,extensions:[`oz`],load(){return i(()=>import(`./oz-CO0rQ8EL.js`).then(e=>V(e.oz)),[])}}),M.of({name:`Pascal`,extensions:[`p`,`pas`],load(){return i(()=>import(`./pascal-CcVwOGeN.js`).then(e=>V(e.pascal)),[])}}),M.of({name:`Perl`,extensions:[`pl`,`pm`],load(){return i(()=>import(`./perl-B9UvGoAV.js`).then(e=>V(e.perl)),[])}}),M.of({name:`Pig`,extensions:[`pig`],load(){return i(()=>import(`./pig-Cd1f86ZJ.js`).then(e=>V(e.pig)),[])}}),M.of({name:`PowerShell`,extensions:[`ps1`,`psd1`,`psm1`],load(){return i(()=>import(`./powershell-DV4cOnkJ.js`).then(e=>V(e.powerShell)),[])}}),M.of({name:`Properties files`,alias:[`ini`,`properties`],extensions:[`properties`,`ini`,`in`],load(){return i(()=>import(`./properties-DaSVPhrZ.js`).then(e=>V(e.properties)),[])}}),M.of({name:`ProtoBuf`,extensions:[`proto`],load(){return i(()=>import(`./protobuf-CEtFnY22.js`).then(e=>V(e.protobuf)),[])}}),M.of({name:`Pug`,alias:[`jade`],extensions:[`pug`,`jade`],load(){return i(()=>import(`./pug-CbR8lCtK.js`).then(e=>V(e.pug)),[])}}),M.of({name:`Puppet`,extensions:[`pp`],load(){return i(()=>import(`./puppet-Ca0DHfcW.js`).then(e=>V(e.puppet)),[])}}),M.of({name:`Q`,extensions:[`q`],load(){return i(()=>import(`./q-Cl8kzQmk.js`).then(e=>V(e.q)),[])}}),M.of({name:`R`,alias:[`rscript`],extensions:[`r`,`R`],load(){return i(()=>import(`./r-DKZPJFrD.js`).then(e=>V(e.r)),[])}}),M.of({name:`RPM Changes`,load(){return i(()=>import(`./rpm-D0lqeHoZ.js`).then(e=>V(e.rpmChanges)),[])}}),M.of({name:`RPM Spec`,extensions:[`spec`],load(){return i(()=>import(`./rpm-D0lqeHoZ.js`).then(e=>V(e.rpmSpec)),[])}}),M.of({name:`Ruby`,alias:[`jruby`,`macruby`,`rake`,`rb`,`rbx`],extensions:[`rb`],filename:/^(Gemfile|Rakefile)$/,load(){return i(()=>import(`./ruby-RVmtmNDw.js`).then(e=>V(e.ruby)),[])}}),M.of({name:`SAS`,extensions:[`sas`],load(){return i(()=>import(`./sas-CEzodAB7.js`).then(e=>V(e.sas)),[])}}),M.of({name:`Scala`,extensions:[`scala`],load(){return i(()=>import(`./clike-GRffz5hY.js`).then(e=>V(e.scala)),[])}}),M.of({name:`Scheme`,extensions:[`scm`,`ss`],load(){return i(()=>import(`./scheme-Pqmt6dh3.js`).then(e=>V(e.scheme)),[])}}),M.of({name:`Shell`,alias:[`bash`,`sh`,`zsh`],extensions:[`sh`,`ksh`,`bash`],filename:/^PKGBUILD$/,load(){return i(()=>import(`./shell-CLG3zy-u.js`).then(e=>V(e.shell)),[])}}),M.of({name:`Sieve`,extensions:[`siv`,`sieve`],load(){return i(()=>import(`./sieve-C95IWC3O.js`).then(e=>V(e.sieve)),[])}}),M.of({name:`Smalltalk`,extensions:[`st`],load(){return i(()=>import(`./smalltalk-4cL-gRJb.js`).then(e=>V(e.smalltalk)),[])}}),M.of({name:`Solr`,load(){return i(()=>import(`./solr-CEA7oOx_.js`).then(e=>V(e.solr)),[])}}),M.of({name:`SML`,extensions:[`sml`,`sig`,`fun`,`smackspec`],load(){return i(()=>import(`./mllike-EPZ6pqQD.js`).then(e=>V(e.sml)),[])}}),M.of({name:`SPARQL`,alias:[`sparul`],extensions:[`rq`,`sparql`],load(){return i(()=>import(`./sparql-w8kHjP6I.js`).then(e=>V(e.sparql)),[])}}),M.of({name:`Spreadsheet`,alias:[`excel`,`formula`],load(){return i(()=>import(`./spreadsheet-C8bDfTgC.js`).then(e=>V(e.spreadsheet)),[])}}),M.of({name:`Squirrel`,extensions:[`nut`],load(){return i(()=>import(`./clike-GRffz5hY.js`).then(e=>V(e.squirrel)),[])}}),M.of({name:`Stylus`,extensions:[`styl`],load(){return i(()=>import(`./stylus-gS_68vPk.js`).then(e=>V(e.stylus)),[])}}),M.of({name:`Swift`,extensions:[`swift`],load(){return i(()=>import(`./swift-D5lXmY2d.js`).then(e=>V(e.swift)),[])}}),M.of({name:`sTeX`,load(){return i(()=>import(`./stex-xFw1nXeT.js`).then(e=>V(e.stex)),[])}}),M.of({name:`LaTeX`,alias:[`tex`],extensions:[`text`,`ltx`,`tex`],load(){return i(()=>import(`./stex-xFw1nXeT.js`).then(e=>V(e.stex)),[])}}),M.of({name:`SystemVerilog`,extensions:[`v`,`sv`,`svh`],load(){return i(()=>import(`./verilog-Pnuspgw6.js`).then(e=>V(e.verilog)),[])}}),M.of({name:`Tcl`,extensions:[`tcl`],load(){return i(()=>import(`./tcl-D-41REtC.js`).then(e=>V(e.tcl)),[])}}),M.of({name:`Textile`,extensions:[`textile`],load(){return i(()=>import(`./textile-D-Znao0j.js`).then(e=>V(e.textile)),[])}}),M.of({name:`TiddlyWiki`,load(){return i(()=>import(`./tiddlywiki-Co8lXJKd.js`).then(e=>V(e.tiddlyWiki)),[])}}),M.of({name:`Tiki wiki`,load(){return i(()=>import(`./tiki-DsiNRYMP.js`).then(e=>V(e.tiki)),[])}}),M.of({name:`TOML`,extensions:[`toml`],load(){return i(()=>import(`./toml-CaVZGou4.js`).then(e=>V(e.toml)),[])}}),M.of({name:`Troff`,extensions:[`1`,`2`,`3`,`4`,`5`,`6`,`7`,`8`,`9`],load(){return i(()=>import(`./troff-DJvDVr-d.js`).then(e=>V(e.troff)),[])}}),M.of({name:`TTCN`,extensions:[`ttcn`,`ttcn3`,`ttcnpp`],load(){return i(()=>import(`./ttcn-DAC92l4d.js`).then(e=>V(e.ttcn)),[])}}),M.of({name:`TTCN_CFG`,extensions:[`cfg`],load(){return i(()=>import(`./ttcn-cfg-C0X-mYlr.js`).then(e=>V(e.ttcnCfg)),[])}}),M.of({name:`Turtle`,extensions:[`ttl`],load(){return i(()=>import(`./turtle-D6WHyCrL.js`).then(e=>V(e.turtle)),[])}}),M.of({name:`Web IDL`,extensions:[`webidl`],load(){return i(()=>import(`./webidl-DHr762Dm.js`).then(e=>V(e.webIDL)),[])}}),M.of({name:`VB.NET`,extensions:[`vb`],load(){return i(()=>import(`./vb-CEo_ccq3.js`).then(e=>V(e.vb)),[])}}),M.of({name:`VBScript`,extensions:[`vbs`],load(){return i(()=>import(`./vbscript-B_PKDV1v.js`).then(e=>V(e.vbScript)),[])}}),M.of({name:`Velocity`,extensions:[`vtl`],load(){return i(()=>import(`./velocity-ClKnKBLH.js`).then(e=>V(e.velocity)),[])}}),M.of({name:`Verilog`,extensions:[`v`],load(){return i(()=>import(`./verilog-Pnuspgw6.js`).then(e=>V(e.verilog)),[])}}),M.of({name:`VHDL`,extensions:[`vhd`,`vhdl`],load(){return i(()=>import(`./vhdl-CZnyY4fs.js`).then(e=>V(e.vhdl)),[])}}),M.of({name:`XQuery`,extensions:[`xy`,`xquery`,`xq`,`xqm`,`xqy`],load(){return i(()=>import(`./xquery-5-FiyUtN.js`).then(e=>V(e.xQuery)),[])}}),M.of({name:`Yacas`,extensions:[`ys`],load(){return i(()=>import(`./yacas-GlqsXIeT.js`).then(e=>V(e.yacas)),[])}}),M.of({name:`Z80`,extensions:[`z80`],load(){return i(()=>import(`./z80-CI7N40Oo.js`).then(e=>V(e.z80)),[])}}),M.of({name:`MscGen`,extensions:[`mscgen`,`mscin`,`msc`],load(){return i(()=>import(`./mscgen-DEnh2Ojr.js`).then(e=>V(e.mscgen)),[])}}),M.of({name:`Xù`,extensions:[`xu`],load(){return i(()=>import(`./mscgen-DEnh2Ojr.js`).then(e=>V(e.xu)),[])}}),M.of({name:`MsGenny`,extensions:[`msgenny`],load(){return i(()=>import(`./mscgen-DEnh2Ojr.js`).then(e=>V(e.msgenny)),[])}}),M.of({name:`Vue`,extensions:[`vue`],load(){return i(()=>import(`./dist-W7IGn2ug.js`).then(e=>e.vue()),[])}}),M.of({name:`Angular Template`,load(){return i(()=>import(`./dist-2oDfqE98.js`).then(e=>e.angular()),[])}})],Fl=A.theme({"&":{height:`100%`,color:`var(--text-primary)`,backgroundColor:`var(--canvas-deep)`},".cm-editor":{height:`100%`,color:`var(--text-primary)`,backgroundColor:`var(--canvas-deep)`},".cm-scroller":{fontFamily:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,backgroundColor:`var(--canvas-deep)`},".cm-content":{caretColor:`var(--text-primary)`},".cm-gutters":{color:`var(--text-tertiary, var(--text-secondary))`,backgroundColor:`var(--canvas-deep)`,borderRight:`1px solid var(--border-subtle)`},".cm-activeLine":{backgroundColor:`var(--canvas-soft)`},".cm-activeLineGutter":{color:`var(--text-primary)`,backgroundColor:`var(--canvas-soft)`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--text-primary)`},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, ::selection":{backgroundColor:`var(--selection-bg)`},"&.cm-focused":{outline:`1px solid var(--border-strong)`},".cm-line":{color:`var(--text-primary)`},".cm-panels":{color:`var(--text-primary)`,backgroundColor:`var(--bg-panel)`,borderColor:`var(--border-subtle)`},".cm-tooltip":{color:`var(--text-primary)`,backgroundColor:`var(--bg-panel)`,border:`1px solid var(--border-subtle)`},".cm-matchingBracket, .cm-nonmatchingBracket":{outline:`1px solid var(--accent)`,backgroundColor:`var(--accent-soft)`},".cm-rich-widget":{color:`var(--text-primary)`,backgroundColor:`var(--canvas-soft)`,border:`1px solid var(--border-subtle)`,borderRadius:`6px`},".cm-rich-block":{display:`block`,margin:`6px 0`,padding:`8px 10px`,overflowX:`auto`},".cm-rich-inline":{display:`inline-flex`,alignItems:`center`,maxWidth:`100%`,padding:`0 4px`,verticalAlign:`baseline`},".cm-rich-source-muted":{color:`var(--text-tertiary, var(--text-secondary))`},".cm-rich-widget-error":{color:`var(--danger-strong, var(--text-primary))`,borderColor:`var(--danger-strong, var(--border-subtle))`}},{dark:!0}),Il=$e(ut.define([{tag:k.heading,color:`var(--text-primary)`,fontWeight:`650`},{tag:[k.strong,k.emphasis],color:`var(--text-primary)`},{tag:k.link,color:`var(--accent-strong, var(--accent))`,textDecoration:`underline`},{tag:k.url,color:`var(--accent-strong, var(--accent))`},{tag:[k.keyword,k.atom,k.bool],color:`var(--accent-strong, var(--accent))`},{tag:[k.string,k.special(k.string)],color:`var(--success-strong, var(--text-primary))`},{tag:[k.comment,k.quote],color:`var(--text-tertiary, var(--text-secondary))`},{tag:[k.number,k.integer,k.float],color:`var(--warning-strong, var(--text-primary))`},{tag:[k.variableName,k.propertyName],color:`var(--text-primary)`},{tag:[k.definition(k.variableName),k.function(k.variableName)],color:`var(--accent)`},{tag:[k.punctuation,k.bracket],color:`var(--text-secondary)`},{tag:k.invalid,color:`var(--danger-strong, var(--text-primary))`}]));function Ll(e,t=e){return n=>{let{state:r}=n,i=!1,a=r.changeByRange(n=>{i=!0;let a=r.sliceDoc(n.from,n.to),o=`${e}${a}${t}`,s=n.from+e.length,c=s+a.length;return{changes:{from:n.from,to:n.to,insert:o},range:n.empty?N.cursor(s):N.range(s,c)}});return i?(n.dispatch(a),!0):!1}}var Rl=[{key:`Mod-b`,run:Ll(`**`),preventDefault:!0},{key:`Mod-i`,run:Ll(`*`),preventDefault:!0},{key:`Mod-e`,run:Ll("`"),preventDefault:!0},{key:`Mod-k`,run:e=>{let{state:t}=e,n=!1,r=t.changeByRange(e=>{n=!0;let r=t.sliceDoc(e.from,e.to);if(e.empty)return{changes:{from:e.from,insert:`[](url)`},range:N.cursor(e.from+1)};let i=`[${r}](url)`,a=e.from+1+r.length+2,o=a+3;return{changes:{from:e.from,to:e.to,insert:i},range:N.range(a,o)}});return n?(e.dispatch(r),!0):!1},preventDefault:!0}];function zl(e){let t=[],n=String(e||``),r=n.indexOf(`,`),i=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);let e=n.slice(i,r).trim();(e||!a)&&t.push(e),i=r+1,r=n.indexOf(`,`,i)}return t}function Bl(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Vl=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hl=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,H={};function U(e,t){return((t||H).jsx?Hl:Vl).test(e)}var W=/[ \t\n\f\r]/g;function G(e){return typeof e==`object`?e.type===`text`?K(e.value):!1:K(e)}function K(e){return e.replace(W,``)===``}var Ul=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};Ul.prototype.normal={},Ul.prototype.property={},Ul.prototype.space=void 0;function Wl(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new Ul(n,r,t)}function Gl(e){return e.toLowerCase()}var Kl=class{constructor(e,t){this.attribute=t,this.property=e}};Kl.prototype.attribute=``,Kl.prototype.booleanish=!1,Kl.prototype.boolean=!1,Kl.prototype.commaOrSpaceSeparated=!1,Kl.prototype.commaSeparated=!1,Kl.prototype.defined=!1,Kl.prototype.mustUseProperty=!1,Kl.prototype.number=!1,Kl.prototype.overloadedBoolean=!1,Kl.prototype.property=``,Kl.prototype.spaceSeparated=!1,Kl.prototype.space=void 0;var ql=t({boolean:()=>q,booleanish:()=>J,commaOrSpaceSeparated:()=>Zl,commaSeparated:()=>Xl,number:()=>Y,overloadedBoolean:()=>Yl,spaceSeparated:()=>X}),Jl=0,q=Ql(),J=Ql(),Yl=Ql(),Y=Ql(),X=Ql(),Xl=Ql(),Zl=Ql();function Ql(){return 2**++Jl}var $l=Object.keys(ql),eu=class extends Kl{constructor(e,t,n,r){let i=-1;if(super(e,t),tu(this,`space`,r),typeof n==`number`)for(;++i<$l.length;){let e=$l[i];tu(this,$l[i],(n&ql[e])===ql[e])}}};eu.prototype.defined=!0;function tu(e,t,n){n&&(e[t]=n)}function nu(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new eu(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Gl(r)]=r,n[Gl(a.attribute)]=r}return new Ul(t,n,e.space)}var ru=nu({properties:{ariaActiveDescendant:null,ariaAtomic:J,ariaAutoComplete:null,ariaBusy:J,ariaChecked:J,ariaColCount:Y,ariaColIndex:Y,ariaColSpan:Y,ariaControls:X,ariaCurrent:null,ariaDescribedBy:X,ariaDetails:null,ariaDisabled:J,ariaDropEffect:X,ariaErrorMessage:null,ariaExpanded:J,ariaFlowTo:X,ariaGrabbed:J,ariaHasPopup:null,ariaHidden:J,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:X,ariaLevel:Y,ariaLive:null,ariaModal:J,ariaMultiLine:J,ariaMultiSelectable:J,ariaOrientation:null,ariaOwns:X,ariaPlaceholder:null,ariaPosInSet:Y,ariaPressed:J,ariaReadOnly:J,ariaRelevant:null,ariaRequired:J,ariaRoleDescription:X,ariaRowCount:Y,ariaRowIndex:Y,ariaRowSpan:Y,ariaSelected:J,ariaSetSize:Y,ariaSort:null,ariaValueMax:Y,ariaValueMin:Y,ariaValueNow:Y,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function iu(e,t){return t in e?e[t]:t}function au(e,t){return iu(e,t.toLowerCase())}var ou=nu({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:Xl,acceptCharset:X,accessKey:X,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:X,autoFocus:q,autoPlay:q,blocking:X,capture:null,charSet:null,checked:q,cite:null,className:X,cols:Y,colSpan:null,content:null,contentEditable:J,controls:q,controlsList:X,coords:Y|Xl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:Yl,draggable:J,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:X,height:Y,hidden:Yl,high:Y,href:null,hrefLang:null,htmlFor:X,httpEquiv:X,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:X,itemRef:X,itemScope:q,itemType:X,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:Y,manifest:null,max:null,maxLength:Y,media:null,method:null,min:null,minLength:Y,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,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:q,optimum:Y,pattern:null,ping:X,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:X,required:q,reversed:q,rows:Y,rowSpan:Y,sandbox:X,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shape:null,size:Y,sizes:null,slot:null,span:Y,spellCheck:J,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Y,step:null,style:null,tabIndex:Y,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:J,width:Y,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:X,axis:null,background:null,bgColor:null,border:Y,borderColor:null,bottomMargin:Y,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:Y,leftMargin:Y,link:null,longDesc:null,lowSrc:null,marginHeight:Y,marginWidth:Y,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:Y,rules:null,scheme:null,scrolling:J,standby:null,summary:null,text:null,topMargin:Y,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Y,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:q,disableRemotePlayback:q,prefix:null,property:null,results:Y,security:null,unselectable:null},space:`html`,transform:au}),su=nu({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:Zl,accentHeight:Y,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Y,amplitude:Y,arabicForm:null,ascent:Y,attributeName:null,attributeType:null,azimuth:Y,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Y,by:null,calcMode:null,capHeight:Y,className:X,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:Y,diffuseConstant:Y,direction:null,display:null,dur:null,divisor:Y,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:Y,enableBackground:null,end:null,event:null,exponent:Y,externalResourcesRequired:null,fill:null,fillOpacity:Y,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Xl,g2:Xl,glyphName:Xl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Y,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Y,horizOriginX:Y,horizOriginY:Y,id:null,ideographic:Y,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Y,k:Y,k1:Y,k2:Y,k3:Y,k4:Y,kernelMatrix:Zl,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Y,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:Y,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:Y,overlineThickness:Y,paintOrder:null,panose1:null,path:null,pathLength:Y,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:X,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Y,pointsAtY:Y,pointsAtZ:Y,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zl,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zl,rev:Zl,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zl,requiredFeatures:Zl,requiredFonts:Zl,requiredFormats:Zl,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:Y,specularExponent:Y,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Y,strikethroughThickness:Y,string:null,stroke:null,strokeDashArray:Zl,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Y,strokeOpacity:Y,strokeWidth:null,style:null,surfaceScale:Y,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zl,tabIndex:Y,tableValues:null,target:null,targetX:Y,targetY:Y,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zl,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Y,underlineThickness:Y,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Y,values:null,vAlphabetic:Y,vMathematical:Y,vectorEffect:null,vHanging:Y,vIdeographic:Y,version:null,vertAdvY:Y,vertOriginX:Y,vertOriginY:Y,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Y,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:iu}),cu=nu({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),lu=nu({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:au}),uu=nu({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),du={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`},fu=/[A-Z]/g,pu=/-[a-z]/g,mu=/^data[-\w.:]+$/i;function hu(e,t){let n=Gl(t),r=t,i=Kl;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&mu.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(pu,_u);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!pu.test(e)){let n=e.replace(fu,gu);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=eu}return new i(r,t)}function gu(e){return`-`+e.toLowerCase()}function _u(e){return e.charAt(1).toUpperCase()}var vu=Wl([ru,ou,cu,lu,uu],`html`),yu=Wl([ru,su,cu,lu,uu],`svg`);function bu(e){let t=String(e||``).trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function xu(e){return e.join(` `).trim()}var Su=n(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
13
+ `,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),ee(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function ee(){S(i)}function te(e){var t;for(e||=[];t=C();)t!==!1&&e.push(t);return e}function C(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function ne(){var e=y(),t=S(a);if(t){if(C(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function re(){var e=[];te(e);for(var t;t=ne();)t!==!1&&(e.push(t),te(e));return e}return ee(),re()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Cu=n((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Su());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),wu=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Tu=n(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Cu()),r=wu();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),Eu=Ou(`end`),Du=Ou(`start`);function Ou(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function ku(e){let t=Du(e),n=Eu(e);if(t&&n)return{start:t,end:n}}var Au=e(Tu(),1),ju={}.hasOwnProperty,Mu=new Map,Nu=/[A-Z]/g,Pu=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Fu=new Set([`td`,`th`]),Iu=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function Lu(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=qu(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=Ku(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?yu:vu,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Ru(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Ru(e,t,n){if(t.type===`element`)return zu(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Bu(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Hu(e,t,n);if(t.type===`mdxjsEsm`)return Vu(e,t);if(t.type===`root`)return Uu(e,t,n);if(t.type===`text`)return Wu(e,t)}function zu(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=yu,e.schema=i),e.ancestors.push(t);let a=$u(e,t.tagName,!1),o=Ju(e,t),s=Xu(e,t);return Pu.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!G(e):!0})),Z(e,o,a,t),Gu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Bu(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}ed(e,t.position)}function Vu(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ed(e,t.position)}function Hu(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=yu,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:$u(e,t.name,!0),o=Yu(e,t),s=Xu(e,t);return Z(e,o,a,t),Gu(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Uu(e,t,n){let r={};return Gu(r,Xu(e,t)),e.create(t,e.Fragment,r,n)}function Wu(e,t){return t.value}function Z(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gu(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function Ku(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function qu(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Du(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function Ju(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&ju.call(t.properties,i)){let a=Zu(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Fu.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Yu(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else ed(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else ed(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function Xu(e,t){let n=[],r=-1,i=e.passKeys?new Map:Mu;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Ru(e,a,o);s!==void 0&&n.push(s)}return n}function Zu(e,t,n){let r=hu(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Bl(n):xu(n)),r.property===`style`){let t=typeof n==`object`?n:Qu(e,String(n));return e.stylePropertyNameCase===`css`&&(t=td(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?du[r.property]||r.property:r.attribute,n]}}function Qu(e,t){try{return(0,Au.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new te("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Iu+`#cannot-parse-style-attribute`,r}}function $u(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=U(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=U(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return ju.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);ed(e)}function ed(e,t){let n=new te("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Iu+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function td(e){let t={},n;for(n in e)ju.call(e,n)&&(t[nd(n)]=e[n]);return t}function nd(e){let t=e.replace(Nu,rd);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function rd(e){return`-`+e.toLowerCase()}var id={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]};function ad(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&x(e.charCodeAt(n+1))&&x(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function od(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function sd(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
14
+ `}]}function cd(e,t){let n=t.value?t.value+`
15
+ `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function ld(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ud(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function dd(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=ad(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function fd(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pd(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function md(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function hd(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return md(e,t);let i={src:ad(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function gd(e,t){let n={src:ad(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function _d(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function vd(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return md(e,t);let i={href:ad(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function yd(e,t){let n={href:ad(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Q(e,t,n){let r=e.all(t),i=n?bd(n):xd(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
16
+ `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
17
+ `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function bd(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=xd(n[r])}return t}function xd(e){return e.spread??e.children.length>1}function Sd(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function Cd(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wd(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Td(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Ed(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=Du(t.children[1]),o=Eu(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function Dd(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function Od(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var kd=9,Ad=32;function jd(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(Md(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(Md(t.slice(i),i>0,!1)),a.join(``)}function Md(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===kd||t===Ad;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===kd||t===Ad;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function $(e,t){let n={type:`text`,value:jd(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Nd(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var Pd={blockquote:od,break:sd,code:cd,delete:ld,emphasis:ud,footnoteReference:dd,heading:fd,html:pd,imageReference:hd,image:gd,inlineCode:_d,linkReference:vd,link:yd,listItem:Q,list:Sd,paragraph:Cd,root:wd,strong:Td,table:Ed,tableCell:Od,tableRow:Dd,text:$,thematicBreak:Nd,toml:Fd,yaml:Fd,definition:Fd,footnoteDefinition:Fd};function Fd(){}var Id=typeof self==`object`?self:globalThis,Ld=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new Id[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new Id[a](o),i)};return r},Rd=e=>Ld(new Map,e)(0),zd=``,{toString:Bd}={},{keys:Vd}=Object,Hd=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=Bd.call(e).slice(8,-1);switch(n){case`Array`:return[1,zd];case`Object`:return[2,zd];case`Date`:return[3,zd];case`RegExp`:return[4,zd];case`Map`:return[5,zd];case`Set`:return[6,zd];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]},Ud=([e,t])=>e===0&&(t===`function`||t===`symbol`),Wd=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=Hd(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of Vd(r))(e||!Ud(Hd(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(Ud(Hd(n))||Ud(Hd(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!Ud(Hd(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},Gd=(e,{json:t,lossy:n}={})=>{let r=[];return Wd(!(t||n),!!t,new Map,r)(e),r},Kd=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?Rd(Gd(e,t)):structuredClone(e):(e,t)=>Rd(Gd(e,t));function qd(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Jd(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Yd(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||qd,r=e.options.footnoteBackLabel||Jd,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=ad(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...Kd(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
18
+ `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
19
+ `}]}}var Xd={}.hasOwnProperty,Zd={};function Qd(e,t){let n=t||Zd,r=new Map,i=new Map,a={all:s,applyData:ef,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...Pd,...n.handlers},one:o,options:n,patch:$d,wrap:nf};return h(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(Xd.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=Kd(n);return r.children=a.all(e),r}return Kd(e)}return(a.options.unknownHandler||tf)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=rf(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=rf(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function $d(e,t){e.position&&(t.position=ku(e))}function ef(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,Kd(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function tf(e,t){let n=t.data||{},r=`value`in t&&!(Xd.call(n,`hProperties`)||Xd.call(n,`hChildren`))?{type:`text`,value:t.value}:{type:`element`,tagName:`div`,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function nf(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
20
+ `});++r<e.length;)r&&n.push({type:`text`,value:`
21
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
22
+ `}),n}function rf(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function af(e,t){let n=Qd(e,t),r=n.one(e,void 0),i=Yd(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
23
+ `},i)),a}function of(e,t){return e&&`run`in e?async function(n,r){let i=af(n,{file:r,...t});await e.run(i,r)}:function(n,r){return af(n,{file:r,...e||t})}}var sf=[],cf={allowDangerousHtml:!0},lf=/^(https?|ircs?|mailto|xmpp)$/i,uf=[{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 df(e){let t=ff(e),n=pf(e);return mf(t.runSync(t.parse(n),n),e)}function ff(e){let t=e.rehypePlugins||sf,n=e.remarkPlugins||sf,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...cf}:cf;return re().use(ie).use(n).use(of,r).use(t)}function pf(e){let t=e.children||``,n=new Se;return typeof t==`string`?n.value=t:``+t,n}function mf(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||hf;for(let e of uf)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return h(e,l),Lu(e,{Fragment:F.Fragment,components:i,ignoreInvalidStyle:!0,jsx:F.jsx,jsxs:F.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in id)if(Object.hasOwn(id,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=id[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function hf(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||lf.test(e.slice(0,t))?e:``}var gf=/[#.]/g;function _f(e,t){let n=e||``,r={},i=0,a,o;for(;i<n.length;){gf.lastIndex=i;let e=gf.exec(n),t=n.slice(i,e?e.index:n.length);t&&(a?a===`#`?r.id=t:Array.isArray(r.className)?r.className.push(t):r.className=[t]:o=t,i+=t.length),e&&(a=e[0],i++)}return{type:`element`,tagName:o||t||`div`,properties:r,children:[]}}function vf(e,t,n){let r=n?wf(n):void 0;function i(n,i,...a){let o;if(n==null){o={type:`root`,children:[]};let e=i;a.unshift(e)}else{o=_f(n,t);let s=o.tagName.toLowerCase(),c=r?r.get(s):void 0;if(o.tagName=c||s,yf(i))a.unshift(i);else for(let[t,n]of Object.entries(i))bf(e,o.properties,t,n)}for(let e of a)xf(o.children,e);return o.type===`element`&&o.tagName===`template`&&(o.content={type:`root`,children:o.children},o.children=[]),o}return i}function yf(e){if(typeof e!=`object`||!e||Array.isArray(e))return!0;if(typeof e.type!=`string`)return!1;let t=e,n=Object.keys(e);for(let e of n){let n=t[e];if(n&&typeof n==`object`){if(!Array.isArray(n))return!0;let e=n;for(let t of e)if(typeof t!=`number`&&typeof t!=`string`)return!0}}return!!(`children`in e&&Array.isArray(e.children))}function bf(e,t,n,r){let i=hu(e,n),a;if(r!=null){if(typeof r==`number`){if(Number.isNaN(r))return;a=r}else a=typeof r==`boolean`?r:typeof r==`string`?i.spaceSeparated?bu(r):i.commaSeparated?zl(r):i.commaOrSpaceSeparated?bu(zl(r).join(` `)):Sf(i,i.property,r):Array.isArray(r)?[...r]:i.property===`style`?Cf(r):String(r);if(Array.isArray(a)){let e=[];for(let t of a)e.push(Sf(i,i.property,t));a=e}i.property===`className`&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[i.property]=a}}function xf(e,t){if(t!=null)if(typeof t==`number`||typeof t==`string`)e.push({type:`text`,value:String(t)});else if(Array.isArray(t))for(let n of t)xf(e,n);else if(typeof t==`object`&&`type`in t)t.type===`root`?xf(e,t.children):e.push(t);else throw Error("Expected node, nodes, or string, got `"+t+"`")}function Sf(e,t,n){if(typeof n==`string`){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===``||Gl(n)===Gl(t)))return!0}return n}function Cf(e){let t=[];for(let[n,r]of Object.entries(e))t.push([n,r].join(`: `));return t.join(`; `)}function wf(e){let t=new Map;for(let n of e)t.set(n.toLowerCase(),n);return t}var Tf=`altGlyph.altGlyphDef.altGlyphItem.animateColor.animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDistantLight.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.glyphRef.linearGradient.radialGradient.solidColor.textArea.textPath`.split(`.`),Ef=vf(vu,`div`),Df=vf(yu,`g`,Tf),Of={html:`http://www.w3.org/1999/xhtml`,mathml:`http://www.w3.org/1998/Math/MathML`,svg:`http://www.w3.org/2000/svg`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function kf(e,t){return Af(e,t||{})||{type:`root`,children:[]}}function Af(e,t){let n=jf(e,t);return n&&t.afterTransform&&t.afterTransform(e,n),n}function jf(e,t){switch(e.nodeType){case 1:return If(e,t);case 3:return Pf(e);case 8:return Ff(e);case 9:return Mf(e,t);case 10:return Nf();case 11:return Mf(e,t);default:return}}function Mf(e,t){return{type:`root`,children:Lf(e,t)}}function Nf(){return{type:`doctype`}}function Pf(e){return{type:`text`,value:e.nodeValue||``}}function Ff(e){return{type:`comment`,value:e.nodeValue||``}}function If(e,t){let n=e.namespaceURI,r=n===Of.svg?Df:Ef,i=n===Of.html?e.tagName.toLowerCase():e.tagName,a=n===Of.html&&i===`template`?e.content:e,o=e.getAttributeNames(),s={},c=-1;for(;++c<o.length;)s[o[c]]=e.getAttribute(o[c])||``;return r(i,s,Lf(a,t))}function Lf(e,t){let n=e.childNodes,r=[],i=-1;for(;++i<n.length;){let e=Af(n[i],t);e!==void 0&&r.push(e)}return r}var Rf=new DOMParser;function zf(e,t){return kf(t?.fragment?Bf(e):Rf.parseFromString(e,`text/html`))}function Bf(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content}var Vf=(function(e,t,n){let r=ne(n);if(!e||!e.type||!e.children)throw Error(`Expected parent node`);if(typeof t==`number`){if(t<0||t===1/0)throw Error(`Expected positive finite number as index`)}else if(t=e.children.indexOf(t),t<0)throw Error(`Expected child node or index`);for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),Hf=(function(e){if(e==null)return Kf;if(typeof e==`string`)return Wf(e);if(typeof e==`object`)return Uf(e);if(typeof e==`function`)return Gf(e);throw Error("Expected function, string, or array as `test`")});function Uf(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Hf(e[n]);return Gf(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Wf(e){return Gf(t);function t(t){return t.tagName===e}}function Gf(e){return t;function t(t,n,r){return!!(qf(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Kf(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`element`&&`tagName`in e&&typeof e.tagName==`string`)}function qf(e){return typeof e==`object`&&!!e&&`type`in e&&`tagName`in e}var Jf=/\n/g,Yf=/[\t ]+/g,Xf=Hf(`br`),Zf=Hf(up),Qf=Hf(`p`),$f=Hf(`tr`),ep=Hf([`datalist`,`head`,`noembed`,`noframes`,`noscript`,`rp`,`script`,`style`,`template`,`title`,lp,dp]),tp=Hf(`address.article.aside.blockquote.body.caption.center.dd.dialog.dir.dl.dt.div.figure.figcaption.footer.form,.h1.h2.h3.h4.h5.h6.header.hgroup.hr.html.legend.li.listing.main.menu.nav.ol.p.plaintext.pre.section.ul.xmp`.split(`.`));function np(e,t){let n=t||{},r=`children`in e?e.children:[],i=tp(e),a=cp(e,{whitespace:n.whitespace||`normal`,breakBefore:!1,breakAfter:!1}),o=[];(e.type===`text`||e.type===`comment`)&&o.push(...ap(e,{whitespace:a,breakBefore:!0,breakAfter:!0}));let s=-1;for(;++s<r.length;)o.push(...rp(r[s],e,{whitespace:a,breakBefore:s?void 0:i,breakAfter:s<r.length-1?Xf(r[s+1]):i}));let c=[],l;for(s=-1;++s<o.length;){let e=o[s];typeof e==`number`?l!==void 0&&e>l&&(l=e):e&&(l!==void 0&&l>-1&&c.push(`
24
+ `.repeat(l)||` `),l=-1,c.push(e))}return c.join(``)}function rp(e,t,n){return e.type===`element`?ip(e,t,n):e.type===`text`?n.whitespace===`normal`?ap(e,n):op(e):[]}function ip(e,t,n){let r=cp(e,n),i=e.children||[],a=-1,o=[];if(ep(e))return o;let s,c;for(Xf(e)||$f(e)&&Vf(t,e,$f)?c=`
25
+ `:Qf(e)?(s=2,c=2):tp(e)&&(s=1,c=1);++a<i.length;)o=o.concat(rp(i[a],e,{whitespace:r,breakBefore:a?void 0:s,breakAfter:a<i.length-1?Xf(i[a+1]):c}));return Zf(e)&&Vf(t,e,Zf)&&o.push(` `),s&&o.unshift(s),c&&o.push(c),o}function ap(e,t){let n=String(e.value),r=[],i=[],a=0;for(;a<=n.length;){Jf.lastIndex=a;let e=Jf.exec(n),i=e&&`index`in e?e.index:n.length;r.push(sp(n.slice(a,i).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,``),a===0?t.breakBefore:!0,i===n.length?t.breakAfter:!0)),a=i+1}let o=-1,s;for(;++o<r.length;)r[o].charCodeAt(r[o].length-1)===8203||o<r.length-1&&r[o+1].charCodeAt(0)===8203?(i.push(r[o]),s=void 0):r[o]?(typeof s==`number`&&i.push(s),i.push(r[o]),s=0):(o===0||o===r.length-1)&&i.push(0);return i}function op(e){return[String(e.value)]}function sp(e,t,n){let r=[],i=0,a;for(;i<e.length;){Yf.lastIndex=i;let n=Yf.exec(e);a=n?n.index:e.length,!i&&!a&&n&&!t&&r.push(``),i!==a&&r.push(e.slice(i,a)),i=n?a+n[0].length:a}return i!==a&&!n&&r.push(``),r.join(` `)}function cp(e,t){if(e.type===`element`){let n=e.properties||{};switch(e.tagName){case`listing`:case`plaintext`:case`xmp`:return`pre`;case`nobr`:return`nowrap`;case`pre`:return n.wrap?`pre-wrap`:`pre`;case`td`:case`th`:return n.noWrap?`nowrap`:t.whitespace;case`textarea`:return`pre-wrap`;default:}}return t.whitespace}function lp(e){return!!(e.properties||{}).hidden}function up(e){return e.tagName===`td`||e.tagName===`th`}function dp(e){return e.tagName===`dialog`&&!(e.properties||{}).open}var fp={},pp=[];function mp(e){let t=e||fp;return function(e,n){C(e,`element`,function(e,i){let a=Array.isArray(e.properties.className)?e.properties.className:pp,o=a.includes(`language-math`),s=a.includes(`math-display`),c=a.includes(`math-inline`),l=s;if(!o&&!s&&!c)return;let u=i[i.length-1],d=e;if(e.tagName===`code`&&o&&u&&u.type===`element`&&u.tagName===`pre`&&(d=u,u=i[i.length-2],l=!0),!u)return;let f=np(d,{whitespace:`pre`}),p;try{p=r.renderToString(f,{...t,displayMode:l,throwOnError:!0})}catch(a){let o=a,s=o.name.toLowerCase();n.message(`Could not render math with KaTeX`,{ancestors:[...i,e],cause:o,place:e.position,ruleId:s,source:`rehype-katex`});try{p=r.renderToString(f,{...t,displayMode:l,strict:`ignore`,throwOnError:!1})}catch{p=[{type:`element`,tagName:`span`,properties:{className:[`katex-error`],style:`color:`+(t.errorColor||`#cc0000`),title:String(a)},children:[{type:`text`,value:f}]}]}}typeof p==`string`&&(p=zf(p,{fragment:!0}).children);let m=u.children.indexOf(d);return u.children.splice(m,1,...p),xe})}}var hp={}.hasOwnProperty;function gp(e,t){let n={type:`root`,children:[]},r=_p({schema:t?{..._,...t}:_,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function _p(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return vp(e,n);case`doctype`:return yp(e,n);case`element`:return bp(e,n);case`root`:return xp(e,n);case`text`:return Sp(e,n);default:}}}function vp(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return kp(r,t),r}}function yp(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return kp(e,t),e}}function bp(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=Cp(e,t.children),i=wp(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&hp.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return kp(o,t),o}function xp(e,t){let n={type:`root`,children:Cp(e,t.children)};return kp(n,t),n}function Sp(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return kp(n,t),n}function Cp(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=_p(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function wp(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&hp.call(r,n)?r[n]:void 0,o=r&&hp.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(hp.call(s,l)){let t=s[l],n=Tp(e,Ap(a,l),l,t);n??=Tp(e,Ap(o,l),l,t),n!=null&&(c[l]=n)}if(i&&hp.call(i,n)){let e=i[n];for(l in e)hp.call(e,l)&&!hp.call(c,l)&&(c[l]=e[l])}return c}function Tp(e,t,n,r){return t?Array.isArray(r)?Ep(e,t,n,r):Dp(e,t,n,r):void 0}function Ep(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=Dp(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function Dp(e,t,n,r){if(!(typeof r!=`boolean`&&typeof r!=`number`&&typeof r!=`string`)&&Op(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function Op(e,t,n){let r=e.schema.protocols&&hp.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function kp(e,t){let n=ku(t);t.data&&(e.data=Kd(t.data)),n&&(e.position=n)}function Ap(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function jp(e){return function(t){return gp(t,e)}}function Mp(e){v(e,[/\r?\n|\r/g,Np])}function Np(){return{type:`break`}}function Pp(){return function(e){Mp(e)}}var Fp=qt();function Ip(e){let[t,n]=(0,P.useState)(!1),r=Pe(e.code,e.language),i=r.language||`text`;async function a(){try{await navigator.clipboard.writeText(e.code),n(!0),window.setTimeout(()=>n(!1),1200)}catch(e){console.error(`[notes:code-copy]`,e)}}return(0,F.jsxs)(`div`,{className:`notes-code-block`,children:[(0,F.jsx)(`div`,{className:`notes-code-header`,children:(0,F.jsx)(`button`,{type:`button`,onClick:()=>void a(),children:t?`Copied`:i})}),(0,F.jsx)(`pre`,{children:(0,F.jsx)(`code`,{className:`hljs language-${i}`,"data-highlighted":r.highlighted?`yes`:`no`,dangerouslySetInnerHTML:{__html:r.html}})})]})}var Lp=null;async function Rp(){if(!Lp){let e=(await i(()=>import(`./mermaid.core-CicVBD9l.js`),__vite__mapDeps([0]))).default;e.initialize({startOnLoad:!1,securityLevel:`strict`}),Lp=e}return Lp}function zp(e){let t=(0,P.useId)().replace(/[^a-zA-Z0-9_-]/g,``),[n,r]=(0,P.useState)({status:`loading`});return(0,P.useEffect)(()=>{let n=!1;async function i(){r({status:`loading`});try{let i=await Rp(),s=o(e.code),c=`notes-mermaid-${t}`,l;try{({svg:l}=await i.render(c,s))}catch(e){let t=a(s);if(!t)throw e;({svg:l}=await i.render(`${c}-retry`,t))}n||r({status:`ready`,svg:l})}catch(e){n||r({status:`error`,message:e instanceof Error?e.message:`Mermaid render failed`})}}return i(),()=>{n=!0}},[e.code,t]),n.status===`ready`?(0,F.jsx)(`div`,{className:`notes-mermaid-block is-ready`,dangerouslySetInnerHTML:{__html:n.svg}}):n.status===`error`?(0,F.jsxs)(`div`,{className:`notes-mermaid-block is-error`,children:[(0,F.jsx)(`strong`,{children:`Mermaid render failed`}),(0,F.jsx)(`span`,{children:n.message}),(0,F.jsx)(`pre`,{children:(0,F.jsx)(`code`,{children:e.code})})]}):(0,F.jsx)(`div`,{className:`notes-mermaid-block is-loading`,role:`status`,"aria-label":`Diagram loading`,children:`Rendering diagram...`})}function Bp(e){return Ce(e)}function Vp(e,t,n){if(!e)return[e];let r=!!t.notes?.length;if(t.lookup.size===0&&!r)return[e];me.lastIndex=0;let i=[],a=0,o=0,s;for(;(s=me.exec(e))!==null;){let r=s.index,c=r+s[0].length;if(Ne(e,r))continue;let l=t.lookup.get(s[0])??E(s[0],t.outgoing,t.notes,r);if(!l)continue;r>a&&i.push(e.slice(a,r));let u=ge(l,s[0]),d=`${n}-wl-${o++}`;if(l.status===`resolved`&&l.resolvedPath){let e=l.resolvedPath;i.push((0,P.createElement)(`a`,{key:d,className:`notes-wikilink`,href:`#${encodeURIComponent(e)}`,title:e,"data-notes-wiki-status":l.status,onClick:n=>{n.preventDefault(),t.onNavigate(e)}},u))}else{let e=D(l);i.push((0,P.createElement)(`span`,{key:d,className:`notes-wikilink is-broken`,title:e,"data-notes-wiki-status":l.status,"aria-label":`Broken wikilink: ${s[1]}`},u))}a=c}return a===0?[e]:(a<e.length&&i.push(e.slice(a)),i)}function Hp(e,t,n){if(t.lookup.size===0&&!t.notes?.length)return e;let r=[],i=0;return P.Children.forEach(e,(e,a)=>{if(typeof e==`string`){let o=Vp(e,t,`${n}-${i++}-${a}`);for(let e of o)r.push(e);return}if(typeof e==`number`||typeof e==`boolean`||e==null){r.push(e);return}if((0,P.isValidElement)(e)){r.push(e);return}r.push(e)}),r}var Up=/^---[ \t]*\r?\n[\s\S]*?\r?\n---[ \t]*(?:\r?\n|$)/;function Wp(e){let t=Up.exec(e);if(!t)return{frontmatterRaw:null,body:e};let n=t[0];return{frontmatterRaw:n,body:e.slice(n.length)}}function Gp(e){return typeof e==`string`||typeof e==`number`?String(e):Array.isArray(e)?e.map(Gp).join(``):(0,P.isValidElement)(e)?Gp(e.props.children):``}function Kp(e){return(0,P.isValidElement)(e)?(e.props.className??``).match(/language-([^\s]+)/)?.[1]??`text`:`text`}var qp=e=>{};function Jp(e){let t=(0,P.useMemo)(()=>Wp(e.markdown).body,[e.markdown]),n=(0,P.useMemo)(()=>({lookup:Bp(e.outgoing),outgoing:e.outgoing,notes:e.notes,onNavigate:e.onWikiLinkNavigate??qp}),[e.outgoing,e.notes,e.onWikiLinkNavigate]),r=e=>t=>{let{children:r,node:i,className:a,id:o,style:s}=t,c=Hp(r,n,e);return(0,P.createElement)(e,{className:a,id:o,style:s},c)};return(0,F.jsx)(df,{skipHtml:!0,urlTransform:ue,remarkPlugins:[pe,Pp,Fe],rehypePlugins:[[jp,ve],mp],components:{a:({href:e,children:t,node:n,...r})=>{let i=typeof e==`string`&&we(e)?e:void 0,a=!!(i&&/^https?:\/\//i.test(i));return(0,F.jsx)(`a`,{...r,href:i,target:a?`_blank`:void 0,rel:a?`noreferrer noopener`:void 0,children:t})},code:({className:e,children:t})=>(0,F.jsx)(`code`,{className:e,children:t}),pre:({children:e})=>{let t=Kp(e),n=Gp(e).replace(/\n$/,``);return t===`mermaid`?(0,F.jsx)(zp,{code:n}):(0,F.jsx)(Ip,{code:n,language:t})},img:({src:e,alt:t,...n})=>{let r=typeof e==`string`?_e(e):``;return r?(0,F.jsx)(`img`,{...n,src:r,alt:t??``,loading:`lazy`}):null},p:r(`p`),li:r(`li`),h1:r(`h1`),h2:r(`h2`),h3:r(`h3`),h4:r(`h4`),h5:r(`h5`),h6:r(`h6`),blockquote:r(`blockquote`),td:r(`td`),th:r(`th`),em:r(`em`),strong:r(`strong`),del:r(`del`)},children:t})}function Yp(e){return(0,F.jsx)(F.Fragment,{children:e.widgets.map(e=>(0,Fp.createPortal)((0,F.jsx)(Jp,{markdown:e.markdown}),e.shell,e.id))})}function Xp(e,t,n){return n.selectionFrom<=t&&n.selectionTo>=e}function Zp(e,t){return new TextEncoder().encode(e).byteLength<=t.maxSnippetBytes}function Qp(e,t,n){e.length>=n.maxWidgets||Xp(t.from,t.to,n)||Zp(t.markdown,n)&&e.push(t)}function $p(e,t){if(e.length>t.largeNoteDisableThreshold)return[];let n=[],r=0;for(let i of e.matchAll(/^```([^\n`]*)\n[\s\S]*?\n```[ \t]*$/gm)){if(n.length>=t.maxWidgets)break;let e=i.index||0,a=e+i[0].length,o=(i[1]||``).trim().toLowerCase();if(o===`mermaid`){if(r>=t.maxMermaidWidgets)continue;r+=1}Qp(n,{from:e,to:a,kind:o===`mermaid`?`mermaid`:`code`,markdown:i[0],block:!0},t)}for(let r of e.matchAll(/^\$\$\n[\s\S]*?\n\$\$[ \t]*$/gm)){if(n.length>=t.maxWidgets)break;let e=r.index||0;Qp(n,{from:e,to:e+r[0].length,kind:`math-block`,markdown:r[0],block:!0},t)}for(let r of e.matchAll(/(^|[^$\\])(\$[^$\n]+\$)/g)){if(n.length>=t.maxWidgets)break;let e=r[1].length,i=(r.index||0)+e,a=r[2];Qp(n,{from:i,to:i+a.length,kind:`math-inline`,markdown:a,block:!1},t)}return n.sort((e,t)=>e.from-t.from||e.to-t.to)}var em=class e extends ct{constructor(e){super(),this.options=e}eq(t){return t instanceof e?this.options.id===t.options.id&&this.options.kind===t.options.kind&&this.options.markdown===t.options.markdown:!1}toDOM(){let e=document.createElement(this.options.block?`div`:`span`);return e.className=this.options.block?`cm-rich-widget cm-rich-block`:`cm-rich-widget cm-rich-inline`,e.dataset.richWidgetId=this.options.id,e.dataset.richWidgetKind=this.options.kind,this.options.registerWidget({id:this.options.id,kind:this.options.kind,markdown:this.options.markdown,shell:e}),queueMicrotask(this.options.requestMeasure),e}updateDOM(e){return this.options.registerWidget({id:this.options.id,kind:this.options.kind,markdown:this.options.markdown,shell:e}),queueMicrotask(this.options.requestMeasure),!0}destroy(){this.options.unregisterWidget(this.options.id)}get estimatedHeight(){return this.options.block?96:20}ignoreEvent(){return!1}},tm=50,nm=100,rm=5e4,im=5,am=1e6,om=/^([ \t]*[-*+][ \t]+)\[([ xX])\]([ \t]*)(.*)$/,sm=class e extends ct{constructor(e){super(),this.range=e}eq(t){return t instanceof e&&t.range.markerFrom===this.range.markerFrom&&t.range.checked===this.range.checked&&t.range.text===this.range.text}toDOM(e){let t=document.createElement(`label`);t.className=`cm-rich-task-widget`;let n=document.createElement(`input`);n.type=`checkbox`;let r=document.createElement(`span`);return t.append(n,r),this.syncDOM(t,e),t}updateDOM(e,t){return e.classList.contains(`cm-rich-task-widget`)?(this.syncDOM(e,t),!0):!1}destroy(e){let t=e.querySelector(`input[type="checkbox"]`);t&&(t.onchange=null)}ignoreEvent(e){return e.type===`mousedown`||e.type===`click`||e.type===`change`||e.type===`input`||e.type===`keydown`}syncDOM(e,t){let n=e.querySelector(`input[type="checkbox"]`),r=e.querySelector(`span`);!n||!r||(n.checked=this.range.checked,n.setAttribute(`aria-label`,this.range.text||(this.range.checked?`Checked task`:`Unchecked task`)),n.setAttribute(`aria-checked`,this.range.checked?`true`:`false`),n.onchange=()=>{t.dispatch({changes:{from:this.range.markerFrom,to:this.range.markerFrom+3,insert:n.checked?`[x]`:`[ ]`},userEvent:`input.task-toggle`})},r.textContent=this.range.text||`Task`)}};function cm(e){return`rich-${e.kind}-${e.from}-${e.to}-${e.markdown.length}`}function lm(e){let t=[],n=e.selection.main,r=!1;for(let i=1;i<=e.doc.lines&&!(t.length>=nm);i+=1){let a=e.doc.line(i);if(/^```/.test(a.text.trim())){r=!r;continue}if(r||n.from<=a.to&&n.to>=a.from)continue;let o=a.text.match(om);o&&t.push({from:a.from,to:a.to,markerFrom:a.from+o[1].length,checked:o[2].toLowerCase()===`x`,text:o[4].trim()})}return t}function um(e,t){if(!t.enabled||!t.active)return kt.none;let n=e.selection.main,r=$p(e.doc.toString(),{selectionFrom:n.from,selectionTo:n.to,maxWidgets:tm,maxSnippetBytes:rm,maxMermaidWidgets:im,largeNoteDisableThreshold:am}),i=[];for(let t of lm(e))i.push({from:t.from,to:t.to,decoration:kt.replace({widget:new sm(t)})});for(let e of r)i.push({from:e.from,to:e.to,decoration:kt.replace({block:e.block,widget:new em({id:cm(e),kind:e.kind,markdown:e.markdown,block:e.block,registerWidget:t.registerWidget,unregisterWidget:t.unregisterWidget,requestMeasure:t.requestMeasure})})});i.sort((e,t)=>{let n=e.from-t.from;if(n!==0)return n;let r=e.decoration.startSide-t.decoration.startSide;return r===0?e.to-t.to:r});let a=new Ue;for(let e of i)a.add(e.from,e.to,e.decoration);return a.finish()}function dm(e){return Be.define({create(t){return um(t,e)},update(t,n){return n.docChanged||n.selection?um(n.state,e):t.map(n.changes)},provide(e){return[A.decorations.from(e),A.atomicRanges.of(t=>t.state.field(e,!1)??kt.none)]}})}function fm(e){let t=document.createElement(`template`);return t.innerHTML=e,t.content.textContent||``}function pm(e){return A.domEventHandlers({paste(t,n){if(e&&ye(t,n,e))return!0;if(t.clipboardData?.getData(`text/plain`))return!1;let r=t.clipboardData?.getData(`text/html`);return r?(t.preventDefault(),n.dispatch(n.state.replaceSelection(fm(r))),!0):!1},drop(t,n){return!!(e&&de(t,n,e))}})}function mm(e){return(t,n,r,i)=>{let a=t.state.sliceDoc(i,i+2)===`]]`?i+2:i;t.dispatch({...Lt(t.state,je(e),r,a),annotations:zt.of(n)})}}function hm(e){function t(t){let n=t.state.doc.lineAt(t.pos),r=Te(t.state.sliceDoc(n.from,n.to),t.pos-n.from);if(!r)return null;let i=n.from+r.to-(r.hasClosingSuffix?2:0),a=ke(e,r.query).map(e=>({label:e.title||e.path,detail:e.path,info:e.matchKind===`alias`?`Alias: ${e.aliases.join(`, `)}`:e.matchKind,type:`text`,apply:mm(e),boost:e.score}));return a.length===0?null:{from:n.from+r.from,to:i,options:a,validFor:/^[^\]\n]*$/}}return Bt({activateOnTyping:!0,override:[t]})}var gm=(0,P.lazy)(async()=>({default:(await i(()=>import(`./MilkdownWysiwygEditor-Ctww8i0L.js`),__vite__mapDeps([0]))).MilkdownWysiwygEditor}));function _m(e){let[t,n]=(0,P.useState)(()=>new Map),r=e.authoringMode===`wysiwyg`,i=(0,P.useCallback)(e=>{n(t=>{let n=new Map(t);return n.set(e.id,e),n})},[]),a=(0,P.useCallback)(e=>{n(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),o=(0,P.useCallback)(()=>{window.dispatchEvent(new Event(`resize`))},[]),s=(0,P.useMemo)(()=>{let t=[ot.highest(jt.of(Rl)),Fl,Il,Ut({codeLanguages:Pl}),hm(e.notes),pm({notePath:e.notePath,onError:e=>console.warn(`[notes-image-paste]`,e)}),dm({enabled:e.authoringMode===`rich`||e.authoringMode===`wysiwyg`,active:e.active,registerWidget:i,unregisterWidget:a,requestMeasure:o})];return e.wordWrap&&t.push(A.lineWrapping),t},[e.active,e.authoringMode,e.notePath,e.notes,e.wordWrap,i,o,a]);return r?(0,F.jsx)(`div`,{className:`notes-editor notes-wysiwyg-editor`,children:(0,F.jsx)(P.Suspense,{fallback:(0,F.jsx)(`div`,{className:`notes-wysiwyg-loading`,children:`Loading WYSIWYG editor...`}),children:(0,F.jsx)(gm,{active:e.active,content:e.content,notePath:e.notePath,outgoing:e.outgoing,notes:e.notes,activeTag:e.activeTag,onChange:e.onChange,onTagSelect:e.onTagSelect,onWikiLinkNavigate:e.onWikiLinkNavigate})})}):(0,F.jsxs)(`div`,{className:`notes-editor`,children:[(0,F.jsx)(Yp,{widgets:[...t.values()]}),(0,F.jsx)(Ml,{value:e.content,extensions:s,onChange:e.onChange,height:`100%`,basicSetup:{lineNumbers:!0,foldGutter:!0,highlightActiveLine:!0}})]})}function vm(e){return(0,F.jsx)(`article`,{className:`notes-preview`,children:(0,F.jsx)(Jp,{markdown:e.markdown,outgoing:e.outgoing,notes:e.notes,onWikiLinkNavigate:e.onWikiLinkNavigate})})}function ym(){return(0,F.jsxs)(`section`,{className:`notes-empty-state`,children:[(0,F.jsx)(`strong`,{children:`No notes yet`}),(0,F.jsx)(`span`,{children:`Create a markdown note from the file tree.`})]})}function bm(e){let t=e.note;if(!t)return null;let n=t.aliases||[],r=t.tags||[],i=t.created,a=t.frontmatterError;return!a&&n.length===0&&r.length===0&&!i?null:(0,F.jsxs)(`div`,{className:`notes-frontmatter-strip`,"aria-label":`Note frontmatter`,children:[a&&(0,F.jsxs)(`span`,{className:`notes-frontmatter-error`,role:`alert`,children:[`Frontmatter: `,a]}),n.length>0&&(0,F.jsxs)(`span`,{className:`notes-frontmatter-section`,children:[(0,F.jsx)(`span`,{className:`notes-frontmatter-label`,children:`Aliases`}),(0,F.jsx)(`span`,{className:`notes-frontmatter-value`,children:n.join(`, `)})]}),i&&(0,F.jsxs)(`span`,{className:`notes-frontmatter-section`,children:[(0,F.jsx)(`span`,{className:`notes-frontmatter-label`,children:`Created`}),(0,F.jsx)(`span`,{className:`notes-frontmatter-value`,children:i})]}),r.length>0&&(0,F.jsx)(`span`,{className:`notes-frontmatter-section notes-frontmatter-tags`,children:r.map(t=>{let n=t===e.activeTag;return(0,F.jsxs)(`button`,{type:`button`,className:n?`notes-tag-chip is-active`:`notes-tag-chip`,"aria-pressed":n,title:n?`Clear filter: #${t}`:`Filter notes by #${t}`,onClick:()=>e.onTagClick(n?null:t),children:[`#`,t]},t)})})]})}var xm=50;function Sm(e){return e.trim().toLowerCase()}function Cm(e,t){let n=Sm(e),r=Sm(t);if(!r)return 1;if(n.startsWith(r))return 1e3-n.length;let i=n.indexOf(r);if(i>=0)return 700-i;let a=-1,o=0,s=0;for(let e of r){let t=n.indexOf(e,a+1);if(t<0)return null;o=t===a+1?o+1:0,s+=4+o*3-Math.min(t,40)*.1,a=t}return s}function wm(e,t){let n=[{value:e.title,reason:`title`,boost:120},{value:e.path,reason:`path`,boost:40},...e.aliases.map(e=>({value:e,reason:`alias`,boost:80}))],r=null;for(let i of n){let n=Cm(i.value,t);if(n==null)continue;let a=n+i.boost;(!r||a>r.score)&&(r={note:e,score:a,reason:i.reason})}return r}function Tm(e,t,n=xm){let r=t.trim();return e.map(e=>wm(e,r)).filter(e=>!!e).sort((e,t)=>t.score===e.score?e.note.path.localeCompare(t.note.path):t.score-e.score).slice(0,n)}function Em(e){let[t,n]=(0,P.useState)(``),[r,i]=(0,P.useState)(0),a=(0,P.useRef)(null),o=(0,P.useRef)(null),s=(0,P.useMemo)(()=>Tm(e.notes,t),[e.notes,t]),c=s[r]?`notes-quick-switcher-option-${r}`:void 0;(0,P.useEffect)(()=>{e.open&&(n(``),i(0),requestAnimationFrame(()=>a.current?.focus()))},[e.open]),(0,P.useEffect)(()=>{r>=s.length&&i(Math.max(0,s.length-1))},[r,s.length]),(0,P.useEffect)(()=>{(c?document.getElementById(c):null)?.scrollIntoView({block:`nearest`})},[c]);function l(){let t=s[r];t&&e.onSelect(t.note.path)}function u(t){t.key===`ArrowDown`?(t.preventDefault(),i(e=>Math.min(s.length-1,e+1))):t.key===`ArrowUp`?(t.preventDefault(),i(e=>Math.max(0,e-1))):t.key===`Enter`?(t.preventDefault(),l()):t.key===`Escape`&&(t.preventDefault(),e.onClose())}return e.open?(0,F.jsx)(`div`,{className:`notes-quick-switcher-backdrop`,role:`presentation`,onClick:e.onClose,children:(0,F.jsxs)(`section`,{className:`notes-quick-switcher`,role:`dialog`,"aria-modal":`true`,"aria-label":`Quick switch note`,onClick:e=>e.stopPropagation(),children:[(0,F.jsx)(`input`,{ref:a,className:`notes-quick-switcher-input`,type:`search`,placeholder:`Go to note`,value:t,onChange:e=>{n(e.currentTarget.value),i(0)},onKeyDown:u,"aria-label":`Quick switch note`,"aria-controls":`notes-quick-switcher-results`,"aria-activedescendant":c}),(0,F.jsxs)(`div`,{id:`notes-quick-switcher-results`,className:`notes-quick-switcher-list`,role:`listbox`,"aria-label":`Matching notes`,ref:o,children:[s.map((t,n)=>{let a=n===r,o=t.note.path===e.selectedPath;return(0,F.jsxs)(`button`,{id:`notes-quick-switcher-option-${n}`,type:`button`,role:`option`,"aria-selected":a,className:`notes-quick-switcher-item${a?` is-active`:``}${o?` is-current`:``}`,onMouseEnter:()=>i(n),onClick:()=>e.onSelect(t.note.path),children:[(0,F.jsx)(`span`,{className:`notes-quick-switcher-title`,children:t.note.title||t.note.path}),(0,F.jsx)(`span`,{className:`notes-quick-switcher-path`,children:t.note.path}),(0,F.jsx)(`span`,{className:`notes-quick-switcher-alias`,children:o?`Current note`:t.reason===`alias`?`Alias match`:t.reason===`path`?`Path match`:`Title match`})]},t.note.path)}),s.length===0&&(0,F.jsx)(`p`,{className:`notes-quick-switcher-empty`,children:`No matching notes.`})]}),(0,F.jsxs)(`footer`,{className:`notes-quick-switcher-footer`,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`Up/Down`}),` move`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`Enter`}),` open`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`kbd`,{children:`Esc`}),` close`]})]})]})}):null}function Dm(e){return e instanceof g&&e.status===409&&e.code===`note_revision_conflict`}function Om(e){return e?e.split(`/`).filter(Boolean).at(-1)||e:`No note selected`}function km(e,t,n){return!!e&&t&&!n}var Am=[`raw`,`split`,`preview`,`wysiwyg`];function jm(e){return e===`raw`?`Raw`:e===`split`?`Split`:e===`preview`?`Preview`:`WYSIWYG`}function Mm(e,t){return e===`settings`?null:e===`split`?`split`:e===`preview`?`preview`:t===`wysiwyg`?`wysiwyg`:`raw`}function Nm(e){function t(t){if(t===`split`){e.onViewModeChange(`split`),e.onAuthoringModeChange(`plain`);return}if(t===`preview`){e.onViewModeChange(`preview`);return}e.onViewModeChange(`raw`),e.onAuthoringModeChange(t===`wysiwyg`?`wysiwyg`:`plain`)}let n=Mm(e.viewMode,e.authoringMode);return(0,F.jsxs)(`div`,{className:`notes-toolbar`,children:[(0,F.jsxs)(`div`,{className:`notes-toolbar-title`,children:[(0,F.jsx)(`strong`,{children:Om(e.selectedPath)}),(0,F.jsx)(`span`,{children:e.conflict?`Conflict`:e.dirty?`Unsaved`:`Saved`})]}),(0,F.jsxs)(`div`,{className:`notes-toolbar-actions`,children:[(0,F.jsx)(`div`,{className:`notes-view-tabs`,role:`tablist`,"aria-label":`Notes view`,children:Am.map(r=>(0,F.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":n===r,className:n===r?`is-active`:``,disabled:!e.selectedPath,onClick:()=>t(r),children:jm(r)},r))}),(0,F.jsx)(`button`,{type:`button`,className:e.viewMode===`settings`?`is-active`:``,onClick:()=>e.onViewModeChange(`settings`),children:`Settings`}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onReload,disabled:!e.selectedPath||e.loading,children:`Refresh`}),(0,F.jsx)(`button`,{type:`button`,className:`notes-save-button`,onClick:e.onSave,disabled:!km(e.selectedPath,e.dirty,e.saving),children:e.saving?`Saving`:`Save`})]})]})}async function Pm(){await Promise.resolve(),await new Promise(e=>setTimeout(e,0))}function Fm(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(``),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(null),[f,p]=(0,P.useState)(null),m=(0,P.useRef)(``),h=(0,P.useRef)(!1),g=(0,P.useRef)(!1),_=(0,P.useCallback)(async e=>{s(!0),d(null),p(null);try{let n=await Oe(e);t(n),m.current=n.content,h.current=!1,r(n.content),a(!1)}catch(e){d(e.message)}finally{s(!1)}},[]);function v(e){m.current=e,h.current=!0,r(e),a(!0)}return{file:e,content:n,dirty:i,loading:o,saving:c,error:u,conflict:f,setContent:v,load:_,save:(0,P.useCallback)(async()=>{if(await Pm(),!e||!h.current||g.current)return;let n=m.current;g.current=!0,l(!0),d(null),p(null);try{let i=await Ae({path:e.path,content:n,baseRevision:e.revision});t(i),m.current===n&&(m.current=i.content,h.current=!1,r(i.content),a(!1))}catch(r){if(Dm(r)){let i=e.revision;try{let n=await Oe(e.path);i=n.revision,t(n)}catch{i=e.revision}p({localContent:n,remoteRevision:i,message:r.message})}else d(r.message)}finally{g.current=!1,l(!1)}},[e]),reloadFromDisk:(0,P.useCallback)(async()=>{e&&await _(e.path)},[e,_]),overwrite:(0,P.useCallback)(async()=>{if(await Pm(),!e||g.current)return;let n=m.current;g.current=!0,l(!0),d(null);try{let i=await Ae({path:e.path,content:n});t(i),m.current===n&&(m.current=i.content,h.current=!1,r(i.content),a(!1)),p(null)}catch(e){d(e.message)}finally{g.current=!1,l(!1)}},[e]),clearConflict:()=>p(null)}}var Im=[`raw`,`preview`,`wysiwyg`],Lm=/[/\\]/g;function Rm(e){let t=e.split(`/`).pop()??e;return t.endsWith(`.md`)?t.slice(0,-3):t}function zm(e,t){return e===`preview`?`preview`:t===`wysiwyg`?`wysiwyg`:`raw`}function Bm(e){let t=Fm(),n=(0,P.useRef)(!1),[r,i]=(0,P.useState)(!1);(0,P.useEffect)(()=>{e.selectedPath&&t.load(e.selectedPath)},[e.selectedPath]),(0,P.useEffect)(()=>{e.onDirtyPathChange(t.dirty?e.selectedPath:null)},[t.dirty,e.selectedPath]),(0,P.useEffect)(()=>{if(!e.active)return;function n(e){!(e.metaKey||e.ctrlKey)||e.key.toLowerCase()!==`s`||(e.preventDefault(),t.save())}return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[t.save,e.active]),(0,P.useEffect)(()=>{if(!e.active)return;function t(t){if(!(t.metaKey||t.ctrlKey)||t.key.toLowerCase()!==`e`)return;t.preventDefault();let n=zm(e.viewMode,e.authoringMode),r=Im[(Im.indexOf(n)+1)%Im.length];if(r===`preview`){e.onViewModeChange(`preview`);return}e.onViewModeChange(`raw`),e.onAuthoringModeChange(r===`wysiwyg`?`wysiwyg`:`plain`)}return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e.active,e.viewMode,e.authoringMode,e.onViewModeChange,e.onAuthoringModeChange]),(0,P.useEffect)(()=>{if(!e.active)return;function t(t){!(t.metaKey||t.ctrlKey)||!t.shiftKey||t.key.toLowerCase()!==`f`||(t.preventDefault(),e.onOpenSidebarSearch())}return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e.active,e.onOpenSidebarSearch]),(0,P.useEffect)(()=>{if(!e.active)return;function t(e){!(e.metaKey||e.ctrlKey)||e.key.toLowerCase()!==`p`||(e.preventDefault(),i(e=>!e))}return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e.active]);async function a(t){if(n.current||!e.selectedPath)return;let r=t.currentTarget.value.trim().replace(Lm,``),i=Rm(e.selectedPath);if(!r||r===i){t.currentTarget.value=i;return}let a=e.selectedPath.split(`/`);a[a.length-1]=r.endsWith(`.md`)?r:`${r}.md`;let o=a.join(`/`);if(o===e.selectedPath){t.currentTarget.value=i;return}n.current=!0;try{await Me(e.selectedPath,o),e.onSelectedPathChange(o),I({topics:[`notes`],reason:`note:title-renamed`,source:`ui`})}catch(e){console.warn(`[notes-rename]`,e),t.currentTarget.value=i}finally{n.current=!1}}let o=e.viewMode===`raw`||e.viewMode===`split`,s=e.viewMode===`preview`||e.viewMode===`split`,c=e.selectedPath&&e.vaultIndex?.outgoingLinks?.[e.selectedPath]||[],l=e.vaultIndex?.notes||[],u=e.authoringMode===`wysiwyg`&&o;return(0,F.jsxs)(`section`,{className:`notes-workspace`,"aria-label":`Notes workspace`,children:[(0,F.jsxs)(`main`,{className:`notes-main notes-mode-${e.viewMode}`,children:[(0,F.jsx)(Nm,{selectedPath:e.selectedPath,viewMode:e.viewMode,authoringMode:e.authoringMode,dirty:t.dirty,saving:t.saving,loading:t.loading,conflict:!!t.conflict,onViewModeChange:e.onViewModeChange,onAuthoringModeChange:e.onAuthoringModeChange,onSave:()=>void t.save(),onReload:()=>void t.reloadFromDisk()}),(0,F.jsxs)(`div`,{className:`notes-content`,children:[t.error&&(0,F.jsx)(`section`,{className:`state error-state`,children:t.error}),t.conflict&&(0,F.jsxs)(`section`,{className:`notes-conflict`,children:[(0,F.jsx)(`span`,{children:t.conflict.message}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void t.reloadFromDisk(),children:`Reload`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void t.overwrite(),children:`Overwrite`}),(0,F.jsx)(`button`,{type:`button`,onClick:t.clearConflict,children:`Keep local`})]}),e.viewMode===`settings`&&(0,F.jsxs)(`section`,{className:`notes-settings`,children:[(0,F.jsxs)(`label`,{children:[(0,F.jsx)(`input`,{type:`checkbox`,checked:e.wordWrap,onChange:t=>e.onWordWrapChange(t.currentTarget.checked)}),`Word wrap`]}),(0,F.jsxs)(`label`,{children:[`Tree width`,(0,F.jsx)(`input`,{type:`range`,min:`220`,max:`420`,value:e.treeWidth,onChange:t=>e.onTreeWidthChange(Number(t.currentTarget.value))})]})]}),!e.selectedPath&&e.viewMode!==`settings`&&(0,F.jsx)(ym,{}),e.selectedPath&&e.viewMode!==`settings`&&(0,F.jsxs)(`div`,{className:`notes-document-grid`,children:[(0,F.jsx)(`input`,{className:`notes-inline-title`,defaultValue:Rm(e.selectedPath),onBlur:a,onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},spellCheck:!1,"aria-label":`Note title`},e.selectedPath),!u&&(0,F.jsx)(bm,{note:e.selectedNote,activeTag:e.tagFilter,onTagClick:e.onTagSelect}),o&&(0,F.jsx)(`div`,{className:`notes-editor-pane`,children:(0,F.jsx)(_m,{active:e.active&&o,authoringMode:e.authoringMode,content:t.content,notePath:e.selectedPath,outgoing:c,notes:l,activeTag:e.tagFilter,wordWrap:e.wordWrap,onChange:t.setContent,onTagSelect:e.onTagSelect,onWikiLinkNavigate:e.onWikiLinkNavigate},e.selectedPath)}),s&&(0,F.jsx)(vm,{markdown:t.content,outgoing:c,notes:l,onWikiLinkNavigate:e.onWikiLinkNavigate})]})]})]}),(0,F.jsx)(Em,{open:r,notes:e.vaultIndex?.notes||[],selectedPath:e.selectedPath,onClose:()=>i(!1),onSelect:t=>{e.onSelectedPathChange(t),i(!1)}})]})}var Vm=`application/x-jaw-running-chip`;function Hm(e,t,n){let r=[],i=new Set;for(let a of e){if(a.hidden)continue;let e=a.port;if(i.has(e))continue;i.add(e);let o=n.has(e),s=a.status===`online`,c=a.status===`error`;!o&&!s&&!c||r.push({port:e,label:a.label||a.instanceId||`Port ${e}`,activity:t[e]||null,state:o?`busy`:c?`error`:`online`})}return r}function Um(e){return JSON.stringify({port:e.port,label:e.label,activity:e.activity,state:e.state})}function Wm(e){let t=e.dataTransfer.getData(Vm);if(!t)return null;try{let e=JSON.parse(t);return typeof e.port==`number`?{port:e.port,label:typeof e.label==`string`?e.label:`Port ${e.port}`,activity:typeof e.activity==`string`?e.activity:null,state:e.state===`busy`||e.state===`error`?e.state:`online`}:null}catch{return null}}var Gm=[{id:`backlog`,label:`Backlog`,policy:`Options not yet committed`},{id:`ready`,label:`Ready`,policy:`Pullable, clear enough to start`},{id:`active`,label:`In Progress`,policy:`Current WIP, keep starts limited`},{id:`review`,label:`Review`,policy:`Check output before delivery`},{id:`done`,label:`Done`,policy:`Delivered or no longer active`}];function Km(e){let t=(0,P.useMemo)(()=>Hm(e.instances,e.titlesByPort,e.busyPorts),[e.instances,e.titlesByPort,e.busyPorts]);return(0,F.jsxs)(`nav`,{className:`dashboard-board-sidebar`,"aria-label":`Board lanes`,children:[(0,F.jsxs)(`header`,{className:`dashboard-board-sidebar-header`,children:[(0,F.jsx)(`span`,{className:`dashboard-board-sidebar-title`,children:`Board`}),(0,F.jsxs)(`span`,{className:`dashboard-board-sidebar-count`,children:[t.length,` running`]})]}),(0,F.jsxs)(`section`,{className:`dashboard-board-sidebar-running`,"aria-label":`Running instances`,children:[(0,F.jsx)(`div`,{className:`dashboard-board-sidebar-section-title`,children:`Running`}),t.length===0?(0,F.jsx)(`p`,{className:`dashboard-board-sidebar-empty`,children:`No running instances`}):(0,F.jsx)(`div`,{className:`dashboard-board-sidebar-running-list`,children:t.map(e=>(0,F.jsxs)(`div`,{className:`dashboard-board-running-chip`,"data-state":e.state,draggable:!0,onDragStart:t=>{t.dataTransfer.effectAllowed=`copy`,t.dataTransfer.setData(Vm,Um(e))},"aria-label":e.activity?`${e.label} — ${e.activity}`:e.label,children:[(0,F.jsxs)(`span`,{className:`dashboard-board-running-chip-port`,children:[`:`,e.port]}),(0,F.jsx)(`span`,{className:`dashboard-board-running-chip-label`,children:e.label}),e.activity?(0,F.jsx)(`span`,{className:`dashboard-board-running-chip-activity`,children:e.activity}):null,(0,F.jsx)(`span`,{className:`dashboard-board-running-chip-state`,"data-state":e.state,children:e.state})]},e.port))})]}),(0,F.jsx)(`div`,{className:`dashboard-board-sidebar-section-title`,children:`Lanes`}),(0,F.jsxs)(`ul`,{className:`dashboard-board-sidebar-list`,children:[(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-board-sidebar-item${e.view.kind===`overall`?` is-active`:``}`,onClick:()=>e.onViewChange({kind:`overall`}),"aria-pressed":e.view.kind===`overall`,children:[(0,F.jsx)(`span`,{children:`Overall`}),(0,F.jsx)(`small`,{children:`Five-column workflow`})]})}),Gm.map(t=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-board-sidebar-item${e.view.kind===`lane`&&e.view.lane===t.id?` is-active`:``}`,onClick:()=>e.onViewChange({kind:`lane`,lane:t.id}),"aria-pressed":e.view.kind===`lane`&&e.view.lane===t.id,children:[(0,F.jsx)(`span`,{children:t.label}),(0,F.jsx)(`small`,{children:t.policy})]})},t.id))]})]})}function qm(e,t){if(e.port===null)return`no instance`;let n=t.get(e.port);return n?`:${n.port} ${n.label}`:`:${e.port}`}function Jm(e){let t=Gm.find(t=>t.id===e.lane),n=t?.label??`Lane`,r=t?.policy??``,i=e.cards.filter(e=>e.port!==null).length,a=e.cards.length-i;return(0,F.jsxs)(`div`,{className:`dashboard-board-lane-detail-shell`,"data-lane":e.lane,children:[(0,F.jsxs)(`aside`,{className:`dashboard-board-lane-detail-sidebar`,"aria-label":`${n} filters`,children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`span`,{children:n}),(0,F.jsx)(`small`,{children:r})]}),(0,F.jsxs)(`div`,{className:`dashboard-board-lane-detail-counts`,children:[(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`strong`,{children:e.cards.length}),` all`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`strong`,{children:i}),` with instance`]}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`strong`,{children:a}),` no instance`]})]}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onBackToOverall,children:`Overall`})]}),(0,F.jsxs)(`section`,{className:`dashboard-board-lane-detail-content`,"aria-label":`${n} cards`,children:[(0,F.jsxs)(`header`,{className:`dashboard-board-lane-detail-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsxs)(`h2`,{children:[`Board / `,n]}),(0,F.jsx)(`p`,{children:e.lane===`done`?`Done archive, shown as compact two-line rows.`:`Lane detail, shown as compact rows for scan and reuse.`})]}),(0,F.jsx)(`button`,{type:`button`,onClick:e.onBackToOverall,children:`Close`})]}),e.cards.length===0?(0,F.jsx)(`p`,{className:`dashboard-board-lane-detail-empty`,children:`No items in this lane`}):(0,F.jsx)(`ul`,{className:`dashboard-board-compact-list`,children:e.cards.map(t=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-board-compact-row`,onClick:()=>e.onOpenCard(t.id),children:[(0,F.jsx)(`span`,{className:`dashboard-board-compact-row-title`,children:t.summary||t.title}),(0,F.jsx)(`span`,{className:`dashboard-board-compact-row-instance`,children:qm(t,e.runningChipByPort)})]})},t.id))})]})]})}var Ym=`/api/dashboard/board`;function Xm(e){return{...e,summary:e.summary??null,detail:e.detail??null}}async function Zm(e){if(!e.ok){let t=await e.text().catch(()=>``);throw Error(`${e.status} ${t||e.statusText}`)}return await e.json()}async function Qm(){let e=await Zm(await fetch(`${Ym}/tasks`,{credentials:`same-origin`,cache:`no-store`}));return Array.isArray(e.tasks)?e.tasks.map(Xm):[]}async function $m(e){return Xm((await Zm(await fetch(`${Ym}/tasks`,{method:`POST`,headers:{"content-type":`application/json`},credentials:`same-origin`,body:JSON.stringify(e)}))).task)}async function eh(e,t){return Xm((await Zm(await fetch(`${Ym}/tasks/${encodeURIComponent(e)}`,{method:`PATCH`,headers:{"content-type":`application/json`},credentials:`same-origin`,body:JSON.stringify(t)}))).task)}async function th(e){await Zm(await fetch(`${Ym}/tasks/${encodeURIComponent(e)}`,{method:`DELETE`,credentials:`same-origin`}))}function nh(e){let[t,n]=(0,P.useState)(``),[r,i]=(0,P.useState)(``),[a,o]=(0,P.useState)(``);if((0,P.useEffect)(()=>{n(e.card?.title??``),i(e.card?.summary??``),o(e.card?.detail??``)},[e.card]),!e.card)return null;function s(n){if(n.preventDefault(),!e.card)return;let i=t.trim();i&&e.onSave(e.card.id,{title:i,summary:r,detail:a})}return(0,F.jsx)(`div`,{className:`dashboard-board-dialog-backdrop`,role:`presentation`,onMouseDown:t=>{t.target===t.currentTarget&&e.onClose()},children:(0,F.jsxs)(`form`,{className:`dashboard-board-dialog`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`dashboard-board-dialog-title`,onSubmit:s,onKeyDown:t=>{t.key===`Escape`&&e.onClose()},children:[(0,F.jsxs)(`header`,{className:`dashboard-board-dialog-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`dashboard-board-dialog-kicker`,children:`Kanban block`}),(0,F.jsx)(`h3`,{id:`dashboard-board-dialog-title`,children:`Edit card`})]}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-dialog-icon-button`,onClick:e.onClose,"aria-label":`Close card editor`,children:`×`})]}),(0,F.jsxs)(`label`,{className:`dashboard-board-dialog-field`,children:[(0,F.jsx)(`span`,{children:`Title`}),(0,F.jsx)(`input`,{autoFocus:!0,type:`text`,value:t,onChange:e=>n(e.currentTarget.value),maxLength:500,required:!0})]}),(0,F.jsxs)(`label`,{className:`dashboard-board-dialog-field`,children:[(0,F.jsx)(`span`,{children:`One-line note`}),(0,F.jsx)(`input`,{type:`text`,value:r,onChange:e=>i(e.currentTarget.value),maxLength:500,placeholder:`Short visible memo for the card`})]}),(0,F.jsxs)(`label`,{className:`dashboard-board-dialog-field`,children:[(0,F.jsx)(`span`,{children:`Details`}),(0,F.jsx)(`textarea`,{value:a,onChange:e=>o(e.currentTarget.value),maxLength:2e4,rows:10,placeholder:`Write Markdown here. It is stored as raw text for now.`})]}),(0,F.jsxs)(`footer`,{className:`dashboard-board-dialog-footer`,children:[(0,F.jsx)(`span`,{className:`dashboard-board-dialog-storage`,children:`Markdown`}),(0,F.jsxs)(`div`,{className:`dashboard-board-dialog-actions`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:e.onClose,children:`Cancel`}),(0,F.jsx)(`button`,{type:`submit`,disabled:e.busy||!t.trim(),children:`Save`})]})]})]})})}var rh=`application/x-jaw-board-task`;function ih(e){return e.kind===`open`?(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`path`,{d:`M7 4h-2.5a1.5 1.5 0 0 0-1.5 1.5v10a1.5 1.5 0 0 0 1.5 1.5h10a1.5 1.5 0 0 0 1.5-1.5V13`}),(0,F.jsx)(`path`,{d:`M10 3h7v7`}),(0,F.jsx)(`path`,{d:`M9 11 17 3`})]}):e.kind===`move`?(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`path`,{d:`M10 2v16`}),(0,F.jsx)(`path`,{d:`M6 6 10 2l4 4`}),(0,F.jsx)(`path`,{d:`m6 14 4 4 4-4`}),(0,F.jsx)(`path`,{d:`M2 10h16`}),(0,F.jsx)(`path`,{d:`m6 6-4 4 4 4`}),(0,F.jsx)(`path`,{d:`m14 6 4 4-4 4`})]}):(0,F.jsxs)(`svg`,{viewBox:`0 0 20 20`,width:`14`,height:`14`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,focusable:`false`,children:[(0,F.jsx)(`path`,{d:`M3 5h14`}),(0,F.jsx)(`path`,{d:`M8 5V3h4v2`}),(0,F.jsx)(`path`,{d:`M6 8v8`}),(0,F.jsx)(`path`,{d:`M10 8v8`}),(0,F.jsx)(`path`,{d:`M14 8v8`}),(0,F.jsx)(`path`,{d:`M5 5l1 13h8l1-13`})]})}function ah(e){return JSON.stringify({id:e.id,lane:e.lane})}function oh(e){let t=e.dataTransfer.getData(rh);if(!t)return null;try{let e=JSON.parse(t);if(typeof e.id!=`string`)return null;let n=Gm.find(t=>t.id===e.lane)?.id;return n?{id:e.id,lane:n}:null}catch{return null}}function sh(e,t){return Array.from(e.dataTransfer.types).includes(t)}function ch(e){return{id:e.id,title:e.title,summary:e.summary??null,detail:e.detail??null,lane:e.lane,port:e.port,source:e.source,persisted:!0}}function lh(e){return e==null?null:e.trim()||null}function uh(e){let[t,n]=(0,P.useState)([]),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(``),[s,c]=(0,P.useState)(!1),[l,u]=(0,P.useState)(null),[d,f]=(0,P.useState)(null),[p,m]=(0,P.useState)(null),[h,g]=(0,P.useState)(null),[_,v]=(0,P.useState)(!1),y=(0,P.useRef)(null),b=(0,P.useCallback)(async()=>{try{n(await Qm())}catch{}},[]);(0,P.useEffect)(()=>{e.active&&b()},[e.active,b]),(0,P.useEffect)(()=>{if(!l)return;let e=e=>{y.current&&(y.current.contains(e.target)||u(null))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[l]);let x=(0,P.useCallback)(async e=>{let t=a.trim();if(!(!t||s)){c(!0);try{await $m({title:t,lane:e}),o(``),i(null),await b()}catch{}finally{c(!1)}}},[a,s,b]),S=(0,P.useCallback)(async(e,t)=>{u(null);try{await eh(e,{lane:t}),await b()}catch{}},[b]),ee=(0,P.useCallback)(async e=>{try{await th(e),await b()}catch{}},[b]),te=(0,P.useCallback)(async(e,t)=>{if(!_){v(!0);try{let r=await eh(e,t);n(n=>n.map(n=>n.id===e?{...n,...r,summary:t.summary===void 0?r.summary??n.summary:lh(t.summary),detail:t.detail===void 0?r.detail??n.detail:lh(t.detail)}:n)),g(null)}catch{}finally{v(!1)}}},[_]),C=(0,P.useCallback)(async(e,t)=>{try{await eh(e,{port:t}),await b()}catch{}},[b]),ne=(0,P.useCallback)(async e=>{try{await eh(e,{port:null}),await b()}catch{}},[b]),re=(0,P.useCallback)((e,t)=>{t.preventDefault(),f(null);let n=oh(t);!n||n.lane===e||S(n.id,e)},[S]),ie=(0,P.useCallback)((e,t)=>{if(!sh(t,`application/x-jaw-running-chip`))return;t.preventDefault(),t.stopPropagation(),m(null);let n=Wm(t);n&&C(e,n.port)},[C]),ae=(0,P.useMemo)(()=>t.map(ch),[t]),oe=(0,P.useMemo)(()=>{let e=h?ae.find(e=>e.id===h):null;return e?{id:e.id,title:e.title,summary:e.summary,detail:e.detail}:null},[ae,h]),se=(0,P.useMemo)(()=>Hm(e.instances,e.titlesByPort,e.busyPorts),[e.instances,e.titlesByPort,e.busyPorts]),ce=(0,P.useMemo)(()=>new Map(se.map(e=>[e.port,e])),[se]),le=e.view.kind===`lane`?e.view.lane:null;return(0,F.jsxs)(`section`,{className:`dashboard-board-workspace`,"aria-hidden":!e.active,children:[(0,F.jsxs)(`header`,{className:`dashboard-board-workspace-header`,children:[(0,F.jsxs)(`div`,{className:`dashboard-board-workspace-header-text`,children:[(0,F.jsx)(`h2`,{children:`Board`}),(0,F.jsx)(`p`,{className:`dashboard-board-workspace-subtitle`,children:`Create human-owned kanban blocks, then drag running instance blocks into a card to attach context without touching the instance itself.`})]}),(0,F.jsx)(`div`,{className:`dashboard-board-workspace-controls`,children:(0,F.jsx)(ei,{topic:`board`,label:`Open Board help`,onOpen:e.onOpenHelpTopic})})]}),le===null?(0,F.jsx)(`div`,{className:`dashboard-board-lanes`,children:Gm.map(t=>{let n=ae.filter(e=>e.lane===t.id),c=t.id===`done`?n.slice(0,4):n,h=t.id===`done`?Math.max(0,n.length-4):0,_=r===t.id;return(0,F.jsxs)(`div`,{className:`dashboard-board-lane${d===t.id?` is-drop-target`:``}`,"data-lane":t.id,onDragOver:e=>{sh(e,rh)&&(e.preventDefault(),e.dataTransfer.dropEffect=`move`,d!==t.id&&f(t.id))},onDragLeave:()=>{d===t.id&&f(null)},onDrop:e=>re(t.id,e),children:[(0,F.jsxs)(`header`,{className:`dashboard-board-lane-header`,children:[(0,F.jsx)(`span`,{className:`dashboard-board-lane-title`,children:t.label}),(0,F.jsx)(`span`,{className:`dashboard-board-lane-policy`,children:t.policy}),(0,F.jsx)(`span`,{className:`dashboard-board-lane-count`,children:n.length})]}),(0,F.jsxs)(`ul`,{className:`dashboard-board-lane-cards`,children:[n.length===0?(0,F.jsx)(`li`,{className:`dashboard-board-lane-empty`,children:`No items`}):c.map(e=>{let t=e.port===null?null:ce.get(e.port)??null;return(0,F.jsxs)(`li`,{className:`dashboard-board-card${p===e.id?` is-instance-drop-target`:``}`,"data-lane":e.lane,"data-source":e.source,"data-persisted":e.persisted?`true`:`false`,draggable:!0,onDragStart:t=>{t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(rh,ah(e))},onDragOver:t=>{sh(t,`application/x-jaw-running-chip`)&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect=`copy`,p!==e.id&&m(e.id))},onDragLeave:()=>{p===e.id&&m(null)},onDrop:t=>ie(e.id,t),children:[(0,F.jsx)(`span`,{className:`dashboard-board-card-title`,children:e.title}),e.summary?(0,F.jsx)(`span`,{className:`dashboard-board-card-summary`,title:e.summary,children:e.summary}):null,(0,F.jsx)(`div`,{className:`dashboard-board-card-instance-slot`,"data-empty":t?`false`:`true`,children:t?(0,F.jsxs)(`div`,{className:`dashboard-board-card-instance`,"data-state":t.state,draggable:!0,onDragStart:e=>{e.stopPropagation(),e.dataTransfer.effectAllowed=`copy`,e.dataTransfer.setData(Vm,Um(t))},title:t.activity?`${t.label} — ${t.activity}`:t.label,children:[(0,F.jsxs)(`span`,{className:`dashboard-board-card-instance-port`,children:[`:`,t.port]}),(0,F.jsx)(`span`,{className:`dashboard-board-card-instance-label`,children:t.label}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-card-instance-detach`,onClick:()=>void ne(e.id),"aria-label":`Detach :${t.port} from card`,title:`Detach instance`,children:`-`}),t.activity?(0,F.jsx)(`span`,{className:`dashboard-board-card-instance-activity`,title:t.activity,children:t.activity}):null]}):(0,F.jsx)(`span`,{className:`dashboard-board-card-instance-empty`,children:`Drop a running instance here`})}),e.persisted?(0,F.jsxs)(`span`,{className:`dashboard-board-card-actions`,"data-open":l===e.id?`true`:`false`,children:[(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-card-action`,onMouseDown:e=>e.stopPropagation(),onClick:()=>g(e.id),"aria-label":`Open card details`,title:`Open`,children:(0,F.jsx)(ih,{kind:`open`})}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-card-action`,onMouseDown:e=>e.stopPropagation(),onClick:()=>u(t=>t===e.id?null:e.id),"aria-haspopup":`menu`,"aria-expanded":l===e.id,"aria-label":`Move card`,title:`Move`,children:(0,F.jsx)(ih,{kind:`move`})}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-card-action`,"data-danger":`true`,onClick:()=>void ee(e.id),"aria-label":`Delete card`,title:`Delete`,children:(0,F.jsx)(ih,{kind:`delete`})}),l===e.id&&(0,F.jsx)(`div`,{ref:y,className:`dashboard-board-popover`,role:`menu`,children:Gm.map(t=>(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-board-popover-item${t.id===e.lane?` is-current`:``}`,role:`menuitem`,disabled:t.id===e.lane,onClick:()=>void S(e.id,t.id),children:[t.label,t.id===e.lane?` ✓`:``]},t.id))})]}):null]},e.id)}),h>0?(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-board-done-more`,onClick:()=>e.onViewChange({kind:`lane`,lane:`done`}),children:[(0,F.jsxs)(`span`,{children:[`+ `,h,` more done`]}),(0,F.jsx)(`small`,{children:`Open archive`})]})}):null]}),(0,F.jsx)(`div`,{className:`dashboard-board-lane-add`,children:_?(0,F.jsxs)(`form`,{className:`dashboard-board-add-composer`,onSubmit:e=>{e.preventDefault(),x(t.id)},children:[(0,F.jsx)(`input`,{autoFocus:!0,type:`text`,value:a,onChange:e=>o(e.target.value),placeholder:`New ${t.label} task`,disabled:s,"aria-label":`New task for ${t.label}`,onKeyDown:e=>{e.key===`Escape`&&(i(null),o(``))}}),(0,F.jsx)(`button`,{type:`submit`,disabled:s||!a.trim(),children:`Add`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{i(null),o(``)},"aria-label":`Cancel`,children:`×`})]}):(0,F.jsx)(`button`,{type:`button`,className:`dashboard-board-add-trigger`,onClick:()=>{i(t.id),o(``)},children:`+ Add task`})})]},t.id)})}):(0,F.jsx)(Jm,{lane:le,cards:ae.filter(e=>e.lane===le),runningChipByPort:ce,onBackToOverall:()=>e.onViewChange({kind:`overall`}),onOpenCard:g}),(0,F.jsx)(nh,{card:oe,busy:_,onClose:()=>g(null),onSave:te})]})}var dh=[{id:`today`,label:`Today`},{id:`upcoming`,label:`Upcoming`},{id:`recurring`,label:`Recurring`},{id:`blocked`,label:`Blocked`}];function fh(e){return(0,F.jsxs)(`nav`,{className:`dashboard-schedule-sidebar`,"aria-label":`Schedule groups`,children:[(0,F.jsx)(`header`,{className:`dashboard-schedule-sidebar-header`,children:(0,F.jsx)(`span`,{className:`dashboard-schedule-sidebar-title`,children:`Schedule`})}),(0,F.jsx)(`ul`,{className:`dashboard-schedule-sidebar-list`,children:dh.map(t=>(0,F.jsx)(`li`,{children:(0,F.jsx)(`button`,{type:`button`,className:`dashboard-schedule-sidebar-item${e.activeGroup===t.id?` is-active`:``}`,onClick:()=>e.onGroupChange(t.id),"aria-pressed":e.activeGroup===t.id,children:(0,F.jsx)(`span`,{children:t.label})})},t.id))})]})}var ph=`/api/dashboard/schedule`;async function mh(e){if(!e.ok){let t=await e.text().catch(()=>``);throw Error(`${e.status} ${t||e.statusText}`)}return await e.json()}async function hh(){let e=await mh(await fetch(`${ph}/work`,{credentials:`same-origin`}));return Array.isArray(e.items)?e.items:[]}async function gh(e){return(await mh(await fetch(`${ph}/work`,{method:`POST`,headers:{"content-type":`application/json`},credentials:`same-origin`,body:JSON.stringify(e)}))).item}async function _h(e,t){return(await mh(await fetch(`${ph}/work/${encodeURIComponent(e)}`,{method:`PATCH`,headers:{"content-type":`application/json`},credentials:`same-origin`,body:JSON.stringify(t)}))).item}async function vh(e){await mh(await fetch(`${ph}/work/${encodeURIComponent(e)}`,{method:`DELETE`,credentials:`same-origin`}))}async function yh(e,t=[]){let n=await mh(await fetch(`${ph}/work/${encodeURIComponent(e)}/dispatch`,{method:`POST`,headers:{"content-type":`application/json`},credentials:`same-origin`,body:JSON.stringify({busyPorts:t})}));return{result:n.result,item:n.item}}async function bh(){try{let e=await fetch(`/api/heartbeat`,{credentials:`same-origin`});if(!e.ok)return[];let t=await e.json();return Array.isArray(t.jobs)?t.jobs:[]}catch{return[]}}function xh(e){return e.cron?`cron ${e.cron}`:e.runAt?`at ${e.runAt}`:e.enabled?`manual`:`disabled`}function Sh(e){let[t,n]=(0,P.useState)([]),[r,i]=(0,P.useState)([]),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(``),[d,f]=(0,P.useState)(!1),[p,m]=(0,P.useState)({}),[h,g]=(0,P.useState)(null),_=(0,P.useRef)(null),v=(0,P.useCallback)(async()=>{try{i(await hh())}catch{}},[]);(0,P.useEffect)(()=>{if(!e.active)return;let t=!1;return Promise.all([bh(),hh().catch(()=>[])]).then(([e,r])=>{t||(n(e),i(r),o(!0))}),()=>{t=!0}},[e.active]),(0,P.useEffect)(()=>{if(!h)return;let e=e=>{_.current&&(_.current.contains(e.target)||g(null))};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[h]);let y=(0,P.useCallback)(async e=>{let t=l.trim();if(!(!t||d)){f(!0);try{await gh({title:t,group:e}),u(``),c(null),await v()}catch{}finally{f(!1)}}},[l,d,v]),b=(0,P.useCallback)(async(e,t)=>{g(null);try{await _h(e,{group:t}),await v()}catch{}},[v]),x=(0,P.useCallback)(async e=>{try{await vh(e),await v()}catch{}},[v]),S=(0,P.useCallback)(async t=>{try{let n=e.busyPorts,{result:r}=await yh(t,Array.isArray(n)?n:n?Array.from(n):[]);m(e=>({...e,[t]:r})),await v()}catch{}},[e.busyPorts,v]);return(0,F.jsxs)(`section`,{className:`dashboard-schedule-workspace`,"aria-hidden":!e.active,children:[(0,F.jsxs)(`header`,{className:`dashboard-schedule-workspace-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{children:`Automations`}),(0,F.jsx)(`p`,{className:`dashboard-schedule-workspace-subtitle`,children:`Manager-owned scheduled work. The dashboard ticks once a minute and dispatches due items.`})]}),(0,F.jsx)(ei,{topic:`schedule`,label:`Open Automations help`,onOpen:e.onOpenHelpTopic}),t.length>0?(0,F.jsxs)(`p`,{className:`dashboard-schedule-legacy-notice`,role:`note`,children:[`⚠️ `,t.length,` legacy heartbeat job(s) detected in this instance's `,(0,F.jsx)(`code`,{children:`heartbeat.json`}),`. They are no longer auto-fired by the manager — migrate them into Automations.`]}):null]}),(0,F.jsx)(`div`,{className:`dashboard-schedule-groups`,children:dh.map(t=>{let n=r.filter(e=>e.group===t.id).filter(e=>e.enabled),i=n.length,o=s===t.id;return(0,F.jsxs)(`div`,{className:`dashboard-schedule-group${e.activeGroup===t.id?` is-focused`:``}`,children:[(0,F.jsxs)(`header`,{className:`dashboard-schedule-group-header`,children:[(0,F.jsx)(`span`,{className:`dashboard-schedule-group-title`,children:t.label}),(0,F.jsx)(`span`,{className:`dashboard-schedule-group-count`,children:i})]}),(0,F.jsx)(`ul`,{className:`dashboard-schedule-items`,children:a?i===0?(0,F.jsx)(`li`,{className:`dashboard-schedule-empty`,children:`No items`}):(0,F.jsx)(F.Fragment,{children:n.map(e=>{let t=p[e.id],n=e.lastRunAt?`last ${e.lastRunAt.slice(11,16)}`:null,r=e.lastStatus||null;return(0,F.jsxs)(`li`,{className:`dashboard-schedule-item`,"data-persisted":`true`,"data-dispatch-status":t?.status||``,children:[(0,F.jsx)(`span`,{className:`dashboard-schedule-item-name`,children:e.title}),(0,F.jsxs)(`span`,{className:`dashboard-schedule-item-meta`,children:[xh(e),` • saved`,e.targetPort==null?``:` • :${e.targetPort}`,n?` • ${n}`:``,r?` • ${r}`:``,t?` • ${t.status}`:``]}),(0,F.jsxs)(`span`,{className:`dashboard-schedule-item-actions`,"data-open":h===e.id?`true`:`false`,children:[(0,F.jsx)(`button`,{type:`button`,className:`dashboard-schedule-run-now`,onClick:()=>void S(e.id),"aria-label":`Run now`,title:`Dispatch to target instance (queued if busy)`,children:`Run`}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-schedule-item-action`,onMouseDown:e=>e.stopPropagation(),onClick:()=>g(t=>t===e.id?null:e.id),"aria-haspopup":`menu`,"aria-expanded":h===e.id,"aria-label":`Move scheduled work`,children:`Move`}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-schedule-item-action`,"data-danger":`true`,onClick:()=>void x(e.id),"aria-label":`Delete`,children:`Delete`}),h===e.id&&(0,F.jsx)(`div`,{ref:_,className:`dashboard-schedule-popover`,role:`menu`,children:dh.map(t=>(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-schedule-popover-item${t.id===e.group?` is-current`:``}`,role:`menuitem`,disabled:t.id===e.group,onClick:()=>void b(e.id,t.id),children:[t.label,t.id===e.group?` ✓`:``]},t.id))})]})]},e.id)})}):(0,F.jsx)(`li`,{className:`dashboard-schedule-empty`,children:`Loading…`})}),(0,F.jsx)(`div`,{className:`dashboard-schedule-group-add`,children:o?(0,F.jsxs)(`form`,{className:`dashboard-schedule-add-composer`,onSubmit:e=>{e.preventDefault(),y(t.id)},children:[(0,F.jsx)(`input`,{autoFocus:!0,type:`text`,value:l,onChange:e=>u(e.target.value),placeholder:`New ${t.label} item`,disabled:d,"aria-label":`New scheduled work for ${t.label}`,onKeyDown:e=>{e.key===`Escape`&&(c(null),u(``))}}),(0,F.jsx)(`button`,{type:`submit`,disabled:d||!l.trim(),children:`Add`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>{c(null),u(``)},"aria-label":`Cancel`,children:`×`})]}):(0,F.jsx)(`button`,{type:`button`,className:`dashboard-schedule-add-trigger`,onClick:()=>{c(t.id),u(``)},children:`+ Add scheduled work`})})]},t.id)})})]})}var Ch=1e3;function wh(e,t){return Eh(e)-Eh(t)||kh(e)-kh(t)||Dh(e)-Dh(t)||Oh(e)-Oh(t)||Date.parse(e.sourceCreatedAt)-Date.parse(t.sourceCreatedAt)}function Th(e,t){let n=e?.manualRank??null,r=t?.manualRank??null;return n===null&&r===null?Ch:n===null&&r!==null?r-Ch:n!==null&&r===null?n+Ch:n!==null&&r!==null?(n+r)/2:Ch}function Eh(e){return e.status===`focused`?0:1}function Dh(e){return e.manualRank??2**53-1}function Oh(e){let t=[e.remindAt,e.dueAt].filter(e=>!!e).map(e=>Date.parse(e)).filter(e=>Number.isFinite(e));return t.length>0?Math.min(...t):2**53-1}function kh(e){return e.priority===`high`?0:e.priority===`normal`?1:2}var Ah=[{id:`urgentImportant`,title:`Important and Urgent`,tone:`red`},{id:`important`,title:`Important, Not Urgent`,tone:`green`},{id:`waiting`,title:`Waiting / Delegated`,tone:`amber`},{id:`later`,title:`Later`,tone:`blue`}],jh={urgentImportant:{listId:`today`,status:`open`,priority:`high`},important:{listId:`today`,status:`open`,priority:`normal`},waiting:{listId:`waiting`,status:`waiting`,priority:`normal`},later:{listId:`later`,status:`open`,priority:`low`}};function Mh(e){return jh[e]}function Nh(e){return e.status===`done`?null:e.status===`focused`?`urgentImportant`:e.status===`waiting`?`waiting`:e.listId===`later`||e.priority===`low`?`later`:e.priority===`high`?`urgentImportant`:`important`}function Ph(e,t){return t.filter(t=>Nh(t)===e).sort(wh)}function Fh(e,t){return e===`matrix`?t.filter(e=>e.status!==`done`).sort(wh):e===`done`?t.filter(e=>e.status===`done`).sort(wh):e===`focused`?Ph(`urgentImportant`,t):e===`important`?Ph(`important`,t):e===`waiting`?Ph(`waiting`,t):e===`later`?Ph(`later`,t):t.filter(e=>e.status!==`done`).sort(wh)}function Ih(e,t){return Fh(e,t).length}function Lh(e,t=3){return e.filter(e=>e.status!==`done`).sort(wh).slice(0,t)}var Rh=`application/x-jaw-dashboard-reminder`;function zh(e){return Array.from(e.dataTransfer.types).includes(Rh)}function Bh(e){let[t,n]=(0,P.useState)(null),[r,i]=(0,P.useState)(null);function a(e,t){if(t.target instanceof HTMLElement&&t.target.closest(`input, textarea, button, [data-reminder-inline-edit="true"]`)){t.preventDefault();return}t.dataTransfer.effectAllowed=`move`,t.dataTransfer.setData(Rh,e.id),n(e.id)}function o(e,t){zh(t)&&(t.preventDefault(),t.dataTransfer.dropEffect=`move`,i(e))}function s(){i(null)}function c(t,r){if(!zh(r))return;r.preventDefault();let a=r.dataTransfer.getData(Rh);n(null),i(null),a&&e(a,t)}function l(){n(null),i(null)}return{draggedId:t,dropTarget:r,start:a,over:o,leave:s,drop:c,end:l}}var Vh=[{id:`matrix`,label:`Matrix`,detail:`Priority board`},{id:`focused`,label:`Focus`,detail:`Current item`},{id:`important`,label:`Important`,detail:`Not urgent`},{id:`waiting`,label:`Waiting`,detail:`Delegated`},{id:`later`,label:`Later`,detail:`Low urgency`},{id:`done`,label:`Done`,detail:`Completed items`}];function Hh(e,t){return!!(e&&e.kind===t.kind&&e.beforeId===t.beforeId&&e.afterId===t.afterId)}function Uh(e){return e.length>0?e[e.length-1]??null:null}function Wh(e,t){return{kind:`priority`,beforeId:e[t-1]?.id??null,afterId:e[t]?.id??null}}function Gh(e){return{kind:`priority`,beforeId:Uh(e)?.id??null,afterId:null}}function Kh(e,t,n){let r=e.filter(e=>e.id!==t),i=n.beforeId?r.find(e=>e.id===n.beforeId)??null:null,a=n.afterId?r.find(e=>e.id===n.afterId)??null:null;return i||a?{previous:i,next:a}:n.beforeId&&!n.afterId?{previous:Uh(r),next:null}:!n.beforeId&&n.afterId?{previous:null,next:r[0]??null}:{previous:Uh(r),next:null}}function qh(e){let t=Gh(e.items),n=(t,n)=>e.drag.over(t,n),r=(t,n)=>e.drag.drop(t,n);return(0,F.jsxs)(`section`,{className:`dashboard-reminders-sidebar-priority`,"data-drop-target":e.drag.dropTarget?.kind===`priority`?`true`:`false`,onDragOver:e=>n(t,e),onDragLeave:e.drag.leave,onDrop:e=>r(t,e),children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`span`,{children:`Priority Order`}),(0,F.jsx)(`small`,{children:`drag to rank`})]}),(0,F.jsxs)(`ol`,{children:[e.items.map((t,i)=>{let a=Wh(e.items,i);return(0,F.jsxs)(`li`,{draggable:!e.loading&&t.status!==`done`,"data-drop-target":Hh(e.drag.dropTarget,a)?`true`:void 0,"data-reminder-drop-before-id":a.beforeId??void 0,"data-reminder-drop-after-id":a.afterId??void 0,onDragStart:n=>e.drag.start(t,n),onDragEnd:e.drag.end,onDragOver:e=>{e.stopPropagation(),n(a,e)},onDragLeave:t=>{t.stopPropagation(),e.drag.leave()},onDrop:e=>{e.stopPropagation(),r(a,e)},children:[(0,F.jsx)(`span`,{className:`dashboard-reminders-sidebar-priority-index`,children:i+1}),(0,F.jsxs)(`span`,{children:[(0,F.jsx)(`b`,{children:t.title}),(0,F.jsxs)(`small`,{children:[t.status,` • `,t.priority]})]})]},t.id)}),e.items.length===0?(0,F.jsx)(`li`,{className:`dashboard-reminders-sidebar-priority-empty`,children:`No open reminders`}):null]})]})}function Jh(e){let t=e.items.filter(e=>e.status!==`done`).length,n=Lh(e.items,5),r=Bh((t,n)=>{if(n.kind!==`priority`)return;let{previous:r,next:i}=Kh(Lh(e.items,e.items.length),t,n);e.onUpdate(t,{manualRank:Th(r,i)})});return(0,F.jsxs)(`nav`,{className:`dashboard-reminders-sidebar`,"aria-label":`Reminders views`,children:[(0,F.jsxs)(`header`,{className:`dashboard-reminders-sidebar-header`,children:[(0,F.jsx)(`span`,{className:`dashboard-reminders-sidebar-title`,children:`Reminders`}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-reminders-refresh`,onClick:e.onRefresh,disabled:e.loading,children:e.loading?`Loading`:`Refresh`})]}),(0,F.jsxs)(`div`,{className:`dashboard-reminders-source`,"data-state":`ok`,children:[t,` open / `,e.items.length,` total`]}),(0,F.jsx)(qh,{items:n,loading:e.loading,drag:r}),(0,F.jsx)(`ul`,{className:`dashboard-reminders-sidebar-list`,children:Vh.map(t=>(0,F.jsx)(`li`,{children:(0,F.jsxs)(`button`,{type:`button`,className:`dashboard-reminders-sidebar-item${e.view===t.id?` is-active`:``}`,onClick:()=>e.onViewChange(t.id),"aria-pressed":e.view===t.id,children:[(0,F.jsx)(`span`,{children:t.label}),(0,F.jsx)(`small`,{children:t.detail}),(0,F.jsx)(`b`,{children:Ih(t.id,e.items)})]})},t.id))})]})}function Yh(e){let[t,n]=(0,P.useState)(!1),[r,i]=(0,P.useState)(e.item.title),a=(0,P.useRef)(null);(0,P.useEffect)(()=>{t||i(e.item.title)},[t,e.item.title]),(0,P.useEffect)(()=>{t&&a.current?.select()},[t]);function o(){let t=r.trim();if(n(!1),!t||t===e.item.title){i(e.item.title);return}e.onRename(e.item.id,t)}function s(){i(e.item.title),n(!1)}function c(e){e.key===`Enter`?(e.preventDefault(),o()):e.key===`Escape`&&(e.preventDefault(),s())}return t?(0,F.jsx)(`input`,{ref:a,"data-reminder-inline-edit":`true`,className:`dashboard-reminders-inline-title-input`,"aria-label":`Reminder title`,disabled:e.busy,value:r,onChange:e=>i(e.target.value),onBlur:o,onClick:e=>e.stopPropagation(),onDoubleClick:e=>e.stopPropagation(),onKeyDown:c}):(0,F.jsx)(`span`,{className:`dashboard-reminders-inline-title`,onDoubleClick:e=>{e.preventDefault(),e.stopPropagation(),n(!0)},children:e.item.title})}function Xh(e){let[t,n]=(0,P.useState)(``),[r,i]=(0,P.useState)(``),[a,o]=(0,P.useState)(``),[s,c]=(0,P.useState)(``);(0,P.useEffect)(()=>{n(e.item?.title??``),i(e.item?.notes??``),o(Zh(e.item?.dueAt??null)),c(Zh(e.item?.remindAt??null))},[e.item]),(0,P.useEffect)(()=>{if(!e.item)return;let t=t=>{t.key===`Escape`&&e.onClose()};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[e]);let l=(0,P.useMemo)(()=>e.item?t.trim()!==e.item.title||r!==e.item.notes||a!==Zh(e.item.dueAt)||s!==Zh(e.item.remindAt):!1,[a,r,e.item,s,t]);if(!e.item)return null;let u=e.item;return(0,F.jsx)(`div`,{className:`dashboard-reminder-popover-scrim`,role:`presentation`,onMouseDown:e.onClose,children:(0,F.jsx)(`section`,{className:`dashboard-reminder-popover`,role:`dialog`,"aria-modal":`true`,"aria-label":`Reminder details`,onMouseDown:e=>e.stopPropagation(),children:(0,F.jsxs)(`form`,{onSubmit:n=>{if(n.preventDefault(),!u)return;let i=t.trim();if(!i)return;let o={};if(i!==u.title&&(o.title=i),r!==u.notes&&(o.notes=r),a!==Zh(u.dueAt)&&(o.dueAt=Qh(a)),s!==Zh(u.remindAt)&&(o.remindAt=Qh(s)),Object.keys(o).length===0){e.onClose();return}e.onSave(u.id,o)},children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`span`,{children:`Reminder details`}),(0,F.jsx)(`button`,{type:`button`,"aria-label":`Close reminder details`,onClick:e.onClose,children:`×`})]}),(0,F.jsxs)(`label`,{children:[(0,F.jsx)(`span`,{children:`Title`}),(0,F.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),"aria-label":`Reminder title`})]}),(0,F.jsxs)(`label`,{children:[(0,F.jsx)(`span`,{children:`Notes`}),(0,F.jsx)(`textarea`,{value:r,onChange:e=>i(e.target.value),"aria-label":`Reminder notes`,rows:6})]}),(0,F.jsxs)(`div`,{className:`dashboard-reminder-popover-grid`,children:[(0,F.jsxs)(`label`,{children:[(0,F.jsx)(`span`,{children:`Due`}),(0,F.jsx)(`input`,{type:`datetime-local`,value:a,onChange:e=>o(e.target.value),"aria-label":`Reminder due date`})]}),(0,F.jsxs)(`label`,{children:[(0,F.jsx)(`span`,{children:`Remind`}),(0,F.jsx)(`input`,{type:`datetime-local`,value:s,onChange:e=>c(e.target.value),"aria-label":`Reminder notification date`})]})]}),(0,F.jsxs)(`footer`,{children:[(0,F.jsx)(`button`,{type:`button`,onClick:e.onClose,children:`Cancel`}),(0,F.jsx)(`button`,{type:`submit`,disabled:e.busy||!t.trim()||!l,children:`Save`})]})]})})})}function Zh(e){if(!e)return``;let t=new Date(e);if(Number.isNaN(t.getTime()))return``;let n=t.getTimezoneOffset()*6e4;return new Date(t.getTime()-n).toISOString().slice(0,16)}function Qh(e){if(!e.trim())return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.toISOString()}var $h={matrix:`Priority Matrix`,focused:`Focus`,important:`Important, Not Urgent`,waiting:`Waiting / Delegated`,later:`Later`,done:`Done`};function eg(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString([],{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function tg(e){let t=[e.status,e.priority],n=eg(e.remindAt),r=eg(e.dueAt);return r&&t.push(`due ${r}`),n&&t.push(`remind ${n}`),e.linkedInstance&&t.push(e.linkedInstance),e.notificationStatus!==`pending`&&t.push(e.notificationStatus),t.join(` • `)}function ng(e,t){return!e||e.kind!==t.kind||e.beforeId!==t.beforeId||e.afterId!==t.afterId?!1:e.kind===`bucket`&&t.kind===`bucket`?e.bucket===t.bucket:!0}function rg(e,t,n){return{kind:`bucket`,bucket:e,beforeId:t[n-1]?.id??null,afterId:t[n]?.id??null}}function ig(e,t,n){return{kind:`bucket`,bucket:e,beforeId:t[n]?.id??null,afterId:t[n+1]?.id??null}}function ag(e,t){return{kind:`bucket`,bucket:e,beforeId:dg(t)?.id??null,afterId:null}}function og(e,t){return{kind:`priority`,beforeId:e[t-1]?.id??null,afterId:e[t]?.id??null}}function sg(e,t){return{kind:`priority`,beforeId:e[t]?.id??null,afterId:e[t+1]?.id??null}}function cg(e){return{kind:`priority`,beforeId:dg(e)?.id??null,afterId:null}}function lg(e){let t=e.currentTarget.getBoundingClientRect();return e.clientY>t.top+t.height/2}function ug(e,t){return t.kind===`priority`?Lh(e,e.length):Ph(t.bucket,e)}function dg(e){return e.length>0?e[e.length-1]??null:null}function fg(e,t,n){let r=e.filter(e=>e.id!==t),i=n.beforeId?r.find(e=>e.id===n.beforeId)??null:null,a=n.afterId?r.find(e=>e.id===n.afterId)??null:null;return i||a?{previous:i,next:a}:n.beforeId&&!n.afterId?{previous:dg(r),next:null}:!n.beforeId&&n.afterId?{previous:null,next:r[0]??null}:{previous:dg(r),next:null}}function pg(e){return e.feed.error?(0,F.jsx)(`p`,{className:`dashboard-reminders-status`,"data-state":`error`,children:e.feed.error}):(0,F.jsxs)(`p`,{className:`dashboard-reminders-status`,children:[e.feed.items.length,` reminder(s) stored in the dashboard database`]})}function mg(e){let t=e.item.status===`done`,n=e.dropTarget?ng(e.activeDropTarget??null,e.dropTarget):!1;return(0,F.jsxs)(`li`,{className:`dashboard-reminders-row`,"data-priority":e.item.priority,"data-status":e.item.status,"data-drop-target":n?`true`:void 0,"data-reminder-drop-before-id":e.dropTarget?.beforeId??void 0,"data-reminder-drop-after-id":e.dropTarget?.afterId??void 0,draggable:!t&&!e.busy,onDragStart:t=>e.onDragStart?.(e.item,t),onDragEnd:e.onDragEnd,onDragOver:t=>{let n=e.resolveDropTarget?.(t)??e.dropTarget;n&&(t.stopPropagation(),e.onDragOverTarget?.(n,t))},onDragLeave:t=>{e.dropTarget&&(t.stopPropagation(),e.onDragLeaveTarget?.())},onDrop:t=>{let n=e.resolveDropTarget?.(t)??e.dropTarget;n&&(t.stopPropagation(),e.onDropTarget?.(n,t))},children:[(0,F.jsx)(`button`,{type:`button`,className:`dashboard-reminders-row-check`,"aria-label":t?`Mark open`:`Mark done`,onClick:()=>e.onToggleDone(e.item),children:t?`✓`:``}),(0,F.jsxs)(`span`,{className:`dashboard-reminders-row-content`,children:[(0,F.jsx)(Yh,{item:e.item,busy:e.busy,onRename:e.onRename}),(0,F.jsx)(`small`,{children:tg(e.item)})]}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-reminders-row-more`,"aria-label":`Open reminder details`,onClick:()=>e.onOpenDetails(e.item),children:`•••`}),e.item.priority===`high`?(0,F.jsx)(`span`,{className:`dashboard-reminders-row-flag`,"aria-label":`high priority`,children:`!`}):null]})}function hg(e){let[t,n]=(0,P.useState)(``);return(0,F.jsxs)(`li`,{className:`dashboard-reminders-create-row`,children:[(0,F.jsx)(`span`,{"aria-hidden":`true`}),(0,F.jsx)(`form`,{onSubmit:r=>{r.preventDefault();let i=t.trim();i&&(e.onCreate({title:i,...jh[e.bucket]}),n(``))},children:(0,F.jsx)(`input`,{"aria-label":`Create ${e.bucket} reminder`,placeholder:`New reminder`,value:t,onChange:e=>n(e.target.value)})})]})}function gg(e){let t=ag(e.section.id,e.items);return(0,F.jsxs)(`section`,{className:`dashboard-reminders-quadrant`,"data-tone":e.section.tone,"data-drop-target":e.dropTarget?.kind===`bucket`&&e.dropTarget.bucket===e.section.id?`true`:`false`,onDragOver:n=>e.onDragOver(t,n),onDragLeave:e.onDragLeave,onDrop:n=>e.onDrop(t,n),children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`h3`,{children:e.section.title}),(0,F.jsx)(`span`,{children:e.items.length})]}),(0,F.jsxs)(`ul`,{children:[e.items.map((t,n)=>{let r=rg(e.section.id,e.items,n);return(0,F.jsx)(mg,{item:t,busy:e.busy,onToggleDone:e.onToggleDone,onRename:e.onRename,onOpenDetails:e.onOpenDetails,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,dropTarget:r,resolveDropTarget:t=>lg(t)?ig(e.section.id,e.items,n):r,activeDropTarget:e.dropTarget,onDragOverTarget:e.onDragOver,onDragLeaveTarget:e.onDragLeave,onDropTarget:e.onDrop},t.id)}),(0,F.jsx)(hg,{bucket:e.section.id,onCreate:e.onCreate}),e.items.length===0?(0,F.jsx)(`li`,{className:`dashboard-reminders-empty-row`,children:`No reminders`}):null]})]})}function _g(e){return(0,F.jsxs)(`div`,{className:`dashboard-reminders-matrix-wrap`,children:[(0,F.jsx)(`span`,{className:`dashboard-reminders-axis dashboard-reminders-axis-importance`,children:`Importance`}),(0,F.jsx)(`span`,{className:`dashboard-reminders-axis dashboard-reminders-axis-urgency`,children:`Urgency`}),(0,F.jsx)(`div`,{className:`dashboard-reminders-matrix-board`,children:Ah.map(t=>(0,F.jsx)(gg,{section:t,items:Ph(t.id,e.items),busy:e.busy,dropTarget:e.dropTarget,onCreate:e.onCreate,onToggleDone:e.onToggleDone,onRename:e.onRename,onOpenDetails:e.onOpenDetails,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragOver:e.onDragOver,onDragLeave:e.onDragLeave,onDrop:e.onDrop},t.id))})]})}function vg(e){let t=cg(e.items);return(0,F.jsxs)(`section`,{className:`dashboard-reminders-top-priority`,"aria-label":`Top priority reminders`,"data-drop-target":e.dropTarget?.kind===`priority`?`true`:`false`,onDragOver:n=>e.onDragOver(t,n),onDragLeave:e.onDragLeave,onDrop:n=>e.onDrop(t,n),children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`span`,{children:`Top Priority 3`}),(0,F.jsxs)(`small`,{children:[e.items.length,`/3`]})]}),(0,F.jsxs)(`ol`,{children:[e.items.map((t,n)=>{let r=og(e.items,n);return(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`span`,{className:`dashboard-reminders-top-index`,children:n+1}),(0,F.jsx)(mg,{item:t,busy:e.busy,onToggleDone:e.onToggleDone,onRename:e.onRename,onOpenDetails:e.onOpenDetails,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,dropTarget:r,resolveDropTarget:t=>lg(t)?sg(e.items,n):r,activeDropTarget:e.dropTarget,onDragOverTarget:e.onDragOver,onDragLeaveTarget:e.onDragLeave,onDropTarget:e.onDrop})]},t.id)}),e.items.length===0?(0,F.jsx)(`li`,{className:`dashboard-reminders-top-empty`,children:`No top priority reminders`}):null]})]})}function yg(e){return(0,F.jsxs)(`div`,{className:`dashboard-reminders-smart-list`,"aria-busy":e.loading,children:[(0,F.jsxs)(`header`,{children:[(0,F.jsx)(`h3`,{children:e.title}),(0,F.jsx)(`span`,{children:e.items.length})]}),(0,F.jsx)(`ul`,{children:e.loading&&e.items.length===0?(0,F.jsx)(`li`,{className:`dashboard-reminders-empty-row`,children:`Loading reminders...`}):e.items.length===0?(0,F.jsx)(`li`,{className:`dashboard-reminders-empty-row`,children:`No reminders`}):e.items.map(t=>(0,F.jsx)(mg,{item:t,busy:e.loading,onToggleDone:e.onToggleDone,onRename:e.onRename,onOpenDetails:e.onOpenDetails,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd},t.id))})]})}function bg(e){let[t,n]=(0,P.useState)(null),r=Fh(e.view,e.feed.items),i=$h[e.view],a=Lh(e.feed.items,3),o=Bh((t,n)=>{let r=e.feed.items.find(e=>e.id===t);if(!r)return;let{previous:i,next:a}=fg(ug(e.feed.items,n),t,n),o=Th(i,a);if(n.kind===`priority`){e.onUpdate(t,{manualRank:o});return}let s=Nh(r)===n.bucket?{}:Mh(n.bucket);e.onUpdate(t,{...s,manualRank:o})}),s=t=>{e.onUpdate(t.id,{status:t.status===`done`?`open`:`done`})},c=(t,n)=>{e.onUpdate(t,{title:n})};return(0,F.jsxs)(`section`,{className:`dashboard-reminders-workspace`,"aria-hidden":!e.active,children:[(0,F.jsxs)(`header`,{className:`dashboard-reminders-workspace-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`h2`,{children:i}),(0,F.jsx)(pg,{feed:e.feed})]}),(0,F.jsxs)(`div`,{className:`dashboard-reminders-workspace-actions`,children:[(0,F.jsx)(ei,{topic:`reminders`,label:`Open Reminders help`,onOpen:e.onOpenHelpTopic}),(0,F.jsx)(`button`,{type:`button`,className:`dashboard-reminders-sync-button`,onClick:e.onRefresh,disabled:e.feed.loading,children:e.feed.loading?`Loading...`:`Refresh`})]})]}),e.view===`matrix`?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(vg,{items:a,busy:e.feed.loading,dropTarget:o.dropTarget,onToggleDone:s,onRename:c,onOpenDetails:n,onDragStart:o.start,onDragEnd:o.end,onDragOver:o.over,onDragLeave:o.leave,onDrop:o.drop}),(0,F.jsx)(_g,{items:r,busy:e.feed.loading,dropTarget:o.dropTarget,onCreate:e.onCreate,onToggleDone:s,onRename:c,onOpenDetails:n,onDragStart:o.start,onDragEnd:o.end,onDragOver:o.over,onDragLeave:o.leave,onDrop:o.drop})]}):(0,F.jsx)(yg,{title:i,items:r,loading:e.feed.loading,onToggleDone:s,onRename:c,onOpenDetails:n,onDragStart:o.start,onDragEnd:o.end}),(0,F.jsx)(Xh,{item:t,busy:e.feed.loading,onClose:()=>n(null),onSave:(t,r)=>{e.onUpdate(t,r),n(null)}})]})}var xg=`/api/dashboard/reminders`;async function Sg(e){if(!e.ok){let t=await e.text().catch(()=>``);throw Error(`${e.status} ${t||e.statusText}`)}if(!(e.headers.get(`content-type`)||``).includes(`application/json`))throw Error(`Reminders API is not available in the running dashboard server. Rebuild and restart the dashboard backend to enable sync.`);return await e.json()}function Cg(e){return{...e,notes:e.notes??``,manualRank:typeof e.manualRank==`number`&&Number.isFinite(e.manualRank)?e.manualRank:null,dueAt:e.dueAt??null,remindAt:e.remindAt??null,linkedInstance:e.linkedInstance??null,subtasks:Array.isArray(e.subtasks)?e.subtasks:[],notificationAttemptedAt:e.notificationAttemptedAt??null,notificationError:e.notificationError??null,instanceId:e.instanceId??null,messageId:e.messageId??null,turnIndex:e.turnIndex??null,port:e.port??null,threadKey:e.threadKey??null,sourceText:e.sourceText??null}}function wg(e,t){if(`manualRank`in e&&!Object.hasOwn(t,`manualRank`))throw Error(`Manual reminder ordering requires the dashboard backend to be rebuilt and restarted.`)}async function Tg(){let e=await Sg(await fetch(xg,{credentials:`same-origin`,cache:`no-store`}));return{...e,items:Array.isArray(e.items)?e.items.map(Cg):[]}}async function Eg(e){return Cg((await Sg(await fetch(xg,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`},body:JSON.stringify(e)}))).item)}async function Dg(e,t){let n=await Sg(await fetch(`${xg}/${encodeURIComponent(e)}`,{method:`PATCH`,credentials:`same-origin`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}));return wg(t,n.item),Cg(n.item)}function Og(e){let[t,n]=(0,P.useState)([]),[r,i]=(0,P.useState)(!1),[a,o]=(0,P.useState)(null),s=(0,P.useCallback)(async()=>{i(!0),o(null);try{n((await Tg()).items||[])}catch(e){o(e.message)}finally{i(!1)}},[]),c=(0,P.useCallback)(async()=>{await s()},[s]),l=(0,P.useCallback)(async e=>{o(null);try{let t=await Eg(e);n(e=>[t,...e.filter(e=>e.id!==t.id)])}catch(e){o(e.message)}},[]),u=(0,P.useCallback)(async(e,t)=>{o(null);try{let r=await Dg(e,t);n(t=>t.map(t=>t.id===e?r:t))}catch(e){o(e.message)}},[]);return(0,P.useEffect)(()=>{e.active&&s()},[e.active,s]),{items:t,loading:r,error:a,refresh:c,create:l,update:u}}function kg(e){return(0,F.jsx)(`section`,{className:`workspace-surface${e.active?` is-active`:``}`,hidden:!e.active,"aria-hidden":!e.active,children:e.children})}function Ag(e){let[t,n]=(0,P.useState)(`matrix`),r=Og({active:e.sidebarMode===`reminders`}),i=!!(e.notesModel.tagFilter&&e.notesSelectedPath&&e.notesSelectedNote&&!e.notesSelectedNote.tags?.includes(e.notesModel.tagFilter));return(0,F.jsxs)(F.Fragment,{children:[e.jawCeoVoiceOverlay,(0,F.jsx)(Hr,{sidebarCollapsed:e.sidebarCollapsed,inspectorCollapsed:e.activityDockCollapsed,inspectorHeight:e.activityDockCollapsed?48:e.activityDockHeight,drawerOpen:e.drawerOpen,onCloseDrawer:e.onCloseDrawer,navigator:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Rr,{onlineCount:e.onlineCount,collapsed:e.sidebarCollapsed,mode:e.sidebarMode,scheduleWorkspaceEnabled:e.scheduleWorkspaceEnabled,remindersWorkspaceEnabled:e.remindersWorkspaceEnabled,onModeChange:e.onSidebarModeChange,onToggleSidebar:e.onToggleSidebar,helpOpen:e.helpOpen,onToggleHelp:e.onToggleHelp}),(0,F.jsx)(`div`,{id:`manager-sidebar-list`,className:`manager-sidebar-list`,children:e.sidebarMode===`settings`?(0,F.jsx)($r,{activeSection:e.settingsSection,locale:e.locale,onSectionChange:e.onSettingsSectionChange}):e.sidebarMode===`notes`?(0,F.jsx)(Ki,{tree:e.notesModel.filteredTree,loading:e.notesModel.loading,error:e.notesModel.error,notesRoot:e.notesModel.notesRoot,selectedPath:e.notesSelectedPath,dirtyPath:e.notesDirtyPath,treeWidth:e.notesTreeWidth,mode:e.notesSidebarMode,searchFocusToken:e.notesSearchFocusToken,tagFilter:e.notesModel.tagFilter,selectedHiddenByFilter:i,onModeChange:e.onNotesSidebarModeChange,onOpenSearch:e.onOpenNotesSearch,onSelectedPathChange:e.onNotesSelectedPathChange,onRefreshTree:e.notesModel.refresh,onClearTagFilter:()=>e.notesModel.setTagFilter(null)}):e.sidebarMode===`board`?(0,F.jsx)(Km,{view:e.boardView,onViewChange:e.onBoardViewChange,instances:e.instances,titlesByPort:e.titlesByPort,busyPorts:e.busyPorts}):e.scheduleWorkspaceEnabled&&e.sidebarMode===`schedule`?(0,F.jsx)(fh,{activeGroup:e.scheduleGroup,onGroupChange:e.onScheduleGroupChange}):e.remindersWorkspaceEnabled&&e.sidebarMode===`reminders`?(0,F.jsx)(Jh,{view:t,onViewChange:n,items:r.items,loading:r.loading,onRefresh:()=>void r.refresh(),onUpdate:(e,t)=>void r.update(e,t)}):(0,F.jsx)(Or,{active:e.selectedInstance,hiddenCount:e.instances.filter(e=>e.hidden).length,collapsed:e.sidebarCollapsed,children:e.instanceListContent})})]}),workbench:(0,F.jsxs)(`div`,{className:`workspace-surface-stack`,children:[e.lifecycleMessage&&(0,F.jsxs)(`section`,{className:`state lifecycle-state`,role:`status`,children:[(0,F.jsx)(`span`,{children:e.lifecycleMessage}),(0,F.jsx)(`button`,{type:`button`,className:`state-dismiss`,"aria-label":`Dismiss lifecycle message`,onClick:e.onDismissLifecycleMessage,children:`X`})]}),(0,F.jsxs)(`div`,{className:`workspace-surface-layer`,children:[(0,F.jsx)(kg,{active:e.sidebarMode===`instances`,children:(0,F.jsx)(Vr,{mode:e.activeDetailTab,onModeChange:e.onDetailTabChange,header:e.workbenchHeader,modeActions:e.jawCeoWorkbenchButton,overview:e.detailContent(`overview`),preview:(0,F.jsx)(Xr,{instance:e.selectedInstance,data:e.data,enabled:e.previewEnabled,active:e.sidebarMode===`instances`&&e.activeDetailTab===`preview`,refreshKey:e.previewRefreshKey,theme:e.previewTheme}),logs:e.detailContent(`logs`),settings:e.detailContent(`settings`)})}),(0,F.jsx)(kg,{active:e.sidebarMode===`notes`,children:(0,F.jsx)(Bm,{active:e.sidebarMode===`notes`,selectedPath:e.notesSelectedPath,selectedNote:e.notesSelectedNote,vaultIndex:e.notesModel.index,viewMode:e.notesViewMode,authoringMode:e.notesAuthoringMode,wordWrap:e.notesWordWrap,treeWidth:e.notesTreeWidth,tagFilter:e.notesModel.tagFilter,onOpenSidebarSearch:e.onOpenNotesSearch,onSelectedPathChange:e.onNotesSelectedPathChange,onDirtyPathChange:e.onNotesDirtyPathChange,onViewModeChange:e.onNotesViewModeChange,onAuthoringModeChange:e.onNotesAuthoringModeChange,onWordWrapChange:e.onNotesWordWrapChange,onTreeWidthChange:e.onNotesTreeWidthChange,onTagSelect:e.notesModel.setTagFilter,onWikiLinkNavigate:e.onNotesSelectedPathChange})}),(0,F.jsx)(kg,{active:e.sidebarMode===`settings`,children:(0,F.jsx)(di,{activeSection:e.settingsSection,ui:e.dashboardSettingsUi,titleSupport:e.titleSupport,onUiPatch:e.onDashboardSettingsPatch,onOpenHelpTopic:e.onOpenHelpTopic})}),(0,F.jsx)(kg,{active:e.sidebarMode===`board`,children:(0,F.jsx)(uh,{active:e.sidebarMode===`board`,view:e.boardView,onViewChange:e.onBoardViewChange,instances:e.instances,selectedPort:e.selectedInstance?.port??null,titlesByPort:e.titlesByPort,busyPorts:e.busyPorts,onOpenHelpTopic:e.onOpenHelpTopic})}),e.scheduleWorkspaceEnabled?(0,F.jsx)(kg,{active:e.sidebarMode===`schedule`,children:(0,F.jsx)(Sh,{active:e.sidebarMode===`schedule`,activeGroup:e.scheduleGroup,busyPorts:e.busyPorts,onOpenHelpTopic:e.onOpenHelpTopic})}):null,e.remindersWorkspaceEnabled?(0,F.jsx)(kg,{active:e.sidebarMode===`reminders`,children:(0,F.jsx)(bg,{active:e.sidebarMode===`reminders`,view:t,feed:r,onRefresh:()=>void r.refresh(),onCreate:e=>void r.create(e),onUpdate:(e,t)=>void r.update(e,t),onOpenHelpTopic:e.onOpenHelpTopic})}):null]})]}),inspector:(0,F.jsx)(Tr,{collapsed:e.activityDockCollapsed,height:e.activityDockHeight,loading:e.loading,error:e.error,lifecycleMessage:e.lifecycleMessage,selectedInstance:e.selectedInstance,registryMessage:e.registryMessage,events:e.managerEvents,onToggle:e.onToggleActivity,onHeightChange:e.onActivityHeightChange}),sidePanel:e.jawCeoConsoleContent,mobileNav:(0,F.jsx)(kr,{activeTab:e.activeDetailTab,onOpenInstances:e.onOpenDrawer,onSelectTab:e.onSelectTab,onToggleActivity:e.onToggleActivityFromMobile}),drawer:(0,F.jsx)(Dr,{open:e.drawerOpen,profileFilters:e.drawerProfileFilters,onClose:e.onCloseDrawer,children:e.instanceListContent})})]})}var jg=5e3,Mg=1572864,Ng=24,Pg=`jaw.metricsPanelCollapsed`;async function Fg(){let e=await fetch(`/api/dashboard/electron-metrics`);if(!e.ok)throw Error(`electron-metrics failed: ${e.status}`);return await e.json()}function Ig(e){return e>=1024*1024?`${(e/1024/1024).toFixed(2)} GB`:`${(e/1024).toFixed(1)} MB`}function Lg(e){return e.length>Ng?`${e.slice(0,Ng-1)}…`:e}function Rg(){if(typeof localStorage>`u`)return!1;try{return localStorage.getItem(Pg)===`true`}catch{return!1}}function zg(e){if(!(typeof localStorage>`u`))try{localStorage.setItem(Pg,e?`true`:`false`)}catch{}}function Bg(e={}){let[t,n]=(0,P.useState)(null),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(()=>Rg());if((0,P.useEffect)(()=>{zg(a)},[a]),(0,P.useEffect)(()=>{let e=!1,t=null,r=async()=>{try{let t=await Fg();if(e)return;t.available?(n(!0),i(t.snapshot)):(n(!1),i(null))}catch{e||n(!1)}e||(t=setTimeout(r,jg))};return r(),()=>{e=!0,t&&clearTimeout(t)}},[]),t!==!0)return null;if(!r)return(0,F.jsxs)(`div`,{className:`electron-metrics-panel electron-metrics-panel--empty`,"aria-label":`Electron process metrics`,children:[(0,F.jsx)(`div`,{className:`electron-metrics-header`,children:(0,F.jsx)(`span`,{className:`electron-metrics-title`,children:`Desktop metrics`})}),(0,F.jsx)(`div`,{className:`electron-metrics-empty`,children:`awaiting first sample…`})]});let s=[...r.processes].sort((e,t)=>t.rssKb-e.rssKb).slice(0,3),c=r.rssTotalKb>=Mg;return(0,F.jsxs)(`div`,{className:`electron-metrics-panel${c?` electron-metrics-panel--warn`:``}`,"aria-label":`Electron process metrics`,children:[(0,F.jsxs)(`div`,{className:`electron-metrics-header`,children:[(0,F.jsx)(`span`,{className:`electron-metrics-title`,children:`Desktop metrics`}),(0,F.jsx)(`button`,{type:`button`,className:`electron-metrics-toggle`,onClick:()=>o(e=>!e),"aria-expanded":!a,"aria-label":a?`Expand metrics panel`:`Collapse metrics panel`,children:a?`▸`:`▾`})]}),!a&&(0,F.jsxs)(`div`,{className:`electron-metrics-body`,children:[c&&(0,F.jsxs)(`div`,{className:`electron-metrics-warn`,children:[(0,F.jsxs)(`span`,{role:`alert`,children:[`Electron RSS total exceeds `,Ig(1572864),`.`]}),e.onUnloadPreview&&(0,F.jsx)(`button`,{type:`button`,className:`electron-metrics-unload-btn`,onClick:()=>e.onUnloadPreview?.(),children:`Unload preview`})]}),(0,F.jsxs)(`div`,{className:`electron-metrics-row`,children:[(0,F.jsx)(`span`,{children:`renderers`}),(0,F.jsx)(`span`,{children:r.rendererCount})]}),(0,F.jsxs)(`div`,{className:`electron-metrics-row`,children:[(0,F.jsx)(`span`,{children:`processes`}),(0,F.jsx)(`span`,{children:r.processes.length})]}),(0,F.jsxs)(`div`,{className:`electron-metrics-row`,children:[(0,F.jsx)(`span`,{children:`RSS total`}),(0,F.jsx)(`span`,{children:Ig(r.rssTotalKb)})]}),(0,F.jsx)(`div`,{className:`electron-metrics-divider`,"aria-hidden":`true`}),(0,F.jsx)(`div`,{className:`electron-metrics-subtitle`,children:`top by RSS`}),(0,F.jsx)(`ul`,{className:`electron-metrics-list`,children:s.map(e=>(0,F.jsxs)(`li`,{children:[(0,F.jsx)(`span`,{className:`electron-metrics-proc`,children:Lg(e.name?`${e.type} · ${e.name}`:e.type)}),(0,F.jsx)(`span`,{className:`electron-metrics-proc-rss`,children:Ig(e.rssKb)})]},e.pid))})]})]})}var Vg=new Set([`notes`,`instances`]);function Hg(e){let t=e;return t?.type===`dashboard.invalidate`&&Array.isArray(t.topics)&&t.topics.every(e=>Vg.has(e))}function Ug(){return(0,P.useEffect)(()=>{function e(e){Hg(e.data)&&I({...e.data,source:`iframe`})}return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[]),null}var Wg=3e4;function Gg(){let e=(0,P.useRef)(Date.now());return(0,P.useEffect)(()=>{function t(){document.visibilityState===`visible`&&(Date.now()-e.current<Wg||(e.current=Date.now(),I({topics:[`notes`,`instances`],reason:`visibility:tab-returned`,source:`visibility`})))}return document.addEventListener(`visibilitychange`,t),()=>document.removeEventListener(`visibilitychange`,t)},[]),null}function Kg(e,t){return(e.split(`/`).filter(Boolean).pop()||e).replace(/^\.?cli-jaw-(\d+)-[a-f0-9]{7,}$/i,`cli-jaw $1`).replace(/^\.?cli-jaw-(\d+)$/i,`cli-jaw $1`)||`cli-jaw ${t}`}function qg(e){if(e.label)return e.label;let t=e.instanceId||e.homeDisplay||``;return Kg(t.split(`/`).filter(Boolean).pop()||t,e.port)}function Jg(e){if(e==null)return`n/a`;let t=Math.floor(e/60);if(t<1)return`${Math.round(e)}s`;let n=Math.floor(t/60);return n<1?`${t}m`:`${n}h ${t%60}m`}var Yg=new Set([`schedule`]),Xg={BASE_URL:`/dist/`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1}.VITE_CLI_JAW_EXPERIMENTAL_DASHBOARD===`1`;function Zg(e){return Yg.has(e)}function Qg(e){return e===`schedule`&&Xg||e===`reminders`?e:Zg(e)?`instances`:e}function $g(e){return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(Ug,{}),(0,F.jsx)(Gg,{}),(0,F.jsx)(Gn,{sidebarCollapsed:e.view.sidebarCollapsed,commandBar:(0,F.jsx)(zn,{query:e.query,loading:e.loading,onQueryChange:e.setQuery,onRefresh:()=>void e.load(),onOpenDrawer:()=>e.view.setDrawerOpen(!0),theme:e.theme.theme,onThemeChange:e.theme.setTheme,onOpenPalette:e.palette.toggle}),workspace:(0,F.jsx)(Ag,{sidebarCollapsed:e.view.sidebarCollapsed,activityDockCollapsed:e.view.activityDockCollapsed,activityDockHeight:e.view.activityDockHeight,drawerOpen:e.view.drawerOpen,onCloseDrawer:()=>e.view.setDrawerOpen(!1),onlineCount:e.summary.online||0,sidebarMode:e.view.sidebarMode,scheduleWorkspaceEnabled:Xg,remindersWorkspaceEnabled:!0,onSidebarModeChange:e.handleSidebarModeChange,onToggleSidebar:e.handleSidebarToggle,helpOpen:e.helpOpen,onToggleHelp:()=>{e.setHelpTopic(null),e.setHelpOpen(e=>!e)},onOpenHelpTopic:e.onOpenHelpTopic,settingsSection:e.settingsSection,locale:e.view.locale,onSettingsSectionChange:e.setDashboardSettingsSection,notesModel:e.notesModel,notesSelectedPath:e.view.notesSelectedPath,notesSelectedNote:e.notesSelectedNote,notesDirtyPath:e.notesDirtyPath,notesTreeWidth:e.view.notesTreeWidth,notesSidebarMode:e.notesSidebarMode,notesSearchFocusToken:e.notesSearchFocusToken,notesViewMode:e.view.notesViewMode,notesAuthoringMode:e.view.notesAuthoringMode,notesWordWrap:e.view.notesWordWrap,onNotesSidebarModeChange:e.setNotesSidebarMode,onOpenNotesSearch:e.openNotesSidebarSearch,onNotesSelectedPathChange:e.handleNotesSelectedPathChange,onNotesDirtyPathChange:e.setNotesDirtyPath,onNotesViewModeChange:e.handleNotesViewModeChange,onNotesAuthoringModeChange:e.handleNotesAuthoringModeChange,onNotesWordWrapChange:e.handleNotesWordWrapChange,onNotesTreeWidthChange:e.handleNotesTreeWidthChange,boardView:e.boardView,onBoardViewChange:e.setBoardView,scheduleGroup:e.scheduleGroup,onScheduleGroupChange:e.setScheduleGroup,instances:e.instances,selectedInstance:e.selectedInstance,data:e.data,titlesByPort:e.titlesByPort,busyPorts:e.busyPorts,activeDetailTab:e.view.activeDetailTab,onDetailTabChange:e.handleTabChange,workbenchHeader:e.workbenchHeader,detailContent:e.detailContent,previewEnabled:e.previewEnabled,previewRefreshKey:e.previewRefreshKey,previewTheme:e.theme.resolved,lifecycleMessage:e.lifecycleMessage,onDismissLifecycleMessage:e.onDismissLifecycleMessage,instanceListContent:e.instanceListContent,loading:e.loading,jawCeoWorkbenchButton:e.jawCeoWorkbenchButton,jawCeoVoiceOverlay:e.jawCeoVoiceOverlay,jawCeoConsoleContent:e.jawCeoConsoleContent,error:e.error,registryMessage:e.registryMessage,managerEvents:e.activityEvents,onToggleActivity:e.handleActivityToggle,onActivityHeightChange:e.handleActivityHeight,onOpenDrawer:()=>e.view.setDrawerOpen(!0),onSelectTab:e.handleTabChange,onToggleActivityFromMobile:e.activityUnreadOpenAndMarkSeen,drawerProfileFilters:e.drawerProfileFilters,dashboardSettingsUi:e.dashboardSettingsUi,titleSupport:e.titleSupport,onDashboardSettingsPatch:e.handleDashboardSettingsPatch}),activityHeight:e.view.activityDockCollapsed?48:e.view.activityDockHeight}),(0,F.jsx)(Wn,{open:e.palette.open,onClose:e.palette.close,instances:e.instances,getLabel:qg,onSelectInstance:e.handleSelectInstance,theme:e.theme.theme,onCycleTheme:e.cycleTheme,onRefresh:()=>void e.load(),onToggleHidden:()=>{let t=!e.showHidden;e.setShowHidden(t),e.load(t)},showHidden:e.showHidden,onOpenSelected:e.openSelectedInBrowser,selectedInstance:e.selectedInstance}),(0,F.jsx)(Bg,{onUnloadPreview:()=>e.setPreviewEnabled(!1)}),(0,F.jsx)(pr,{open:e.helpOpen,topic:e.helpTopic??e.view.sidebarMode,onClose:()=>e.setHelpOpen(!1)}),e.autoUnloadNotice&&(0,F.jsxs)(`div`,{className:`preview-auto-unload-notice`,role:`status`,children:[`Preview was unloaded after 5 minutes of inactivity. Toggle the preview switch to re-enable.`,(0,F.jsx)(`button`,{type:`button`,className:`preview-auto-unload-dismiss`,"aria-label":`Dismiss preview auto-unload notice`,onClick:()=>e.setAutoUnloadNotice(!1),children:`x`})]})]})}function e_(e){if(!(e instanceof HTMLElement))return!1;if(e.isContentEditable)return!0;let t=e.tagName.toLowerCase();return t===`input`||t===`textarea`||t===`select`?!0:!!e.closest(`[contenteditable="true"], .cm-editor, .ProseMirror, [data-milkdown-root]`)}function t_(e){let t=e.instance,n=!!t?.ok,r=e.previewEnabled?`Preview on`:`Preview off`,i=!!(t||e.onOpenHelpTopic);return(0,F.jsxs)(`div`,{className:`detail-header`,children:[(0,F.jsxs)(`div`,{children:[(0,F.jsx)(`p`,{className:`eyebrow`,children:`Selected instance`}),(0,F.jsx)(`h2`,{children:t?qg(t):`No instance selected`}),(0,F.jsx)(`span`,{children:t?.workingDir||t?.url||`Select an online instance to inspect it.`})]}),i&&(0,F.jsxs)(`div`,{className:`detail-header-actions`,children:[e.onOpenHelpTopic?(0,F.jsx)(ei,{topic:`instances`,label:`Open Instances help`,onOpen:e.onOpenHelpTopic}):null,t?(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`span`,{className:`preview-inline-status ${t.ok&&e.previewEnabled?`is-ready`:`is-unavailable`}`,"aria-label":t.ok&&e.previewEnabled?`Preview ready`:`Preview unavailable`,title:t.ok&&e.previewEnabled?`Preview ready`:`Preview unavailable`}),(0,F.jsxs)(`button`,{type:`button`,className:`preview-switch ${e.previewEnabled?`is-on`:`is-off`}`,role:`switch`,"aria-checked":e.previewEnabled,disabled:!n,onClick:()=>e.onPreviewEnabledChange(!e.previewEnabled),children:[(0,F.jsx)(`span`,{className:`preview-switch-track`,"aria-hidden":`true`}),(0,F.jsx)(`span`,{children:r})]}),(0,F.jsx)(`button`,{type:`button`,className:`preview-refresh-button`,disabled:!n||!e.previewEnabled,onClick:e.onPreviewRefresh,children:`Refresh`}),(0,F.jsxs)(`a`,{className:`open-link`,href:t.url,target:`_blank`,rel:`noreferrer`,children:[(0,F.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`12`,height:`12`,stroke:`currentColor`,strokeWidth:`2`,fill:`none`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,F.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,F.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]}),`Open`]})]}):null]})]})}var n_=`jaw.previewEnabled`;function r_(){if(typeof localStorage>`u`)return!1;try{let e=localStorage.getItem(n_);return e===null?!1:e===`true`}catch{return!1}}function i_(e){if(!(typeof localStorage>`u`))try{localStorage.setItem(n_,e?`true`:`false`)}catch{}}var a_=300*1e3;function o_(e){let{onUnload:t,idleMs:n,doc:r,setTimeout:i,clearTimeout:a,now:o}=e,s=null,c=null,l=!1,u=()=>{l||(l=!0,t())},d=()=>{c=o(),s=i(()=>{s=null,u()},n)},f=()=>{s!==null&&(a(s),s=null)},p=()=>{if(l)return;if(r.hidden){c===null&&d();return}let e=c===null?0:o()-c;f(),c=null,e>=n&&u()};return r.hidden&&d(),r.addEventListener(`visibilitychange`,p),r.addEventListener(`resume`,p),()=>{r.removeEventListener(`visibilitychange`,p),r.removeEventListener(`resume`,p),f()}}function s_(e){let{enabled:t,onUnload:n,idleMs:r=a_}=e,i=(0,P.useRef)(n);i.current=n,(0,P.useEffect)(()=>{if(t&&!(typeof document>`u`))return o_({onUnload:()=>i.current(),idleMs:r,doc:document,setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),now:()=>Date.now()})},[t,r])}function c_(e){let t={ready:0,legacy:0,offline:0,byPort:e};for(let n of Object.values(e))t[n]+=1;return t}function l_(e,t){return{selectedPort:e.selectedPort,selectedTab:e.activeDetailTab,sidebarCollapsed:e.sidebarCollapsed,activityDockCollapsed:e.activityDockCollapsed,activityDockHeight:e.activityDockHeight,activitySeenAt:null,activitySeenByPort:{},uiTheme:t,locale:e.locale,sidebarMode:e.sidebarMode,notesSelectedPath:e.notesSelectedPath,notesViewMode:e.notesViewMode,notesAuthoringMode:e.notesAuthoringMode,notesWordWrap:e.notesWordWrap,notesTreeWidth:e.notesTreeWidth,showLatestActivityTitles:e.showLatestActivityTitles,showInlineLabelEditor:e.showInlineLabelEditor,showSidebarRuntimeLine:e.showSidebarRuntimeLine,showSelectedRowActions:e.showSelectedRowActions,dashboardShortcutsEnabled:e.dashboardShortcutsEnabled,dashboardShortcutKeymap:e.dashboardShortcutKeymap}}function u_(e,t,n){let r=(0,P.useRef)(t);r.current=t;let i=(0,P.useRef)(void 0);(0,P.useEffect)(()=>Ii(e,()=>{clearTimeout(i.current),i.current=setTimeout(()=>r.current(),100)},n),[e,n])}var d_=5e3;function f_(e){let t=(0,P.useRef)(null);(0,P.useEffect)(()=>{if(!e)return;let n=!1;async function r(){try{let e=await T();if(n)return;t.current!==null&&e!==t.current&&I({topics:[`notes`],reason:`notes:external-change`,source:`visibility`,sourceId:`external-sync`}),t.current=e}catch{}}r();let i=setInterval(()=>void r(),d_);return()=>{n=!0,clearInterval(i)}},[e])}function p_(e){for(let t of e){if(t.kind===`file`)return t.path;let e=p_(t.children||[]);if(e)return e}return null}function m_(e,t){for(let n of e)if(n.kind===`file`&&n.path===t||m_(n.children||[],t))return!0;return!1}function h_(e,t){let n=[];for(let r of e){if(r.kind===`file`){t.has(r.path)&&n.push(r);continue}let e=h_(r.children||[],t);e.length>0&&n.push({...r,children:e})}return n}function g_(e){let[t,n]=(0,P.useState)([]),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(!1),[s,c]=(0,P.useState)(null),[l,u]=(0,P.useState)(null),[d,f]=(0,P.useState)(null),p=(0,P.useRef)(0),m=(0,P.useRef)(e.selectedPath),h=(0,P.useRef)(e.onSelectedPathChange);m.current=e.selectedPath,h.current=e.onSelectedPathChange,f_(e.active),(0,P.useEffect)(()=>{!e.active||l||w().then(e=>u(e.root)).catch(()=>{})},[e.active,l]);let g=(0,P.useCallback)(async(e=m.current)=>{let t=p.current+1;p.current=t,o(!0),c(null);try{let[r,a]=await Promise.all([le(),S()]);if(t!==p.current)return;n(r),i(a);let o=e&&m_(r,e)?e:p_(r);o!==m.current&&h.current(o)}catch(e){t===p.current&&c(e.message)}finally{t===p.current&&o(!1)}},[]);return u_(`notes`,()=>{e.active&&g()},`notes-sidebar`),(0,P.useEffect)(()=>{e.active&&g()},[e.active,g]),{tree:t,filteredTree:(0,P.useMemo)(()=>{if(!d||!r)return t;let e=new Set;for(let t of r.notes)t.tags&&t.tags.includes(d)&&e.add(t.path);return e.size===0?[]:h_(t,e)},[d,t,r]),index:r,loading:a,error:s,notesRoot:l,tagFilter:d,setTagFilter:f,refresh:g}}var __=new Set([`instances`,`board`,`schedule`,`reminders`,`notes`,`settings`]);function v_(e){let t=new URLSearchParams(e).get(`sidebar`);return __.has(t)?t:null}function y_(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(null),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(null),c=(0,P.useCallback)(e=>(t(e.registry),r(e.status),s(e.status.error),e),[]);return{registry:e,status:n,saving:i,error:o,apply:c,refresh:(0,P.useCallback)(async()=>{try{return c(await m())}catch(e){throw s(e.message),e}},[c]),save:(0,P.useCallback)(async e=>{a(!0);try{return c(await he(e))}catch(e){return s(e.message),null}finally{a(!1)}},[c])}}function b_(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(`overview`),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(!1),[c,l]=(0,P.useState)(!1),[u,d]=(0,P.useState)(150),[f,p]=(0,P.useState)(`instances`),[m,h]=(0,P.useState)(null),[g,_]=(0,P.useState)(`raw`),[v,y]=(0,P.useState)(`plain`),[b,x]=(0,P.useState)(!0),[S,ee]=(0,P.useState)(280),[te,C]=(0,P.useState)(!0),[ne,re]=(0,P.useState)(!0),[ie,ae]=(0,P.useState)(!0),[oe,se]=(0,P.useState)(!0),[ce,le]=(0,P.useState)(!0),[w,T]=(0,P.useState)({...qn}),[ue,de]=(0,P.useState)(`ko`);function fe(e){T(Xn(e))}return{selectedPort:e,setSelectedPort:t,activeDetailTab:n,setActiveDetailTab:r,drawerOpen:i,setDrawerOpen:a,sidebarCollapsed:o,setSidebarCollapsed:s,activityDockCollapsed:c,setActivityDockCollapsed:l,activityDockHeight:u,setActivityDockHeight:d,sidebarMode:f,setSidebarMode:p,notesSelectedPath:m,setNotesSelectedPath:h,notesViewMode:g,setNotesViewMode:_,notesAuthoringMode:v,setNotesAuthoringMode:y,notesWordWrap:b,setNotesWordWrap:x,notesTreeWidth:S,setNotesTreeWidth:ee,showLatestActivityTitles:te,setShowLatestActivityTitles:C,showInlineLabelEditor:ne,setShowInlineLabelEditor:re,showSidebarRuntimeLine:ie,setShowSidebarRuntimeLine:ae,showSelectedRowActions:oe,setShowSelectedRowActions:se,dashboardShortcutsEnabled:ce,setDashboardShortcutsEnabled:le,dashboardShortcutKeymap:w,setDashboardShortcutKeymap:fe,locale:ue,setLocale:de}}function x_(e){return e.kind===`instance-message`&&e.role===`assistant`}function S_(e){if(e.kind===`instance-message`)return[e.kind,e.port,e.messageId].join(`|`);let t=`port`in e?String(e.port):``,n=`message`in e?e.message:`reason`in e&&typeof e.reason==`string`?e.reason:``;return[e.kind,t,e.at,n].join(`|`)}function C_(e){return e.reduce((e,t)=>e?Date.parse(t.at)>Date.parse(e)?t.at:e:t.at,null)}function w_(e,t){return C_(e.filter(e=>`port`in e&&e.port===t))}function T_(e,t,n={},r=null){let i=new Set,a={};for(let t of e){if(!(`port`in t)||r!=null&&t.port===r||!x_(t))continue;let e=n[t.port]||null;if(e&&Date.parse(t.at)<=Date.parse(e))continue;let o=S_(t);i.has(o)||(i.add(o),a[t.port]=(a[t.port]||0)+1)}return a}function E_(e){let[t,n]=(0,P.useState)(null),[r,i]=(0,P.useState)({}),a=(0,P.useMemo)(()=>T_(e.events,t,r,e.activePreviewPort),[e.events,t,r,e.activePreviewPort]);function o(e,t){n(e),i(Object.fromEntries(Object.entries(t).map(([e,t])=>[Number(e),t])))}function s(t){let n=w_(e.events,t);if(!n)return;let a=r[t]||null;if(a&&Date.parse(n)<=Date.parse(a))return;let o={...r,[t]:n};i(o),e.saveUi({activitySeenByPort:Object.fromEntries(Object.entries(o).map(([e,t])=>[String(e),t]))})}function c(){let t=C_(e.events),a={...r};for(let t of e.events){if(!(`port`in t))continue;let e=a[t.port];(!e||Date.parse(t.at)>Date.parse(e))&&(a[t.port]=t.at)}n(t),i(a),e.setActivityDockCollapsed(!1),e.saveUi({activityDockCollapsed:!1,activitySeenAt:t,activitySeenByPort:Object.fromEntries(Object.entries(a).map(([e,t])=>[String(e),t]))})}function l(){e.setActivityDockCollapsed(!0),e.saveUi({activityDockCollapsed:!0,activitySeenAt:t,activitySeenByPort:Object.fromEntries(Object.entries(r).map(([e,t])=>[String(e),t]))})}return{unreadByPort:a,hydrateSeenAt:o,markPortSeen:s,openAndMarkSeen:c,closeAndPersistSeen:l}}var D_=[`auto`,`dark`,`light`];function O_(e){return typeof e==`string`&&D_.includes(e)}function k_(){if(typeof document>`u`)return`auto`;let e=document.documentElement.getAttribute(`data-theme`);return O_(e)?e:`auto`}var A_=`jaw.uiTheme`;function j_(e){if(!(typeof document>`u`)){document.documentElement.setAttribute(`data-theme`,e);try{typeof localStorage<`u`&&localStorage.setItem(A_,e)}catch{}}}function M_(e){let[t,n]=(0,P.useState)(k_),[r,i]=(0,P.useState)(()=>N_(t));return(0,P.useEffect)(()=>{j_(t),i(N_(t))},[t]),(0,P.useEffect)(()=>{if(t!==`auto`||typeof window>`u`||!window.matchMedia)return;let e=window.matchMedia(`(prefers-color-scheme: light)`),n=()=>i(e.matches?`light`:`dark`);return typeof e.addEventListener==`function`?(e.addEventListener(`change`,n),()=>e.removeEventListener(`change`,n)):(e.addListener(n),()=>e.removeListener(n))},[t]),{theme:t,resolved:r,setTheme:(0,P.useCallback)(t=>{O_(t)&&(n(t),j_(t),i(N_(t)),e(t))},[e]),syncFromRegistry:(0,P.useCallback)(e=>{O_(e)&&(n(e),j_(e),i(N_(e)))},[])}}function N_(e){return e===`dark`?`dark`:e===`light`||typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: light)`).matches?`light`:`dark`}function P_(){return typeof navigator>`u`?!1:/Mac|iPod|iPhone|iPad/.test(navigator.platform||``)}function F_(e){return e.key!==`k`&&e.key!==`K`?!1:P_()?e.metaKey:e.ctrlKey}function I_(){let[e,t]=(0,P.useState)(!1),n=(0,P.useCallback)(()=>t(e=>!e),[]),r=(0,P.useCallback)(()=>t(!1),[]);return(0,P.useEffect)(()=>{function e(e){F_(e)&&(e.preventDefault(),t(e=>!e))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),{open:e,setOpen:t,toggle:n,close:r}}function L_(e,t){let[n,r]=(0,P.useState)(null);return{error:n,saveInstanceLabel:(0,P.useCallback)(async(n,i)=>{let a=i?.trim()||null;if(!await e({instances:{[String(n)]:{label:a}}})){let e=`instance label save failed`;throw r(e),Error(e)}r(null),t(e=>e&&{...e,instances:e.instances.map(e=>e.port===n?{...e,label:a}:e)})},[e,t])}}var R_=5e3,z_=200;function B_(e){if(!e)return null;if(`latestAssistant`in e){let t=e.latestAssistant,n=e.activity;return!t||!n||n.role!==`assistant`||n.messageId!==t.id?null:t}return e.role===`assistant`&&Number.isInteger(e.id)?e:null}function V_(e){return!e||!(`activity`in e)?null:e.activity?.title||null}function H_(e){return e&&(`activity`in e||`latestAssistant`in e)?`ready`:`legacy`}var U_=120*6e4;function W_(e){let t=e.includes(`T`)?e:e.replace(` `,`T`);return Date.parse(t.endsWith(`Z`)?t:t+`Z`)}function G_(e){if(!e||!(`activity`in e))return!1;let t=e.activity;if(!t||t.role!==`user`)return!1;let n=W_(t.updatedAt);return Number.isNaN(n)?!1:Date.now()-n<U_}async function K_(e){let t=await fetch(`/i/${e}/api/messages/latest?includeContent=1`);if(!t.ok)return{latest:null,title:null,support:`offline`,busy:!1};let n=await t.json();return{latest:B_(n.data),title:V_(n.data),support:H_(n.data),busy:G_(n.data)}}function q_(e){let[t,n]=(0,P.useState)([]),[r,i]=(0,P.useState)({}),[a,o]=(0,P.useState)({}),[s,c]=(0,P.useState)(new Set),l=(0,P.useRef)({}),u=(0,P.useMemo)(()=>e.filter(e=>e.ok).map(e=>e.port).sort((e,t)=>e-t),[e]);return(0,P.useEffect)(()=>{let t=!1,r=null;async function a(){if(t)return;let r=new Set(e.map(e=>e.port)),a={};for(let t of e)t.ok||(a[t.port]=`offline`);if(u.length===0){o(a),i(e=>Object.fromEntries(Object.entries(e).filter(([e])=>r.has(Number(e)))));return}let s=await Promise.allSettled(u.map(async e=>({port:e,...await K_(e)}))),d=[],f={},p=new Set;for(let e of s){if(e.status!==`fulfilled`)continue;let{port:t,latest:n,title:r,support:i,busy:o}=e.value;if(o&&p.add(t),a[t]=i,r&&(f[t]=r),!n)continue;let s=l.current[t];l.current[t]=n.id,!(s==null||n.id<=s)&&d.push({kind:`instance-message`,port:t,messageId:n.id,role:n.role,at:n.created_at&&!Number.isNaN(Date.parse(n.created_at))?n.created_at:new Date().toISOString(),...r?{title:r}:{}})}if(!t){for(let e of u)a[e]||(a[e]=`offline`);o(a),c(p),i(e=>{let t={};for(let[n,i]of Object.entries(e)){let e=Number(n);r.has(e)&&a[e]===`ready`&&(t[e]=i)}return{...t,...f}}),d.length>0&&n(e=>{let t=[...e,...d];return t.length>z_&&t.splice(0,t.length-z_),t})}}function s(){r||=setInterval(()=>{a()},R_)}function d(){r&&clearInterval(r),r=null}function f(){document.visibilityState===`visible`?(a(),s()):d()}return a(),s(),document.addEventListener(`visibilitychange`,f),()=>{t=!0,d(),document.removeEventListener(`visibilitychange`,f)}},[u.join(`,`),(0,P.useMemo)(()=>e.map(e=>`${e.port}:${e.ok?`online`:`offline`}`).sort().join(`,`),[e])]),{events:t,titlesByPort:r,titleSupportByPort:a,busyPorts:s}}var J_=1e4,Y_=200;function X_(){let[e,t]=(0,P.useState)([]),[n,r]=(0,P.useState)(null),i=(0,P.useRef)(null);async function a(){try{let e=await ee(i.current);if(r(null),e.length===0)return;i.current=e[e.length-1].at,t(t=>{let n=[...t,...e];return n.length>Y_&&n.splice(0,n.length-Y_),n})}catch(e){r(e.message)}}return(0,P.useEffect)(()=>{let e=!1,t=null;async function n(){e||await a()}function r(){t||=setInterval(()=>{n()},J_)}function i(){t&&clearInterval(t),t=null}function o(){document.visibilityState===`visible`?(n(),r()):i()}return n(),r(),document.addEventListener(`visibilitychange`,o),()=>{e=!0,i(),document.removeEventListener(`visibilitychange`,o)}},[]),{events:e,error:n,refresh:a}}var Z_=76,Q_=8,$_=96;function ev(e){return e?e.scrollHeight-e.scrollTop-e.clientHeight<$_:!0}function tv(e){let t=(0,P.useRef)(null),n=(0,P.useRef)(!0),r=(0,P.useRef)(e.count),[{virtualItems:i,totalSize:a},o]=(0,P.useState)({virtualItems:[],totalSize:0}),f=(0,P.useRef)(null);f.current||=new d({count:e.count,getScrollElement:()=>t.current,estimateSize:e.estimateSize||(()=>Z_),overscan:Q_,getItemKey:e.getItemKey,indexAttribute:`data-jaw-ceo-idx`,useAnimationFrameWithResizeObserver:!0,observeElementRect:s,observeElementOffset:c,scrollToFn:l,measureElement:u,onChange:e=>{o({virtualItems:e.getVirtualItems(),totalSize:e.getTotalSize()})}});let p=f.current,m=(0,P.useCallback)(e=>{t.current=e,n.current=ev(e),p._willUpdate()},[p]),h=(0,P.useCallback)(()=>{n.current=ev(t.current)},[]),g=(0,P.useCallback)(e=>{e&&p.measureElement(e)},[p]);return(0,P.useEffect)(()=>p._didMount(),[p]),(0,P.useLayoutEffect)(()=>{p.setOptions({...p.options,count:e.count,getItemKey:e.getItemKey,estimateSize:e.estimateSize||(()=>Z_)}),p._willUpdate(),o({virtualItems:p.getVirtualItems(),totalSize:p.getTotalSize()})},[e.count,e.estimateSize,e.getItemKey,p]),(0,P.useLayoutEffect)(()=>{let t=r.current;r.current=e.count,e.count!==0&&(t>0&&!n.current||requestAnimationFrame(()=>{p.scrollToIndex(e.count-1,{align:`end`})}))},[e.count,p]),{scrollRef:m,onScroll:h,measureElement:g,virtualItems:i,totalSize:a}}async function nv(e,t){let n=await e.text(),r=null;if(n.trim())try{r=JSON.parse(n)}catch{throw Error(`${t}: endpoint returned non-JSON; restart the dashboard server to load the Jaw CEO API`)}if(!e.ok||!r||r.ok===!1){let e=r&&r.ok===!1&&(r.error||r.message)||t;throw Error(e)}return r.data}async function rv(e,t){return await nv(await fetch(e),t)}async function iv(e,t={},n=`Jaw CEO request failed`){return await nv(await fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}),n)}async function av(e,t={},n=`Jaw CEO request failed`){return await nv(await fetch(e,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify(t)}),n)}async function ov(){return await rv(`/api/jaw-ceo/state`,`Jaw CEO state fetch failed`)}async function sv(){return await rv(`/api/jaw-ceo/settings`,`Jaw CEO settings fetch failed`)}async function cv(e){return await av(`/api/jaw-ceo/settings`,e,`Jaw CEO settings save failed`)}async function lv(e){let t={text:e.text,selectedPort:e.selectedPort,inputMode:e.inputMode||`text`,responseMode:e.responseMode||`text`};return e.sessionId&&(t.sessionId=e.sessionId),await iv(`/api/jaw-ceo/message`,t,`Jaw CEO message failed`)}async function uv(e){let t={};return e.ports!==void 0&&(t.ports=e.ports),e.events!==void 0&&(t.events=e.events),e.sinceCursor!==void 0&&(t.sinceCursor=e.sinceCursor),await iv(`/api/jaw-ceo/events/refresh`,t,`Jaw CEO event refresh failed`)}async function dv(e,t){return await iv(`/api/jaw-ceo/pending/${encodeURIComponent(e)}/continue`,{mode:t},`Jaw CEO continue failed`)}async function fv(e,t=`short`){return await iv(`/api/jaw-ceo/pending/${encodeURIComponent(e)}/summarize`,{format:t},`Jaw CEO summarize failed`)}async function pv(e,t){return await iv(`/api/jaw-ceo/pending/${encodeURIComponent(e)}/${t}`,{},`Jaw CEO pending update failed`)}async function mv(e){let t={offerSdp:e.offerSdp,selectedPort:e.selectedPort,responseMode:e.responseMode||`voice`};return e.sessionId&&(t.sessionId=e.sessionId),await iv(`/api/jaw-ceo/voice/connect`,t,`Jaw CEO voice connect failed`)}async function hv(e){return await iv(`/api/jaw-ceo/voice/${encodeURIComponent(e)}/close`,{},`Jaw CEO voice close failed`)}function gv(e){if(e?.openaiKeyInvalid)return`Invalid saved key`;if(!e?.openaiKeySet)return`No key saved`;let t=e.openaiKeyLast4?`•••• ${e.openaiKeyLast4}`:`saved`;return e.openaiKeySource===`env`?`Env key ${t}`:e.openaiKeySource===`deps`?`Runtime key ${t}`:`Saved key ${t}`}function _v(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(``),[i,a]=(0,P.useState)(!1),[o,s]=(0,P.useState)(null),c=!!(e?.openaiKeyInvalid||e?.openaiKeySet&&e.openaiKeySource!==`env`);(0,P.useEffect)(()=>{let e=!1;return sv().then(n=>{e||t(n)}).catch(t=>{e||s(t.message)}),()=>{e=!0}},[]);async function l(){let e=n.trim();if(e){a(!0);try{t(await cv({openaiApiKey:e})),r(``),s(null)}catch(e){s(e.message)}finally{a(!1)}}}async function u(){a(!0);try{t(await cv({clearOpenAiApiKey:!0})),r(``),s(null)}catch(e){s(e.message)}finally{a(!1)}}return(0,F.jsx)(`section`,{className:`jaw-ceo-settings-panel`,"aria-label":`Jaw CEO settings`,children:(0,F.jsxs)(`form`,{className:`jaw-ceo-settings-form`,onSubmit:e=>{e.preventDefault(),l()},children:[(0,F.jsxs)(`div`,{className:`jaw-ceo-settings-status`,children:[(0,F.jsx)(`strong`,{children:`Realtime voice`}),(0,F.jsx)(`span`,{children:gv(e)})]}),(0,F.jsxs)(`label`,{children:[(0,F.jsx)(`span`,{children:`OpenAI API key`}),(0,F.jsx)(`input`,{value:n,type:`password`,autoComplete:`off`,spellCheck:!1,placeholder:e?.openaiKeySet?`sk-... replace saved key`:`sk-...`,onChange:e=>r(e.target.value)})]}),(0,F.jsxs)(`div`,{className:`jaw-ceo-settings-meta`,children:[(0,F.jsx)(`span`,{children:e?.model||`gpt-realtime-2`}),(0,F.jsx)(`span`,{children:e?.voice||`marin`})]}),e?.openaiKeyInvalid?(0,F.jsx)(`p`,{className:`jaw-ceo-inline-error`,children:`Saved value is not an OpenAI API key. Paste a key that starts with sk-.`}):null,o?(0,F.jsx)(`p`,{className:`jaw-ceo-inline-error`,children:o}):null,(0,F.jsxs)(`div`,{className:`jaw-ceo-form-row`,children:[(0,F.jsx)(`button`,{type:`button`,disabled:i||!c,onClick:()=>void u(),children:`Clear saved`}),(0,F.jsx)(`button`,{type:`submit`,disabled:i||!n.trim(),children:i?`Saving`:`Save key`})]})]})})}function vv(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleTimeString()}function yv(e){return e.summary||`Worker :${e.port} has a result ready.`}function bv(e){return[{label:e==null?`Inspect dashboard`:`Inspect :${e}`,text:e==null?`What needs attention on this dashboard right now?`:`What is worker :${e} doing right now?`},{label:`Summarize results`,text:`Summarize the worker results and tell me what needs action.`},{label:e==null?`Route work`:`Send to :${e}`,text:e==null?`Create or choose the right worker for this task: `:`Send this task to worker :${e}: `}]}function xv(e){let t=Array.isArray(e.ceo.state.transcript)?e.ceo.state.transcript:[],n=Array.isArray(e.ceo.state.watches)?e.ceo.state.watches:[],r=Array.isArray(e.ceo.audit)?e.ceo.audit:[],i=[...t.map(e=>({kind:`chat`,id:e.id,at:e.at,role:e.role,text:e.text})),...e.ceo.pending.filter(e=>e.status===`pending`||e.status===`spoken`).map(e=>({kind:`result`,id:`result-${e.completionKey}`,at:e.detectedAt,completion:e})),...n.map(e=>({kind:`watch`,id:`watch-${e.watchId}`,at:e.createdAt,watch:e})),...r.slice(-24).map(e=>({kind:`tool`,id:`audit-${e.id}`,at:e.at,record:e}))];return i.sort((e,t)=>{let n=Date.parse(e.at)-Date.parse(t.at);return n===0?e.id.localeCompare(t.id):n}),e.voice.lastTranscript&&i.push({kind:`live`,id:`live-voice-transcript`,at:new Date().toISOString(),text:e.voice.lastTranscript,eventType:e.voice.lastEventType}),i}function Sv(e){if(!e)return 76;if(e.kind===`activity-group`)return 52;let t=Math.max(1,e.text.split(/\r?\n/).filter(Boolean).length);return Math.min(220,54+t*18)}function Cv(e){let t=[],n=[];function r(){n.length!==0&&(t.push({kind:`activity-group`,id:`activity-${n[0].id}-${n.length}`,at:n[0].at,entries:n}),n=[])}for(let i of e)i.kind===`chat`||i.kind===`live`?(r(),t.push(i)):n.push(i);return r(),t}function wv(e){return e.kind===`result`?`subagent`:e.kind===`watch`?`thinking`:e.record.kind===`tool`?`tool`:e.record.kind===`completion`?`subagent`:`thinking`}function Tv(e){return e.kind===`result`?`Worker :${e.completion.port} result`:e.kind===`watch`?`Listening to worker :${e.watch.port}`:e.record.kind===`completion`?`Worker completion`:e.record.kind===`docs_edit`?`Docs edit`:e.record.kind===`lifecycle`?`Lifecycle`:e.record.kind===`policy`?`Policy check`:e.record.action||`Tool use`}function Ev(e){return e.kind===`result`?e.completion.resultText||yv(e.completion):e.kind===`watch`?`${e.watch.reason} · fallback ${e.watch.latestMessageFallback.mode}`:e.record.message}function Dv(e){return e.kind===`result`?e.completion.detectedAt:e.kind===`watch`?e.watch.createdAt:e.record.at}function Ov(e){return e.kind===`tool`&&!e.record.ok}function kv(e){let t=e.reduce((e,t)=>(e[wv(t)]+=1,e),{tool:0,thinking:0,subagent:0});return[t.tool>0?`Tool×${t.tool}`:null,t.thinking>0?`Thinking×${t.thinking}`:null,t.subagent>0?`Subagent×${t.subagent}`:null].filter(Boolean).join(` + `)}function Av(e){let t=e.text.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(t.length===0)return(0,F.jsx)(`p`,{children:`...`});let n=[],r=[];function i(){r.length!==0&&(n.push((0,F.jsx)(`ul`,{children:r.map((e,t)=>(0,F.jsx)(`li`,{children:e},`${e}-${t}`))},`ul-${n.length}`)),r=[])}return t.forEach((e,t)=>{let a=e.match(/^[-*]\s+(.+)$/);if(a){r.push(a[1]);return}i(),n.push((0,F.jsx)(`p`,{children:e},`p-${t}`))}),i(),(0,F.jsx)(F.Fragment,{children:n})}function jv(e){return e.tone===`tool`?(0,F.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,children:(0,F.jsx)(`path`,{d:`M10.5 2.5 13 5l-2.4 2.4-1.2-1.2-4.8 4.8-1.7.2.2-1.7 4.8-4.8-1.1-1.1L9.2 1.2l1.3 1.3Z`})}):e.tone===`subagent`?(0,F.jsxs)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{d:`M3 4.5h10v7H3z`}),(0,F.jsx)(`path`,{d:`M6 4.5V3h4v1.5M5.2 8h.1M10.7 8h.1`})]}):(0,F.jsx)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,children:(0,F.jsx)(`path`,{d:`M3 4.5h10v7H5.7L3 13.4z`})})}function Mv(e){return(0,F.jsxs)(`section`,{className:`jaw-ceo-activity-shell`,"aria-label":`CEO activity`,children:[(0,F.jsx)(`span`,{className:`jaw-ceo-activity-avatar`,"aria-hidden":`true`,children:`CEO`}),(0,F.jsxs)(`details`,{className:`jaw-ceo-activity-group`,children:[(0,F.jsxs)(`summary`,{children:[(0,F.jsx)(`span`,{className:`jaw-ceo-activity-status`,"aria-hidden":`true`}),(0,F.jsx)(`strong`,{children:kv(e.entries)||`Activity`})]}),(0,F.jsx)(`div`,{className:`jaw-ceo-activity-list`,children:e.entries.map(t=>{let n=wv(t);return(0,F.jsxs)(`article`,{className:`jaw-ceo-activity-row tone-${n}${Ov(t)?` is-error`:``}`,children:[(0,F.jsx)(`span`,{className:`jaw-ceo-activity-dot`,"aria-hidden":`true`}),(0,F.jsx)(`span`,{className:`jaw-ceo-activity-icon`,children:(0,F.jsx)(jv,{tone:n})}),(0,F.jsx)(`span`,{className:`jaw-ceo-activity-badge`,children:n}),(0,F.jsxs)(`div`,{className:`jaw-ceo-activity-copy`,children:[(0,F.jsx)(`strong`,{children:Tv(t)}),(0,F.jsx)(`p`,{children:Ev(t)}),(0,F.jsx)(`small`,{children:vv(Dv(t))})]}),t.kind===`result`?(0,F.jsxs)(`div`,{className:`jaw-ceo-activity-actions`,children:[(0,F.jsx)(`button`,{type:`button`,onClick:()=>e.onOpenWorker(t.completion.port,t.completion.messageId),children:`Open`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void e.model.summarize(t.completion),children:`Summary`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void e.model.continueCompletion(t.completion),children:`Continue`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void e.voice.speakCompletion(t.completion),children:`Speak`}),(0,F.jsx)(`button`,{type:`button`,onClick:()=>void e.ceo.ackCompletion(t.completion.completionKey),children:`Ack`})]}):(0,F.jsx)(`span`,{className:`jaw-ceo-trace-chip`,children:`Trace`})]},t.id)})})]})]})}function Nv(e){let t=e.entry;return t.kind===`activity-group`?(0,F.jsx)(Mv,{entries:t.entries,model:e.model,ceo:e.ceo,voice:e.voice,onOpenWorker:e.onOpenWorker}):t.kind===`chat`?(0,F.jsxs)(`article`,{className:`jaw-ceo-message-row role-${t.role}`,children:[(0,F.jsx)(`span`,{className:`jaw-ceo-message-avatar`,"aria-hidden":`true`,children:t.role===`user`?`You`:t.role===`ceo`?`CEO`:`Log`}),(0,F.jsxs)(`div`,{className:`jaw-ceo-message-bubble`,children:[(0,F.jsxs)(`div`,{className:`jaw-ceo-message-meta`,children:[(0,F.jsx)(`strong`,{children:t.role===`user`?`You`:t.role===`ceo`?`Jaw CEO`:`Tool output`}),(0,F.jsx)(`small`,{children:vv(t.at)})]}),(0,F.jsx)(`div`,{className:`jaw-ceo-message-text`,children:(0,F.jsx)(Av,{text:t.text})})]})]}):t.kind===`live`?(0,F.jsxs)(`article`,{className:`jaw-ceo-message-row role-ceo is-live`,"aria-live":`polite`,children:[(0,F.jsx)(`span`,{className:`jaw-ceo-message-avatar is-live`,"aria-hidden":`true`,children:`CEO`}),(0,F.jsxs)(`div`,{className:`jaw-ceo-message-bubble`,children:[(0,F.jsxs)(`div`,{className:`jaw-ceo-message-meta`,children:[(0,F.jsx)(`strong`,{children:`Jaw CEO live`}),(0,F.jsx)(`small`,{children:t.eventType||`realtime`})]}),(0,F.jsx)(`div`,{className:`jaw-ceo-message-text`,children:(0,F.jsx)(Av,{text:t.text})})]})]}):null}function Pv(e){let t=(0,P.useMemo)(()=>Cv(xv({model:e.model,ceo:e.ceo,voice:e.voice})),[e.model,e.ceo.state.transcript,e.ceo.pending,e.ceo.state.watches,e.ceo.audit,e.voice.lastTranscript,e.voice.lastEventType]),n=(0,P.useCallback)(e=>t[e]?.id||e,[t]),r=(0,P.useCallback)(e=>Sv(t[e]),[t]),i=tv({count:t.length,getItemKey:n,estimateSize:r});return(0,F.jsxs)(`section`,{className:`jaw-ceo-chat-panel`,"aria-label":`Jaw CEO chat`,children:[(0,F.jsx)(`div`,{ref:i.scrollRef,onScroll:i.onScroll,className:`jaw-ceo-chat-log jaw-ceo-timeline is-virtual`,"aria-live":`polite`,children:t.length===0?(0,F.jsxs)(`div`,{className:`jaw-ceo-empty-state`,children:[(0,F.jsx)(`span`,{className:`jaw-ceo-empty-kicker`,children:`Ready`}),(0,F.jsx)(`strong`,{children:e.selectedPort==null?`Dashboard context`:`Worker :${e.selectedPort} selected`}),(0,F.jsx)(`div`,{className:`jaw-ceo-quick-prompts`,children:bv(e.selectedPort).map(t=>(0,F.jsx)(`button`,{type:`button`,onClick:()=>e.model.setMessage(t.text),children:t.label},t.label))})]}):(0,F.jsx)(`div`,{className:`jaw-ceo-virtual-spacer`,style:{height:`${i.totalSize}px`},children:i.virtualItems.map(n=>{let r=t[n.index];return r?(0,F.jsx)(`div`,{ref:i.measureElement,className:`jaw-ceo-virtual-row`,"data-jaw-ceo-idx":n.index,style:{transform:`translateY(${n.start}px)`},children:(0,F.jsx)(Nv,{entry:r,model:e.model,ceo:e.ceo,voice:e.voice,onOpenWorker:e.onOpenWorker})},n.key):null})})}),(0,F.jsxs)(`form`,{className:`jaw-ceo-message-form`,onSubmit:t=>void e.model.submitMessage(t),children:[(0,F.jsx)(`textarea`,{value:e.model.message,rows:3,placeholder:`Send a task to the selected worker or ask about the dashboard.`,onChange:t=>e.model.setMessage(t.target.value)}),(0,F.jsxs)(`div`,{className:`jaw-ceo-form-row`,children:[(0,F.jsxs)(`select`,{value:e.model.responseMode,"aria-label":`Response mode`,onChange:t=>e.model.setResponseMode(t.target.value),children:[(0,F.jsx)(`option`,{value:`text`,children:`Text`}),(0,F.jsx)(`option`,{value:`voice`,children:`Voice`}),(0,F.jsx)(`option`,{value:`both`,children:`Both`}),(0,F.jsx)(`option`,{value:`silent`,children:`Silent`})]}),(0,F.jsx)(`button`,{type:`submit`,disabled:e.ceo.busy||!e.model.message.trim(),children:`Send`})]})]})]})}function Fv(e){return e.model.tab===`settings`?(0,F.jsx)(_v,{}):(0,F.jsx)(Pv,{model:e.model,ceo:e.ceo,voice:e.voice,selectedPort:e.selectedPort,onOpenWorker:e.onOpenWorker})}var Iv=[{id:`chat`,label:`Chat`},{id:`settings`,label:`Settings`}];function Lv(e){return(0,F.jsx)(`div`,{className:`jaw-ceo-tabs`,role:`tablist`,"aria-label":`Jaw CEO console tabs`,children:Iv.map(t=>(0,F.jsx)(`button`,{type:`button`,role:`tab`,className:e.active===t.id?`is-active`:``,"aria-selected":e.active===t.id,onClick:()=>e.onChange(t.id),children:(0,F.jsx)(`span`,{children:t.label})},t.id))})}function Rv(e){return async t=>{t.preventDefault();let n=e.message.trim();if(n){e.setMessage(``);try{await e.ceo.sendText(n,e.responseMode),e.setTab(`chat`)}catch{}}}}function zv(e){return{summarize:async t=>{await e.ceo.summarizeCompletion(t.completionKey,`short`),await e.ceo.refresh(),e.setTab(`chat`)},continueCompletion:async t=>{let n=e.responseMode===`voice`||e.responseMode===`both`||e.responseMode===`silent`?e.responseMode:`text`;await e.ceo.continueCompletion(t.completionKey,n),await e.ceo.refresh(),e.setTab(`chat`)}}}function Bv(e){let[t,n]=(0,P.useState)(`chat`),[r,i]=(0,P.useState)(``),[a,o]=(0,P.useState)(`text`),s=zv({ceo:e.ceo,responseMode:a,setTab:n});return{tab:t,setTab:n,message:r,setMessage:i,responseMode:a,setResponseMode:o,submitMessage:Rv({ceo:e.ceo,message:r,responseMode:a,setMessage:i,setTab:n}),...s}}var Vv=()=>(0,F.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`16`,height:`16`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.7`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{d:`M13.2 8a5.2 5.2 0 1 1-1.5-3.7`}),(0,F.jsx)(`path`,{d:`M13.2 3.2v3.2H10`})]}),Hv=()=>(0,F.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`17`,height:`17`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.8`,strokeLinecap:`round`,"aria-hidden":`true`,children:(0,F.jsx)(`path`,{d:`M4 4l8 8M12 4l-8 8`})});function Uv(e){return e===`connecting`?`connecting`:e===`active`?`listening`:e===`silent`?`silent`:e===`paused`?`paused`:e===`sleeping`?`sleeping`:e===`disabled`?`disabled`:e===`error`?`error`:`idle`}function Wv(e){return e===`active`||e===`connecting`||e===`silent`}function Gv(e){return e===`active`||e===`connecting`||e===`silent`?`live`:e===`paused`||e===`sleeping`?`paused`:e===`disabled`||e===`error`?`issue`:`idle`}function Kv(e){let t=(0,P.useRef)(null),n=Bv({ceo:e.ceo});if((0,P.useEffect)(()=>{if(!e.open)return;t.current?.focus();function n(t){if(t.key===`Escape`){if(Wv(e.voice.status)){t.preventDefault(),e.voice.stop();return}e.onClose()}}return document.addEventListener(`keydown`,n),()=>document.removeEventListener(`keydown`,n)},[e]),!e.open)return null;let r=e.selectedPort==null?`Dashboard`:`Worker :${e.selectedPort}`,i=Uv(e.voice.status);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(`div`,{className:`jaw-ceo-console-overlay`,onClick:e.onClose,"aria-hidden":`true`}),(0,F.jsxs)(`aside`,{className:`jaw-ceo-console`,role:`dialog`,"aria-modal":`true`,"aria-label":`Jaw CEO console`,children:[(0,F.jsxs)(`header`,{className:`jaw-ceo-console-header`,children:[(0,F.jsxs)(`div`,{className:`jaw-ceo-console-titlebar`,children:[(0,F.jsx)(`span`,{className:`jaw-ceo-console-mark status-${e.voice.status}`,"aria-hidden":`true`,children:`CEO`}),(0,F.jsxs)(`div`,{className:`jaw-ceo-console-heading`,children:[(0,F.jsx)(`span`,{children:`Dashboard coordinator`}),(0,F.jsx)(`h3`,{children:`Jaw CEO`})]})]}),(0,F.jsxs)(`div`,{className:`jaw-ceo-console-header-actions`,children:[(0,F.jsx)(`button`,{type:`button`,className:`jaw-ceo-icon-btn`,onClick:()=>void e.ceo.refresh(),"aria-label":`Refresh Jaw CEO`,children:(0,F.jsx)(Vv,{})}),(0,F.jsx)(`button`,{ref:t,type:`button`,className:`jaw-ceo-console-close`,onClick:e.onClose,"aria-label":`Close Jaw CEO`,children:(0,F.jsx)(Hv,{})})]}),(0,F.jsxs)(`div`,{className:`jaw-ceo-console-summary`,"aria-label":`Jaw CEO status summary`,children:[(0,F.jsx)(`span`,{children:r}),(0,F.jsx)(`span`,{children:`Single session`}),(0,F.jsxs)(`span`,{className:`voice-tone-${Gv(e.voice.status)}`,children:[`Voice `,i]})]})]}),(0,F.jsx)(Lv,{active:n.tab,onChange:n.setTab}),(0,F.jsx)(`div`,{className:`jaw-ceo-console-body`,children:(0,F.jsx)(Fv,{model:n,ceo:e.ceo,voice:e.voice,selectedPort:e.selectedPort,onOpenWorker:e.onOpenWorker})}),(0,F.jsxs)(`footer`,{className:`jaw-ceo-console-footer voice-${e.voice.status}`,children:[(0,F.jsxs)(`div`,{className:`jaw-ceo-realtime-status`,children:[(0,F.jsx)(`span`,{className:`jaw-ceo-realtime-dot`,"aria-hidden":`true`}),(0,F.jsxs)(`span`,{children:[`Voice: `,i,e.voice.error?` - ${e.voice.error}`:``]}),e.voice.lastTranscript?(0,F.jsx)(`small`,{children:e.voice.lastTranscript}):e.voice.lastEventType?(0,F.jsx)(`small`,{children:e.voice.lastEventType}):null]}),(0,F.jsx)(`button`,{type:`button`,className:`jaw-ceo-voice-action`,onClick:()=>Wv(e.voice.status)?void e.voice.stop():void e.voice.talk(),children:Wv(e.voice.status)?`Stop voice`:`Start voice`})]})]})]})}var qv=()=>(0,F.jsxs)(`svg`,{viewBox:`0 0 16 16`,width:`13`,height:`13`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:[(0,F.jsx)(`path`,{d:`M8 2.5a2 2 0 0 0-2 2v3a2 2 0 0 0 4 0v-3a2 2 0 0 0-2-2Z`}),(0,F.jsx)(`path`,{d:`M3.8 7.2a4.2 4.2 0 0 0 8.4 0`}),(0,F.jsx)(`path`,{d:`M8 11.4v2.1`})]});function Jv(e){return e===`active`?`voice`:e===`connecting`?`joining`:e===`silent`?`listening`:e===`paused`?`paused`:e===`sleeping`?`sleep`:e===`disabled`?`off`:e===`error`?`error`:`ready`}function Yv(e){let t=e.voiceStatus===`active`||e.voiceStatus===`connecting`||e.voiceStatus===`silent`,n=e.error?`error`:Jv(e.voiceStatus),r=e.error?`Jaw CEO error: ${e.error}`:`Open Jaw CEO. Single chat session, voice ${Jv(e.voiceStatus)}.`;return(0,F.jsxs)(`div`,{className:`jaw-ceo-workbench-launcher${e.open?` is-open`:``}${t?` is-active`:``}${e.error?` is-error`:``}`,"aria-label":`Jaw CEO launcher`,children:[(0,F.jsxs)(`button`,{type:`button`,className:`jaw-ceo-workbench-button`,"aria-expanded":e.open,title:r,onClick:e.onOpenConsole,children:[(0,F.jsx)(`span`,{className:`jaw-ceo-avatar status-${e.voiceStatus}`,"aria-hidden":`true`,children:`CEO`}),(0,F.jsx)(`span`,{className:`jaw-ceo-workbench-label`,children:`CEO`}),(0,F.jsx)(`span`,{className:`jaw-ceo-workbench-status`,children:n})]}),(0,F.jsx)(`button`,{type:`button`,className:`jaw-ceo-workbench-icon`,"aria-label":t?`Stop Jaw CEO voice`:`Start Jaw CEO voice`,title:t?`Stop voice`:`Start voice`,disabled:e.busy,onClick:e.onToggleVoice,children:(0,F.jsx)(qv,{})})]})}function Xv(e){return e===`connecting`?`Connecting voice`:e===`silent`?`Listening`:`Voice active`}function Zv(e){if(e.status!==`connecting`&&e.status!==`active`&&e.status!==`silent`)return null;let t=Xv(e.status),n=e.selectedPort==null?`Dashboard`:`Worker :${e.selectedPort}`;return(0,F.jsx)(`div`,{className:`jaw-ceo-voice-overlay status-${e.status}`,role:`status`,"aria-live":`polite`,children:(0,F.jsxs)(`div`,{className:`jaw-ceo-voice-overlay-card`,children:[(0,F.jsxs)(`div`,{className:`jaw-ceo-voice-wave`,"aria-hidden":`true`,children:[(0,F.jsx)(`span`,{}),(0,F.jsx)(`span`,{}),(0,F.jsx)(`span`,{})]}),(0,F.jsxs)(`div`,{className:`jaw-ceo-voice-overlay-copy`,children:[(0,F.jsx)(`strong`,{children:t}),(0,F.jsx)(`span`,{children:e.status===`silent`?`No speech detected. Session is still open.`:n}),e.lastTranscript?(0,F.jsx)(`small`,{children:e.lastTranscript}):e.lastEventType?(0,F.jsx)(`small`,{children:e.lastEventType}):null]}),(0,F.jsx)(`button`,{type:`button`,className:`jaw-ceo-voice-stop`,"aria-label":`Stop Jaw CEO voice`,onClick:e.onStop,children:`Stop`})]})})}var Qv=5e3;function $v(){return new Date().toISOString()}function ey(e){return{session:{sessionId:`pending`,inputMode:`text`,responseMode:`text`,selectedPort:e,openedAt:$v(),lastUserActivityAt:$v(),voiceArmed:!1,frontendPresence:`visible`,autoRead:!1},transcript:[],watches:[],pending:[],auditTail:[],voice:{status:`idle`,sessionId:null,model:`gpt-realtime-2`,voice:`marin`,error:null}}}function ty(e,t){let n=ey(t);return{...n,...e,session:{...n.session,...e.session??{},selectedPort:e.session?.selectedPort??t},transcript:Array.isArray(e.transcript)?e.transcript:[],watches:Array.isArray(e.watches)?e.watches:[],pending:Array.isArray(e.pending)?e.pending:[],auditTail:Array.isArray(e.auditTail)?e.auditTail:[],voice:{...n.voice,...e.voice??{}}}}function ny(e){return e.kind===`instance-completed`?`${e.kind}:${e.port}:${e.requestId||``}:${e.messageId||``}:${e.at}`:`${e.kind}:${e.port}:${e.messageId}:${e.role}:${e.at}`}function ry(e){return e.kind===`instance-message`?{kind:`instance-message`,port:e.port,messageId:e.messageId,role:e.role,at:e.at}:null}function iy(e){let[t,n]=(0,P.useState)(()=>ey(e.selectedPort)),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(null),[s,c]=(0,P.useState)(null),l=(0,P.useRef)(new Set),u=(0,P.useRef)(t);(0,P.useEffect)(()=>{u.current=t},[t]);let d=(0,P.useCallback)(async()=>{i(e=>e||`refresh`);try{let t=ty(await ov(),e.selectedPort),r=Array.from(new Set(t.watches.map(e=>e.port)));r.length>0&&await uv({ports:r}),n(ty(await ov(),e.selectedPort)),o(null)}catch(e){o(e.message)}finally{i(e=>e===`refresh`?null:e)}},[e.selectedPort]);(0,P.useEffect)(()=>{if(!e.documentVisible)return;let t=!1,n=null;async function r(){t||await d()}return r(),n=setInterval(()=>{r()},Qv),()=>{t=!0,n&&clearInterval(n)}},[e.documentVisible,d]),(0,P.useEffect)(()=>{let t=[];for(let n of e.managerEvents){let e=ry(n);if(!e)continue;let r=ny(e);l.current.has(r)||(l.current.add(r),t.push(e))}t.length!==0&&(async()=>{try{await uv({events:t}),await d()}catch(e){o(e.message)}})()},[e.managerEvents,d]);let f=(0,P.useCallback)(async(t,n=`text`)=>{i(`message`);try{let r=await lv({text:t,responseMode:n,selectedPort:e.selectedPort,...u.current.session.sessionId===`pending`?{}:{sessionId:u.current.session.sessionId}});return c(r.data?.response||r.error?.message||r.message||`Jaw CEO message completed.`),await d(),r}catch(e){let t=e.message;throw o(t),e}finally{i(null)}},[e.selectedPort,d]),p=(0,P.useCallback)(async e=>{i(`ack:${e}`);try{await pv(e,`ack`),await d()}finally{i(null)}},[d]),m=(0,P.useCallback)(async e=>{i(`dismiss:${e}`);try{await pv(e,`dismiss`),await d()}finally{i(null)}},[d]);return{state:t,pending:t.pending,audit:t.auditTail,busy:r!==null,error:a,lastResponse:s,refresh:d,sendText:f,continueCompletion:dv,summarizeCompletion:fv,ackCompletion:p,dismissCompletion:m}}var ay={start:[523.25,659.25],silent:[392],stop:[659.25,392],error:[220,196]};function oy(e){let t=window.AudioContext||window.webkitAudioContext;if(t)try{let n=new t,r=n.currentTime;ay[e].forEach((t,i)=>{let a=n.createOscillator(),o=n.createGain(),s=r+i*.085;a.type=e===`silent`?`sine`:`triangle`,a.frequency.setValueAtTime(t,s),o.gain.setValueAtTime(1e-4,s),o.gain.exponentialRampToValueAtTime(e===`silent`?.015:.024,s+.012),o.gain.exponentialRampToValueAtTime(1e-4,s+.105),a.connect(o),o.connect(n.destination),a.start(s),a.stop(s+.12)}),window.setTimeout(()=>void n.close().catch(()=>void 0),420)}catch{}}async function sy(e){if(!navigator.mediaDevices?.getUserMedia)throw Error(`Microphone capture is not available in this browser.`);let t=new RTCPeerConnection,n=t.createDataChannel(`oai-events`);n.onmessage=t=>{try{e.onRealtimeEvent(JSON.parse(t.data))}catch{e.onRealtimeEvent({type:`raw`,text:String(t.data)})}};let r=new MediaStream,i=document.createElement(`audio`);i.autoplay=!0,i.setAttribute(`playsinline`,``),i.srcObject=r,i.className=`jaw-ceo-voice-audio`,i.setAttribute(`aria-hidden`,`true`),document.body.appendChild(i),t.ontrack=e=>{for(let t of e.streams[0]?.getTracks()||[e.track])r.getTracks().includes(t)||r.addTrack(t)};let a=await navigator.mediaDevices.getUserMedia({audio:{noiseSuppression:!0,echoCancellation:!0,autoGainControl:!0}});for(let e of a.getTracks())t.addTrack(e,a);let o=await t.createOffer();if(await t.setLocalDescription(o),!o.sdp)throw Error(`Browser did not create a voice SDP offer.`);let s=await mv({offerSdp:o.sdp,selectedPort:e.selectedPort,...e.sessionId?{sessionId:e.sessionId}:{},responseMode:`voice`});await t.setRemoteDescription({type:`answer`,sdp:s.answerSdp});function c(){n.close();for(let e of a.getTracks())e.stop();t.close(),i.remove()}function l(e){for(let t of a.getAudioTracks())t.enabled=e}return{sessionId:s.sessionId,peer:t,dataChannel:n,micStream:a,audio:i,setMicEnabled:l,close:c}}var cy=4e3,ly=3e4;function uy(e){if(!e||typeof e!=`object`)return null;let t=e,n=String(t.type||``);return typeof t.delta==`string`&&(n===`response.audio_transcript.delta`||n===`response.text.delta`||n===`response.output_text.delta`)?t.delta:typeof t.transcript==`string`?t.transcript:typeof t.text==`string`&&(n.includes(`transcript`)||n.includes(`text`))?t.text:typeof t.output==`string`?t.output:null}function dy(e){return e===`response.audio_transcript.delta`||e===`response.text.delta`||e===`response.output_text.delta`}function fy(e){if(!e||typeof e!=`object`)return null;let t=e.type;return typeof t==`string`?t:null}function py(e){let[t,n]=(0,P.useState)(`idle`),[r,i]=(0,P.useState)(null),[a,o]=(0,P.useState)(null),[s,c]=(0,P.useState)(null),l=(0,P.useRef)(null),u=(0,P.useRef)(e),d=(0,P.useRef)(0),f=(0,P.useRef)(Date.now()),p=(0,P.useRef)(0),m=(0,P.useRef)(``);(0,P.useEffect)(()=>{u.current=e},[e]);function h(e,t){f.current=Date.now(),e&&o(e),t&&c(t.length>180?`${t.slice(0,177)}...`:t),n(e=>e===`silent`?`active`:e)}let g=(0,P.useCallback)(async()=>{d.current+=1;let e=l.current;l.current=null,e&&(e.close(),await hv(e.sessionId).catch(()=>void 0)),n(`sleeping`)},[]),_=(0,P.useCallback)(async()=>{if(t===`connecting`&&!l.current){d.current+=1,oy(`stop`),n(`paused`);return}l.current?.setMicEnabled(!1),oy(`stop`),n(`paused`)},[t]),v=(0,P.useCallback)(async()=>{await g(),oy(`stop`)},[g]),y=(0,P.useCallback)(async()=>{if(l.current){l.current.setMicEnabled(!0),f.current=Date.now(),i(null),oy(`start`),n(`active`);return}if(t===`connecting`)return;let e=d.current+1;d.current=e,n(`connecting`),i(null),o(null),c(null),m.current=``,oy(`start`);try{let t=await sy({selectedPort:u.current.selectedPort,...u.current.sessionId?{sessionId:u.current.sessionId}:{},onRealtimeEvent:e=>{let t=fy(e),n=uy(e),r=n&&dy(t)?`${m.current}${n}`:n;n&&dy(t)&&(m.current=r||``),t===`response.created`&&(m.current=``),h(t,r),r&&u.current.onTranscript(r)}});if(d.current!==e){t.close(),await hv(t.sessionId).catch(()=>void 0);return}l.current=t,f.current=Date.now(),n(`active`)}catch(t){if(d.current!==e)return;i(t.message),oy(`error`),n(t.message.includes(`OPENAI_API_KEY`)?`disabled`:`error`),l.current?.close(),l.current=null}},[t]),b=(0,P.useCallback)(async(e,t)=>{let n=e.trim();n&&await lv({text:n,selectedPort:u.current.selectedPort,...u.current.sessionId?{sessionId:u.current.sessionId}:{},inputMode:`voice`,responseMode:t})},[]),x=(0,P.useCallback)(async e=>{await dv(e.completionKey,`voice`),u.current.onSpokenCompletion(e.completionKey)},[]);return(0,P.useEffect)(()=>()=>{d.current+=1;let e=l.current;l.current=null,e&&(e.close(),hv(e.sessionId).catch(()=>void 0))},[]),(0,P.useEffect)(()=>{if(e.documentVisible)return;let t=l.current;t&&(d.current+=1,l.current=null,t.close(),hv(t.sessionId).catch(()=>void 0),n(`sleeping`))},[e.documentVisible]),(0,P.useEffect)(()=>{if(t!==`active`&&t!==`silent`)return;let e=window.setInterval(()=>{if(!l.current)return;let e=Date.now();e-f.current<cy||(n(`silent`),e-p.current>=ly&&(oy(`silent`),p.current=e))},1e3);return()=>window.clearInterval(e)},[t]),e.autoRead,{status:t,error:r,lastEventType:a,lastTranscript:s,talk:y,stop:_,end:v,sendText:b,speakCompletion:x}}function my(){let[e,t]=(0,P.useState)(()=>typeof document>`u`||document.visibilityState===`visible`);return(0,P.useEffect)(()=>{function e(){t(document.visibilityState===`visible`)}return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e}function hy(e){let[t,n]=(0,P.useState)(!1),r=my(),i=(0,P.useMemo)(()=>[...e.managerEvents,...e.messageEvents],[e.managerEvents,e.messageEvents]),a=iy({selectedPort:e.selectedPort,documentVisible:r,managerEvents:i}),o=a.state.session.sessionId===`pending`?null:a.state.session.sessionId,s=py({selectedPort:e.selectedPort,...o?{sessionId:o}:{},autoRead:a.state.session.autoRead,documentVisible:r,onTranscript:()=>void 0,onSpokenCompletion:e=>{a.ackCompletion(e)}}),c=s.status===`active`||s.status===`connecting`||s.status===`silent`;return{workbenchButton:(0,F.jsx)(Yv,{open:t,voiceStatus:s.status,busy:a.busy,error:a.error||s.error,onOpenConsole:()=>n(!0),onToggleVoice:()=>{c?s.stop():s.talk()}}),voiceOverlay:(0,F.jsx)(Zv,{status:s.status,selectedPort:e.selectedPort,lastEventType:s.lastEventType,lastTranscript:s.lastTranscript,onStop:()=>void s.stop()}),consoleContent:t?(0,F.jsx)(Kv,{open:!0,selectedPort:e.selectedPort,ceo:a,voice:s,onClose:()=>n(!1),onOpenWorker:e.onOpenWorker}):null}}function gy(e,t){if(e.length===0)return e;let n=new Set(t.map(e=>e.profileId)),r=e.filter(e=>n.has(e));return r.length===e.length?e:r}function _y(){let[e,t]=(0,P.useState)(null),[n,r]=(0,P.useState)(!0),[i,a]=(0,P.useState)(null),[o,s]=(0,P.useState)(``),[c,l]=(0,P.useState)(`all`),[u,d]=(0,P.useState)(``),[f,p]=(0,P.useState)(!1),[m,h]=(0,P.useState)(!1),[g,_]=(0,P.useState)(null),[v,b]=(0,P.useState)(null),[x,S]=(0,P.useState)(null),[ee,te]=(0,P.useState)(null),[C,ne]=(0,P.useState)([]),[re,ie]=(0,P.useState)(!1),[ae,oe]=(0,P.useState)(null),[se,le]=(0,P.useState)(`files`),[w,T]=(0,P.useState)(0),[ue,de]=(0,P.useState)(`display`),[fe,pe]=(0,P.useState)({kind:`overall`}),[me,E]=(0,P.useState)(`today`),[he,ge]=(0,P.useState)(()=>r_()),[_e,ve]=(0,P.useState)(0),[ye,be]=(0,P.useState)(!1),[xe,Se]=(0,P.useState)(!1),[Ce,we]=(0,P.useState)(null),Te=(0,P.useCallback)(e=>{we(e),Se(!0)},[]);(0,P.useEffect)(()=>{i_(he)},[he]),s_({enabled:he,onUnload:()=>{ge(!1),be(!0)}}),(0,P.useEffect)(()=>{if(!ye||typeof document>`u`||document.hidden)return;let e=setTimeout(()=>be(!1),8e3);return()=>clearTimeout(e)},[ye]);let De=y_(),D=b_(),Oe=M_(e=>{m&&De.save({ui:{uiTheme:e}})}),ke=I_(),Ae=X_(),je=e?.instances||[],Me=q_(je),Ne=L_(De.save,t),Pe=(0,P.useMemo)(()=>e?.manager.profiles||[],[e]),Fe=(0,P.useMemo)(()=>{let e=new Set(Pe.map(e=>e.profileId));return C.filter(t=>e.has(t))},[C,Pe]),Ie=(0,P.useMemo)(()=>{let e=o.trim().toLowerCase();return je.filter(t=>c!==`all`&&t.status!==c||Fe.length>0&&(!t.profileId||!Fe.includes(t.profileId))?!1:e?[String(t.port),t.url,qg(t),t.version,t.workingDir,t.currentCli,t.currentModel,t.healthReason,t.label,t.group,t.profileId].some(t=>String(t||``).toLowerCase().includes(e)):!0)},[Fe,je,o,c]),Le=(0,P.useMemo)(()=>D.selectedPort==null?Ie.find(e=>e.ok)||null:je.find(e=>e.port===D.selectedPort)||null,[Ie,je,D.selectedPort]),Re=hy({selectedPort:Le?.port??D.selectedPort??null,managerEvents:Ae.events,messageEvents:Me.events,onOpenWorker:Ze}),ze=D.activeDetailTab===`preview`&&D.sidebarMode===`instances`?Le?.port??null:null,Be=(0,P.useMemo)(()=>[...Ae.events,...Me.events],[Ae.events,Me.events]),Ve=E_({events:Be,activityDockCollapsed:D.activityDockCollapsed,setActivityDockCollapsed:D.setActivityDockCollapsed,saveUi:O,activePreviewPort:ze});function He(){let e=[`auto`,`light`,`dark`],t=e[(e.indexOf(Oe.theme)+1)%e.length];Oe.setTheme(t)}function Ue(){Le&&window.open(Le.url,`_blank`,`noopener,noreferrer`)}(0,P.useEffect)(()=>{document.documentElement.lang=D.locale},[D.locale]),(0,P.useEffect)(()=>{function e(e){e.key!==`?`||e.metaKey||e.ctrlKey||e.altKey||e_(e.target)||(e.preventDefault(),Te(`shortcuts`))}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[Te]);async function We(e=f){r(!0),a(null);try{let n=await y(e),r=gy(C,n.manager.profiles||[]);r!==C&&(ne(r),De.save({activeProfileFilter:r})),t(n)}catch(e){a(e.message)}finally{r(!1)}}async function Ge(e){let n=await ce(e);n&&t(t=>t&&{...t,instances:t.instances.map(t=>t.port===e?n:t)})}u_(`instances`,()=>void We(),`app`),(0,P.useEffect)(()=>{async function e(){try{let e=await De.refresh(),t=e.registry.ui;D.setSelectedPort(t.selectedPort),D.setActiveDetailTab(t.selectedTab),D.setSidebarCollapsed(t.sidebarCollapsed),D.setActivityDockCollapsed(t.activityDockCollapsed),D.setActivityDockHeight(t.activityDockHeight);let n=Qg(v_(window.location.search)??t.sidebarMode);D.setSidebarMode(n),n!==t.sidebarMode&&O({sidebarMode:n}),D.setNotesSelectedPath(t.notesSelectedPath),D.setNotesViewMode(t.notesViewMode),D.setNotesAuthoringMode(t.notesAuthoringMode??`plain`),D.setNotesWordWrap(t.notesWordWrap),D.setNotesTreeWidth(t.notesTreeWidth),D.setShowLatestActivityTitles(t.showLatestActivityTitles),D.setShowInlineLabelEditor(t.showInlineLabelEditor),D.setShowSidebarRuntimeLine(t.showSidebarRuntimeLine),D.setShowSelectedRowActions(t.showSelectedRowActions),D.setDashboardShortcutsEnabled(t.dashboardShortcutsEnabled),D.setDashboardShortcutKeymap(t.dashboardShortcutKeymap),D.setLocale(t.locale),Ve.hydrateSeenAt(t.activitySeenAt??null,t.activitySeenByPort||{}),ne(e.registry.activeProfileFilter||[]),Oe.syncFromRegistry(t.uiTheme)}finally{h(!0),await We()}}e()},[]);async function O(e){!m||e===void 0||await De.save({ui:e})}let Ke=(0,P.useMemo)(()=>je.reduce((e,t)=>(t.profileId&&(e[t.profileId]=(e[t.profileId]||0)+1),e),{}),[je]),qe=(0,P.useMemo)(()=>je.reduce((e,t)=>(e.total+=1,e[t.status]=(e[t.status]||0)+1,e),{total:0}),[je]);function Je(e){let t=C.includes(e)?C.filter(t=>t!==e):[...C,e];ne(t),De.save({activeProfileFilter:t})}function Ye(){return D.activeDetailTab!==`settings`||!re?!0:window.confirm(`Discard unsaved Settings changes?`)}function Xe(e){Ye()&&(ie(!1),Ve.markPortSeen(e.port),D.setSelectedPort(e.port),D.setActiveDetailTab(`preview`),D.setActivityDockCollapsed(!0),D.setDrawerOpen(!1),O({selectedPort:e.port,selectedTab:`preview`,activityDockCollapsed:!0}))}function Ze(e){let t=je.find(t=>t.port===e);t&&Xe(t)}function Qe(e){Ye()&&(ie(!1),Ve.markPortSeen(e.port),D.setSelectedPort(e.port),D.setDrawerOpen(!1),O({selectedPort:e.port}))}function $e(e){if(!(e!==`settings`&&!Ye())){if(e!==`settings`&&ie(!1),D.activeDetailTab===`preview`&&e!==`preview`){let e=D.selectedPort;e!=null&&Ve.markPortSeen(e)}if(D.setActiveDetailTab(e),e===`preview`){let t=D.selectedPort;t!=null&&Ve.markPortSeen(t),D.setActivityDockCollapsed(!0),O({selectedTab:e,activityDockCollapsed:!0});return}O({selectedTab:e})}}function et(){let e=!D.sidebarCollapsed;D.setSidebarCollapsed(e),O({sidebarCollapsed:e})}function tt(){if(D.activityDockCollapsed){Ve.openAndMarkSeen();return}Ve.closeAndPersistSeen()}function k(e){D.setActivityDockHeight(e),O({activityDockHeight:e})}function nt(e){if(D.sidebarMode===`instances`&&e!==`instances`&&D.activeDetailTab===`preview`){let e=D.selectedPort;e!=null&&Ve.markPortSeen(e)}let t=Qg(e);D.setSidebarMode(t),O({sidebarMode:t})}function rt(e){D.setNotesSelectedPath(e),O({notesSelectedPath:e})}function it(){le(`search`),T(e=>e+1)}function at(e){D.setNotesViewMode(e),O({notesViewMode:e})}function ot(e){D.setNotesAuthoringMode(e),O({notesAuthoringMode:e})}function st(e){D.setNotesWordWrap(e),O({notesWordWrap:e})}function A(e){D.setNotesTreeWidth(e),O({notesTreeWidth:e})}let ct=g_({active:D.sidebarMode===`notes`,selectedPath:D.notesSelectedPath,onSelectedPathChange:rt}),lt=D.notesSelectedPath?ct.index?.notes.find(e=>e.path===D.notesSelectedPath)??null:null;function ut(e){e.showLatestActivityTitles!==void 0&&D.setShowLatestActivityTitles(e.showLatestActivityTitles),e.showInlineLabelEditor!==void 0&&D.setShowInlineLabelEditor(e.showInlineLabelEditor),e.showSidebarRuntimeLine!==void 0&&D.setShowSidebarRuntimeLine(e.showSidebarRuntimeLine),e.showSelectedRowActions!==void 0&&D.setShowSelectedRowActions(e.showSelectedRowActions),e.dashboardShortcutsEnabled!==void 0&&D.setDashboardShortcutsEnabled(e.dashboardShortcutsEnabled),e.dashboardShortcutKeymap!==void 0&&D.setDashboardShortcutKeymap(e.dashboardShortcutKeymap),e.locale!==void 0&&D.setLocale(e.locale),O(e)}function dt(e){if(Ie.length===0)return;let t=Le?.port??null,n=t==null?-1:Ie.findIndex(e=>e.port===t),r=Ie[((n>=0?n:e>0?-1:0)+e+Ie.length)%Ie.length];r&&Qe(r)}function ft(e){if(e===`focusInstances`){nt(`instances`),D.setDrawerOpen(!1);return}if(e===`focusActiveSession`){let e=Le?.ok?Le:Ie.find(e=>e.ok)||null;e?Xe(e):nt(`instances`);return}if(e===`focusNotes`){nt(`notes`),D.setDrawerOpen(!1);return}if(e===`previousInstance`){dt(-1);return}e===`nextInstance`&&dt(1)}(0,P.useEffect)(()=>{function e(e){if(!D.dashboardShortcutsEnabled||tr(e.target))return;let t=$n(e,D.dashboardShortcutKeymap);t&&(e.preventDefault(),ft(t))}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[Ie,Le,D.dashboardShortcutsEnabled,D.dashboardShortcutKeymap,D.sidebarMode,D.activeDetailTab,re]),(0,P.useEffect)(()=>{function e(e){if(!D.dashboardShortcutsEnabled)return;let t=e.data;if(!t||t.type!==`jaw-preview-shortcut`)return;let n=$n({key:t.key,altKey:!!t.altKey,ctrlKey:!1,metaKey:!1,shiftKey:!!t.shiftKey},D.dashboardShortcutKeymap);n&&ft(n)}return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[Ie,Le,D.dashboardShortcutsEnabled,D.dashboardShortcutKeymap,D.sidebarMode,D.activeDetailTab,re]);async function j(e,t){let n=t.lifecycle;if(!n||e===`perm`&&!window.confirm(`Register :${t.port} as a persistent system service? It will auto-start on login and auto-restart on crash.`)||e===`unperm`&&!window.confirm(`Remove persistent service for :${t.port}? The instance will stop and won't auto-start.`))return;if(e===`stop`&&n.owner===`service`){if(!window.confirm(`Stop :${t.port}? This will also remove the persistent service.`))return}else if((e===`stop`||e===`restart`)&&!window.confirm(`${e} :${t.port}?`))return;if(!Ye())return;ie(!1);let r=t.uptime;_(t.port),b(null),S(t.port),te(e);try{let n=e===`start`?u:void 0,i=await Ee(e,t.port,n),a=i.expectedStateAfter||(e===`start`||e===`perm`?`online`:e===`stop`||e===`unperm`?`offline`:`restart-detected`);(await Zt({port:t.port,expected:a,previousUptime:r,fetchOnce:(e,t)=>ce(e,{signal:t})})).settled||b(`${i.message} (not yet reachable, refresh manually if needed)`),await We(),I({topics:[`instances`],reason:`instance:lifecycle`,source:`ui`,sourceId:`app`}),D.setSelectedPort(t.port)}catch(e){b(e.message)}finally{_(null),S(null),te(null)}}let pt=(0,F.jsx)(jn,{error:i,loading:n,instances:je,filtered:Ie,selectedInstance:Le,data:e,lifecycleBusyPort:g,transitioningPort:x,transitionAction:ee,activityUnreadByPort:Ve.unreadByPort,latestTitleByPort:Me.titlesByPort,busyPorts:Me.busyPorts,showLatestActivityTitles:D.showLatestActivityTitles,showInlineLabelEditor:D.showInlineLabelEditor,showSidebarRuntimeLine:D.showSidebarRuntimeLine,showSelectedRowActions:D.showSelectedRowActions,profiles:Pe,getLabel:qg,formatUptime:Jg,onSelect:Qe,onPreview:Xe,onMarkActivitySeen:Ve.markPortSeen,onInstanceLabelSave:Ne.saveInstanceLabel,onLifecycle:(e,t)=>void j(e,t)}),mt=(0,F.jsx)(t_,{instance:Le,previewEnabled:he,onPreviewEnabledChange:ge,onPreviewRefresh:()=>ve(e=>e+1),onOpenHelpTopic:Te}),ht=l_(D,Oe.theme),gt=c_(Me.titleSupportByPort);return(0,F.jsx)($g,{view:D,palette:ke,theme:Oe,query:o,loading:n,showHidden:f,instances:je,selectedInstance:Le,data:e,summary:qe,scheduleGroup:me,boardView:fe,notesModel:ct,notesSelectedNote:lt,notesDirtyPath:ae,notesSidebarMode:se,notesSearchFocusToken:w,settingsSection:ue,dashboardSettingsUi:ht,titleSupport:gt,activityEvents:Be,busyPorts:Me.busyPorts,titlesByPort:Me.titlesByPort,lifecycleMessage:v,error:i,registryMessage:De.error||Ne.error||Ae.error,workbenchHeader:mt,detailContent:t=>(0,F.jsx)(yn,{instance:Le,data:e,activeTab:t,onSettingsDirtyChange:ie,onSettingsSaved:()=>{Le&&Ge(Le.port),I({topics:[`instances`],reason:`instance:settings-saved`,source:`ui`,sourceId:`app`})},onRegistryPatch:(e,t)=>{De.save({instances:{[String(e)]:t}}).then(()=>{We(),I({topics:[`instances`],reason:`instance:registry-patched`,source:`ui`,sourceId:`app`})})}}),instanceListContent:pt,drawerProfileFilters:(e=>e.length>0?(0,F.jsx)(`div`,{className:`profile-chip-strip drawer-chip-strip`,"aria-label":`Profile filters`,children:e.map(e=>(0,F.jsx)(Mn,{profile:e,active:C.includes(e.profileId),count:Ke[e.profileId]||0,onToggle:Je},e.profileId))}):null)(Pe),jawCeoWorkbenchButton:Re.workbenchButton,jawCeoVoiceOverlay:Re.voiceOverlay,jawCeoConsoleContent:Re.consoleContent,previewEnabled:he,previewRefreshKey:_e,autoUnloadNotice:ye,helpOpen:xe,helpTopic:Ce,setQuery:s,setShowHidden:p,setPreviewEnabled:ge,setAutoUnloadNotice:be,setHelpOpen:Se,setHelpTopic:we,onOpenHelpTopic:Te,setNotesSidebarMode:le,setBoardView:pe,setScheduleGroup:E,setDashboardSettingsSection:de,load:We,cycleTheme:He,openSelectedInBrowser:Ue,handleSelectInstance:Qe,handleSidebarModeChange:nt,handleSidebarToggle:et,handleNotesSelectedPathChange:rt,handleNotesViewModeChange:at,handleNotesAuthoringModeChange:ot,handleNotesWordWrapChange:st,handleNotesTreeWidthChange:A,openNotesSidebarSearch:it,setNotesDirtyPath:oe,handleTabChange:$e,handleActivityToggle:tt,handleActivityHeight:k,onDismissLifecycleMessage:()=>b(null),handleDashboardSettingsPatch:ut,activityUnreadOpenAndMarkSeen:Ve.openAndMarkSeen})}var vy=document.getElementById(`manager-root`);if(!vy)throw Error(`manager-root not found`);(0,Xt.createRoot)(vy).render((0,F.jsx)(_y,{}));