kaizen-agent 1.86.0 → 1.87.1

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 (541) hide show
  1. package/README.md +1 -1
  2. package/cli/annotate-proxy.ts +6 -3
  3. package/cli/build-web.ts +46 -16
  4. package/cli/dev.ts +67 -0
  5. package/cli/docs.ts +1 -1
  6. package/cli/notes.ts +9 -3
  7. package/cli/ports.ts +121 -0
  8. package/cli/settings.ts +16 -17
  9. package/cli/state.ts +15 -29
  10. package/cli/task-service.ts +79 -17
  11. package/cli/tasks.ts +2 -2
  12. package/cli/term-image.ts +18 -0
  13. package/cli/ui-audit.allow.json +0 -1
  14. package/cli/ui-audit.ts +12 -12
  15. package/cli/web.ts +188 -58
  16. package/package.json +21 -4
  17. package/skills/kaizen/spec.md +10 -3
  18. package/tsconfig.json +16 -0
  19. package/web/README.md +105 -0
  20. package/web/{annotate.js → annotate/annotate.ts} +51 -50
  21. package/web/boot/boot.ts +7 -0
  22. package/web/components/annotate/annotate-bar.tsx +78 -0
  23. package/web/components/annotate/annotate-panel.tsx +20 -0
  24. package/web/components/annotate/annotate-settings.tsx +60 -0
  25. package/web/components/annotate/index.ts +1 -0
  26. package/web/components/annotate/notes-list.tsx +75 -0
  27. package/web/components/board/board-card.tsx +177 -0
  28. package/web/components/board/board-column.tsx +212 -0
  29. package/web/components/board/board-mode-switch.tsx +21 -0
  30. package/web/components/board/board-popups.tsx +45 -0
  31. package/web/components/board/card-footer.tsx +58 -0
  32. package/web/components/board/card-form.tsx +168 -0
  33. package/web/components/board/card-kids.tsx +53 -0
  34. package/web/components/board/clear-menu.tsx +36 -0
  35. package/web/components/board/filter-box.tsx +42 -0
  36. package/web/components/board/index.ts +6 -0
  37. package/web/components/board/run-form.tsx +129 -0
  38. package/web/components/board/severity-menu.tsx +44 -0
  39. package/web/components/board/status-strip.tsx +75 -0
  40. package/web/components/board/task-form.tsx +140 -0
  41. package/web/components/board/ws-card.tsx +38 -0
  42. package/web/components/context/context-panel.tsx +244 -0
  43. package/web/components/context/index.ts +1 -0
  44. package/web/components/decision/decision-bar.tsx +422 -0
  45. package/web/components/decision/index.ts +1 -0
  46. package/web/components/decision/inline-form.tsx +47 -0
  47. package/web/components/decision/plan-answers-form.tsx +78 -0
  48. package/web/components/decision/revise-form.tsx +65 -0
  49. package/web/components/decision/task-reply-form.tsx +48 -0
  50. package/web/components/footer/foot-bar.tsx +67 -0
  51. package/web/components/footer/index.ts +1 -0
  52. package/web/components/git/git-ask.tsx +88 -0
  53. package/web/components/git/git-commits.tsx +53 -0
  54. package/web/components/git/git-confirm.tsx +78 -0
  55. package/web/components/git/git-counts.tsx +10 -0
  56. package/web/components/git/git-files.tsx +113 -0
  57. package/web/components/git/git-head.tsx +70 -0
  58. package/web/components/git/git-icon.tsx +25 -0
  59. package/web/components/git/git-message.tsx +44 -0
  60. package/web/components/git/git-split.tsx +64 -0
  61. package/web/components/git/git-tab.tsx +55 -0
  62. package/web/components/git/index.ts +1 -0
  63. package/web/components/home/chat-list.tsx +57 -0
  64. package/web/components/home/home-composer.tsx +169 -0
  65. package/web/components/home/home-message.tsx +120 -0
  66. package/web/components/home/home-window.tsx +253 -0
  67. package/web/components/home/home-ws-add.tsx +47 -0
  68. package/web/components/home/index.ts +6 -0
  69. package/web/components/home/onboarding-dialog.tsx +371 -0
  70. package/web/components/icebox/board-chip.tsx +27 -0
  71. package/web/components/icebox/board-menu.tsx +41 -0
  72. package/web/components/icebox/bulk-bar.tsx +41 -0
  73. package/web/components/icebox/capture-box.tsx +155 -0
  74. package/web/components/icebox/choice-menu.tsx +39 -0
  75. package/web/components/icebox/collection-dialog.tsx +60 -0
  76. package/web/components/icebox/favicon.tsx +39 -0
  77. package/web/components/icebox/index.ts +10 -0
  78. package/web/components/icebox/kind-label.tsx +22 -0
  79. package/web/components/icebox/kind-menu.tsx +20 -0
  80. package/web/components/icebox/promote-form.tsx +93 -0
  81. package/web/components/icebox/reply-box.tsx +88 -0
  82. package/web/components/icebox/request-actions.tsx +141 -0
  83. package/web/components/icebox/request-badges.tsx +13 -0
  84. package/web/components/icebox/request-card.tsx +99 -0
  85. package/web/components/icebox/request-detail.tsx +43 -0
  86. package/web/components/icebox/request-images.tsx +33 -0
  87. package/web/components/icebox/request-phone-row.tsx +181 -0
  88. package/web/components/icebox/request-row.tsx +120 -0
  89. package/web/components/icebox/service-chip.tsx +58 -0
  90. package/web/components/icebox/snooze-menu.tsx +83 -0
  91. package/web/components/icebox/source-card.tsx +225 -0
  92. package/web/components/icebox/source-drawer.tsx +112 -0
  93. package/web/components/icebox/source-form.tsx +147 -0
  94. package/web/components/icebox/swipe-deck.tsx +242 -0
  95. package/web/components/layout/index.ts +1 -0
  96. package/web/components/layout/page-frame.tsx +44 -0
  97. package/web/components/markdown/index.ts +1 -0
  98. package/web/components/markdown/markdown.tsx +156 -0
  99. package/web/components/notebook/editor-pane.tsx +23 -0
  100. package/web/components/notebook/index.ts +5 -0
  101. package/web/components/notebook/note-body.tsx +172 -0
  102. package/web/components/notebook/note-tree.tsx +99 -0
  103. package/web/components/notebook/notes-head.tsx +37 -0
  104. package/web/components/notebook/notes-side.tsx +46 -0
  105. package/web/components/notes/index.ts +1 -0
  106. package/web/components/notes/note-composer.tsx +90 -0
  107. package/web/components/notes/notes-chat.tsx +58 -0
  108. package/web/components/panes/browser-pane.tsx +281 -0
  109. package/web/components/panes/index.ts +3 -0
  110. package/web/components/panes/preview-pane.tsx +91 -0
  111. package/web/components/panes/terminal-pane.tsx +52 -0
  112. package/web/components/phone/haptic.tsx +29 -0
  113. package/web/components/phone/index.ts +6 -0
  114. package/web/components/phone/phone-card.tsx +118 -0
  115. package/web/components/phone/phone-home.tsx +304 -0
  116. package/web/components/phone/phone-sheets.tsx +103 -0
  117. package/web/components/phone/qr-code.tsx +6 -0
  118. package/web/components/phone/usage-chips.tsx +85 -0
  119. package/web/components/phone/whatsapp-card.tsx +85 -0
  120. package/web/components/project/add-project-dialog.tsx +435 -0
  121. package/web/components/project/index.ts +3 -0
  122. package/web/components/project/project-bar.tsx +101 -0
  123. package/web/components/project/ws-menu.tsx +21 -0
  124. package/web/components/rail/agent-chips.tsx +110 -0
  125. package/web/components/rail/index.ts +4 -0
  126. package/web/components/rail/rail-filter.tsx +118 -0
  127. package/web/components/rail/rail-list.tsx +259 -0
  128. package/web/components/rail/source-marks.tsx +21 -0
  129. package/web/components/resources/index.ts +1 -0
  130. package/web/components/resources/resources-popup.tsx +490 -0
  131. package/web/components/run/doc-body.tsx +123 -0
  132. package/web/components/run/file-viewer.tsx +53 -0
  133. package/web/components/run/fix-form.tsx +88 -0
  134. package/web/components/run/index.ts +16 -0
  135. package/web/components/run/inline-md.tsx +30 -0
  136. package/web/components/run/key-hint.tsx +29 -0
  137. package/web/components/run/pane-gutter.tsx +52 -0
  138. package/web/components/run/pane-header.tsx +35 -0
  139. package/web/components/run/pane.tsx +140 -0
  140. package/web/components/run/panel-grip.tsx +49 -0
  141. package/web/components/run/panel-head.tsx +56 -0
  142. package/web/components/run/panel-tabs.tsx +35 -0
  143. package/web/components/run/phase-steps.tsx +37 -0
  144. package/web/components/run/project-notes.tsx +49 -0
  145. package/web/components/run/run-add-menu.tsx +80 -0
  146. package/web/components/run/run-bar.tsx +40 -0
  147. package/web/components/run/run-empty.tsx +10 -0
  148. package/web/components/run/run-footer.tsx +53 -0
  149. package/web/components/run/run-history.tsx +24 -0
  150. package/web/components/run/run-panes.tsx +78 -0
  151. package/web/components/run/run-picker.tsx +51 -0
  152. package/web/components/run/run-progress.tsx +30 -0
  153. package/web/components/run/run-tabs.tsx +147 -0
  154. package/web/components/run/run-wait.tsx +18 -0
  155. package/web/components/search/index.ts +1 -0
  156. package/web/components/search/search-palette.tsx +159 -0
  157. package/web/components/settings/account-rows.tsx +128 -0
  158. package/web/components/settings/agent-rows.tsx +249 -0
  159. package/web/components/settings/automation-rows.tsx +211 -0
  160. package/web/components/settings/browser-row.tsx +111 -0
  161. package/web/components/settings/cleanup-row.tsx +32 -0
  162. package/web/components/settings/commit-input.tsx +39 -0
  163. package/web/components/settings/index.ts +4 -0
  164. package/web/components/settings/integration-row.tsx +158 -0
  165. package/web/components/settings/mic-row.tsx +48 -0
  166. package/web/components/settings/orchestration-flow.tsx +87 -0
  167. package/web/components/settings/setting-row.tsx +131 -0
  168. package/web/components/settings/settings-item.tsx +78 -0
  169. package/web/components/settings/settings-loading.tsx +41 -0
  170. package/web/components/settings/settings-nav.tsx +119 -0
  171. package/web/components/settings/settings-scope.tsx +66 -0
  172. package/web/components/settings/settings-section.tsx +33 -0
  173. package/web/components/settings/skill-card.tsx +131 -0
  174. package/web/components/settings/stepper.tsx +74 -0
  175. package/web/components/settings/update-bar.tsx +167 -0
  176. package/web/components/shared/action-menu.tsx +76 -0
  177. package/web/components/shared/ask-host.tsx +18 -0
  178. package/web/components/shared/attach-button.tsx +23 -0
  179. package/web/components/shared/chip.tsx +19 -0
  180. package/web/components/shared/client-mark.tsx +15 -0
  181. package/web/components/shared/confirm-dialog.tsx +35 -0
  182. package/web/components/shared/empty-state.tsx +29 -0
  183. package/web/components/shared/field.tsx +77 -0
  184. package/web/components/shared/filter-popover.tsx +29 -0
  185. package/web/components/shared/form-frame.tsx +19 -0
  186. package/web/components/shared/icon-button.tsx +50 -0
  187. package/web/components/shared/index.ts +18 -0
  188. package/web/components/shared/mic-button.tsx +75 -0
  189. package/web/components/shared/pager.tsx +49 -0
  190. package/web/components/shared/picker.tsx +108 -0
  191. package/web/components/shared/project-mark.tsx +38 -0
  192. package/web/components/shared/segmented.tsx +43 -0
  193. package/web/components/shared/state-dot.tsx +4 -0
  194. package/web/components/shared/status-mark.tsx +26 -0
  195. package/web/components/shell/index.ts +3 -0
  196. package/web/components/shell/rail.tsx +259 -0
  197. package/web/components/shell/sprite.tsx +124 -0
  198. package/web/components/shell/wordmark.tsx +13 -0
  199. package/web/components/task/artifact-view.tsx +148 -0
  200. package/web/components/task/chat-bubble.tsx +43 -0
  201. package/web/components/task/filter-menu.tsx +38 -0
  202. package/web/components/task/index.ts +7 -0
  203. package/web/components/task/result-checks.tsx +34 -0
  204. package/web/components/task/result-view.tsx +113 -0
  205. package/web/components/task/status-badge.tsx +24 -0
  206. package/web/components/task/task-row.tsx +34 -0
  207. package/web/components/task/typing-dots.tsx +16 -0
  208. package/web/components/terminal/index.ts +3 -0
  209. package/web/components/terminal/terminal-bar.tsx +91 -0
  210. package/web/components/terminal/terminal-grid.tsx +149 -0
  211. package/web/components/terminal/terminal-modes.tsx +23 -0
  212. package/web/components/terminal/terminal-tile.tsx +139 -0
  213. package/web/dist/annotate.js +24 -0
  214. package/web/dist/board.css +718 -0
  215. package/web/dist/board.js +115 -0
  216. package/web/dist/boot.js +2 -0
  217. package/web/dist/notebook.css +319 -0
  218. package/web/dist/notebook.js +89 -0
  219. package/web/dist/popup.css +41 -0
  220. package/web/dist/popup.js +13 -0
  221. package/web/{term.js → dist/term.js} +48 -48
  222. package/web/dist/ui.css +3 -0
  223. package/web/dist/video.js +108 -0
  224. package/web/html/board.html +17 -0
  225. package/web/html/notes.html +14 -0
  226. package/web/html/popup.html +13 -0
  227. package/web/{video.html → html/video.html} +14 -15
  228. package/web/lib/annotate/index.ts +2 -0
  229. package/web/lib/annotate/notes.ts +105 -0
  230. package/web/lib/annotate/page.ts +121 -0
  231. package/web/lib/annotate/rules.ts +37 -0
  232. package/web/lib/annotate/session.ts +336 -0
  233. package/web/lib/board/board-actions.ts +119 -0
  234. package/web/lib/board/board-open.ts +12 -0
  235. package/web/lib/board/board-store.ts +159 -0
  236. package/web/lib/board/filter-box.ts +7 -0
  237. package/web/lib/board/index.ts +10 -0
  238. package/web/lib/board/nav.ts +29 -0
  239. package/web/lib/board/on-state.ts +90 -0
  240. package/web/lib/board/popups.ts +22 -0
  241. package/web/lib/board/snapshot.ts +105 -0
  242. package/web/lib/board/strip.ts +43 -0
  243. package/web/{board → lib/board}/ws-board.ts +1 -1
  244. package/web/lib/context/context-rules.ts +27 -0
  245. package/web/lib/context/context-store.ts +95 -0
  246. package/web/lib/context/feed.ts +28 -0
  247. package/web/lib/context/index.ts +3 -0
  248. package/web/lib/core/api.ts +86 -0
  249. package/web/lib/core/ask.ts +24 -0
  250. package/web/lib/core/board.ts +290 -0
  251. package/web/lib/core/brief.ts +31 -0
  252. package/web/lib/core/format.ts +8 -0
  253. package/web/lib/core/host.ts +107 -0
  254. package/web/lib/core/index.ts +16 -0
  255. package/web/{board → lib/core}/labels.ts +6 -5
  256. package/web/lib/core/layers.ts +7 -0
  257. package/web/lib/core/leave.ts +7 -0
  258. package/web/lib/core/motion.ts +10 -0
  259. package/web/{board/toast.ts → lib/core/notices.ts} +2 -20
  260. package/web/lib/core/notifier.ts +15 -0
  261. package/web/lib/core/store.ts +39 -0
  262. package/web/lib/core/term-handle.ts +8 -0
  263. package/web/lib/core/toast.ts +29 -0
  264. package/web/lib/core/utils.ts +15 -0
  265. package/web/lib/decision/index.ts +1 -0
  266. package/web/lib/decision/plan-questions.ts +39 -0
  267. package/web/lib/dictation/chunks.ts +93 -0
  268. package/web/lib/dictation/dictation-store.ts +22 -0
  269. package/web/lib/dictation/engine.ts +265 -0
  270. package/web/lib/dictation/index.ts +5 -0
  271. package/web/lib/dictation/mic.ts +42 -0
  272. package/web/lib/dictation/terminal-dictation.ts +50 -0
  273. package/web/lib/footer/footer-rules.ts +13 -0
  274. package/web/lib/footer/footer-store.ts +42 -0
  275. package/web/lib/footer/index.ts +2 -0
  276. package/web/lib/git/git-actions.ts +110 -0
  277. package/web/lib/git/git-panel.ts +43 -0
  278. package/web/lib/git/git-store.ts +47 -0
  279. package/web/lib/git/git.ts +170 -0
  280. package/web/lib/git/index.ts +4 -0
  281. package/web/lib/home/home-engine.ts +16 -0
  282. package/web/lib/home/home-events.ts +9 -0
  283. package/web/lib/home/home-store.ts +247 -0
  284. package/web/lib/home/home-window.ts +193 -0
  285. package/web/lib/home/home.ts +85 -0
  286. package/web/lib/home/index.ts +7 -0
  287. package/web/lib/home/onboarding.ts +199 -0
  288. package/web/lib/home/use-float-drag.ts +62 -0
  289. package/web/lib/icebox/icebox-actions.ts +518 -0
  290. package/web/lib/icebox/icebox-store.ts +112 -0
  291. package/web/lib/icebox/icebox-view.ts +48 -0
  292. package/web/lib/icebox/icebox.ts +273 -0
  293. package/web/lib/icebox/index.ts +8 -0
  294. package/web/lib/icebox/use-card-drag.ts +82 -0
  295. package/web/lib/icebox/use-ice-keys.ts +75 -0
  296. package/web/lib/icebox/use-icebox.ts +41 -0
  297. package/web/lib/icebox/use-row-swipe.ts +107 -0
  298. package/web/lib/markdown/index.ts +1 -0
  299. package/web/lib/markdown/markdown.ts +136 -0
  300. package/web/lib/notebook/autosave.ts +131 -0
  301. package/web/lib/notebook/deal.ts +58 -0
  302. package/web/lib/notebook/engine-complete.ts +128 -0
  303. package/web/lib/notebook/engine-preview.ts +287 -0
  304. package/web/lib/notebook/engine-types.ts +26 -0
  305. package/web/lib/notebook/engine-widgets.ts +218 -0
  306. package/web/lib/notebook/engine.ts +74 -0
  307. package/web/lib/notebook/index.ts +9 -0
  308. package/web/lib/notebook/kit-loader.ts +16 -0
  309. package/web/lib/notebook/kit.ts +12 -0
  310. package/web/{notes-lib.ts → lib/notebook/text.ts} +11 -10
  311. package/web/lib/notebook/vault-actions.ts +239 -0
  312. package/web/lib/notebook/vault-rules.ts +74 -0
  313. package/web/lib/notebook/vault-session.ts +73 -0
  314. package/web/lib/notebook/vault-store.ts +63 -0
  315. package/web/lib/notes/index.ts +4 -0
  316. package/web/lib/notes/md-html.ts +115 -0
  317. package/web/lib/notes/notes-actions.ts +32 -0
  318. package/web/lib/notes/notes-store.ts +22 -0
  319. package/web/lib/notes/notes.ts +58 -0
  320. package/web/{board → lib/notes}/rich.ts +1 -2
  321. package/web/lib/phone/index.ts +7 -0
  322. package/web/lib/phone/phone-actions.ts +77 -0
  323. package/web/lib/phone/phone-home.ts +102 -0
  324. package/web/lib/phone/phone-setup.ts +59 -0
  325. package/web/lib/phone/phone-sheet.ts +25 -0
  326. package/web/lib/phone/phone-store.ts +32 -0
  327. package/web/lib/phone/sheet-swipe.ts +55 -0
  328. package/web/lib/phone/use-phone-setup.ts +89 -0
  329. package/web/lib/project/add-project.ts +37 -0
  330. package/web/lib/project/branch.ts +14 -0
  331. package/web/lib/project/index.ts +5 -0
  332. package/web/lib/project/project-bar.ts +76 -0
  333. package/web/lib/project/project-pick.ts +36 -0
  334. package/web/lib/project/ws-menu.ts +8 -0
  335. package/web/lib/rail/agents.ts +63 -0
  336. package/web/lib/rail/card-links.ts +20 -0
  337. package/web/lib/rail/index.ts +7 -0
  338. package/web/lib/rail/rail-actions.ts +74 -0
  339. package/web/lib/rail/rail-boot.ts +99 -0
  340. package/web/lib/rail/rail-store.ts +85 -0
  341. package/web/lib/rail/rules.ts +241 -0
  342. package/web/lib/rail/source-marks.ts +17 -0
  343. package/web/lib/rail/use-rank-drag.ts +108 -0
  344. package/web/lib/resources/index.ts +3 -0
  345. package/web/lib/resources/resources-actions.ts +59 -0
  346. package/web/lib/resources/resources-store.ts +48 -0
  347. package/web/lib/resources/rules.ts +56 -0
  348. package/web/lib/router/index.ts +3 -0
  349. package/web/lib/router/route-rules.ts +96 -0
  350. package/web/lib/router/route-store.ts +115 -0
  351. package/web/lib/router/use-route-classes.ts +15 -0
  352. package/web/lib/run/browser.ts +53 -0
  353. package/web/lib/run/card-terminal.ts +32 -0
  354. package/web/lib/run/doc.ts +42 -0
  355. package/web/lib/run/grip.ts +8 -0
  356. package/web/lib/run/index.ts +19 -0
  357. package/web/lib/run/kept.ts +58 -0
  358. package/web/lib/run/layout-store.ts +156 -0
  359. package/web/lib/run/layout.ts +195 -0
  360. package/web/lib/run/panel-actions.ts +104 -0
  361. package/web/lib/run/panel-derive.ts +148 -0
  362. package/web/lib/run/panel-store.ts +125 -0
  363. package/web/lib/run/preview.ts +105 -0
  364. package/web/lib/run/run-actions.ts +118 -0
  365. package/web/lib/run/run-view-store.ts +134 -0
  366. package/web/lib/run/term-loader.ts +19 -0
  367. package/web/lib/run/use-panel-run.ts +125 -0
  368. package/web/lib/run/use-run-lifecycle.ts +70 -0
  369. package/web/lib/run/viewer.ts +12 -0
  370. package/web/lib/run/workspace.ts +281 -0
  371. package/web/lib/run/ws-actions.ts +293 -0
  372. package/web/lib/run/ws-derive.ts +50 -0
  373. package/web/lib/run/ws-draw.ts +102 -0
  374. package/web/lib/run/ws-store.ts +21 -0
  375. package/web/lib/run/ws-tabs.ts +125 -0
  376. package/web/lib/search/index.ts +3 -0
  377. package/web/lib/search/search-match.ts +48 -0
  378. package/web/lib/search/search-rows.ts +228 -0
  379. package/web/lib/search/search.ts +30 -0
  380. package/web/lib/search/use-search-rows.ts +22 -0
  381. package/web/lib/server/attention.ts +29 -0
  382. package/web/lib/server/index.ts +6 -0
  383. package/web/lib/server/poll-rules.ts +57 -0
  384. package/web/lib/server/poller.ts +210 -0
  385. package/web/lib/server/server-store.ts +39 -0
  386. package/web/lib/server/types.ts +31 -0
  387. package/web/lib/server/use-server.ts +19 -0
  388. package/web/lib/settings/agent-favicons.ts +14 -0
  389. package/web/lib/settings/index.ts +7 -0
  390. package/web/lib/settings/panel-settings.ts +29 -0
  391. package/web/lib/settings/settings-actions.ts +357 -0
  392. package/web/lib/settings/settings-store.ts +114 -0
  393. package/web/lib/settings/settings.ts +413 -0
  394. package/web/lib/settings/skill-icons.ts +24 -0
  395. package/web/lib/settings/update.ts +70 -0
  396. package/web/lib/shared/data-urls.ts +32 -0
  397. package/web/lib/shared/index.ts +4 -0
  398. package/web/lib/shared/use-draft.ts +38 -0
  399. package/web/lib/shared/use-narrow.ts +11 -0
  400. package/web/lib/shared/use-pager.ts +24 -0
  401. package/web/lib/shell/appearance.ts +97 -0
  402. package/web/lib/shell/help-store.ts +4 -0
  403. package/web/lib/shell/index.ts +4 -0
  404. package/web/lib/shell/shell-store.ts +23 -0
  405. package/web/lib/shell/stored-look.ts +47 -0
  406. package/web/lib/task/index.ts +7 -0
  407. package/web/lib/task/task-results.ts +92 -0
  408. package/web/lib/task/tasks.ts +134 -0
  409. package/web/lib/task/use-live-frame.ts +85 -0
  410. package/web/lib/task/use-saved-text.ts +25 -0
  411. package/web/lib/task/use-task.ts +161 -0
  412. package/web/lib/task/use-tasks.ts +50 -0
  413. package/web/{board → lib/task}/zoom.ts +25 -12
  414. package/web/lib/terminal/hidden-badge.ts +15 -0
  415. package/web/lib/terminal/index.ts +8 -0
  416. package/web/lib/terminal/layout.ts +138 -0
  417. package/web/{term-font.ts → lib/terminal/term-font.ts} +3 -2
  418. package/web/lib/terminal/terminal-store.ts +65 -0
  419. package/web/lib/terminal/terms-feed.ts +37 -0
  420. package/web/lib/terminal/use-arranged.ts +15 -0
  421. package/web/lib/terminal/use-terminal-keys.ts +37 -0
  422. package/web/lib/url/index.ts +1 -0
  423. package/web/lib/url/safe-url.ts +9 -0
  424. package/web/notebook/notebook.ts +27 -0
  425. package/web/notebook/notes-lib.ts +3 -0
  426. package/web/pages/board/App.tsx +76 -0
  427. package/web/pages/board/header.tsx +83 -0
  428. package/web/pages/board/help.tsx +59 -0
  429. package/web/pages/board/host-bridge.ts +94 -0
  430. package/web/pages/board/host.tsx +19 -0
  431. package/web/pages/board/keys.ts +112 -0
  432. package/web/pages/board/live.ts +39 -0
  433. package/web/pages/board/main.ts +32 -0
  434. package/web/pages/board/pages.tsx +86 -0
  435. package/web/pages/board/panel.tsx +157 -0
  436. package/web/pages/board/portal.tsx +39 -0
  437. package/web/pages/board/use-boot.ts +13 -0
  438. package/web/pages/board/views.ts +63 -0
  439. package/web/pages/board-page.tsx +62 -0
  440. package/web/pages/home-page.tsx +127 -0
  441. package/web/pages/icebox-page.tsx +440 -0
  442. package/web/pages/notebook/App.tsx +35 -0
  443. package/web/pages/notebook-page.tsx +50 -0
  444. package/web/pages/popup/App.tsx +207 -0
  445. package/web/pages/settings-page.tsx +111 -0
  446. package/web/pages/task-page.tsx +397 -0
  447. package/web/pages/tasks-page.tsx +151 -0
  448. package/web/pages/terminal-page.tsx +15 -0
  449. package/web/popup/popup.ts +7 -0
  450. package/web/{term.ts → term/term.ts} +48 -20
  451. package/web/ui/alert-dialog.tsx +39 -0
  452. package/web/ui/badge.tsx +20 -0
  453. package/web/ui/button.tsx +37 -0
  454. package/web/ui/checkbox.tsx +20 -0
  455. package/web/ui/command.tsx +41 -0
  456. package/web/ui/dialog.tsx +28 -0
  457. package/web/ui/dropdown-menu.tsx +54 -0
  458. package/web/ui/icon.tsx +17 -0
  459. package/web/ui/index.ts +21 -0
  460. package/web/ui/input.tsx +9 -0
  461. package/web/ui/label.tsx +7 -0
  462. package/web/ui/legacy/board.css +715 -0
  463. package/web/{notes.html → ui/legacy/notes.css} +23 -157
  464. package/web/ui/legacy/popup.css +40 -0
  465. package/web/ui/popover.tsx +28 -0
  466. package/web/ui/select.tsx +61 -0
  467. package/web/ui/sheet.tsx +43 -0
  468. package/web/ui/skeleton.tsx +6 -0
  469. package/web/ui/sonner.tsx +25 -0
  470. package/web/ui/spinner.tsx +12 -0
  471. package/web/ui/switch.tsx +18 -0
  472. package/web/ui/tabs.tsx +18 -0
  473. package/web/ui/textarea.tsx +14 -0
  474. package/web/ui/theme.css +125 -0
  475. package/web/ui/toggle.tsx +8 -0
  476. package/web/ui/tooltip.tsx +26 -0
  477. package/web/{video.ts → video/video.ts} +5 -5
  478. package/web/board/add-project.ts +0 -147
  479. package/web/board/agent-favicons.ts +0 -9
  480. package/web/board/agent-term.ts +0 -51
  481. package/web/board/annotate-lib.ts +0 -19
  482. package/web/board/annotate.ts +0 -221
  483. package/web/board/api.ts +0 -180
  484. package/web/board/approvals.ts +0 -109
  485. package/web/board/badge.ts +0 -115
  486. package/web/board/cards.ts +0 -1080
  487. package/web/board/chat.ts +0 -128
  488. package/web/board/context.ts +0 -248
  489. package/web/board/dictation.ts +0 -343
  490. package/web/board/dom.ts +0 -132
  491. package/web/board/drafts.ts +0 -21
  492. package/web/board/fixes.ts +0 -89
  493. package/web/board/git.ts +0 -416
  494. package/web/board/home-ws.ts +0 -266
  495. package/web/board/home.ts +0 -421
  496. package/web/board/icebox.ts +0 -1788
  497. package/web/board/keys.ts +0 -121
  498. package/web/board/live.ts +0 -87
  499. package/web/board/main.ts +0 -94
  500. package/web/board/markdown.ts +0 -210
  501. package/web/board/onboarding.ts +0 -227
  502. package/web/board/panel.ts +0 -437
  503. package/web/board/phone-setup.ts +0 -79
  504. package/web/board/phone.ts +0 -219
  505. package/web/board/projects.ts +0 -277
  506. package/web/board/resources.ts +0 -170
  507. package/web/board/run-pick.ts +0 -41
  508. package/web/board/run-view.ts +0 -1316
  509. package/web/board/search-match.ts +0 -20
  510. package/web/board/search.ts +0 -330
  511. package/web/board/settings-accounts.ts +0 -76
  512. package/web/board/settings-agents.ts +0 -102
  513. package/web/board/settings-automations.ts +0 -71
  514. package/web/board/settings-cleanup.ts +0 -42
  515. package/web/board/settings-orchestration.ts +0 -32
  516. package/web/board/settings-pages.ts +0 -62
  517. package/web/board/settings-skills.ts +0 -103
  518. package/web/board/settings-voice.ts +0 -28
  519. package/web/board/settings.ts +0 -490
  520. package/web/board/store.ts +0 -47
  521. package/web/board/task-page.ts +0 -628
  522. package/web/board/task-results.ts +0 -234
  523. package/web/board/tasks.ts +0 -242
  524. package/web/board/terms.ts +0 -390
  525. package/web/board/update.ts +0 -171
  526. package/web/board/viewer.ts +0 -47
  527. package/web/board/views.ts +0 -164
  528. package/web/board/whatsapp-setup.ts +0 -149
  529. package/web/board/workspace.ts +0 -650
  530. package/web/board/ws-board-ui.ts +0 -95
  531. package/web/board/ws-tabs.ts +0 -227
  532. package/web/board.html +0 -1563
  533. package/web/board.js +0 -505
  534. package/web/notebook.js +0 -519
  535. package/web/notebook.ts +0 -1254
  536. package/web/popup.html +0 -141
  537. package/web/video.js +0 -575
  538. /package/web/{term.css → dist/term.css} +0 -0
  539. /package/web/{board/term-sessions.ts → lib/terminal/sessions.ts} +0 -0
  540. /package/web/{board/terminal-viewport.ts → lib/terminal/viewport.ts} +0 -0
  541. /package/web/{term-paste.ts → term/term-paste.ts} +0 -0
@@ -0,0 +1,89 @@
1
+ /* kaizen notebook df179b2b6cc14e38 -- generated by bun run build:web from web/notebook/notebook.ts; do not edit */
2
+ var R8=Object.defineProperty;var pC=(e,t,n)=>{for(var r in t)R8(e,r,{get:t[r],set:n[r],enumerable:!0,configurable:!0})};var me={};pC(me,{Activity:()=>PC,Children:()=>Vr,Component:()=>TC,Fragment:()=>er,Profiler:()=>AC,PureComponent:()=>QC,StrictMode:()=>EC,Suspense:()=>MC,ViewTransition:()=>$C,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:()=>Fl,__COMPILER_RUNTIME:()=>DC,addTransitionType:()=>_C,cache:()=>NC,cacheSignal:()=>LC,cloneElement:()=>xr,createContext:()=>gn,createElement:()=>oe,createRef:()=>zC,forwardRef:()=>B,isValidElement:()=>On,lazy:()=>jC,memo:()=>IC,startTransition:()=>XC,unstable_useCacheRefresh:()=>BC,use:()=>ZC,useActionState:()=>UC,useCallback:()=>G,useContext:()=>bn,useDebugValue:()=>q0,useDeferredValue:()=>YC,useEffect:()=>L,useEffectEvent:()=>VC,useId:()=>uf,useImperativeHandle:()=>qC,useInsertionEffect:()=>GC,useLayoutEffect:()=>Lt,useMemo:()=>ce,useOptimistic:()=>HC,useReducer:()=>Kl,useRef:()=>T,useState:()=>A,useSyncExternalStore:()=>Jl,useTransition:()=>WC,version:()=>ip},{Activity:(Nne)=>PC=Nne,Children:(Nne)=>Vr=Nne,Component:(Nne)=>TC=Nne,Fragment:(Nne)=>er=Nne,Profiler:(Nne)=>AC=Nne,PureComponent:(Nne)=>QC=Nne,StrictMode:(Nne)=>EC=Nne,Suspense:(Nne)=>MC=Nne,ViewTransition:(Nne)=>$C=Nne,__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:(Nne)=>Fl=Nne,__COMPILER_RUNTIME:(Nne)=>DC=Nne,addTransitionType:(Nne)=>_C=Nne,cache:(Nne)=>NC=Nne,cacheSignal:(Nne)=>LC=Nne,cloneElement:(Nne)=>xr=Nne,createContext:(Nne)=>gn=Nne,createElement:(Nne)=>oe=Nne,createRef:(Nne)=>zC=Nne,forwardRef:(Nne)=>B=Nne,isValidElement:(Nne)=>On=Nne,lazy:(Nne)=>jC=Nne,memo:(Nne)=>IC=Nne,startTransition:(Nne)=>XC=Nne,unstable_useCacheRefresh:(Nne)=>BC=Nne,use:(Nne)=>ZC=Nne,useActionState:(Nne)=>UC=Nne,useCallback:(Nne)=>G=Nne,useContext:(Nne)=>bn=Nne,useDebugValue:(Nne)=>q0=Nne,useDeferredValue:(Nne)=>YC=Nne,useEffect:(Nne)=>L=Nne,useEffectEvent:(Nne)=>VC=Nne,useId:(Nne)=>uf=Nne,useImperativeHandle:(Nne)=>qC=Nne,useInsertionEffect:(Nne)=>GC=Nne,useLayoutEffect:(Nne)=>Lt=Nne,useMemo:(Nne)=>ce=Nne,useOptimistic:(Nne)=>HC=Nne,useReducer:(Nne)=>Kl=Nne,useRef:(Nne)=>T=Nne,useState:(Nne)=>A=Nne,useSyncExternalStore:(Nne)=>Jl=Nne,useTransition:(Nne)=>WC=Nne,version:(Nne)=>ip=Nne});var ga={};pC(ga,{unstable_now:()=>qr,unstable_IdlePriority:()=>fp,unstable_ImmediatePriority:()=>dp,unstable_LowPriority:()=>hp,unstable_NormalPriority:()=>Oa,unstable_Profiling:()=>s2,unstable_UserBlockingPriority:()=>pp,unstable_cancelCallback:()=>mp,unstable_forceFrameRate:()=>a2,unstable_getCurrentPriorityLevel:()=>gp,unstable_next:()=>l2,unstable_requestPaint:()=>Op,unstable_runWithPriority:()=>c2,unstable_scheduleCallback:()=>ba,unstable_shouldYield:()=>bp,unstable_wrapCallback:()=>u2},{unstable_now:(jne)=>qr=jne,unstable_IdlePriority:(jne)=>fp=jne,unstable_ImmediatePriority:(jne)=>dp=jne,unstable_LowPriority:(jne)=>hp=jne,unstable_NormalPriority:(jne)=>Oa=jne,unstable_Profiling:(jne)=>s2=jne,unstable_UserBlockingPriority:(jne)=>pp=jne,unstable_cancelCallback:(jne)=>mp=jne,unstable_forceFrameRate:(jne)=>a2=jne,unstable_getCurrentPriorityLevel:(jne)=>gp=jne,unstable_next:(jne)=>l2=jne,unstable_requestPaint:(jne)=>Op=jne,unstable_runWithPriority:(jne)=>c2=jne,unstable_scheduleCallback:(jne)=>ba=jne,unstable_shouldYield:(jne)=>bp=jne,unstable_wrapCallback:(jne)=>u2=jne});var B0=Symbol.for("react.transitional.element"),P8=Symbol.for("react.portal"),T8=Symbol.for("react.fragment"),A8=Symbol.for("react.strict_mode"),Q8=Symbol.for("react.profiler"),E8=Symbol.for("react.consumer"),M8=Symbol.for("react.context"),$8=Symbol.for("react.forward_ref"),D8=Symbol.for("react.suspense"),_8=Symbol.for("react.memo"),yC=Symbol.for("react.lazy"),N8=Symbol.for("react.activity"),L8=Symbol.for("react.view_transition"),mC=Symbol.iterator;function z8(e){if(e===null||typeof e!=="object")return null;return e=mC&&e[mC]||e["@@iterator"],typeof e==="function"?e:null}var vC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xC=Object.assign,wC={};function Wl(e,t,n){this.props=e,this.context=t,this.refs=wC,this.updater=n||vC}Wl.prototype.isReactComponent={};Wl.prototype.setState=function(e,t){if(typeof e!=="object"&&typeof e!=="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Wl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function SC(){}SC.prototype=Wl.prototype;function Z0(e,t,n){this.props=e,this.context=t,this.refs=wC,this.updater=n||vC}var U0=Z0.prototype=new SC;U0.constructor=Z0;xC(U0,Wl.prototype);U0.isPureReactComponent=!0;var gC=Array.isArray;function X0(){}var ct={H:null,A:null,T:null,S:null},kC=Object.prototype.hasOwnProperty;function Y0(e,t,n){var r=n.ref;return{$$typeof:B0,type:e,key:t,ref:r!==void 0?r:null,props:n}}function j8(e,t){return Y0(e.type,t,e.props)}function V0(e){return typeof e==="object"&&e!==null&&e.$$typeof===B0}function I8(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var OC=/\/+/g;function I0(e,t){return typeof e==="object"&&e!==null&&e.key!=null?I8(""+e.key):t.toString(36)}function X8(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status==="string"?e.then(X0,X0):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Hl(e,t,n,r,o){var i=typeof e;if(i==="undefined"||i==="boolean")e=null;var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case B0:case P8:s=!0;break;case yC:return s=e._init,Hl(s(e._payload),t,n,r,o)}}if(s)return o=o(e),s=r===""?"."+I0(e,0):r,gC(o)?(n="",s!=null&&(n=s.replace(OC,"$&/")+"/"),Hl(o,t,n,"",function(c){return c})):o!=null&&(V0(o)&&(o=j8(o,n+(o.key==null||e&&e.key===o.key?"":(""+o.key).replace(OC,"$&/")+"/")+s)),t.push(o)),1;s=0;var a=r===""?".":r+":";if(gC(e))for(var l=0;l<e.length;l++)r=e[l],i=a+I0(r,l),s+=Hl(r,t,n,i,o);else if(l=z8(e),typeof l==="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,i=a+I0(r,l++),s+=Hl(r,t,n,i,o);else if(i==="object"){if(typeof e.then==="function")return Hl(X8(e),t,n,r,o);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function op(e,t,n){if(e==null)return e;var r=[],o=0;return Hl(e,r,"","",function(i){return t.call(n,i,o++)}),r}function B8(e){if(e._status===-1){var t=e._result,n=t();n.then(function(r){if(e._status===0||e._status===-1)e._status=1,e._result=r,n.status===void 0&&(n.status="fulfilled",n.value=r)},function(r){if(e._status===0||e._status===-1)e._status=2,e._result=r,n.status===void 0&&(n.status="rejected",n.reason=r)}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var bC=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!==null&&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)};function CC(e){var t=ct.T,n={};n.types=t!==null?t.types:null,ct.T=n;try{var r=e(),o=ct.S;o!==null&&o(n,r),typeof r==="object"&&r!==null&&typeof r.then==="function"&&r.then(X0,bC)}catch(i){bC(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),ct.T=t}}function RC(e){var t=ct.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else CC(RC.bind(null,e))}var Z8={map:op,forEach:function(e,t,n){op(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return op(e,function(){t++}),t},toArray:function(e){return op(e,function(t){return t})||[]},only:function(e){if(!V0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};var PC=N8,Vr=Z8,TC=Wl,er=T8,AC=Q8,QC=Z0,EC=A8,MC=D8,$C=L8,Fl=ct,DC={__proto__:null,c:function(e){return ct.H.useMemoCache(e)}},_C=RC,NC=function(e){return function(){return e.apply(null,arguments)}},LC=function(){return null},xr=function(e,t,n){if(e===null||e===void 0)throw Error("The argument must be a React element, but you passed "+e+".");var r=xC({},e.props),o=e.key;if(t!=null)for(i in t.key!==void 0&&(o=""+t.key),t)!kC.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var s=Array(i),a=0;a<i;a++)s[a]=arguments[a+2];r.children=s}return Y0(e.type,o,r)},gn=function(e){return e={$$typeof:M8,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:E8,_context:e},e},oe=function(e,t,n){var r,o={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)kC.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var a=Array(s),l=0;l<s;l++)a[l]=arguments[l+2];o.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return Y0(e,i,o)},zC=function(){return{current:null}},B=function(e){return{$$typeof:$8,render:e}},On=V0,jC=function(e){return{$$typeof:yC,_payload:{_status:-1,_result:e},_init:B8}},IC=function(e,t){return{$$typeof:_8,type:e,compare:t===void 0?null:t}},XC=CC,BC=function(){return ct.H.useCacheRefresh()},ZC=function(e){return ct.H.use(e)},UC=function(e,t,n){return ct.H.useActionState(e,t,n)},G=function(e,t){return ct.H.useCallback(e,t)},bn=function(e){return ct.H.useContext(e)},q0=function(){},YC=function(e,t){return ct.H.useDeferredValue(e,t)},L=function(e,t){return ct.H.useEffect(e,t)},VC=function(e){return ct.H.useEffectEvent(e)},uf=function(){return ct.H.useId()},qC=function(e,t,n){return ct.H.useImperativeHandle(e,t,n)},GC=function(e,t){return ct.H.useInsertionEffect(e,t)},Lt=function(e,t){return ct.H.useLayoutEffect(e,t)},ce=function(e,t){return ct.H.useMemo(e,t)},HC=function(e,t){return ct.H.useOptimistic(e,t)},Kl=function(e,t,n){return ct.H.useReducer(e,t,n)},T=function(e){return ct.H.useRef(e)},A=function(e){return ct.H.useState(e)},Jl=function(e,t,n){return ct.H.useSyncExternalStore(e,t,n)},WC=function(){return ct.H.useTransition()},ip="19.3.1";function JC(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(JC)}catch(e){console.error(e)}}function KC(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 is(){}var ff={d:{f:is,r:function(){throw Error(KC(522))},D:is,C:is,L:is,m:is,X:is,S:is,M:is},p:0,findDOMNode:null},U8=Symbol.for("react.portal");var FC=Symbol.for("react.optimistic_key");function Y8(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:U8,key:r==null?null:r===FC?FC:""+r,children:e,containerInfo:t,implementation:n}}var G0=Fl;var H0=ff;var ec=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(KC(299));return Y8(e,t,null,n)},wr=function(e){var t=G0.T,n=ff.p;try{if(G0.T=null,ff.p=2,e)return e()}finally{G0.T=t,ff.p=n,ff.d.f()}};JC();function BA(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(BA)}catch(e){console.error(e)}}function F0(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(0<sp(o,t))e[r]=t,e[n]=o,n=r;else break e}}function ko(e){return e.length===0?null:e[0]}function up(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,i=o>>>1;r<i;){var s=2*(r+1)-1,a=e[s],l=s+1,c=e[l];if(0>sp(a,n))l<o&&0>sp(c,a)?(e[r]=c,e[l]=n,r=l):(e[r]=a,e[s]=n,r=s);else if(l<o&&0>sp(c,n))e[r]=c,e[l]=n,r=l;else break e}}return t}function sp(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var qr=void 0;if(typeof performance==="object"&&typeof performance.now==="function")K0=performance,qr=function(){return K0.now()};else ap=Date,J0=ap.now(),qr=function(){return ap.now()-J0};var K0,ap,J0,ui=[],ss=[],V8=1,Sr=null,yn=3,eb=!1,df=!1,hf=!1,nb=!1,t2=typeof setTimeout==="function"?setTimeout:null,n2=typeof clearTimeout==="function"?clearTimeout:null,e2=typeof setImmediate<"u"?setImmediate:null;function lp(e){for(var t=ko(ss);t!==null;){if(t.callback===null)up(ss);else if(t.startTime<=e)up(ss),t.sortIndex=t.expirationTime,F0(ui,t);else break;t=ko(ss)}}function rb(e){if(hf=!1,lp(e),!df)if(ko(ui)!==null)df=!0,rc||(rc=!0,nc());else{var t=ko(ss);t!==null&&ob(rb,t.startTime-e)}}var rc=!1,pf=-1,r2=5,o2=-1;function i2(){return nb?!0:ga.unstable_now()-o2<r2?!1:!0}function W0(){if(nb=!1,rc){var e=ga.unstable_now();o2=e;var t=!0;try{e:{df=!1,hf&&(hf=!1,n2(pf),pf=-1),eb=!0;var n=yn;try{t:{lp(e);for(Sr=ko(ui);Sr!==null&&!(Sr.expirationTime>e&&i2());){var r=Sr.callback;if(typeof r==="function"){Sr.callback=null,yn=Sr.priorityLevel;var o=r(Sr.expirationTime<=e);if(e=ga.unstable_now(),typeof o==="function"){Sr.callback=o,lp(e),t=!0;break t}Sr===ko(ui)&&up(ui),lp(e)}else up(ui);Sr=ko(ui)}if(Sr!==null)t=!0;else{var i=ko(ss);i!==null&&ob(rb,i.startTime-e),t=!1}}break e}finally{Sr=null,yn=n,eb=!1}t=void 0}}finally{t?nc():rc=!1}}}var nc;if(typeof e2==="function")nc=function(){e2(W0)};else if(typeof MessageChannel<"u")cp=new MessageChannel,tb=cp.port2,cp.port1.onmessage=W0,nc=function(){tb.postMessage(null)};else nc=function(){t2(W0,0)};var cp,tb;function ob(e,t){pf=t2(function(){e(ga.unstable_now())},t)}var fp=5,dp=1,hp=4,Oa=3,s2=null,pp=2,mp=function(e){e.callback=null},a2=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"):r2=0<e?Math.floor(1000/e):5},gp=function(){return yn},l2=function(e){switch(yn){case 1:case 2:case 3:var t=3;break;default:t=yn}var n=yn;yn=t;try{return e()}finally{yn=n}},Op=function(){nb=!0},c2=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=yn;yn=e;try{return t()}finally{yn=n}},ba=function(e,t,n){var r=ga.unstable_now();switch(typeof n==="object"&&n!==null?(n=n.delay,n=typeof n==="number"&&0<n?r+n:r):n=r,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5000}return o=n+o,e={id:V8++,callback:t,priorityLevel:e,startTime:n,expirationTime:o,sortIndex:-1},n>r?(e.sortIndex=n,F0(ss,e),ko(ui)===null&&e===ko(ss)&&(hf?(n2(pf),pf=-1):hf=!0,ob(rb,n-r))):(e.sortIndex=o,F0(ui,e),df||eb||(df=!0,rc||(rc=!0,nc()))),e},bp=i2,u2=function(e){var t=yn;return function(){var n=yn;yn=t;try{return e.apply(this,arguments)}finally{yn=n}}};function z(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 q8(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function od(e){for(var t=e,n=t;n&&!n.alternate;)t=n,(t.flags&4098)!==0&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function qR(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 GR(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 f2(e){if(od(e)!==e)throw Error(z(188))}function G8(e){var t=e.alternate;if(!t){if(t=od(e),t===null)throw Error(z(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return f2(o),e;if(i===r)return f2(o),t;i=i.sibling}throw Error(z(188))}if(n.return!==r.return)n=o,r=i;else{for(var s=!1,a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s){for(a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s)throw Error(z(189))}}if(n.alternate!==r)throw Error(z(190))}if(n.tag!==3)throw Error(z(188));return n.stateNode.current===n?e:t}function HR(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=HR(e),t!==null)return t;e=e.sibling}return null}function Bn(e,t,n,r,o,i){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,o,i)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&Bn(e.child,t,n,r,o,i))return!0;e=e.sibling}return!1}function Ba(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function d2(e){var t=!1;for(e=e.return;e!==null;){if(e.tag===4&&(t=!0),e.tag===3||e.tag===5||e.tag===27)break;e=e.return}return t}function WR(e){var t=[null,null],n=Ba(e);if(n===null)return t;return FR(t,e,n.child,{foundSelf:!1}),t}function FR(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&FR(e,t,n.child,r))return!0;n=n.sibling}return!1}function jt(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(z(559))}}var uc=null,_b=null;function H8(e,t,n){return e===n?!0:e===t?(uc=e,!0):!1}function W8(e,t,n){return e===n?(_b=e,!1):e===t?(_b!==null&&(uc=e),!0):!1}function h2(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e?e:null}function Nb(e,t,n){for(var r=0,o=e;o;o=n(o))r++;o=0;for(var i=t;i;i=n(i))o++;for(;0<r-o;)e=n(e),r--;for(;0<o-r;)t=n(t),o--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var ot=Object.assign,F8=Symbol.for("react.element"),yp=Symbol.for("react.transitional.element"),vf=Symbol.for("react.portal"),fc=Symbol.for("react.fragment"),KR=Symbol.for("react.strict_mode"),Lb=Symbol.for("react.profiler"),JR=Symbol.for("react.consumer"),Qo=Symbol.for("react.context"),Gy=Symbol.for("react.forward_ref"),zb=Symbol.for("react.suspense"),jb=Symbol.for("react.suspense_list"),Hy=Symbol.for("react.memo"),us=Symbol.for("react.lazy"),Ib=Symbol.for("react.activity"),K8=Symbol.for("react.legacy_hidden"),J8=Symbol.for("react.memo_cache_sentinel"),Xb=Symbol.for("react.view_transition"),eI=Symbol.for("react.recoverable"),p2=Symbol.iterator;function mf(e){if(e===null||typeof e!=="object")return null;return e=p2&&e[p2]||e["@@iterator"],typeof e==="function"?e:null}var tI=Symbol.for("react.client.reference");function Bb(e){if(e==null)return null;if(typeof e==="function")return e.$$typeof===tI?null:e.displayName||e.name||null;if(typeof e==="string")return e;switch(e){case fc:return"Fragment";case Lb:return"Profiler";case KR:return"StrictMode";case zb:return"Suspense";case jb:return"SuspenseList";case Ib:return"Activity";case Xb:return"ViewTransition"}if(typeof e==="object")switch(e.$$typeof){case vf:return"Portal";case Qo:return e.displayName||"Context";case JR:return(e._context.displayName||"Context")+".Consumer";case Gy:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Hy:return t=e.displayName||null,t!==null?t:Bb(e.type)||"Memo";case us:t=e._payload,e=e._init;try{return Bb(e(t))}catch(n){}}return null}var xf=Array.isArray,xe=Fl,He=H0,Pa={pending:!1,data:null,method:null,action:null},Zb=[],dc=-1;function Lo(e){return{current:e}}function on(e){0>dc||(e.current=Zb[dc],Zb[dc]=null,dc--)}function dt(e,t){dc++,Zb[dc]=e.current,e.current=t}var Do=Lo(null),Bf=Lo(null),ys=Lo(null),nm=Lo(null);function rm(e,t){switch(dt(ys,t),dt(Bf,e),dt(Do,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)?(e=e.namespaceURI)?RR(e):0:0;break;default:if(e=t.tagName,t=t.namespaceURI)t=RR(t),e=vA(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}on(Do),dt(Do,e)}function Mc(){on(Do),on(Bf),on(ys)}function Ub(e){var t=e.memoizedState;t!==null&&(Bc._currentValue=t.memoizedState,dt(nm,e)),t=Do.current;var n=vA(t,e.type);t!==n&&(dt(Bf,e),dt(Do,n))}function om(e){Bf.current===e&&(on(Do),on(Bf)),nm.current===e&&(on(nm),Bc._currentValue=Pa)}var ib,m2;function ls(e){if(ib===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ib=t&&t[1]||"",m2=-1<n.stack.indexOf(`
3
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
4
+ `+ib+e+m2}var sb=!1;function ab(e,t){if(!e||sb)return"";sb=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(m){var d=m}Reflect.construct(e,[],f)}else{try{f.call()}catch(m){d=m}f=!1;try{var h=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),f=!0,new e}finally{f&&(h!==void 0?Object.defineProperty(e.prototype,"props",h):delete e.prototype.props)}}}else{try{throw Error()}catch(m){d=m}(f=e())&&typeof f.catch==="function"&&f.catch(function(){})}}catch(m){if(m&&d&&typeof m.stack==="string")return[m.stack,d.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),s=i[0],a=i[1];if(s&&a){var l=s.split(`
5
+ `),c=a.split(`
6
+ `);for(o=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;o<c.length&&!c[o].includes("DetermineComponentFrameRoot");)o++;if(r===l.length||o===c.length)for(r=l.length-1,o=c.length-1;1<=r&&0<=o&&l[r]!==c[o];)o--;for(;1<=r&&0<=o;r--,o--)if(l[r]!==c[o]){if(r!==1||o!==1)do if(r--,o--,0>o||l[r]!==c[o]){var u=`
7
+ `+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=r&&0<=o);break}}}finally{sb=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ls(n):""}function nI(e,t){switch(e.tag){case 26:case 27:case 5:return ls(e.type);case 16:return ls("Lazy");case 13:return e.child!==t&&t!==null?ls("Suspense Fallback"):ls("Suspense");case 19:return ls("SuspenseList");case 0:case 15:return ab(e.type,!1);case 11:return ab(e.type.render,!1);case 1:return ab(e.type,!0);case 31:return ls("Activity");case 30:return ls("ViewTransition");default:return""}}function g2(e){try{var t="",n=null;do t+=nI(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
8
+ Error generating stack: `+r.message+`
9
+ `+r.stack}}var Yb=Object.prototype.hasOwnProperty,Wy=ba,lb=mp,rI=bp,oI=Op,sr=qr,iI=gp,eP=dp,tP=pp,im=Oa,sI=hp,nP=fp,aI=void 0,lI=void 0,id=null,ar=null;function hs(e){if(typeof aI==="function"&&lI(e),ar&&typeof ar.setStrictMode==="function")try{ar.setStrictMode(id,e)}catch(t){}}var lr=Math.clz32?Math.clz32:fI,{log:cI,LN2:uI}=Math;function fI(e){return e>>>=0,e===0?32:31-(cI(e)/uI|0)|0}var vp=256,xp=262144,wp=4194304;function xa(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&-e;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 Em(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var o=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var a=r&134217727;return a!==0?(r=a&~i,r!==0?o=xa(r):(s&=a,s!==0?o=xa(s):n||(n=a&~e,n!==0&&(o=xa(n))))):(a=r&~i,a!==0?o=xa(a):s!==0?o=xa(s):n||(n=r&~e,n!==0&&(o=xa(n)))),o===0?0:t!==0&&t!==o&&(t&i)===0&&(i=o&-o,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:o}function sd(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function rP(e,t){(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-lr(n),o=1<<r;t|=e[r],n&=~o}return t}function dI(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+5000;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 oP(){var e=wp;return wp<<=1,(wp&62914560)===0&&(wp=4194304),e}function cb(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Mm(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function hI(e,t,n,r,o,i){var s=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{entanglements:a,expirationTimes:l,hiddenUpdates:c}=e;for(n=s&~n;0<n;){var u=31-lr(n),f=1<<u;a[u]=0,l[u]=-1;var d=c[u];if(d!==null)for(c[u]=null,u=0;u<d.length;u++){var h=d[u];h!==null&&(h.lane&=-536870913)}n&=~f}r!==0&&iP(e,r,0),i!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=i&~(s&~t))}function iP(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-lr(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function sP(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-lr(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}function aP(e,t){var n=t&-t;return n=(n&42)!==0?1:lP(n),(n&(e.suspendedLanes|t))!==0?0:n}function lP(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 Fy(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function cP(){var e=He.p;if(e!==0)return e;return e=window.event,e===void 0?32:IA(e.type)}function O2(e,t){var n=He.p;try{return He.p=e,t()}finally{He.p=n}}var Si=Math.random().toString(36).slice(2),nn="__reactFiber$"+Si,Zn="__reactProps$"+Si,ad="__reactContainer$"+Si,b2="__reactEvents$"+Si,pI="__reactListeners$"+Si,mI="__reactHandles$"+Si,y2="__reactResources$"+Si,ld="__reactMarker$"+Si,sm="__reactLoad$"+Si;function $m(e){delete e[nn],delete e[Zn],delete e[pI],delete e[mI]}function Ca(e){var t;if(t=e[nn])return t;for(var n=e.parentNode;n;){if(t=n[ad]||n[nn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=DR(e);e!==null;){if(n=e[nn])return n;e=DR(e)}return t}e=n,n=e.parentNode}return null}function Yc(e){if(e=e[nn]||e[ad]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function wf(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(z(33))}function wc(e){var t=e[y2];return t||(t=e[y2]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Vt(e){e[ld]=!0}function uP(e){e[sm]=void 0}var fP=new Set,dP={};function Za(e,t){$c(e,t),$c(e+"Capture",t)}function $c(e,t){dP[e]=t;for(e=0;e<t.length;e++)fP.add(t[e])}var gI=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]*$"),v2={},x2={};function OI(e){if(Yb.call(x2,e))return!0;if(Yb.call(v2,e))return!1;if(gI.test(e))return x2[e]=!0;return v2[e]=!0,!1}var Ye=!1;function w2(){var e=Ye;return Ye=!1,e}function Np(e,t,n){if(OI(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 Sp(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 fi(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 nr(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bI(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get==="function"&&typeof r.set==="function"){var{get:o,set:i}=r;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(s){n=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(s){n=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vb(e){if(!e._valueTracker){var t=hP(e)?"checked":"value";e._valueTracker=bI(e,t,""+e[t])}}function pP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hP(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}var yI=/[\n"\\]/g;function Tr(e){return e.replace(yI,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function qb(e,t,n,r,o,i,s,a){if(e.name="",s!=null&&typeof s!=="function"&&typeof s!=="symbol"&&typeof s!=="boolean"?e.type=s:e.removeAttribute("type"),t!=null)if(s==="number"){if(t===0&&e.value===""||e.value!=t)e.value=""+nr(t)}else e.value!==""+nr(t)&&(e.value=""+nr(t));else s!=="submit"&&s!=="reset"||e.removeAttribute("value");t!=null?s==="number"&&e.value==t?ub(e,nr(e.value)):ub(e,nr(t)):n!=null?ub(e,nr(n)):r!=null&&e.removeAttribute("value"),o==null&&i!=null&&(e.defaultChecked=!!i),o!=null&&(e.checked=o&&typeof o!=="function"&&typeof o!=="symbol"),a!=null&&typeof a!=="function"&&typeof a!=="symbol"&&typeof a!=="boolean"?e.name=""+nr(a):e.removeAttribute("name")}function mP(e,t,n,r,o,i,s,a){if(i!=null&&typeof i!=="function"&&typeof i!=="symbol"&&typeof i!=="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!==void 0&&t!==null)){Vb(e);return}n=n!=null?""+nr(n):"",t=t!=null?""+nr(t):n,a||t===e.value||(e.value=t),e.defaultValue=t}r=r!=null?r:o,r=typeof r!=="function"&&typeof r!=="symbol"&&!!r,e.checked=a?e.checked:!!r,e.defaultChecked=!!r,s!=null&&typeof s!=="function"&&typeof s!=="symbol"&&typeof s!=="boolean"&&(e.name=s),Vb(e)}function ub(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Sc(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{n=""+nr(n),t=null;for(o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function gP(e,t,n){if(t!=null&&(t=""+nr(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+nr(n):""}function OP(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(z(92));if(xf(r)){if(1<r.length)throw Error(z(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=nr(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Vb(e)}function Dc(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var vI=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 S2(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||vI.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function bP(e,t,n){if(t!=null&&typeof t!=="object")throw Error(z(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]="",Ye=!0);for(var o in t)r=t[o],t.hasOwnProperty(o)&&n[o]!==r&&(S2(e,o,r),Ye=!0)}else for(var i in t)t.hasOwnProperty(i)&&S2(e,i,t[i])}function Ky(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 xI=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"],["maskType","mask-type"],["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"]]),wI=/^[\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 Lp(e){return wI.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Eo(){}var Gb=null;function Jy(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hc=null,kc=null;function k2(e){var t=Yc(e);if(t&&(e=t.stateNode)){var n=e[Zn]||null;e:switch(e=t.stateNode,t.type){case"input":if(qb(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;n=n.querySelectorAll('input[name="'+Tr(""+t)+'"][type="radio"]');for(t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=r[Zn]||null;if(!o)throw Error(z(90));qb(r,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&pP(r)}break e;case"textarea":gP(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Sc(e,!!n.multiple,t,!1)}}}var fb=!1;function yP(e,t,n){if(fb)return e(t,n);fb=!0;try{var r=e(t);return r}finally{if(fb=!1,hc!==null||kc!==null){if(qm(),hc&&(t=hc,e=kc,kc=hc=null,k2(t),e))for(t=0;t<e.length;t++)k2(e[t])}}}function Zf(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Zn]||null;if(r===null)return null;n=r[t];e: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 e;default:e=!1}if(e)return null;if(n&&typeof n!=="function")throw Error(z(231,t,typeof n));return n}var Oi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hb=!1;if(Oi)try{wa={},Object.defineProperty(wa,"passive",{get:function(){Hb=!0}}),window.addEventListener("test",wa,wa),window.removeEventListener("test",wa,wa)}catch(e){Hb=!1}var wa,ps=null,ev=null,zp=null;function vP(){if(zp)return zp;var e,t=ev,n=t.length,r,o="value"in ps?ps.value:ps.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===o[i-r];r++);return zp=o.slice(e,1<r?1-r:void 0)}function jp(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 kp(){return!0}function C2(){return!1}function Tn(e){function t(n,r,o,i,s){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?kp:C2,this.isPropagationStopped=C2,this}return ot(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!=="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=kp)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!=="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=kp)},persist:function(){},isPersistent:kp}),t}var Ms={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dm=Tn(Ms),cd=ot({},Ms,{view:0,detail:0}),SI=Tn(cd),db,hb,gf,_m=ot({},cd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tv,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){if("movementX"in e)return e.movementX;return e!==gf&&(gf&&e.type==="mousemove"?(db=e.screenX-gf.screenX,hb=e.screenY-gf.screenY):hb=db=0,gf=e),db},movementY:function(e){return"movementY"in e?e.movementY:hb}}),R2=Tn(_m),kI=ot({},_m,{dataTransfer:0}),CI=Tn(kI),RI=ot({},cd,{relatedTarget:0}),pb=Tn(RI),PI=ot({},Ms,{animationName:0,elapsedTime:0,pseudoElement:0}),TI=Tn(PI),AI=ot({},Ms,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),QI=Tn(AI),EI=ot({},Ms,{data:0}),P2=Tn(EI),MI={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},$I={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"},DI={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _I(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=DI[e])?!!t[e]:!1}function tv(){return _I}var NI=ot({},cd,{key:function(e){if(e.key){var t=MI[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=jp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?$I[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tv,charCode:function(e){return e.type==="keypress"?jp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?jp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),LI=Tn(NI),zI=ot({},_m,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),T2=Tn(zI),jI=ot({},Ms,{submitter:0}),II=Tn(jI),XI=ot({},cd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tv}),BI=Tn(XI),ZI=ot({},Ms,{propertyName:0,elapsedTime:0,pseudoElement:0}),UI=Tn(ZI),YI=ot({},_m,{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}),VI=Tn(YI),qI=ot({},Ms,{newState:0,oldState:0,source:0}),GI=Tn(qI),HI=[9,13,27,32],nv=Oi&&"CompositionEvent"in window,Af=null;Oi&&"documentMode"in document&&(Af=document.documentMode);var WI=Oi&&"TextEvent"in window&&!Af,xP=Oi&&(!nv||Af&&8<Af&&11>=Af),A2=String.fromCharCode(32),Q2=!1;function wP(e,t){switch(e){case"keyup":return HI.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function SP(e){return e=e.detail,typeof e==="object"&&"data"in e?e.data:null}var pc=!1;function FI(e,t){switch(e){case"compositionend":return SP(t);case"keypress":if(t.which!==32)return null;return Q2=!0,A2;case"textInput":return e=t.data,e===A2&&Q2?null:e;default:return null}}function KI(e,t){if(pc)return e==="compositionend"||!nv&&wP(e,t)?(e=vP(),zp=ev=ps=null,pc=!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 xP&&t.locale!=="ko"?null:t.data;default:return null}}var JI={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 E2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!JI[e.type]:t==="textarea"?!0:!1}function kP(e,t,n,r){hc?kc?kc.push(r):kc=[r]:hc=r,t=Tm(t,"onChange"),0<t.length&&(n=new Dm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Qf=null,Uf=null;function e7(e){gA(e,0)}function Nm(e){var t=wf(e);if(pP(t))return e}function M2(e,t){if(e==="change")return t}var CP=!1;if(Oi){if(Oi){if(kf="oninput"in document,!kf)Ip=document.createElement("div"),Ip.setAttribute("oninput","return;"),kf=typeof Ip.oninput==="function";Sf=kf}else Sf=!1;CP=Sf&&(!document.documentMode||9<document.documentMode)}var Sf,kf,Ip;function $2(){Qf&&(Qf.detachEvent("onpropertychange",RP),Uf=Qf=null)}function RP(e){if(e.propertyName==="value"&&Nm(Uf)){var t=[];kP(t,Uf,e,Jy(e)),yP(e7,t)}}function t7(e,t,n){e==="focusin"?($2(),Qf=t,Uf=n,Qf.attachEvent("onpropertychange",RP)):e==="focusout"&&$2()}function n7(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Nm(Uf)}function r7(e,t){if(e==="click")return Nm(t)}function o7(e,t){if(e==="input"||e==="change")return Nm(t)}function i7(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cr=typeof Object.is==="function"?Object.is:i7;function Yf(e,t){if(cr(e,t))return!0;if(typeof e!=="object"||e===null||typeof t!=="object"||t===null)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 o=n[r];if(!Yb.call(t,o)||!cr(e[o],t[o]))return!1}return!0}function Wb(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch(t){return e.body}}function D2(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _2(e,t){var n=D2(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}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=D2(n)}}function PP(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?PP(e,t.parentNode):("contains"in e)?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function TP(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wb(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==="string"}catch(r){n=!1}if(n)e=t.contentWindow;else break;t=Wb(e.document)}return t}function rv(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 s7=Oi&&"documentMode"in document&&11>=document.documentMode,mc=null,Fb=null,Ef=null,Kb=!1;function N2(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kb||mc==null||mc!==Wb(r)||(r=mc,("selectionStart"in r)&&rv(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}),Ef&&Yf(Ef,r)||(Ef=r,r=Tm(Fb,"onSelect"),0<r.length&&(t=new Dm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mc)))}function ya(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var gc={animationend:ya("Animation","AnimationEnd"),animationiteration:ya("Animation","AnimationIteration"),animationstart:ya("Animation","AnimationStart"),transitionrun:ya("Transition","TransitionRun"),transitionstart:ya("Transition","TransitionStart"),transitioncancel:ya("Transition","TransitionCancel"),transitionend:ya("Transition","TransitionEnd")},mb={},AP={};Oi&&(AP=document.createElement("div").style,("AnimationEvent"in window)||(delete gc.animationend.animation,delete gc.animationiteration.animation,delete gc.animationstart.animation),("TransitionEvent"in window)||delete gc.transitionend.transition);function Ua(e){if(mb[e])return mb[e];if(!gc[e])return e;var t=gc[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in AP)return mb[e]=t[n];return e}var QP=Ua("animationend"),EP=Ua("animationiteration"),MP=Ua("animationstart"),a7=Ua("transitionrun"),l7=Ua("transitionstart"),c7=Ua("transitioncancel"),$P=Ua("transitionend"),DP=new Map,Jb="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");Jb.push("scrollEnd");function Jr(e,t){DP.set(e,t),Za(t,[e])}var u7=0;function bi(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Kr.identifierPrefix;var n=u7++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function L2(e){if(e==null||typeof e==="string")return e;var t=null,n=Ec;if(n!==null)for(var r=0;r<n.length;r++){var o=e[n[r]];if(o!=null){if(o==="none")return"none";t=t==null?o:t+(" "+o)}}return t==null?e.default:t}function ki(e,t){return e=L2(e),t=L2(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var am=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!==null&&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)},Cr=[],Oc=0,ov=0;function Lm(){for(var e=Oc,t=ov=Oc=0;t<e;){var n=Cr[t];Cr[t++]=null;var r=Cr[t];Cr[t++]=null;var o=Cr[t];Cr[t++]=null;var i=Cr[t];if(Cr[t++]=null,r!==null&&o!==null){var s=r.pending;s===null?o.next=o:(o.next=s.next,s.next=o),r.pending=o}i!==0&&_P(n,o,i)}}function zm(e,t,n,r){Cr[Oc++]=e,Cr[Oc++]=t,Cr[Oc++]=n,Cr[Oc++]=r,ov|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function iv(e,t,n,r){return zm(e,t,n,r),lm(e)}function Ya(e,t){return zm(e,null,null,t),lm(e)}function _P(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var o=!1,i=e.return;i!==null;)i.childLanes|=n,r=i.alternate,r!==null&&(r.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(o=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,o&&t!==null&&(o=31-lr(n),e=i.hiddenUpdates,r=e[o],r===null?e[o]=[t]:r.push(t),t.lane=n|536870912),i):null}function lm(e){if(50<Xf)throw Xf=0,Wp=null,Error(z(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var bc={};function f7(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 In(e,t,n,r){return new f7(e,t,n,r)}function sv(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mi(e,t){var n=e.alternate;return n===null?(n=In(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&1206910976,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 NP(e,t){e.flags&=1206910978;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 Xp(e,t,n,r,o,i){var s=0;if(r=e,typeof r==="function")sv(r)&&(s=1);else if(typeof r==="string")s=IX(e,n,Do.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(r){case Ib:return e=In(31,n,t,o),e.elementType=Ib,e.lanes=i,e;case fc:return Ta(n.children,o,i,t);case KR:s=8,o|=24;break;case Lb:return e=In(12,n,t,o|2),e.elementType=Lb,e.lanes=i,e;case zb:return e=In(13,n,t,o),e.elementType=zb,e.lanes=i,e;case jb:return e=In(19,n,t,o),e.elementType=jb,e.lanes=i,e;case K8:case Xb:return e=o|32,e=In(30,n,t,e),e.elementType=Xb,e.lanes=i,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==="object"&&r!==null)switch(r.$$typeof){case Qo:s=10;break e;case JR:s=9;break e;case Gy:s=11;break e;case Hy:s=14;break e;case us:s=16,r=null;break e}s=29,n=Error(z(130,e===null?"null":typeof e,"")),r=null}return t=In(s,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Ta(e,t,n,r){return e=In(7,e,r,t),e.lanes=n,e}function gb(e,t,n){return e=In(6,e,null,t),e.lanes=n,e}function LP(e){var t=In(18,null,null,0);return t.stateNode=e,t}function Ob(e,t,n){return t=In(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var z2=new WeakMap;function Ar(e,t){if(typeof e==="object"&&e!==null){var n=z2.get(e);if(n!==void 0)return n;return t={value:e,source:t,stack:g2(t)},z2.set(e,t),t}return{value:e,source:t,stack:g2(t)}}var yc=[],vc=0,cm=null,Vf=0,Rr=[],Pr=0,Ps=null,Mo=1,$o="";function hi(e,t){yc[vc++]=Vf,yc[vc++]=cm,cm=e,Vf=t}function zP(e,t,n){Rr[Pr++]=Mo,Rr[Pr++]=$o,Rr[Pr++]=Ps,Ps=e;var r=Mo;e=$o;var o=32-lr(r)-1;r&=~(1<<o),n+=1;var i=32-lr(t)+o;if(30<i){var s=o-o%5;i=(r&(1<<s)-1).toString(32),r>>=s,o-=s,Mo=1<<32-lr(t)+o|n<<o|r,$o=i+e}else Mo=1<<i|n<<o|r,$o=e}function jm(e){e.return!==null&&(hi(e,1),zP(e,1,0))}function av(e){for(;e===cm;)cm=yc[--vc],yc[vc]=null,Vf=yc[--vc],yc[vc]=null;for(;e===Ps;)Ps=Rr[--Pr],Rr[Pr]=null,$o=Rr[--Pr],Rr[Pr]=null,Mo=Rr[--Pr],Rr[Pr]=null}function jP(e,t){Rr[Pr++]=Mo,Rr[Pr++]=$o,Rr[Pr++]=Ps,Mo=t.id,$o=t.overflow,Ps=e}var qt=null,ft=null,Te=!1,vs=null,Qr=!1,ey=Error(z(519));function Ts(e){var t=Error(z(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw qf(Ar(t,e)),ey}function j2(e){var{stateNode:t,type:n,memoizedProps:r}=e;switch(t[nn]=e,t[Zn]=r,n){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(n=0;n<Ff.length;n++)Me(Ff[n],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),mP(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),OP(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=="string"&&typeof n!=="number"&&typeof n!=="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||yA(t.textContent,n)?(r.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),r.onScroll!=null&&Me("scroll",t),r.onScrollEnd!=null&&Me("scrollend",t),r.onClick!=null&&(t.onclick=Eo),t=!0):t=!1,t||Ts(e,!0)}function um(e){for(qt=e.return;qt;)switch(qt.tag){case 5:case 31:case 13:Qr=!1;return;case 27:case 3:Qr=!0;return;default:qt=qt.return}}function oc(e){if(e!==qt)return!1;if(!Te)return um(e),Te=!0,!1;var t=e.tag,n;if(n=t!==3&&t!==27){if(n=t===5)n=e.type,n=!(n!=="form"&&n!=="button")||Iy(e.type,e.memoizedProps);n=!n}if(n&&ft&&Ts(e),um(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));ft=$R(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(317));ft=$R(e)}else t===27?(t=ft,$s(e.type)?(e=Uy,Uy=null,ft=e):ft=t):ft=qt?Mr(e.stateNode.nextSibling):null;return!0}function Da(){ft=qt=null,Te=!1}function bb(){var e=vs;return e!==null&&(zn===null?zn=e:zn.push.apply(zn,e),vs=null),e}function qf(e){vs===null?vs=[e]:vs.push(e)}var ty=Lo(null),Va=null,pi=null;function ms(e,t,n){dt(ty,t._currentValue),t._currentValue=n}function gi(e){e._currentValue=ty.current,on(ty)}function Bp(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ny(e,t,n,r){var o=e.child;o!==null&&(o.return=e);for(;o!==null;){var i=o.dependencies;if(i!==null){var s=o.child;i=i.firstContext;e:for(;i!==null;){var a=i;i=o;for(var l=0;l<t.length;l++)if(a.context===t[l]){i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Bp(i.return,n,e),r||(s=null);break e}i=a.next}}else if(o.tag===18){if(s=o.return,s===null)throw Error(z(341));s.lanes|=n,i=s.alternate,i!==null&&(i.lanes|=n),Bp(s,n,e),s=null}else o.tag===13&&o.memoizedState!==null&&o.memoizedState.dehydrated===null?(o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Bp(o.return,n,e),s=o.child,s=s!==null?s.sibling:null):s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===e){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}}function _a(e,t,n,r){e=null;for(var o=t,i=!1;o!==null;){if(!i){if((o.flags&524288)!==0)i=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var s=o.alternate;if(s===null)throw Error(z(387));if(s=s.memoizedProps,s!==null){var a=o.type;cr(o.pendingProps.value,s.value)||(e!==null?e.push(a):e=[a])}}else if(o===nm.current){if(s=o.alternate,s===null)throw Error(z(387));s.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Bc):e=[Bc])}o=o.return}return e!==null&&ny(t,e,n,r),t.flags|=262144,e!==null}function fm(e){for(e=e.firstContext;e!==null;){if(!cr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Na(e){Va=e,pi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function rn(e){return IP(Va,e)}function Cp(e,t){return Va===null&&Na(e),IP(e,t)}function IP(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},pi===null){if(e===null)throw Error(z(308));pi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pi=pi.next=t;return n}var d7=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},h7=ba,p7=Oa,$t={$$typeof:Qo,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function lv(){return{controller:new d7,data:new Map,refCount:0}}function ud(e){e.refCount--,e.refCount===0&&h7(p7,function(){e.controller.abort()})}function I2(e,t){if((e.pendingLanes&4194048)!==0){var n=e.transitionTypes;n===null&&(n=e.transitionTypes=[]);for(e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Cf=null;function m7(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Mf=null,ry=0,La=0,Cc=null;function g7(e,t){if(Mf===null){var n=Mf=[];ry=0,La=Nv(),Cc={status:"pending",value:void 0,then:function(r){n.push(r)}}}return ry++,t.then(X2,X2),t}function X2(){if(--ry===0&&(Cf=null,Mf!==null)){Cc!==null&&(Cc.status="fulfilled");var e=Mf;Mf=null,La=0,Cc=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function O7(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){r.status="rejected",r.reason=o;for(o=0;o<n.length;o++)(0,n[o])(void 0)}),r}var B2=xe.S;xe.S=function(e,t){if(tA=sr(),typeof t==="object"&&t!==null&&typeof t.then==="function"&&g7(e,t),Cf!==null)for(var n=jc;n!==null;)I2(n,Cf),n=n.next;if(n=e.types,n!==null){for(var r=jc;r!==null;)I2(r,n),r=r.next;if(La!==0){r=Cf,r===null&&(r=Cf=[]);for(var o=0;o<n.length;o++){var i=n[o];r.indexOf(i)===-1&&r.push(i)}}}B2!==null&&B2(e,t)};var Aa=Lo(null);function cv(){var e=Aa.current;return e!==null?e:rt.pooledCache}function Zp(e,t){t===null?dt(Aa,Aa.current):dt(Aa,t.pool)}function XP(){var e=cv();return e===null?null:{parent:$t._currentValue,pool:e}}var Vc=Error(z(460)),uv=Error(z(474)),Im=Error(z(542)),dm={then:function(){}};function Z2(e){return e=e.status,e==="fulfilled"||e==="rejected"}function BP(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Eo,Eo),t=n),t.status){case"fulfilled":return t.value;case"rejected":if(e=t.reason,Y2(e),e===void 0&&!("reason"in t))throw Error(z(600));throw e;default:if(typeof t.status==="string")t.then(Eo,Eo);else{if(e=rt,e!==null&&100<e.shellSuspendCounter)throw Error(z(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=r}},function(r){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Y2(e),e}throw Qa=t,Vc}}function Sa(e){try{var t=e._init;return t(e._payload)}catch(n){if(n!==null&&typeof n==="object"&&typeof n.then==="function")throw Qa=n,Vc;throw n}}var Qa=null;function U2(){if(Qa===null)throw Error(z(459));var e=Qa;return Qa=null,e}function Y2(e){if(e===Vc||e===Im)throw Error(z(483))}var Rc=null,Gf=0;function Rp(e){var t=Gf;return Gf+=1,Rc===null&&(Rc=[]),BP(Rc,e,t)}function as(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Pp(e,t){if(t.$$typeof===F8)throw Error(z(525));throw e=Object.prototype.toString.call(t),Error(z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ZP(e){function t(O,y){if(e){var v=O.deletions;v===null?(O.deletions=[y],O.flags|=16):v.push(y)}}function n(O,y){if(!e)return null;for(;y!==null;)t(O,y),y=y.sibling;return null}function r(O){for(var y=new Map;O!==null;)O.key===null?y.set(O.index,O):y.set(O.key,O),O=O.sibling;return y}function o(O,y){return O=mi(O,y),O.index=0,O.sibling=null,O}function i(O,y,v){if(O.index=v,!e)return O.flags|=1048576,y;if(v=O.alternate,v!==null)return v=v.index,v<y?(O.flags|=2,y):v;return O.flags|=134217730,y}function s(O){return e&&O.alternate===null&&(O.flags|=134217730),O}function a(O,y,v,x){if(y===null||y.tag!==6)return y=gb(v,O.mode,x),y.return=O,y;return y=o(y,v),y.return=O,y}function l(O,y,v,x){var w=v.type;if(w===fc)return O=u(O,y,v.props.children,x,v.key),as(O,v),O;if(y!==null&&(y.elementType===w||typeof w==="object"&&w!==null&&w.$$typeof===us&&Sa(w)===y.type))return y=o(y,v.props),as(y,v),y.return=O,y;return y=Xp(v.type,v.key,v.props,null,O.mode,x),as(y,v),y.return=O,y}function c(O,y,v,x){if(y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation)return y=Ob(v,O.mode,x),y.return=O,y;return y=o(y,v.children||[]),y.return=O,y}function u(O,y,v,x,w){if(y===null||y.tag!==7)return y=Ta(v,O.mode,x,w),y.return=O,y;return y=o(y,v),y.return=O,y}function f(O,y,v){if(typeof y==="string"&&y!==""||typeof y==="number"||typeof y==="bigint")return y=gb(""+y,O.mode,v),y.return=O,y;if(typeof y==="object"&&y!==null){switch(y.$$typeof){case yp:return v=Xp(y.type,y.key,y.props,null,O.mode,v),as(v,y),v.return=O,v;case vf:return y=Ob(y,O.mode,v),y.return=O,y;case us:return y=Sa(y),f(O,y,v)}if(xf(y)||mf(y))return y=Ta(y,O.mode,v,null),y.return=O,y;if(typeof y.then==="function")return f(O,Rp(y),v);if(y.$$typeof===Qo)return f(O,Cp(O,y),v);Pp(O,y)}return null}function d(O,y,v,x){var w=y!==null?y.key:null;if(typeof v==="string"&&v!==""||typeof v==="number"||typeof v==="bigint")return w!==null?null:a(O,y,""+v,x);if(typeof v==="object"&&v!==null){switch(v.$$typeof){case yp:return v.key===w?l(O,y,v,x):null;case vf:return v.key===w?c(O,y,v,x):null;case us:return v=Sa(v),d(O,y,v,x)}if(xf(v)||mf(v))return w!==null?null:u(O,y,v,x,null);if(typeof v.then==="function")return d(O,y,Rp(v),x);if(v.$$typeof===Qo)return d(O,y,Cp(O,v),x);Pp(O,v)}return null}function h(O,y,v,x,w){if(typeof x==="string"&&x!==""||typeof x==="number"||typeof x==="bigint")return O=O.get(v)||null,a(y,O,""+x,w);if(typeof x==="object"&&x!==null){switch(x.$$typeof){case yp:return O=O.get(x.key===null?v:x.key)||null,l(y,O,x,w);case vf:return O=O.get(x.key===null?v:x.key)||null,c(y,O,x,w);case us:return x=Sa(x),h(O,y,v,x,w)}if(xf(x)||mf(x))return O=O.get(v)||null,u(y,O,x,w,null);if(typeof x.then==="function")return h(O,y,v,Rp(x),w);if(x.$$typeof===Qo)return h(O,y,v,Cp(y,x),w);Pp(y,x)}return null}function m(O,y,v,x){for(var w=null,S=null,k=y,R=y=0,Q=null;k!==null&&R<v.length;R++){k.index>R?(Q=k,k=null):Q=k.sibling;var E=d(O,k,v[R],x);if(E===null){k===null&&(k=Q);break}e&&k&&E.alternate===null&&t(O,k),y=i(E,y,R),S===null?w=E:S.sibling=E,S=E,k=Q}if(R===v.length)return n(O,k),Te&&hi(O,R),w;if(k===null){for(;R<v.length;R++)k=f(O,v[R],x),k!==null&&(y=i(k,y,R),S===null?w=k:S.sibling=k,S=k);return Te&&hi(O,R),w}for(k=r(k);R<v.length;R++)Q=h(k,O,R,v[R],x),Q!==null&&(e&&(E=Q.alternate,E!==null&&k.delete(E.key===null?R:E.key)),y=i(Q,y,R),S===null?w=Q:S.sibling=Q,S=Q);return e&&k.forEach(function(_){return t(O,_)}),Te&&hi(O,R),w}function g(O,y,v,x){if(v==null)throw Error(z(151));for(var w=null,S=null,k=y,R=y=0,Q=null,E=v.next();k!==null&&!E.done;R++,E=v.next()){k.index>R?(Q=k,k=null):Q=k.sibling;var _=d(O,k,E.value,x);if(_===null){k===null&&(k=Q);break}e&&k&&_.alternate===null&&t(O,k),y=i(_,y,R),S===null?w=_:S.sibling=_,S=_,k=Q}if(E.done)return n(O,k),Te&&hi(O,R),w;if(k===null){for(;!E.done;R++,E=v.next())E=f(O,E.value,x),E!==null&&(y=i(E,y,R),S===null?w=E:S.sibling=E,S=E);return Te&&hi(O,R),w}for(k=r(k);!E.done;R++,E=v.next())E=h(k,O,R,E.value,x),E!==null&&(e&&(Q=E.alternate,Q!==null&&k.delete(Q.key===null?R:Q.key)),y=i(E,y,R),S===null?w=E:S.sibling=E,S=E);return e&&k.forEach(function(N){return t(O,N)}),Te&&hi(O,R),w}function b(O,y,v,x){if(typeof v==="object"&&v!==null&&v.type===fc&&v.key===null&&v.props.ref===void 0&&(v=v.props.children),typeof v==="object"&&v!==null){switch(v.$$typeof){case yp:e:{for(var w=v.key;y!==null;){if(y.key===w){if(w=v.type,w===fc){if(y.tag===7){n(O,y.sibling),x=o(y,v.props.children),as(x,v),x.return=O,O=x;break e}}else if(y.elementType===w||typeof w==="object"&&w!==null&&w.$$typeof===us&&Sa(w)===y.type){n(O,y.sibling),x=o(y,v.props),as(x,v),x.return=O,O=x;break e}n(O,y);break}else t(O,y);y=y.sibling}v.type===fc?(x=Ta(v.props.children,O.mode,x,v.key),as(x,v),x.return=O,O=x):(x=Xp(v.type,v.key,v.props,null,O.mode,x),as(x,v),x.return=O,O=x)}return s(O);case vf:e:{for(w=v.key;y!==null;){if(y.key===w)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(O,y.sibling),x=o(y,v.children||[]),x.return=O,O=x;break e}else{n(O,y);break}else t(O,y);y=y.sibling}x=Ob(v,O.mode,x),x.return=O,O=x}return s(O);case us:return v=Sa(v),b(O,y,v,x)}if(xf(v))return m(O,y,v,x);if(mf(v)){if(w=mf(v),typeof w!=="function")throw Error(z(150));return v=w.call(v),g(O,y,v,x)}if(typeof v.then==="function")return b(O,y,Rp(v),x);if(v.$$typeof===Qo)return b(O,y,Cp(O,v),x);Pp(O,v)}return typeof v==="string"&&v!==""||typeof v==="number"||typeof v==="bigint"?(v=""+v,y!==null&&y.tag===6?(n(O,y.sibling),x=o(y,v),x.return=O,O=x):(n(O,y),x=gb(v,O.mode,x),x.return=O,O=x),s(O)):n(O,y)}return function(O,y,v,x){try{Gf=0;var w=b(O,y,v,x);return Rc=null,w}catch(k){if(k===Vc||k===Im)throw k;var S=In(29,k,null,O.mode);return S.lanes=x,S.return=O,S}finally{}}}var za=ZP(!0),UP=ZP(!1),fs=!1;function fv(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oy(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 Ea(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ma(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ge&2)!==0){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,t=lm(e),_P(e,null,n),t}return zm(e,r,t,n),lm(e)}function $f(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sP(e,n)}}function yb(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?o=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,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 iy=!1;function Df(){if(iy){var e=Cc;if(e!==null)throw e}}function _f(e,t,n,r){iy=!1;var o=e.updateQueue;fs=!1;var{firstBaseUpdate:i,lastBaseUpdate:s}=o,a=o.shared.pending;if(a!==null){o.shared.pending=null;var l=a,c=l.next;l.next=null,s===null?i=c:s.next=c,s=l;var u=e.alternate;u!==null&&(u=u.updateQueue,a=u.lastBaseUpdate,a!==s&&(a===null?u.firstBaseUpdate=c:a.next=c,u.lastBaseUpdate=l))}if(i!==null){var f=o.baseState;s=0,u=c=l=null,a=i;do{var d=a.lane&-536870913,h=d!==a.lane;if(h?(Ne&d)===d:(r&d)===d){d!==0&&d===La&&(iy=!0),u!==null&&(u=u.next={lane:0,tag:a.tag,payload:a.payload,callback:null,next:null});e:{var m=e,g=a;d=t;var b=n;switch(g.tag){case 1:if(m=g.payload,typeof m==="function"){f=m.call(b,f,d);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,d=typeof m==="function"?m.call(b,f,d):m,d===null||d===void 0)break e;f=ot({},f,d);break e;case 2:fs=!0}}d=a.callback,d!==null&&(e.flags|=64,h&&(e.flags|=8192),h=o.callbacks,h===null?o.callbacks=[d]:h.push(d))}else h={lane:d,tag:a.tag,payload:a.payload,callback:a.callback,next:null},u===null?(c=u=h,l=f):u=u.next=h,s|=d;if(a=a.next,a===null)if(a=o.shared.pending,a===null)break;else h=a,a=h.next,h.next=null,o.lastBaseUpdate=h,o.shared.pending=null}while(1);u===null&&(l=f),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,i===null&&(o.shared.lanes=0),Es|=s,e.lanes=s,e.memoizedState=f}}function YP(e,t){if(typeof e!=="function")throw Error(z(191,e));e.call(t)}function VP(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)YP(n[e],t)}var As=Lo(null),hm=Lo(0);function V2(e,t){e=wi,dt(hm,e),dt(As,t),wi=e|t.baseLanes}function sy(){dt(hm,wi),dt(As,As.current)}function dv(){wi=hm.current,on(As),on(hm)}var ln=Lo(null),vn=null;function xs(e){var t=e.alternate;dt(sn,sn.current&1),dt(ln,e),vn===null&&(t===null||As.current!==null?vn=e:t.memoizedState!==null&&(vn=e))}function ay(e){dt(sn,sn.current),dt(ln,e),vn===null&&(vn=e)}function qP(e){e.tag===22?(dt(sn,sn.current),dt(ln,e),vn===null&&(vn=e)):ws()}function ws(){dt(sn,sn.current),dt(ln,ln.current)}function rr(e){on(ln),vn===e&&(vn=null),on(sn)}var sn=Lo(0);function Hf(e,t){dt(ln,ln.current),dt(sn,t)}function hv(e){on(sn),on(ln),vn===e&&(vn=null)}function pm(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Zy(n)||jv(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){if((t.flags&128)!==0)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 yi=0,Re=null,tt=null,Mt=null,mm=!1,Pc=!1,ja=!1,gm=0,Wf=0,Tc=null,b7=0;function Ct(){throw Error(z(321))}function pv(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cr(e[n],t[n]))return!1;return!0}function mv(e,t,n,r,o,i){return yi=i,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xe.H=e===null||e.memoizedState===null?kT:CT,ja=!1,i=n(r,o),ja=!1,Pc&&(i=HP(t,n,r,o)),GP(e),i}function GP(e){xe.H=Om;var t=tt!==null&&tt.next!==null;if(yi=0,Mt=tt=Re=null,mm=!1,Wf=0,Tc=null,t)throw Error(z(300));e===null||Dt||(e=e.dependencies,e!==null&&fm(e)&&(Dt=!0))}function HP(e,t,n,r){Re=e;var o=0;do{if(Pc&&(Tc=null),Wf=0,Pc=!1,25<=o)throw Error(z(301));if(o+=1,Mt=tt=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}xe.H=R7,i=t(n,r)}while(Pc);return i}function y7(){var e=xe.H,t=e.useState()[0];return t=typeof t.then==="function"?fd(t):t,e=e.useState()[0],(tt!==null?tt.memoizedState:null)!==e&&(Re.flags|=1024),t}function gv(){var e=gm!==0;return gm=0,e}function Ov(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function bv(e){if(mm){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}mm=!1}yi=0,Mt=tt=Re=null,Pc=!1,Wf=gm=0,Tc=null}function Pn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?Re.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function At(){if(tt===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=Mt===null?Re.memoizedState:Mt.next;if(t!==null)Mt=t,tt=e;else{if(e===null){if(Re.alternate===null)throw Error(z(467));throw Error(z(310))}tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},Mt===null?Re.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function Xm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fd(e){var t=Wf;return Wf+=1,Tc===null&&(Tc=[]),e=BP(Tc,e,t),t=Re,(Mt===null?t.memoizedState:Mt.next)===null&&(t=t.alternate,xe.H=t===null||t.memoizedState===null?kT:CT),e}function Bm(e){if(e!==null&&typeof e==="object"){if(typeof e.then==="function")return fd(e);if(e.$$typeof===eI)return;if(e.$$typeof===Qo)return rn(e)}throw Error(z(438,String(e)))}function yv(e){var t=null,n=Re.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Re.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Xm(),Re.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]=J8;return t.index++,n}function vi(e,t){return typeof t==="function"?t(e):t}function Up(e){var t=At();return vv(t,tt,e)}function vv(e,t,n){var r=e.queue;if(r===null)throw Error(z(311));r.lastRenderedReducer=n;var o=e.baseQueue,i=r.pending;if(i!==null){if(o!==null){var s=o.next;o.next=i.next,i.next=s}t.baseQueue=o=i,r.pending=null}if(i=e.baseState,o===null)e.memoizedState=i;else{t=o.next;var a=s=null,l=null,c=t,u=!1;do{var f=c.lane&-536870913;if(f!==c.lane?(Ne&f)===f:(yi&f)===f){var d=c.revertLane;if(d===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),f===La&&(u=!0);else if((yi&d)===d){c=c.next,d===La&&(u=!0);continue}else f={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(a=l=f,s=i):l=l.next=f,Re.lanes|=d,Es|=d;f=c.action,ja&&n(i,f),i=c.hasEagerState?c.eagerState:n(i,f)}else d={lane:f,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(a=l=d,s=i):l=l.next=d,Re.lanes|=f,Es|=f;c=c.next}while(c!==null&&c!==t);if(l===null?s=i:l.next=a,!cr(i,e.memoizedState)&&(Dt=!0,u&&(n=Cc,n!==null)))throw n;e.memoizedState=i,e.baseState=s,e.baseQueue=l,r.lastRenderedState=i}return o===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function vb(e){var t=At(),n=t.queue;if(n===null)throw Error(z(311));n.lastRenderedReducer=e;var{dispatch:r,pending:o}=n,i=t.memoizedState;if(o!==null){n.pending=null;var s=o=o.next;do i=e(i,s.action),s=s.next;while(s!==o);cr(i,t.memoizedState)||(Dt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function WP(e,t,n){var r=Re,o=At(),i=Te;if(i){if(n===void 0)throw Error(z(407));n=n()}else n=t();var s=!cr((tt||o).memoizedState,n);if(s&&(o.memoizedState=n,Dt=!0),o=o.queue,xv(JP.bind(null,r,o,e),[e]),e=o.getSnapshot!==t||s||Mt!==null&&(Mt.memoizedState.tag&1)!==0,_c(e?9:8,{destroy:void 0},KP.bind(null,r,o,n,t),null),e){if(r.flags|=2048,rt===null)throw Error(z(349));i||(yi&127)!==0||FP(r,t,n)}return n}function FP(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t=Xm(),Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function KP(e,t,n,r){t.value=n,t.getSnapshot=r,eT(t)&&tT(e)}function JP(e,t,n){return n(function(){eT(t)&&tT(e)})}function eT(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cr(e,n)}catch(r){return!0}}function tT(e){var t=Ya(e,2);t!==null&&Xn(t,e,2)}function ly(e){var t=Pn();if(typeof e==="function"){var n=e;if(e=n(),ja){hs(!0);try{n()}finally{hs(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},t}function nT(e,t,n,r){return e.baseState=n,vv(e,tt,typeof r==="function"?r:vi)}function v7(e,t,n,r,o){if(Um(e))throw Error(z(485));if(e=t.action,e!==null){var i={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){i.listeners.push(s)}};xe.T!==null?n(!0):i.isTransition=!1,r(i),n=t.pending,n===null?(i.next=t.pending=i,rT(t,i)):(i.next=n.next,t.pending=n.next=i)}}function rT(e,t){var{action:n,payload:r}=t,o=e.state;if(t.isTransition){var i=xe.T,s={};s.types=i!==null?i.types:null,xe.T=s;try{var a=n(o,r),l=xe.S;l!==null&&l(s,a),q2(e,t,a)}catch(c){cy(e,t,c)}finally{i!==null&&s.types!==null&&(i.types=s.types),xe.T=i}}else try{i=n(o,r),q2(e,t,i)}catch(c){cy(e,t,c)}}function q2(e,t,n){n!==null&&typeof n==="object"&&typeof n.then==="function"?n.then(function(r){G2(e,t,r)},function(r){return cy(e,t,r)}):G2(e,t,n)}function G2(e,t,n){t.status="fulfilled",t.value=n,oT(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,rT(e,n)))}function cy(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,oT(t),t=t.next;while(t!==r)}e.action=null}function oT(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function iT(e,t){return t}function H2(e,t){if(Te){var n=rt.formState;if(n!==null){e:{var r=Re;if(Te){if(ft){t:{var o=ft;for(var i=Qr;o.nodeType!==8;){if(!i){o=null;break t}if(o=Mr(o.nextSibling),o===null){o=null;break t}}i=o.data,o=i==="F!"||i==="F"?o:null}if(o){ft=Mr(o.nextSibling),r=o.data==="F!";break e}}Ts(r)}r=!1}r&&(t=n[0])}}return n=Pn(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:iT,lastRenderedState:t},n.queue=r,n=xT.bind(null,Re,r),r.dispatch=n,r=ly(!1),i=Cv.bind(null,Re,!1,r.queue),r=Pn(),o={state:t,dispatch:null,action:e,pending:null},r.queue=o,n=v7.bind(null,Re,o,i,n),o.dispatch=n,r.memoizedState=e,[t,n,!1]}function W2(e){var t=At();return sT(t,tt,e)}function sT(e,t,n){if(t=vv(e,t,iT)[0],e=Up(vi)[0],typeof t==="object"&&t!==null&&typeof t.then==="function")try{var r=fd(t)}catch(s){if(s===Vc)throw Im;throw s}else r=t;t=At();var o=t.queue,i=o.dispatch;return n!==t.memoizedState&&(Re.flags|=2048,_c(9,{destroy:void 0},x7.bind(null,o,n),null)),[r,i,e]}function x7(e,t){e.action=t}function F2(e){var t=At(),n=tt;if(n!==null)return sT(t,n,e);At(),t=t.memoizedState,n=At();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function _c(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Re.updateQueue,t===null&&(t=Xm(),Re.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 aT(){return At().memoizedState}function Yp(e,t,n,r){var o=Pn();Re.flags|=e,o.memoizedState=_c(1|t,{destroy:void 0},n,r===void 0?null:r)}function Zm(e,t,n,r){var o=At();r=r===void 0?null:r;var i=o.memoizedState.inst;tt!==null&&r!==null&&pv(r,tt.memoizedState.deps)?o.memoizedState=_c(t,i,n,r):(Re.flags|=e,o.memoizedState=_c(1|t,i,n,r))}function K2(e,t){Yp(8390656,8,e,t)}function xv(e,t){Zm(2048,8,e,t)}function w7(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=Xm(),Re.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function lT(e){var t=At().memoizedState;return w7({ref:t,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(z(440));return t.impl.apply(void 0,arguments)}}function cT(e,t){return Zm(4,2,e,t)}function uT(e,t){return Zm(4,4,e,t)}function fT(e,t){if(typeof t==="function"){e=e();var n=t(e);return function(){typeof n==="function"?n():t(null)}}if(t!==null&&t!==void 0)return e=e(),t.current=e,function(){t.current=null}}function dT(e,t,n){n=n!==null&&n!==void 0?n.concat([e]):null,Zm(4,4,fT.bind(null,t,e),n)}function wv(){}function hT(e,t){var n=At();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&pv(t,r[1]))return r[0];return n.memoizedState=[e,t],e}function pT(e,t){var n=At();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&pv(t,r[1]))return r[0];if(r=e(),ja){hs(!0);try{e()}finally{hs(!1)}}return n.memoizedState=[r,t],r}function Sv(e,t,n){if(n===void 0||(yi&1073741824)!==0&&(Ne&261930)===0)return e.memoizedState=t;return e.memoizedState=n,e=rA(),Re.lanes|=e,Es|=e,n}function mT(e,t,n,r){if(cr(n,t))return n;if(As.current!==null)return e=Sv(e,n,r),cr(e,t)||(Dt=!0),e;if((yi&106)===0||(yi&1073741824)!==0&&(Ne&261930)===0)return Dt=!0,e.memoizedState=n;return e=rA(),Re.lanes|=e,Es|=e,t}function gT(e,t,n,r,o){var i=He.p;He.p=i!==0&&8>i?i:8;var s=xe.T,a={};a.types=s!==null?s.types:null,xe.T=a,Cv(e,!1,t,n);try{var l=o(),c=xe.S;if(c!==null&&c(a,l),l!==null&&typeof l==="object"&&typeof l.then==="function"){var u=O7(l,r);Nf(e,t,u,Er(e))}else Nf(e,t,r,Er(e))}catch(f){Nf(e,t,{then:function(){},status:"rejected",reason:f},Er())}finally{He.p=i,s!==null&&a.types!==null&&(s.types=a.types),xe.T=s}}function S7(){}function uy(e,t,n,r){if(e.tag!==5)throw Error(z(476));var o=OT(e).queue;gT(e,o,t,Pa,n===null?S7:function(){return bT(e),n(r)})}function OT(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Pa,baseState:Pa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:Pa},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bT(e){var t=OT(e);t.next===null&&(t=e.alternate.memoizedState),Nf(e,t.next.queue,{},Er())}function kv(){return rn(Bc)}function yT(){return At().memoizedState}function vT(){return At().memoizedState}function k7(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Er();e=Ea(n);var r=Ma(t,e,n);r!==null&&(Xn(r,t,n),$f(r,t,n)),t={cache:lv()},e.payload=t;return}t=t.return}}function C7(e,t,n){var r=Er();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Um(e)?wT(t,n):(n=iv(e,t,n,r),n!==null&&(Xn(n,e,r),ST(n,t,r)))}function xT(e,t,n){var r=Er();Nf(e,t,n,r)}function Nf(e,t,n,r){var o={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Um(e))wT(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,a=i(s,n);if(o.hasEagerState=!0,o.eagerState=a,cr(a,s))return zm(e,t,o,0),rt===null&&Lm(),!1}catch(l){}finally{}if(n=iv(e,t,o,r),n!==null)return Xn(n,e,r),ST(n,t,r),!0}return!1}function Cv(e,t,n,r){if(r={lane:2,revertLane:Nv(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Um(e)){if(t)throw Error(z(479))}else t=iv(e,n,r,2),t!==null&&Xn(t,e,2)}function Um(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function wT(e,t){Pc=mm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ST(e,t,n){if((n&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,sP(e,n)}}var Om={readContext:rn,use:Bm,useCallback:Ct,useContext:Ct,useEffect:Ct,useImperativeHandle:Ct,useLayoutEffect:Ct,useInsertionEffect:Ct,useMemo:Ct,useReducer:Ct,useRef:Ct,useState:Ct,useDebugValue:Ct,useDeferredValue:Ct,useTransition:Ct,useSyncExternalStore:Ct,useId:Ct,useHostTransitionStatus:Ct,useFormState:Ct,useActionState:Ct,useOptimistic:Ct,useMemoCache:Ct,useCacheRefresh:Ct,useEffectEvent:Ct},kT={readContext:rn,use:Bm,useCallback:function(e,t){return Pn().memoizedState=[e,t===void 0?null:t],e},useContext:rn,useEffect:K2,useImperativeHandle:function(e,t,n){n=n!==null&&n!==void 0?n.concat([e]):null,Yp(4194308,4,fT.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yp(4194308,4,e,t)},useInsertionEffect:function(e,t){Yp(4,2,e,t)},useMemo:function(e,t){var n=Pn();t=t===void 0?null:t;var r=e();if(ja){hs(!0);try{e()}finally{hs(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Pn();if(n!==void 0){var o=n(t);if(ja){hs(!0);try{n(t)}finally{hs(!1)}}}else o=t;return r.memoizedState=r.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},r.queue=e,e=e.dispatch=C7.bind(null,Re,e),[r.memoizedState,e]},useRef:function(e){var t=Pn();return e={current:e},t.memoizedState=e},useState:function(e){e=ly(e);var t=e.queue,n=xT.bind(null,Re,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:wv,useDeferredValue:function(e,t){var n=Pn();return Sv(n,e,t)},useTransition:function(){var e=ly(!1);return e=gT.bind(null,Re,e.queue,!0,!1),Pn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Re,o=Pn();if(Te){if(n===void 0)throw Error(z(407));n=n()}else{if(n=t(),rt===null)throw Error(z(349));(Ne&127)!==0||FP(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,K2(JP.bind(null,r,i,e),[e]),r.flags|=2048,_c(9,{destroy:void 0},KP.bind(null,r,i,n,t),null),n},useId:function(){var e=Pn(),t=rt.identifierPrefix;if(Te){var n=$o,r=Mo;n=(r&~(1<<32-lr(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=gm++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=b7++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:kv,useFormState:H2,useActionState:H2,useOptimistic:function(e){var t=Pn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Cv.bind(null,Re,!0,n),n.dispatch=t,[e,t]},useMemoCache:yv,useCacheRefresh:function(){return Pn().memoizedState=k7.bind(null,Re)},useEffectEvent:function(e){var t=Pn(),n={impl:e};return t.memoizedState=n,function(){if((Ge&2)!==0)throw Error(z(440));return n.impl.apply(void 0,arguments)}}},CT={readContext:rn,use:Bm,useCallback:hT,useContext:rn,useEffect:xv,useImperativeHandle:dT,useInsertionEffect:cT,useLayoutEffect:uT,useMemo:pT,useReducer:Up,useRef:aT,useState:function(){return Up(vi)},useDebugValue:wv,useDeferredValue:function(e,t){var n=At();return mT(n,tt.memoizedState,e,t)},useTransition:function(){var e=Up(vi)[0],t=At().memoizedState;return[typeof e==="boolean"?e:fd(e),t]},useSyncExternalStore:WP,useId:yT,useHostTransitionStatus:kv,useFormState:W2,useActionState:W2,useOptimistic:function(e,t){var n=At();return nT(n,tt,e,t)},useMemoCache:yv,useCacheRefresh:vT,useEffectEvent:lT},R7={readContext:rn,use:Bm,useCallback:hT,useContext:rn,useEffect:xv,useImperativeHandle:dT,useInsertionEffect:cT,useLayoutEffect:uT,useMemo:pT,useReducer:vb,useRef:aT,useState:function(){return vb(vi)},useDebugValue:wv,useDeferredValue:function(e,t){var n=At();return tt===null?Sv(n,e,t):mT(n,tt.memoizedState,e,t)},useTransition:function(){var e=vb(vi)[0],t=At().memoizedState;return[typeof e==="boolean"?e:fd(e),t]},useSyncExternalStore:WP,useId:yT,useHostTransitionStatus:kv,useFormState:F2,useActionState:F2,useOptimistic:function(e,t){var n=At();if(tt!==null)return nT(n,tt,e,t);return n.baseState=e,[e,n.queue.dispatch]},useMemoCache:yv,useCacheRefresh:vT,useEffectEvent:lT};function xb(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n===null||n===void 0?t:ot({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fy={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Er(),o=Ea(r);o.payload=t,n!==void 0&&n!==null&&(o.callback=n),t=Ma(e,o,r),t!==null&&(Xn(t,e,r),$f(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Er(),o=Ea(r);o.tag=1,o.payload=t,n!==void 0&&n!==null&&(o.callback=n),t=Ma(e,o,r),t!==null&&(Xn(t,e,r),$f(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Er(),r=Ea(n);r.tag=2,t!==void 0&&t!==null&&(r.callback=t),t=Ma(e,r,n),t!==null&&(Xn(t,e,n),$f(t,e,n))}};function J2(e,t,n,r,o,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate==="function"?e.shouldComponentUpdate(r,i,s):t.prototype&&t.prototype.isPureReactComponent?!Yf(n,r)||!Yf(o,i):!0}function eR(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&&fy.enqueueReplaceState(t,t.state,null)}function Ia(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=ot({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function P7(e){am(e)}function T7(e){console.error(e)}function A7(e){am(e)}function bm(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function tR(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function dy(e,t,n){return n=Ea(n),n.tag=3,n.payload={element:null},n.callback=function(){bm(e,t)},n}function RT(e){return e=Ea(e),e.tag=3,e}function PT(e,t,n,r){var o=n.type.getDerivedStateFromError;if(typeof o==="function"){var i=r.value;e.payload=function(){return o(i)},e.callback=function(){tR(t,n,r)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch==="function"&&(e.callback=function(){tR(t,n,r),typeof o!=="function"&&(Ss===null?Ss=new Set([this]):Ss.add(this));var a=r.stack;this.componentDidCatch(r.value,{componentStack:a!==null?a:""})})}function Q7(e,t,n,r,o){if(n.flags|=32768,r!==null&&typeof r==="object"&&typeof r.then==="function"){if(t=n.alternate,t!==null&&_a(t,n,o,!0),n=ln.current,n!==null){switch(n.tag){case 31:case 13:case 19:return vn===null?Rm():n.alternate===null&&Rt===0&&(Rt=3),n.flags&=-257,n.flags|=65536,n.lanes=o,r===dm?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Tb(e,r,o)),!1;case 22:return n.flags|=65536,r===dm?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)),Tb(e,r,o)),!1}throw Error(z(435,n.tag))}return Tb(e,r,o),Rm(),!1}if(Te)return t=ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,r!==ey&&(e=Error(z(422),{cause:r}),qf(Ar(e,n)))):(r!==ey&&(t=Error(z(423),{cause:r}),qf(Ar(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,r=Ar(r,n),o=dy(e.stateNode,r,o),yb(e,o),Rt!==4&&(Rt=2)),!1;var i=Error(z(520),{cause:r});if(i=Ar(i,n),If===null?If=[i]:If.push(i),Rt!==4&&(Rt=2),t===null)return!0;r=Ar(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=dy(n.stateNode,r,e),yb(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError==="function"||i!==null&&typeof i.componentDidCatch==="function"&&(Ss===null||!Ss.has(i))))return n.flags|=65536,o&=-o,n.lanes|=o,o=RT(o),PT(o,e,n,r),yb(n,o),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Rv=Error(z(461)),Dt=!1;function zt(e,t,n,r){t.child=e===null?UP(t,null,n,r):za(t,e.child,n,r)}function nR(e,t,n,r,o){n=n.render;var i=t.ref;if("ref"in r){var s={};for(var a in r)a!=="ref"&&(s[a]=r[a])}else s=r;if(Na(t),r=mv(e,t,n,s,i,o),a=gv(),e!==null&&!Dt)return Ov(e,t,o),xi(e,t,o);return Te&&a&&jm(t),t.flags|=1,zt(e,t,r,o),t.child}function rR(e,t,n,r,o){if(e===null){var i=n.type;if(typeof i==="function"&&!sv(i)&&i.defaultProps===void 0&&n.compare===null)return t.tag=15,t.type=i,TT(e,t,i,r,o);return e=Xp(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e}if(i=e.child,!Tv(e,o)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Yf,n(s,r)&&e.ref===t.ref)return xi(e,t,o)}return t.flags|=1,e=mi(i,r),e.ref=t.ref,e.return=t,t.child=e}function TT(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Yf(i,r)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=r=i,Tv(e,o))(e.flags&131072)!==0&&(Dt=!0);else return t.lanes=e.lanes,xi(e,t,o)}return hy(e,t,n,r,o)}function AT(e,t,n,r){var o=r.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){r=t.child=e.child;for(o=0;r!==null;)o=o|r.lanes|r.childLanes,r=r.sibling;r=o&~i}else r=0,t.child=null;return oR(e,t,i,n,r)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Zp(t,i!==null?i.cachePool:null),i!==null?V2(t,i):sy(),qP(t);else return r=t.lanes=536870912,oR(e,t,i!==null?i.baseLanes|n:n,n,r)}else i!==null?(Zp(t,i.cachePool),V2(t,i),ws(),t.memoizedState=null):(e!==null&&Zp(t,null),sy(),ws());return zt(e,t,o,n),t.child}function Lf(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function oR(e,t,n,r,o){var i=cv();return i=i===null?null:{parent:$t._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Zp(t,null),sy(),qP(t),e!==null&&_a(e,t,r,!0),t.childLanes=o,null}function Vp(e,t){return t=Ym({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function iR(e,t,n){return za(t,e.child,null,n),e=Vp(t,t.pendingProps),e.flags|=2,rr(t),t.memoizedState=null,e}function E7(e,t,n){var r=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(r.mode==="hidden")return e=Vp(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Lf(null,e);if(ay(t),(e=ft)?(e=QA(e,Qr),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ps!==null?{id:Mo,overflow:$o}:null,retryLane:536870912,hydrationErrors:null},n=LP(e),n.return=t,t.child=n,qt=t,ft=null)):e=null,e===null)throw Ts(t);return t.lanes=536870912,null}return Vp(t,r)}var i=e.memoizedState;if(i!==null){var s=i.dehydrated;if(ay(t),o)if(t.flags&256)t.flags&=-257,t=iR(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(z(558));else if(Dt||_a(e,t,n,!1),o=(n&e.childLanes)!==0,Dt||o){if(As.current===null){if(r=rt,r!==null&&(s=aP(r,n),s!==0&&s!==i.retryLane))throw i.retryLane=s,Ya(e,s),Xn(r,e,s),Rv;Rm()}t=iR(e,t,n)}else e=i.treeContext,ft=Mr(s.nextSibling),qt=t,Te=!0,vs=null,Qr=!1,e!==null&&jP(t,e),t=Vp(t,r),t.flags|=134221824;return t}return e=mi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function sc(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(z(284));if(e===null||e.ref!==n)t.flags|=4194816}}function hy(e,t,n,r,o){if(Na(t),n=mv(e,t,n,r,void 0,o),r=gv(),e!==null&&!Dt)return Ov(e,t,o),xi(e,t,o);return Te&&r&&jm(t),t.flags|=1,zt(e,t,n,o),t.child}function sR(e,t,n,r,o,i){if(Na(t),t.updateQueue=null,n=HP(t,r,n,o),GP(e),r=gv(),e!==null&&!Dt)return Ov(e,t,i),xi(e,t,i);return Te&&r&&jm(t),t.flags|=1,zt(e,t,n,i),t.child}function aR(e,t,n,r,o){if(Na(t),t.stateNode===null){var i=bc,s=n.contextType;typeof s==="object"&&s!==null&&(i=rn(s)),i=new n(r,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=fy,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=r,i.state=t.memoizedState,i.refs={},fv(t),s=n.contextType,i.context=typeof s==="object"&&s!==null?rn(s):bc,i.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s==="function"&&(xb(t,n,s,r),i.state=t.memoizedState),typeof n.getDerivedStateFromProps==="function"||typeof i.getSnapshotBeforeUpdate==="function"||typeof i.UNSAFE_componentWillMount!=="function"&&typeof i.componentWillMount!=="function"||(s=i.state,typeof i.componentWillMount==="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==="function"&&i.UNSAFE_componentWillMount(),s!==i.state&&fy.enqueueReplaceState(i,i.state,null),_f(t,r,i,o),Df(),i.state=t.memoizedState),typeof i.componentDidMount==="function"&&(t.flags|=4194308),r=!0}else if(e===null){i=t.stateNode;var a=t.memoizedProps,l=Ia(n,a);i.props=l;var c=i.context,u=n.contextType;s=bc,typeof u==="object"&&u!==null&&(s=rn(u));var f=n.getDerivedStateFromProps;u=typeof f==="function"||typeof i.getSnapshotBeforeUpdate==="function",a=t.pendingProps!==a,u||typeof i.UNSAFE_componentWillReceiveProps!=="function"&&typeof i.componentWillReceiveProps!=="function"||(a||c!==s)&&eR(t,i,r,s),fs=!1;var d=t.memoizedState;i.state=d,_f(t,r,i,o),Df(),c=t.memoizedState,a||d!==c||fs?(typeof f==="function"&&(xb(t,n,f,r),c=t.memoizedState),(l=fs||J2(t,n,l,r,d,c,s))?(u||typeof i.UNSAFE_componentWillMount!=="function"&&typeof i.componentWillMount!=="function"||(typeof i.componentWillMount==="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount==="function"&&(t.flags|=4194308)):(typeof i.componentDidMount==="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=s,r=l):(typeof i.componentDidMount==="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,oy(e,t),s=t.memoizedProps,u=Ia(n,s),i.props=u,f=t.pendingProps,d=i.context,c=n.contextType,l=bc,typeof c==="object"&&c!==null&&(l=rn(c)),a=n.getDerivedStateFromProps,(c=typeof a==="function"||typeof i.getSnapshotBeforeUpdate==="function")||typeof i.UNSAFE_componentWillReceiveProps!=="function"&&typeof i.componentWillReceiveProps!=="function"||(s!==f||d!==l)&&eR(t,i,r,l),fs=!1,d=t.memoizedState,i.state=d,_f(t,r,i,o),Df();var h=t.memoizedState;s!==f||d!==h||fs||e!==null&&e.dependencies!==null&&fm(e.dependencies)?(typeof a==="function"&&(xb(t,n,a,r),h=t.memoizedState),(u=fs||J2(t,n,u,r,d,h,l)||e!==null&&e.dependencies!==null&&fm(e.dependencies))?(c||typeof i.UNSAFE_componentWillUpdate!=="function"&&typeof i.componentWillUpdate!=="function"||(typeof i.componentWillUpdate==="function"&&i.componentWillUpdate(r,h,l),typeof i.UNSAFE_componentWillUpdate==="function"&&i.UNSAFE_componentWillUpdate(r,h,l)),typeof i.componentDidUpdate==="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate==="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!=="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!=="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=l,r=u):(typeof i.componentDidUpdate!=="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!=="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,sc(e,t),r=(t.flags&128)!==0,i||r?(i=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=="function"?null:i.render(),t.flags|=1,e!==null&&r?(t.child=za(t,e.child,null,o),t.child=za(t,null,n,o)):zt(e,t,n,o),t.memoizedState=i.state,e=t.child):e=xi(e,t,o),e}function lR(e,t,n,r){return Da(),t.flags|=256,zt(e,t,n,r),t.child}var py={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function my(e){return{baseLanes:e,cachePool:XP()}}function gy(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=ir),e}function QT(e,t,n){var r=t.pendingProps,o=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(sn.current&2)!==0),s&&(o=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(o?xs(t):ws(),(e=ft)?(e=QA(e,Qr),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ps!==null?{id:Mo,overflow:$o}:null,retryLane:536870912,hydrationErrors:null},n=LP(e),n.return=t,t.child=n,qt=t,ft=null)):e=null,e===null)throw Ts(t);return jv(e)?t.lanes=32:t.lanes=536870912,null}if(i=r.children,r=r.fallback,o)return ws(),o=t.mode,i=Ym({mode:"hidden",children:i},o),r=Ta(r,o,n,null),i.return=t,r.return=t,i.sibling=r,t.child=i,r=t.child,r.memoizedState=my(n),r.childLanes=gy(e,s,n),t.memoizedState=py,Lf(null,r);return xs(t),Pv(t,i)}var a=e.memoizedState;if(a!==null){var l=a.dehydrated;if(l!==null)return M7(e,t,i,s,r,l,a,n)}if(o)return ws(),o=r.fallback,i=t.mode,a=e.child,l=a.sibling,r=mi(a,{mode:"hidden",children:r.children}),r.subtreeFlags=a.subtreeFlags&1206910976,l!==null?o=mi(l,o):(o=Ta(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,Lf(null,r),r=t.child,o=e.child.memoizedState,o===null?o=my(n):(i=o.cachePool,i!==null?(a=$t._currentValue,i=i.parent!==a?{parent:a,pool:a}:i):i=XP(),o={baseLanes:o.baseLanes|n,cachePool:i}),r.memoizedState=o,r.childLanes=gy(e,s,n),t.memoizedState=py,Lf(e.child,r);return xs(t),n=e.child,e=n.sibling,n=mi(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 Pv(e,t){return t=Ym({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ym(e,t){return e=In(22,e,null,t),e.lanes=0,e}function Tp(e,t,n){return za(t,e.child,null,n),e=Pv(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function M7(e,t,n,r,o,i,s,a){if(n){if(t.flags&256)return xs(t),t.flags&=-257,Tp(e,t,a);if(t.memoizedState!==null)return ws(),t.child=e.child,t.flags|=128,null;return ws(),i=o.fallback,s=t.mode,o=Ym({mode:"visible",children:o.children},s),i=Ta(i,s,a,null),i.flags|=2,o.return=t,i.return=t,o.sibling=i,t.child=o,za(t,e.child,null,a),o=t.child,o.memoizedState=my(a),o.childLanes=gy(e,r,a),t.memoizedState=py,Lf(null,o)}if(xs(t),jv(i)){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==""&&(o=Error(z(419)),o.stack="",o.digest=r,qf({value:o,source:null,stack:null})),Tp(e,t,a)}if(Dt||_a(e,t,a,!1),r=(a&e.childLanes)!==0,Dt||r){if(As.current!==null)return Tp(e,t,a);if(r=rt,r!==null&&(o=aP(r,a),o!==0&&o!==s.retryLane))throw s.retryLane=o,Ya(e,o),Xn(r,e,o),Rv;return Zy(i)||Rm(),Tp(e,t,a)}if(Zy(i))return t.flags|=192,t.child=e.child,null;return e=s.treeContext,ft=Mr(i.nextSibling),qt=t,Te=!0,vs=null,Qr=!1,e!==null&&jP(t,e),t=Pv(t,o.children),t.flags|=134221824,t}function cR(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Bp(e.return,t,n)}function uR(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&pm(n)===null&&(t=e),e=e.sibling}return t}function Ap(e,t,n,r,o,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,treeForkCount:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=o,s.treeForkCount=i)}function wb(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function Oy(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;r=r.children;var s=sn.current;if(t.flags&128)return Hf(t,s),null;var a=(s&2)!==0;if(a?(s=s&1|2,t.flags|=128):s&=1,Hf(t,s),o==="backwards"&&e!==null?(wb(e),zt(e,t,r,n),wb(e)):zt(e,t,r,n),r=Te?Vf:0,!a&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cR(e,n,t);else if(e.tag===19)cR(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"backwards":n=uR(t.child),n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null,wb(t)),Ap(t,!0,o,null,i,r);break;case"unstable_legacy-backwards":n=null,o=t.child;for(t.child=null;o!==null;){if(e=o.alternate,e!==null&&pm(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Ap(t,!0,n,null,i,r);break;case"together":Ap(t,!1,null,null,void 0,r);break;case"independent":t.memoizedState=null;break;default:n=uR(t.child),n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Ap(t,!1,o,n,i,r)}return t.child}function fR(e,t,n){var r=t.pendingProps;return ms(t,t.type,r.value),zt(e,t,r.children,n),t.child}function xi(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Es|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(_a(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(z(153));if(t.child!==null){e=t.child,n=mi(e,e.pendingProps),t.child=n;for(n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Tv(e,t){if((e.lanes&t)!==0)return!0;return e=e.dependencies,e!==null&&fm(e)?!0:!1}function $7(e,t,n){switch(t.tag){case 3:rm(t,t.stateNode.containerInfo),ms(t,$t,e.memoizedState.cache),Da();break;case 27:case 5:Ub(t);break;case 4:rm(t,t.stateNode.containerInfo);break;case 10:ms(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ay(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return xs(t),t.flags|=128,null;r=_a(e,t,n,!1);var o=t.child.childLanes;if(r||(n&o)!==0)return QT(e,t,n);return xs(t),e=xi(e,t,n),e!==null?e.sibling:null}xs(t);break;case 19:if(t.flags&128)return Oy(e,t,n);if(o=(e.flags&128)!==0,r=(n&t.childLanes)!==0,r||(_a(e,t,n,!1),r=(n&t.childLanes)!==0),o){if(r)return Oy(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Hf(t,sn.current),r)break;else return null;case 22:return t.lanes=0,AT(e,t,n,t.pendingProps);case 24:ms(t,$t,e.memoizedState.cache)}return xi(e,t,n)}function ET(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Dt=!0;else{if(!Tv(e,n)&&(t.flags&128)===0)return Dt=!1,$7(e,t,n);Dt=(e.flags&131072)!==0?!0:!1}else Dt=!1,Te&&(t.flags&1048576)!==0&&zP(t,Vf,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Sa(t.elementType),t.type=e,typeof e==="function")sv(e)?(r=Ia(e,r),t.tag=1,t=aR(null,t,e,r,n)):(t.tag=0,t=hy(null,t,e,r,n));else{if(e!==void 0&&e!==null){var o=e.$$typeof;if(o===Gy){t.tag=11,t=nR(null,t,e,r,n);break e}else if(o===Hy){t.tag=14,t=rR(null,t,e,r,n);break e}else if(o===Qo){t.tag=10,t.type=e,t=fR(null,t,n);break e}}throw t=Bb(e)||e,Error(z(306,t,""))}}return t;case 0:return hy(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,o=Ia(r,t.pendingProps),aR(e,t,r,o,n);case 3:e:{if(rm(t,t.stateNode.containerInfo),e===null)throw Error(z(387));r=t.pendingProps;var i=t.memoizedState;o=i.element,oy(e,t),_f(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ms(t,$t,r),r!==i.cache&&ny(t,[$t],n,!0),Df(),r=s.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=lR(e,t,r,n);break e}else if(r!==o){o=Ar(Error(z(424)),t),qf(o),t=lR(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}ft=Mr(e.firstChild),qt=t,Te=!0,vs=null,Qr=!0,n=UP(t,null,r,n);for(t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Da(),r===o){t=xi(e,t,n);break e}zt(e,t,r,n)}t=t.child}return t;case 26:return sc(e,t),e===null?(n=NR(t.type,null,t.pendingProps,null))?t.memoizedState=n:Te||(t.stateNode=xA(t.type,t.pendingProps,ys.current,t)):t.memoizedState=NR(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ub(t),e===null&&Te&&(r=t.stateNode=EA(t.type,t.pendingProps,ys.current),qt=t,Qr=!0,o=ft,$s(t.type)?(Uy=o,ft=Mr(r.firstChild)):ft=o),zt(e,t,t.pendingProps.children,n),sc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:if(e===null&&Te){if(o=r=ft)r=CX(r,t.type,t.pendingProps,Qr),r!==null?(t.stateNode=r,qt=t,ft=Mr(r.firstChild),Qr=!1,o=!0):o=!1;o||Ts(t)}return Ub(t),o=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,r=i.children,Iy(o,i)?r=null:s!==null&&Iy(o,s)&&(t.flags|=32),t.memoizedState!==null&&(o=mv(e,t,y7,null,null,n),Bc._currentValue=o),sc(e,t),zt(e,t,r,n),t.child;case 6:if(e===null&&Te){if(e=n=ft)n=RX(n,t.pendingProps,Qr),n!==null?(t.stateNode=n,qt=t,ft=null,e=!0):e=!1;e||Ts(t)}return null;case 13:return QT(e,t,n);case 4:return rm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=za(t,null,r,n):zt(e,t,r,n),t.child;case 11:return nR(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,sc(e,t),zt(e,t,r,n),t.child;case 8:return zt(e,t,t.pendingProps.children,n),t.child;case 12:return zt(e,t,t.pendingProps.children,n),t.child;case 10:return fR(e,t,n);case 9:return o=t.type._context,r=t.pendingProps.children,Na(t),o=rn(o),r=r(o),t.flags|=1,zt(e,t,r,n),t.child;case 14:return rR(e,t,t.type,t.pendingProps,n);case 15:return TT(e,t,t.type,t.pendingProps,n);case 19:return Oy(e,t,n);case 31:return E7(e,t,n);case 22:return AT(e,t,n,t.pendingProps);case 24:return Na(t),r=rn($t),e===null?(o=cv(),o===null&&(o=rt,i=lv(),o.pooledCache=i,i.refCount++,i!==null&&(o.pooledCacheLanes|=n),o=i),t.memoizedState={parent:r,cache:o},fv(t),ms(t,$t,o)):((e.lanes&n)!==0&&(oy(e,t),_f(t,null,null,n),Df()),o=e.memoizedState,i=t.memoizedState,o.parent!==r?(o={parent:r,cache:r},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),ms(t,$t,r)):(r=i.cache,ms(t,$t,r),r!==o.cache&&ny(t,[$t],n,!0))),zt(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!=="auto"?t.flags|=e===null?18882560:18874368:Te&&jm(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:sc(e,t),zt(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(z(156,t.tag))}function di(e){e.flags|=4}function Sb(e,t,n,r,o){var i;if(i=(e.mode&32)!==0)i=n===null?jR(t,r):jR(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet);if(i){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(sA())e.flags|=8192;else throw Qa=dm,uv}else e.flags&=-16777217}function dR(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!_A(t))if(sA())e.flags|=8192;else throw Qa=dm,uv}function Qp(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?oP():536870912,e.lanes|=t,Nc|=t)}function Of(e,t){if(!Te)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,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;break;default:t=e.tail;for(n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function ut(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&1206910976,r|=o.flags&1206910976,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function D7(e,t,n){var r=t.pendingProps;switch(av(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(t),null;case 1:return ut(t),null;case 3:if(n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),gi($t),Mc(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),e===null||e.child===null)oc(t)?di(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,bb());return ut(t),null;case 26:var{type:o,memoizedState:i}=t;return e===null?(di(t),i!==null?(ut(t),dR(t,i)):(ut(t),Sb(t,o,null,r,n))):i?i!==e.memoizedState?(di(t),ut(t),dR(t,i)):(ut(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&di(t),ut(t),Sb(t,o,e,r,n)),null;case 27:if(om(t),n=ys.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&di(t);else{if(!r){if(t.stateNode===null)throw Error(z(166));return ut(t),t.subtreeFlags&=-33554433,null}e=Do.current,oc(t)?j2(t,e):(e=EA(o,r,n),t.stateNode=e,di(t))}return ut(t),t.subtreeFlags&=-33554433,null;case 5:if(om(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&di(t);else{if(!r){if(t.stateNode===null)throw Error(z(166));return ut(t),t.subtreeFlags&=-33554433,null}if(i=Do.current,oc(t))j2(t,i);else{var s=Jf(ys.current);switch(i){case 1:i=s.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:i=s.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":i=s.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":i=s.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":i=s.createElement("div"),i.innerHTML="<script></script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is==="string"?s.createElement("select",{is:r.is}):s.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is==="string"?s.createElement(o,{is:r.is}):s.createElement(o)}}i[nn]=t,i[Zn]=r;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)i.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 e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(an(i,o,r),o){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&di(t)}}return ut(t),t.subtreeFlags&=-33554433,Sb(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&di(t);else{if(typeof r!=="string"&&t.stateNode===null)throw Error(z(166));if(e=ys.current,oc(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,o=qt,o!==null)switch(o.tag){case 27:case 5:r=o.memoizedProps}e[nn]=t,e=e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||yA(e.nodeValue,n)?!0:!1,e||Ts(t,!0)}else e=Jf(e).createTextNode(r),e[nn]=t,t.stateNode=e}return ut(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=oc(t),n!==null){if(e===null){if(!r)throw Error(z(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(z(557));e[nn]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),e=!1}else n=bb(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e){if(t.flags&256)return rr(t),t;return rr(t),null}if((t.flags&128)!==0)throw Error(z(558))}return ut(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=oc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(z(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(z(317));o[nn]=t}else Da(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ut(t),o=!1}else o=bb(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o){if(t.flags&256)return rr(t),t;return rr(t),null}}if(rr(t),(t.flags&128)!==0)return t.lanes=n,t;return n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,o=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(o=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==o&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Qp(t,t.updateQueue),ut(t),null;case 4:return Mc(),e===null&&OA(t.stateNode.containerInfo),t.flags|=67108864,ut(t),null;case 10:return gi(t.type),ut(t),null;case 19:if(hv(t),r=t.memoizedState,r===null)return ut(t),null;if(o=(t.flags&128)!==0,i=r.rendering,i===null)if(o)Of(r,!1);else{if(Rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=pm(e),i!==null){t.flags|=128,Of(r,!1),e=i.updateQueue,t.updateQueue=e,Qp(t,e),t.subtreeFlags=0,e=n;for(n=t.child;n!==null;)NP(n,e),n=n.sibling;return Hf(t,sn.current&1|2),Te&&hi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&sr()>km&&(t.flags|=128,o=!0,Of(r,!1),t.lanes=4194304)}else{if(!o)if(e=pm(i),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Qp(t,e),Of(r,!0),r.tail===null&&r.tailMode!=="collapsed"&&r.tailMode!=="visible"&&!i.alternate&&!Te)return ut(t),null}else 2*sr()-r.renderingStartTime>km&&n!==536870912&&(t.flags|=128,o=!0,Of(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}if(r.tail!==null){e=r.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=sr(),e.sibling=null,i=sn.current,i=o?i&1|2:i&1,r.tailMode==="visible"||r.tailMode==="collapsed"||!n||Te?Hf(t,i):(n=i,dt(ln,t),dt(sn,n),vn===null&&(vn=t)),Te&&hi(t,r.treeForkCount),e}return ut(t),null;case 22:case 23:return rr(t),dv(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(n&536870912)!==0&&(t.flags&128)===0&&(ut(t),t.subtreeFlags&6&&(t.flags|=8192)):ut(t),n=t.updateQueue,n!==null&&Qp(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&&on(Aa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),gi($t),ut(t),null;case 25:return null;case 30:return t.flags|=33554432,ut(t),null}throw Error(z(156,t.tag))}function _7(e,t){switch(av(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gi($t),Mc(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return om(t),null;case 31:if(t.memoizedState!==null){if(rr(t),t.alternate===null)throw Error(z(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(rr(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(z(340));Da()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return hv(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Mc(),null;case 10:return gi(t.type),null;case 22:case 23:return rr(t),dv(),e!==null&&on(Aa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return gi($t),null;case 25:return null;default:return null}}function MT(e,t){switch(av(t),t.tag){case 3:gi($t),Mc();break;case 26:case 27:case 5:om(t);break;case 4:Mc();break;case 31:t.memoizedState!==null&&rr(t);break;case 13:rr(t);break;case 19:hv(t);break;case 10:gi(t.type);break;case 22:case 23:rr(t),dv(),e!==null&&on(Aa);break;case 24:gi($t)}}function dd(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var o=r.next;n=o;do{if((n.tag&e)===e){r=void 0;var i=n.create,s=n.inst;r=i(),s.destroy=r}n=n.next}while(n!==o)}}catch(a){Je(t,t.return,a)}}function Qs(e,t,n){try{var r=t.updateQueue,o=r!==null?r.lastEffect:null;if(o!==null){var i=o.next;r=i;do{if((r.tag&e)===e){var s=r.inst,a=s.destroy;if(a!==void 0){s.destroy=void 0,o=t;var l=n,c=a;try{c()}catch(u){Je(o,l,u)}}}r=r.next}while(r!==i)}}catch(u){Je(t,t.return,u)}}function $T(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{VP(t,n)}catch(r){Je(e,e.return,r)}}}function DT(e,t,n){n.props=Ia(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Je(e,t,r)}}function To(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:var o=e.stateNode,i=bi(e.memoizedProps,o);if(o.ref===null||o.ref.name!==i)o.ref=CA(i);r=o.ref;break;case 7:if(e.stateNode===null){var s=new ur(e);Bn(e.child,!1,SX,s,void 0,void 0),e.stateNode=s}r=e.stateNode;break;default:r=e.stateNode}typeof n==="function"?e.refCleanup=n(r):n.current=r}}catch(a){Je(e,t,a)}}function tn(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==="function")try{r()}catch(o){Je(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==="function")try{n(null)}catch(o){Je(e,t,o)}else n.current=null}function ym(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)AA(e.stateNode,t[n])}function hR(e){for(var t=e.return;t!==null;){if(Qv(t)&&AA(e.stateNode,t.stateNode),Av(t))break;t=t.return}}function zf(e){for(var t=e.return;t!==null;){if(Qv(t)&&kX(e.stateNode,t.stateNode),Av(t))break;t=t.return}}function Av(e){return e.tag===5||e.tag===3||e.tag===27}function Qv(e){return e&&e.tag===7&&e.stateNode!==null}function by(e){var{type:t,memoizedProps:n,stateNode:r}=e;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(o){Je(e,e.return,o)}}function kb(e,t,n){try{var r=e.stateNode;iX(r,e.type,n,t),r[Zn]=t}catch(o){Je(e,e.return,o)}}function _T(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$s(e.type)||e.tag===4}function Cb(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_T(e.return))return null;e=e.return}e.sibling.return=e.return;for(e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&$s(e.type))continue e;if(e.flags&2)continue e;if(e.child===null||e.tag===4)continue e;else e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function yy(e,t,n,r){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(o,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(o),n=n._reactRootContainer,n!==null&&n!==void 0||t.onclick!==null||(t.onclick=Eo)),ym(e,r),Ye=!0;else if(o!==4&&(o===27&&(ym(e,r),r=null,$s(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(yy(e,t,n,r),e=e.sibling;e!==null;)yy(e,t,n,r),e=e.sibling}function vm(e,t,n,r){var o=e.tag;if(o===5||o===6)o=e.stateNode,t?n.insertBefore(o,t):n.appendChild(o),ym(e,r),Ye=!0;else if(o!==4&&(o===27&&(ym(e,r),r=null,$s(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(vm(e,t,n,r),e=e.sibling;e!==null;)vm(e,t,n,r),e=e.sibling}function NT(e){var{stateNode:t,memoizedProps:n}=e;try{for(var r=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);an(t,r,n),t[nn]=e,t[Zn]=n}catch(i){Je(e,e.return,i)}}var xm=!1,or=null;function pR(e){if(e.tag===30||(e.subtreeFlags&33554432)!==0)xm=!0}var Ao=null;function mR(){var e=Ao;return Ao=null,e}var jn=0;function qc(e,t,n,r,o){return jn=0,LT(e.child,t,n,r,o)}function LT(e,t,n,r,o){for(var i=!1;e!==null;){if(e.tag===5){var s=e.stateNode;if(r!==null){var a=Xy(s);r.push(a),a.view&&(i=!0)}else i||Xy(s).view&&(i=!0);xm=!0,wA(s,jn===0?t:t+"_"+jn,n),jn++}else if(e.tag!==22||e.memoizedState===null)e.tag===30&&o||LT(e.child,t,n,r,o)&&(i=!0);e=e.sibling}return i}function No(e,t){for(;e!==null;){if(e.tag===5)SA(e.stateNode,e.memoizedProps);else if(e.tag!==22||e.memoizedState===null)e.tag===30&&t||No(e.child,t);e=e.sibling}}function qp(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(qp(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(z(544));var n=t.name;t=ki(t.default,t.share),t!=="none"&&(qc(e,n,t,null,!1)||No(e.child,!1))}}e=e.sibling}}function vy(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,o=bi(r,n),i=ki(r.default,n.paired?r.share:r.enter);i!=="none"?qc(e,o,i,null,!1)?(qp(e),n.paired||t||Lc(e,r.onEnter)):No(e.child,!1):qp(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)vy(e,t),e=e.sibling;else qp(e)}function xy(e){if(or!==null&&or.size!==0){var t=or;if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var n=e.memoizedProps,r=n.name;if(r!=null&&r!=="auto"){var o=t.get(r);if(o!==void 0){var i=ki(n.default,n.share);if(i!=="none"&&(qc(e,r,i,null,!1)?(i=e.stateNode,o.paired=i,i.paired=o,Lc(e,n.onShare)):No(e.child,!1)),t.delete(r),t.size===0)break}}}xy(e)}e=e.sibling}}}function wy(e){if(e.tag===30){var t=e.memoizedProps,n=bi(t,e.stateNode),r=or!==null?or.get(n):void 0,o=ki(t.default,r!==void 0?t.share:t.exit);o!=="none"&&(qc(e,n,o,null,!1)?r!==void 0?(o=e.stateNode,r.paired=o,o.paired=r,or.delete(n),Lc(e,t.onShare)):Lc(e,t.onExit):No(e.child,!1)),or!==null&&xy(e)}else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)wy(e),e=e.sibling;else or!==null&&xy(e)}function zT(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=bi(t,e.stateNode);t=ki(t.default,t.update),e.flags&=-5,t!=="none"&&qc(e,n,t,e.memoizedState=[],!1)}else(e.subtreeFlags&33554432)!==0&&zT(e);e=e.sibling}}function Sy(e){if((e.subtreeFlags&18874368)!==0)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&(e.flags&18874368)!==0){var t=e.stateNode;t.paired!==null&&(t.paired=null,No(e.child,!1))}Sy(e)}e=e.sibling}}function Gp(e){if(e.tag===30)e.stateNode.paired=null,No(e.child,!1),Sy(e);else if((e.subtreeFlags&33554432)!==0)for(e=e.child;e!==null;)Gp(e),e=e.sibling;else Sy(e)}function jT(e){for(e=e.child;e!==null;)e.tag===30?No(e.child,!1):(e.subtreeFlags&33554432)!==0&&jT(e),e=e.sibling}function Ev(e,t,n,r,o,i,s){for(var a=!1;t!==null;){if(t.tag===5){var l=t.stateNode;if(i!==null&&jn<i.length){var c=i[jn],u=Xy(l);if(c.view||u.view)a=!0;var f;if(f=(e.flags&4)===0)if(u.clip)f=!0;else{f=c.rect;var d=u.rect;f=f.y!==d.y||f.x!==d.x||f.height!==d.height||f.width!==d.width}f&&(e.flags|=4),u.abs?u=!c.abs:(c=c.rect,u=u.rect,u=c.height!==u.height||c.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;(e.flags&4)!==0&&wA(l,jn===0?n:n+"_"+jn,o),a&&(e.flags&4)!==0||(Ao===null&&(Ao=[]),Ao.push(l,jn===0?r:r+"_"+jn,t.memoizedProps)),jn++}else if(t.tag!==22||t.memoizedState===null)t.tag===30&&s?e.flags|=t.flags&32:Ev(e,t.child,n,r,o,i,s)&&(a=!0);t=t.sibling}return a}function IT(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,o=bi(n,r),i=ki(n.default,n.update);if(t){r=r.clones;var s=r===null?null:r.map(fX)}else s=e.memoizedState,e.memoizedState=null;r=e;var a=e.child;jn=0,o=Ev(r,a,o,o,i,s,!1),(e.flags&4)!==0&&o&&(t||Lc(e,n.onUpdate))}else(e.subtreeFlags&33554432)!==0&&IT(e,t);e=e.sibling}}var Ut=!1,We=!1,Co=!1,Rb=!1,gR=typeof WeakSet==="function"?WeakSet:Set,Yt=null,Ro=!1,Rf=!1,wm=!1,ky=!1;function N7(e,t,n){if(e=e.containerInfo,zy=Zc,e=TP(e),rv(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var i=o.anchorOffset,s=o.focusNode;o=o.focusOffset;try{r.nodeType,s.nodeType}catch(g){r=null;break e}var a=0,l=-1,c=-1,u=0,f=0,d=e,h=null;t:for(;;){for(var m;;){if(d!==r||i!==0&&d.nodeType!==3||(l=a+i),d!==s||o!==0&&d.nodeType!==3||(c=a+o),d.nodeType===3&&(a+=d.nodeValue.length),(m=d.firstChild)===null)break;h=d,d=m}for(;;){if(d===e)break t;if(h===r&&++u===i&&(l=a),h===s&&++f===o&&(c=a),(m=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=m}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;jy={focusedElem:e,selectionRange:r},Zc=!1,n=(n&335544064)===n,Yt=t;for(t=n?9270:1024;Yt!==null;){if(e=Yt,n&&(r=e.deletions,r!==null))for(i=0;i<r.length;i++)n&&wy(r[i]);if(e.alternate===null&&(e.flags&2)!==0)n&&pR(e),Ep(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&wy(r),Ep(n);continue}else if(r!==null&&r.memoizedState!==null){n&&pR(e),Ep(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,Yt=r):(n&&zT(e),Ep(n))}}or=null}function Ep(e){for(;Yt!==null;){var t=Yt,n=e,{alternate:r,flags:o}=t;switch(t.tag){case 0:case 11:case 15:break;case 1:if((o&1024)!==0&&r!==null){n=void 0,o=r.memoizedProps,r=r.memoizedState;var i=t.stateNode;try{var s=Ia(t.type,o);n=i.getSnapshotBeforeUpdate(s,r),i.__reactInternalSnapshotBeforeUpdate=n}catch(a){Je(t,t.return,a)}}break;case 3:if((o&1024)!==0){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)By(r);else if(n===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":By(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=bi(r.memoizedProps,r.stateNode),o=t.memoizedProps,o=ki(o.default,o.update),o!=="none"&&qc(r,n,o,r.memoizedState=[],!0));break;default:if((o&1024)!==0)throw Error(z(163))}if(r=t.sibling,r!==null){r.return=t.return,Yt=r;break}Yt=t.return}}function XT(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Po(e,n),r&4&&dd(5,n);break;case 1:if(Po(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(s){Je(n,n.return,s)}else{var o=Ia(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){Je(n,n.return,s)}}r&64&&$T(n),r&512&&To(n,n.return);break;case 3:if(Po(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{VP(e,t)}catch(s){Je(n,n.return,s)}}break;case 27:t===null&&r&4&&NT(n);case 26:case 5:Po(e,n),t===null&&r&4&&by(n),r&512&&To(n,n.return);break;case 12:Po(e,n);break;case 31:Po(e,n),r&4&&YT(e,n);break;case 13:Po(e,n),r&4&&VT(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=G7.bind(null,n),PX(e,n))));break;case 22:if(r=n.memoizedState!==null||Ut,!r){var i=t!==null&&t.memoizedState!==null||We;t=Ut,o=We,Ut=r,(We=i)&&!o?(r=2,(n.subtreeFlags&8772)!==0&&(r|=1),Hr(e,n,r)):Po(e,n),Ut=t,We=o}break;case 30:Po(e,n),r&512&&To(n,n.return);break;case 7:r&512&&To(n,n.return);default:Po(e,n)}}function Cy(e,t){for(e=e.child;e!==null;)BT(e,t),e=e.sibling}function BT(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==="function"?r.setProperty("display","none","important"):r.display="none"}else{var o=e.stateNode,i=e.memoizedProps.style,s=i!==void 0&&i!==null&&i.hasOwnProperty("display")?i.display:null;o.style.display=s==null||typeof s==="boolean"?"":(""+s).trim()}}catch(l){Je(e,e.return,l)}Ry(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ye=!0}catch(l){Je(e,e.return,l)}break;case 18:try{var a=e.stateNode;t?QR(a,!0):QR(e.stateNode,!1)}catch(l){Je(e,e.return,l)}break;case 22:case 23:e.memoizedState===null&&Cy(e,t);break;default:Cy(e,t)}}function Ry(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,r=t;switch(n.tag){case 4:BT(n,r);break e;case 22:n.memoizedState===null&&Ry(n,r);break e;default:Ry(n,r)}}e=e.sibling}}function ZT(e){var t=e.alternate;t!==null&&(e.alternate=null,ZT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&$m(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 gt=null,Ln=!1;function Gr(e,t,n){for(n=n.child;n!==null;)UT(e,t,n),n=n.sibling}function UT(e,t,n){if(ar&&typeof ar.onCommitFiberUnmount==="function")try{ar.onCommitFiberUnmount(id,n)}catch(i){}switch(n.tag){case 26:We||tn(n,t),Gr(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!We&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:We||tn(n,t),zf(n);var r=gt,o=Ln;$s(n.type)&&(gt=n.stateNode,Ln=!1),Gr(e,t,n),MA(n.stateNode,n.type,n.memoizedProps),gt=r,Ln=o;break;case 5:We||tn(n,t),zf(n);case 6:if(n.tag===6&&zf(n),r=gt,o=Ln,gt=null,Gr(e,t,n),gt=r,Ln=o,gt!==null)if(Ln)try{(gt.nodeType===9?gt.body:gt.nodeName==="HTML"?gt.ownerDocument.body:gt).removeChild(n.stateNode),Ye=!0}catch(i){Je(n,t,i)}else try{gt.removeChild(n.stateNode),Ye=!0}catch(i){Je(n,t,i)}break;case 18:gt!==null&&(Ln?(e=gt,AR(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Uc(e)):AR(gt,n.stateNode));break;case 4:r=gt,o=Ln,gt=n.stateNode.containerInfo,Ln=!0,Gr(e,t,n),gt=r,Ln=o;break;case 0:case 11:case 14:case 15:Qs(2,n,t),We||Qs(4,n,t),Gr(e,t,n);break;case 1:We||(tn(n,t),r=n.stateNode,typeof r.componentWillUnmount==="function"&&DT(n,t,r)),Gr(e,t,n);break;case 21:Gr(e,t,n);break;case 22:We=(r=We)||n.memoizedState!==null,Gr(e,t,n),We=r;break;case 30:tn(n,t),Gr(e,t,n);break;case 7:We||tn(n,t),Gr(e,t,n);break;default:Gr(e,t,n)}}function YT(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Uc(e)}catch(n){Je(t,t.return,n)}}}function VT(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Uc(e)}catch(n){Je(t,t.return,n)}}function L7(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new gR),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new gR),t;default:throw Error(z(435,e.tag))}}function Mp(e,t){var n=L7(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var o=H7.bind(null,e,r);r.then(o,o)}})}function Cn(e,t,n){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var i=r[o],s=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 27:if($s(l.type)){gt=l.stateNode,Ln=!1;break e}break;case 5:gt=l.stateNode,Ln=!1;break e;case 3:case 4:gt=l.stateNode.containerInfo,Ln=!0;break e}l=l.return}if(gt===null)throw Error(z(160));UT(s,a,i),gt=null,Ln=!1,s=i.alternate,s!==null&&(s.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)qT(t,e,n),t=t.sibling}var Wr=null;function qT(e,t,n){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(o&4&&(r=e.updateQueue,r=r!==null?r.events:null,r!==null))for(var i=0;i<r.length;i++){var s=r[i];s.ref.impl=s.nextImpl}Cn(t,e,n),Rn(e),o&4&&(Qs(3,e,e.return),dd(3,e),Qs(5,e,e.return));break;case 1:Cn(t,e,n),Rn(e),o&512&&(We||r===null||tn(r,r.return)),o&64&&Ut&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(i=Wr,Cn(t,e,n),Rn(e),o&512&&(We||r===null||tn(r,r.return)),o&4)if(o=r!==null?r.memoizedState:null,n=e.memoizedState,r===null)if(n===null)if(e.stateNode===null)if(Ut)e.stateNode=xA(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,o=i.ownerDocument||i;t:switch(t){case"title":if(r=o.getElementsByTagName("title")[0],!r||r[ld]||r[nn]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))r=o.createElement(t),o.head.insertBefore(r,o.querySelector("head > title"));an(r,t,n),r[nn]=e,Vt(r),t=r;break e;case"link":if(i=zR("link","href",o).get(t+(n.href||""))){for(s=0;s<i.length;s++)if(r=i[s],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){i.splice(s,1);break t}}r=o.createElement(t),an(r,t,n),o.head.appendChild(r);break;case"meta":if(i=zR("meta","content",o).get(t+(n.content||""))){for(s=0;s<i.length;s++)if(r=i[s],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){i.splice(s,1);break t}}r=o.createElement(t),an(r,t,n),o.head.appendChild(r);break;default:throw Error(z(468,t))}r[nn]=e,Vt(r),t=r}e.stateNode=t}else Ut||Yy(i,e.type,e.stateNode);else e.stateNode=LR(i,n,e.memoizedProps);else o!==n?(o===null?(t=r.stateNode,t===null||We||t.parentNode.removeChild(t)):o.count--,n===null?Ut||Yy(i,e.type,e.stateNode):LR(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&kb(e,e.memoizedProps,r.memoizedProps);break;case 27:Cn(t,e,n),Rn(e),o&512&&(We||r===null||tn(r,r.return)),r!==null&&o&4&&kb(e,e.memoizedProps,r.memoizedProps);break;case 5:if(i=Co,Co=!1,Cn(t,e,n),Co=i,Rn(e),o&512&&(We||r===null||tn(r,r.return)),e.flags&32){t=e.stateNode;try{Dc(t,""),Ye=!0}catch(u){Je(e,e.return,u)}}o&4&&e.stateNode!=null&&(t=e.memoizedProps,kb(e,t,r!==null?r.memoizedProps:t)),o&1024&&(Rb=!0);break;case 6:if(Cn(t,e,n),Rn(e),o&4){if(e.stateNode===null)throw Error(z(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ye=!0}catch(u){Je(e,e.return,u)}}break;case 3:if(Ye=!1,Kp=null,i=Wr,Wr=ed(t.containerInfo),Cn(t,e,n),Wr=i,Rn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{Uc(t.containerInfo)}catch(u){Je(e,e.return,u)}Rb&&(Rb=!1,GT(e)),Ye=!1;break;case 4:o=Co,Co=Ut,r=w2(),i=Wr,Wr=ed(e.stateNode.containerInfo),Cn(t,e,n),Rn(e),Wr=i,Ye&&Rf&&(wm=!0),Ye=r,Co=o;break;case 12:Cn(t,e,n),Rn(e);break;case 31:Cn(t,e,n),Rn(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Mp(e,t)));break;case 13:Cn(t,e,n),Rn(e),e.child.flags&8192&&e.memoizedState!==null!==(r!==null&&r.memoizedState!==null)&&(Vm=sr()),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Mp(e,t)));break;case 22:i=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var a=Ut,l=We,c=Co;Ut=a||i,Co=c||i,We=l||s,Cn(t,e,n),We=l,Co=c,Ut=a,Rn(e),o&8192&&(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,!i||r===null||s||Ut||We||(t=s||We,n=Ut,r=We,Ut=i||Ut,We=t,cs(e,2),Ut=n,We=r),!i&&Co||Cy(e,i)),o&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Mp(e,n))));break;case 19:Cn(t,e,n),Rn(e),o&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Mp(e,t)));break;case 30:o&512&&(We||r===null||tn(r,r.return)),o=w2(),i=Rf,s=(n&335544064)===n,a=e.memoizedProps,Rf=s&&ki(a.default,a.update)!=="none",Cn(t,e,n),Rn(e),s&&r!==null&&Ye&&(e.flags|=4),Rf=i,Ye=o;break;case 21:break;case 7:o&512&&(We||r===null||tn(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Cn(t,e,n),Rn(e)}}function Rn(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(_T(r)){n=r;break}r=r.return}r=null;for(var o=e.return;o!==null;){if(Qv(o)){var i=o.stateNode;r===null?r=[i]:r.push(i)}if(Av(o))break;o=o.return}var s=r;if(n==null)throw Error(z(160));switch(n.tag){case 27:var a=n.stateNode,l=Cb(e);vm(e,l,a,s);break;case 5:var c=n.stateNode;n.flags&32&&(Dc(c,""),n.flags&=-33);var u=Cb(e);vm(e,u,c,s);break;case 3:case 4:var f=n.stateNode.containerInfo,d=Cb(e);yy(e,d,f,s);break;default:throw Error(z(161))}}catch(h){Je(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function GT(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;GT(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Zc=!0,t.reset(),Zc=!1),e=e.sibling}}function ic(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)HT(t,e),t=t.sibling;else IT(t,!1)}function HT(e,t){var n=e.alternate;if(n===null)vy(e,!1);else switch(e.tag){case 3:if(ky=Ro=!1,mR(),ic(t,e),!Ro&&!wm){if(e=Ao,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var o=e[r+1];SA(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+o+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),ky=!0}Ao=null;break;case 5:ic(t,e);break;case 4:r=Ro,Ro=!1,ic(t,e),Ro&&(wm=!0),Ro=r;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?vy(e,!1):ic(t,e));break;case 30:r=Ro,o=mR(),Ro=!1,ic(t,e),Ro&&(e.flags|=4);var i=e.memoizedProps,s=e.stateNode;t=bi(i,s),s=bi(n.memoizedProps,s);var a=ki(i.default,i.update);a==="none"?t=!1:(i=n.memoizedState,n.memoizedState=null,n=e.child,jn=0,t=Ev(e,n,t,s,a,i,!0),jn!==(i===null?0:i.length)&&(e.flags|=32)),(e.flags&4)!==0&&t?(Lc(e,e.memoizedProps.onUpdate),Ao=o):o!==null&&(o.push.apply(o,Ao),Ao=o),Ro=(e.flags&32)!==0?!0:r;break;default:ic(t,e)}}function Po(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)XT(e,t.alternate,t),t=t.sibling}function cs(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:Qs(4,n,n.return),cs(n,r);break;case 1:tn(n,n.return);var o=n.stateNode;typeof o.componentWillUnmount==="function"&&DT(n,n.return,o),cs(n,r);break;case 27:(r&2)!==0&&MA(n.stateNode,n.type,n.memoizedProps);case 5:tn(n,n.return),n.tag!==5&&n.tag!==27||zf(n),cs(n,r);break;case 6:zf(n);break;case 26:tn(n,n.return),o=n.stateNode,n.memoizedState!==null||o===null||We||o.parentNode.removeChild(o),cs(n,r);break;case 22:n.memoizedState===null&&cs(n,r);break;case 30:tn(n,n.return),cs(n,r);break;case 7:tn(n,n.return);default:cs(n,r)}e=e.sibling}}function Hr(e,t,n){n=(t.subtreeFlags&8772)!==0?n:n&-2;for(t=t.child;t!==null;){var r=t.alternate,o=e,i=t,s=i.flags,a=(n&1)!==0;switch(i.tag){case 0:case 11:case 15:Hr(o,i,n),dd(4,i);break;case 1:if(Hr(o,i,n),r=i,o=r.stateNode,typeof o.componentDidMount==="function")try{o.componentDidMount()}catch(u){Je(r,r.return,u)}if(r=i,o=r.updateQueue,o!==null){var l=r.stateNode;try{var c=o.shared.hiddenCallbacks;if(c!==null)for(o.shared.hiddenCallbacks=null,o=0;o<c.length;o++)YP(c[o],l)}catch(u){Je(r,r.return,u)}}a&&s&64&&$T(i),To(i,i.return);break;case 27:(n&2)!==0&&NT(i);case 5:i.tag!==5&&i.tag!==27||hR(i),Hr(o,i,n),a&&r===null&&s&4&&by(i),To(i,i.return);break;case 6:hR(i);break;case 26:l=i.stateNode,i.memoizedState!==null||l===null||Ut||Yy(ed(l.ownerDocument),i.type,l),Hr(o,i,n),a&&r===null&&s&4&&by(i),To(i,i.return);break;case 12:Hr(o,i,n);break;case 31:Hr(o,i,n),a&&s&4&&YT(o,i);break;case 13:Hr(o,i,n),a&&s&4&&VT(o,i);break;case 22:i.memoizedState===null&&Hr(o,i,n),To(i,i.return);break;case 30:Hr(o,i,n),To(i,i.return);break;case 7:To(i,i.return);default:Hr(o,i,n)}t=t.sibling}}function Mv(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&&ud(n))}function $v(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ud(e))}function kr(e,t,n,r){var o=(n&335544064)===n;if(t.subtreeFlags&(o?10262:10256))for(t=t.child;t!==null;)WT(e,t,n,r),t=t.sibling;else o&&jT(t)}function WT(e,t,n,r){var o=(n&335544064)===n;o&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Gp(t);var i=t.flags;switch(t.tag){case 0:case 11:case 15:kr(e,t,n,r),i&2048&&dd(9,t);break;case 1:kr(e,t,n,r);break;case 3:kr(e,t,n,r),o&&ky&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),i&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==i&&(t.refCount++,i!=null&&ud(i)));break;case 12:if(i&2048){kr(e,t,n,r),i=t.stateNode;try{var s=t.memoizedProps,a=s.id,l=s.onPostCommit;typeof l==="function"&&l(a,t.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(c){Je(t,t.return,c)}}else kr(e,t,n,r);break;case 31:kr(e,t,n,r);break;case 13:kr(e,t,n,r);break;case 23:break;case 22:s=t.stateNode,a=t.alternate,t.memoizedState!==null?(o&&a!==null&&a.memoizedState===null&&Gp(a),s._visibility&2?kr(e,t,n,r):jf(e,t)):(o&&a!==null&&a.memoizedState!==null&&Gp(t),s._visibility&2?kr(e,t,n,r):(s._visibility|=2,ac(e,t,n,r,(t.subtreeFlags&10256)!==0||!1))),i&2048&&Mv(a,t);break;case 24:kr(e,t,n,r),i&2048&&$v(t.alternate,t);break;case 30:o&&(i=t.alternate,i!==null&&(No(i.child,!0),No(t.child,!0))),kr(e,t,n,r);break;default:kr(e,t,n,r)}}function ac(e,t,n,r,o){o=o&&((t.subtreeFlags&10256)!==0||!1);for(t=t.child;t!==null;){var i=e,s=t,a=n,l=r,c=s.flags;switch(s.tag){case 0:case 11:case 15:ac(i,s,a,l,o),dd(8,s);break;case 23:break;case 22:var u=s.stateNode;s.memoizedState!==null?u._visibility&2?ac(i,s,a,l,o):jf(i,s):(u._visibility|=2,ac(i,s,a,l,o)),o&&c&2048&&Mv(s.alternate,s);break;case 24:ac(i,s,a,l,o),o&&c&2048&&$v(s.alternate,s);break;default:ac(i,s,a,l,o)}t=t.sibling}}function jf(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,o=r.flags;switch(r.tag){case 22:jf(n,r),o&2048&&Mv(r.alternate,r);break;case 24:jf(n,r),o&2048&&$v(r.alternate,r);break;default:jf(n,r)}t=t.sibling}}var ka=8192;function va(e,t,n){if(e.subtreeFlags&ka)for(e=e.child;e!==null;)FT(e,t,n),e=e.sibling}function FT(e,t,n){switch(e.tag){case 26:va(e,t,n),e.flags&ka&&(e.memoizedState!==null?XX(n,Wr,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&IR(n,e)));break;case 5:va(e,t,n),e.flags&ka&&(e=e.stateNode,(t&335544128)===t&&IR(n,e));break;case 3:case 4:var r=Wr;Wr=ed(e.stateNode.containerInfo),va(e,t,n),Wr=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=ka,ka=16777216,va(e,t,n),ka=r):va(e,t,n));break;case 30:if((e.flags&ka)!==0&&(r=e.memoizedProps.name,r!=null&&r!=="auto")){var o=e.stateNode;o.paired=null,or===null&&(or=new Map),or.set(r,o)}va(e,t,n);break;default:va(e,t,n)}}function KT(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 bf(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Yt=r,eA(r,e)}KT(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)JT(e),e=e.sibling}function JT(e){switch(e.tag){case 0:case 11:case 15:bf(e),e.flags&2048&&Qs(9,e,e.return);break;case 3:bf(e);break;case 12:bf(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hp(e)):bf(e);break;default:bf(e)}}function Hp(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Yt=r,eA(r,e)}KT(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qs(8,t,t.return),Hp(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hp(t));break;default:Hp(t)}e=e.sibling}}function eA(e,t){for(;Yt!==null;){var n=Yt;switch(n.tag){case 0:case 11:case 15:Qs(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:ud(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Yt=r;else e:for(n=e;Yt!==null;){r=Yt;var o=r.sibling,i=r.return;if(ZT(r),r===n){Yt=null;break e}if(o!==null){o.return=i,Yt=o;break e}Yt=i}}}var z7={getCacheForType:function(e){var t=rn($t),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return rn($t).controller.signal}},j7=typeof WeakMap==="function"?WeakMap:Map,Ge=0,rt=null,$e=null,Ne=0,Fe=0,tr=null,gs=!1,Gc=!1,Dv=!1,wi=0,Rt=0,Es=0,$a=0,Sm=0,ir=0,Nc=0,If=null,zn=null,Py=!1,Vm=0,tA=0,km=1/0,Cm=null,Ss=null,bt=0,Kr=null,Xa=null,_o=0,Ty=0,Ay=null,nA=null,Ac=null,Qc=null,Ec=null,Xf=0,Wp=null;function Er(){return(Ge&2)!==0&&Ne!==0?Ne&-Ne:xe.T!==null?Nv():cP()}function rA(){if(ir===0)if((Ne&536870912)===0||Te){var e=xp;xp<<=1,(xp&3932160)===0&&(xp=262144),ir=e}else ir=536870912;return e=ln.current,e!==null&&(e.flags|=32),ir}function Lc(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=CA(bi(e.memoizedProps,n))),Qc===null&&(Qc=[]),Qc.push(t.bind(null,r))}}function Xn(e,t,n){if(e===rt&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)zc(e,0),Os(e,Ne,ir,!1);if(Mm(e,n),(Ge&2)===0||e!==rt)e===rt&&((Ge&2)===0&&($a|=n),Rt===4&&Os(e,Ne,ir,!1)),Ci(e)}function oA(e,t,n){if((Ge&6)!==0)throw Error(z(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||sd(e,t),o=r?B7(e,t):Pb(e,t,!0),i=r;do{if(o===0){Gc&&!r&&Os(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!I7(n)){o=Pb(e,t,!1),i=!1;continue}if(o===2){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var a=e;o=If;var l=a.current.memoizedState.isDehydrated;if(l&&(zc(a,s).flags|=256),s=Pb(a,s,!1),s!==2&&s!==6){if(Dv&&!l){a.errorRecoveryDisabledLanes|=i,$a|=i,o=4;break e}i=zn,zn=o,i!==null&&(zn===null?zn=i:zn.push.apply(zn,i))}o=s}if(i=!1,o!==2)continue}}if(o===1){zc(e,0),Os(e,t,0,!0);break}e:{switch(r=e,i=o,i){case 0:case 1:throw Error(z(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Os(r,t,ir,!gs);break e;case 2:zn=null;break;case 3:case 5:break;default:throw Error(z(329))}if((t&62914560)===t&&(o=Vm+300-sr(),10<o)){if(Os(r,t,ir,!gs),Em(r,0,!0)!==0)break e;_o=t,r.timeoutHandle=Lv(OR.bind(null,r,n,zn,Cm,Py,t,ir,$a,Nc,gs,i,"Throttled",-0,0),o);break e}OR(r,n,zn,Cm,Py,t,ir,$a,Nc,gs,i,null,-0,0)}}break}while(1);Ci(e)}function OR(e,t,n,r,o,i,s,a,l,c,u,f,d,h){e.timeoutHandle=-1;var m=t.subtreeFlags,g=(i&335544064)===i;if(f=null,g||m&8192||(m&16785408)===16785408){if(f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Eo},or=null,FT(t,i,f),g&&(m=f,g=e.containerInfo,g=(g.nodeType===9?g:g.ownerDocument).__reactViewTransition,g!=null&&(m.count++,m.waitingForViewTransition=!0,m=td.bind(m),g.finished.then(m,m))),m=(i&62914560)===i?Vm-sr():(i&4194048)===i?tA-sr():0,m=BX(f,m),m!==null){_o=i,e.cancelPendingCommit=m(yR.bind(null,e,t,i,n,r,o,s,a,l,c,u,f,null,d,h)),Os(e,i,s,!c);return}}yR(e,t,i,n,r,o,s,a,l,c,u,f)}function I7(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 o=n[r],i=o.getSnapshot;o=o.value;try{if(!cr(i(),o))return!1}catch(s){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 Os(e,t,n,r){t=rP(e,t),t&=~Sm,t&=~$a,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var o=t;0<o;){var i=31-lr(o),s=1<<i;r[i]=-1,o&=~s}n!==0&&iP(e,n,t)}function qm(){return(Ge&6)===0?(hd(0,!1),!1):!0}function _v(){if($e!==null){if(Fe===0)var e=$e.return;else e=$e,pi=Va=null,bv(e),Rc=null,Gf=0,e=$e;for(;e!==null;)MT(e.alternate,e),e=e.return;$e=null}}function zc(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,lX(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),_o=0,_v(),rt=e,$e=n=mi(e.current,null),Ne=t,Fe=0,tr=null,gs=!1,Gc=sd(e,t),Dv=!1,Nc=ir=Sm=$a=Es=Rt=0,zn=If=null,Py=!1,wi=rP(e,t),Lm(),n}function iA(e,t){Re=null,xe.H=Om,t===Vc||t===Im?(t=U2(),Fe=3):t===uv?(t=U2(),Fe=4):Fe=t===Rv?8:t!==null&&typeof t==="object"&&typeof t.then==="function"?6:1,tr=t,$e===null&&(Rt=1,bm(e,Ar(t,e.current)))}function sA(){var e=ln.current;return e===null?!0:(Ne&4194048)===Ne?vn===null?!0:!1:(Ne&62914560)===Ne||(Ne&536870912)!==0?e===vn:!1}function aA(){var e=xe.H;return xe.H=Om,e===null?Om:e}function lA(){var e=xe.A;return xe.A=z7,e}function Rm(){Rt=4,gs||(Ne&4194048)!==Ne&&ln.current!==null||(Gc=!0),(Es&134217727)===0&&($a&134217727)===0||rt===null||Os(rt,Ne,ir,!1)}function Pb(e,t,n){var r=Ge;Ge|=2;var o=aA(),i=lA();if(rt!==e||Ne!==t)Cm=null,zc(e,t);t=!1;var s=Rt;e:do try{if(Fe!==0&&$e!==null){var a=$e,l=tr;switch(Fe){case 8:_v(),s=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(t=!0);var c=Fe;if(Fe=0,tr=null,xc(e,a,l,c),n&&Gc){s=0;break e}break;default:c=Fe,Fe=0,tr=null,xc(e,a,l,c)}}X7(),s=Rt;break}catch(u){iA(e,u)}while(1);return t&&e.shellSuspendCounter++,pi=Va=null,Ge=r,xe.H=o,xe.A=i,$e===null&&(rt=null,Ne=0,Lm()),s}function X7(){for(;$e!==null;)cA($e)}function B7(e,t){var n=Ge;Ge|=2;var r=aA(),o=lA();rt!==e||Ne!==t?(Cm=null,km=sr()+500,zc(e,t)):Gc=sd(e,t);e:do try{if(Fe!==0&&$e!==null){t=$e;var i=tr;t:switch(Fe){case 1:Fe=0,tr=null,xc(e,t,i,1);break;case 2:case 9:if(Z2(i)){Fe=0,tr=null,bR(t);break}t=function(){Fe!==2&&Fe!==9||rt!==e||(Fe=7),Ci(e)},i.then(t,t);break e;case 3:Fe=7;break e;case 4:Fe=5;break e;case 7:Z2(i)?(Fe=0,tr=null,bR(t)):(Fe=0,tr=null,xc(e,t,i,7));break;case 5:var s=null;switch($e.tag){case 26:s=$e.memoizedState;case 5:case 27:var a=$e;if(s?_A(s):a.stateNode.complete){Fe=0,tr=null;var l=a.sibling;if(l!==null)$e=l;else{var c=a.return;c!==null?($e=c,Gm(c)):$e=null}break t}}Fe=0,tr=null,xc(e,t,i,5);break;case 6:Fe=0,tr=null,xc(e,t,i,6);break;case 8:_v(),Rt=6;break e;default:throw Error(z(462))}}Z7();break}catch(u){iA(e,u)}while(1);if(pi=Va=null,xe.H=r,xe.A=o,Ge=n,$e!==null)return 0;return rt=null,Ne=0,Lm(),Rt}function Z7(){for(;$e!==null&&!rI();)cA($e)}function cA(e){var t=ET(e.alternate,e,wi);e.memoizedProps=e.pendingProps,t===null?Gm(e):$e=t}function bR(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=sR(n,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=sR(n,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:bv(t);var r=t;r===qt&&(Te?(um(r),r.tag===5&&r.stateNode!=null&&(ft=r.stateNode)):(um(r),Te=!0));default:MT(n,t),t=$e=NP(t,wi),t=ET(n,t,wi)}e.memoizedProps=e.pendingProps,t===null?Gm(e):$e=t}function xc(e,t,n,r){pi=Va=null,bv(t),Rc=null,Gf=0;var o=t.return;try{if(Q7(e,o,t,n,Ne)){Rt=1,bm(e,Ar(n,e.current)),$e=null;return}}catch(i){if(o!==null)throw $e=o,i;Rt=1,bm(e,Ar(n,e.current)),$e=null;return}if(t.flags&32768){if(Te||r===1)e=!0;else if(Gc||(Ne&536870912)!==0)e=!1;else if(gs=e=!0,r===2||r===9||r===3||r===6)r=ln.current,r!==null&&r.tag===13&&(r.flags|=16384);uA(t,e)}else Gm(t)}function Gm(e){var t=e;do{if((t.flags&32768)!==0){uA(t,gs);return}e=t.return;var n=D7(t.alternate,t,wi);if(n!==null){$e=n;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);Rt===0&&(Rt=5)}function uA(e,t){do{var n=_7(e.alternate,e);if(n!==null){n.flags&=32767,$e=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){$e=e;return}$e=e=n}while(e!==null);Rt=6,$e=null}function yR(e,t,n,r,o,i,s,a,l,c,u,f){e.cancelPendingCommit=null;do Hm();while(bt!==0);if((Ge&6)!==0)throw Error(z(327));if(t!==null){if(t===e.current)throw Error(z(177));e===rt&&($e=rt=null,Ne=0),Xa=t,Kr=e,_o=n,Ay=o,nA=r,U7(e,t,n,s,a,l,f)}}function U7(e,t,n,r,o,i,s){var a=t.lanes|t.childLanes;if(Ty=a,a|=ov,hI(e,n,a,r,o,i),Qc=null,(n&335544064)===n?(Ec=m7(e),r=10262):(Ec=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,W7(im,function(){return $y(),null})):(e.callbackNode=null,e.callbackPriority=0),xm=!1,r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=xe.T,xe.T=null,o=He.p,He.p=2,i=Ge,Ge|=4;try{N7(e,t,n)}finally{Ge=i,He.p=o,xe.T=r}}bt=1,xm?Ac=pX(s,e.containerInfo,Ec,Qy,Ey,V7,My,$y,Y7,null,null):(Qy(),Ey(),My())}function Y7(e){if(bt!==0){var t=Kr.onRecoverableError;t(e,{componentStack:null})}}function V7(){bt===3&&(bt=0,HT(Xa,Kr),bt=4)}function Qy(){if(bt===1){bt=0;var e=Kr,t=Xa,n=_o,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=xe.T,xe.T=null;var o=He.p;He.p=2;var i=Ge;Ge|=4;try{Rf=wm=!1,qT(t,e,n),n=jy;var s=TP(e.containerInfo),a=n.focusedElem,l=n.selectionRange;if(s!==a&&a&&a.ownerDocument&&PP(a.ownerDocument.documentElement,a)){if(l!==null&&rv(a)){var{start:c,end:u}=l;if(u===void 0&&(u=c),"selectionStart"in a)a.selectionStart=c,a.selectionEnd=Math.min(u,a.value.length);else{var f=a.ownerDocument||document,d=f&&f.defaultView||window;if(d.getSelection){var h=d.getSelection(),m=a.textContent.length,g=Math.min(l.start,m),b=l.end===void 0?g:Math.min(l.end,m);!h.extend&&g>b&&(s=b,b=g,g=s);var O=_2(a,g),y=_2(a,b);if(O&&y&&(h.rangeCount!==1||h.anchorNode!==O.node||h.anchorOffset!==O.offset||h.focusNode!==y.node||h.focusOffset!==y.offset)){var v=f.createRange();v.setStart(O.node,O.offset),h.removeAllRanges(),g>b?(h.addRange(v),h.extend(y.node,y.offset)):(v.setEnd(y.node,y.offset),h.addRange(v))}}}}f=[];for(h=a;h=h.parentNode;)h.nodeType===1&&f.push({element:h,left:h.scrollLeft,top:h.scrollTop});typeof a.focus==="function"&&a.focus();for(a=0;a<f.length;a++){var x=f[a];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}Zc=!!zy,jy=zy=null}finally{Ge=i,He.p=o,xe.T=r}}e.current=t,bt=2}}function Ey(){if(bt===2){bt=0;var e=Kr,t=Xa,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=xe.T,xe.T=null;var r=He.p;He.p=2;var o=Ge;Ge|=4;try{XT(e,t.alternate,t)}finally{Ge=o,He.p=r,xe.T=n}}bt=3}}function My(){if(bt===4||bt===3){bt=0;var e=Ac;Ac=null,oI();var t=Kr,n=Xa,r=_o,o=nA,i=(r&335544064)===r?10262:10256;if((n.subtreeFlags&i)!==0||(n.flags&i)!==0?bt=5:(bt=0,Xa=Kr=null,fA(t,t.pendingLanes)),i=t.pendingLanes,i===0&&(Ss=null),Fy(r),n=n.stateNode,ar&&typeof ar.onCommitFiberRoot==="function")try{ar.onCommitFiberRoot(id,n,void 0,(n.current.flags&128)===128)}catch(c){}if(o!==null){n=xe.T,i=He.p,He.p=2,xe.T=null;try{for(var s=t.onRecoverableError,a=0;a<o.length;a++){var l=o[a];s(l.value,{componentStack:l.stack})}}finally{xe.T=n,He.p=i}}if(o=Qc,s=Ec,Ec=null,o!==null&&(Qc=null,s===null&&(s=[]),e!==null))for(l=0;l<o.length;l++)n=(0,o[l])(s),n!==void 0&&e.finished.finally(n);(_o&3)!==0&&Hm(),Ci(t),i=t.pendingLanes,(r&261930)!==0&&(i&42)!==0?t===Wp?Xf++:(Xf=0,Wp=t):(Xf=0,Wp=null),hd(0,!1)}}function fA(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ud(t)))}function Hm(){return Ac!==null&&(Ac.skipTransition(),Ac=null),Qy(),Ey(),My(),$y()}function $y(){if(bt!==5)return!1;var e=Kr,t=Ty;Ty=0;var n=Fy(_o),r=xe.T,o=He.p;try{He.p=32>n?32:n,xe.T=null,n=Ay,Ay=null;var i=Kr,s=_o;if(bt=0,Xa=Kr=null,_o=0,(Ge&6)!==0)throw Error(z(331));var a=Ge;if(Ge|=4,JT(i.current),WT(i,i.current,s,n),Ge=a,hd(0,!1),ar&&typeof ar.onPostCommitFiberRoot==="function")try{ar.onPostCommitFiberRoot(id,i)}catch(l){}return!0}finally{He.p=o,xe.T=r,fA(e,t)}}function vR(e,t,n){t=Ar(n,t),t=dy(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(Mm(e,2),Ci(e))}function Je(e,t,n){if(e.tag===3)vR(e,e,n);else for(;t!==null;){if(t.tag===3){vR(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==="function"||typeof r.componentDidCatch==="function"&&(Ss===null||!Ss.has(r))){e=Ar(n,e),n=RT(2),r=Ma(t,n,2),r!==null&&(PT(n,r,t,e),Mm(r,2),Ci(r));break}}t=t.return}}function Tb(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new j7;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(Dv=!0,o.add(n),e=q7.bind(null,e,t,n),t.then(e,e))}function q7(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,rt===e&&(Ne&n)===n&&(Rt===4||Rt===3&&(Ne&62914560)===Ne&&300>sr()-Vm?(Ge&2)===0?zc(e,0):Sm|=n:Sm|=n,Nc===Ne&&(Nc=0)),Ci(e)}function dA(e,t){t===0&&(t=oP()),e=Ya(e,t),e!==null&&(Mm(e,t),Ci(e))}function G7(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dA(e,n)}function H7(e,t){var n=0;switch(e.tag){case 31:case 13:var{stateNode:r,memoizedState:o}=e;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(z(314))}r!==null&&r.delete(t),dA(e,n)}function W7(e,t){return Wy(e,t)}var jc=null,lc=null,Dy=!1,Pm=!1,Ab=!1,bs=0;function Ci(e){e!==lc&&e.next===null&&(lc===null?jc=lc=e:lc=lc.next=e),Pm=!0,Dy||(Dy=!0,K7())}function hd(e,t){if(!Ab&&Pm){Ab=!0;do{var n=!1;for(var r=jc;r!==null;){if(!t)if(e!==0){var o=r.pendingLanes;if(o===0)var i=0;else{var s=r.suspendedLanes,a=r.pingedLanes;i=(1<<31-lr(42|e)+1)-1,i&=o&~(s&~a),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,xR(r,i))}else i=Ne,i=Em(r,r===rt?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(i&3)===0||sd(r,i)||(n=!0,xR(r,i));r=r.next}}while(n);Ab=!1}}function F7(){hA()}function hA(){Pm=Dy=!1;var e=0;bs!==0&&aX()&&(e=bs);for(var t=sr(),n=null,r=jc;r!==null;){var o=r.next,i=pA(r,t);if(i===0)r.next=null,n===null?jc=o:n.next=o,o===null&&(lc=n);else if(n=r,e!==0||(i&3)!==0)Pm=!0;r=o}bt!==0&&bt!==5||hd(e,!1),bs!==0&&(bs=0)}function pA(e,t){for(var{suspendedLanes:n,pingedLanes:r,expirationTimes:o}=e,i=e.pendingLanes&-62914561;0<i;){var s=31-lr(i),a=1<<s,l=o[s];if(l===-1){if((a&n)===0||(a&r)!==0)o[s]=dI(a,t)}else l<=t&&(e.expiredLanes|=a);i&=~a}if(t=rt,n=Ne,n=Em(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Fe===2||Fe===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&lb(r),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||sd(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&lb(r),Fy(n)){case 2:case 8:n=tP;break;case 32:n=im;break;case 268435456:n=nP;break;default:n=im}return r=mA.bind(null,e),n=Wy(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&lb(r),e.callbackPriority=2,e.callbackNode=null,2}function mA(e,t){if(bt!==0&&bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hm()&&e.callbackNode!==n)return null;var r=Ne;if(r=Em(e,e===rt?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0)return null;return oA(e,r,t),pA(e,sr()),e.callbackNode!=null&&e.callbackNode===n?mA.bind(null,e):null}function xR(e,t){if(Hm())return null;oA(e,t,!0)}function K7(){cX(function(){(Ge&6)!==0?Wy(eP,F7):hA()})}function Nv(){if(bs===0){var e=La;e===0&&(e=vp,vp<<=1,(vp&261888)===0&&(vp=256)),bs=e}return bs}function wR(e){return e==null||typeof e==="symbol"||typeof e==="boolean"?null:typeof e==="function"?e:Lp(e)}function J7(e,t,n,r,o){if(t==="submit"&&n&&n.stateNode===o){var i=wR((o[Zn]||null).action),s=r.submitter;s&&(t=(t=s[Zn]||null)?wR(t.formAction):s.getAttribute("formAction"),t!==null&&(i=t,s=null));var a=new Dm("action","action",null,r,o);e.push({event:a,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(bs!==0){var l=new FormData(o,s);uy(n,{pending:!0,data:l,method:o.method,action:i},null,l)}}else typeof i==="function"&&(a.preventDefault(),l=new FormData(o,s),uy(n,{pending:!0,data:l,method:o.method,action:i},i,l))},currentTarget:o}]})}}for(Pf=0;Pf<Jb.length;Pf++)Tf=Jb[Pf],_y=Tf.toLowerCase(),Ny=Tf[0].toUpperCase()+Tf.slice(1),Jr(_y,"on"+Ny);var Tf,_y,Ny,Pf;Jr(QP,"onAnimationEnd");Jr(EP,"onAnimationIteration");Jr(MP,"onAnimationStart");Jr("dblclick","onDoubleClick");Jr("focusin","onFocus");Jr("focusout","onBlur");Jr(a7,"onTransitionRun");Jr(l7,"onTransitionStart");Jr(c7,"onTransitionCancel");Jr($P,"onTransitionEnd");$c("onMouseEnter",["mouseout","mouseover"]);$c("onMouseLeave",["mouseout","mouseover"]);$c("onPointerEnter",["pointerout","pointerover"]);$c("onPointerLeave",["pointerout","pointerover"]);Za("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Za("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Za("onBeforeInput",["compositionend","keypress","textInput","paste"]);Za("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Za("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Za("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ff="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(" "),eX=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ff));function gA(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&o.isPropagationStopped())break e;i=a,o.currentTarget=c;try{i(o)}catch(u){am(u)}o.currentTarget=null,i=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&o.isPropagationStopped())break e;i=a,o.currentTarget=c;try{i(o)}catch(u){am(u)}o.currentTarget=null,i=l}}}}function Me(e,t){var n=t[b2];n===void 0&&(n=t[b2]=new Set);var r=e+"__bubble";n.has(r)||(bA(t,e,2,!1),n.add(r))}function Qb(e,t,n){var r=0;t&&(r|=4),bA(n,e,r,t)}var $p="_reactListening"+Math.random().toString(36).slice(2);function OA(e){if(!e[$p]){e[$p]=!0,fP.forEach(function(n){n!=="selectionchange"&&(eX.has(n)||Qb(n,!1,e),Qb(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$p]||(t[$p]=!0,Qb("selectionchange",!1,t))}}function bA(e,t,n,r){switch(IA(t)){case 2:var o=GX;break;case 8:o=HX;break;default:o=Zv}n=o.bind(null,t,n,e),o=void 0,!Hb||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Eb(e,t,n,r,o){var i=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===o)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===o)return;s=s.return}for(;a!==null;){if(s=Ca(a),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=i=s;continue e}a=a.parentNode}}r=r.return}yP(function(){var c=i,u=Jy(n),f=[];e:{var d=DP.get(e);if(d!==void 0){var h=Dm,m=e;switch(e){case"keypress":if(jp(n)===0)break e;case"keydown":case"keyup":h=LI;break;case"focusin":m="focus",h=pb;break;case"focusout":m="blur",h=pb;break;case"beforeblur":case"afterblur":h=pb;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=R2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=CI;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=BI;break;case QP:case EP:case MP:h=TI;break;case $P:h=UI;break;case"scroll":case"scrollend":h=SI;break;case"wheel":h=VI;break;case"copy":case"cut":case"paste":h=QI;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=T2;break;case"submit":h=II;break;case"toggle":case"beforetoggle":h=GI}var g=(t&4)!==0,b=!g&&(e==="scroll"||e==="scrollend"),O=g?d!==null?d+"Capture":null:d;g=[];for(var y=c,v;y!==null;){var x=y;if(v=x.stateNode,x=x.tag,x!==5&&x!==26&&x!==27||v===null||O===null||(x=Zf(y,O),x!=null&&g.push(Kf(y,x,v))),b)break;y=y.return}0<g.length&&(d=new h(d,m,null,n,u),f.push({event:d,listeners:g}))}}if((t&7)===0){e:{if(h=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",h&&n!==Gb&&(m=n.relatedTarget||n.fromElement)&&(Ca(m)||m[ad]))break e;if(d||h){if(m=u.window===u?u:(h=u.ownerDocument)?h.defaultView||h.parentWindow:window,d){if(h=n.relatedTarget||n.toElement,d=c,h=h?Ca(h):null,h!==null&&(b=od(h),g=h.tag,h!==b||g!==5&&g!==27&&g!==6))h=null}else d=null,h=c;if(d!==h){if(g=R2,x="onMouseLeave",O="onMouseEnter",y="mouse",e==="pointerout"||e==="pointerover")g=T2,x="onPointerLeave",O="onPointerEnter",y="pointer";b=d==null?m:wf(d),v=h==null?m:wf(h),m=new g(x,y+"leave",d,n,u),m.target=b,m.relatedTarget=v,x=null,Ca(u)===c&&(g=new g(O,y+"enter",h,n,u),g.target=v,g.relatedTarget=b,x=g),b=x,g=d&&h?Nb(d,h,tX):null,d!==null&&SR(f,m,d,g,!1),h!==null&&b!==null&&SR(f,b,h,g,!0)}}}e:{if(d=c?wf(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var w=M2;else if(E2(d))if(CP)w=o7;else{w=n7;var S=t7}else h=d.nodeName,!h||h.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?c&&Ky(c.elementType)&&(w=M2):w=r7;if(w&&(w=w(e,c))){kP(f,w,n,u);break e}S&&S(e,d,c)}switch(S=c?wf(c):window,e){case"focusin":if(E2(S)||S.contentEditable==="true")mc=S,Fb=c,Ef=null;break;case"focusout":Ef=Fb=mc=null;break;case"mousedown":Kb=!0;break;case"contextmenu":case"mouseup":case"dragend":Kb=!1,N2(f,n,u);break;case"selectionchange":if(s7)break;case"keydown":case"keyup":N2(f,n,u)}var k;if(nv)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else pc?wP(e,n)&&(R="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(R="onCompositionStart");if(R&&(xP&&n.locale!=="ko"&&(pc||R!=="onCompositionStart"?R==="onCompositionEnd"&&pc&&(k=vP()):(ps=u,ev=("value"in ps)?ps.value:ps.textContent,pc=!0)),S=Tm(c,R),0<S.length&&(R=new P2(R,e,null,n,u),f.push({event:R,listeners:S}),k?R.data=k:(k=SP(n),k!==null&&(R.data=k)))),k=WI?FI(e,n):KI(e,n))R=Tm(c,"onBeforeInput"),0<R.length&&(S=new P2("onBeforeInput","beforeinput",null,n,u),f.push({event:S,listeners:R}),S.data=k);J7(f,e,c,n,u)}gA(f,t)})}function Kf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Tm(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||i===null||(o=Zf(e,n),o!=null&&r.unshift(Kf(e,o,i)),o=Zf(e,t),o!=null&&r.push(Kf(e,o,i))),e.tag===3)return r;e=e.return}return[]}function tX(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e?e:null}function SR(e,t,n,r,o){for(var i=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(a=a.tag,l!==null&&l===r)break;a!==5&&a!==26&&a!==27||c===null||(l=c,o?(c=Zf(n,i),c!=null&&s.unshift(Kf(n,c,l))):o||(c=Zf(n,i),c!=null&&s.push(Kf(n,c,l)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var nX=/\r\n?/g,rX=/\u0000|\uFFFD/g;function kR(e){return(typeof e==="string"?e:""+e).replace(nX,`
10
+ `).replace(rX,"")}function yA(e,t){return t=kR(t),kR(e)===t?!0:!1}function Ke(e,t,n,r,o,i){switch(n){case"children":if(typeof r==="string")t==="body"||t==="textarea"&&r===""||Dc(e,r);else if(typeof r==="number"||typeof r==="bigint")t!=="body"&&Dc(e,""+r);else return;break;case"className":Sp(e,"class",r);break;case"tabIndex":Sp(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Sp(e,n,r);break;case"style":bP(e,r,i);return;case"data":if(t!=="object"){Sp(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=Lp(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 i==="function"&&(n==="formAction"?(t!=="input"&&Ke(e,t,"name",o.name,o,null),Ke(e,t,"formEncType",o.formEncType,o,null),Ke(e,t,"formMethod",o.formMethod,o,null),Ke(e,t,"formTarget",o.formTarget,o,null)):(Ke(e,t,"encType",o.encType,o,null),Ke(e,t,"method",o.method,o,null),Ke(e,t,"target",o.target,o,null)));if(r==null||typeof r==="symbol"||typeof r==="boolean"){e.removeAttribute(n);break}r=Lp(r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=Eo);return;case"onScroll":r!=null&&Me("scroll",e);return;case"onScrollEnd":r!=null&&Me("scrollend",e);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!=="object"||!("__html"in r))throw Error(z(61));if(n=r.__html,n!=null){if(o.children!=null)throw Error(z(60));(i!=null?i.__html:void 0)!==n&&(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=Lp(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"credentialless":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":r===!0?e.setAttribute(n,""):r!==!1&&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":Me("beforetoggle",e),Me("toggle",e),Np(e,"popover",r);break;case"xlinkActuate":fi(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":fi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":fi(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":fi(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":fi(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":fi(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":fi(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":fi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":fi(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Np(e,"is",r);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=xI.get(n)||n,Np(e,n,r);else return}Ye=!0}function Ly(e,t,n,r,o,i){switch(n){case"style":bP(e,r,i);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!=="object"||!("__html"in r))throw Error(z(61));if(n=r.__html,n!=null){if(o.children!=null)throw Error(z(60));(i!=null?i.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof r==="string")Dc(e,r);else if(typeof r==="number"||typeof r==="bigint")Dc(e,""+r);else return;break;case"onScroll":r!=null&&Me("scroll",e);return;case"onScrollEnd":r!=null&&Me("scrollend",e);return;case"onClick":r!=null&&(e.onclick=Eo);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!dP.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),i=n.slice(2,o?n.length-7:void 0),t=e[Zn]||null,t=t!=null?t[n]:null,typeof t==="function"&&e.removeEventListener(i,t,o),typeof r==="function")){typeof t!=="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(i,r,o);break e}Ye=!0,n in e?e[n]=r:r===!0?e.setAttribute(n,""):Np(e,n,r)}return}Ye=!0}function an(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var r=!1,o=!1,i;for(i in n)if(n.hasOwnProperty(i)){var s=n[i];if(s!=null)switch(i){case"src":r=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(z(137,t));default:Ke(e,t,i,s,n,null)}}o&&Ke(e,t,"srcSet",n.srcSet,n,null),r&&Ke(e,t,"src",n.src,n,null);return;case"input":Me("invalid",e);var a=i=s=o=null,l=null,c=null;for(r in n)if(n.hasOwnProperty(r)){var u=n[r];if(u!=null)switch(r){case"name":o=u;break;case"type":s=u;break;case"checked":l=u;break;case"defaultChecked":c=u;break;case"value":i=u;break;case"defaultValue":a=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(z(137,t));break;default:Ke(e,t,r,u,n,null)}}mP(e,i,a,l,c,s,o,!1);return;case"select":Me("invalid",e),r=s=i=null;for(o in n)if(n.hasOwnProperty(o)&&(a=n[o],a!=null))switch(o){case"value":i=a;break;case"defaultValue":s=a;break;case"multiple":r=a;default:Ke(e,t,o,a,n,null)}t=i,n=s,e.multiple=!!r,t!=null?Sc(e,!!r,t,!1):n!=null&&Sc(e,!!r,n,!0);return;case"textarea":Me("invalid",e),i=o=r=null;for(s in n)if(n.hasOwnProperty(s)&&(a=n[s],a!=null))switch(s){case"value":r=a;break;case"defaultValue":o=a;break;case"children":i=a;break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(z(91));break;default:Ke(e,t,s,a,n,null)}OP(e,r,o,i);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:Ke(e,t,l,r,n,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(r=0;r<Ff.length;r++)Me(Ff[r],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(z(137,t));default:Ke(e,t,c,r,n,null)}return;default:if(Ky(t)){for(u in n)n.hasOwnProperty(u)&&(r=n[u],r!==void 0&&Ly(e,t,u,r,n,void 0));return}}for(a in n)n.hasOwnProperty(a)&&(r=n[a],r!=null&&Ke(e,t,a,r,n,null))}var oX={};function iX(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 o=null,i=null,s=null,a=null,l=null,c=null,u=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&f!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":l=f;default:r.hasOwnProperty(h)||Ke(e,t,h,null,r,f)}}for(var d in r){var h=r[d];if(f=n[d],r.hasOwnProperty(d)&&(h!=null||f!=null))switch(d){case"type":h!==f&&(Ye=!0),i=h;break;case"name":h!==f&&(Ye=!0),o=h;break;case"checked":h!==f&&(Ye=!0),c=h;break;case"defaultChecked":h!==f&&(Ye=!0),u=h;break;case"value":h!==f&&(Ye=!0),s=h;break;case"defaultValue":h!==f&&(Ye=!0),a=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(z(137,t));break;default:h!==f&&Ke(e,t,d,h,r,f)}}qb(e,s,a,l,c,u,i,o);return;case"select":h=s=a=d=null;for(i in n)if(l=n[i],n.hasOwnProperty(i)&&l!=null)switch(i){case"value":break;case"multiple":h=l;default:r.hasOwnProperty(i)||Ke(e,t,i,null,r,l)}for(o in r)if(i=r[o],l=n[o],r.hasOwnProperty(o)&&(i!=null||l!=null))switch(o){case"value":i!==l&&(Ye=!0),d=i;break;case"defaultValue":i!==l&&(Ye=!0),a=i;break;case"multiple":i!==l&&(Ye=!0),s=i;default:i!==l&&Ke(e,t,o,i,r,l)}t=a,n=s,r=h,d!=null?Sc(e,!!n,d,!1):!!r!==!!n&&(t!=null?Sc(e,!!n,t,!0):Sc(e,!!n,n?[]:"",!1));return;case"textarea":h=d=null;for(a in n)if(o=n[a],n.hasOwnProperty(a)&&o!=null&&!r.hasOwnProperty(a))switch(a){case"value":break;case"children":break;default:Ke(e,t,a,null,r,o)}for(s in r)if(o=r[s],i=n[s],r.hasOwnProperty(s)&&(o!=null||i!=null))switch(s){case"value":o!==i&&(Ye=!0),d=o;break;case"defaultValue":o!==i&&(Ye=!0),h=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(z(91));break;default:o!==i&&Ke(e,t,s,o,r,i)}gP(e,d,h);return;case"option":for(var m in n)if(d=n[m],n.hasOwnProperty(m)&&d!=null&&!r.hasOwnProperty(m))switch(m){case"selected":e.selected=!1;break;default:Ke(e,t,m,null,r,d)}for(l in r)if(d=r[l],h=n[l],r.hasOwnProperty(l)&&d!==h&&(d!=null||h!=null))switch(l){case"selected":d!==h&&(Ye=!0),e.selected=d&&typeof d!=="function"&&typeof d!=="symbol";break;default:Ke(e,t,l,d,r,h)}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)d=n[g],n.hasOwnProperty(g)&&d!=null&&!r.hasOwnProperty(g)&&Ke(e,t,g,null,r,d);for(c in r)if(d=r[c],h=n[c],r.hasOwnProperty(c)&&d!==h&&(d!=null||h!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(z(137,t));break;default:Ke(e,t,c,d,r,h)}return;default:if(Ky(t)){for(var b in n)d=n[b],n.hasOwnProperty(b)&&d!==void 0&&!r.hasOwnProperty(b)&&Ly(e,t,b,void 0,r,d);for(u in r)d=r[u],h=n[u],!r.hasOwnProperty(u)||d===h||d===void 0&&h===void 0||Ly(e,t,u,d,r,h);return}}for(var O in n)d=n[O],n.hasOwnProperty(O)&&d!=null&&!r.hasOwnProperty(O)&&Ke(e,t,O,null,r,d);for(f in r)d=r[f],h=n[f],!r.hasOwnProperty(f)||d===h||d==null&&h==null||Ke(e,t,f,d,r,h)}function CR(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sX(){if(typeof performance.getEntriesByType==="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var o=n[r],{transferSize:i,initiatorType:s,duration:a}=o;if(i&&a&&CR(s)){s=0,a=o.responseEnd;for(r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>a)break;var u=l.transferSize,f=l.initiatorType;u&&CR(f)&&(l=l.responseEnd,s+=u*(l<a?1:(a-c)/(l-c)))}if(--r,t+=8*(i+s)/(o.duration/1000),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==="number")?e:5}var zy=null,jy=null;function Jf(e){return e.nodeType===9?e:e.ownerDocument}function RR(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 vA(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 xA(e,t,n,r){return n=Jf(n).createElement(e),n[nn]=r,n[Zn]=t,an(n,e,t),Vt(n),n}function Iy(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 Mb=null;function aX(){var e=window.event;if(e&&e.type==="popstate"){if(e===Mb)return!1;return Mb=e,!0}return Mb=null,!1}var Lv=typeof setTimeout==="function"?setTimeout:void 0,lX=typeof clearTimeout==="function"?clearTimeout:void 0,PR=typeof Promise==="function"?Promise:void 0,TR=typeof requestAnimationFrame==="function"?requestAnimationFrame:Lv,cX=typeof queueMicrotask==="function"?queueMicrotask:typeof PR<"u"?function(e){return PR.resolve(null).then(e).catch(uX)}:Lv;function uX(e){setTimeout(function(){throw e})}function $s(e){return e==="head"}function AR(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(o),Uc(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")Db(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Db(n);for(var i=n.firstChild;i;){var s=i.nextSibling,a=i.nodeName;i[ld]||a==="SCRIPT"||a==="STYLE"||a==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=s}}else n==="body"&&Db(e.ownerDocument.body);n=o}while(n);Uc(t)}function QR(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;else e--;else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function wA(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var r=1;else for(var o=r=0;o<t.length;o++){var i=t[o];0<i.width&&0<i.height&&r++}r===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function SA(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n==="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n==="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n==="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n==="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t==="boolean"?"":t)))}function kA(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Xy(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return kA(t,n,e)}function fX(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+20000,t.y+20000,t.width,t.height);var n=getComputedStyle(e);return kA(t,n,e)}function dX(e){return e.documentElement.clientHeight}function hX(e){this.addEventListener("load",e),this.addEventListener("error",e)}function pX(e,t,n,r,o,i,s,a,l){var c=t.nodeType===9?t:t.ownerDocument;try{var u=c.startViewTransition({update:function(){var d=c.defaultView,h=d.navigation&&d.navigation.transition,m=c.fonts.status;r();var g=[];if(m==="loaded"&&(dX(c),c.fonts.status==="loading"&&g.push(c.fonts.ready)),m=g.length,e!==null)for(var b=e.suspenseyImages,O=0,y=0;y<b.length;y++){var v=b[y];if(!v.complete){var x=v.getBoundingClientRect();if(0<x.bottom&&0<x.right&&x.top<d.innerHeight&&x.left<d.innerWidth){if(O+=NA(v),O>Jp){g.length=m;break}v=new Promise(hX.bind(v)),g.push(v)}}}if(0<g.length)return d=Promise.race([Promise.all(g),new Promise(function(w){return setTimeout(w,500)})]).then(o,o),(h?Promise.allSettled([h.finished,d]):d).then(i,i);if(o(),h)return h.finished.then(i,i);i()},types:n});c.__reactViewTransition=u;var f=[];return u.ready.then(function(){for(var d=c.documentElement.getAnimations({subtree:!0}),h=0;h<d.length;h++){var m=d[h],g=m.effect,b=g.pseudoElement;if(b!=null&&b.startsWith("::view-transition")){f.push(m),m=g.getKeyframes();for(var O=b=void 0,y=!0,v=0;v<m.length;v++){var x=m[v],w=x.width;if(b===void 0)b=w;else if(b!==w){y=!1;break}if(w=x.height,O===void 0)O=w;else if(O!==w){y=!1;break}delete x.width,delete x.height,x.transform==="none"&&delete x.transform}y&&b!==void 0&&O!==void 0&&(g.setKeyframes(m),y=getComputedStyle(g.target,g.pseudoElement),y.width!==b||y.height!==O)&&(y=m[0],y.width=b,y.height=O,y=m[m.length-1],y.width=b,y.height=O,g.setKeyframes(m))}}s()},function(d){c.__reactViewTransition===u&&(c.__reactViewTransition=null);try{if(typeof d==="object"&&d!==null)switch(d.name){case"InvalidStateError":if(d.message==="View transition was skipped because document visibility state is hidden."||d.message==="Skipping view transition because document visibility state has become hidden."||d.message==="Skipping view transition because viewport size changed."||d.message==="Transition was aborted because of invalid state")d=null}d!==null&&l(d)}finally{r(),o(),s()}}),u.finished.finally(function(){for(var d=0;d<f.length;d++)f[d].cancel();c.__reactViewTransition===u&&(c.__reactViewTransition=null),a()}),u}catch(d){return r(),o(),s(),null}}function Ra(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Ra.prototype.animate=function(e,t){return t=typeof t==="number"?{duration:t}:ot({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};Ra.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],o=0;o<n.length;o++){var i=n[o].effect;i!==null&&i.target===e&&i.pseudoElement===t&&r.push(n[o])}return r};Ra.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function CA(e){return{name:e,group:new Ra("group",e),imagePair:new Ra("image-pair",e),old:new Ra("old",e),new:new Ra("new",e)}}function ur(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}ur.prototype.addEventListener=function(e,t,n){var r=null,o=null;if(n!=null&&typeof n!=="boolean"&&(r=n.signal||null,r!==null&&r.aborted))return;this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(RA(i,e,t,n)===-1){var s=this,a=t;n!=null&&typeof n!=="boolean"&&n.once===!0&&(a=function(l){s.removeEventListener(e,t,n),typeof t==="function"?t.call(this,l):t.handleEvent(l)}),r!==null&&(o=s.removeEventListener.bind(s,e,t,n),r.addEventListener("abort",o,{once:!0}),o=r.removeEventListener.bind(r,"abort",o)),r=Ic(n),i.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:a,cleanup:o}),Bn(this._fragmentFiber.child,!1,mX,e,a,r)}this._eventListeners=i};function mX(e,t,n,r){return jt(e).addEventListener(t,n,r),!1}ur.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=RA(r,e,t,n),t!==-1)){var o=r[t];n=o.attachedListener;var i=o.cleanup;o=Ic(o.optionsOrUseCapture),Bn(this._fragmentFiber.child,!1,gX,e,n,o),r.splice(t,1),i!==null&&i()}};function gX(e,t,n,r){return jt(e).removeEventListener(t,n,r),!1}function Ic(e){return e!=null&&typeof e!=="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function ER(e){return e==null?"c=0":typeof e==="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function RA(e,t,n,r){if(e.length===0)return-1;r=ER(r);for(var o=0;o<e.length;o++){var i=e[o];if(i.type===t&&i.listener===n&&ER(i.optionsOrUseCapture)===r)return o}return-1}ur.prototype.dispatchEvent=function(e){var t=Ba(this._fragmentFiber);if(t===null)return!0;t=jt(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var o=0;o<n.length;o++){var i=n[o];r.addEventListener(i.type,i.attachedListener,Ic(i.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(o=0;o<n.length;o++)i=n[o],r.removeEventListener(i.type,i.attachedListener,Ic(i.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)};ur.prototype.focus=function(e){Bn(this._fragmentFiber.child,!0,PA,e,void 0,void 0)};function PA(e,t){if(e.tag===6)return!1;return e=jt(e),TX(e,t)}ur.prototype.focusLast=function(e){var t=[];Bn(this._fragmentFiber.child,!0,zv,t,void 0,void 0);for(var n=t.length-1;0<=n&&!PA(t[n],e);n--);};function zv(e,t){return t.push(e),!1}ur.prototype.blur=function(){var e=Ba(this._fragmentFiber);e!==null&&(e=jt(e),e=Jf(e).activeElement,e!==null&&Bn(this._fragmentFiber.child,!1,OX,e,void 0,void 0))};function OX(e,t){if(e.tag===6)return!1;return e=jt(e),e===t||e.contains(t)?(t.blur(),!0):!1}ur.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),Bn(this._fragmentFiber.child,!1,bX,e,void 0,void 0)};function bX(e,t){if(e.tag===6)return!1;return e=jt(e),t.observe(e),!1}ur.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),Bn(this._fragmentFiber.child,!1,yX,e,void 0,void 0);for(var n=t=0;n<Fr.length;n++){var r=Fr[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Fr[t++]=r}Fr.length=t}};function yX(e,t){if(e.tag===6)return!1;return e=jt(e),t.unobserve(e),!1}var Fr=[],$b=!1;function vX(e,t,n){Fr.push({fragmentInstance:e,observer:t,instance:n}),$b||($b=!0,AX(function(){$b=!1;var r=Fr;Fr=[];for(var o=0;o<r.length;o++){var i=r[o];i.observer.unobserve(i.instance)}}))}ur.prototype.getClientRects=function(){var e=[];return Bn(this._fragmentFiber.child,!1,xX,e,void 0,void 0),e};function xX(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=jt(e),t.push.apply(t,e.getClientRects());return!1}ur.prototype.getRootNode=function(e){var t=Ba(this._fragmentFiber);return t===null?this:jt(t).getRootNode(e)};ur.prototype.compareDocumentPosition=function(e){var t=Ba(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];Bn(this._fragmentFiber.child,!1,zv,n,void 0,void 0);var r=jt(t);if(n.length===0){if(n=r,d2(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var o=r=n.compareDocumentPosition(e);return n===e?o=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=WR(t)[1],n===null?o=Node.DOCUMENT_POSITION_PRECEDING:(e=jt(n).compareDocumentPosition(e),o=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),o|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=jt(n[0]),o=jt(n[n.length-1]);var i=d2(this._fragmentFiber)?t.parentElement:r;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=i.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_CONTAINED_BY;var s=t.compareDocumentPosition(e),a=o.compareDocumentPosition(e),l=s&Node.DOCUMENT_POSITION_CONTAINED_BY||a&Node.DOCUMENT_POSITION_CONTAINED_BY;return a=r&&i&&s&Node.DOCUMENT_POSITION_FOLLOWING&&a&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||i&&o===e||l||a?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!i&&o===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:s,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||wX(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function wX(e,t,n,r,o){var i=Ca(o);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!i)e:{for(;i!==null;){if(i.tag===7&&(i===t||i.alternate===t)){n=!0;break e}i=i.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=o.ownerDocument,o===i||o===i.documentElement||o===i.body;e:{i=t;for(t=Ba(t);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==t&&i.alternate!==t)){i=!0;break e}i=i.return}i=!1}return i}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!i)&&!(t=i===n)&&(t=Nb(n,i,h2),t===null?t=!1:(Bn(t,!0,H8,i,n),i=uc,uc=null,t=i!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!i)&&!(t=i===r)&&(t=Nb(r,i,h2),t===null?t=!1:(Bn(t,!0,W8,i,r),i=uc,_b=uc=null,t=i!==null)),t):!1}function MR(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}ur.prototype.scrollIntoView=function(e){if(typeof e==="object")throw Error(z(566));var t=[];Bn(this._fragmentFiber.child,!1,zv,t,void 0,void 0);var n=e!==!1;if(t.length===0){var r=WR(this._fragmentFiber);if(r=n?r[1]||r[0]||Ba(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=jt(r),MR(e,n);return}if(r=jt(r),r.nodeType!==9){if(r.nodeType===11){n="host"in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var o=t[r];o.tag===6?(o=jt(o),MR(o,n)):jt(o).scrollIntoView(e),r+=n?-1:1}};function SX(e,t){return e=jt(e),TA(e,t),!1}function TA(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function AA(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];e.addEventListener(o.type,o.attachedListener,Ic(o.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){for(var s=0,a=0;a<Fr.length;a++){var l=Fr[a];if(l.fragmentInstance!==t||l.observer!==i||l.instance!==e)Fr[s++]=l}Fr.length=s,i.observe(e)}),TA(e,t))}function kX(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];e.removeEventListener(o.type,o.attachedListener,Ic(o.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){typeof i.rootMargin==="string"?vX(t,i,e):i.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function By(e){var t=e.firstChild;t&&t.nodeType===10&&(t=t.nextSibling);for(;t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":By(n),$m(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function CX(e,t,n,r){for(;e.nodeType===1;){var o=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 i=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;else if(!e[ld])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;else if(i!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}if(e=Mr(e.nextSibling),e===null)break}return null}function RX(e,t,n){if(t==="")return null;for(;e.nodeType!==3;){if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n)return null;if(e=Mr(e.nextSibling),e===null)return null}return e}function QA(e,t){for(;e.nodeType!==8;){if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t)return null;if(e=Mr(e.nextSibling),e===null)return null}return e}function Zy(e){return e.data==="$?"||e.data==="$~"}function jv(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function PX(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 Mr(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 Uy=null;function $R(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Mr(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function DR(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 TX(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return r}function AX(e){TR(function(){TR(function(t){return e(t)})})}function EA(e,t,n){switch(t=Jf(n),e){case"html":if(e=t.documentElement,!e)throw Error(z(452));return e;case"head":if(e=t.head,!e)throw Error(z(453));return e;case"body":if(e=t.body,!e)throw Error(z(454));return e;default:throw Error(z(451))}}function MA(e,t,n){for(var r in n){var o=n[r];n.hasOwnProperty(r)&&o!=null&&Ke(e,t,r,null,oX,o)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Eo&&(e.onclick=null),$m(e)}function Db(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);$m(e)}var $r=new Map,_R=new Set;function ed(e){if(typeof e.getRootNode==="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Ri=He.d;He.d={f:QX,r:EX,D:MX,C:$X,L:DX,m:_X,X:LX,S:NX,M:zX};function QX(){var e=Ri.f(),t=qm();return e||t}function EX(e){var t=Yc(e);t!==null&&t.tag===5&&t.type==="form"?bT(t):Ri.r(e)}var Hc=typeof document>"u"?null:document;function $A(e,t,n){var r=Hc;if(r&&typeof t==="string"&&t){var o=Tr(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n==="string"&&(o+='[crossorigin="'+n+'"]'),_R.has(o)||(_R.add(o),e={rel:e,crossOrigin:n,href:t},r.querySelector(o)===null&&(t=r.createElement("link"),an(t,"link",e),Vt(t),r.head.appendChild(t)))}}function MX(e){Ri.D(e),$A("dns-prefetch",e,null)}function $X(e,t){Ri.C(e,t),$A("preconnect",e,t)}function DX(e,t,n){Ri.L(e,t,n);var r=Hc;if(r&&e&&t){var o='link[rel="preload"][as="'+Tr(t)+'"]';t==="image"?n&&n.imageSrcSet?(o+='[imagesrcset="'+Tr(n.imageSrcSet)+'"]',typeof n.imageSizes==="string"&&(o+='[imagesizes="'+Tr(n.imageSizes)+'"]')):o+='[href="'+Tr(e)+'"]':o+='[href="'+Tr(e)+'"]';var i=o;switch(t){case"style":i=Xc(e);break;case"script":i=Wc(e)}if(!($r.has(i)||(e=ot({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),$r.set(i,e),r.querySelector(o)!==null||t==="style"&&r.querySelector(pd(i))||t==="script"&&r.querySelector(md(i))))){var s=r.createElement("link");an(s,"link",e),t==="style"&&(s[sm]=!0,s.onload=s.onerror=function(){uP(s)}),Vt(s),r.head.appendChild(s)}}}function _X(e,t){Ri.m(e,t);var n=Hc;if(n&&e){var r=t&&typeof t.as==="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Tr(r)+'"][href="'+Tr(e)+'"]',i=o;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Wc(e)}if(!$r.has(i)&&(e=ot({rel:"modulepreload",href:e},t),$r.set(i,e),n.querySelector(o)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(md(i)))return}r=n.createElement("link"),an(r,"link",e),Vt(r),n.head.appendChild(r)}}}function NX(e,t,n){Ri.S(e,t,n);var r=Hc;if(r&&e){var o=wc(r).hoistableStyles,i=Xc(e);t=t||"default";var s=o.get(i);if(!s){var a={loading:0,preload:null};if(s=r.querySelector(pd(i)))a.loading=5;else{e=ot({rel:"stylesheet",href:e,"data-precedence":t},n),(n=$r.get(i))&&Iv(e,n);var l=s=r.createElement("link");Vt(l),an(l,"link",e),l._p=new Promise(function(c,u){l.onload=c,l.onerror=u}),l.addEventListener("load",function(){a.loading|=1}),l.addEventListener("error",function(){a.loading|=2}),a.loading|=4,Fp(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:a},o.set(i,s)}}}function LX(e,t){Ri.X(e,t);var n=Hc;if(n&&e){var r=wc(n).hoistableScripts,o=Wc(e),i=r.get(o);i||(i=n.querySelector(md(o)),i||(e=ot({src:e,async:!0},t),(t=$r.get(o))&&Xv(e,t),i=n.createElement("script"),Vt(i),an(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}function zX(e,t){Ri.M(e,t);var n=Hc;if(n&&e){var r=wc(n).hoistableScripts,o=Wc(e),i=r.get(o);i||(i=n.querySelector(md(o)),i||(e=ot({src:e,async:!0,type:"module"},t),(t=$r.get(o))&&Xv(e,t),i=n.createElement("script"),Vt(i),an(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(o,i))}}function NR(e,t,n,r){var o=(o=ys.current)?ed(o):null;if(!o)throw Error(z(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence==="string"&&typeof n.href==="string"?(n=Xc(n.href),t=wc(o).hoistableStyles,r=t.get(n),r||(r={type:"style",instance:null,count:0,state:null},t.set(n,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=Xc(n.href);var i=wc(o).hoistableStyles,s=i.get(e);if(s||(o=o.ownerDocument||o,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=o.querySelector(pd(e)))?i._p||(s.instance=i,s.state.loading=5):(i=$r.get(e),i||(i={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},$r.set(e,i)),jX(o,e,i,s.state))),t&&r===null)throw Error(z(528,""));return s}if(t&&r!==null)throw Error(z(529,""));return null;case"script":return t=n.async,n=n.src,typeof n==="string"&&t&&typeof t!=="function"&&typeof t!=="symbol"?(n=Wc(n),t=wc(o).hoistableScripts,r=t.get(n),r||(r={type:"script",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(z(444,e))}}function Xc(e){return'href="'+Tr(e)+'"'}function pd(e){return'link[rel="stylesheet"]['+e+"]"}function DA(e){return ot({},e,{"data-precedence":e.precedence,precedence:null})}function jX(e,t,n,r){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[sm]!==!0){r.loading=1;return}}else t=e.createElement("link"),t[sm]=!0,t.onload=t.onerror=uP.bind(null,t),an(t,"link",n),Vt(t),e.head.appendChild(t);r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2})}function Wc(e){return'[src="'+Tr(e)+'"]'}function md(e){return"script[async]"+e}function LR(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Tr(n.href)+'"]');if(r)return t.instance=r,Vt(r),r;var o=ot({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Vt(r),an(r,"style",o),Fp(r,n.precedence,e),t.instance=r;case"stylesheet":o=Xc(n.href);var i=e.querySelector(pd(o));if(i)return t.state.loading|=4,t.instance=i,Vt(i),i;r=DA(n),(o=$r.get(o))&&Iv(r,o),i=(e.ownerDocument||e).createElement("link"),Vt(i);var s=i;return s._p=new Promise(function(a,l){s.onload=a,s.onerror=l}),an(i,"link",r),t.state.loading|=4,Fp(i,n.precedence,e),t.instance=i;case"script":if(i=Wc(n.src),o=e.querySelector(md(i)))return t.instance=o,Vt(o),o;if(r=n,o=$r.get(i))r=ot({},n),Xv(r,o);return e=e.ownerDocument||e,o=e.createElement("script"),Vt(o),an(o,"link",r),e.head.appendChild(o),t.instance=o;case"void":return null;default:throw Error(z(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Fp(r,n.precedence,e));return t.instance}function Fp(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=r.length?r[r.length-1]:null,i=o,s=0;s<r.length;s++){var a=r[s];if(a.dataset.precedence===t)i=a;else if(i!==o)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Iv(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xv(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Kp=null;function zR(e,t,n){if(Kp===null){var r=new Map,o=Kp=new Map;o.set(n,r)}else o=Kp,r=o.get(n),r||(r=new Map,o.set(n,r));if(r.has(e))return r;r.set(e,null),n=n.getElementsByTagName(e);for(o=0;o<n.length;o++){var i=n[o];if(!(i[ld]||i[nn]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var s=i.getAttribute(t)||"";s=e+s;var a=r.get(s);a?a.push(i):r.set(s,[i])}}return r}function Yy(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function IX(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 jR(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function _A(e){return e.type==="stylesheet"&&(e.state.loading&3)===0?!1:!0}function NA(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==="number"?devicePixelRatio:1)*0.25}function IR(e,t){typeof t.decode==="function"&&(e.imgCount++,t.complete||(e.imgBytes+=NA(t),e.suspenseyImages.push(t)),e=ZX.bind(e),t.decode().then(e,e))}function XX(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!=="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=Xc(r.href),i=t.querySelector(pd(o));if(i){t=i._p,t!==null&&typeof t==="object"&&typeof t.then==="function"&&(e.count++,e=td.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Vt(i);return}i=t.ownerDocument||t,r=DA(r),(o=$r.get(o))&&Iv(r,o),i=i.createElement("link"),Vt(i);var s=i;s._p=new Promise(function(a,l){s.onload=a,s.onerror=l}),an(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=td.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Jp=0;function BX(e,t){return e.stylesheets&&e.count===0&&em(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&em(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},60000+t);0<e.imgBytes&&Jp===0&&(Jp=62500*sX());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&em(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Jp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(o)}}:null}function LA(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)em(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function td(){this.count--,LA(this)}function ZX(){this.imgCount--,LA(this)}var Am=null;function em(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Am=new Map,t.forEach(UX,e),Am=null,td.call(e))}function UX(e,t){if(!(t.state.loading&4)){var n=Am.get(e);if(n)var r=n.get(null);else{n=new Map,Am.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<o.length;i++){var s=o[i];if(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")n.set(s.dataset.precedence,s),r=s}r&&n.set(null,r)}o=t.instance,s=o.getAttribute("data-precedence"),i=n.get(s)||r,i===r&&n.set(null,o),n.set(s,o),this.count++,r=td.bind(this),o.addEventListener("load",r),o.addEventListener("error",r),i?i.parentNode.insertBefore(o,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var Bc={$$typeof:Qo,Provider:null,Consumer:null,_currentValue:Pa,_currentValue2:Pa,_threadCount:0};function YX(e,t,n,r,o,i,s,a,l){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=cb(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cb(0),this.hiddenUpdates=cb(null),this.identifierPrefix=r,this.onUncaughtError=o,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.transitionTypes=null,this.incompleteTransitions=new Map}function VX(e,t,n,r,o,i,s,a,l,c,u,f){return e=new YX(e,t,n,s,l,c,u,f,a),t=1,i===!0&&(t|=24),i=In(3,null,null,t),e.current=i,i.stateNode=e,t=lv(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},fv(i),e}function qX(e){if(!e)return bc;return e=bc,e}function zA(e,t,n,r,o,i){o=qX(o),r.context===null?r.context=o:r.pendingContext=o,r=Ea(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=Ma(e,r,t),n!==null&&(Xn(n,e,t),$f(n,e,t))}function XR(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Bv(e,t){XR(e,t),(e=e.alternate)&&XR(e,t)}function jA(e){if(e.tag===13||e.tag===31){var t=Ya(e,67108864);t!==null&&Xn(t,e,67108864),Bv(e,67108864)}}function BR(e){if(e.tag===13||e.tag===31){var t=Er();t=lP(t);var n=Ya(e,t);n!==null&&Xn(n,e,t),Bv(e,t)}}var Zc=!0;function GX(e,t,n,r){var o=xe.T;xe.T=null;var i=He.p;try{He.p=2,Zv(e,t,n,r)}finally{He.p=i,xe.T=o}}function HX(e,t,n,r){var o=xe.T;xe.T=null;var i=He.p;try{He.p=8,Zv(e,t,n,r)}finally{He.p=i,xe.T=o}}function Zv(e,t,n,r){if(Zc){var o=Vy(r);if(o===null)Eb(e,t,r,Qm,n),ZR(e,r);else if(FX(o,e,t,n,r))r.stopPropagation();else if(ZR(e,r),t&4&&-1<WX.indexOf(e)){for(;o!==null;){var i=Yc(o);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var s=xa(i.pendingLanes);if(s!==0){var a=i;a.pendingLanes|=2;for(a.entangledLanes|=2;s;){var l=1<<31-lr(s);a.entanglements[1]|=l,s&=~l}Ci(i),(Ge&6)===0&&(km=sr()+500,hd(0,!1))}}break;case 31:case 13:a=Ya(i,2),a!==null&&Xn(a,i,2),qm(),Bv(i,2)}if(i=Vy(r),i===null&&Eb(e,t,r,Qm,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else Eb(e,t,r,null,n)}}function Vy(e){return e=Jy(e),Uv(e)}var Qm=null;function Uv(e){if(Qm=null,e=Ca(e),e!==null){var t=od(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=qR(t),e!==null)return e;e=null}else if(n===31){if(e=GR(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 Qm=e,null}function IA(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(iI()){case eP:return 2;case tP:return 8;case im:case sI:return 32;case nP:return 268435456;default:return 32}default:return 32}}var qy=!1,ks=null,Cs=null,Rs=null,nd=new Map,rd=new Map,ds=[],WX="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 ZR(e,t){switch(e){case"focusin":case"focusout":ks=null;break;case"dragenter":case"dragleave":Cs=null;break;case"mouseover":case"mouseout":Rs=null;break;case"pointerover":case"pointerout":nd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":rd.delete(t.pointerId)}}function yf(e,t,n,r,o,i){if(e===null||e.nativeEvent!==i)return e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=Yc(t),t!==null&&jA(t)),e;return e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e}function FX(e,t,n,r,o){switch(t){case"focusin":return ks=yf(ks,e,t,n,r,o),!0;case"dragenter":return Cs=yf(Cs,e,t,n,r,o),!0;case"mouseover":return Rs=yf(Rs,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return nd.set(i,yf(nd.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,rd.set(i,yf(rd.get(i)||null,e,t,n,r,o)),!0}return!1}function XA(e){var t=Ca(e.target);if(t!==null){var n=od(t);if(n!==null){if(t=n.tag,t===13){if(t=qR(n),t!==null){e.blockedOn=t,O2(e.priority,function(){BR(n)});return}}else if(t===31){if(t=GR(n),t!==null){e.blockedOn=t,O2(e.priority,function(){BR(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 tm(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vy(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Gb=r,n.target.dispatchEvent(r),Gb=null}else return t=Yc(n),t!==null&&jA(t),e.blockedOn=n,!1;t.shift()}return!0}function UR(e,t,n){tm(e)&&n.delete(t)}function KX(){qy=!1,ks!==null&&tm(ks)&&(ks=null),Cs!==null&&tm(Cs)&&(Cs=null),Rs!==null&&tm(Rs)&&(Rs=null),nd.forEach(UR),rd.forEach(UR)}function Dp(e,t){e.blockedOn===t&&(e.blockedOn=null,qy||(qy=!0,ba(Oa,KX)))}var _p=null;function YR(e){_p!==e&&(_p=e,ba(Oa,function(){_p===e&&(_p=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],o=e[t+2];if(typeof r!=="function")if(Uv(r||n)===null)continue;else break;var i=Yc(n);i!==null&&(e.splice(t,3),t-=3,uy(i,{pending:!0,data:o,method:n.method,action:r},r,o))}}))}function Uc(e){function t(l){return Dp(l,e)}ks!==null&&Dp(ks,e),Cs!==null&&Dp(Cs,e),Rs!==null&&Dp(Rs,e),nd.forEach(t),rd.forEach(t);for(var n=0;n<ds.length;n++){var r=ds[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<ds.length&&(n=ds[0],n.blockedOn===null);)XA(n),n.blockedOn===null&&ds.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var o=n[r],i=n[r+1],s=o[Zn]||null;if(typeof i==="function")s||YR(n);else if(s){var a=null;if(i&&i.hasAttribute("formAction")){if(o=i,s=i[Zn]||null)a=s.formAction;else if(Uv(o)!==null)continue}else a=s.action;typeof a==="function"?n[r+1]=a:(n.splice(r,3),r-=3),YR(n)}}}function JX(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(s){return o=s})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation==="object"){var r=!1,o=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),o!==null&&(o(),o=null)}}}function Yv(e){this._internalRoot=e}Vv.prototype.render=Yv.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(z(409));var n=t.current,r=Er();zA(n,r,e,t,null,null)};Vv.prototype.unmount=Yv.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;zA(e.current,2,null,e,null,null),qm(),t[ad]=null}};function Vv(e){this._internalRoot=e}Vv.prototype.unstable_scheduleHydration=function(e){if(e){var t=cP();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ds.length&&t!==0&&t<ds[n].priority;n++);ds.splice(n,0,e),n===0&&XA(e)}};var VR=ip;if(VR!=="19.3.1")throw Error(z(527,VR,"19.3.1"));He.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0){if(typeof e.render==="function")throw Error(z(188));throw e=Object.keys(e).join(","),Error(z(268,e))}return e=G8(t),e=e!==null?HR(e):null,e=e===null?null:e.stateNode,e};var eB={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:xe,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){if(cc=__REACT_DEVTOOLS_GLOBAL_HOOK__,!cc.isDisabled&&cc.supportsFiber)try{id=cc.inject(eB),ar=cc}catch(e){}}var cc;var qv=function(e,t){if(!q8(e))throw Error(z(299));var n=!1,r="",o=P7,i=T7,s=A7;return t!==null&&t!==void 0&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=VX(e,1,!1,null,null,n,r,null,o,i,s,JX),e[ad]=t.current,OA(e),new Yv(t)};BA();class Gv{d;name=null;base=0;dirty=!1;conflict=null;saving=null;held=!1;timer;constructor(e){this.d=e}get busy(){return this.saving!==null}get state(){return this.conflict?"conflict":this.saving?"saving":this.dirty?"unsaved":"saved"}emit(){this.d.onState?.(this.state,this.conflict)}wait(){this.d.timer.clear(this.timer),this.timer=this.d.timer.set(()=>void this.flush(),this.d.delay??600)}open(e,t=0){this.d.timer.clear(this.timer),this.name=e,this.base=t,this.dirty=!1,this.conflict=null,this.emit()}edit(){this.dirty=!0,this.conflict=null,this.emit(),this.wait()}adopt(e){this.base=e}renamed(e,t=this.base){this.name=e,this.base=t}hold(){this.held=!0,this.d.timer.clear(this.timer)}release(){if(this.held=!1,this.dirty&&!this.conflict)this.wait()}discard(){this.d.timer.clear(this.timer),this.dirty=!1,this.emit()}keepMine(){if(!this.conflict)return;this.base=this.conflict.mtime,this.conflict=null,this.flush()}takeTheirs(){let e=this.conflict;if(!e)return null;return this.conflict=null,this.dirty=!1,this.base=e.mtime,this.emit(),e}async flush(){this.d.timer.clear(this.timer);while(this.saving)await this.saving;if(this.held)return;if(!this.name||!this.dirty||this.conflict)return;let e=this.name,t=this.d.read();if(t===null)return;let n=!1;if(this.saving=(async()=>{let r=await this.d.save(e,t,this.base);if(this.name!==e)return;if(r.ok){if(n=!0,this.base=r.mtime,this.d.read()===t)this.dirty=!1;this.d.onSaved?.(e,t,r.mtime)}else if(r.status===409)this.conflict={text:r.text??"",mtime:r.mtime??0};else this.d.onError?.(r.error||"Not saved")})(),this.emit(),await this.saving,this.saving=null,this.emit(),n&&this.dirty&&!this.conflict&&this.name===e)this.wait()}}var Hv={duration:260,easing:"cubic-bezier(.22,.61,.36,1)"},gd=null;function ZA(){gd?.remove(),gd=null;let e=document.querySelector(".main"),t=document.documentElement.dataset.motion;if(!e||(t?t==="reduce":matchMedia("(prefers-reduced-motion: reduce)").matches))return;let n=e.getBoundingClientRect(),r=e.scrollTop,o=e.cloneNode(!0);o.classList.add("sheet"),o.setAttribute("aria-hidden","true"),o.inert=!0,Object.assign(o.style,{left:n.left+"px",top:n.top+"px",width:n.width+"px",height:n.height+"px"}),o.append(Object.assign(document.createElement("i"),{className:"shade"})),document.body.append(o),o.scrollTop=r,gd=o}function UA(){let e=gd;gd=null;let t=document.querySelector(".main");if(!e||!t)return e?.remove();t.classList.add("dealt");let n=()=>{t.classList.remove("dealt"),e.remove()};t.animate([{transform:"translateX(56px)",opacity:0},{transform:"none",opacity:1}],Hv).finished.then(n,n),e.animate([{transform:"none",opacity:1},{transform:"translateX(-24px)",opacity:0,offset:0.6},{transform:"translateX(-24px)",opacity:0}],{...Hv,fill:"forwards"}),e.querySelector(".shade").animate([{opacity:0},{opacity:1}],{...Hv,fill:"forwards"})}var Fv=[],GA=[];(()=>{let e="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,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11s,7,,h,2,7,,2,,5,2s,,4g,7,af,,1p,4,e4,4,72,2,6r,,2,,7,2,5,,d6,7,31,7,240,5".split(",").map((t)=>t?parseInt(t,36):1);for(let t=0,n=0;t<e.length;t++)(t%2?GA:Fv).push(n=n+e[t])})();function rB(e){if(e<768)return!1;for(let t=0,n=Fv.length;;){let r=t+n>>1;if(e<Fv[r])n=r;else if(e>=GA[r])t=r+1;else return!0;if(t==n)return!1}}function YA(e){return e>=127462&&e<=127487}var VA=8205;function HA(e,t,n=!0,r=!0){return(n?WA:oB)(e,t,r)}function WA(e,t,n){if(t==e.length)return t;if(t&&FA(e.charCodeAt(t))&&KA(e.charCodeAt(t-1)))t--;let r=Wv(e,t);t+=qA(r);while(t<e.length){let o=Wv(e,t);if(r==VA||o==VA||n&&rB(o))t+=qA(o),r=o;else if(YA(o)){let i=0,s=t-2;while(s>=0&&YA(Wv(e,s)))i++,s-=2;if(i%2==0)break;else t+=2}else break}return t}function oB(e,t,n){while(t>1){let r=WA(e,t-2,n);if(r<t)return r;t--}return 0}function Wv(e,t){let n=e.charCodeAt(t);if(!KA(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);if(!FA(r))return n;return(n-55296<<10)+(r-56320)+65536}function FA(e){return e>=56320&&e<57344}function KA(e){return e>=55296&&e<56320}function qA(e){return e<65536?1:2}class De{lineAt(e){if(e<0||e>this.length)throw RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){[e,t]=tu(this,e,t);let r=[];if(this.decompose(0,e,r,2),n.length)n.decompose(0,n.length,r,3);return this.decompose(t,this.length,r,1),zo.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=tu(this,e,t);let n=[];return this.decompose(e,t,n,0),zo.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new Jc(this),o=new Jc(e);for(let i=t,s=t;;){if(r.next(i),o.next(i),i=0,r.lineBreak!=o.lineBreak||r.done!=o.done||r.value!=o.value)return!1;if(s+=r.value.length,r.done||s>=n)return!0}}iter(e=1){return new Jc(this,e)}iterRange(e,t=this.length){return new l1(this,e,t)}iterLines(e,t){let n;if(e==null)n=this.iter();else{if(t==null)t=this.lines+1;let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new c1(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw RangeError("A document must have at least one line");if(e.length==1&&!e[0])return De.empty;return e.length<=32?new Qt(e):zo.from(Qt.split(e,[]))}}class Qt extends De{constructor(e,t=iB(e)){super();this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let o=0;;o++){let i=this.text[o],s=r+i.length;if((t?n:s)>=e)return new oQ(r,s,n,i);r=s+1,n++}}decompose(e,t,n,r){let o=e<=0&&t>=this.length?this:new Qt(JA(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let i=n.pop(),s=Jm(o.text,i.text.slice(),0,o.length);if(s.length<=32)n.push(new Qt(s,i.length+o.length));else{let a=s.length>>1;n.push(new Qt(s.slice(0,a)),new Qt(s.slice(a)))}}else n.push(o)}replace(e,t,n){if(!(n instanceof Qt))return super.replace(e,t,n);[e,t]=tu(this,e,t);let r=Jm(this.text,Jm(n.text,JA(this.text,0,e)),t),o=this.length+n.length-(t-e);if(r.length<=32)return new Qt(r,o);return zo.from(Qt.split(r,[]),o)}sliceString(e,t=this.length,n=`
11
+ `){[e,t]=tu(this,e,t);let r="";for(let o=0,i=0;o<=t&&i<this.text.length;i++){let s=this.text[i],a=o+s.length;if(o>e&&i)r+=n;if(e<a&&t>o)r+=s.slice(Math.max(0,e-o),t-o);o=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let o of e)if(n.push(o),r+=o.length+1,n.length==32)t.push(new Qt(n,r)),n=[],r=-1;if(r>-1)t.push(new Qt(n,r));return t}}class zo extends De{constructor(e,t){super();this.children=e,this.length=t,this.lines=0;for(let n of e)this.lines+=n.lines}lineInner(e,t,n,r){for(let o=0;;o++){let i=this.children[o],s=r+i.length,a=n+i.lines-1;if((t?a:s)>=e)return i.lineInner(e,t,n,r);r=s+1,n=a+1}}decompose(e,t,n,r){for(let o=0,i=0;i<=t&&o<this.children.length;o++){let s=this.children[o],a=i+s.length;if(e<=a&&t>=i){let l=r&((i<=e?1:0)|(a>=t?2:0));if(i>=e&&a<=t&&!l)n.push(s);else s.decompose(e-i,t-i,n,l)}i=a+1}}replace(e,t,n){if([e,t]=tu(this,e,t),n.lines<this.lines)for(let r=0,o=0;r<this.children.length;r++){let i=this.children[r],s=o+i.length;if(e>=o&&t<=s){let a=i.replace(e-o,t-o,n),l=this.lines-i.lines+a.lines;if(a.lines<l>>4&&a.lines>l>>6){let c=this.children.slice();return c[r]=a,new zo(c,this.length-(t-e)+n.length)}return super.replace(o,s,a)}o=s+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n=`
12
+ `){[e,t]=tu(this,e,t);let r="";for(let o=0,i=0;o<this.children.length&&i<=t;o++){let s=this.children[o],a=i+s.length;if(i>e&&o)r+=n;if(e<a&&t>i)r+=s.sliceString(e-i,t-i,n);i=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof zo))return 0;let n=0,[r,o,i,s]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,o+=t){if(r==i||o==s)return n;let a=this.children[r],l=e.children[o];if(a!=l)return n+a.scanIdentical(l,t);n+=a.length+1}}static from(e,t=e.reduce((n,r)=>n+r.length+1,-1)){let n=0;for(let d of e)n+=d.lines;if(n<32){let d=[];for(let h of e)h.flatten(d);return new Qt(d,t)}let r=Math.max(32,n>>5),o=r<<1,i=r>>1,s=[],a=0,l=-1,c=[];function u(d){let h;if(d.lines>o&&d instanceof zo)for(let m of d.children)u(m);else if(d.lines>i&&(a>i||!a))f(),s.push(d);else if(d instanceof Qt&&a&&(h=c[c.length-1])instanceof Qt&&d.lines+h.lines<=32)a+=d.lines,l+=d.length+1,c[c.length-1]=new Qt(h.text.concat(d.text),h.length+1+d.length);else{if(a+d.lines>r)f();a+=d.lines,l+=d.length+1,c.push(d)}}function f(){if(a==0)return;s.push(c.length==1?c[0]:zo.from(c,l)),l=-1,a=c.length=0}for(let d of e)u(d);return f(),s.length==1?s[0]:new zo(s,t)}}De.empty=new Qt([""],0);function iB(e){let t=-1;for(let n of e)t+=n.length+1;return t}function Jm(e,t,n=0,r=1e9){for(let o=0,i=0,s=!0;i<e.length&&o<=r;i++){let a=e[i],l=o+a.length;if(l>=n){if(l>r)a=a.slice(0,r-o);if(o<n)a=a.slice(n-o);if(s)t[t.length-1]+=a,s=!1;else t.push(a)}o=l+1}return t}function JA(e,t,n){return Jm(e,[""],t,n)}class Jc{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Qt?e.text.length:e.children.length)<<1]}nextInner(e,t){this.done=this.lineBreak=!1;for(;;){let n=this.nodes.length-1,r=this.nodes[n],o=this.offsets[n],i=o>>1,s=r instanceof Qt?r.text.length:r.children.length;if(i==(t>0?s:0)){if(n==0)return this.done=!0,this.value="",this;if(t>0)this.offsets[n-1]++;this.nodes.pop(),this.offsets.pop()}else if((o&1)==(t>0?0:1)){if(this.offsets[n]+=t,e==0)return this.lineBreak=!0,this.value=`
13
+ `,this;e--}else if(r instanceof Qt){let a=r.text[i+(t<0?-1:0)];if(this.offsets[n]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[i+(t<0?-1:0)];if(e>a.length)e-=a.length,this.offsets[n]+=t;else{if(t<0)this.offsets[n]--;this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof Qt?a.text.length:a.children.length)<<1)}}}}next(e=0){if(e<0)this.nextInner(-e,-this.dir),e=this.value.length;return this.nextInner(e,this.dir)}}class l1{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new Jc(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;if(e>n)e=n;n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){if(e<0)e=Math.max(e,this.from-this.pos);else if(e>0)e=Math.min(e,this.to-this.pos);return this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class c1{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);if(t&&this.afterBreak)this.value="",this.afterBreak=!1;else if(t)this.done=!0,this.value="";else if(n)if(this.afterBreak)this.value="";else this.afterBreak=!0,this.next();else this.value=r,this.afterBreak=!1;return this}get lineBreak(){return!1}}if(typeof Symbol<"u")De.prototype[Symbol.iterator]=function(){return this.iter()},Jc.prototype[Symbol.iterator]=l1.prototype[Symbol.iterator]=c1.prototype[Symbol.iterator]=function(){return this};class oQ{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}function tu(e,t,n){return t=Math.max(0,Math.min(e.length,t)),[t,Math.max(t,Math.min(e.length,n))]}function Gt(e,t,n=!0,r=!0){return HA(e,t,n,r)}function sB(e){return e>=56320&&e<57344}function aB(e){return e>=55296&&e<56320}function Pi(e,t){let n=e.charCodeAt(t);if(!aB(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);if(!sB(r))return n;return(n-55296<<10)+(r-56320)+65536}function iQ(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}function Ls(e){return e<65536?1:2}var Jv=/\r\n?|\n/,cn=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(cn||(cn={}));class eo{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t+1];e+=n<0?this.sections[t]:n}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,n=0,r=0;t<this.sections.length;){let o=this.sections[t++],i=this.sections[t++];if(i<0)e(n,r,o),r+=o;else r+=i;n+=o}}iterChangedRanges(e,t=!1){e1(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];if(r<0)e.push(n,r);else e.push(r,n)}return new eo(e)}composeDesc(e){return this.empty?e:e.empty?this:sQ(this,e)}mapDesc(e,t=!1){return e.empty?this:t1(this,e,t)}mapPos(e,t=-1,n=cn.Simple){let r=0,o=0;for(let i=0;i<this.sections.length;){let s=this.sections[i++],a=this.sections[i++],l=r+s;if(a<0){if(l>e)return o+(e-r);o+=s}else{if(n!=cn.Simple&&l>=e&&(n==cn.TrackDel&&r<e&&l>e||n==cn.TrackBefore&&r<e||n==cn.TrackAfter&&l>e))return null;if(l>e||l==e&&t<0&&!s)return e==r||t<0?o:o+a;o+=a}r=l}if(e>r)throw RangeError(`Position ${e} is out of range for changeset of length ${r}`);return o}touchesRange(e,t=e){for(let n=0,r=0;n<this.sections.length&&r<=t;){let o=this.sections[n++],i=this.sections[n++],s=r+o;if(i>=0&&r<=t&&s>=e)return r<e&&s>t?"cover":!0;r=s}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let n=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+n+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some((t)=>typeof t!="number"))throw RangeError("Invalid JSON representation of ChangeDesc");return new eo(e)}static create(e){return new eo(e)}}class Et extends eo{constructor(e,t){super(e);this.inserted=t}apply(e){if(this.length!=e.length)throw RangeError("Applying change set to a document with the wrong length");return e1(this,(t,n,r,o,i)=>e=e.replace(r,r+(n-t),i),!1),e}mapDesc(e,t=!1){return t1(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,o=0;r<t.length;r+=2){let i=t[r],s=t[r+1];if(s>=0){t[r]=s,t[r+1]=i;let a=r>>1;while(n.length<a)n.push(De.empty);n.push(i?e.slice(o,o+i):De.empty)}o+=i}return new Et(t,n)}compose(e){return this.empty?e:e.empty?this:sQ(this,e,!0)}map(e,t=!1){return e.empty?this:t1(this,e,t,!0)}iterChanges(e,t=!1){e1(this,e,t)}get desc(){return eo.create(this.sections)}filter(e){let t=[],n=[],r=[],o=new nu(this);e:for(let i=0,s=0;;){let a=i==e.length?1e9:e[i++];while(s<a||s==a&&o.len==0){if(o.done)break e;let c=Math.min(o.len,a-s);xn(r,c,-1);let u=o.ins==-1?-1:o.off==0?o.ins:0;if(xn(t,c,u),u>0)_s(n,t,o.text);o.forward(c),s+=c}let l=e[i++];while(s<l){if(o.done)break e;let c=Math.min(o.len,l-s);xn(t,c,-1),xn(r,c,o.ins==-1?-1:o.off==0?o.ins:0),o.forward(c),s+=c}}return{changes:new Et(t,n),filtered:eo.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let n=this.sections[t],r=this.sections[t+1];if(r<0)e.push(n);else if(r==0)e.push([n]);else e.push([n].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,n){let r=[],o=[],i=0,s=null;function a(c=!1){if(!c&&!r.length)return;if(i<t)xn(r,t-i,-1);let u=new Et(r,o);s=s?s.compose(u.map(s)):u,r=[],o=[],i=0}function l(c){if(Array.isArray(c))for(let u of c)l(u);else if(c instanceof Et){if(c.length!=t)throw RangeError(`Mismatched change set length (got ${c.length}, expected ${t})`);a(),s=s?s.compose(c.map(s)):c}else{let{from:u,to:f=u,insert:d}=c;if(u>f||u<0||f>t)throw RangeError(`Invalid change range ${u} to ${f} (in doc of length ${t})`);let h=!d?De.empty:typeof d=="string"?De.of(d.split(n||Jv)):d,m=h.length;if(u==f&&m==0)return;if(u<i)a();if(u>i)xn(r,u-i,-1);xn(r,f-u,m),_s(o,r,h),i=f}}return l(e),a(!s),s}static empty(e){return new Et(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;r<e.length;r++){let o=e[r];if(typeof o=="number")t.push(o,-1);else if(!Array.isArray(o)||typeof o[0]!="number"||o.some((i,s)=>s&&typeof i!="string"))throw RangeError("Invalid JSON representation of ChangeSet");else if(o.length==1)t.push(o[0],0);else{while(n.length<r)n.push(De.empty);n[r]=De.of(o.slice(1)),t.push(o[0],n[r].length)}}return new Et(t,n)}static createSet(e,t){return new Et(e,t)}}function xn(e,t,n,r=!1){if(t==0&&n<=0)return;let o=e.length-2;if(o>=0&&n<=0&&n==e[o+1])e[o]+=t;else if(o>=0&&t==0&&e[o]==0)e[o+1]+=n;else if(r)e[o]+=t,e[o+1]+=n;else e.push(t,n)}function _s(e,t,n){if(n.length==0)return;let r=t.length-2>>1;if(r<e.length)e[e.length-1]=e[e.length-1].append(n);else{while(e.length<r)e.push(De.empty);e.push(n)}}function e1(e,t,n){let r=e.inserted;for(let o=0,i=0,s=0;s<e.sections.length;){let a=e.sections[s++],l=e.sections[s++];if(l<0)o+=a,i+=a;else{let c=o,u=i,f=De.empty;for(;;){if(c+=a,u+=l,l&&r)f=f.append(r[s-2>>1]);if(n||s==e.sections.length||e.sections[s+1]<0)break;a=e.sections[s++],l=e.sections[s++]}t(o,c,i,u,f),o=c,i=u}}}function t1(e,t,n,r=!1){let o=[],i=r?[]:null,s=new nu(e),a=new nu(t);for(let l=-1;;)if(s.done&&a.len||a.done&&s.len)throw Error("Mismatched change set lengths");else if(s.ins==-1&&a.ins==-1){let c=Math.min(s.len,a.len);xn(o,c,-1),s.forward(c),a.forward(c)}else if(a.ins>=0&&(s.ins<0||l==s.i||s.off==0&&(a.len<s.len||a.len==s.len&&!n))){let c=a.len;xn(o,a.ins,-1);while(c){let u=Math.min(s.len,c);if(s.ins>=0&&l<s.i&&s.len<=u){if(xn(o,0,s.ins),i)_s(i,o,s.text);l=s.i}s.forward(u),c-=u}a.next()}else if(s.ins>=0){let c=0,u=s.len;while(u)if(a.ins==-1){let f=Math.min(u,a.len);c+=f,u-=f,a.forward(f)}else if(a.ins==0&&a.len<u)u-=a.len,a.next();else break;if(xn(o,c,l<s.i?s.ins:0),i&&l<s.i)_s(i,o,s.text);l=s.i,s.forward(s.len-u)}else if(s.done&&a.done)return i?Et.createSet(o,i):eo.create(o);else throw Error("Mismatched change set lengths")}function sQ(e,t,n=!1){let r=[],o=n?[]:null,i=new nu(e),s=new nu(t);for(let a=!1;;)if(i.done&&s.done)return o?Et.createSet(r,o):eo.create(r);else if(i.ins==0)xn(r,i.len,0,a),i.next();else if(s.len==0&&!s.done){if(xn(r,0,s.ins,a),o)_s(o,r,s.text);s.next()}else if(i.done||s.done)throw Error("Mismatched change set lengths");else{let l=Math.min(i.len2,s.len),c=r.length;if(i.ins==-1){let u=s.ins==-1?-1:s.off?0:s.ins;if(xn(r,l,u,a),o&&u)_s(o,r,s.text)}else if(s.ins==-1){if(xn(r,i.off?0:i.len,l,a),o)_s(o,r,i.textBit(l))}else if(xn(r,i.off?0:i.len,s.off?0:s.ins,a),o&&!s.off)_s(o,r,s.text);a=(i.ins>l||s.ins>=0&&s.len>l)&&(a||r.length>c),i.forward2(l),s.forward(l)}}class nu{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;if(this.i<e.length)this.len=e[this.i++],this.ins=e[this.i++];else this.len=0,this.ins=-2;this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?De.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?De.empty:t[n].slice(this.off,e==null?void 0:this.off+e)}forward(e){if(e==this.len)this.next();else this.len-=e,this.off+=e}forward2(e){if(this.ins==-1)this.forward(e);else if(e==this.ins)this.next();else this.ins-=e,this.off+=e}}class Ds{constructor(e,t,n,r){this.from=e,this.to=t,this.flags=n,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(e,t=-1){let n,r;if(this.empty)n=r=e.mapPos(this.from,t);else n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1);return n==this.from&&r==this.to?this:new Ds(n,r,this.flags,this.goalColumn)}extend(e,t=e,n=0){if(e<=this.anchor&&t>=this.anchor)return j.range(e,t,void 0,void 0,n);let r=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return j.range(this.anchor,r,void 0,void 0,n)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw RangeError("Invalid JSON representation for SelectionRange");return j.range(e.anchor,e.head)}static create(e,t,n,r){return new Ds(e,t,n,r)}}class j{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){if(e.empty)return this;return j.create(this.ranges.map((n)=>n.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let n=0;n<this.ranges.length;n++)if(!this.ranges[n].eq(e.ranges[n],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new j([this.main],0)}addRange(e,t=!0){return j.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let n=this.ranges.slice();return n[t]=e,j.create(n,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((e)=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw RangeError("Invalid JSON representation for EditorSelection");return new j(e.ranges.map((t)=>Ds.fromJSON(t)),e.main)}static single(e,t=e){return new j([j.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw RangeError("A selection needs at least one range");for(let n=0,r=0;r<e.length;r++){let o=e[r];if(o.empty?o.from<=n:o.from<n)return j.normalized(e.slice(),t);n=o.to}return new j(e,t)}static cursor(e,t=0,n,r){return Ds.create(e,e,(t==0?0:t<0?8:16)|(n==null?7:Math.min(6,n)),r)}static range(e,t,n,r,o){let i=r==null?7:Math.min(6,r);if(!o&&e!=t)o=t<e?1:-1;if(o)i|=o<0?8:16;return t<e?Ds.create(t,e,i|32,n):Ds.create(e,t,i,n)}static undirectionalRange(e,t){return Ds.create(e,t,64,void 0)}static normalized(e,t=0){let n=e[t];e.sort((r,o)=>r.from-o.from),t=e.indexOf(n);for(let r=1;r<e.length;r++){let o=e[r],i=e[r-1];if(o.empty?o.from<=i.to:o.from<i.to){let s=i.from,a=Math.max(o.to,i.to);if(r<=t)t--;e.splice(--r,2,o.anchor>o.head?j.range(a,s):j.range(s,a))}}return new j(e,t)}}function aQ(e,t){for(let n of e.ranges)if(n.to>t)throw RangeError("Selection points outside of document")}var u1=0;class he{constructor(e,t,n,r,o){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=u1++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new he(e.combine||((t)=>t),e.compareInput||((t,n)=>t===n),e.compare||(!e.combine?f1:(t,n)=>t===n),!!e.static,e.enables)}of(e){return new bd([],this,0,e)}compute(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new bd(e,this,1,t)}computeN(e,t){if(this.isStatic)throw Error("Can't compute a static facet");return new bd(e,this,2,t)}from(e,t){if(!t)t=(n)=>n;return this.compute([e],(n)=>t(n.field(e)))}}function f1(e,t){return e==t||e.length==t.length&&e.every((n,r)=>n===t[r])}class bd{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=u1++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,o=this.id,i=e[o]>>1,s=this.type==2,a=!1,l=!1,c=[];for(let u of this.dependencies)if(u=="doc")a=!0;else if(u=="selection")l=!0;else if((((t=e[u.id])!==null&&t!==void 0?t:1)&1)==0)c.push(e[u.id]);return{create(u){return u.values[i]=n(u),1},update(u,f){if(a&&f.docChanged||l&&(f.docChanged||f.selection)||n1(u,c)){let d=n(u);if(s?!eQ(d,u.values[i],r):!r(d,u.values[i]))return u.values[i]=d,1}return 0},reconfigure:(u,f)=>{let d,h=f.config.address[o];if(h!=null){let m=ng(f,h);if(this.dependencies.every((g)=>g instanceof he?f.facet(g)===u.facet(g):g instanceof un?f.field(g,!1)==u.field(g,!1):!0)||(s?eQ(d=n(u),m,r):r(d=n(u),m)))return u.values[i]=m,0}else d=n(u);return u.values[i]=d,1}}}get extension(){return this}}function eQ(e,t,n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function n1(e,t){let n=!1;for(let r of t)if(yd(e,r)&1)n=!0;return n}function lB(e,t,n){let r=n.map((l)=>e[l.id]),o=n.map((l)=>l.type),i=r.filter((l)=>!(l&1)),s=e[t.id]>>1;function a(l){let c=[];for(let u=0;u<r.length;u++){let f=ng(l,r[u]);if(o[u]==2)for(let d of f)c.push(d);else c.push(f)}return t.combine(c)}return{create(l){for(let c of r)yd(l,c);return l.values[s]=a(l),1},update(l,c){if(!n1(l,i))return 0;let u=a(l);if(t.compare(u,l.values[s]))return 0;return l.values[s]=u,1},reconfigure(l,c){let u=n1(l,r),f=c.config.facets[t.id],d=c.facet(t);if(f&&!u&&f1(n,f))return l.values[s]=d,0;let h=a(l);if(t.compare(h,d))return l.values[s]=d,0;return l.values[s]=h,1}}}var Wm=he.define({static:!0});class un{constructor(e,t,n,r,o){this.id=e,this.createF=t,this.updateF=n,this.compareF=r,this.spec=o,this.provides=void 0}static define(e){let t=new un(u1++,e.create,e.update,e.compare||((n,r)=>n===r),e);if(e.provide)t.provides=e.provide(t);return t}create(e){let t=e.facet(Wm).find((n)=>n.field==this);return((t===null||t===void 0?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:(n)=>(n.values[t]=this.create(n),1),update:(n,r)=>{let o=n.values[t],i=this.updateF(o,r);if(this.compareF(o,i))return 0;return n.values[t]=i,1},reconfigure:(n,r)=>{let o=n.facet(Wm),i=r.facet(Wm),s;if((s=o.find((a)=>a.field==this))&&s!=i.find((a)=>a.field==this))return n.values[t]=s.create(n),1;if(r.config.address[this.id]!=null)return n.values[t]=r.field(this),0;return n.values[t]=this.create(n),1}}}init(e){return[this,Wm.of({field:this,create:e})]}get extension(){return this}}var qa={lowest:4,low:3,default:2,high:1,highest:0};function Od(e){return(t)=>new d1(t,e)}var _r={highest:Od(qa.highest),high:Od(qa.high),default:Od(qa.default),low:Od(qa.low),lowest:Od(qa.lowest)};class d1{constructor(e,t){this.inner=e,this.prec=t}get extension(){return this}}class rg{of(e){return new eg(this,e)}reconfigure(e){return rg.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class eg{constructor(e,t){this.compartment=e,this.inner=t}get extension(){return this}}class tg{constructor(e,t,n,r,o,i){this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=o,this.facets=i,this.statusTemplate=[];while(this.statusTemplate.length<n.length)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,n){let r=[],o=Object.create(null),i=new Map;for(let f of cB(e,t,i))if(f instanceof un)r.push(f);else(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let s=Object.create(null),a=[],l=[];for(let f of r)s[f.id]=l.length<<1,l.push((d)=>f.slot(d));let c=n===null||n===void 0?void 0:n.config.facets;for(let f in o){let d=o[f],h=d[0].facet,m=c&&c[f]||[];if(d.every((g)=>g.type==0))if(s[h.id]=a.length<<1|1,f1(m,d))a.push(n.facet(h));else{let g=h.combine(d.map((b)=>b.value));a.push(n&&h.compare(g,n.facet(h))?n.facet(h):g)}else{for(let g of d)if(g.type==0)s[g.id]=a.length<<1|1,a.push(g.value);else s[g.id]=l.length<<1,l.push((b)=>g.dynamicSlot(b));s[h.id]=l.length<<1,l.push((g)=>lB(g,h,d))}}let u=l.map((f)=>f(s));return new tg(e,i,u,s,a,o)}}function cB(e,t,n){let r=[[],[],[],[],[]],o=new Map;function i(s,a){let l=o.get(s);if(l!=null){if(l<=a)return;let c=r[l].indexOf(s);if(c>-1)r[l].splice(c,1);if(s instanceof eg)n.delete(s.compartment)}if(o.set(s,a),Array.isArray(s))for(let c of s)i(c,a);else if(s instanceof eg){if(n.has(s.compartment))throw RangeError("Duplicate use of compartment in extensions");let c=t.get(s.compartment)||s.inner;n.set(s.compartment,c),i(c,a)}else if(s instanceof d1)i(s.inner,s.prec);else if(s instanceof un){if(r[a].push(s),s.provides)i(s.provides,a)}else if(s instanceof bd){if(r[a].push(s),s.facet.extensions)i(s.facet.extensions,qa.default)}else{let c=s.extension;if(!c)throw Error(`Unrecognized extension value in extension set (${s}).`);if(c==s)throw Error(`Unrecognized extension value in extension set (${s}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);i(c,a)}}return i(e,qa.default),r.reduce((s,a)=>s.concat(a))}function yd(e,t){if(t&1)return 2;let n=t>>1,r=e.status[n];if(r==4)throw Error("Cyclic dependency between fields and/or facets");if(r&2)return r;e.status[n]=4;let o=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|o}function ng(e,t){return t&1?e.config.staticValues[t>>1]:e.values[t>>1]}var lQ=he.define(),r1=he.define({combine:(e)=>e.some((t)=>t),static:!0}),cQ=he.define({combine:(e)=>e.length?e[0]:void 0,static:!0}),uQ=he.define(),fQ=he.define(),dQ=he.define(),hQ=he.define({combine:(e)=>e.length?e[0]:!1});class fr{constructor(e,t){this.type=e,this.value=t}static define(){return new pQ}}class pQ{of(e){return new fr(this,e)}}class mQ{constructor(e){this.map=e}of(e){return new ze(this,e)}}class ze{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new ze(this.type,t)}is(e){return this.type==e}static define(e={}){return new mQ(e.map||((t)=>t))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let o=r.map(t);if(o)n.push(o)}return n}}ze.reconfigure=ze.define();ze.appendConfig=ze.define();class yt{constructor(e,t,n,r,o,i){if(this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=o,this.scrollIntoView=i,this._doc=null,this._state=null,n)aQ(n,t.newLength);if(!o.some((s)=>s.type==yt.time))this.annotations=o.concat(yt.time.of(Date.now()))}static create(e,t,n,r,o,i){return new yt(e,t,n,r,o,i)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){if(!this._state)this.startState.applyTransaction(this);return this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value;return}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(yt.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}yt.time=fr.define();yt.userEvent=fr.define();yt.addToHistory=fr.define();yt.remote=fr.define();function uB(e,t){let n=[];for(let r=0,o=0;;){let i,s;if(r<e.length&&(o==t.length||t[o]>=e[r]))i=e[r++],s=e[r++];else if(o<t.length)i=t[o++],s=t[o++];else return n;if(!n.length||n[n.length-1]<i)n.push(i,s);else if(n[n.length-1]<s)n[n.length-1]=s}}function gQ(e,t,n){var r;let o,i,s;if(n)o=t.changes,i=Et.empty(t.changes.length),s=e.changes.compose(t.changes);else o=t.changes.map(e.changes),i=e.changes.mapDesc(t.changes,!0),s=e.changes.compose(o);return{changes:s,selection:t.selection?t.selection.map(i):(r=e.selection)===null||r===void 0?void 0:r.map(o),effects:ze.mapEffects(e.effects,o).concat(ze.mapEffects(t.effects,i)),annotations:e.annotations.length?e.annotations.concat(t.annotations):t.annotations,scrollIntoView:e.scrollIntoView||t.scrollIntoView}}function o1(e,t,n){let r=t.selection,o=eu(t.annotations);if(t.userEvent)o=o.concat(yt.userEvent.of(t.userEvent));return{changes:t.changes instanceof Et?t.changes:Et.of(t.changes||[],n,e.facet(cQ)),selection:r&&(r instanceof j?r:j.single(r.anchor,r.head)),effects:eu(t.effects),annotations:o,scrollIntoView:!!t.scrollIntoView}}function OQ(e,t,n){let r=o1(e,t.length?t[0]:{},e.doc.length);if(t.length&&t[0].filter===!1)n=!1;for(let i=1;i<t.length;i++){if(t[i].filter===!1)n=!1;let s=!!t[i].sequential;r=gQ(r,o1(e,t[i],s?r.changes.newLength:e.doc.length),s)}let o=yt.create(e,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return dB(n?fB(o):o)}function fB(e){let t=e.startState,n=!0;for(let o of t.facet(uQ)){let i=o(e);if(i===!1){n=!1;break}if(Array.isArray(i))n=n===!0?i:uB(n,i)}if(n!==!0){let o,i;if(n===!1)i=e.changes.invertedDesc,o=Et.empty(t.doc.length);else{let s=e.changes.filter(n);o=s.changes,i=s.filtered.mapDesc(s.changes).invertedDesc}e=yt.create(t,o,e.selection&&e.selection.map(i),ze.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(fQ);for(let o=r.length-1;o>=0;o--){let i=r[o](e);if(i instanceof yt)e=i;else if(Array.isArray(i)&&i.length==1&&i[0]instanceof yt)e=i[0];else e=OQ(t,eu(i),!1)}return e}function dB(e){let t=e.startState,n=t.facet(dQ),r=e;for(let o=n.length-1;o>=0;o--){let i=n[o](e);if(i&&Object.keys(i).length)r=gQ(r,o1(t,i,e.changes.newLength),!0)}return r==e?e:yt.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}var hB=[];function eu(e){return e==null?hB:Array.isArray(e)?e:[e]}var Dr=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(Dr||(Dr={})),pB=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,i1;try{i1=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function mB(e){if(i1)return i1.test(e);for(let t=0;t<e.length;t++){let n=e[t];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||pB.test(n)))return!0}return!1}function gB(e){return(t)=>{if(!/\S/.test(t))return Dr.Space;if(mB(t))return Dr.Word;for(let n=0;n<e.length;n++)if(t.indexOf(e[n])>-1)return Dr.Word;return Dr.Other}}class Le{constructor(e,t,n,r,o,i){if(this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=o,i)i._state=this;for(let s=0;s<this.config.dynamicSlots.length;s++)yd(this,s<<1);this.computeSlot=null}field(e,t=!0){let n=this.config.address[e.id];if(n==null){if(t)throw RangeError("Field is not present in this state");return}return yd(this,n),ng(this,n)}update(...e){return OQ(this,e,!0)}applyTransaction(e){let t=this.config,{base:n,compartments:r}=t;for(let s of e.effects)if(s.is(rg.reconfigure)){if(t)r=new Map,t.compartments.forEach((a,l)=>r.set(l,a)),t=null;r.set(s.value.compartment,s.value.extension)}else if(s.is(ze.reconfigure))t=null,n=s.value;else if(s.is(ze.appendConfig))t=null,n=eu(n).concat(s.value);let o;if(!t)t=tg.resolve(n,r,this),o=new Le(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(a,l)=>l.reconfigure(a,this),null).values;else o=e.startState.values.slice();let i=e.startState.facet(r1)?e.newSelection:e.newSelection.asSingle();new Le(t,e.newDoc,i,o,(s,a)=>a.update(s,e),e)}replaceSelection(e){if(typeof e=="string")e=this.toText(e);return this.changeByRange((t)=>({changes:{from:t.from,to:t.to,insert:e},range:j.cursor(t.from+e.length,-1)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),o=[n.range],i=eu(n.effects);for(let s=1;s<t.ranges.length;s++){let a=e(t.ranges[s]),l=this.changes(a.changes),c=l.map(r);for(let f=0;f<s;f++)o[f]=o[f].map(c);let u=r.mapDesc(l,!0);o.push(a.range.map(u)),r=r.compose(c),i=ze.mapEffects(i,c).concat(ze.mapEffects(eu(a.effects),u))}return{changes:r,selection:j.create(o,t.mainIndex),effects:i}}changes(e=[]){if(e instanceof Et)return e;return Et.of(e,this.doc.length,this.facet(Le.lineSeparator))}toText(e){return De.of(e.split(this.facet(Le.lineSeparator)||Jv))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];if(t==null)return e.default;return yd(this,t),ng(this,t)}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let n in e){let r=e[n];if(r instanceof un&&this.config.address[r.id]!=null)t[n]=r.spec.toJSON(this.field(e[n]),this)}return t}static fromJSON(e,t={},n){if(!e||typeof e.doc!="string")throw RangeError("Invalid JSON representation for EditorState");let r=[];if(n){for(let o in n)if(Object.prototype.hasOwnProperty.call(e,o)){let i=n[o],s=e[o];r.push(i.init((a)=>i.spec.fromJSON(s,a)))}}return Le.create({doc:e.doc,selection:j.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=tg.resolve(e.extensions||[],new Map),n=e.doc instanceof De?e.doc:De.of((e.doc||"").split(t.staticFacet(Le.lineSeparator)||Jv)),r=!e.selection?j.single(0):e.selection instanceof j?e.selection:j.single(e.selection.anchor,e.selection.head);if(aQ(r,n.length),!t.staticFacet(r1))r=r.asSingle();return new Le(t,n,r,t.dynamicSlots.map(()=>null),(o,i)=>i.create(o),null)}get tabSize(){return this.facet(Le.tabSize)}get lineBreak(){return this.facet(Le.lineSeparator)||`
14
+ `}get readOnly(){return this.facet(hQ)}phrase(e,...t){for(let n of this.facet(Le.phrases))if(Object.prototype.hasOwnProperty.call(n,e)){e=n[e];break}if(t.length)e=e.replace(/\$(\$|\d*)/g,(n,r)=>{if(r=="$")return"$";let o=+(r||1);return!o||o>t.length?n:t[o-1]});return e}languageDataAt(e,t,n=-1){let r=[];for(let o of this.facet(lQ))for(let i of o(this,t,n))if(Object.prototype.hasOwnProperty.call(i,e))r.push(i[e]);return r}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return gB(t.length?t[0]:"")}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),o=this.charCategorizer(e),i=e-n,s=e-n;while(i>0){let a=Gt(t,i,!1);if(o(t.slice(a,i))!=Dr.Word)break;i=a}while(s<r){let a=Gt(t,s);if(o(t.slice(s,a))!=Dr.Word)break;s=a}return i==s?null:j.range(i+n,s+n)}}Le.allowMultipleSelections=r1;Le.tabSize=he.define({combine:(e)=>e.length?e[0]:4});Le.lineSeparator=cQ;Le.readOnly=hQ;Le.phrases=he.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every((o)=>e[o]==t[o])}});Le.languageData=lQ;Le.changeFilter=uQ;Le.transactionFilter=fQ;Le.transactionExtender=dQ;rg.reconfigure=ze.define();function ru(e,t,n={}){let r={};for(let o of e)for(let i of Object.keys(o)){let s=o[i],a=r[i];if(a===void 0)r[i]=s;else if(a===s||s===void 0);else if(Object.hasOwnProperty.call(n,i))r[i]=n[i](a,s);else throw Error("Config merge conflict for field "+i)}for(let o in t)if(r[o]===void 0)r[o]=t[o];return r}class to{eq(e){return this==e}range(e,t=e){return vd.create(e,t,this)}}to.prototype.startSide=to.prototype.endSide=0;to.prototype.point=!1;to.prototype.mapMode=cn.TrackDel;function h1(e,t){return e==t||e.constructor==t.constructor&&e.eq(t)}class vd{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new vd(e,t,n)}}function s1(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class p1{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return Fc(this.to)}findIndex(e,t,n,r=0){let o=n?this.to:this.from;for(let i=r,s=o.length;;){if(i==s)return i;let a=i+s>>1,l=o[a]-e||(n?this.value[a].endSide:this.value[a].startSide)-t;if(a==i)return l>=0?i:s;if(l>=0)s=a;else i=a+1}}between(e,t,n,r){for(let o=this.findIndex(t,-1e9,!0),i=this.findIndex(n,1e9,!1,o);o<i;o++)if(r(this.from[o]+e,this.to[o]+e,this.value[o])===!1)return!1}map(e,t,n,r,o){let i=[],s=[],a=[],l=-1,c=-1;e:for(let u=0;u<this.value.length;u++){let f=this.value[u],d=this.from[u]+e,h=this.to[u]+e,m,g;if(d==h){let b=t.mapPos(d,f.startSide,f.mapMode);if(b==null)continue;if(m=g=b,f.startSide!=f.endSide){if(g=t.mapPos(d,f.endSide),g<m)continue}}else if(m=t.mapPos(d,f.startSide),g=t.mapPos(h,f.endSide),m>g||m==g&&f.startSide>0&&f.endSide<=0)continue;if((g-m||f.endSide-f.startSide)<0)continue;if(l<0)l=m;if(f.point)c=Math.max(c,g-m);if((m-n||f.startSide-r)>=0)i.push(f),s.push(m-l),a.push(g-l),n=g,r=f.endSide;else{if(m==g)for(let b=i.length;b>0;b--){if((m-(a[b-1]+l)||f.startSide-i[b-1].endSide)>=0){i.splice(b,0,f),s.splice(b,0,m-l),a.splice(b,0,g-l);continue e}if((m-(s[b-1]+l)||f.endSide-i[b-1].startSide)>0)break}o(m,g,f)}}return{mapped:i.length?new p1(s,a,i,c):null,pos:l}}}class Ve{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new Ve(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:o=this.length}=e,i=e.filter;if(t.length==0&&!i)return this;if(n)t=t.slice().sort(s1);if(this.isEmpty)return t.length?Ve.of(t):this;let s=new m1(this,null,-1).goto(0),a=0,l=[],c=new Ns;while(s.value||a<t.length)if(a<t.length&&(s.from-t[a].from||s.startSide-t[a].value.startSide)>=0){let u=t[a++];if(!c.addInner(u.from,u.to,u.value,!1))l.push(u)}else if(s.rangeIndex==1&&s.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(s.chunkIndex)<t[a].from)&&(!i||r>this.chunkEnd(s.chunkIndex)||o<this.chunkPos[s.chunkIndex])&&c.addChunk(this.chunkPos[s.chunkIndex],this.chunk[s.chunkIndex]))s.nextChunk();else{if(!i||r>s.to||o<s.from||i(s.from,s.to,s.value)){if(!c.addInner(s.from,s.to,s.value,!1))l.push(vd.create(s.from,s.to,s.value))}s.next()}return c.finishInner(this.nextLayer.isEmpty&&!l.length?Ve.empty:this.nextLayer.update({add:l,filter:i,filterFrom:r,filterTo:o}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],n=[],r=-1,o,i=(a,l,c)=>{if(!o)o=new Ns;o.addRange(a,l,c,!1)};for(let a=0;a<this.chunk.length;a++){let l=this.chunkPos[a],c=this.chunk[a],u=e.touchesRange(l,l+c.length);if(u===!1)r=Math.max(r,c.maxPoint),t.push(c),n.push(e.mapPos(l));else if(u===!0){let[f,d]=!t.length?[-1,-1]:[Fc(n)+Fc(t).length,Fc(Fc(t).value).endSide],{mapped:h,pos:m}=c.map(l,e,f,d,i);if(h)r=Math.max(r,h.maxPoint),t.push(h),n.push(m)}}let s=this.nextLayer.map(e);if(o)s=o.finishInner(s);return t.length==0?s:new Ve(n,t,s||Ve.empty,r)}between(e,t,n){if(this.isEmpty)return;for(let r=0;r<this.chunk.length;r++){let o=this.chunkPos[r],i=this.chunk[r];if(t>=o&&e<=o+i.length&&i.between(o,e-o,t-o,n)===!1)return}this.nextLayer.between(e,t,n)}iter(e=0){return xd.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return xd.from(e).goto(t)}static compare(e,t,n,r,o=-1){let i=e.filter((u)=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=o),s=t.filter((u)=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=o),a=tQ(i,s,n),l=new Kc(i,a,o),c=new Kc(s,a,o);if(n.iterGaps((u,f,d)=>nQ(l,u,c,f,d,r)),n.empty&&n.length==0)nQ(l,0,c,0,0,r)}static eq(e,t,n=0,r){if(r==null)r=999999999;let o=e.filter((c)=>!c.isEmpty&&t.indexOf(c)<0),i=t.filter((c)=>!c.isEmpty&&e.indexOf(c)<0);if(o.length!=i.length)return!1;if(!o.length)return!0;let s=tQ(o,i),a=new Kc(o,s,0).goto(n),l=new Kc(i,s,0).goto(n);for(;;){if(a.to!=l.to||!a1(a.active,l.active)||a.point&&(!l.point||!h1(a.point,l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(e,t,n,r,o=-1){let i=new Kc(e,null,o).goto(t),s=t,a=i.openStart;for(;;){let l=Math.min(i.to,n);if(i.point){let c=i.activeForPoint(i.to),u=i.pointFrom<t?c.length+1:i.point.startSide<0?c.length:Math.min(c.length,a);r.point(s,l,i.point,c,u,i.pointRank),a=Math.min(i.openEnd(l),c.length)}else if(l>s)r.span(s,l,i.active,a),a=i.openEnd(l);if(i.to>n)return a+(i.point&&i.to>n?1:0);s=i.to,i.next()}}static of(e,t=!1){let n=new Ns;for(let r of e instanceof vd?[e]:t?OB(e):e)n.add(r.from,r.to,r.value);return n.finish()}static join(e){if(!e.length)return Ve.empty;let t=Fc(e);for(let n=e.length-2;n>=0;n--)for(let r=e[n];r!=Ve.empty;r=r.nextLayer)t=new Ve(r.chunkPos,r.chunk,t,Math.max(r.maxPoint,t.maxPoint));return t}}Ve.empty=new Ve([],[],null,-1);function Fc(e){return e[e.length-1]}function OB(e){if(e.length>1)for(let t=e[0],n=1;n<e.length;n++){let r=e[n];if(s1(t,r)>0)return e.slice().sort(s1);t=r}return e}Ve.empty.nextLayer=Ve.empty;class Ns{finishChunk(e){if(this.chunks.push(new p1(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e)this.from=[],this.to=[],this.value=[]}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,n){this.addRange(e,t,n,!0)}addRange(e,t,n,r){if(!this.addInner(e,t,n,r))(this.nextLayer||(this.nextLayer=new Ns)).addRange(e,t,n,r)}addInner(e,t,n,r){let o=e-this.lastTo||n.startSide-this.last.endSide;if(r&&o<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw Error("Ranges must be added sorted by `from` position and `startSide`");if(o<0)return!1;if(this.from.length==250)this.finishChunk(!0);if(this.chunkStart<0)this.chunkStart=e;if(this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point)this.maxPoint=Math.max(this.maxPoint,t-e);return!0}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;if(this.from.length)this.finishChunk(!0);this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(Ve.empty)}finishInner(e){if(this.from.length)this.finishChunk(!1);if(this.chunks.length==0)return e;let t=Ve.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function tQ(e,t,n){let r=new Map;for(let i of e)for(let s=0;s<i.chunk.length;s++)if(i.chunk[s].maxPoint<=0)r.set(i.chunk[s],i.chunkPos[s]);let o=new Set;for(let i of t)for(let s=0;s<i.chunk.length;s++){let a=r.get(i.chunk[s]);if(a!=null&&(n?n.mapPos(a):a)==i.chunkPos[s]&&!(n===null||n===void 0?void 0:n.touchesRange(a,a+i.chunk[s].length)))o.add(i.chunk[s])}return o}class m1{constructor(e,t,n,r=0){this.layer=e,this.skip=t,this.minPoint=n,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,n){while(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,n=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);if(!n||this.rangeIndex<r)this.setRangeIndex(r)}this.next()}forward(e,t){if((this.to-e||this.endSide-t)<0)this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],n=e+t.from[this.rangeIndex];if(this.from=n,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)while(this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]))this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class xd{constructor(e){this.heap=e}static from(e,t=null,n=-1){let r=[];for(let o=0;o<e.length;o++)for(let i=e[o];!i.isEmpty;i=i.nextLayer)if(i.maxPoint>=n)r.push(new m1(i,t,n,o));return r.length==1?r[0]:new xd(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let n=this.heap.length>>1;n>=0;n--)Kv(this.heap,n);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let n=this.heap.length>>1;n>=0;n--)Kv(this.heap,n);if((this.to-e||this.value.endSide-t)<0)this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];if(this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value)e.next();Kv(this.heap,0)}}}function Kv(e,t){for(let n=e[t];;){let r=(t<<1)+1;if(r>=e.length)break;let o=e[r];if(r+1<e.length&&o.compare(e[r+1])>=0)o=e[r+1],r++;if(n.compare(o)<0)break;e[r]=n,e[t]=o,t=r}}class Kc{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=xd.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){while(this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Fm(this.active,e),Fm(this.activeTo,e),Fm(this.activeRank,e),this.minActive=rQ(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:o}=this.cursor;while(t<this.activeRank.length&&(o-this.activeRank[t]||r-this.activeTo[t])>0)t++;if(Km(this.active,t,n),Km(this.activeTo,t,r),Km(this.activeRank,t,o),e)Km(e,t,this.cursor.from);this.minActive=rQ(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let n=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}if(this.removeActive(r),n)Fm(n,r)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(n),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}}if(n){this.openStart=0;for(let r=n.length-1;r>=0&&n[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let n=this.active.length-1;n>=0;n--){if(this.activeRank[n]<this.pointRank)break;if(this.activeTo[n]>e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)t.push(this.active[n])}return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function nQ(e,t,n,r,o,i){e.goto(t),n.goto(r);let s=r+o,a=r,l=r-t,c=!!i.boundChange;for(let u=!1;;){let f=e.to+l-n.to,d=f||e.endSide-n.endSide,h=d<0?e.to+l:n.to,m=Math.min(h,s);if(e.point||n.point){if(!(e.point&&n.point&&h1(e.point,n.point)&&a1(e.activeForPoint(e.to),n.activeForPoint(n.to))))i.comparePoint(a,m,e.point,n.point);u=!1}else{if(u)i.boundChange(a),u=!1;if(m>a&&!a1(e.active,n.active))i.compareRange(a,m,e.active,n.active);if(c&&m<s&&(f||e.openEnd(h)!=n.openEnd(h)))u=!0}if(h>s)break;if(a=h,d<=0)e.next();if(d>=0)n.next()}}function a1(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n]&&!h1(e[n],t[n]))return!1;return!0}function Fm(e,t){for(let n=t,r=e.length-1;n<r;n++)e[n]=e[n+1];e.pop()}function Km(e,t,n){for(let r=e.length-1;r>=t;r--)e[r+1]=e[r];e[t]=n}function rQ(e,t){let n=-1,r=1e9;for(let o=0;o<t.length;o++)if((t[o]-r||e[o].endSide-e[n].endSide)<0)n=o,r=t[o];return n}function dr(e,t,n=e.length){let r=0;for(let o=0;o<n&&o<e.length;)if(e.charCodeAt(o)==9)r+=t-r%t,o++;else r++,o=Gt(e,o);return r}function bQ(e,t,n,r){for(let o=0,i=0;;){if(i>=t)return o;if(o==e.length)break;i+=e.charCodeAt(o)==9?n-i%n:1,o=Gt(e,o)}return r===!0?-1:e.length}var yQ=typeof Symbol>"u"?"__"+"ͼ":Symbol.for("ͼ"),g1=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),vQ=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class no{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(i){return/^@/.test(i)?[i]:i.split(/,\s*/)}function o(i,s,a,l){let c=[],u=/^@(\w+)\b/.exec(i[0]),f=u&&u[1]=="keyframes";if(u&&s==null)return a.push(i[0]+";");for(let d in s){let h=s[d];if(/&/.test(d))o(d.split(/,\s*/).map((m)=>i.map((g)=>m.replace(/&/,g))).reduce((m,g)=>m.concat(g)),h,a);else if(h&&typeof h=="object"){if(!u)throw RangeError("The value of a property ("+d+") should be a primitive value.");o(r(d),h,c,f)}else if(h!=null)c.push(d.replace(/_.*/,"").replace(/[A-Z]/g,(m)=>"-"+m.toLowerCase())+": "+h+";")}if(c.length||f)a.push((n&&!u&&!l?i.map(n):i).join(", ")+" {"+c.join(" ")+"}")}for(let i in e)o(r(i),e[i],this.rules)}getRules(){return this.rules.join(`
15
+ `)}static newName(){let e=vQ[yQ]||1;return vQ[yQ]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[g1],o=n&&n.nonce;if(!r)r=new wQ(e,o);else if(o)r.setNonce(o);r.mount(Array.isArray(t)?t:[t],e)}}var xQ=new Map;class wQ{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let o=xQ.get(n);if(o)return e[g1]=o;this.sheet=new r.CSSStyleSheet,xQ.set(n,this)}else if(this.styleTag=n.createElement("style"),t)this.styleTag.setAttribute("nonce",t);this.modules=[],e[g1]=this}mount(e,t){let n=this.sheet,r=0,o=0,i=!1;for(let s=0;s<e.length;s++){let a=e[s],l=this.modules.indexOf(a);if(l<o&&l>-1)this.modules.splice(l,1),i=!0,o--,l=-1;if(l==-1){if(this.modules.splice(o++,0,a),i=!0,n)for(let c=0;c<a.rules.length;c++)n.insertRule(a.rules[c],r++)}else{while(o<l)r+=this.modules[o++].rules.length;r+=a.rules.length,o++}}if(n){if(t.adoptedStyleSheets.indexOf(this.sheet)<0)t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]}else{if(i){let a="";for(let l=0;l<this.modules.length;l++)a+=this.modules[l].getRules()+`
16
+ `;this.styleTag.textContent=a}let s=t.head||t;if(this.styleTag.parentNode!=s)s.insertBefore(this.styleTag,s.firstChild)}}setNonce(e){if(this.styleTag&&this.styleTag.getAttribute("nonce")!=e)this.styleTag.setAttribute("nonce",e)}}var Ti={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ou={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},bB=typeof navigator<"u"&&/Mac/.test(navigator.platform),yB=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(vt=0;vt<10;vt++)Ti[48+vt]=Ti[96+vt]=String(vt);var vt;for(vt=1;vt<=24;vt++)Ti[vt+111]="F"+vt;var vt;for(vt=65;vt<=90;vt++)Ti[vt]=String.fromCharCode(vt+32),ou[vt]=String.fromCharCode(vt);var vt;for(wd in Ti)if(!ou.hasOwnProperty(wd))ou[wd]=Ti[wd];var wd;function SQ(e){var t=bB&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||yB&&e.shiftKey&&e.key&&e.key.length==1||e.key=="Unidentified",n=!t&&e.key||(e.shiftKey?ou:Ti)[e.keyCode]||e.key||"Unidentified";if(n=="Esc")n="Escape";if(n=="Del")n="Delete";if(n=="Left")n="ArrowLeft";if(n=="Up")n="ArrowUp";if(n=="Right")n="ArrowRight";if(n=="Down")n="ArrowDown";return n}var An=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},S1=typeof document<"u"?document:{documentElement:{style:{}}},k1=/Edge\/(\d+)/.exec(An.userAgent),JQ=/MSIE \d/.test(An.userAgent),C1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(An.userAgent),Cg=!!(JQ||C1||k1),kQ=!Cg&&/gecko\/(\d+)/i.test(An.userAgent),O1=!Cg&&/Chrome\/(\d+)/.exec(An.userAgent),CQ="webkitFontSmoothing"in S1.documentElement.style,R1=!Cg&&/Apple Computer/.test(An.vendor),RQ=R1&&(/Mobile\/\w+/.test(An.userAgent)||An.maxTouchPoints>2),ee={mac:RQ||/Mac/.test(An.platform),windows:/Win/.test(An.platform),linux:/Linux|X11/.test(An.platform),ie:Cg,ie_version:JQ?S1.documentMode||6:C1?+C1[1]:k1?+k1[1]:0,gecko:kQ,gecko_version:kQ?+(/Firefox\/(\d+)/.exec(An.userAgent)||[0,0])[1]:0,chrome:!!O1,chrome_version:O1?+O1[1]:0,ios:RQ,android:/Android\b/.test(An.userAgent),webkit:CQ,webkit_version:CQ?+(/\bAppleWebKit\/(\d+)/.exec(An.userAgent)||[0,0])[1]:0,safari:R1,safari_version:R1?+(/\bVersion\/(\d+(\.\d+)?)/.exec(An.userAgent)||[0,0])[1]:0,tabSize:S1.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function B1(e,t){for(let n in e)if(n=="class"&&t.class)t.class+=" "+e.class;else if(n=="style"&&t.style)t.style+=";"+e.style;else t[n]=e[n];return t}var Og=Object.create(null);function Z1(e,t,n){if(e==t)return!0;if(!e)e=Og;if(!t)t=Og;let r=Object.keys(e),o=Object.keys(t);if(r.length-(n&&r.indexOf(n)>-1?1:0)!=o.length-(n&&o.indexOf(n)>-1?1:0))return!1;for(let i of r)if(i!=n&&(o.indexOf(i)==-1||e[i]!==t[i]))return!1;return!0}function vB(e,t){for(let n=e.attributes.length-1;n>=0;n--){let r=e.attributes[n].name;if(t[r]==null)e.removeAttribute(r)}for(let n in t){let r=t[n];if(n=="style")e.style.cssText=r;else if(e.getAttribute(n)!=r)e.setAttribute(n,r)}}function PQ(e,t,n){let r=!1;if(t){for(let o in t)if(!(n&&(o in n)))if(r=!0,o=="style")e.style.cssText="";else e.removeAttribute(o)}if(n){for(let o in n)if(!(t&&t[o]==n[o]))if(r=!0,o=="style")e.style.cssText=n[o];else e.setAttribute(o,n[o])}return r}function xB(e){let t=Object.create(null);for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];t[r.name]=r.value}return t}class $n{eq(e){return!1}updateDOM(e,t,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Lr=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(Lr||(Lr={}));class we extends to{constructor(e,t,n,r){super();this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new $d(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?300000000:-400000000:t>0?1e8:-1e8,new Wa(e,t,t,n,e.widget||null,!1)}static replace(e){let t=!!e.block,n,r;if(e.isBlockGap)n=-500000000,r=400000000;else{let{start:o,end:i}=eE(e,t);n=(o?t?-300000000:-1:500000000)-1,r=(i?t?200000000:1:-600000000)+1}return new Wa(e,n,r,t,e.widget||null,!0)}static line(e){return new Dd(e)}static set(e,t=!1){return Ve.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}we.none=Ve.empty;class $d extends we{constructor(e){let{start:t,end:n}=eE(e);super(t?-1:500000000,n?1:-600000000,null,e);this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?B1(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Og}eq(e){return this==e||e instanceof $d&&this.tagName==e.tagName&&Z1(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw RangeError("Mark decorations may not be empty");return super.range(e,t)}}$d.prototype.point=!1;class Dd extends we{constructor(e){super(-200000000,-200000000,null,e)}eq(e){return e instanceof Dd&&this.spec.class==e.spec.class&&Z1(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Dd.prototype.mapMode=cn.TrackBefore;Dd.prototype.point=!0;class Wa extends we{constructor(e,t,n,r,o,i){super(t,n,o,e);this.block=r,this.isReplace=i,this.mapMode=!r?cn.TrackDel:t<=0?cn.TrackBefore:cn.TrackAfter}get type(){return this.startSide!=this.endSide?Lr.WidgetRange:this.startSide<=0?Lr.WidgetBefore:Lr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Wa&&wB(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Wa.prototype.point=!0;function eE(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;if(n==null)n=e.inclusive;if(r==null)r=e.inclusive;return{start:n!==null&&n!==void 0?n:t,end:r!==null&&r!==void 0?r:t}}function wB(e,t){return e==t||!!(e&&t&&e.compare(t))}function au(e,t,n,r=0){let o=n.length-1;if(o>=0&&n[o]+r>=e)n[o]=Math.max(n[o],t);else n.push(e,t)}class Ad extends to{constructor(e,t,n){super();this.tagName=e,this.attributes=t,this.rank=n}eq(e){return e==this||e instanceof Ad&&this.tagName==e.tagName&&Z1(this.attributes,e.attributes)}static create(e){return new Ad(e.tagName,e.attributes||Og,e.rank==null?50:Math.max(0,Math.min(e.rank,100)))}static set(e,t=!1){return Ve.of(e,t)}}Ad.prototype.startSide=Ad.prototype.endSide=-1;function Qd(e){let t;if(e.nodeType==11)t=e.getSelection?e:e.ownerDocument;else t=e;return t.getSelection()}function P1(e,t){return t?e==t||e.contains(t.nodeType!=1?t.parentNode:t):!1}function Rd(e,t){if(!t.anchorNode)return!1;try{return P1(e,t.anchorNode)}catch(n){return!1}}function dg(e){if(e.nodeType==3)return Ed(e,0,e.nodeValue.length).getClientRects();else if(e.nodeType==1)return e.getClientRects();else return[]}function Pd(e,t,n,r){return n?TQ(e,t,n,r,-1)||TQ(e,t,n,r,1):!1}function js(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t}function bg(e){return e.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}function TQ(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:Ei(e))){if(e.nodeName=="DIV")return!1;let i=e.parentNode;if(!i||i.nodeType!=1)return!1;t=js(e)+(o<0?0:1),e=i}else if(e.nodeType==1){if(e=e.childNodes[t+(o<0?-1:0)],e.nodeType==1&&e.contentEditable=="false")return!1;t=o<0?Ei(e):0}else return!1}}function Ei(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function yg(e,t){let{left:n,right:r}=e;if(n==r)return e;let o=t?n:r;return{left:o,right:o,top:e.top,bottom:e.bottom}}function SB(e){let t=e.visualViewport;if(t)return{left:0,right:t.width,top:0,bottom:t.height};return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}function tE(e,t){let n=t.width/e.offsetWidth,r=t.height/e.offsetHeight;if(n>0.995&&n<1.005||!isFinite(n)||Math.abs(t.width-e.offsetWidth)<1)n=1;if(r>0.995&&r<1.005||!isFinite(r)||Math.abs(t.height-e.offsetHeight)<1)r=1;return{scaleX:n,scaleY:r}}function kB(e,t,n,r,o,i,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e,f=!1;u&&!f;)if(u.nodeType==1){let d,h=u==l.body,m=1,g=1;if(h)d=SB(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position))f=!0;if(u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let y=u.getBoundingClientRect();({scaleX:m,scaleY:g}=tE(u,y)),d={left:y.left,right:y.left+u.clientWidth*m,top:y.top,bottom:y.top+u.clientHeight*g}}let b=0,O=0;if(o=="nearest"){if(t.top<d.top+s){if(O=t.top-(d.top+s),n>0&&t.bottom>d.bottom+O)O=t.bottom-d.bottom+s}else if(t.bottom>d.bottom-s){if(O=t.bottom-d.bottom+s,n<0&&t.top-O<d.top)O=t.top-(d.top+s)}}else{let y=t.bottom-t.top,v=d.bottom-d.top;O=(o=="center"&&y<=v?t.top+y/2-v/2:o=="start"||o=="center"&&n<0?t.top-s:t.bottom-v+s)-d.top}if(r=="nearest"){if(t.left<d.left+i){if(b=t.left-(d.left+i),n>0&&t.right>d.right+b)b=t.right-d.right+i}else if(t.right>d.right-i){if(b=t.right-d.right+i,n<0&&t.left<d.left+b)b=t.left-(d.left+i)}}else b=(r=="center"?t.left+(t.right-t.left)/2-(d.right-d.left)/2:r=="start"==a?t.left-i:t.right-(d.right-d.left)+i)-d.left;if(b||O)if(h)c.scrollBy(b,O);else{let y=0,v=0;if(O){let x=u.scrollTop;u.scrollTop+=O/g,v=(u.scrollTop-x)*g}if(b){let x=u.scrollLeft;u.scrollLeft+=b/m,y=(u.scrollLeft-x)*m}if(t={left:t.left-y,top:t.top-v,right:t.right-y,bottom:t.bottom-v},y&&Math.abs(y-b)<1)r="nearest";if(v&&Math.abs(v-O)<1)o="nearest"}if(h)break;if(t.top<d.top||t.bottom>d.bottom||t.left<d.left||t.right>d.right)t={left:Math.max(t.left,d.left),right:Math.min(t.right,d.right),top:Math.max(t.top,d.top),bottom:Math.min(t.bottom,d.bottom)};u=u.assignedSlot||u.parentNode}else if(u.nodeType==11)u=u.host;else break}function nE(e,t=!0){let n=e.ownerDocument,r=null,o=null;for(let i=e.parentNode;i;)if(i==n.body||(!t||r)&&o)break;else if(i.nodeType==1){if(!o&&i.scrollHeight>i.clientHeight)o=i;if(t&&!r&&i.scrollWidth>i.clientWidth)r=i;i=i.assignedSlot||i.parentNode}else if(i.nodeType==11)i=i.host;else break;return{x:r,y:o}}class rE{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:n}=e;this.set(t,Math.min(e.anchorOffset,t?Ei(t):0),n,Math.min(e.focusOffset,n?Ei(n):0))}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}function oE(e){let t=[];for(let n=e;n;n=n.nodeType==11?n.host:n.parentNode)if(n.nodeType==1)t.push({node:n,left:n.scrollLeft,top:n.scrollTop});return t}function iE(e,t=!0){for(let{node:n,left:r,top:o}of e){if(t&&n.scrollTop!=o)n.scrollTop=o;if(n.scrollLeft!=r)n.scrollLeft=r}}var Ga=null;if(ee.safari&&ee.safari_version>=26)Ga=!1;function sE(e){if(e.setActive)return e.setActive();if(Ga)return e.focus(Ga);let t=oE(e);if(e.focus(Ga==null?{get preventScroll(){return Ga={preventScroll:!0},!0}}:void 0),!Ga)Ga=!1,iE(t)}var AQ;function Ed(e,t,n=t){let r=AQ||(AQ=document.createRange());return r.setEnd(e,n),r.setStart(e,t),r}function lu(e,t,n,r){let o={key:t,code:t,keyCode:n,which:n,cancelable:!0};if(r)({altKey:o.altKey,ctrlKey:o.ctrlKey,shiftKey:o.shiftKey,metaKey:o.metaKey}=r);let i=new KeyboardEvent("keydown",o);i.synthetic=!0,e.dispatchEvent(i);let s=new KeyboardEvent("keyup",o);return s.synthetic=!0,e.dispatchEvent(s),i.defaultPrevented||s.defaultPrevented}function CB(e){while(e){if(e&&(e.nodeType==9||e.nodeType==11&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}function RB(e,t){let{focusNode:n,focusOffset:r}=t;if(!n||t.anchorNode!=n||t.anchorOffset!=r)return!1;r=Math.min(r,Ei(n));for(;;)if(r){if(n.nodeType!=1)return!1;let o=n.childNodes[r-1];if(o.contentEditable=="false")r--;else n=o,r=Ei(n)}else if(n==e)return!0;else r=js(n),n=n.parentNode}function aE(e){if(e instanceof Window)return e.pageYOffset>Math.max(0,e.document.documentElement.scrollHeight-e.innerHeight-4);return e.scrollTop>Math.max(1,e.scrollHeight-e.clientHeight-4)}function lE(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r>0)return{node:n,offset:r};else if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=Ei(n)}else if(n.parentNode&&!bg(n))r=js(n),n=n.parentNode;else return null}function cE(e,t){for(let n=e,r=t;;)if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};else if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!bg(n))r=js(n)+1,n=n.parentNode;else return null}class io{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new io(e.parentNode,js(e),t)}static after(e,t){return new io(e.parentNode,js(e)+1,t)}}var pt=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(pt||(pt={})),Fa=pt.LTR,U1=pt.RTL;function uE(e){let t=[];for(let n=0;n<e.length;n++)t.push(1<<+e[n]);return t}var PB=uE("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),TB=uE("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),T1=Object.create(null),jo=[];for(let e of["()","[]","{}"]){let t=e.charCodeAt(0),n=e.charCodeAt(1);T1[t]=n,T1[n]=-t}function fE(e){return e<=247?PB[e]:1424<=e&&e<=1524?2:1536<=e&&e<=1785?TB[e-1536]:1774<=e&&e<=2220?4:8192<=e&&e<=8204?256:64336<=e&&e<=65023?4:1}var AB=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class so{get dir(){return this.level%2?U1:Fa}constructor(e,t,n){this.from=e,this.to=t,this.level=n}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,n,r){let o=-1;for(let i=0;i<e.length;i++){let s=e[i];if(s.from<=t&&s.to>=t){if(s.level==n)return i;if(o<0||(r!=0?r<0?s.from<t:s.to>t:e[o].level>s.level))o=i}}if(o<0)throw RangeError("Index out of range");return o}}function dE(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],o=t[n];if(r.from!=o.from||r.to!=o.to||r.direction!=o.direction||!dE(r.inner,o.inner))return!1}return!0}var it=[];function QB(e,t,n,r,o){for(let i=0;i<=r.length;i++){let s=i?r[i-1].to:t,a=i<r.length?r[i].from:n,l=i?256:o;for(let c=s,u=l,f=l;c<a;c++){let d=fE(e.charCodeAt(c));if(d==512)d=u;else if(d==8&&f==4)d=16;if(it[c]=d==4?2:d,d&7)f=d;u=d}for(let c=s,u=l,f=l;c<a;c++){let d=it[c];if(d==128)if(c<a-1&&u==it[c+1]&&u&24)d=it[c]=u;else it[c]=256;else if(d==64){let h=c+1;while(h<a&&it[h]==64)h++;let m=c&&u==8||h<n&&it[h]==8?f==1?1:8:256;for(let g=c;g<h;g++)it[g]=m;c=h-1}else if(d==8&&f==1)it[c]=1;if(u=d,d&7)f=d}}}function EB(e,t,n,r,o){let i=o==1?2:1;for(let s=0,a=0,l=0;s<=r.length;s++){let c=s?r[s-1].to:t,u=s<r.length?r[s].from:n;for(let f=c,d,h,m;f<u;f++)if(h=T1[d=e.charCodeAt(f)])if(h<0){for(let g=a-3;g>=0;g-=3)if(jo[g+1]==-h){let b=jo[g+2],O=b&2?o:!(b&4)?0:b&1?i:o;if(O)it[f]=it[jo[g]]=O;a=g;break}}else if(jo.length==189)break;else jo[a++]=f,jo[a++]=d,jo[a++]=l;else if((m=it[f])==2||m==1){let g=m==o;l=g?0:1;for(let b=a-3;b>=0;b-=3){let O=jo[b+2];if(O&2)break;if(g)jo[b+2]|=2;else{if(O&4)break;jo[b+2]|=4}}}}}function MB(e,t,n,r){for(let o=0,i=r;o<=n.length;o++){let s=o?n[o-1].to:e,a=o<n.length?n[o].from:t;for(let l=s;l<a;){let c=it[l];if(c==256){let u=l+1;for(;;)if(u==a){if(o==n.length)break;u=n[o++].to,a=o<n.length?n[o].from:t}else if(it[u]==256)u++;else break;let f=i==1,d=(u<t?it[u]:r)==1,h=f==d?f?1:2:r;for(let m=u,g=o,b=g?n[g-1].to:e;m>l;){if(m==b)m=n[--g].from,b=g?n[g-1].to:e;it[--m]=h}l=u}else i=c,l++}}}function A1(e,t,n,r,o,i,s){let a=r%2?2:1;if(r%2==o%2)for(let l=t,c=0;l<n;){let u=!0,f=!1;if(c==i.length||l<i[c].from){let g=it[l];if(g!=a)u=!1,f=g==16}let d=!u&&a==1?[]:null,h=u?r:r+1,m=l;e:for(;;)if(c<i.length&&m==i[c].from){if(f)break e;let g=i[c];if(!u)for(let b=g.to,O=c+1;;){if(b==n)break e;if(O<i.length&&i[O].from==b)b=i[O++].to;else if(it[b]==a)break e;else break}if(c++,d)d.push(g);else{if(g.from>l)s.push(new so(l,g.from,h));let b=g.direction==Fa!=!(h%2);Q1(e,b?r+1:r,o,g.inner,g.from,g.to,s),l=g.to}m=g.to}else if(m==n||(u?it[m]!=a:it[m]==a))break;else m++;if(d)A1(e,l,m,r+1,o,d,s);else if(l<m)s.push(new so(l,m,h));l=m}else for(let l=n,c=i.length;l>t;){let u=!0,f=!1;if(!c||l>i[c-1].to){let g=it[l-1];if(g!=a)u=!1,f=g==16}let d=!u&&a==1?[]:null,h=u?r:r+1,m=l;e:for(;;)if(c&&m==i[c-1].to){if(f)break e;let g=i[--c];if(!u)for(let b=g.from,O=c;;){if(b==t)break e;if(O&&i[O-1].to==b)b=i[--O].from;else if(it[b-1]==a)break e;else break}if(d)d.push(g);else{if(g.to<l)s.push(new so(g.to,l,h));let b=g.direction==Fa!=!(h%2);Q1(e,b?r+1:r,o,g.inner,g.from,g.to,s),l=g.from}m=g.from}else if(m==t||(u?it[m-1]!=a:it[m-1]==a))break;else m--;if(d)A1(e,m,l,r+1,o,d,s);else if(m<l)s.push(new so(m,l,h));l=m}}function Q1(e,t,n,r,o,i,s){let a=t%2?2:1;QB(e,o,i,r,a),EB(e,o,i,r,a),MB(o,i,r,a),A1(e,o,i,t,n,r,s)}function $B(e,t,n){if(!e)return[new so(0,0,t==U1?1:0)];if(t==Fa&&!n.length&&!AB.test(e))return hE(e.length);if(n.length)while(e.length>it.length)it[it.length]=256;let r=[],o=t==Fa?0:1;return Q1(e,o,o,n,0,e.length,r),r}function hE(e){return[new so(0,e,0)]}var pE="";function DB(e,t,n,r,o){var i;if(!e.length)return null;let s=r.head-e.from,a;if(r.head==e.from&&r.assoc<0){if(!o)return null;s=t[a=0].side(!1,n)}else if(r.head==e.to&&r.assoc>0){if(o)return null;s=t[a=t.length-1].side(!0,n)}else a=so.find(t,s,(i=r.bidiLevel)!==null&&i!==void 0?i:-1,r.assoc);let l=t[a],c=l.side(o,n);if(s==c){let d=a+=o?1:-1;if(d<0||d>=t.length)return null;l=t[a=d],s=l.side(!o,n),c=l.side(o,n)}let u=Gt(e.text,s,l.forward(o,n));if(u<l.from||u>l.to)u=c;pE=e.text.slice(Math.min(s,u),Math.max(s,u));let f=a==(o?t.length-1:0)?null:t[a+(o?1:-1)];if(u==c){if(!f)return o?j.cursor(e.to,1):j.cursor(e.from,-1);if(f.level+(o?0:1)<l.level)return j.cursor(f.side(!o,n)+e.from,f.forward(o,n)?1:-1,f.level)}return j.cursor(u+e.from,l.forward(o,n)?-1:1,l.level)}function _B(e,t,n){for(let r=t;r<n;r++){let o=fE(e.charCodeAt(r));if(o==1)return Fa;if(o==2||o==4)return U1}return Fa}var mE=he.define(),gE=he.define(),OE=he.define(),bE=he.define(),E1=he.define(),yE=he.define(),vE=he.define(),Y1=he.define(),V1=he.define(),xE=he.define({combine:(e)=>e.some((t)=>t)}),NB=he.define({combine:(e)=>e.some((t)=>t)}),wE=he.define();class cu{constructor(e,t,n,r,o,i=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=o,this.isSnapshot=i}map(e){return e.empty?this:new cu(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new cu(j.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}var og=ze.define({map:(e,t)=>e.map(t)}),SE=ze.define();function Qn(e,t,n){let r=e.facet(bE);if(r.length)r[0](t);else if(window.onerror&&window.onerror(String(t),n,void 0,void 0,t));else if(n)console.error(n+":",t);else console.error(t)}var Ai=he.define({combine:(e)=>e.length?e[0]:!0}),LB=0,su=he.define({combine(e){return e.filter((t,n)=>{for(let r=0;r<n;r++)if(e[r].plugin==t.plugin)return!1;return!0})}});class pr{constructor(e,t,n,r,o){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.baseExtensions=o(this),this.extension=this.baseExtensions.concat(su.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(su.of({plugin:this,arg:e}))}static define(e,t){let{eventHandlers:n,eventObservers:r,provide:o,decorations:i}=t||{};return new pr(LB++,e,n,r,(s)=>{let a=[];if(i)a.push(Rg.of((l)=>{let c=l.plugin(s);return c?i(c):we.none}));if(o)a.push(o(s));return a})}static fromClass(e,t){return pr.define((n,r)=>new e(n,r),t)}}class hg{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(!this.value){if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){Qn(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}}else if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(n){if(Qn(t.state,n,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(r){}this.deactivate()}}return this}destroy(e){var t;if((t=this.value)===null||t===void 0?void 0:t.destroy)try{this.value.destroy()}catch(n){Qn(e.state,n,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}var kE=he.define(),q1=he.define(),Rg=he.define(),CE=he.define(),G1=he.define(),_d=he.define(),RE=he.define();function QQ(e,t){let n=e.state.facet(RE);if(!n.length)return n;let r=n.map((i)=>i instanceof Function?i(e):i),o=[];return Ve.spans(r,t.from,t.to,{point(){},span(i,s,a,l){let c=i-t.from,u=s-t.from,f=o;for(let d=a.length-1;d>=0;d--,l--){let h=a[d].spec.bidiIsolate,m;if(h==null)h=_B(t.text,c,u);if(l>0&&f.length&&(m=f[f.length-1]).to==c&&m.direction==h)m.to=u,f=m.inner;else{let g={from:c,to:u,direction:h,inner:[]};f.push(g),f=g.inner}}}}),o}var PE=he.define();function H1(e){let t=0,n=0,r=0,o=0;for(let i of e.state.facet(PE)){let s=i(e);if(s){if(s.left!=null)t=Math.max(t,s.left);if(s.right!=null)n=Math.max(n,s.right);if(s.top!=null)r=Math.max(r,s.top);if(s.bottom!=null)o=Math.max(o,s.bottom)}}return{left:t,right:n,top:r,bottom:o}}var Sd=he.define();class Nr{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new Nr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(r.fromA>n.toA)continue;if(r.toA<n.fromA)break;n=n.join(r),e.splice(t-1,1)}return e.splice(t,0,n),e}static extendWithRanges(e,t){if(t.length==0)return e;let n=[];for(let r=0,o=0,i=0;;){let s=r<e.length?e[r].fromB:1e9,a=o<t.length?t[o]:1e9,l=Math.min(s,a);if(l==1e9)break;let c=l+i,u=l,f=c;for(;;)if(o<t.length&&t[o]<=u){let d=t[o+1];o+=2,u=Math.max(u,d);for(let h=r;h<e.length&&e[h].fromB<=u;h++)i=e[h].toA-e[h].toB;f=Math.max(f,d+i)}else if(r<e.length&&e[r].fromB<=u){let d=e[r++];u=Math.max(u,d.toB),f=Math.max(f,d.toA),i=d.toA-d.toB}else break;n.push(new Nr(c,f,l,u))}return n}}class vg{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=Et.empty(this.startState.doc.length);for(let o of n)this.changes=this.changes.compose(o.changes);let r=[];this.changes.iterChangedRanges((o,i,s,a)=>r.push(new Nr(o,i,s,a))),this.changedRanges=r}static create(e,t,n){return new vg(e,t,n)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((e)=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var zB=[];class xt{constructor(e,t,n=0){this.dom=e,this.length=t,this.flags=n,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return zB}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;if(t)vB(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let n=t;for(let r of this.children){if(r==e)return n;n+=r.length+r.breakAfter}throw RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t,n){return null}domPosFor(e,t){let n=js(this.dom),r=this.length?e>0:t>0;return new io(this.parent.dom,n+(r?1:0),e==0||e==this.length)}markDirty(e){if(this.flags&=-3,e)this.flags|=4;if(this.parent&&this.parent.flags&2)this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Ld)return e;return null}static get(e){return e.cmTile}}class Nd extends xt{constructor(e){super(e,0);this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,n=null,r,o=(e===null||e===void 0?void 0:e.node)==t?e:null,i=0;for(let s of this.children){if(s.sync(e),i+=s.length+s.breakAfter,r=n?n.nextSibling:t.firstChild,o&&r!=s.dom)o.written=!0;if(s.dom.parentNode==t)while(r&&r!=s.dom)r=EQ(r);else t.insertBefore(s.dom,r);n=s.dom}if(r=n?n.nextSibling:t.firstChild,o&&r)o.written=!0;while(r)r=EQ(r);this.length=i}}function EQ(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class Ld extends Nd{constructor(e,t){super(t);this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=xt.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],n=this,r=0,o=0;;)if(r==n.children.length){if(!t.length)return;if(n=n.parent,n.breakAfter)o++;r=t.pop()}else{let i=n.children[r++];if(i instanceof Qi)t.push(r),n=i,r=0;else{let s=o+i.length,a=e(i,o);if(a!==void 0)return a;o=s+i.breakAfter}}}resolveBlock(e,t){let n,r=-1,o,i=-1;if(this.blockTiles((s,a)=>{let l=a+s.length;if(e>=a&&e<=l){if(s.isWidget()&&t>=-1&&t<=1){if(s.flags&32)return!0;if(s.flags&16)n=void 0}if((a<e||e==l&&(t<-1?s.length:s.covers(1)))&&(!n||!s.isWidget()&&n.isWidget()))n=s,r=e-a;if((l>e||e==a&&(t>1?s.length:s.covers(-1)))&&(!o||!s.isWidget()&&o.isWidget()))o=s,i=e-a}}),!n&&!o)throw Error("No tile at position "+e);return n&&t<0||!o?{tile:n,offset:r}:{tile:o,offset:i}}}class Qi extends Nd{constructor(e,t){super(e);this.wrapper=t}isBlock(){return!0}covers(e){if(!this.children.length)return!1;return e<0?this.children[0].covers(-1):this.lastChild.covers(1)}get domAttrs(){return this.wrapper.attributes}static of(e,t){let n=new Qi(t||document.createElement(e.tagName),e);if(!t)n.flags|=4;return n}}class uu extends Nd{constructor(e,t){super(e);this.attrs=t}isLine(){return!0}static start(e,t,n){let r=new uu(t||document.createElement("div"),e);if(!t||!n)r.flags|=4;return r}get domAttrs(){return this.attrs}resolveInline(e,t,n){let r=null,o=-1,i=null,s=-1;function a(c,u){for(let f=0,d=0;f<c.children.length&&d<=u;f++){let h=c.children[f],m=d+h.length;if(m>=u){if(h.isComposite())a(h,u-d);else if((!i||i.isHidden&&(t>0&&!(i.flags&32)||n&&IB(i,h)))&&(m>u||h.flags&32&&t<=1))i=h,s=u-d;else if(d<u||h.flags&16&&!h.isHidden&&t>=-1)r=h,o=u-d}d=m}}a(this,e);let l=(t<0?r:i)||r||i;return l?{tile:l,offset:l==r?o:s}:null}coordsIn(e,t,n){let r=this.resolveInline(e,t,!0);if(!r)return jB(this);return r.tile.coordsIn(Math.max(0,r.offset),t,n)}domIn(e,t){let n=this.resolveInline(e,t);if(n){let{tile:r,offset:o}=n;if(this.dom.contains(r.dom)){if(r.isText())return new io(r.dom,Math.min(r.dom.nodeValue.length,o));return r.domPosFor(o,r.flags&16?1:r.flags&32?-1:t)}let i=n.tile.parent,s=!1;for(let a of i.children){if(s)return new io(a.dom,0);if(a==n.tile)s=!0}}return new io(this.dom,0)}}function jB(e){let t=e.dom.lastChild;if(!t)return e.dom.getBoundingClientRect();let n=dg(t);return n[n.length-1]||null}function IB(e,t){let n=e.coordsIn(0,1),r=t.coordsIn(0,1);return n&&r&&r.top<n.bottom}class Un extends Nd{constructor(e,t){super(e);this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let n=new Un(t||document.createElement(e.tagName),e);if(!t)n.flags|=4;return n}}class Ha extends xt{constructor(e,t){super(e,t.length);this.text=t}sync(e){if(this.flags&2)return;if(super.sync(e),this.dom.nodeValue!=this.text){if(e&&e.node==this.dom)e.written=!0;this.dom.nodeValue=this.text}}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t,n){let r=this.dom.nodeValue.length;if(e>r)e=r;let o=e,i=e,s=0;if(e==0&&t<0||e==r&&t>=0){if(!(ee.chrome||ee.gecko)){if(e)o--,s=1;else if(i<r)i++,s=-1}}else if(t<0)o--;else if(i<r)i++;let a=Ed(this.dom,o,i).getClientRects();if(!a.length)return null;let l=a[(s?s<0:t>=0)?0:a.length-1];if(ee.safari&&!s&&l.width==0)l=Array.prototype.find.call(a,(c)=>c.width)||l;return n==null?l:yg(l,(s?s>0:t<0)==n)}static of(e,t){let n=new Ha(t||document.createTextNode(e),e);if(!t)n.flags|=2;return n}}class Ka extends xt{constructor(e,t,n,r){super(e,t,r);this.widget=n}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){if(this.flags&48)return!1;return(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,n){let r=this.widget.coordsAt(this.dom,e,t);if(r)return r;if(n)return yg(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);else{let o=this.dom.getClientRects(),i=null;if(!o.length)return null;let s=this.flags&16?!0:this.flags&32?!1:e>0;for(let a=s?o.length-1:0;;a+=s?-1:1)if(i=o[a],e>0?a==0:a==o.length-1||i.top<i.bottom)break;return yg(i,!s)}}get overrideDOMText(){if(!this.length)return De.empty;let{root:e}=this;if(!e)return De.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,n,r,o){if(!o){if(o=e.toDOM(t),!e.editable)o.contentEditable="false"}return new Ka(o,n,e,r)}}class Md extends xt{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true");super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return De.empty}coordsIn(e,t,n){let r=this.dom.getBoundingClientRect();return n==null?r:yg(r,t>0==n)}}class TE{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,n){let{tile:r,index:o,beforeBreak:i,parents:s}=this;while(e||t>0)if(!r.isComposite()){let a=r.length;if(o<a&&e){let l=Math.min(e,a-o);if(n)n.skip(r,o,o+l);e-=l,o+=l}if(o==a)i=!!r.breakAfter,{tile:r,index:o}=s.pop(),o++;else if(!e)break}else if(i){if(!e)break;if(n)n.break();e--,i=!1}else if(o==r.children.length){if(!e&&!s.length)break;if(n)n.leave(r);i=!!r.breakAfter,{tile:r,index:o}=s.pop(),o++}else{let a=r.children[o],l=a.breakAfter;if((t>0?a.length<=e:a.length<e)&&(!n||n.skip(a,0,a.length)!==!1||!a.isComposite))i=!!l,o++,e-=a.length;else if(s.push({tile:r,index:o}),r=a,o=0,n&&a.isComposite())n.enter(a)}return this.tile=r,this.index=o,this.beforeBreak=i,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class AE{constructor(e,t,n,r){this.from=e,this.to=t,this.wrapper=n,this.rank=r}}class QE{constructor(e,t,n){this.cache=e,this.root=t,this.blockWrappers=n,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,n,r){var o;this.flushBuffer();let i=this.ensureMarks(t,n),s=i.lastChild;if(s&&s.isText()&&!(s.flags&8)&&s.length+e.length<512){this.cache.reused.set(s,2);let a=i.children[i.children.length-1]=new Ha(s.dom,s.text+e);a.parent=i}else i.append(r||Ha.of(e,(o=this.cache.find(Ha))===null||o===void 0?void 0:o.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let n=this.curLine;if(n.dom!=t.line.dom)n.setDOM(this.cache.reused.has(t.line)?b1(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2);let r=n;for(let s=t.marks.length-1;s>=0;s--){let a=t.marks[s],l=r.lastChild;if(l instanceof Un&&l.mark.eq(a.mark)){if(l.dom!=a.dom)l.setDOM(b1(a.dom));r=l}else{let{dom:c}=a;if(this.cache.reused.get(a)){if(xt.get(a.dom))c=b1(a.dom)}let u=Un.of(a.mark,c);r.append(u),r=u}this.cache.reused.set(a,2)}let o=xt.get(e.text);if(o)this.cache.reused.set(o,2);let i=new Ha(e.text,e.text.nodeValue);i.flags|=8,this.pos=e.range.toB,r.append(i)}addInlineWidget(e,t,n){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);if(!r)this.flushBuffer();let o=this.ensureMarks(t,n);if(!r&&!(e.flags&16))o.append(this.getBuffer(1));o.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,n){this.flushBuffer(),this.ensureMarks(t,n).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var n;if(!e)e=DE;let r=uu.start(e,t||((n=this.cache.find(uu))===null||n===void 0?void 0:n.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){if(!this.blockPosCovered())this.addLineStart(e)}ensureLine(e){if(!this.curLine)this.addLineStart(e)}ensureMarks(e,t){var n;let r=this.curLine;for(let o=e.length-1;o>=0;o--){let i=e[o],s;if(t>0&&(s=r.lastChild)&&s instanceof Un&&s.mark.eq(i))r=s,t--;else{let a=Un.of(i,(n=this.cache.find(Un,(l)=>l.mark.eq(i)))===null||n===void 0?void 0:n.dom);r.append(a),r=a,t=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;if(!e||!MQ(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(ee.ios&&MQ(this.curLine,!0)))this.curLine.append(this.cache.findWidget(y1,0,32)||new Ka(y1.toDOM(),0,y1,32));this.curLine=this.afterWidget=null}}updateBlockWrappers(){if(this.wrapperPos>this.pos+1e4)this.blockWrappers.goto(this.pos),this.wrappers.length=0;for(let e=this.wrappers.length-1;e>=0;e--)if(this.wrappers[e].to<this.pos)this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=e.rank*102+e.value.rank,n=new AE(e.from,e.to,e.value,t),r=this.wrappers.length;while(r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let n of this.wrappers){let r=t.lastChild;if(n.from<this.pos&&r instanceof Qi&&r.wrapper.eq(n.wrapper))t=r;else{let o=Qi.of(n.wrapper,(e=this.cache.find(Qi,(i)=>i.wrapper.eq(n.wrapper)))===null||e===void 0?void 0:e.dom);t.append(o),t=o}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),n=this.cache.find(Md,void 0,1);if(n)n.flags=t;return n||new Md(t)}flushBuffer(){if(this.afterWidget&&!(this.afterWidget.flags&32))this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null}}class EE{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){if(this.textOff+e<=this.text.length)this.textOff+=e;else this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:o,done:i}=this.cursor.next(this.skipCount);if(this.skipCount=0,i)throw Error("Ran out of text content when drawing inline views");this.text=r;let s=this.textOff=Math.min(e,r.length);return o?null:r.slice(0,s)}let t=Math.min(this.text.length,this.textOff+e),n=this.text.slice(this.textOff,t);return this.textOff=t,n}}var xg=[Ka,uu,Ha,Un,Md,Qi,Ld];for(let e=0;e<xg.length;e++)xg[e].bucket=e;class ME{constructor(e){this.view=e,this.buckets=xg.map(()=>[]),this.index=xg.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,n=this.buckets[t];if(n.length<6)n.push(e);else n[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,n=2){let r=e.bucket,o=this.buckets[r],i=this.index[r];for(let s=0;s<o.length;s++){let a=(s+i)%o.length,l=o[a];if((!t||t(l))&&!this.reused.has(l)){if(o.splice(a,1),a<i)this.index[r]--;return this.reused.set(l,n),l}}return null}findWidget(e,t,n){let r=this.buckets[0];if(r.length)for(let o=0,i=0;;o++){if(o==r.length){if(i)return null;i=1,o=0}let s=r[o];if(!this.reused.has(s)&&(i==0?s.widget.compare(e):s.widget.constructor==e.constructor&&e.updateDOM(s.dom,this.view,s.widget))){if(r.splice(o,1),o<this.index[0])this.index[0]--;if(s.widget==e&&s.length==t&&(s.flags&497)==n)return this.reused.set(s,1),s;else return this.reused.set(s,2),new Ka(s.dom,t,e,s.flags&-498|n)}}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(this.reused.has(e))return;return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class $E{constructor(e,t,n,r,o){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=o,this.openWidget=!1,this.openMarks=0,this.cache=new ME(e),this.text=new EE(e.state.doc),this.builder=new QE(this.cache,new Ld(e,e.contentDOM),Ve.iter(n)),this.cache.reused.set(t,2),this.old=new TE(t),this.reuseWalker={skip:(i,s,a)=>{if(this.cache.add(i),i.isComposite())return!1},enter:(i)=>this.cache.add(i),leave:()=>{},break:()=>{}}}run(e,t){let n=t&&this.getCompositionContext(t.text);for(let r=0,o=0,i=0;;){let s=i<e.length?e[i++]:null,a=s?s.fromA:this.old.root.length;if(a>r){let l=a-r;this.preserve(l,!i,!s),r=a,o+=l}if(!s)break;if(t&&s.fromA<=t.range.fromA&&s.toA>=t.range.toA)this.forward(s.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(o,t.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(t,n),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,s.toA),this.emit(t.range.toB,s.toB);else this.forward(s.fromA,s.toA),this.emit(o,s.toB);o=s.toB,r=s.toA}if(this.builder.curLine)this.builder.endLine();return this.builder.root}preserve(e,t,n){let r=ZB(this.old),o=this.openMarks;this.old.advance(e,n?1:-1,{skip:(i,s,a)=>{if(i.isWidget())if(this.openWidget)this.builder.continueWidget(a-s);else{let l=a>0||s<i.length?Ka.of(i.widget,this.view,a-s,i.flags&496,this.cache.maybeReuse(i)):this.cache.reuse(i);if(l.flags&256)l.flags&=-2,this.builder.addBlockWidget(l);else this.builder.ensureLine(null),this.builder.addInlineWidget(l,r,o),o=r.length}else if(i.isText()){if(this.builder.ensureLine(null),!s&&a==i.length&&!this.cache.reused.has(i))this.builder.addText(i.text,r,o,this.cache.reuse(i));else this.cache.add(i),this.builder.addText(i.text.slice(s,a),r,o);o=r.length}else if(i.isLine())i.flags&=-2,this.cache.reused.set(i,1),this.builder.addLine(i);else if(i instanceof Md)this.cache.add(i);else if(i instanceof Un)this.builder.ensureLine(null),this.builder.addMark(i,r,o),this.cache.reused.set(i,1),o=r.length;else return!1;this.openWidget=!1},enter:(i)=>{if(i.isLine())this.builder.addLineStart(i.attrs,this.cache.maybeReuse(i));else if(this.cache.add(i),i instanceof Un)r.unshift(i.mark);this.openWidget=!1},leave:(i)=>{if(i.isLine()){if(r.length)r.length=o=0}else if(i instanceof Un)r.shift(),o=Math.min(o,r.length)},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let n=null,r=this.builder,o=-1,i=Ve.spans(this.decorations,e,t,{point:(s,a,l,c,u,f)=>{if(l instanceof Wa){if(this.disallowBlockEffectsFor[f]){if(l.block)throw RangeError("Block decorations may not be specified via plugins");if(a>this.view.state.doc.lineAt(s).to)throw RangeError("Decorations that replace line breaks may not be specified via plugins")}if(o=c.length,u>c.length)r.continueWidget(a-s);else{let d=l.widget||(l.block?Ja.block:Ja.inline),h=XB(l),m=this.cache.findWidget(d,a-s,h)||Ka.of(d,this.view,a-s,h);if(l.block){if(l.startSide>0)r.addLineStartIfNotCovered(n);r.addBlockWidget(m)}else r.ensureLine(n),r.addInlineWidget(m,c,u)}n=null}else n=BB(n,l);if(a>s)this.text.skip(a-s)},span:(s,a,l,c)=>{for(let u=s;u<a;){let f=this.text.next(Math.min(512,a-u));if(f==null)r.addLineStartIfNotCovered(n),r.addBreak(),u++;else r.ensureLine(n),r.addText(f,l,u==s?c:l.length),u+=f.length;n=null}o=l.length}});if(o>-1)this.openWidget=i>o;if(!this.openWidget)r.addLineStartIfNotCovered(n);this.openMarks=i}forward(e,t,n=1){if(t-e<=10)this.old.advance(t-e,n,this.reuseWalker);else this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,n,this.reuseWalker)}getCompositionContext(e){let t=[],n=null;for(let r=e.parentNode;;r=r.parentNode){let o=xt.get(r);if(r==this.view.contentDOM)break;if(o instanceof Un)t.push(o);else if(o===null||o===void 0?void 0:o.isLine())n=o;else if(o instanceof Qi);else if(r.nodeName=="DIV"&&!n)n=new uu(r,DE);else if(!n)t.push(Un.of(new $d({tagName:r.nodeName.toLowerCase(),attributes:xB(r)}),r))}if(!n)return null;return{line:n,marks:t}}}function MQ(e,t){let n=(r)=>{for(let o of r.children)if((t?o.isText():o.length)||n(o))return!0;return!1};return n(e)}function XB(e){let t=e.isReplace?(e.startSide<0?64:0)|(e.endSide>0?128:0):e.startSide>0?32:16;if(e.block)t|=256;return t}var DE={class:"cm-line"};function BB(e,t){let n=t.spec.attributes,r=t.spec.class;if(!n&&!r)return e;if(!e)e={class:"cm-line"};if(n)B1(n,e);if(r)e.class+=" "+r;return e}function ZB(e){let t=[];for(let n=e.parents.length;n>1;n--){let r=n==e.parents.length?e.tile:e.parents[n].tile;if(r instanceof Un)t.push(r.mark)}return t}function b1(e){let t=xt.get(e);if(t)t.setDOM(e.cloneNode());return e}class Ja extends $n{constructor(e){super();this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Ja.inline=new Ja("span");Ja.block=new Ja("div");var y1=new class extends $n{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class M1{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=we.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Ld(e,e.contentDOM),this.updateInner([new Nr(0,0,0,e.state.doc.length)],null)}update(e){var t;let n=e.changedRanges;if(this.minWidth>0&&n.length)if(!n.every(({fromA:c,toA:u})=>u<this.minWidthFrom||c>this.minWidthTo))this.minWidth=this.minWidthFrom=this.minWidthTo=0;else this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1);this.updateEditContextFormatting(e);let r=-1;if(this.view.inputState.composing>=0&&!this.view.observer.editContext){if((t=this.domChanged)===null||t===void 0?void 0:t.newSel)r=this.domChanged.newSel.head;else if(!FB(e.changes,this.hasComposition)&&!e.selectionSet)r=e.state.selection.main.head}let o=r>-1?YB(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:c,to:u}=this.hasComposition;n=new Nr(c,u,e.changes.mapPos(c,-1),e.changes.mapPos(u,1)).addToSet(n.slice())}if(this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(ee.ie||ee.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines)this.forceSelection=!0;let i=this.decorations,s=this.blockWrappers;this.updateDeco();let a=GB(i,this.decorations,e.changes);if(a.length)n=Nr.extendWithRanges(n,a);let l=HB(s,this.blockWrappers,e.changes);if(l.length)n=Nr.extendWithRanges(n,l);if(o&&!n.some((c)=>c.fromA<=o.range.fromA&&c.toA>=o.range.toA))n=o.range.addToSet(n.slice());if(this.tile.flags&2&&n.length==0)return!1;else{if(this.updateInner(n,o),e.transactions.length)this.lastUpdate=Date.now();return!0}}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:n}=this.view;n.ignore(()=>{if(t||e.length){let i=this.tile,s=new $E(this.view,i,this.blockWrappers,this.decorations,this.dynamicDecorationMap);if(t&&xt.get(t.text))s.cache.reused.set(xt.get(t.text),2);this.tile=s.run(e,t),$1(i,s.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=ee.chrome||ee.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;if(this.tile.sync(o),o&&(o.written||n.selectionRange.focusNode!=o.node||!this.tile.dom.contains(o.node)))this.forceSelection=!0;this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length){for(let o of this.tile.children)if(o.isWidget()&&o.widget instanceof pg)r.push(o.dom)}n.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let n of t.effects)if(n.is(SE))this.editContextFormatting=n.value}updateSelection(e=!1,t=!1){if(e||!this.view.observer.selectionRange.focusNode)this.view.observer.readSelectionRange();let{dom:n}=this.tile,r=this.view.root.activeElement,o=r==n,i=!o&&!(this.view.state.facet(Ai)||n.tabIndex>-1)&&Rd(n,this.view.observer.selectionRange)&&!(r&&n.contains(r));if(!(o||t||i))return;let s=this.forceSelection;this.forceSelection=!1;let a=this.view.state.selection.main,l,c;if(a.empty)c=l=this.inlineDOMNearPos(a.anchor,a.assoc||1);else c=this.inlineDOMNearPos(a.head,a.head==a.from?1:-1),l=this.inlineDOMNearPos(a.anchor,a.anchor==a.from?1:-1);if(ee.gecko&&a.empty&&!this.hasComposition&&UB(l)){let f=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(f,l.node.childNodes[l.offset]||null)),l=c=new io(f,0),s=!0}let u=this.view.observer.selectionRange;if(s||!u.focusNode||(!Pd(l.node,l.offset,u.anchorNode,u.anchorOffset)||!Pd(c.node,c.offset,u.focusNode,u.focusOffset))&&!this.suppressWidgetCursorChange(u,a))this.view.observer.ignore(()=>{if(ee.android&&ee.chrome&&n.contains(u.focusNode)&&WB(u.focusNode,n))n.blur(),n.focus({preventScroll:!0});let f=Qd(this.view.root);if(!f);else if(a.empty){if(ee.gecko){let d=VB(l.node,l.offset);if(d&&d!=3){let h=(d==1?lE:cE)(l.node,l.offset);if(h)l=new io(h.node,h.offset)}}if(f.collapse(l.node,l.offset),a.bidiLevel!=null&&f.caretBidiLevel!==void 0)f.caretBidiLevel=a.bidiLevel}else if(f.extend){f.collapse(l.node,l.offset);try{f.extend(c.node,c.offset)}catch(d){}}else{let d=document.createRange();if(a.anchor>a.head)[l,c]=[c,l];d.setEnd(c.node,c.offset),d.setStart(l.node,l.offset),f.removeAllRanges(),f.addRange(d)}if(i&&this.view.root.activeElement==n){if(n.blur(),r)r.focus()}}),this.view.observer.setSelectionRange(l,c);this.impreciseAnchor=l.precise?null:new io(u.anchorNode,u.anchorOffset),this.impreciseHead=c.precise?null:new io(u.focusNode,u.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&Pd(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=Qd(e.root),{anchorNode:r,anchorOffset:o}=e.observer.selectionRange;if(!n||!t.empty||!t.assoc||!n.modify)return;let i=this.lineAt(t.head,t.assoc);if(!i)return;let s=i.posAtStart;if(t.head==s||t.head==s+i.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc,t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;if(e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from)n.collapse(r,o)}posFromDOM(e,t){let n=this.tile.nearest(e);if(!n)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=n.posAtStart;if(n.isComposite()){let o;if(e==n.dom)o=n.dom.childNodes[t];else{let i=Ei(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==n.dom)break;if(i==0&&s.firstChild!=s.lastChild)if(e==s.firstChild)i=-1;else i=1;e=s}if(i<0)o=e;else o=e.nextSibling}if(o==n.dom.firstChild)return r;while(o&&!xt.get(o))o=o.nextSibling;if(!o)return r+n.length;for(let i=0,s=r;;i++){let a=n.children[i];if(a.dom==o)return s;s+=a.length+a.breakAfter}}else if(n.isText())return e==n.dom?r+t:r+(t?n.length:0);else return r}domAtPos(e,t){let{tile:n,offset:r}=this.tile.resolveBlock(e,t);if(n.isWidget())return n.domPosFor(r,t);return n.domIn(r,t)}inlineDOMNearPos(e,t){let n,r=-1,o=!1,i,s=-1,a=!1;if(this.tile.blockTiles((l,c)=>{if(l.isWidget()){if(l.flags&32&&c>=e)return!0;if(l.flags&16)o=!0}else{let u=c+l.length;if(c<=e)n=l,r=e-c,o=u<e;if(u>=e&&!i)i=l,s=e-c,a=c>e;if(c>e&&i)return!0}}),!n&&!i)return this.domAtPos(e,t);if(o&&i)n=null;else if(a&&n)i=null;return n&&t<0||!i?n.domIn(r,t):i.domIn(s,t)}coordsAt(e,t,n){let{tile:r,offset:o}=this.tile.resolveBlock(e,t);if(r.isWidget()){if(r.widget instanceof pg)return null;return r.coordsInWidget(o,t,!0)}return r.coordsIn(o,t,n)}lineAt(e,t){let{tile:n}=this.tile.resolveBlock(e,t);return n.isLine()?n:null}coordsForChar(e){let{tile:t,offset:n}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function r(o,i){if(o.isComposite())for(let s of o.children){if(s.length>=i){let a=r(s,i);if(a)return a}if(i-=s.length,i<0)break}else if(o.isText()&&i<o.length){let s=Gt(o.text,i);if(s==i)return null;let a=Ed(o.dom,i,s).getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(l==a.length-1||c.top<c.bottom&&c.left<c.right)return c}}return null}return r(t,n)}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,o=this.view.contentDOM.clientWidth,i=o>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==pt.LTR,l=0,c=(u,f,d)=>{for(let h=0;h<u.children.length;h++){if(f>r)break;let m=u.children[h],g=f+m.length,b=m.dom.getBoundingClientRect(),{height:O}=b;if(d&&!h)l+=b.top-d.top;if(m instanceof Qi){if(g>n)c(m,f,b)}else if(f>=n){if(l>0)t.push(-l);if(t.push(O+l),l=0,i){let y=m.dom.lastChild,v=y?dg(y):[];if(v.length){let x=v[v.length-1],w=a?x.right-b.left:b.right-x.left;if(w>s)s=w,this.minWidth=o,this.minWidthFrom=f,this.minWidthTo=g}}}if(d&&h==u.children.length-1)l+=d.bottom-b.bottom;f=g+m.breakAfter}};return c(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?pt.RTL:pt.LTR}measureTextSize(){let e=this.tile.blockTiles((i)=>{if(i.isLine()&&i.children.length&&i.length<=20){let s=0,a;for(let l of i.children){if(!l.isText()||/[^ -~]/.test(l.text))return;let c=dg(l.dom);if(c.length!=1)return;s+=c[0].width,a=c[0].height}if(s)return{lineHeight:i.dom.getBoundingClientRect().height,charWidth:s/i.length,textHeight:a}}});if(e)return e;let t=document.createElement("div"),n,r,o;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let i=dg(t.firstChild)[0];n=t.getBoundingClientRect().height,r=i&&i.width?i.width/27:7,o=i&&i.height?i.height:n,t.remove()}),{lineHeight:n,charWidth:r,textHeight:o}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let o=r==t.viewports.length?null:t.viewports[r],i=o?o.from-1:this.view.state.doc.length;if(i>n){let s=(t.lineBlockAt(i).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(we.replace({widget:new pg(s),block:!0,inclusive:!0,isBlockGap:!0}).range(n,i))}if(!o)break;n=o.to+1}return we.set(e)}updateDeco(){let e=1,t=this.view.state.facet(Rg).map((o)=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),n=!1,r=this.view.state.facet(G1).map((o,i)=>{let s=typeof o=="function";if(s)n=!0;return s?o(this.view):o});if(r.length)this.dynamicDecorationMap[e++]=n,t.push(Ve.join(r));this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];while(e<this.decorations.length)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(CE).map((o)=>typeof o=="function"?o(this.view):o)}scrollIntoView(e){if(e.isSnapshot){let l=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=l.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let l of this.view.state.facet(wE))try{if(l(this.view,e.range,e))return!0}catch(c){Qn(this.view.state,c,"scroll handler")}let{range:t}=e,n=this.coordsAt(t.head,t.assoc||(t.head>t.anchor?-1:1)),r;if(!n)return;if(!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1)))n={left:Math.min(n.left,r.left),top:Math.min(n.top,r.top),right:Math.max(n.right,r.right),bottom:Math.max(n.bottom,r.bottom)};let o=H1(this.view),i={left:n.left-o.left,top:n.top-o.top,right:n.right+o.right,bottom:n.bottom+o.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;if(kB(this.view.scrollDOM,i,t.head<t.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,s),-s),Math.max(Math.min(e.yMargin,a),-a),this.view.textDirection==pt.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(n.top>window.visualViewport.offsetTop+window.visualViewport.height||n.bottom<window.visualViewport.offsetTop)){let l=this.view.docView.lineAt(t.head,1);if(l){let c=oE(l.dom);l.dom.scrollIntoView({block:"nearest"}),iE(c,!1)}}}lineHasWidget(e){let t=(n)=>n.isWidget()||n.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){$1(this.tile)}}function $1(e,t){let n=t===null||t===void 0?void 0:t.get(e);if(n!=1){if(n==null)e.destroy();for(let r of e.children)$1(r,t)}}function UB(e){return e.node.nodeType==1&&e.node.firstChild&&(e.offset==0||e.node.childNodes[e.offset-1].contentEditable=="false")&&(e.offset==e.node.childNodes.length||e.node.childNodes[e.offset].contentEditable=="false")}function _E(e,t){let n=e.observer.selectionRange;if(!n.focusNode)return null;let r=lE(n.focusNode,n.focusOffset),o=cE(n.focusNode,n.focusOffset),i=r||o;if(o&&r&&o.node!=r.node){let a=xt.get(o.node);if(!a||a.isText()&&a.text!=o.node.nodeValue)i=o;else if(e.docView.lastCompositionAfterCursor){let l=xt.get(r.node);if(!(!l||l.isText()&&l.text!=r.node.nodeValue))i=o}}if(e.docView.lastCompositionAfterCursor=i!=r,!i)return null;let s=t-i.offset;return{from:s,to:s+i.node.nodeValue.length,node:i.node}}function YB(e,t,n){let r=_E(e,n);if(!r)return null;let{node:o,from:i,to:s}=r,a=o.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(r.from,r.to)!=a)return null;let l=t.invertedDesc;return{range:new Nr(l.mapPos(i),l.mapPos(s),i,s),text:o}}function VB(e,t){if(e.nodeType!=1)return 0;return(t&&e.childNodes[t-1].contentEditable=="false"?1:0)|(t<e.childNodes.length&&e.childNodes[t].contentEditable=="false"?2:0)}var qB=class{constructor(){this.changes=[]}compareRange(t,n){au(t,n,this.changes)}comparePoint(t,n){au(t,n,this.changes)}boundChange(t){au(t,t,this.changes)}};function GB(e,t,n){let r=new qB;return Ve.compare(e,t,n,r),r.changes}class NE{constructor(){this.changes=[]}compareRange(e,t){au(e,t,this.changes)}comparePoint(){}boundChange(e){au(e,e,this.changes)}}function HB(e,t,n){let r=new NE;return Ve.compare(e,t,n,r),r.changes}function WB(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function FB(e,t){let n=!1;if(t)e.iterChangedRanges((r,o)=>{if(r<t.to&&o>t.from)n=!0});return n}class pg extends $n{constructor(e){super();this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function KB(e,t,n=1){let r=e.charCategorizer(t),o=e.doc.lineAt(t),i=t-o.from;if(o.length==0)return j.cursor(t);if(i==0)n=1;else if(i==o.length)n=-1;let s=i,a=i;if(n<0)s=Gt(o.text,i,!1);else a=Gt(o.text,i);let l=r(o.text.slice(s,a));while(s>0){let c=Gt(o.text,s,!1);if(r(o.text.slice(c,s))!=l)break;s=c}while(a<o.length){let c=Gt(o.text,a);if(r(o.text.slice(a,c))!=l)break;a=c}return j.undirectionalRange(s+o.from,a+o.from)}function JB(e,t,n,r,o){let i=Math.round((r-t.left)*e.defaultCharacterWidth);if(e.lineWrapping&&n.height>e.defaultLineHeight*1.5){let a=e.viewState.heightOracle.textHeight,l=Math.floor((o-n.top-(e.defaultLineHeight-a)*0.5)/a);i+=l*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+bQ(s,i,e.state.tabSize)}function eZ(e,t,n){let r=e.lineBlockAt(t);if(Array.isArray(r.type)){let o;for(let i of r.type){if(i.from>t)break;if(i.to<t)continue;if(i.from<t&&i.to>t)return i;if(!o||i.type==Lr.Text&&(o.type!=i.type||(n<0?i.from<t:i.to>t)))o=i}return o||r}return r}function tZ(e,t,n,r){let o=eZ(e,t.head,t.assoc||-1),i=!r||o.type!=Lr.Text||!(e.lineWrapping||o.widgetLineBreaks)?null:e.coordsAtPos(t.assoc<0&&t.head>o.from?t.head-1:t.head);if(i){let s=e.dom.getBoundingClientRect(),a=e.textDirectionAt(o.from),l=e.posAtCoords({x:n==(a==pt.LTR)?s.right-1:s.left+1,y:(i.top+i.bottom)/2});if(l!=null)return j.cursor(l,n?-1:1)}return j.cursor(n?o.to:o.from,n?-1:1)}function $Q(e,t,n,r){let o=e.state.doc.lineAt(t.head),i=e.bidiSpans(o),s=e.textDirectionAt(o.from);for(let a=t,l=null;;){let c=DB(o,i,s,a,n),u=pE;if(!c){if(o.number==(n?e.state.doc.lines:1))return a;u=`
17
+ `,o=e.state.doc.line(o.number+(n?1:-1)),i=e.bidiSpans(o),c=n?j.cursor(o.from,-1):j.cursor(o.to,1)}if(!l){if(!r)return c;l=r(u)}else if(!l(u))return a;a=c}}function nZ(e,t,n){let r=e.state.charCategorizer(t),o=r(n);return(i)=>{let s=r(i);if(o==Dr.Space)o=s;return o==s}}function rZ(e,t,n,r){let o=t.head,i=n?1:-1;if(o==(n?e.state.doc.length:0))return j.cursor(o,t.assoc);let s=t.goalColumn,a,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(o,t.assoc||((t.empty?n:t.head==t.from)?1:-1)),u=e.documentTop;if(c){if(s==null)s=c.left-l.left;a=i<0?c.top:c.bottom}else{let m=e.viewState.lineBlockAt(o);if(s==null)s=Math.min(l.right-l.left,e.defaultCharacterWidth*(o-m.from));a=(i<0?m.top:m.bottom)+u}let f=l.left+s,d=e.viewState.heightOracle.textHeight>>1,h=r!==null&&r!==void 0?r:d;for(let m=0;;m+=d){let g=a+(h+m)*i,b=D1(e,{x:f,y:g},!1,i);if(n?g>l.bottom:g<l.top)return j.cursor(b.pos,b.assoc);let O=e.coordsAtPos(b.pos,b.assoc),y=O?(O.top+O.bottom)/2:0;if(!O||(n?y>a:y<a))return j.cursor(b.pos,b.assoc,void 0,s)}}function Td(e,t,n){for(;;){let r=0;for(let o of e)o.between(t-1,t+1,(i,s,a)=>{if(t>i&&t<s){let l=r||n||(t-i<s-t?-1:1);t=l<0?i:s,r=l}});if(!r)return t}}function LE(e,t){let n=null;for(let r=0;r<t.ranges.length;r++){let o=t.ranges[r],i=null;if(o.empty){let s=Td(e,o.from,0);if(s!=o.from)i=j.cursor(s,-1)}else{let s=Td(e,o.from,-1),a=Td(e,o.to,1);if(s!=o.from||a!=o.to)if(o.undirectional)i=j.undirectionalRange(o.from,o.to);else i=j.range(o.from==o.anchor?s:a,o.from==o.head?s:a)}if(i){if(!n)n=t.ranges.slice();n[r]=i}}return n?j.create(n,t.mainIndex):t}function v1(e,t,n){let r=Td(e.state.facet(_d).map((o)=>o(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:j.cursor(r,r<n.from?1:-1)}class ro{constructor(e,t){this.pos=e,this.assoc=t}}function D1(e,t,n,r){let o=e.contentDOM.getBoundingClientRect(),i=o.top+e.viewState.paddingTop,{x:s,y:a}=t,l=a-i,c;for(;;){if(l<0)return new ro(0,1);if(l>e.viewState.docHeight)return new ro(e.state.doc.length,-1);if(c=e.elementAtHeight(l),r==null)break;if(c.type==Lr.Text){if(r<0?c.to<e.viewport.from:c.from>e.viewport.to)break;let d=e.docView.coordsAt(r<0?c.from:c.to,r>0?-1:1);if(d&&(r<0?d.top<=l+i:d.bottom>=l+i))break}let f=e.viewState.heightOracle.textHeight/2;l=r>0?c.bottom+f:c.top-f}if(e.viewport.from>=c.to||e.viewport.to<=c.from){if(n)return null;if(c.type==Lr.Text){let f=JB(e,o,c,s,a);return new ro(f,f==c.from?1:-1)}}if(c.type!=Lr.Text)return l<(c.top+c.bottom)/2?new ro(c.from,1):new ro(c.to,-1);let u=e.docView.lineAt(c.from,2);if(!u||u.length!=c.length)u=e.docView.lineAt(c.from,-2);return new zE(e,s,a,e.textDirectionAt(c.from)).scanTile(u,c.from)}class zE{constructor(e,t,n,r){this.view=e,this.x=t,this.y=n,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){if(!this.line||this.line.from>e||this.line.to<e)this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line);return this}baseDirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[so.find(r,e-n.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:n,spans:r}=this.bidiSpansAt(e);return r[so.find(r,e-n.from,-1,t)].dir}bidiIn(e,t){let{spans:n,line:r}=this.bidiSpansAt(e);return n.length>1||n.length&&(n[0].level!=this.baseDir||n[0].to+r.from<t)}scan(e,t,n=!1){let r=0,o=e.length-1,i=new Set,s=this.bidiIn(e[0],e[o]),a,l,c=-1,u=1e9,f;e:while(r<o){let h=o-r,m=r+o>>1;t:if(i.has(m)){for(let O=1;O<h;O++){let y=m+O;if(y>=o)y-=h;if(!i.has(y)){m=y;break t}}break e}i.add(m);let g=t(m),b=0;if(g)for(let O=0;O<g.length;O++){let y=g[O];if(y.width==0&&g.length>1)continue;if(y.bottom<this.y){if(!a||a.bottom<y.bottom)a=y;b=1}else if(y.top>this.y){if(!l||l.top>y.top)l=y;b=-1}else{let v=y.left>this.x?this.x-y.left:y.right<this.x?this.x-y.right:0,x=Math.abs(v);if(x<u)c=m,u=x,f=y;if(v)b=v<0==(this.baseDir==pt.LTR)?-1:1}}if(b==-1&&(!s||this.baseDirAt(e[m],1)))o=m;else if(b==1&&(!s||this.baseDirAt(e[m+1],-1)))r=m+1}if(!f){if(!l&&!a)return{i:0,after:!1};let h=a&&(!l||this.y-a.bottom<l.top-this.y)?a:l;return this.y=(h.top+h.bottom)/2,this.scan(e,t,!0)}if(u&&!n){let{top:h,bottom:m}=f;if(a&&a.bottom>(h+h+m)/3)return this.y=a.bottom-1,this.scan(e,t,!0);if(l&&l.top<(h+m+m)/3)return this.y=l.top+1,this.scan(e,t,!0)}let d=(s?this.dirAt(e[c],1):this.baseDir)==pt.LTR;return{i:c,after:this.x>(f.left+f.right)/2==d}}scanText(e,t){let n=[];for(let o=0;o<e.length;o=Gt(e.text,o))n.push(t+o);n.push(t+e.length);let r=this.scan(n,(o)=>{let i=n[o]-t,s=n[o+1]-t;return Ed(e.dom,i,s).getClientRects()});return r.after?new ro(n[r.i+1],-1):new ro(n[r.i],1)}scanTile(e,t){if(!e.length)return new ro(t,1);if(e.children.length==1){let s=e.children[0];if(s.isText())return this.scanText(s,t);else if(s.isComposite())return this.scanTile(s,t)}let n=[t];for(let s=0,a=t;s<e.children.length;s++)n.push(a+=e.children[s].length);let r=this.scan(n,(s)=>{let a=e.children[s];if(a.flags&48)return null;return(a.dom.nodeType==1?a.dom:Ed(a.dom,0,a.length)).getClientRects()}),o=e.children[r.i],i=n[r.i];if(o.isText())return this.scanText(o,i);if(o.isComposite())return this.scanTile(o,i);return r.after?new ro(n[r.i+1],-1):new ro(i,1)}}var iu="￿";class jE{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(Le.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=iu}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let o=this.text.length;this.readNode(r);let i=xt.get(r),s=r.nextSibling;if(s==t){if((i===null||i===void 0?void 0:i.breakAfter)&&!s&&n!=this.view.contentDOM)this.lineBreak();break}let a=xt.get(s);if((i&&a?i.breakAfter:(i?i.breakAfter:bg(r))||bg(s)&&(r.nodeName!="BR"||(i===null||i===void 0?void 0:i.isWidget()))&&this.text.length>o)&&!iZ(s,t))this.lineBreak();r=s}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)if(n.node==e)n.pos=this.text.length+Math.min(n.offset,t.length);for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,i=1,s;if(this.lineSeparator)o=t.indexOf(this.lineSeparator,n),i=this.lineSeparator.length;else if(s=r.exec(t))o=s.index,i=s[0].length;if(this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),i>1){for(let a of this.points)if(a.node==e&&a.pos>this.text.length)a.pos-=i-1}n=o+i}}readNode(e){let t=xt.get(e),n=t&&t.overrideDOMText;if(n!=null){this.findPointInside(e,n.length);for(let r=n.iter();!r.next().done;)if(r.lineBreak)this.lineBreak();else this.append(r.value)}else if(e.nodeType==3)this.readTextNode(e);else if(e.nodeName=="BR"){if(e.nextSibling)this.lineBreak()}else if(e.nodeType==1)this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)if(n.node==e&&e.childNodes[n.offset]==t)n.pos=this.text.length}findPointInside(e,t){for(let n of this.points)if(e.nodeType==3?n.node==e:e.contains(n.node))n.pos=this.text.length+(oZ(e,n.node,n.offset)?t:0)}}function oZ(e,t,n){for(;;){if(!t||n<Ei(t))return!1;if(t==e)return!0;n=js(t)+1,t=t.parentNode}}function iZ(e,t){let n;for(;;e=e.nextSibling){if(e==t||!e)break;let r=xt.get(e);if(!(r===null||r===void 0?void 0:r.isWidget()))return!1;if(r)(n||(n=[])).push(r)}if(n)for(let r of n){let o=r.overrideDOMText;if(o===null||o===void 0?void 0:o.length)return!1}return!0}class _1{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class IE{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:o,impreciseAnchor:i}=e.docView,s=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=XE(e.docView.tile,t,n,0))){let a=o||i?[]:aZ(e),l=new jE(a,e);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=lZ(a,this.bounds.from)}else{let a=e.observer.selectionRange,l=o&&o.node==a.focusNode&&o.offset==a.focusOffset||!P1(e.contentDOM,a.focusNode)?s.main.head:e.docView.posFromDOM(a.focusNode,a.focusOffset),c=i&&i.node==a.anchorNode&&i.offset==a.anchorOffset||!P1(e.contentDOM,a.anchorNode)?s.main.anchor:e.docView.posFromDOM(a.anchorNode,a.anchorOffset),u=e.viewport;if((ee.ios||ee.chrome)&&l!=c&&Math.min(l,c)<=s.main.from&&Math.max(l,c)>=s.main.to&&(u.from>0||u.to<e.state.doc.length)){let f=Math.min(l,c),d=Math.max(l,c),h=u.from-f,m=u.to-d;if((h==0||h==1||f==0)&&(m==0||m==-1||d==e.state.doc.length))l=0,c=e.state.doc.length}if(e.inputState.composing>-1&&s.ranges.length>1)this.newSel=s.replaceRange(j.range(c,l));else if(e.lineWrapping&&c==l&&!(s.main.empty&&s.main.head==l)&&e.inputState.lastTouchTime>Date.now()-100){let f=e.coordsAtPos(l,-1),d=0;if(f)d=e.inputState.lastTouchY<=f.bottom?-1:1;this.newSel=j.create([j.cursor(l,d)])}else this.newSel=j.single(c,l)}}}function XE(e,t,n,r){if(e.isComposite()){let o=-1,i=-1,s=-1,a=-1;for(let l=0,c=r,u=r;l<e.children.length;l++){let f=e.children[l],d=c+f.length;if(c<t&&d>n)return XE(f,t,n,c);if(d>=t&&o==-1)o=l,i=c;if(c>n&&f.dom.parentNode==e.dom){s=l,a=u;break}u=d,c=d+f.breakAfter}return{from:i,to:a<0?r+e.length:a,startDOM:(o?e.children[o-1].dom.nextSibling:null)||e.dom.firstChild,endDOM:s<e.children.length&&s>=0?e.children[s].dom:null}}else if(e.isText())return{from:r,to:r+e.length,startDOM:e.dom,endDOM:e.dom.nextSibling};else return null}function BE(e,t){let n,{newSel:r}=t,{state:o}=e,i=o.selection.main,s=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:a,to:l}=t.bounds,c=i.from,u=null;if(s===8||ee.android&&t.text.length<l-a)c=i.to,u="end";let f=o.doc.sliceString(a,l,iu),d,h;if(!i.empty&&i.from>=a&&i.to<=l&&(t.typeOver||f!=t.text)&&f.slice(0,i.from-a)==t.text.slice(0,i.from-a)&&f.slice(i.to-a)==t.text.slice(d=t.text.length-(f.length-(i.to-a))))n={from:i.from,to:i.to,insert:De.of(t.text.slice(i.from-a,d).split(iu))};else if(h=ZE(f,t.text,c-a,u)){if(ee.chrome&&s==13&&h.toB==h.from+2&&t.text.slice(h.from,h.toB)==iu+iu)h.toB--;n={from:a+h.from,to:a+h.toA,insert:De.of(t.text.slice(h.from,h.toB).split(iu))}}}else if(r&&(!e.hasFocus&&o.facet(Ai)||wg(r,i)))r=null;if(!n&&!r)return!1;if((ee.mac||ee.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&e.contentDOM.getAttribute("autocorrect")=="off"){if(r&&n.insert.length==2)r=j.single(r.main.anchor-1,r.main.head-1);n={from:n.from,to:n.to,insert:De.of([n.insert.toString().replace("."," ")])}}else if(o.doc.lineAt(i.from).to<i.to&&e.docView.lineHasWidget(i.to)&&e.inputState.insertingTextAt>Date.now()-50)n={from:i.from,to:i.to,insert:o.toText(e.inputState.insertingText)};else if(ee.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==`
18
+ `&&e.lineWrapping){if(r)r=j.single(r.main.anchor-1,r.main.head-1);n={from:i.from,to:i.to,insert:De.of([" "])}}if(n)return W1(e,n,r,s);else if(r&&!wg(r,i)){let a=!1,l="select";if(e.inputState.lastSelectionTime>Date.now()-50){if(e.inputState.lastSelectionOrigin=="select")a=!0;if(l=e.inputState.lastSelectionOrigin,l=="select.pointer")r=LE(o.facet(_d).map((c)=>c(e)),r)}return e.dispatch({selection:r,scrollIntoView:a,userEvent:l}),!0}else return!1}function W1(e,t,n,r=-1){if(ee.ios&&e.inputState.flushIOSKey(t))return!0;let o=e.state.selection.main;if(ee.android&&(t.to==o.to&&(t.from==o.from||t.from==o.from-1&&e.state.sliceDoc(t.from,o.from)==" ")&&t.insert.length==1&&t.insert.lines==2&&lu(e.contentDOM,"Enter",13)||(t.from==o.from-1&&t.to==o.to&&t.insert.length==0||r==8&&t.insert.length<t.to-t.from&&t.to>o.head)&&lu(e.contentDOM,"Backspace",8)||t.from==o.from&&t.to==o.to+1&&t.insert.length==0&&lu(e.contentDOM,"Delete",46)))return!0;let i=t.insert.toString();if(e.inputState.composing>=0)e.inputState.composing++;let s,a=()=>s||(s=sZ(e,t,n));if(!e.state.facet(yE).some((l)=>l(e,t.from,t.to,i,a)))e.dispatch(a());return!0}function sZ(e,t,n){let r,o=e.state,i=o.selection.main,s=-1;if(t.from==t.to&&t.from<i.from||t.from>i.to){let l=t.from<i.from?-1:1,c=l<0?i.from:i.to,u=Td(o.facet(_d).map((f)=>f(e)),c,l);if(t.from==u)s=u}if(s>-1)r={changes:t,selection:j.cursor(t.from+t.insert.length,-1)};else if(t.from>=i.from&&t.to<=i.to&&t.to-t.from>=(i.to-i.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let l=i.from<t.from?o.sliceDoc(i.from,t.from):"",c=i.to>t.to?o.sliceDoc(t.to,i.to):"";r=o.replaceSelection(e.state.toText(l+t.insert.sliceString(0,void 0,e.state.lineBreak)+c))}else{let l=o.changes(t),c=n&&n.main.to<=l.newLength?n.main:void 0;if(o.selection.ranges.length>1&&(e.inputState.composing>=0||e.inputState.compositionPendingChange)&&t.to<=i.to+10&&t.to>=i.to-10){let u=e.state.sliceDoc(t.from,t.to),f,d=n&&_E(e,n.main.head);if(d){let m=t.insert.length-(t.to-t.from);f={from:d.from,to:d.to-m}}else f=e.state.doc.lineAt(i.head);let h=i.to-t.to;r=o.changeByRange((m)=>{if(m.from==i.from&&m.to==i.to)return{changes:l,range:c||m.map(l)};let g=m.to-h,b=g-u.length;if(e.state.sliceDoc(b,g)!=u||g>=f.from&&b<=f.to)return{range:m};let O=o.changes({from:b,to:g,insert:t.insert}),y=m.to-i.to;return{changes:O,range:!c?m.map(O):j.range(Math.max(0,c.anchor+y),Math.max(0,c.head+y))}})}else r={changes:l,selection:c&&o.selection.replaceRange(c)}}let a="input.type";if(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50){if(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange)a+=".start",e.inputState.compositionFirstChange=!1}return o.update(r,{userEvent:a,scrollIntoView:!0})}function ZE(e,t,n,r){let o=Math.min(e.length,t.length),i=0;while(i<o&&e.charCodeAt(i)==t.charCodeAt(i))i++;if(i==o&&e.length==t.length)return null;let s=e.length,a=t.length;while(s>0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1))s--,a--;if(r=="end"){let l=Math.max(0,i-Math.min(s,a));n-=s+l-i}if(s<i&&e.length<t.length){let l=n<=i&&n>=s?i-n:0;i-=l,a=i+(a-s),s=i}else if(a<i){let l=n<=i&&n>=a?i-n:0;i-=l,s=i+(s-a),a=i}return{from:i,toA:s,toB:a}}function aZ(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}=e.observer.selectionRange;if(n){if(t.push(new _1(n,r)),o!=n||i!=r)t.push(new _1(o,i))}return t}function lZ(e,t){if(e.length==0)return null;let n=e[0].pos,r=e.length==2?e[1].pos:n;return n<0||r<0?null:n==r?j.create([j.cursor(r+t,-1)]):j.single(n+t,r+t)}function wg(e,t){return t.head==e.main.head&&t.anchor==e.main.anchor}class UE{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){if(this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,ee.safari)e.contentDOM.addEventListener("input",()=>null);if(ee.gecko)SZ(e.contentDOM.ownerDocument)}handleEvent(e){if(!gZ(this.view,e)||this.ignoreDuringComposition(e))return;if(e.type=="keydown"&&this.keydown(e))return;if(this.view.updateState!=0)Promise.resolve().then(()=>this.runHandlers(e.type,e));else this.runHandlers(e.type,e)}runHandlers(e,t){let n=this.handlers[e];if(n){for(let r of n.observers)r(this.view,t);for(let r of n.handlers){if(t.defaultPrevented)break;if(r(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=uZ(e),n=this.handlers,r=this.view.contentDOM;for(let o in t)if(o!="scroll"){let i=!t[o].handlers.length,s=n[o];if(s&&i!=!s.handlers.length)r.removeEventListener(o,this.handleEvent),s=null;if(!s)r.addEventListener(o,this.handleEvent,{passive:i})}for(let o in n)if(o!="scroll"&&!t[o])r.removeEventListener(o,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&VE.indexOf(e.keyCode)<0)this.tabFocusMode=-1;if(ee.android&&ee.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if(ee.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(YE.some((t)=>t.keyCode==e.keyCode)&&!e.ctrlKey||fZ.indexOf(e.key)>-1&&e.ctrlKey)){let t={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};if(t.shiftKey&&ee.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&cZ(this.view.win))t.shiftKey=!1;let n=this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:t};return setTimeout(()=>{if(this.pendingIOSKey==n)this.flushIOSKey()},50),!0}if(e.keyCode!=229)this.view.observer.forceFlush();return!1}flushIOSKey(e){let t=this.pendingIOSKey;if(!t||this.view.observer.pendingRecords().length)return!1;if(t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString()))return!1;return this.pendingIOSKey=void 0,lu(this.view.contentDOM,t.key,t.keyCode,t.mods)}ignoreDuringComposition(e){if(!/^key/.test(e.type)||e.synthetic)return!1;if(this.composing>0)return!0;if(ee.safari&&!ee.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)return this.compositionPendingKey=!1,!0;return!1}startMouseSelection(e){if(this.mouseSelection)this.mouseSelection.destroy();this.mouseSelection=e}update(e){if(this.view.observer.update(e),this.mouseSelection)this.mouseSelection.update(e);if(this.draggedContent&&e.docChanged)this.draggedContent=this.draggedContent.map(e.changes);if(e.transactions.length)this.lastKeyCode=this.lastSelectionTime=0}destroy(){if(this.mouseSelection)this.mouseSelection.destroy()}}function cZ(e){if(!e.visualViewport)return!1;return e.visualViewport.height*e.visualViewport.scale/e.document.documentElement.clientHeight<0.85}function DQ(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(o){Qn(n.state,o)}}}function uZ(e){let t=Object.create(null);function n(r){return t[r]||(t[r]={observers:[],handlers:[]})}for(let r of e){let o=r.spec,i=o&&o.plugin.domEventHandlers,s=o&&o.plugin.domEventObservers;if(i)for(let a in i){let l=i[a];if(l)n(a).handlers.push(DQ(r.value,l))}if(s)for(let a in s){let l=s[a];if(l)n(a).observers.push(DQ(r.value,l))}}for(let r in ao)n(r).handlers.push(ao[r]);for(let r in Mn)n(r).observers.push(Mn[r]);return t}var YE=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],fZ="dthko",VE=[16,17,18,20,91,92,224,225],ig=6;function sg(e){return Math.max(0,e)*0.7+8}function dZ(e,t){return Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))}class qE{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=nE(e.contentDOM),this.atoms=e.state.facet(_d).map((i)=>i(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(Le.allowMultipleSelections)&&hZ(e,t),this.dragging=mZ(e,t)&&WE(t)==1?null:!1}start(e){if(this.dragging===!1)this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&dZ(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,n=0,r=0,o=0,i=this.view.win.innerWidth,s=this.view.win.innerHeight;if(this.scrollParents.x)({left:r,right:i}=this.scrollParents.x.getBoundingClientRect());if(this.scrollParents.y)({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let a=H1(this.view);if(e.clientX-a.left<=r+ig)t=-sg(r-e.clientX);else if(e.clientX+a.right>=i-ig)t=sg(e.clientX-i);if(e.clientY-a.top<=o+ig)n=-sg(o-e.clientY);else if(e.clientY+a.bottom>=s-ig)n=sg(e.clientY-s);this.setScrollSpeed(t,n)}up(e){if(this.dragging==null)this.select(this.lastEvent);if(!this.dragging)e.preventDefault();this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){if(this.scrollSpeed={x:e,y:t},e||t){if(this.scrolling<0)this.scrolling=setInterval(()=>this.scroll(),50)}else if(this.scrolling>-1)clearInterval(this.scrolling),this.scrolling=-1}scroll(){let{x:e,y:t}=this.scrollSpeed;if(e&&this.scrollParents.x)this.scrollParents.x.scrollLeft+=e,e=0;if(t&&this.scrollParents.y)this.scrollParents.y.scrollTop+=t,t=0;if(e||t)this.view.win.scrollBy(e,t);if(this.dragging===!1)this.select(this.lastEvent)}select(e){let{view:t}=this,n=LE(this.atoms,this.style.get(e,this.extend,this.multiple));if(this.mustSelect||!n.eq(t.state.selection,this.dragging===!1))this.view.dispatch({selection:n,userEvent:"select.pointer"});this.mustSelect=!1}update(e){if(e.transactions.some((t)=>t.isUserEvent("input.type")))this.destroy();else if(this.style.update(e))setTimeout(()=>this.select(this.lastEvent),20)}}function hZ(e,t){let n=e.state.facet(mE);return n.length?n[0](t):ee.mac?t.metaKey:t.ctrlKey}function pZ(e,t){let n=e.state.facet(gE);return n.length?n[0](t):ee.mac?!t.altKey:!t.ctrlKey}function mZ(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=Qd(e.root);if(!r||r.rangeCount==0)return!0;let o=r.getRangeAt(0).getClientRects();for(let i=0;i<o.length;i++){let s=o[i];if(s.left<=t.clientX&&s.right>=t.clientX&&s.top<=t.clientY&&s.bottom>=t.clientY)return!0}return!1}function gZ(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target,r;n!=e.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=xt.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(t))return!1;return!0}var ao=Object.create(null),Mn=Object.create(null),GE=ee.ie&&ee.ie_version<15||ee.ios&&ee.webkit_version<604;function OZ(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),HE(e,n.value)},50)}function Pg(e,t,n){for(let r of e.facet(t))n=r(n,e);return n}function HE(e,t){t=Pg(e.state,Y1,t);let{state:n}=e,r,o=1,i=n.toText(t),s=i.lines==n.selection.ranges.length;if(N1!=null&&n.selection.ranges.every((l)=>l.empty)&&N1==i.toString()){let l=-1;r=n.changeByRange((c)=>{let u=n.doc.lineAt(c.from);if(u.from==l)return{range:c};l=u.from;let f=n.toText((s?i.line(o++).text:t)+n.lineBreak);return{changes:{from:u.from,insert:f},range:j.cursor(c.from+f.length,-1)}})}else if(s)r=n.changeByRange((l)=>{let c=i.line(o++);return{changes:{from:l.from,to:l.to,insert:c.text},range:j.cursor(l.from+c.length,-1)}});else r=n.replaceSelection(i);e.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Mn.scroll=(e)=>{let t=e.inputState;if(t.lastScrollTop=e.scrollDOM.scrollTop,t.lastScrollLeft=e.scrollDOM.scrollLeft,ee.ios&&!t.touchActive)t.lastIOSMomentumScroll=Date.now()};Mn.wheel=Mn.mousewheel=(e)=>{e.inputState.lastWheelEvent=Date.now()};ao.keydown=(e,t)=>{if(e.inputState.setSelectionOrigin("select"),t.keyCode==27&&e.inputState.tabFocusMode!=0)e.inputState.tabFocusMode=Date.now()+2000;return!1};Mn.touchstart=(e,t)=>{let n=e.inputState,r=t.targetTouches[0];if(n.touchActive=!0,n.lastTouchTime=Date.now(),r)n.lastTouchX=r.clientX,n.lastTouchY=r.clientY;n.setSelectionOrigin("select.pointer")};Mn.touchmove=(e)=>{e.inputState.setSelectionOrigin("select.pointer")};Mn.touchend=(e,t)=>{e.inputState.touchActive=!1};ao.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2000)return!1;let n=null;for(let r of e.state.facet(OE))if(n=r(e,t),n)break;if(!n&&t.button==0)n=yZ(e,t);if(n){let r=!e.hasFocus;if(e.inputState.startMouseSelection(new qE(e,t,n,r)),r)e.observer.ignore(()=>{sE(e.contentDOM);let i=e.root.activeElement;if(i&&!i.contains(e.contentDOM))i.blur()});let o=e.inputState.mouseSelection;if(o)return o.start(t),o.dragging===!1}else e.inputState.setSelectionOrigin("select.pointer");return!1};function _Q(e,t,n,r){if(r==1)return j.cursor(t,n);else if(r==2)return KB(e.state,t,n);else{let o=e.docView.lineAt(t,n),i=e.state.doc.lineAt(o?o.posAtEnd:t),s=o?o.posAtStart:i.from,a=o?o.posAtEnd:i.to;if(a<e.state.doc.length&&a==i.to)a++;return j.undirectionalRange(s,a)}}var bZ=ee.ie&&ee.ie_version<=11,NQ=null,LQ=0,zQ=0;function WE(e){if(!bZ)return e.detail;let t=NQ,n=zQ;return NQ=e,zQ=Date.now(),LQ=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(LQ+1)%3:1}function yZ(e,t){let n=e.posAndSideAtCoords({x:t.clientX,y:t.clientY},!1),r=WE(t),o=e.state.selection;return{update(i){if(i.docChanged)n.pos=i.changes.mapPos(n.pos),o=o.map(i.changes)},get(i,s,a){let l=e.posAndSideAtCoords({x:i.clientX,y:i.clientY},!1),c,u=_Q(e,l.pos,l.assoc,r);if(n.pos!=l.pos&&!s){let f=_Q(e,n.pos,n.assoc,r),d=Math.min(f.from,u.from),h=Math.max(f.to,u.to);u=d<u.from?j.range(d,h,u.assoc):j.range(h,d,u.assoc)}if(s)return o.replaceRange(o.main.extend(u.from,u.to,u.assoc));else if(a&&r==1&&o.ranges.length>1&&(c=vZ(o,l.pos)))return c;else if(a)return o.addRange(u);else return j.create([u])}}}function vZ(e,t){for(let n=0;n<e.ranges.length;n++){let{from:r,to:o}=e.ranges[n];if(r<=t&&o>=t)return j.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}ao.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let o=e.docView.tile.nearest(t.target);if(o&&o.isWidget()){let i=o.posAtStart,s=i+o.length;if(i>=n.to||s<=n.from)n=j.undirectionalRange(i,s)}}let{inputState:r}=e;if(r.mouseSelection)r.mouseSelection.dragging=!0;if(r.draggedContent=n,t.dataTransfer)t.dataTransfer.setData("Text",Pg(e.state,V1,e.state.sliceDoc(n.from,n.to))),t.dataTransfer.effectAllowed="copyMove";return!1};ao.dragend=(e)=>(e.inputState.draggedContent=null,!1);function jQ(e,t,n,r){if(n=Pg(e.state,Y1,n),!n)return;let o=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:i}=e.inputState,s=r&&i&&pZ(e,t)?{from:i.from,to:i.to}:null,a={from:o,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(o,-1),head:l.mapPos(o,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}ao.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),o=0,i=()=>{if(++o==n.length)jQ(e,t,r.filter((s)=>s!=null).join(e.state.lineBreak),!1)};for(let s=0;s<n.length;s++){let a=new FileReader;a.onerror=i,a.onload=()=>{if(!/[\x00-\x08\x0e-\x1f]{2}/.test(a.result))r[s]=a.result;i()},a.readAsText(n[s])}return!0}else{let r=t.dataTransfer.getData("Text");if(r)return jQ(e,t,r,!0),!0}return!1};ao.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=GE?null:t.clipboardData;if(n)return HE(e,n.getData("text/plain")||n.getData("text/uri-list")),!0;else return OZ(e),!1};function xZ(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}function wZ(e){let t=[],n=[],r=!1;for(let o of e.selection.ranges)if(!o.empty)t.push(e.sliceDoc(o.from,o.to)),n.push(o);if(!t.length){let o=-1;for(let{from:i}of e.selection.ranges){let s=e.doc.lineAt(i);if(s.number>o)t.push(s.text),n.push({from:s.from,to:Math.min(e.doc.length,s.to+1)});o=s.number}r=!0}return{text:Pg(e,V1,t.join(e.lineBreak)),ranges:n,linewise:r}}var N1=null;ao.copy=ao.cut=(e,t)=>{if(!Rd(e.contentDOM,e.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:o}=wZ(e.state);if(!n&&!o)return!1;if(N1=o?n:null,t.type=="cut"&&!e.state.readOnly)e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let i=GE?null:t.clipboardData;if(i)return i.clearData(),i.setData("text/plain",n),!0;else return xZ(e,n),!1};var FE=fr.define();function KE(e,t){let n=[];for(let r of e.facet(vE)){let o=r(e,t);if(o)n.push(o)}return n.length?e.update({effects:n,annotations:FE.of(!0)}):null}function JE(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=KE(e.state,t);if(n)e.dispatch(n);else e.update([])}},10)}Mn.focus=(e)=>{if(e.inputState.lastFocusTime=Date.now(),!e.scrollDOM.scrollTop&&(e.inputState.lastScrollTop||e.inputState.lastScrollLeft))e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft;JE(e)};Mn.blur=(e)=>{e.observer.clearSelectionRange(),JE(e)};Mn.compositionstart=Mn.compositionupdate=(e)=>{if(e.observer.editContext)return;if(e.inputState.compositionFirstChange==null)e.inputState.compositionFirstChange=!0;if(e.inputState.composing<0){let{main:t}=e.state.selection;if(!t.empty&&e.lineBlockAt(t.from).from!=e.lineBlockAt(t.to).from)e.dispatch({changes:e.state.selection.ranges.filter((n)=>!n.empty).map((n)=>({from:n.from,to:n.to})),userEvent:"input"});e.inputState.composing=0}};Mn.compositionend=(e)=>{if(e.observer.editContext)return;if(e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,ee.chrome&&ee.android)e.observer.flushSoon();else if(e.inputState.compositionPendingChange)Promise.resolve().then(()=>e.observer.flush());else setTimeout(()=>{if(e.inputState.composing<0&&e.docView.hasComposition)e.update([])},50)};Mn.contextmenu=(e)=>{e.inputState.lastContextMenu=Date.now()};ao.beforeinput=(e,t)=>{var n,r;if(t.inputType=="insertText"||t.inputType=="insertCompositionText")e.inputState.insertingText=t.data,e.inputState.insertingTextAt=Date.now();if(t.inputType=="insertReplacementText"&&e.observer.editContext){let i=(n=t.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),s=t.getTargetRanges();if(i&&s.length){let a=s[0],l=e.posAtDOM(a.startContainer,a.startOffset),c=e.posAtDOM(a.endContainer,a.endOffset);return W1(e,{from:l,to:c,insert:e.state.toText(i)},null),!0}}let o;if(ee.chrome&&ee.android&&(o=YE.find((i)=>i.inputType==t.inputType))){if(e.observer.delayAndroidKey(o.key,o.keyCode),o.key=="Backspace"||o.key=="Delete"){let i=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var s;if((((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>i+10&&e.hasFocus)e.contentDOM.blur(),e.focus()},100)}}if(ee.ios&&t.inputType=="deleteContentForward")e.observer.flushSoon();if(ee.safari&&t.inputType=="insertText"&&e.inputState.composing>=0)setTimeout(()=>Mn.compositionend(e,t),20);return!1};var IQ=new Set;function SZ(e){if(!IQ.has(e))IQ.add(e),e.addEventListener("copy",()=>{}),e.addEventListener("cut",()=>{})}var XQ=["pre-wrap","normal","pre-line","break-spaces"],fu=!1;function BQ(){fu=!1}class eM{constructor(e){this.lineWrapping=e,this.doc=De.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;if(this.lineWrapping)n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*0.5)/this.lineLength));return this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return XQ.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r<0)n++;else if(!this.heightSamples[Math.floor(r*10)])t=!0,this.heightSamples[Math.floor(r*10)]=!0}return t}refresh(e,t,n,r,o,i){let s=XQ.indexOf(e)>-1,a=Math.abs(t-this.lineHeight)>0.3||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=o,a){this.heightSamples={};for(let l=0;l<i.length;l++){let c=i[l];if(c<0)l++;else this.heightSamples[Math.floor(c*10)]=!0}}return a}}class tM{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class oo{constructor(e,t,n,r,o){this.from=e,this.length=t,this.top=n,this.height=r,this._content=o}get type(){return typeof this._content=="number"?Lr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Wa?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new oo(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var ht=function(e){return e[e.ByPos=0]="ByPos",e[e.ByHeight=1]="ByHeight",e[e.ByPosNoHeight=2]="ByPosNoHeight",e}(ht||(ht={})),mg=0.001;class En{constructor(e,t,n=2){this.length=e,this.height=t,this.flags=n}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){if(this.height!=e){if(Math.abs(this.height-e)>mg)fu=!0;this.height=e}}replace(e,t,n){return En.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let o=this,i=n.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=r[s],f=o.lineAt(a,ht.ByPosNoHeight,n.setDoc(t),0,0),d=f.to>=l?f:o.lineAt(l,ht.ByPosNoHeight,n,0,0);u+=d.to-l,l=d.to;while(s>0&&f.from<=r[s-1].toA)if(a=r[s-1].fromA,c=r[s-1].fromB,s--,a<f.from)f=o.lineAt(a,ht.ByPosNoHeight,n,0,0);c+=f.from-a,a=f.from;let h=K1.build(n.setDoc(i),e,c,u);o=Sg(o,o.replace(a,l,h))}return o.updateHeight(n,0)}static empty(){return new hr(0,0,0)}static of(e){if(e.length==1)return e[0];let t=0,n=e.length,r=0,o=0;for(;;)if(t==n)if(r>o*2){let s=e[t-1];if(s.break)e.splice(--t,1,s.left,null,s.right);else e.splice(--t,1,s.left,s.right);n+=1+s.break,r-=s.size}else if(o>r*2){let s=e[n];if(s.break)e.splice(n,1,s.left,null,s.right);else e.splice(n,1,s.left,s.right);n+=2+s.break,o-=s.size}else break;else if(r<o){let s=e[t++];if(s)r+=s.size}else{let s=e[--n];if(s)o+=s.size}let i=!1;if(e[t-1]==null)i=!0,t--;else if(e[t]==null)i=!0,n++;return new nM(En.of(e.slice(0,t)),i,En.of(e.slice(n)))}}function Sg(e,t){if(e==t)return e;if(e.constructor!=t.constructor)fu=!0;return t}En.prototype.size=1;var kZ=we.replace({});class F1 extends En{constructor(e,t,n){super(e,t);this.deco=n,this.spaceAbove=0}mainBlock(e,t){return new oo(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,n,r){return this.spaceAbove&&e<n+this.spaceAbove?new oo(r,0,n,this.spaceAbove,kZ):this.mainBlock(n,r)}lineAt(e,t,n,r,o){let i=this.mainBlock(r,o);return this.spaceAbove?this.blockAt(0,n,r,o).join(i):i}forEachLine(e,t,n,r,o,i){if(e<=o+this.length&&t>=o)i(this.lineAt(0,ht.ByPos,n,r,o))}setMeasuredHeight(e){let t=e.heights[e.index++];if(t<0)this.spaceAbove=-t,t=e.heights[e.index++];else this.spaceAbove=0;this.setHeight(t)}updateHeight(e,t=0,n=!1,r){if(r&&r.from<=t&&r.more)this.setMeasuredHeight(r);return this.outdated=!1,this}toString(){return`block(${this.length})`}}class hr extends F1{constructor(e,t,n){super(e,t,null);this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=n}mainBlock(e,t){return new oo(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,n){let r=n[0];if(n.length==1&&(r instanceof hr||r instanceof fn&&r.flags&4)&&Math.abs(this.length-r.length)<10){if(r instanceof fn)r=new hr(r.length,this.height,this.spaceAbove);else r.height=this.height;if(!this.outdated)r.outdated=!1;return r}else return En.of(n)}updateHeight(e,t=0,n=!1,r){if(r&&r.from<=t&&r.more)this.setMeasuredHeight(r);else if(n||this.outdated)this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight);return this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class fn extends En{constructor(e){super(e,0)}heightMetrics(e,t){let n=e.doc.lineAt(t).number,r=e.doc.lineAt(t+this.length).number,o=r-n+1,i,s=0;if(e.lineWrapping){let a=Math.min(this.height,e.lineHeight*o);if(i=a/o,this.length>o+1)s=(this.height-a)/(this.length-o-1)}else i=this.height/o;return{firstLine:n,lastLine:r,perLine:i,perChar:s}}blockAt(e,t,n,r){let{firstLine:o,lastLine:i,perLine:s,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let l=r+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length)),c=t.doc.lineAt(l),u=s+c.length*a,f=Math.max(n,e-u/2);return new oo(c.from,c.length,f,u,0)}else{let l=Math.max(0,Math.min(i-o,Math.floor((e-n)/s))),{from:c,length:u}=t.doc.line(o+l);return new oo(c,u,n+s*l,s,0)}}lineAt(e,t,n,r,o){if(t==ht.ByHeight)return this.blockAt(e,n,r,o);if(t==ht.ByPosNoHeight){let{from:d,to:h}=n.doc.lineAt(e);return new oo(d,h-d,0,0,0)}let{firstLine:i,perLine:s,perChar:a}=this.heightMetrics(n,o),l=n.doc.lineAt(e),c=s+l.length*a,u=l.number-i,f=r+s*u+a*(l.from-o-u);return new oo(l.from,l.length,Math.max(r,Math.min(f,r+this.height-c)),c,0)}forEachLine(e,t,n,r,o,i){e=Math.max(e,o),t=Math.min(t,o+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,o);for(let c=e,u=r;c<=t;){let f=n.doc.lineAt(c);if(c==e){let h=f.number-s;u+=a*h+l*(e-o-h)}let d=a+l*f.length;i(new oo(f.from,f.length,u,d,0)),u+=d,c=f.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let o=n[n.length-1];if(o instanceof fn)n[n.length-1]=new fn(o.length+r);else n.push(null,new fn(r-1))}if(e>0){let o=n[0];if(o instanceof fn)n[0]=new fn(e+o.length);else n.unshift(new fn(e-1),null)}return En.of(n)}decomposeLeft(e,t){t.push(new fn(e-1),null)}decomposeRight(e,t){t.push(null,new fn(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let o=t+this.length;if(r&&r.from<=t+this.length&&r.more){let i=[],s=Math.max(t,r.from),a=-1;if(r.from>t)i.push(new fn(r.from-t-1).updateHeight(e,t));while(s<=o&&r.more){let c=e.doc.lineAt(s).length;if(i.length)i.push(null);let u=r.heights[r.index++],f=0;if(u<0)f=-u,u=r.heights[r.index++];if(a==-1)a=u;else if(Math.abs(u-a)>=mg)a=-2;let d=new hr(c,u,f);d.outdated=!1,i.push(d),s+=c+1}if(s<=o)i.push(null,new fn(o-s).updateHeight(e,s));let l=En.of(i);if(a<0||Math.abs(l.height-this.height)>=mg||Math.abs(a-this.heightMetrics(e,t).perLine)>=mg)fu=!0;return Sg(this,l)}else if(n||this.outdated)this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1;return this}toString(){return`gap(${this.length})`}}class nM extends En{constructor(e,t,n){super(e.length+(t?1:0)+n.length,e.height+n.height,(t?1:0)|(e.outdated||n.outdated?2:0));this.left=e,this.right=n,this.size=e.size+n.size}get break(){return this.flags&1}blockAt(e,t,n,r){let o=n+this.left.height;return e<o?this.left.blockAt(e,t,n,r):this.right.blockAt(e,t,o,r+this.left.length+this.break)}lineAt(e,t,n,r,o){let i=r+this.left.height,s=o+this.left.length+this.break,a=t==ht.ByHeight?e<i:e<s,l=a?this.left.lineAt(e,t,n,r,o):this.right.lineAt(e,t,n,i,s);if(this.break||(a?l.to<s:l.from>s))return l;let c=t==ht.ByPosNoHeight?ht.ByPosNoHeight:ht.ByPos;if(a)return l.join(this.right.lineAt(s,c,n,i,s));else return this.left.lineAt(s,c,n,r,o).join(l)}forEachLine(e,t,n,r,o,i){let s=r+this.left.height,a=o+this.left.length+this.break;if(this.break){if(e<a)this.left.forEachLine(e,t,n,r,o,i);if(t>=a)this.right.forEachLine(e,t,n,s,a,i)}else{let l=this.lineAt(a,ht.ByPos,n,r,o);if(e<l.from)this.left.forEachLine(e,Math.min(t,l.from-1),n,r,o,i);if(l.to>=e&&l.from<=t)i(l);if(t>l.to)this.right.forEachLine(Math.max(e,l.to+1),t,n,s,a,i)}}replace(e,t,n){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,n),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let o=[];if(e>0)this.decomposeLeft(e,o);let i=o.length;for(let s of n)o.push(s);if(e>0)ZQ(o,i-1);if(t<this.length){let s=o.length;this.decomposeRight(t,o),ZQ(o,s)}return En.of(o)}decomposeLeft(e,t){let n=this.left.length;if(e<=n)return this.left.decomposeLeft(e,t);if(t.push(this.left),this.break){if(n++,e>=n)t.push(null)}if(e>n)this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);if(e<n)this.left.decomposeRight(e,t);if(this.break&&e<r)t.push(null);t.push(this.right)}balanced(e,t){if(e.size>2*t.size||t.size>2*e.size)return En.of(this.break?[e,null,t]:[e,t]);return this.left=Sg(this.left,e),this.right=Sg(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this}updateHeight(e,t=0,n=!1,r){let{left:o,right:i}=this,s=t+o.length+this.break,a=null;if(r&&r.from<=t+o.length&&r.more)a=o=o.updateHeight(e,t,n,r);else o.updateHeight(e,t,n);if(r&&r.from<=s+i.length&&r.more)a=i=i.updateHeight(e,s,n,r);else i.updateHeight(e,s,n);if(a)return this.balanced(o,i);return this.height=this.left.height+this.right.height,this.outdated=!1,this}toString(){return this.left+(this.break?" ":"-")+this.right}}function ZQ(e,t){let n,r;if(e[t]==null&&(n=e[t-1])instanceof fn&&(r=e[t+1])instanceof fn)e.splice(t-1,3,new fn(n.length+1+r.length))}var CZ=5;class K1{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let n=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];if(r instanceof hr)r.length+=n-this.pos;else if(n>this.pos||!this.isCovered)this.nodes.push(new hr(n-this.pos,-1,0));if(this.writtenTo=n,t>n)this.nodes.push(null),this.writtenTo++,this.lineStart=-1}this.pos=t}point(e,t,n){if(e<t||n.heightRelevant){let r=n.widget?n.widget.estimatedHeight:0,o=n.widget?n.widget.lineBreaks:0;if(r<0)r=this.oracle.lineHeight;let i=t-e;if(n.block)this.addBlock(new F1(i,r,n));else if(i||o||r>=CZ)this.addLineDeco(r,o,i)}else if(t>e)this.span(e,t);if(this.lineEnd>-1&&this.lineEnd<this.pos)this.lineEnd=this.oracle.doc.lineAt(this.pos).to}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);if(this.lineStart=e,this.lineEnd=t,this.writtenTo<e){if(this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)this.nodes.push(this.blankContent(this.writtenTo,e-1));this.nodes.push(null)}if(this.pos>e)this.nodes.push(new hr(this.pos-e,-1,0));this.writtenTo=this.pos}blankContent(e,t){let n=new fn(t-e);if(this.oracle.doc.lineAt(e).to==t)n.flags|=4;return n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof hr)return e;let t=new hr(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;if(t&&t.startSide>0&&!this.isCovered)this.ensureLine();if(this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0)this.covering=e}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];if(this.lineStart>-1&&!(t instanceof hr)&&!this.isCovered)this.nodes.push(new hr(0,-1,0));else if(this.writtenTo<this.pos||t==null)this.nodes.push(this.blankContent(this.writtenTo,this.pos));let n=e;for(let r of this.nodes){if(r instanceof hr)r.updateHeight(this.oracle,n);n+=r?r.length:1}return this.nodes}static build(e,t,n,r){let o=new K1(n,e);return Ve.spans(t,n,r,o,0),o.finish(n)}}function RZ(e,t,n){let r=new rM;return Ve.compare(e,t,n,r,0),r.changes}class rM{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,n,r){if(e<t||n&&n.heightRelevant||r&&r.heightRelevant)au(e,t,this.changes,5)}}function PZ(e,t){let n=e.getBoundingClientRect(),r=e.ownerDocument,o=r.defaultView||window,i=Math.max(0,n.left),s=Math.min(o.innerWidth,n.right),a=Math.max(0,n.top),l=Math.min(o.innerHeight,n.bottom);for(let c=e.parentNode;c&&c!=r.body;)if(c.nodeType==1){let u=c,f=window.getComputedStyle(u);if((u.scrollHeight>u.clientHeight||u.scrollWidth>u.clientWidth)&&f.overflow!="visible"){let d=u.getBoundingClientRect();i=Math.max(i,d.left),s=Math.min(s,d.right),a=Math.max(a,d.top),l=Math.min(c==e.parentNode?o.innerHeight:l,d.bottom)}c=f.position=="absolute"||f.position=="fixed"?u.offsetParent:u.parentNode}else if(c.nodeType==11)c=c.host;else break;return{left:i-n.left,right:Math.max(i,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function TZ(e){let t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView||window;return t.left<n.innerWidth&&t.right>0&&t.top<n.innerHeight&&t.bottom>0}function AZ(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class gg{constructor(e,t,n,r){this.from=e,this.to=t,this.size=n,this.displaySize=r}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],o=t[n];if(r.from!=o.from||r.to!=o.to||r.size!=o.size)return!1}return!0}draw(e,t){return we.replace({widget:new oM(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class oM extends $n{constructor(e,t){super();this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");if(this.vertical)e.style.height=this.size+"px";else e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block";return e}get estimatedHeight(){return this.vertical?this.size:-1}}class L1{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=UQ,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=pt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=t.facet(q1).some((r)=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new eM(n),this.stateDeco=YQ(t),this.heightMap=En.empty().applyChanges(this.stateDeco,De.empty,this.heightOracle.setDoc(t.doc),[new Nr(0,0,0,t.doc.length)]);for(let r=0;r<2;r++)if(this.viewport=this.getViewport(0,null),!this.updateForViewport())break;this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=we.set(this.lineGaps.map((r)=>r.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:o,to:i})=>r>=o&&r<=i)){let{from:o,to:i}=this.lineBlockAt(r);e.push(new kd(o,i))}}return this.viewports=e.sort((n,r)=>n.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7000000?UQ:new J1(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(e)=>{this.viewportLines.push(Cd(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=YQ(this.state);let r=e.changedRanges,o=Nr.extendWithRanges(r,RZ(n,this.stateDeco,e?e.changes:Et.empty(this.state.doc.length))),i=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);if(BQ(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),this.heightMap.height!=i||fu)e.flags|=2;if(s)this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top;else this.scrollAnchorPos=-1,this.scrollAnchorHeight=i;let a=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;if(t&&(t.range.head<a.from||t.range.head>a.to)||!this.viewportIsAppropriate(a))a=this.getViewport(0,t);let l=a.from!=this.viewport.from||a.to!=this.viewport.to;if(this.viewport=a,e.flags|=this.updateForViewport(),l||!e.changes.empty||e.flags&2)this.updateViewportLines();if(this.lineGaps.length||this.viewport.to-this.viewport.from>4000)this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes)));if(e.flags|=this.computeVisibleRanges(e.changes),t)this.scrollTarget=t;if(!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(NB))this.mustEnforceCursorAssoc=!0}measure(){let{view:e}=this,t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,o=n.whiteSpace;this.defaultTextDirection=n.direction=="rtl"?pt.RTL:pt.LTR;let i=this.heightOracle.mustRefreshForWrapping(o)||this.mustMeasureContent==="refresh",s=t.getBoundingClientRect(),a=i||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,c=0;if(s.width&&s.height){let{scaleX:x,scaleY:w}=tE(t,s);if(x>0.005&&Math.abs(this.scaleX-x)>0.005||w>0.005&&Math.abs(this.scaleY-w)>0.005)this.scaleX=x,this.scaleY=w,l|=16,i=a=!0}let u=(parseInt(n.paddingTop)||0)*this.scaleY,f=(parseInt(n.paddingBottom)||0)*this.scaleY;if(this.paddingTop!=u||this.paddingBottom!=f)this.paddingTop=u,this.paddingBottom=f,l|=18;if(this.editorWidth!=e.scrollDOM.clientWidth){if(r.lineWrapping)a=!0;this.editorWidth=e.scrollDOM.clientWidth,l|=16}let d=nE(this.view.contentDOM,!1).y;if(d!=this.scrollParent)this.scrollParent=d,this.scrollAnchorHeight=-1,this.scrollOffset=0;let h=this.getScrollOffset();if(this.scrollOffset!=h)this.scrollAnchorHeight=-1,this.scrollOffset=h;this.scrolledToBottom=aE(this.scrollParent||e.win);let m=(this.printing?AZ:PZ)(t,this.paddingTop),g=m.top-this.pixelViewport.top,b=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let O=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(O!=this.inView){if(this.inView=O,O)a=!0}if(!this.inView&&!this.scrollTarget&&!TZ(e.dom))return 0;let y=s.width;if(this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,l|=16;if(a){let x=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(x))i=!0;if(i||r.lineWrapping&&Math.abs(y-this.contentDOMWidth)>r.charWidth){let{lineHeight:w,charWidth:S,textHeight:k}=e.docView.measureTextSize();if(i=w>0&&r.refresh(o,w,S,k,Math.max(5,y/S),x),i)e.docView.minWidth=0,l|=16}if(g>0&&b>0)c=Math.max(g,b);else if(g<0&&b<0)c=Math.min(g,b);BQ();for(let w of this.viewports){let S=w.from==this.viewport.from?x:e.docView.measureVisibleLineHeights(w);this.heightMap=(i?En.empty().applyChanges(this.stateDeco,De.empty,this.heightOracle,[new Nr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,i,new tM(w.from,S))}if(fu)l|=2}let v=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);if(v){if(l&2)l|=this.updateScaler();this.viewport=this.getViewport(c,this.scrollTarget),l|=this.updateForViewport()}if(l&2||v)this.updateViewportLines();if(this.lineGaps.length||this.viewport.to-this.viewport.from>4000)this.updateLineGaps(this.ensureLineGaps(i?[]:this.lineGaps,e));if(l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc)this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc();return l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=0.5-Math.max(-0.5,Math.min(0.5,e/1000/2)),r=this.heightMap,o=this.heightOracle,{visibleTop:i,visibleBottom:s}=this,a=new kd(r.lineAt(i-n*1000,ht.ByHeight,o,0,0).from,r.lineAt(s+(1-n)*1000,ht.ByHeight,o,0,0).to);if(t){let{head:l}=t.range;if(l<a.from||l>a.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),u=r.lineAt(l,ht.ByPos,o,0,0),f;if(t.y=="center")f=(u.top+u.bottom)/2-c/2;else if(t.y=="start"||t.y=="nearest"&&l<a.from)f=u.top;else f=u.bottom-c;a=new kd(r.lineAt(f-500,ht.ByHeight,o,0,0).from,r.lineAt(f+c+500,ht.ByHeight,o,0,0).to)}}return a}mapViewport(e,t){let n=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new kd(this.heightMap.lineAt(n,ht.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,ht.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},n=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,ht.ByPos,this.heightOracle,0,0),{bottom:o}=this.heightMap.lineAt(t,ht.ByPos,this.heightOracle,0,0),{visibleTop:i,visibleBottom:s}=this;return(e==0||r<=i-Math.max(10,Math.min(-n,250)))&&(t==this.state.doc.length||o>=s+Math.max(10,Math.min(n,250)))&&(r>i-2000&&o<s+2000)}mapLineGaps(e,t){if(!e.length||t.empty)return e;let n=[];for(let r of e)if(!t.touchesRange(r.from,r.to))n.push(new gg(t.mapPos(r.from),t.mapPos(r.to),r.size,r.displaySize));return n}ensureLineGaps(e,t){let n=this.heightOracle.lineWrapping,r=n?1e4:2000,o=r>>1,i=r<<1;if(this.defaultTextDirection!=pt.LTR&&!n)return[];let s=[],a=(c,u,f,d)=>{if(u-c<o)return;let h=this.state.selection.main,m=[h.from];if(!h.empty)m.push(h.to);for(let b of m)if(b>c&&b<u){a(c,b-10,f,d),a(b+10,u,f,d);return}let g=EZ(e,(b)=>b.from>=f.from&&b.to<=f.to&&Math.abs(b.from-c)<o&&Math.abs(b.to-u)<o&&!m.some((O)=>b.from<O&&b.to>O));if(!g){if(u<f.to&&t&&n&&t.visibleRanges.some((y)=>y.from<=u&&y.to>=u)){let y=t.moveToLineBoundary(j.cursor(u),!1,!0).head;if(y>c)u=y}let b=this.gapSize(f,c,u,d),O=n||b<2000000?b:2000000;g=new gg(c,u,b,O)}s.push(g)},l=(c)=>{if(c.length<i||c.type!=Lr.Text)return;let u=QZ(c.from,c.to,this.stateDeco);if(u.total<i)return;let f=this.scrollTarget?this.scrollTarget.range.head:null,d,h;if(n){let m=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,g,b;if(f!=null){let O=lg(u,f),y=((this.visibleBottom-this.visibleTop)/2+m)/c.height;g=O-y,b=O+y}else g=(this.visibleTop-c.top-m)/c.height,b=(this.visibleBottom-c.top+m)/c.height;d=ag(u,g),h=ag(u,b)}else{let m=u.total*this.heightOracle.charWidth,g=r*this.heightOracle.charWidth,b=0;if(m>2000000){for(let w of e)if(w.from>=c.from&&w.from<c.to&&w.size!=w.displaySize&&w.from*this.heightOracle.charWidth+b<this.pixelViewport.left)b=w.size-w.displaySize}let O=this.pixelViewport.left+b,y=this.pixelViewport.right+b,v,x;if(f!=null){let w=lg(u,f),S=((y-O)/2+g)/m;v=w-S,x=w+S}else v=(O-g)/m,x=(y+g)/m;d=ag(u,v),h=ag(u,x)}if(d>c.from)a(c.from,d,c,u);if(h<c.to)a(h,c.to,c,u)};for(let c of this.viewportLines)if(Array.isArray(c.type))c.type.forEach(l);else l(c);return s}gapSize(e,t,n,r){let o=lg(r,n)-lg(r,t);if(this.heightOracle.lineWrapping)return e.height*o;else return r.total*this.heightOracle.charWidth*o}updateLineGaps(e){if(!gg.same(e,this.lineGaps))this.lineGaps=e,this.lineGapDeco=we.set(e.map((t)=>t.draw(this,this.heightOracle.lineWrapping)))}computeVisibleRanges(e){let t=this.stateDeco;if(this.lineGaps.length)t=t.concat(this.lineGapDeco);let n=[];Ve.spans(t,this.viewport.from,this.viewport.to,{span(o,i){n.push({from:o,to:i})},point(){}},20);let r=0;if(n.length!=this.visibleRanges.length)r=12;else for(let o=0;o<n.length&&!(r&8);o++){let i=this.visibleRanges[o],s=n[o];if(i.from!=s.from||i.to!=s.to){if(r|=4,!(e&&e.mapPos(i.from,-1)==s.from&&e.mapPos(i.to,1)==s.to))r|=8}}return this.visibleRanges=n,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find((t)=>t.from<=e&&t.to>=e)||Cd(this.heightMap.lineAt(e,ht.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((t)=>t.top<=e&&t.bottom>=e)||Cd(this.heightMap.lineAt(this.scaler.fromDOM(e),ht.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return Cd(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class kd{constructor(e,t){this.from=e,this.to=t}}function QZ(e,t,n){let r=[],o=e,i=0;if(Ve.spans(n,e,t,{span(){},point(s,a){if(s>o)r.push({from:o,to:s}),i+=s-o;o=a}},20),o<t)r.push({from:o,to:t}),i+=t-o;return{total:i,ranges:r}}function ag({total:e,ranges:t},n){if(n<=0)return t[0].from;if(n>=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let o=0;;o++){let{from:i,to:s}=t[o],a=s-i;if(r<=a)return i+r;r-=a}}function lg(e,t){let n=0;for(let{from:r,to:o}of e.ranges){if(t<=o){n+=t-r;break}n+=o-r}return n/e.total}function EZ(e,t){for(let n of e)if(t(n))return n;return}var UQ={toDOM(e){return e},fromDOM(e){return e},scale:1,eq(e){return e==this}};function YQ(e){let t=e.facet(Rg).filter((r)=>typeof r!="function"),n=e.facet(G1).filter((r)=>typeof r!="function");if(n.length)t.push(Ve.join(n));return t}class J1{constructor(e,t,n){let r=0,o=0,i=0;this.viewports=n.map(({from:s,to:a})=>{let l=t.lineAt(s,ht.ByPos,e,0,0).top,c=t.lineAt(a,ht.ByPos,e,0,0).bottom;return r+=c-l,{from:s,to:a,top:l,bottom:c,domTop:0,domBottom:0}}),this.scale=(7000000-r)/(t.height-r);for(let s of this.viewports)s.domTop=i+(s.top-o)*this.scale,i=s.domBottom=s.domTop+(s.bottom-s.top),o=s.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.top)return r+(e-n)*this.scale;if(e<=o.bottom)return o.domTop+(e-o.top);n=o.bottom,r=o.domBottom}}fromDOM(e){for(let t=0,n=0,r=0;;t++){let o=t<this.viewports.length?this.viewports[t]:null;if(!o||e<o.domTop)return n+(e-r)/this.scale;if(e<=o.domBottom)return o.top+(e-o.domTop);n=o.bottom,r=o.domBottom}}eq(e){if(!(e instanceof J1))return!1;return this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,n)=>t.from==e.viewports[n].from&&t.to==e.viewports[n].to)}}function Cd(e,t){if(t.scale==1)return e;let n=t.toDOM(e.top),r=t.toDOM(e.bottom);return new oo(e.from,e.length,n,r-n,Array.isArray(e._content)?e._content.map((o)=>Cd(o,t)):e._content)}var cg=he.define({combine:(e)=>e.join(" ")}),z1=he.define({combine:(e)=>e.indexOf(!0)>-1}),j1=no.newName(),iM=no.newName(),sM=no.newName(),aM={"&light":"."+iM,"&dark":"."+sM};function I1(e,t,n){return new no(t,{finish(r){return/&/.test(r)?r.replace(/&\w*/,(o)=>{if(o=="&")return e;if(!n||!n[o])throw RangeError(`Unsupported selector: ${o}`);return n[o]}):e+" "+r}})}var MZ=I1("."+j1,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},".cm-panels-top":{top:"0"},".cm-panels-bottom":{bottom:"0"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{background:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat",backgroundSize:".4em",backgroundPosition:"calc(min(50%, 0px)) center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},aM),$Z={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},x1=ee.ie&&ee.ie_version<=11;class lM{constructor(e){if(this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new rE,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver((t)=>{for(let n of t)this.queue.push(n);if((ee.ie&&ee.ie_version<=11||ee.ios&&e.composing)&&t.some((n)=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length))this.flushSoon();else this.flush()}),window.EditContext&&ee.android&&e.constructor.EDIT_CONTEXT!==!1&&!(ee.chrome&&ee.chrome_version<126)){if(this.editContext=new cM(e),e.state.facet(Ai))e.contentDOM.editContext=this.editContext.editContext}if(x1)this.onCharData=(t)=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()};if(this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia)this.printQuery=window.matchMedia("print");if(typeof ResizeObserver=="function")this.resizeScroll=new ResizeObserver(()=>{var t;if(((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75)this.onResize()}),this.resizeScroll.observe(e.scrollDOM);if(this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function")this.intersection=new IntersectionObserver((t)=>{if(this.parentCheck<0)this.parentCheck=setTimeout(this.listenForScroll.bind(this),1000);if(t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting){if(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView)this.onScrollChanged(document.createEvent("Event"))}},{threshold:[0,0.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t)=>{if(t.length>0&&t[t.length-1].intersectionRatio>0)this.onScrollChanged(document.createEvent("Event"))},{});this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){if(this.view.inputState.runHandlers("scroll",e),this.intersecting)this.view.measure()}onScroll(e){if(this.intersecting)this.flush(!1);if(this.editContext)this.view.requestMeasure(this.editContext.measureReq);this.onScrollChanged(e)}onResize(){if(this.resizeTimeout<0)this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50)}onPrint(e){if((e.type=="change"||!e.type)&&!e.matches)return;this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Ai)?n.root.activeElement!=this.dom:!Rd(this.dom,r))return;let o=r.anchorNode&&n.docView.tile.nearest(r.anchorNode);if(o&&o.isWidget()&&o.widget.ignoreEvent(e)){if(!t)this.selectionChanged=!1;return}if((ee.ie&&ee.ie_version<=11||ee.android&&ee.chrome)&&!n.state.selection.main.empty&&r.focusNode&&Pd(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset))this.flushSoon();else this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Qd(e.root);if(!t)return!1;let n=ee.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&DZ(this.view,t)||t;if(!n||this.selectionRange.eq(n))return!1;let r=Rd(this.dom,n);if(r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&RB(this.dom,n))return this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1;if(this.selectionRange.setRange(n),r)this.selectionChanged=!0;return!0}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let n=this.dom;n;)if(n.nodeType==1){if(!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==n)e++;else if(!t)t=this.scrollTargets.slice(0,e);if(t)t.push(n);n=n.assignedSlot||n.parentNode}else if(n.nodeType==11)n=n.host;else break;if(e<this.scrollTargets.length&&!t)t=this.scrollTargets.slice(0,e);if(t){for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);for(let n of this.scrollTargets=t)n.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){if(this.active)return;if(this.observer.observe(this.dom,$Z),x1)this.dom.addEventListener("DOMCharacterDataModified",this.onCharData);this.active=!0}stop(){if(!this.active)return;if(this.active=!1,this.observer.disconnect(),x1)this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData)}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var n;if(!this.delayedAndroidKey){let r=()=>{let o=this.delayedAndroidKey;if(o){if(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force)lu(this.dom,o.key,o.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}if(!this.delayedAndroidKey||e=="Enter")this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!((n=this.delayedAndroidKey)===null||n===void 0?void 0:n.force)}}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){if(this.delayedFlush<0)this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()})}forceFlush(){if(this.delayedFlush>=0)this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1;this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();if(e.length)this.queue=[];let t=-1,n=-1,r=!1;for(let o of e){let i=this.readMutation(o);if(!i)continue;if(i.typeOver)r=!0;if(t==-1)({from:t,to:n}=i);else t=Math.min(i.from,t),n=Math.max(i.to,n)}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&Rd(this.dom,this.selectionRange);if(e<0&&!r)return null;if(e>-1)this.lastChange=Date.now();this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new IE(this.view,e,t,n);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;if(e)this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=BE(this.view,t);if(this.view.state==n&&(t.domChanged||t.newSel&&!wg(this.view.state.selection,t.newSel.main)))this.view.update([]);return r}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let n=VQ(t,e.previousSibling||e.target.previousSibling,-1),r=VQ(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else if(e.type=="characterData")return{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue};else return null}setWindow(e){if(e!=this.win)this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win)}addWindowListeners(e){if(e.addEventListener("resize",this.onResize),this.printQuery)if(this.printQuery.addEventListener)this.printQuery.addEventListener("change",this.onPrint);else this.printQuery.addListener(this.onPrint);else e.addEventListener("beforeprint",this.onPrint);e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){if(e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery)if(this.printQuery.removeEventListener)this.printQuery.removeEventListener("change",this.onPrint);else this.printQuery.removeListener(this.onPrint);else e.removeEventListener("beforeprint",this.onPrint);e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){if(this.editContext){if(this.editContext.update(e),e.startState.facet(Ai)!=e.state.facet(Ai))e.view.contentDOM.editContext=e.state.facet(Ai)?this.editContext.editContext:null}}destroy(){var e,t,n;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(n=this.resizeScroll)===null||n===void 0||n.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);if(this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext)this.view.contentDOM.editContext=null,this.editContext.destroy()}}function VQ(e,t,n){while(t){let r=xt.get(t);if(r&&r.parent==e)return r;let o=t.parentNode;t=o!=e.dom?o:n>0?t.nextSibling:t.previousSibling}return null}function qQ(e,t){let{startContainer:n,startOffset:r,endContainer:o,endOffset:i}=t,s=e.docView.domAtPos(e.state.selection.main.anchor,1);if(Pd(s.node,s.offset,o,i))[n,r,o,i]=[o,i,n,r];return{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function DZ(e,t){if(t.getComposedRanges){let o=t.getComposedRanges(e.root)[0];if(o)return qQ(e,o)}let n=null;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return e.contentDOM.addEventListener("beforeinput",r,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",r,!0),n?qQ(e,n):null}class cM{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=(n)=>{let r=e.state.selection.main,{anchor:o,head:i}=r,s=this.toEditorPos(n.updateRangeStart),a=this.toEditorPos(n.updateRangeEnd);if(e.inputState.composing>=0&&!this.composing)this.composing={contextBase:n.updateRangeStart,editorBase:s,drifted:!1};let l=a-s>n.text.length;if(s==this.from&&o<this.from)s=o;else if(a==this.to&&o>this.to)a=o;let c=ZE(e.state.sliceDoc(s,a),n.text,(l?r.from:r.to)-s,l?"end":null);if(!c){let f=j.single(this.toEditorPos(n.selectionStart),this.toEditorPos(n.selectionEnd));if(!wg(f,r))e.dispatch({selection:f,userEvent:"select"});return}let u={from:c.from+s,to:c.toA+s,insert:De.of(n.text.slice(c.from,c.toB).split(`
19
+ `))};if((ee.mac||ee.android)&&u.from==i-1&&/^\. ?$/.test(n.text)&&e.contentDOM.getAttribute("autocorrect")=="off")u={from:s,to:a,insert:De.of([n.text.replace("."," ")])};if(this.pendingContextChange=u,!e.state.readOnly){let f=this.to-this.from+(u.to-u.from+u.insert.length);W1(e,u,j.single(this.toEditorPos(n.selectionStart,f),this.toEditorPos(n.selectionEnd,f)))}if(this.pendingContextChange)this.revertPending(e.state),this.setSelection(e.state);if(u.from<u.to&&!u.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,n.updateRangeStart-1),Math.min(t.text.length,n.updateRangeStart+1))))this.handlers.compositionend(n)},this.handlers.characterboundsupdate=(n)=>{let r=[],o=null;for(let i=this.toEditorPos(n.rangeStart),s=this.toEditorPos(n.rangeEnd);i<s;i++){let a=e.coordsForChar(i);o=a&&new DOMRect(a.left,a.top,a.right-a.left,a.bottom-a.top)||o||new DOMRect,r.push(o)}t.updateCharacterBounds(n.rangeStart,r)},this.handlers.textformatupdate=(n)=>{let r=[];for(let o of n.getTextFormats()){let{underlineStyle:i,underlineThickness:s}=o;if(!/none/i.test(i)&&!/none/i.test(s)){let a=this.toEditorPos(o.rangeStart),l=this.toEditorPos(o.rangeEnd);if(a<l){let c=`text-decoration: underline ${/^[a-z]/.test(i)?i+" ":i=="Dashed"?"dashed ":i=="Squiggle"?"wavy ":""}${/thin/i.test(s)?1:2}px`;r.push(we.mark({attributes:{style:c}}).range(a,l))}}}e.dispatch({effects:SE.of(we.set(r))})},this.handlers.compositionstart=()=>{if(e.inputState.composing<0)e.inputState.composing=0,e.inputState.compositionFirstChange=!0},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:n}=this.composing;if(this.composing=null,n)this.reset(e.state)}};for(let n in this.handlers)t.addEventListener(n,this.handlers[n]);this.measureReq={read:(n)=>{let r=Qd(n.root);if(r&&r.rangeCount)this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,n=!1,r=this.pendingContextChange;if(e.changes.iterChanges((o,i,s,a,l)=>{if(n)return;let c=l.length-(i-o);if(r&&i>=r.to)if(r.from==o&&r.to==i&&r.insert.eq(l)){r=this.pendingContextChange=null,t+=c,this.to+=c;return}else r=null,this.revertPending(e.state);if(o+=t,i+=t,i<=this.from)this.from+=c,this.to+=c;else if(o<this.to){if(o<this.from||i>this.to||this.to-this.from+l.length>30000){n=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(i),l.toString()),this.to+=c}t+=c}),r&&!n)this.revertPending(e.state);return!n}update(e){let t=this.pendingContextChange,n=e.startState.selection.main;if(this.composing&&(this.composing.drifted||!e.changes.touchesRange(n.from,n.to)&&e.transactions.some((r)=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to))))this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase);else if(!this.applyEdits(e)||!this.rangeIsValid(e.state))this.pendingContextChange=null,this.reset(e.state);else if(e.docChanged||e.selectionSet||t)this.setSelection(e.state);if(e.geometryChanged||e.docChanged||e.selectionSet)e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,n=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),r=this.toContextPos(t.head);if(this.editContext.selectionStart!=n||this.editContext.selectionEnd!=r)this.editContext.updateSelection(n,r)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>30000)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let n=this.composing;return n&&n.drifted?n.editorBase+(e-n.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class re{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;if(this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.clearAnnouncement=-1,this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent)e.parent.appendChild(this.dom);let{dispatch:n}=e;if(this.dispatchTransactions=e.dispatchTransactions||n&&((r)=>r.forEach((o)=>n(o,this)))||((r)=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||CB(e.parent)||document,this.viewState=new L1(this,e.state||Le.create(e)),e.scrollTo&&e.scrollTo.is(og))this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state);this.plugins=this.state.facet(su).map((r)=>new hg(r));for(let r of this.plugins)r.update(this);if(this.observer=new lM(this),this.inputState=new UE(this),this.inputState.ensureHandlers(this.plugins),this.docView=new M1(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(t=document.fonts)===null||t===void 0?void 0:t.ready)document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof yt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,n=!1,r,o=this.state;for(let f of e){if(f.startState!=o)throw RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let i=this.hasFocus,s=0,a=null;if(e.some((f)=>f.annotation(FE)))this.inputState.notifiedFocused=i,s=1;else if(i!=this.inputState.notifiedFocused){if(this.inputState.notifiedFocused=i,a=KE(o,i),!a)s=1}let l=this.observer.delayedAndroidKey,c=null;if(l){if(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))c=null}else this.observer.clear();if(o.facet(Le.phrases)!=this.state.facet(Le.phrases))return this.setState(o);r=vg.create(this,o,e),r.flags|=s;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(u)u=u.map(f.changes);if(f.scrollIntoView){let{main:d}=f.state.selection,{x:h,y:m}=this.state.facet(re.cursorScrollMargin);u=new cu(d.empty?d:j.cursor(d.head,d.head>d.anchor?-1:1),"nearest","nearest",m,h)}for(let d of f.effects)if(d.is(og))u=d.value.clip(this.state)}if(this.viewState.update(r,u),this.bidiCache=kg.update(this.bidiCache,r.changes),!r.empty)this.updatePlugins(r),this.inputState.update(r);if(t=this.docView.update(r),this.state.facet(Sd)!=this.styleModules)this.mountStyles();n=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some((f)=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(cg)!=r.state.facet(cg))this.viewState.mustMeasureContent=!0;if(t||n||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)this.requestMeasure();if(t)this.docViewUpdate();if(!r.empty)for(let f of this.state.facet(E1))try{f(r)}catch(d){Qn(this.state,d,"update listener")}if(a||c)Promise.resolve().then(()=>{if(a&&this.state==a.startState)this.dispatch(a);if(c){if(!BE(this,c)&&l.force)lu(this.contentDOM,l.key,l.keyCode)}})}setState(e){if(this.updateState!=0)throw Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let n of this.plugins)n.destroy(this);this.viewState=new L1(this,e),this.plugins=e.facet(su).map((n)=>new hg(n)),this.pluginMap.clear();for(let n of this.plugins)n.update(this);this.docView.destroy(),this.docView=new M1(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}if(t)this.focus();this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(su),n=e.state.facet(su);if(t!=n){let r=[];for(let o of n){let i=t.indexOf(o);if(i<0)r.push(new hg(o));else{let s=this.plugins[i];s.mustUpdate=e,r.push(s)}}for(let o of this.plugins)if(o.mustUpdate!=e)o.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r<this.plugins.length;r++)this.plugins[r].update(this);if(t!=n)this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(n){Qn(this.state,n,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1)this.win.cancelAnimationFrame(this.measureScheduled);if(this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}if(this.measureScheduled=0,e)this.observer.forceFlush();let t=null,n=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:o,scrollAnchorHeight:i,scaleY:s}=this.viewState;if(Math.abs(r-this.viewState.scrollOffset)>1)i=-1;this.viewState.scrollAnchorHeight=-1;try{for(let a=0;;a++){if(i<0){if(aE(n||this.win))o=-1,i=this.viewState.heightMap.height/this.viewState.scaleY;else{let h=this.viewState.scrollAnchorAt(r);o=h.from,i=h.top}s=this.viewState.scaleY}this.updateState=1;let l=this.viewState.measure();if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(a>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let c=[];if(!(l&4))[this.measureRequests,c]=[c,this.measureRequests];let u=c.map((h)=>{try{return h.read(this)}catch(m){return Qn(this.state,m),GQ}}),f=vg.create(this,this.state,[]),d=!1;if(f.flags|=l,!t)t=f;else t.flags|=l;if(this.updateState=2,!f.empty){if(this.updatePlugins(f),this.inputState.update(f),this.updateAttrs(),d=this.docView.update(f),d)this.docViewUpdate()}for(let h=0;h<c.length;h++)if(u[h]!=GQ)try{let m=c[h];if(m.write)m.write(u[h],this)}catch(m){Qn(this.state,m)}if(d)this.docView.updateSelection(!0);if(!f.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,i=-1;continue}else{let m=(o<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(o).top)/this.viewState.scaleY-i/s;if((m>1||m<-1)&&!(ee.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(n==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){if(r=r+m,!n)this.win.scrollBy(0,m);else if(o<0)n.scrollTop=n.scrollHeight;else n.scrollTop+=m;i=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let a of this.state.facet(E1))a(t)}get themeClasses(){return j1+" "+(this.state.facet(z1)?sM:iM)+" "+this.state.facet(cg)}updateAttrs(){let e=HQ(this,kE,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:!this.state.facet(Ai)?"false":"true",class:"cm-content",style:`${ee.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};if(this.state.readOnly)t["aria-readonly"]="true";HQ(this,q1,t);let n=this.observer.ignore(()=>{let r=PQ(this.contentDOM,this.contentAttrs,t),o=PQ(this.dom,this.editorAttrs,e);return r||o});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let r of n.effects)if(r.is(re.announce)){if(t)this.announceDOM.textContent="",this.win.clearTimeout(this.clearAnnouncement),this.clearAnnouncement=this.win.setTimeout(()=>{this.announceDOM.textContent=" "},200),t=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Sd);let e=this.state.facet(re.cspNonce);no.mount(this.root,this.styleModules.concat(MZ).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw Error("Reading the editor layout isn't allowed during an update");if(this.updateState==0&&this.measureScheduled>-1)this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0)this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure());if(e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);if(t===void 0||t&&t.plugin!=e)this.pluginMap.set(e,t=this.plugins.find((n)=>n.plugin==e)||null);return t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return v1(this,e,$Q(this,e,t,n))}moveByGroup(e,t){return v1(this,e,$Q(this,e,t,(n)=>nZ(this,e.head,n)))}visualLineSide(e,t){return t?j.cursor(e.to,1):j.cursor(e.from,-1)}moveToLineBoundary(e,t,n=!0){return tZ(this,e,t,n)}moveVertically(e,t,n){return v1(this,e,rZ(this,e,t,n))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let n=D1(this,e,t);return n&&n.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),D1(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.state.doc.lineAt(e),r=this.bidiSpans(n),o=r[so.find(r,e-n.from,-1,t)];if(n.length&&(e==n.from&&t<0||e==n.to&&t>0)&&o.dir!=this.textDirectionAt(n.from))if(e==n.to)e=n.from+o.from,t=1;else e=n.from+o.to,t=-1;return this.docView.coordsAt(e,t,o.dir==pt.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){if(!this.state.facet(xE)||e<this.viewport.from||e>this.viewport.to)return this.textDirection;return this.readMeasured(),this.docView.textDirectionAt(e)}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>_Z)return hE(e.length);let t=this.textDirectionAt(e.from),n;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==t&&(o.fresh||dE(o.isolates,n=QQ(this,e))))return o.order;if(!n)n=QQ(this,e);let r=$B(e.text,t,n);return this.bidiCache.push(new kg(e.from,e.to,t,n,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||ee.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-30000)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{sE(this.contentDOM),this.docView.updateSelection()})}setRoot(e){if(this._root!=e)this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles()}destroy(){if(this.root.activeElement==this.contentDOM)this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);if(this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.win.clearTimeout(this.clearAnnouncement),this.measureScheduled>-1)this.win.cancelAnimationFrame(this.measureScheduled);this.destroyed=!0}static scrollIntoView(e,t={}){var n,r,o,i;return og.of(new cu(typeof e=="number"?j.cursor(e):e,(n=t.y)!==null&&n!==void 0?n:"nearest",(r=t.x)!==null&&r!==void 0?r:"nearest",(o=t.yMargin)!==null&&o!==void 0?o:5,(i=t.xMargin)!==null&&i!==void 0?i:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return og.of(new cu(j.cursor(n.from),"start","start",n.top-e,t,!0))}setTabFocusMode(e){if(e==null)this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1;else if(typeof e=="boolean")this.inputState.tabFocusMode=e?0:-1;else if(this.inputState.tabFocusMode!=0)this.inputState.tabFocusMode=Date.now()+e}static domEventHandlers(e){return pr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return pr.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=no.newName(),r=[cg.of(n),Sd.of(I1(`.${n}`,e))];if(t&&t.dark)r.push(z1.of(!0));return r}static baseTheme(e){return _r.lowest(Sd.of(I1("."+j1,e,aM)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&xt.get(n)||xt.get(e);return((t=r===null||r===void 0?void 0:r.root)===null||t===void 0?void 0:t.view)||null}}re.styleModule=Sd;re.inputHandler=yE;re.clipboardInputFilter=Y1;re.clipboardOutputFilter=V1;re.scrollHandler=wE;re.focusChangeEffect=vE;re.perLineTextDirection=xE;re.exceptionSink=bE;re.updateListener=E1;re.editable=Ai;re.mouseSelectionStyle=OE;re.dragMovesSelection=gE;re.clickAddsSelectionRange=mE;re.decorations=Rg;re.blockWrappers=CE;re.outerDecorations=G1;re.atomicRanges=_d;re.bidiIsolatedRanges=RE;re.cursorScrollMargin=he.define({combine:(e)=>{let t=5,n=5;for(let r of e)if(typeof r=="number")t=n=r;else({x:t,y:n}=r);return{x:t,y:n}}});re.scrollMargins=PE;re.darkTheme=z1;re.cspNonce=he.define({combine:(e)=>e.length?e[0]:""});re.contentAttributes=q1;re.editorAttributes=kE;re.lineWrapping=re.contentAttributes.of({class:"cm-lineWrapping"});re.announce=ze.define();var _Z=4096,GQ={};class kg{constructor(e,t,n,r,o,i){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=o,this.order=i}static update(e,t){if(t.empty&&!e.some((o)=>o.fresh))return e;let n=[],r=e.length?e[e.length-1].dir:pt.LTR;for(let o=Math.max(0,e.length-10);o<e.length;o++){let i=e[o];if(i.dir==r&&!t.touchesRange(i.from,i.to))n.push(new kg(t.mapPos(i.from,1),t.mapPos(i.to,-1),i.dir,i.isolates,!1,i.order))}return n}}function HQ(e,t,n){for(let r=e.state.facet(t),o=r.length-1;o>=0;o--){let i=r[o],s=typeof i=="function"?i(e):i;if(s)B1(s,n)}return n}var NZ=ee.mac?"mac":ee.windows?"win":ee.linux?"linux":"key";function LZ(e,t){let n=e.split(/-(?!$)/),r=n[n.length-1];if(r=="Space")r=" ";let o,i,s,a;for(let l=0;l<n.length-1;++l){let c=n[l];if(/^(cmd|meta|m)$/i.test(c))a=!0;else if(/^a(lt)?$/i.test(c))o=!0;else if(/^(c|ctrl|control)$/i.test(c))i=!0;else if(/^s(hift)?$/i.test(c))s=!0;else if(/^mod$/i.test(c))if(t=="mac")a=!0;else i=!0;else throw Error("Unrecognized modifier name: "+c)}if(o)r="Alt-"+r;if(i)r="Ctrl-"+r;if(a)r="Meta-"+r;if(s)r="Shift-"+r;return r}function ug(e,t,n){if(t.altKey)e="Alt-"+e;if(t.ctrlKey)e="Ctrl-"+e;if(t.metaKey)e="Meta-"+e;if(n!==!1&&t.shiftKey)e="Shift-"+e;return e}var zZ=_r.default(re.domEventHandlers({keydown(e,t){return BZ(jZ(t.state),e,t,"editor")}})),Xs=he.define({enables:zZ}),WQ=new WeakMap;function jZ(e){let t=e.facet(Xs),n=WQ.get(t);if(!n)WQ.set(t,n=XZ(t.reduce((r,o)=>r.concat(o),[])));return n}var zs=null,IZ=4000;function XZ(e,t=NZ){let n=Object.create(null),r=Object.create(null),o=(s,a)=>{let l=r[s];if(l==null)r[s]=a;else if(l!=a)throw Error("Key binding "+s+" is used both as a regular binding and as a multi-stroke prefix")},i=(s,a,l,c,u)=>{var f,d;let h=n[s]||(n[s]=Object.create(null)),m=a.split(/ (?!$)/).map((O)=>LZ(O,t));for(let O=1;O<m.length;O++){let y=m.slice(0,O).join(" ");if(o(y,!0),!h[y])h[y]={preventDefault:!0,stopPropagation:!1,run:[(v)=>{let x=zs={view:v,prefix:y,scope:s};return setTimeout(()=>{if(zs==x)zs=null},IZ),!0}]}}let g=m.join(" ");o(g,!1);let b=h[g]||(h[g]={preventDefault:!1,stopPropagation:!1,run:((d=(f=h._any)===null||f===void 0?void 0:f.run)===null||d===void 0?void 0:d.slice())||[]});if(l)b.run.push(l);if(c)b.preventDefault=!0;if(u)b.stopPropagation=!0};for(let s of e){let a=s.scope?s.scope.split(" "):["editor"];if(s.any)for(let c of a){let u=n[c]||(n[c]=Object.create(null));if(!u._any)u._any={preventDefault:!1,stopPropagation:!1,run:[]};let{any:f}=s;for(let d in u)u[d].run.push((h)=>f(h,X1))}let l=s[t]||s.key;if(!l)continue;for(let c of a)if(i(c,l,s.run,s.preventDefault,s.stopPropagation),s.shift)i(c,"Shift-"+l,s.shift,s.preventDefault,s.stopPropagation)}return n}var X1=null;function BZ(e,t,n,r){X1=t;let o=SQ(t),i=Pi(o,0),s=Ls(i)==o.length&&o!=" ",a="",l=!1,c=!1,u=!1;if(zs&&zs.view==n&&zs.scope==r){if(a=zs.prefix+" ",VE.indexOf(t.keyCode)<0)c=!0,zs=null}let f=new Set,d=(b)=>{if(b){for(let O of b.run)if(!f.has(O)){if(f.add(O),O(n)){if(b.stopPropagation)u=!0;return!0}}if(b.preventDefault){if(b.stopPropagation)u=!0;c=!0}}return!1},h=e[r],m,g;if(h){if(d(h[a+ug(o,t,!s)]))l=!0;else if(s&&(t.altKey||t.metaKey||t.ctrlKey)&&!(ee.windows&&t.ctrlKey&&t.altKey)&&!(ee.mac&&t.altKey&&!(t.ctrlKey||t.metaKey))&&(m=Ti[t.keyCode])&&m!=o){if(d(h[a+ug(m,t,!0)]))l=!0;else if(t.shiftKey&&(g=ou[t.keyCode])!=o&&g!=m&&d(h[a+ug(g,t,!1)]))l=!0}else if(s&&t.shiftKey&&d(h[a+ug(o,t,!0)]))l=!0;if(!l&&d(h._any))l=!0}if(c)l=!0;if(l&&u)t.stopPropagation();return X1=null,l}var ZZ=ee.gecko&&ee.gecko_version==153?"#ffffff01":"transparent",nre=_r.highest(re.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:`${ZZ} !important`},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}}));var rre=/x/.unicode!=null?"gu":"g";var fg="-10000px";class uM{constructor(e,t,n,r){this.facet=t,this.createTooltipView=n,this.removeTooltipView=r,this.input=e.state.facet(t),this.tooltips=this.input.filter((i)=>i);let o=null;this.tooltipViews=this.tooltips.map((i)=>o=n(i,o))}update(e,t){var n;let r=e.state.facet(this.facet),o=r.filter((a)=>a);if(r===this.input){for(let a of this.tooltipViews)if(a.update)a.update(e);return!1}let i=[],s=t?[]:null;for(let a=0;a<o.length;a++){let l=o[a],c=-1;if(!l)continue;for(let u=0;u<this.tooltips.length;u++){let f=this.tooltips[u];if(f&&f.create==l.create)c=u}if(c<0){if(i[a]=this.createTooltipView(l,a?i[a-1]:null),s)s[a]=!!l.above}else{let u=i[a]=this.tooltipViews[c];if(s)s[a]=t[c];if(u.update)u.update(e)}}for(let a of this.tooltipViews)if(i.indexOf(a)<0)this.removeTooltipView(a),(n=a.destroy)===null||n===void 0||n.call(a);if(t)s.forEach((a,l)=>t[l]=a),t.length=s.length;return this.input=r,this.tooltips=o,this.tooltipViews=i,!0}}function UZ(e){let t=e.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:t.clientHeight,right:t.clientWidth}}var w1=he.define({combine:(e)=>{var t,n,r;return{position:ee.ios?"absolute":((t=e.find((o)=>o.position))===null||t===void 0?void 0:t.position)||"fixed",parent:((n=e.find((o)=>o.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=e.find((o)=>o.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||UZ}}}),FQ=new WeakMap,fM=pr.fromClass(class{constructor(e){this.view=e,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(w1);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new uM(e,ex,(n,r)=>this.createTooltip(n,r),(n)=>{if(this.resizeObserver)this.resizeObserver.unobserve(n.dom);n.dom.remove()}),this.above=this.manager.tooltips.map((n)=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver((n)=>{if(Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1)this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){if(this.parent)this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container);else this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){if(this.measureTimeout<0)this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50)}update(e){if(e.transactions.length)this.lastTransaction=Date.now();let t=this.manager.update(e,this.above);if(t)this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(w1);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let o of this.manager.tooltipViews)o.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){if(this.parent)this.container.remove();this.parent=r.parent,this.createContainer();for(let o of this.manager.tooltipViews)this.container.appendChild(o.dom);n=!0}else if(this.parent&&this.view.themeClasses!=this.classes)this.classes=this.container.className=this.view.themeClasses;if(n)this.maybeMeasure()}createTooltip(e,t){let n=e.create(this.view),r=t?t.dom:null;if(n.dom.classList.add("cm-tooltip"),e.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let o=document.createElement("div");o.className="cm-tooltip-arrow",n.dom.appendChild(o)}if(n.dom.style.position=this.position,n.dom.style.top=fg,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount)n.mount(this.view);if(this.resizeObserver)this.resizeObserver.observe(n.dom);return n}destroy(){var e,t,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(e=r.destroy)===null||e===void 0||e.call(r);if(this.parent)this.container.remove();(t=this.resizeObserver)===null||t===void 0||t.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=1,t=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(ee.safari){let s=i.getBoundingClientRect();n=Math.abs(s.top+1e4)>1||Math.abs(s.left)>1}else n=!!i.offsetParent&&i.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();if(i.width&&i.height)e=i.width/this.parent.offsetWidth,t=i.height/this.parent.offsetHeight}else({scaleX:e,scaleY:t}=this.view.viewState);let r=this.view.scrollDOM.getBoundingClientRect(),o=H1(this.view);return{visible:{left:r.left+o.left,top:r.top+o.top,right:r.right-o.right,bottom:r.bottom-o.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((i,s)=>{let a=this.manager.tooltipViews[s];return a.getCoords?a.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(w1).tooltipSpace(this.view),scaleX:e,scaleY:t,makeAbsolute:n}}writeMeasure(e){var t;if(e.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let a of this.manager.tooltipViews)a.dom.style.position="absolute"}let{visible:n,space:r,scaleX:o,scaleY:i}=e,s=[];for(let a=0;a<this.manager.tooltips.length;a++){let l=this.manager.tooltips[a],c=this.manager.tooltipViews[a],{dom:u}=c,f=e.pos[a],d=e.size[a];if(!f||l.clip!==!1&&(f.bottom<=Math.max(n.top,r.top)||f.top>=Math.min(n.bottom,r.bottom)||f.right<Math.max(n.left,r.left)-0.1||f.left>Math.min(n.right,r.right)+0.1)){u.style.top=fg;continue}let h=l.arrow?c.dom.querySelector(".cm-tooltip-arrow"):null,m=h?7:0,g=d.right-d.left,b=(t=FQ.get(c))!==null&&t!==void 0?t:d.bottom-d.top,O=c.offset||VZ,y=this.view.textDirection==pt.LTR,v=d.width>r.right-r.left?y?r.left:r.right-d.width:y?Math.max(r.left,Math.min(f.left-(h?14:0)+O.x,r.right-g)):Math.min(Math.max(r.left,f.left-g+(h?14:0)-O.x),r.right-g),x=this.above[a];if(!l.strictSide&&(x?f.top-b-m-O.y<r.top:f.bottom+b+m+O.y>r.bottom)&&x==r.bottom-f.bottom>f.top-r.top)x=this.above[a]=!x;let w=(x?f.top-r.top:r.bottom-f.bottom)-m;if(w<b&&c.resize!==!1){if(w<this.view.defaultLineHeight){u.style.top=fg;continue}FQ.set(c,b),u.style.height=(b=w)/i+"px"}else if(u.style.height)u.style.height="";let S=x?f.top-b-m-O.y:f.bottom+m+O.y,k=v+g;if(c.overlap!==!0){for(let R of s)if(R.left<k&&R.right>v&&R.top<S+b&&R.bottom>S)S=x?R.top-b-2-m:R.bottom+m+2}if(this.position=="absolute")u.style.top=(S-e.parent.top)/i+"px",KQ(u,(v-e.parent.left)/o);else u.style.top=S/i+"px",KQ(u,v/o);if(h){let R=f.left+(y?O.x:-O.x)-(v+14-7);h.style.left=R/o+"px"}if(c.overlap!==!0)s.push({left:v,top:S,right:k,bottom:S+b});if(u.classList.toggle("cm-tooltip-above",x),u.classList.toggle("cm-tooltip-below",!x),c.positioned)c.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length){if(this.view.inView)this.view.requestMeasure(this.measureReq);if(this.inView!=this.view.inView){if(this.inView=this.view.inView,!this.inView)for(let e of this.manager.tooltipViews)e.dom.style.top=fg}}}},{eventObservers:{scroll(){this.maybeMeasure()}}});function KQ(e,t){let n=parseInt(e.style.left,10);if(isNaN(n)||Math.abs(t-n)>1)e.style.left=t+"px"}var YZ=re.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),VZ={x:0,y:0},ex=he.define({enables:[fM,YZ]});function tx(e,t){let n=e.plugin(fM);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}class Is extends to{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Is.prototype.elementClass="";Is.prototype.toDOM=void 0;Is.prototype.mapMode=cn.TrackBefore;Is.prototype.startSide=Is.prototype.endSide=-1;Is.prototype.point=!0;var yM=1024,qZ=0;class mr{constructor(e,t){this.from=e,this.to=t}}class be{constructor(e={}){this.id=qZ++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw RangeError("Can't add per-node props to node types");if(typeof e!="function")e=Pt.match(e);return(t)=>{let n=e(t);return n===void 0?null:[this,n]}}}be.closedBy=new be({deserialize:(e)=>e.split(" ")});be.openedBy=new be({deserialize:(e)=>e.split(" ")});be.group=new be({deserialize:(e)=>e.split(" ")});be.isolate=new be({deserialize:(e)=>{if(e&&e!="rtl"&&e!="ltr"&&e!="auto")throw RangeError("Invalid value for isolate: "+e);return e||"auto"}});be.contextHash=new be({perNode:!0});be.lookAhead=new be({perNode:!0});be.mounted=new be({perNode:!0});class el{constructor(e,t,n,r=!1){this.tree=e,this.overlay=t,this.parser=n,this.bracketed=r}static get(e){return e&&e.props&&e.props[be.mounted.id]}}var GZ=Object.create(null);class Pt{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):GZ,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new Pt(e.name||"",t,e.id,n);if(e.props)for(let o of e.props){if(!Array.isArray(o))o=o(r);if(o){if(o[0].perNode)throw RangeError("Can't store a per-node prop on a node type");t[o[0].id]=o[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(be.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return(n)=>{for(let r=n.prop(be.group),o=-1;o<(r?r.length:0);o++){let i=t[o<0?n.name:r[o]];if(i)return i}}}}Pt.none=new Pt("",Object.create(null),0,8);class Zs{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let n of this.types){let r=null;for(let o of e){let i=o(n);if(i){if(!r)r=Object.assign({},n.props);let s=i[1],a=i[0];if(a.combine&&a.id in r)s=a.combine(r[a.id],s);r[a.id]=s}}t.push(r?new Pt(n.name,r,n.id,n.flags):n)}return new Zs(t)}}var Tg=new WeakMap,dM=new WeakMap,je;(function(e){e[e.ExcludeBuffers=1]="ExcludeBuffers",e[e.IncludeAnonymous=2]="IncludeAnonymous",e[e.IgnoreMounts=4]="IgnoreMounts",e[e.IgnoreOverlays=8]="IgnoreOverlays",e[e.EnterBracketed=16]="EnterBracketed"})(je||(je={}));class Be{constructor(e,t,n,r,o){if(this.type=e,this.children=t,this.positions=n,this.length=r,this.props=null,o&&o.length){this.props=Object.create(null);for(let[i,s]of o)this.props[typeof i=="number"?i:i.id]=s}}toString(){let e=el.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let n of this.children){let r=n.toString();if(r){if(t)t+=",";t+=r}}return!this.type.name?t:(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":"")}cursor(e=0){return new jd(this.topNode,e)}cursorAt(e,t=0,n=0){let r=Tg.get(this)||this.topNode,o=new jd(r);return o.moveTo(e,t),Tg.set(this,o._tree),o}get topNode(){return new wn(this,0,0,null)}resolve(e,t=0){let n=zd(Tg.get(this)||this.topNode,e,t,!1);return Tg.set(this,n),n}resolveInner(e,t=0){let n=zd(dM.get(this)||this.topNode,e,t,!0);return dM.set(this,n),n}resolveStack(e,t=0){return HZ(this,e,t)}iterate(e){let{enter:t,leave:n,from:r=0,to:o=this.length}=e,i=e.mode||0,s=(i&je.IncludeAnonymous)>0;for(let a=this.cursor(i|je.IncludeAnonymous);;){let l=!1;if(a.from<=o&&a.to>=r&&(!s&&a.type.isAnonymous||t(a)!==!1)){if(a.firstChild())continue;l=!0}for(;;){if(l&&n&&(s||!a.type.isAnonymous))n(a);if(a.nextSibling())break;if(!a.parent())return;l=!0}}}prop(e){return!e.perNode?this.type.prop(e):this.props?this.props[e.id]:void 0}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:cx(Pt.none,this.children,this.positions,0,this.children.length,0,this.length,(t,n,r)=>new Be(this.type,t,n,r,this.propValues),e.makeTree||((t,n,r)=>new Be(Pt.none,t,n,r)))}static build(e){return WZ(e)}}Be.empty=new Be(Pt.none,[],[],0);class sx{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new sx(this.buffer,this.index)}}class Bs{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return Pt.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],n=this.buffer[e+3],r=this.set.types[t],o=r.name;if(/\W/.test(o)&&!r.isError)o=JSON.stringify(o);if(e+=4,n==e)return o;let i=[];while(e<n)i.push(this.childString(e)),e=this.buffer[e+3];return o+"("+i.join(",")+")"}findChild(e,t,n,r,o){let{buffer:i}=this,s=-1;for(let a=e;a!=t;a=i[a+3])if(vM(o,r,i[a+1],i[a+2])){if(s=a,n>0)break}return s}slice(e,t,n){let r=this.buffer,o=new Uint16Array(t-e),i=0;for(let s=e,a=0;s<t;){o[a++]=r[s++],o[a++]=r[s++]-n;let l=o[a++]=r[s++]-n;o[a++]=r[s++]-e,i=Math.max(i,l)}return new Bs(o,i,this.set)}}function vM(e,t,n,r){switch(e){case-2:return n<t;case-1:return r>=t&&n<t;case 0:return n<t&&r>t;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function zd(e,t,n,r){var o;while(e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to<t)){let s=!r&&e instanceof wn&&e.index<0?null:e.parent;if(!s)return e;e=s}let i=r?0:je.IgnoreOverlays;if(r){for(let s=e,a=s.parent;a;s=a,a=s.parent)if(s instanceof wn&&s.index<0&&((o=a.enter(t,n,i))===null||o===void 0?void 0:o.from)!=s.from)e=a}for(;;){let s=e.enter(t,n,i);if(!s)return e;e=s}}class ax{cursor(e=0){return new jd(this,e)}getChild(e,t=null,n=null){let r=hM(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return hM(this,e,t,n)}resolve(e,t=0){return zd(this,e,t,!1)}resolveInner(e,t=0){return zd(this,e,t,!0)}matchContext(e){return nx(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),n=this;while(t){let r=t.lastChild;if(!r||r.to!=t.to)break;if(r.type.isError&&r.from==r.to)n=t,t=r.prevSibling;else t=r}return n}get node(){return this}get next(){return this.parent}}class wn extends ax{constructor(e,t,n,r){super();this._tree=e,this.from=t,this.index=n,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,n,r,o=0){for(let i=this;;){for(let{children:s,positions:a}=i._tree,l=t>0?s.length:-1;e!=l;e+=t){let c=s[e],u=a[e]+i.from,f;if(!(o&je.EnterBracketed&&c instanceof Be&&(f=el.get(c))&&!f.overlay&&f.bracketed&&n>=u&&n<=u+c.length)&&!vM(r,n,u,u+c.length))continue;if(c instanceof Bs){if(o&je.ExcludeBuffers)continue;let d=c.findChild(0,c.buffer.length,t,n-u,r);if(d>-1)return new Io(new xM(i,c,e,u),null,d)}else if(o&je.IncludeAnonymous||(!c.type.isAnonymous||lx(c))){let d;if(!(o&je.IgnoreMounts)&&(d=el.get(c))&&!d.overlay)return new wn(d.tree,u,e,i);let h=new wn(c,u,e,i);return o&je.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(t<0?c.children.length-1:0,t,n,r,o)}}if(o&je.IncludeAnonymous||!i.type.isAnonymous)return null;if(i.index>=0)e=i.index+t;else e=t<0?-1:i._parent._tree.children.length;if(i=i._parent,!i)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,n=0){let r;if(!(n&je.IgnoreOverlays)&&(r=el.get(this._tree))&&r.overlay){let o=e-this.from,i=n&je.EnterBracketed&&r.bracketed;for(let{from:s,to:a}of r.overlay)if((t>0||i?s<=o:s<o)&&(t<0||i?a>=o:a>o))return new wn(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;while(e.type.isAnonymous&&e._parent)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function hM(e,t,n,r){let o=e.cursor(),i=[];if(!o.firstChild())return i;if(n!=null){for(let s=!1;!s;)if(s=o.type.is(n),!o.nextSibling())return i}for(;;){if(r!=null&&o.type.is(r))return i;if(o.type.is(t))i.push(o.node);if(!o.nextSibling())return r==null?i:[]}}function nx(e,t,n=t.length-1){for(let r=e;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class xM{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class Io extends ax{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){super();this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return o<0?null:new Io(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,n=0){if(n&je.ExcludeBuffers)return null;let{buffer:r}=this.context,o=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return o<0?null:new Io(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];if(t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length))return new Io(this.context,this._parent,t);return this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;if(this.index==t)return this.externalSibling(-1);return new Io(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,o=n.buffer[this.index+3];if(o>r){let i=n.buffer[this.index+1];e.push(n.slice(r,o,i)),t.push(0)}return new Be(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function wM(e){if(!e.length)return null;let t=0,n=e[0];for(let i=1;i<e.length;i++){let s=e[i];if(s.from>n.from||s.to<n.to)n=s,t=i}let r=n instanceof wn&&n.index<0?null:n.parent,o=e.slice();if(r)o[t]=r;else o.splice(t,1);return new SM(o,n)}class SM{constructor(e,t){this.heads=e,this.node=t}get next(){return wM(this.heads)}}function HZ(e,t,n){let r=e.resolveInner(t,n),o=null;for(let i=r instanceof wn?r:r.context.parent;i;i=i.parent)if(i.index<0){let s=i.parent;(o||(o=[r])).push(s.resolve(t,n)),i=s}else{let s=el.get(i.tree);if(s&&s.overlay&&s.overlay[0].from<=t&&s.overlay[s.overlay.length-1].to>=t){let a=new wn(s.tree,s.overlay[0].from+i.from,-1,i);(o||(o=[r])).push(zd(a,t,n,!1))}}return o?wM(o):r}class jd{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~je.EnterBracketed,e instanceof wn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let n=e._parent;n;n=n._parent)this.stack.unshift(n.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){if(!e)return!1;return this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){if(!e)return!1;if(e instanceof wn)return this.buffer=null,this.yieldNode(e);return this.buffer=e.context,this.yieldBuf(e.index,e.type)}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,o=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);if(o<0)return!1;return this.stack.push(this.index),this.yieldBuf(o)}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){if(!this.buffer)return this.yield(this._tree.enter(e,t,n));return n&je.ExcludeBuffers?!1:this.enterChild(1,e,t)}parent(){if(!this.buffer)return this.yieldNode(this.mode&je.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&je.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!this._tree._parent?!1:this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let r=n<0?0:this.stack[n]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(r)}return n<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let o=0;o<this.index;o++)if(r.buffer.buffer[o+3]<this.index)return!1;({index:t,parent:n}=r)}else({index:t,_parent:n}=this._tree);for(;n;{index:t,_parent:n}=n)if(t>-1)for(let o=t+e,i=e<0?-1:n._tree.children.length;o!=i;o+=e){let s=n._tree.children[o];if(this.mode&je.IncludeAnonymous||s instanceof Bs||!s.type.isAnonymous||lx(s))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){while(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))if(!this.parent())break;while(this.enterChild(1,e,t));return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,n=0;if(e&&e.context==this.buffer)e:for(let r=this.index,o=this.stack.length;o>=0;){for(let i=e;i;i=i._parent)if(i.index==r){if(r==this.index)return i;t=i,n=o+1;break e}r=this.stack[--o]}for(let r=n;r<this.stack.length;r++)t=new Io(this.buffer,t,this.stack[r]);return this.bufferNode=new Io(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let n=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){n++;continue}if(!this.type.isAnonymous)r=!0}for(;;){if(r&&t)t(this);if(r=this.type.isAnonymous,!n)return;if(this.nextSibling())break;this.parent(),n--,r=!0}}}matchContext(e){if(!this.buffer)return nx(this.node.parent,e);let{buffer:t}=this.buffer,{types:n}=t.set;for(let r=e.length-1,o=this.stack.length-1;r>=0;o--){if(o<0)return nx(this._tree,e,r);let i=n[t.buffer[this.stack[o]]];if(!i.isAnonymous){if(e[r]&&e[r]!=i.name)return!1;r--}}return!0}}function lx(e){return e.children.some((t)=>t instanceof Bs||!t.type.isAnonymous||lx(t))}function WZ(e){var t;let{buffer:n,nodeSet:r,maxBufferLength:o=1024,reused:i=[],minRepeatType:s=r.types.length}=e,a=Array.isArray(n)?new sx(n,n.length):n,l=r.types,c=0,u=0;function f(w,S,k,R,Q,E){let{id:_,start:N,end:V,size:U}=a,F=u,Z=c;if(U<0)if(a.next(),U==-1){let pe=i[_];k.push(pe),R.push(N-w);return}else if(U==-3){c=_;return}else if(U==-4){u=_;return}else throw RangeError(`Unrecognized record size: ${U}`);let se=l[_],K,te,I=N-w;if(V-N<=o&&(te=b(a.pos-S,Q))){let pe=new Uint16Array(te.size-te.skip),M=a.pos-te.size,H=pe.length;while(a.pos>M)H=O(te.start,pe,H);K=new Bs(pe,V-te.start,r),I=te.start-w}else{let pe=a.pos-U;a.next();let M=[],H=[],q=_>=s?_:-1,X=0,D=V;while(a.pos>pe)if(q>=0&&a.id==q&&a.size>=0){if(a.end<=D-o)m(M,H,N,X,a.end,D,q,F,Z),X=M.length,D=a.end;a.next()}else if(E>2500)d(N,pe,M,H);else f(N,pe,M,H,q,E+1);if(q>=0&&X>0&&X<M.length)m(M,H,N,X,N,D,q,F,Z);if(M.reverse(),H.reverse(),q>-1&&X>0){let ae=h(se,Z);K=cx(se,M,H,0,M.length,0,V-N,ae,ae)}else K=g(se,M,H,V-N,F-V,Z)}k.push(K),R.push(I)}function d(w,S,k,R){let Q=[],E=0,_=-1;while(a.pos>S){let{id:N,start:V,end:U,size:F}=a;if(F>4)a.next();else if(_>-1&&V<_)break;else{if(_<0)_=U-o;Q.push(N,V,U),E++,a.next()}}if(E){let N=new Uint16Array(E*4),V=Q[Q.length-2];for(let U=Q.length-3,F=0;U>=0;U-=3)N[F++]=Q[U],N[F++]=Q[U+1]-V,N[F++]=Q[U+2]-V,N[F++]=F;k.push(new Bs(N,Q[2]-V,r)),R.push(V-w)}}function h(w,S){return(k,R,Q)=>{let E=0,_=k.length-1,N,V;if(_>=0&&(N=k[_])instanceof Be){if(!_&&N.type==w&&N.length==Q)return N;if(V=N.prop(be.lookAhead))E=R[_]+N.length+V}return g(w,k,R,Q,E,S)}}function m(w,S,k,R,Q,E,_,N,V){let U=[],F=[];while(w.length>R)U.push(w.pop()),F.push(S.pop()+k-Q);w.push(g(r.types[_],U,F,E-Q,N-E,V)),S.push(Q-k)}function g(w,S,k,R,Q,E,_){if(E){let N=[be.contextHash,E];_=_?[N].concat(_):[N]}if(Q>25){let N=[be.lookAhead,Q];_=_?[N].concat(_):[N]}return new Be(w,S,k,R,_)}function b(w,S){let k=a.fork(),R=0,Q=0,E=0,_=k.end-o,N={size:0,start:0,skip:0};e:for(let V=k.pos-w;k.pos>V;){let U=k.size;if(k.id==S&&U>=0){N.size=R,N.start=Q,N.skip=E,E+=4,R+=4,k.next();continue}let F=k.pos-U;if(U<0||F<V||k.start<_)break;let Z=k.id>=s?4:0,se=k.start;k.next();while(k.pos>F){if(k.size<0)if(k.size==-3||k.size==-4)Z+=4;else break e;else if(k.id>=s)Z+=4;k.next()}Q=se,R+=U,E+=Z}if(S<0||R==w)N.size=R,N.start=Q,N.skip=E;return N.size>4?N:void 0}function O(w,S,k){let{id:R,start:Q,end:E,size:_}=a;if(a.next(),_>=0&&R<s){let N=k;if(_>4){let V=a.pos-(_-4);while(a.pos>V)k=O(w,S,k)}S[--k]=N,S[--k]=E-w,S[--k]=Q-w,S[--k]=R}else if(_==-3)c=R;else if(_==-4)u=R;return k}let y=[],v=[];while(a.pos>0)f(e.start||0,e.bufferStart||0,y,v,-1,0);let x=(t=e.length)!==null&&t!==void 0?t:y.length?v[0]+y[0].length:0;return new Be(l[e.topID],y.reverse(),v.reverse(),x)}var pM=new WeakMap;function Ag(e,t){if(!e.isAnonymous||t instanceof Bs||t.type!=e)return 1;let n=pM.get(t);if(n==null){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof Be)){n=1;break}n+=Ag(e,r)}pM.set(t,n)}return n}function cx(e,t,n,r,o,i,s,a,l){let c=0;for(let m=r;m<o;m++)c+=Ag(e,t[m]);let u=Math.ceil(c*1.5/8),f=[],d=[];function h(m,g,b,O,y){for(let v=b;v<O;){let x=v,w=g[v],S=Ag(e,m[v]);v++;for(;v<O;v++){let k=Ag(e,m[v]);if(S+k>=u)break;S+=k}if(v==x+1){if(S>u){let k=m[x];h(k.children,k.positions,0,k.children.length,g[x]+y);continue}f.push(m[x])}else{let k=g[v-1]+m[v-1].length-w;f.push(cx(e,m,g,x,v,w,k,null,l))}d.push(w+y-i)}}return h(t,n,r,o,0),(a||l)(f,d,s)}class Id{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);if(!r)this.map.set(e,r=new Map);r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){if(e instanceof Io)this.setBuffer(e.context.buffer,e.index,t);else if(e instanceof wn)this.map.set(e.tree,t)}get(e){return e instanceof Io?this.getBuffer(e.context.buffer,e.index):e instanceof wn?this.map.get(e.tree):void 0}cursorSet(e,t){if(e.buffer)this.setBuffer(e.buffer.buffer,e.index,t);else this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Xo{constructor(e,t,n,r,o=!1,i=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(o?1:0)|(i?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],n=!1){let r=[new Xo(0,e.length,e,0,!1,n)];for(let o of t)if(o.to>e.length)r.push(o);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],o=1,i=e.length?e[0]:null;for(let s=0,a=0,l=0;;s++){let c=s<t.length?t[s]:null,u=c?c.fromA:1e9;if(u-a>=n)while(i&&i.from<u){let f=i;if(a>=f.from||u<=f.to||l){let d=Math.max(f.from,a)-l,h=Math.min(f.to,u)-l;f=d>=h?null:new Xo(d,h,f.tree,f.offset+l,s>0,!!c)}if(f)r.push(f);if(i.to>u)break;i=o<e.length?e[o++]:null}if(!c)break;a=c.toA,l=c.toA-c.toB}return r}}class tl{startParse(e,t,n){if(typeof e=="string")e=new kM(e);return n=!n?[new mr(0,e.length)]:n.length?n.map((r)=>new mr(r.from,r.to)):[new mr(0,0)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let o=r.advance();if(o)return o}}}class kM{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function Qg(e){return(t,n,r,o)=>new RM(t,e,n,r,o)}class rx{constructor(e,t,n,r,o,i){this.parser=e,this.parse=t,this.overlay=n,this.bracketed=r,this.target=o,this.from=i}}function mM(e){if(!e.length||e.some((t)=>t.from>=t.to))throw RangeError("Invalid inner parse ranges given: "+JSON.stringify(e))}class CM{constructor(e,t,n,r,o,i,s,a){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=o,this.bracketed=i,this.target=s,this.prev=a,this.depth=0,this.ranges=[]}}var ox=new be({perNode:!0});class RM{constructor(e,t,n,r,o){this.nest=t,this.input=n,this.fragments=r,this.ranges=o,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let n=this.baseParse.advance();if(!n)return null;if(this.baseParse=null,this.baseTree=n,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let n=this.baseTree;if(this.stoppedAt!=null)n=new Be(n.type,n.children,n.positions,n.length,n.propValues.concat([[ox,this.stoppedAt]]));return n}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[be.mounted.id]=new el(t,e.overlay,e.parser,e.bracketed),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)if(this.inner[t].from<e)e=Math.min(e,this.inner[t].parse.parsedPos);return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new PM(this.fragments),t=null,n=null,r=new jd(new wn(this.baseTree,this.ranges[0].from,0,null),je.IncludeAnonymous|je.IgnoreMounts);e:for(let o,i;;){let s=!0,a;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)s=!1;else if(e.hasNode(r)){if(t){let l=t.mounts.find((c)=>c.frag.from<=r.from&&c.frag.to>=r.to&&c.mount.overlay);if(l)for(let c of l.mount.overlay){let u=c.from+l.pos,f=c.to+l.pos;if(u>=r.from&&f<=r.to&&!t.ranges.some((d)=>d.from<f&&d.to>u))t.ranges.push({from:u,to:f})}}s=!1}else if(n&&(i=FZ(n.ranges,r.from,r.to)))s=i!=2;else if(!r.type.isAnonymous&&(o=this.nest(r,this.input))&&(r.from<r.to||!o.overlay)){if(!r.tree){if(KZ(r),t)t.depth++;if(n)n.depth++}let l=e.findMounts(r.from,o.parser);if(typeof o.overlay=="function")t=new CM(o.parser,o.overlay,l,this.inner.length,r.from,!!o.bracketed,r.tree,t);else{let c=OM(this.ranges,o.overlay||(r.from<r.to?[new mr(r.from,r.to)]:[]));if(c.length)mM(c);if(c.length||!o.overlay)this.inner.push(new rx(o.parser,c.length?o.parser.startParse(this.input,bM(l,c),c):o.parser.startParse(""),o.overlay?o.overlay.map((u)=>new mr(u.from-r.from,u.to-r.from)):null,!!o.bracketed,r.tree,c.length?c[0].from:r.from));if(!o.overlay)s=!1;else if(c.length)n={ranges:c,depth:0,prev:n}}}else if(t&&(a=t.predicate(r))){if(a===!0)a=new mr(r.from,r.to);if(a.from<a.to){let l=t.ranges.length-1;if(l>=0&&t.ranges[l].to==a.from)t.ranges[l]={from:t.ranges[l].from,to:a.to};else t.ranges.push(a)}}if(s&&r.firstChild()){if(t)t.depth++;if(n)n.depth++}else for(;;){if(r.nextSibling())break;if(!r.parent())break e;if(t&&!--t.depth){let l=OM(this.ranges,t.ranges);if(l.length)mM(l),this.inner.splice(t.index,0,new rx(t.parser,t.parser.startParse(this.input,bM(t.mounts,l),l),t.ranges.map((c)=>new mr(c.from-t.start,c.to-t.start)),t.bracketed,t.target,l[0].from));t=t.prev}if(n&&!--n.depth)n=n.prev}}}}function FZ(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function gM(e,t,n,r,o,i){if(t<n){let s=e.buffer[t+1];r.push(e.slice(t,n,s)),o.push(s-i)}}function KZ(e){let{node:t}=e,n=[],r=t.context.buffer;do n.push(e.index),e.parent();while(!e.tree);let o=e.tree,i=o.children.indexOf(r),s=o.children[i],a=s.buffer,l=[i];function c(u,f,d,h,m,g){let b=n[g],O=[],y=[];gM(s,u,b,O,y,h);let v=a[b+1],x=a[b+2];l.push(O.length);let w=g?c(b+4,a[b+3],s.set.types[a[b]],v,x-v,g-1):t.toTree();return O.push(w),y.push(v-h),gM(s,a[b+3],f,O,y,h),new Be(d,O,y,m)}o.children[i]=c(0,a.length,Pt.none,0,s.length,n.length-1);for(let u of l){let f=e.tree.children[u],d=e.tree.positions[u];e.yield(new wn(f,d+e.from,u,e._tree))}}class ix{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(je.IncludeAnonymous|je.IgnoreMounts|je.ExcludeBuffers)}moveTo(e){let{cursor:t}=this,n=e-this.offset;while(!this.done&&t.from<n)if(t.to>=n&&t.enter(n,1,je.IncludeAnonymous|je.IgnoreOverlays|je.ExcludeBuffers));else if(t.to<=n){if(!t.next(!1))this.done=!0}else break}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof Be)t=t.children[0];else break}return!1}}class PM{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=(t=n.tree.prop(ox))!==null&&t!==void 0?t:n.to,this.inner=new ix(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){while(this.curFrag&&e.from>=this.curTo)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(ox))!==null&&e!==void 0?e:t.to,this.inner=new ix(t.tree,-t.offset)}}findMounts(e,t){var n;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let o=this.inner.cursor.node;o;o=o.parent){let i=(n=o.tree)===null||n===void 0?void 0:n.prop(be.mounted);if(i&&i.parser==t)for(let s=this.fragI;s<this.fragments.length;s++){let a=this.fragments[s];if(a.from>=o.to)break;if(a.tree==this.curFrag.tree)r.push({frag:a,pos:o.from-a.offset,mount:i})}}}return r}}function OM(e,t){let n=null,r=t;for(let o=1,i=0;o<e.length;o++){let s=e[o-1].to,a=e[o].from;for(;i<r.length;i++){let l=r[i];if(l.from>=a)break;if(l.to<=s)continue;if(!n)r=n=t.slice();if(l.from<s){if(n[i]=new mr(l.from,s),l.to>a)n.splice(i+1,0,new mr(a,l.to))}else if(l.to>a)n[i--]=new mr(a,l.to);else n.splice(i--,1)}}return r}function JZ(e,t,n,r){let o=0,i=0,s=!1,a=!1,l=-1e9,c=[];for(;;){let u=o==e.length?1e9:s?e[o].to:e[o].from,f=i==t.length?1e9:a?t[i].to:t[i].from;if(s!=a){let d=Math.max(l,n),h=Math.min(u,f,r);if(d<h)c.push(new mr(d,h))}if(l=Math.min(u,f),l==1e9)break;if(u==l)if(!s)s=!0;else s=!1,o++;if(f==l)if(!a)a=!0;else a=!1,i++}return c}function bM(e,t){let n=[];for(let{pos:r,mount:o,frag:i}of e){let s=r+(o.overlay?o.overlay[0].from:0),a=s+o.tree.length,l=Math.max(i.from,s),c=Math.min(i.to,a);if(o.overlay){let u=o.overlay.map((d)=>new mr(d.from+r,d.to+r)),f=JZ(t,u,l,c);for(let d=0,h=l;;d++){let m=d==f.length,g=m?c:f[d].from;if(g>h)n.push(new Xo(h,g,o.tree,-s,i.from>=h||i.openStart,i.to<=g||i.openEnd));if(m)break;h=f[d].to}}else n.push(new Xo(l,c,o.tree,-s,i.from>=s||i.openStart,i.to<=a||i.openEnd))}return n}var e9=0;class Yn{constructor(e,t,n,r){this.name=e,this.set=t,this.base=n,this.modified=r,this.id=e9++}toString(){let{name:e}=this;for(let t of this.modified)if(t.name)e=`${t.name}(${e})`;return e}static define(e,t){let n=typeof e=="string"?e:"?";if(e instanceof Yn)t=e;if(t===null||t===void 0?void 0:t.base)throw Error("Can not derive from a modified tag");let r=new Yn(n,[],null,[]);if(r.set.push(r),t)for(let o of t.set)r.set.push(o);return r}static defineModifier(e){let t=new Dg(e);return(n)=>{if(n.modified.indexOf(t)>-1)return n;return Dg.get(n.base||n,n.modified.concat(t).sort((r,o)=>r.id-o.id))}}}var t9=0;class Dg{constructor(e){this.name=e,this.instances=[],this.id=t9++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find((s)=>s.base==e&&n9(t,s.modified));if(n)return n;let r=[],o=new Yn(e.name,r,e,t);for(let s of t)s.instances.push(o);let i=r9(t);for(let s of e.set)if(!s.modified.length)for(let a of i)r.push(Dg.get(s,a));return o}}function n9(e,t){return e.length==t.length&&e.every((n,r)=>n==t[r])}function r9(e){let t=[[]];for(let n=0;n<e.length;n++)for(let r=0,o=t.length;r<o;r++)t.push(t[r].concat(e[n]));return t.sort((n,r)=>r.length-n.length)}function lo(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!Array.isArray(r))r=[r];for(let o of n.split(" "))if(o){let i=[],s=2,a=o;for(let f=0;;){if(a=="..."&&f>0&&f+3==o.length){s=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(a);if(!d)throw RangeError("Invalid path: "+o);if(i.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),f+=d[0].length,f==o.length)break;let h=o[f++];if(f==o.length&&h=="!"){s=0;break}if(h!="/")throw RangeError("Invalid path: "+o);a=o.slice(f)}let l=i.length-1,c=i[l];if(!c)throw RangeError("Invalid path: "+o);let u=new du(r,s,l>0?i.slice(0,l):null);t[c]=u.sort(t[c])}}return QM.add(t)}var QM=new be({combine(e,t){let n,r,o;while(e||t){if(!e||t&&e.depth<=t.depth)o=t,t=t.next;else o=e,e=e.next;if(n&&n.mode==o.mode&&!o.context&&!n.context)continue;let i=new du(o.tags,o.mode,o.context);if(n)n.next=i;else r=i;n=i}return r}});class du{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){if(!e||e.depth<this.depth)return this.next=e,this;return e.next=this.sort(e.next),e}get depth(){return this.context?this.context.length:0}}du.empty=new du([],2,null);function dx(e,t){let n=Object.create(null);for(let i of e)if(!Array.isArray(i.tag))n[i.tag.id]=i.class;else for(let s of i.tag)n[s.id]=i.class;let{scope:r,all:o=null}=t||{};return{style:(i)=>{let s=o;for(let a of i)for(let l of a.set){let c=n[l.id];if(c){s=s?s+" "+c:c;break}}return s},scope:r}}function o9(e,t){let n=null;for(let r of e){let o=r.style(t);if(o)n=n?n+" "+o:o}return n}function EM(e,t,n,r=0,o=e.length){let i=new MM(r,Array.isArray(t)?t:[t],n);i.highlightRange(e.cursor(),r,o,"",i.highlighters),i.flush(o)}class MM{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){if(t!=this.class){if(this.flush(e),e>this.at)this.at=e;this.class=t}}flush(e){if(e>this.at&&this.class)this.span(this.at,e,this.class)}highlightRange(e,t,n,r,o){let{type:i,from:s,to:a}=e;if(s>=n||a<=t)return;if(i.isTop)o=this.highlighters.filter((d)=>!d.scope||d.scope(i));let l=r,c=i9(e)||du.empty,u=o9(o,c.tags);if(u){if(l)l+=" ";if(l+=u,c.mode==1)r+=(r?" ":"")+u}if(this.startSpan(Math.max(t,s),l),c.opaque)return;let f=e.tree&&e.tree.prop(be.mounted);if(f&&f.overlay){let d=e.node.enter(f.overlay[0].from+s,1),h=this.highlighters.filter((g)=>!g.scope||g.scope(f.tree.type)),m=e.firstChild();for(let g=0,b=s;;g++){let O=g<f.overlay.length?f.overlay[g]:null,y=O?O.from+s:a,v=Math.max(t,b),x=Math.min(n,y);if(v<x&&m){while(e.from<x)if(this.highlightRange(e,v,x,r,o),this.startSpan(Math.min(x,e.to),l),e.to>=y||!e.nextSibling())break}if(!O||y>n)break;if(b=O.to+s,b>t)this.highlightRange(d.cursor(),Math.max(t,O.from+s),Math.min(n,b),"",h),this.startSpan(Math.min(n,b),l)}if(m)e.parent()}else if(e.firstChild()){if(f)r="";do{if(e.to<=t)continue;if(e.from>=n)break;this.highlightRange(e,t,n,r,o),this.startSpan(Math.min(n,e.to),l)}while(e.nextSibling());e.parent()}}}function i9(e){let t=e.type.prop(QM);while(t&&t.context&&!e.matchContext(t.context))t=t.next;return t||null}var W=Yn.define,Eg=W(),Us=W(),TM=W(Us),AM=W(Us),Ys=W(),Mg=W(Ys),ux=W(Ys),Uo=W(),nl=W(Uo),Bo=W(),Zo=W(),fx=W(),Xd=W(fx),$g=W(),C={comment:Eg,lineComment:W(Eg),blockComment:W(Eg),docComment:W(Eg),name:Us,variableName:W(Us),typeName:TM,tagName:W(TM),propertyName:AM,attributeName:W(AM),className:W(Us),labelName:W(Us),namespace:W(Us),macroName:W(Us),literal:Ys,string:Mg,docString:W(Mg),character:W(Mg),attributeValue:W(Mg),number:ux,integer:W(ux),float:W(ux),bool:W(Ys),regexp:W(Ys),escape:W(Ys),color:W(Ys),url:W(Ys),keyword:Bo,self:W(Bo),null:W(Bo),atom:W(Bo),unit:W(Bo),modifier:W(Bo),operatorKeyword:W(Bo),controlKeyword:W(Bo),definitionKeyword:W(Bo),moduleKeyword:W(Bo),operator:Zo,derefOperator:W(Zo),arithmeticOperator:W(Zo),logicOperator:W(Zo),bitwiseOperator:W(Zo),compareOperator:W(Zo),updateOperator:W(Zo),definitionOperator:W(Zo),typeOperator:W(Zo),controlOperator:W(Zo),punctuation:fx,separator:W(fx),bracket:Xd,angleBracket:W(Xd),squareBracket:W(Xd),paren:W(Xd),brace:W(Xd),content:Uo,heading:nl,heading1:W(nl),heading2:W(nl),heading3:W(nl),heading4:W(nl),heading5:W(nl),heading6:W(nl),contentSeparator:W(Uo),list:W(Uo),quote:W(Uo),emphasis:W(Uo),strong:W(Uo),link:W(Uo),monospace:W(Uo),strikethrough:W(Uo),inserted:W(),deleted:W(),changed:W(),invalid:W(),meta:$g,documentMeta:W($g),annotation:W($g),processingInstruction:W($g),definition:Yn.defineModifier("definition"),constant:Yn.defineModifier("constant"),function:Yn.defineModifier("function"),standard:Yn.defineModifier("standard"),local:Yn.defineModifier("local"),special:Yn.defineModifier("special")};for(let e in C){let t=C[e];if(t instanceof Yn)t.name=e}var cre=dx([{tag:C.link,class:"tok-link"},{tag:C.heading,class:"tok-heading"},{tag:C.emphasis,class:"tok-emphasis"},{tag:C.strong,class:"tok-strong"},{tag:C.keyword,class:"tok-keyword"},{tag:C.atom,class:"tok-atom"},{tag:C.bool,class:"tok-bool"},{tag:C.url,class:"tok-url"},{tag:C.labelName,class:"tok-labelName"},{tag:C.inserted,class:"tok-inserted"},{tag:C.deleted,class:"tok-deleted"},{tag:C.literal,class:"tok-literal"},{tag:C.string,class:"tok-string"},{tag:C.number,class:"tok-number"},{tag:[C.regexp,C.escape,C.special(C.string)],class:"tok-string2"},{tag:C.variableName,class:"tok-variableName"},{tag:C.local(C.variableName),class:"tok-variableName tok-local"},{tag:C.definition(C.variableName),class:"tok-variableName tok-definition"},{tag:C.special(C.variableName),class:"tok-variableName2"},{tag:C.definition(C.propertyName),class:"tok-propertyName tok-definition"},{tag:C.typeName,class:"tok-typeName"},{tag:C.namespace,class:"tok-namespace"},{tag:C.className,class:"tok-className"},{tag:C.macroName,class:"tok-macroName"},{tag:C.propertyName,class:"tok-propertyName"},{tag:C.operator,class:"tok-operator"},{tag:C.comment,class:"tok-comment"},{tag:C.meta,class:"tok-meta"},{tag:C.invalid,class:"tok-invalid"},{tag:C.punctuation,class:"tok-punctuation"}]);var hx,Vs=new be;function Zd(e){return he.define({combine:e?(t)=>t.concat(e):void 0})}var _g=new be;class Vn{constructor(e,t,n=[],r=""){if(this.data=e,this.name=r,!Le.prototype.hasOwnProperty("tree"))Object.defineProperty(Le.prototype,"tree",{get(){return Ie(this)}});this.parser=t,this.extension=[mu.of(this),Le.languageData.of((o,i,s)=>{let a=$M(o,i,s),l=a.type.prop(Vs);if(!l)return[];let c=o.facet(l),u=a.type.prop(_g);if(u){let f=a.resolve(i-a.from,s);for(let d of u)if(d.test(f,o)){let h=o.facet(d.facet);return d.type=="replace"?h:h.concat(c)}}return c})].concat(n)}isActiveAt(e,t,n=-1){return $M(e,t,n).type.prop(Vs)==this.data}findRegions(e){let t=e.facet(mu);if((t===null||t===void 0?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(o,i)=>{if(o.prop(Vs)==this.data){n.push({from:i,to:i+o.length});return}let s=o.prop(be.mounted);if(s){if(s.tree.prop(Vs)==this.data){if(s.overlay)for(let a of s.overlay)n.push({from:a.from+i,to:a.to+i});else n.push({from:i,to:i+o.length});return}else if(s.overlay){let a=n.length;if(r(s.tree,s.overlay[0].from+i),n.length>a)return}}for(let a=0;a<o.children.length;a++){let l=o.children[a];if(l instanceof Be)r(l,o.positions[a]+i)}};return r(Ie(e),0),n}get allowsNesting(){return!0}}Vn.setState=ze.define();function $M(e,t,n){let r=e.facet(mu),o=Ie(e).topNode;if(!r||r.allowsNesting){for(let i=o;i;i=i.enter(t,n,je.ExcludeBuffers|je.EnterBracketed))if(i.type.isTop)o=i}return o}class Mi extends Vn{constructor(e,t,n){super(e,t,[],n);this.parser=t}static define(e){let t=Zd(e.languageData);return new Mi(t,e.parser.configure({props:[Vs.add((n)=>n.isTop?t:void 0)]}),e.name)}configure(e,t){return new Mi(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ie(e){let t=e.field(Vn.state,!1);return t?t.tree:Be.empty}class zM{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;if(e<n||t>=this.cursorPos)return this.doc.sliceString(e,t);else return this.string.slice(e-n,t-n)}}var Bd=null;class hu{constructor(e,t,n=[],r,o,i,s,a){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=o,this.viewport=i,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new hu(e,t,[],Be.empty,0,n,[],null)}startParse(){return this.parser.startParse(new zM(this.state.doc),this.fragments)}work(e,t){if(t!=null&&t>=this.state.doc.length)t=void 0;if(this.tree!=Be.empty&&this.isDone(t!==null&&t!==void 0?t:this.state.doc.length))return this.takeTree(),!0;return this.withContext(()=>{var n;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}if(!this.parse)this.parse=this.startParse();if(t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length)this.parse.stopAt(t);for(;;){let r=this.parse.advance();if(r)if(this.fragments=this.withoutTempSkipped(Xo.addTree(r,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(n=this.parse.stoppedAt)!==null&&n!==void 0?n:this.state.doc.length,this.tree=r,this.parse=null,this.treeLen<(t!==null&&t!==void 0?t:this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;if(this.parse&&(e=this.parse.parsedPos)>=this.treeLen){if(this.parse.stoppedAt==null||this.parse.stoppedAt>e)this.parse.stopAt(e);this.withContext(()=>{while(!(t=this.parse.advance()));}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Xo.addTree(this.tree,this.fragments,!0)),this.parse=null}}withContext(e){let t=Bd;Bd=this;try{return e()}finally{Bd=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=DM(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:o,viewport:i,skipped:s}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((l,c,u,f)=>a.push({fromA:l,toA:c,fromB:u,toB:f})),n=Xo.applyChanges(n,a),r=Be.empty,o=0,i={from:e.mapPos(i.from,-1),to:e.mapPos(i.to,1)},this.skipped.length){s=[];for(let l of this.skipped){let c=e.mapPos(l.from,1),u=e.mapPos(l.to,-1);if(c<u)s.push({from:c,to:u})}}}return new hu(this.parser,t,n,r,o,i,s,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let n=0;n<this.skipped.length;n++){let{from:r,to:o}=this.skipped[n];if(r<e.to&&o>e.from)this.fragments=DM(this.fragments,r,o),this.skipped.splice(n--,1)}if(this.skipped.length>=t)return!1;return this.reset(),!0}reset(){if(this.parse)this.takeTree(),this.parse=null}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends tl{createParse(t,n,r){let o=r[0].from,i=r[r.length-1].to;return{parsedPos:o,advance(){let a=Bd;if(a){for(let l of r)a.tempSkipped.push(l);if(e)a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e}return this.parsedPos=i,new Be(Pt.none,[],[],i-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Bd}}function DM(e,t,n){return Xo.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class pu{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);if(!t.work(20,n))t.takeTree();return new pu(t)}static init(e){let t=Math.min(3000,e.doc.length),n=hu.create(e.facet(mu).parser,e,{from:0,to:t});if(!n.work(20,t))n.takeTree();return new pu(n)}}Vn.state=un.define({create:pu.init,update(e,t){for(let n of t.effects)if(n.is(Vn.setState))return n.value;if(t.startState.facet(mu)!=t.state.facet(mu))return pu.init(t.state);return e.apply(t)}});var jM=(e)=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};if(typeof requestIdleCallback<"u")jM=(e)=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)};var px=typeof navigator<"u"&&((hx=navigator.scheduling)===null||hx===void 0?void 0:hx.isInputPending)?()=>navigator.scheduling.isInputPending():null,s9=pr.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let n=this.view.state.field(Vn.state).context;if(n.updateViewport(t.view.viewport)||this.view.viewport.to>n.treeLen)this.scheduleWork();if(t.docChanged||t.selectionSet){if(this.view.hasFocus)this.chunkBudget+=50;this.scheduleWork()}this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:t}=this.view,n=t.field(Vn.state);if(n.tree!=n.context.tree||!n.context.isDone(t.doc.length))this.working=jM(this.work)}work(t){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus))this.chunkEnd=n+30000,this.chunkBudget=3000;if(this.chunkBudget<=0)return;let{state:r,viewport:{to:o}}=this.view,i=r.field(Vn.state);if(i.tree==i.context.tree&&i.context.isDone(o+1e5))return;let s=Date.now()+Math.min(this.chunkBudget,100,t&&!px?Math.max(25,t.timeRemaining()-5):1e9),a=i.context.treeLen<o&&r.doc.length>o+1000,l=i.context.work(()=>px&&px()||Date.now()>s,o+(a?0:1e5));if(this.chunkBudget-=Date.now()-n,l||this.chunkBudget<=0)i.context.takeTree(),this.view.dispatch({effects:Vn.setState.of(new pu(i.context))});if(this.chunkBudget>0&&!(l&&!a))this.scheduleWork();this.checkAsyncSchedule(i.context)}checkAsyncSchedule(t){if(t.scheduleOn)this.workScheduled++,t.scheduleOn.then(()=>this.scheduleWork()).catch((n)=>Qn(this.view.state,n)).then(()=>this.workScheduled--),t.scheduleOn=null}destroy(){if(this.working)this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),mu=he.define({combine(e){return e.length?e[0]:null},enables:(e)=>[Vn.state,s9,re.contentAttributes.compute([e],(t)=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class Yo{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class Ud{constructor(e,t,n,r,o,i=void 0){this.name=e,this.alias=t,this.extensions=n,this.filename=r,this.loadFunc=o,this.support=i,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then((e)=>this.support=e,(e)=>{throw this.loading=null,e}))}static of(e){let{load:t,support:n}=e;if(!t){if(!n)throw RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(n)}return new Ud(e.name,(e.alias||[]).concat(e.name).map((r)=>r.toLowerCase()),e.extensions||[],e.filename,t,n)}static matchFilename(e,t){for(let r of e)if(r.filename&&r.filename.test(t))return r;let n=/\.([^.]+)$/.exec(t);if(n){for(let r of e)if(r.extensions.indexOf(n[1])>-1)return r}return null}static matchLanguageName(e,t,n=!0){t=t.toLowerCase();for(let r of e)if(r.alias.some((o)=>o==t))return r;if(n)for(let r of e)for(let o of r.alias){let i=t.indexOf(o);if(i>-1&&(o.length>2||!/\w/.test(t[i-1])&&!/\w/.test(t[i+o.length])))return r}return null}}var a9=he.define(),qs=he.define({combine:(e)=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some((n)=>n!=t[0]))throw Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function Yd(e){let t=e.facet(qs);return t.charCodeAt(0)==9?e.tabSize*t.length:t.length}function Vd(e,t){let n="",r=e.tabSize,o=e.facet(qs)[0];if(o=="\t"){while(t>=r)n+="\t",t-=r;o=" "}for(let i=0;i<t;i++)n+=o;return n}function vx(e,t){if(e instanceof Le)e=new gu(e);for(let r of e.state.facet(a9)){let o=r(e,t);if(o!==void 0)return o}let n=Ie(e.state);return n.length>=t?l9(e,n,t):null}class gu{constructor(e,t={}){this.state=e,this.options=t,this.unit=Yd(e)}lineAt(e,t=1){let n=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:o}=this.options;if(r!=null&&r>=n.from&&r<=n.to)if(o&&r==e)return{text:"",from:e};else if(t<0?r<e:r<=e)return{text:n.text.slice(r-n.from),from:r};else return{text:n.text.slice(0,r-n.from),from:n.from};return n}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:n,from:r}=this.lineAt(e,t);return n.slice(e-r,Math.min(n.length,e+100-r))}column(e,t=1){let{text:n,from:r}=this.lineAt(e,t),o=this.countColumn(n,e-r),i=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;if(i>-1)o+=i-this.countColumn(n,n.search(/\S|$/));return o}countColumn(e,t=e.length){return dr(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),o=this.options.overrideIndentation;if(o){let i=o(r);if(i>-1)return i}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}var $i=new be;function l9(e,t,n){let r=t.resolveStack(n),o=t.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(o!=r.node){let i=[];for(let s=o;s&&!(s.from<r.node.from||s.to>r.node.to||s.from==r.node.from&&s.type==r.node.type);s=s.parent)i.push(s);for(let s=i.length-1;s>=0;s--)r={node:i[s],next:r}}return IM(r,e,n)}function IM(e,t,n){for(let r=e;r;r=r.next){let o=u9(r.node);if(o)return o(xx.create(t,n,r))}return 0}function c9(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}function u9(e){let t=e.type.prop($i);if(t)return t;let n=e.firstChild,r;if(n&&(r=n.type.prop(be.closedBy))){let o=e.lastChild,i=o&&r.indexOf(o.name)>-1;return(s)=>BM(s,!0,1,void 0,i&&!c9(s)?o.from:void 0)}return e.parent==null?f9:null}function f9(){return 0}class xx extends gu{constructor(e,t,n){super(e.state,e.options);this.base=e,this.pos=t,this.context=n}get node(){return this.context.node}static create(e,t,n){return new xx(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let n=e.resolve(t.from);while(n.parent&&n.parent.from==n.from)n=n.parent;if(d9(n,e))break;t=this.state.doc.lineAt(n.from)}return this.lineIndent(t.from)}continue(){return IM(this.context.next,this.base,this.pos)}}function d9(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function h9(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let o=e.options.simulateBreak,i=e.state.doc.lineAt(n.from),s=o==null||o<=i.from?i.to:Math.min(i.to,o);for(let a=n.to;;){let l=t.childAfter(a);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=s)return null;let c=/^ */.exec(i.text.slice(n.to-i.from))[0].length;return{from:n.from,to:n.to+c}}a=l.to}}function XM({closing:e,align:t=!0,units:n=1}){return(r)=>BM(r,t,n,e)}function BM(e,t,n,r,o){let i=e.textAfter,s=i.match(/^\s*/)[0].length,a=r&&i.slice(s,s+r.length)==r||o==e.pos+s,l=t?h9(e):null;if(l)return a?e.column(l.from):e.column(l.to);return e.baseIndent+(a?0:e.unit*n)}var ZM=(e)=>e.baseIndent;function Ou({except:e,units:t=1}={}){return(n)=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}var UM=he.define(),Di=new be;function Ng(e){let{firstChild:t,lastChild:n}=e;return t&&t.to<n.from?{from:t.to,to:n.type.isError?e.to:n.from}:null}class bu{constructor(e,t){this.specs=e;let n;function r(s){let a=no.newName();return(n||(n=Object.create(null)))["."+a]=s,a}let o=typeof t.all=="string"?t.all:t.all?r(t.all):void 0,i=t.scope;this.scope=i instanceof Vn?(s)=>s.prop(Vs)==i.data:i?(s)=>s==i:void 0,this.style=dx(e.map((s)=>({tag:s.tag,class:s.class||r(Object.assign({},s,{tag:null}))})),{all:o}).style,this.module=n?new no(n):null,this.themeType=t.themeType}static define(e,t){return new bu(e,t||{})}}var Ox=he.define(),YM=he.define({combine(e){return e.length?[e[0]]:null}});function mx(e){let t=e.facet(Ox);return t.length?t:e.facet(YM)}function VM(e,t){let n=[p9],r;if(e instanceof bu){if(e.module)n.push(re.styleModule.of(e.module));r=e.themeType}if(t===null||t===void 0?void 0:t.fallback)n.push(YM.of(e));else if(r)n.push(Ox.computeN([re.darkTheme],(o)=>o.facet(re.darkTheme)==(r=="dark")?[e]:[]));else n.push(Ox.of(e));return n}class qM{constructor(e){this.markCache=Object.create(null),this.tree=Ie(e.state),this.decorations=this.buildDeco(e,mx(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Ie(e.state),n=mx(e.state),r=n!=mx(e.startState),{viewport:o}=e.view,i=e.changes.mapPos(this.decoratedTo,1);if(t.length<o.to&&!r&&t.type==this.tree.type&&i>=o.to)this.decorations=this.decorations.map(e.changes),this.decoratedTo=i;else if(t!=this.tree||e.viewportChanged||r)this.tree=t,this.decorations=this.buildDeco(e.view,n),this.decoratedTo=o.to}buildDeco(e,t){if(!t||!this.tree.length)return we.none;let n=new Ns;for(let{from:r,to:o}of e.visibleRanges)EM(this.tree,t,(i,s,a)=>{n.add(i,s,this.markCache[a]||(this.markCache[a]=we.mark({class:a})))},r,o);return n.finish()}}var p9=_r.high(pr.fromClass(qM,{decorations:(e)=>e.decorations})),Ore=bu.define([{tag:C.meta,color:"#404740"},{tag:C.link,textDecoration:"underline"},{tag:C.heading,textDecoration:"underline",fontWeight:"bold"},{tag:C.emphasis,fontStyle:"italic"},{tag:C.strong,fontWeight:"bold"},{tag:C.strikethrough,textDecoration:"line-through"},{tag:C.keyword,color:"#708"},{tag:[C.atom,C.bool,C.url,C.contentSeparator,C.labelName],color:"#219"},{tag:[C.literal,C.inserted],color:"#164"},{tag:[C.string,C.deleted],color:"#a11"},{tag:[C.regexp,C.escape,C.special(C.string)],color:"#e40"},{tag:C.definition(C.variableName),color:"#00f"},{tag:C.local(C.variableName),color:"#30a"},{tag:[C.typeName,C.namespace],color:"#085"},{tag:C.className,color:"#167"},{tag:[C.special(C.variableName),C.macroName],color:"#256"},{tag:C.definition(C.propertyName),color:"#00c"},{tag:C.comment,color:"#940"},{tag:C.invalid,color:"#f00"}]);var m9=1e4,g9="()[]{}";var wx=new be;function bx(e,t,n){let r=e.prop(t<0?be.openedBy:be.closedBy);if(r)return r;if(e.name.length==1){let o=n.indexOf(e.name);if(o>-1&&o%2==(t<0?1:0))return[n[o+t]]}return null}function yx(e){let t=e.type.prop(wx);return t?t(e.node):e}function rl(e,t,n,r={}){let o=r.maxScanDistance||m9,i=r.brackets||g9,s=Ie(e),a=s.resolveInner(t,n);for(let l=a;l;l=l.parent){let c=bx(l.type,n,i);if(c&&l.from<l.to){let u=yx(l);if(u&&(n>0?t>=u.from&&t<u.to:t>u.from&&t<=u.to))return O9(e,t,n,l,u,c,i)}}return b9(e,t,n,s,a.type,o,i)}function O9(e,t,n,r,o,i,s){let a=r.parent,l={from:o.from,to:o.to},c=0,u=a===null||a===void 0?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do if(n<0?u.to<=r.from:u.from>=r.to){if(c==0&&i.indexOf(u.type.name)>-1&&u.from<u.to){let f=yx(u);return{start:l,end:f?{from:f.from,to:f.to}:void 0,matched:!0}}else if(bx(u.type,n,s))c++;else if(bx(u.type,-n,s)){if(c==0){let f=yx(u);return{start:l,end:f&&f.from<f.to?{from:f.from,to:f.to}:void 0,matched:!1}}c--}}while(n<0?u.prevSibling():u.nextSibling());return{start:l,matched:!1}}function b9(e,t,n,r,o,i,s){if(n<0?!t:t==e.doc.length)return null;let a=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),f=0;for(let d=0;!u.next().done&&d<=i;){let h=u.value;if(n<0)d+=h.length;let m=t+d*n;for(let g=n>0?0:h.length-1,b=n>0?h.length:-1;g!=b;g+=n){let O=s.indexOf(h[g]);if(O<0||r.resolveInner(m+g,1).type!=o)continue;if(O%2==0==n>0)f++;else if(f==1)return{start:c,end:{from:m+g,to:m+g+1},matched:O>>1==l>>1};else f--}if(n>0)d+=h.length}return u.done?{start:c,matched:!1}:null}var y9=Object.create(null),_M=[Pt.none];var NM=[],LM=Object.create(null),v9=Object.create(null);for(let[e,t]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])v9[e]=x9(y9,t);function gx(e,t){if(NM.indexOf(e)>-1)return;NM.push(e),console.warn(t)}function x9(e,t){let n=[];for(let a of t.split(" ")){let l=[];for(let c of a.split(".")){let u=e[c]||C[c];if(!u)gx(c,`Unknown highlighting tag ${c}`);else if(typeof u=="function")if(!l.length)gx(c,`Modifier ${c} used at start of tag`);else l=l.map(u);else if(l.length)gx(c,`Tag ${c} used as modifier`);else l=Array.isArray(u)?u:[u]}for(let c of l)n.push(c)}if(!n.length)return 0;let r=t.replace(/ /g,"_"),o=r+" "+n.map((a)=>a.id),i=LM[o];if(i)return i.id;let s=LM[o]=Pt.define({id:_M.length,name:r,props:[lo({[r]:n})]});return _M.push(s),s.id}var bre={rtl:we.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"rtl"},bidiIsolate:pt.RTL}),ltr:we.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"ltr"},bidiIsolate:pt.LTR}),auto:we.mark({class:"cm-iso",inclusive:!0,attributes:{dir:"auto"},bidiIsolate:null})};var w9=(e)=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=Ax(e.state,n.from);return r.line?S9(e):r.block?C9(e):!1};function Tx(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let o=e(t,n);if(!o)return!1;return r(n.update(o)),!0}}var S9=Tx(T9,0);var k9=Tx(n$,0);var C9=Tx((e,t)=>n$(e,t,P9(t)),0);function Ax(e,t){let n=e.languageDataAt("commentTokens",t,1);return n.length?n[0]:{}}var qd=50;function R9(e,{open:t,close:n},r,o){let i=e.sliceDoc(r-qd,r),s=e.sliceDoc(o,o+qd),a=/\s*$/.exec(i)[0].length,l=/^\s*/.exec(s)[0].length,c=i.length-a;if(i.slice(c-t.length,c)==t&&s.slice(l,l+n.length)==n)return{open:{pos:r-a,margin:a&&1},close:{pos:o+l,margin:l&&1}};let u,f;if(o-r<=2*qd)u=f=e.sliceDoc(r,o);else u=e.sliceDoc(r,r+qd),f=e.sliceDoc(o-qd,o);let d=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(f)[0].length,m=f.length-h-n.length;if(u.slice(d,d+t.length)==t&&f.slice(m,m+n.length)==n)return{open:{pos:r+d+t.length,margin:/\s/.test(u.charAt(d+t.length))?1:0},close:{pos:o-h-n.length,margin:/\s/.test(f.charAt(m-1))?1:0}};return null}function P9(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),o=n.to<=r.to?r:e.doc.lineAt(n.to);if(o.from>r.from&&o.from==n.to)o=n.to==r.to+1?r:e.doc.lineAt(n.to-1);let i=t.length-1;if(i>=0&&t[i].to>r.from)t[i].to=o.to;else t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:o.to})}return t}function n$(e,t,n=t.selection.ranges){let r=n.map((i)=>Ax(t,i.from).block);if(!r.every((i)=>i))return null;let o=n.map((i,s)=>R9(t,r[s],i.from,i.to));if(e!=2&&!o.every((i)=>i))return{changes:t.changes(n.map((i,s)=>{if(o[s])return[];return[{from:i.from,insert:r[s].open+" "},{from:i.to,insert:" "+r[s].close}]}))};else if(e!=1&&o.some((i)=>i)){let i=[];for(let s=0,a;s<o.length;s++)if(a=o[s]){let l=r[s],{open:c,close:u}=a;i.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:i}}return null}function T9(e,t,n=t.selection.ranges){let r=[],o=-1;e:for(let{from:i,to:s}of n){let a=r.length,l=1e9,c;for(let u=i;u<=s;){let f=t.doc.lineAt(u);if(c==null){if(c=Ax(t,f.from).line,!c)continue e}if(f.from>o&&(i==s||s>f.from)){o=f.from;let d=/^\s*/.exec(f.text)[0].length,h=d==f.length,m=f.text.slice(d,d+c.length)==c?d:-1;if(d<f.text.length&&d<l)l=d;r.push({line:f,comment:m,token:c,indent:d,empty:h,single:!1})}u=f.to+1}if(l<1e9){for(let u=a;u<r.length;u++)if(r[u].indent<r[u].line.text.length)r[u].indent=l}if(r.length==a+1)r[a].single=!0}if(e!=2&&r.some((i)=>i.comment<0&&(!i.empty||i.single))){let i=[];for(let{line:a,token:l,indent:c,empty:u,single:f}of r)if(f||!u)i.push({from:a.from+c,insert:l+" "});let s=t.changes(i);return{changes:s,selection:t.selection.map(s,1)}}else if(e!=1&&r.some((i)=>i.comment>=0)){let i=[];for(let{line:s,comment:a,token:l}of r)if(a>=0){let c=s.from+a,u=c+l.length;if(s.text[u-s.from]==" ")u++;i.push({from:c,to:u})}return{changes:i}}return null}var kx=fr.define(),A9=fr.define(),Q9=he.define(),r$=he.define({combine(e){return ru(e,{minDepth:100,newGroupDelay:500,joinToEvent:(t,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,n)=>(r,o)=>t(r,o)||n(r,o)})}}),o$=un.define({create(){return Vo.empty},update(e,t){let n=t.state.facet(r$),r=t.annotation(kx);if(r){let l=qn.fromTransaction(t,r.selection),c=r.side,u=c==0?e.undone:e.done;if(l)u=zg(u,u.length,n.minDepth,l);else u=l$(u,t.startState.selection);return new Vo(c==0?r.rest:u,c==0?u:r.rest)}let o=t.annotation(A9);if(o=="full"||o=="before")e=e.isolate();if(t.annotation(yt.addToHistory)===!1)return!t.changes.empty?e.addMapping(t.changes.desc):e;let i=qn.fromTransaction(t),s=t.annotation(yt.time),a=t.annotation(yt.userEvent);if(i)e=e.addChanges(i,s,a,n,t);else if(t.selection)e=e.addSelection(t.startState.selection,s,a,n.newGroupDelay);if(o=="full"||o=="after")e=e.isolate();return e},toJSON(e){return{done:e.done.map((t)=>t.toJSON()),undone:e.undone.map((t)=>t.toJSON())}},fromJSON(e){return new Vo(e.done.map(qn.fromJSON),e.undone.map(qn.fromJSON))}});function i$(e={}){return[o$,r$.of(e),re.domEventHandlers({beforeinput(t,n){let r=t.inputType=="historyUndo"?s$:t.inputType=="historyRedo"?Cx:null;if(!r)return!1;return t.preventDefault(),r(n)}})]}function jg(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let o=n.field(o$,!1);if(!o)return!1;let i=o.pop(e,n,t);if(!i)return!1;return r(i),!0}}var s$=jg(0,!1),Cx=jg(1,!1),E9=jg(0,!0),M9=jg(1,!0);class qn{constructor(e,t,n,r,o){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=o}setSelAfter(e){return new qn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map((r)=>r.toJSON())}}static fromJSON(e){return new qn(e.changes&&Et.fromJSON(e.changes),[],e.mapped&&eo.fromJSON(e.mapped),e.startSelection&&j.fromJSON(e.startSelection),e.selectionsAfter.map(j.fromJSON))}static fromTransaction(e,t){let n=zr;for(let r of e.startState.facet(Q9)){let o=r(e);if(o.length)n=n.concat(o)}if(!n.length&&e.changes.empty)return null;return new qn(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,zr)}static selection(e){return new qn(void 0,zr,void 0,void 0,e)}}function zg(e,t,n,r){let o=t+1>n+20?t-n-1:0,i=e.slice(o,t);return i.push(r),i}function $9(e,t){let n=[],r=!1;return e.iterChangedRanges((o,i)=>n.push(o,i)),t.iterChangedRanges((o,i,s,a)=>{for(let l=0;l<n.length;){let c=n[l++],u=n[l++];if(a>=c&&s<=u)r=!0}}),r}function D9(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((n,r)=>n.empty!=t.ranges[r].empty).length===0}function a$(e,t){return!e.length?t:!t.length?e:e.concat(t)}var zr=[],_9=200;function l$(e,t){if(!e.length)return[qn.selection([t])];else{let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-_9));if(r.length&&r[r.length-1].eq(t))return e;return r.push(t),zg(e,e.length-1,1e9,n.setSelAfter(r))}}function N9(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 Sx(e,t){if(!e.length)return e;let n=e.length,r=zr;while(n){let o=L9(e[n-1],t,r);if(o.changes&&!o.changes.empty||o.effects.length){let i=e.slice(0,n);return i[n-1]=o,i}else t=o.mapped,n--,r=o.selectionsAfter}return r.length?[qn.selection(r)]:zr}function L9(e,t,n){let r=a$(e.selectionsAfter.length?e.selectionsAfter.map((a)=>a.map(t)):zr,n);if(!e.changes)return qn.selection(r);let o=e.changes.map(t),i=t.mapDesc(e.changes,!0),s=e.mapped?e.mapped.composeDesc(i):i;return new qn(o,ze.mapEffects(e.effects,t),s,e.startSelection.map(i),r)}var z9=/^(input\.type|delete)($|\.)/;class Vo{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 Vo(this.done,this.undone):this}addChanges(e,t,n,r,o){let i=this.done,s=i[i.length-1];if(s&&s.changes&&!s.changes.empty&&e.changes&&(!n||z9.test(n))&&(!s.selectionsAfter.length&&t-this.prevTime<r.newGroupDelay&&r.joinToEvent(o,$9(s.changes,e.changes))||n=="input.type.compose"))i=zg(i,i.length-1,r.minDepth,new qn(e.changes.compose(s.changes),a$(ze.mapEffects(e.effects,s.changes),s.effects),s.mapped,s.startSelection,zr));else i=zg(i,i.length,r.minDepth,e);return new Vo(i,zr,t,n)}addSelection(e,t,n,r){let o=this.done.length?this.done[this.done.length-1].selectionsAfter:zr;if(o.length>0&&t-this.prevTime<r&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&D9(o[o.length-1],e))return this;return new Vo(l$(this.done,e),this.undone,t,n)}addMapping(e){return new Vo(Sx(this.done,e),Sx(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let o=r[r.length-1],i=o.selectionsAfter[0]||(o.startSelection?o.startSelection.map(o.changes.invertedDesc,1):t.selection);if(n&&o.selectionsAfter.length)return t.update({selection:o.selectionsAfter[o.selectionsAfter.length-1],annotations:kx.of({side:e,rest:N9(r),selection:i}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});else if(!o.changes)return null;else{let s=r.length==1?zr:r.slice(0,r.length-1);if(o.mapped)s=Sx(s,o.mapped);return t.update({changes:o.changes,selection:o.startSelection,effects:o.effects,annotations:kx.of({side:e,rest:s,selection:i}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}}}Vo.empty=new Vo(zr,zr);var c$=[{key:"Mod-z",run:s$,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:Cx,preventDefault:!0},{linux:"Ctrl-Shift-z",run:Cx,preventDefault:!0},{key:"Mod-u",run:E9,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:M9,preventDefault:!0}];function yu(e,t){return j.create(e.ranges.map(t),e.mainIndex)}function co(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function uo({state:e,dispatch:t},n){let r=yu(e.selection,n);if(r.eq(e.selection,!0))return!1;return t(co(e,r)),!0}function Ig(e,t){return j.cursor(t?e.to:e.from)}function u$(e,t){return uo(e,(n)=>n.empty?e.moveByChar(n,t):Ig(n,t))}function Sn(e){return e.textDirectionAt(e.state.selection.main.head)==pt.LTR}var f$=(e)=>u$(e,!Sn(e)),d$=(e)=>u$(e,Sn(e));function h$(e,t){return uo(e,(n)=>n.empty?e.moveByGroup(n,t):Ig(n,t))}var j9=(e)=>h$(e,!Sn(e)),I9=(e)=>h$(e,Sn(e));var Cre=typeof Intl<"u"&&Intl.Segmenter?new Intl.Segmenter(void 0,{granularity:"word"}):null;function X9(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 Xg(e,t,n){let r=Ie(e).resolveInner(t.head),o=n?be.closedBy:be.openedBy;for(let l=t.head;;){let c=n?r.childAfter(l):r.childBefore(l);if(!c)break;if(X9(e,c,o))r=c;else l=n?c.to:c.from}let i=r.type.prop(o),s,a;if(i&&(s=n?rl(e,r.from,1):rl(e,r.to,-1))&&s.matched)a=n?s.end.to:s.end.from;else a=n?r.to:r.from;return j.cursor(a,n?-1:1)}var B9=(e)=>uo(e,(t)=>Xg(e.state,t,!Sn(e))),Z9=(e)=>uo(e,(t)=>Xg(e.state,t,Sn(e)));function p$(e,t){return uo(e,(n)=>{if(!n.empty)return Ig(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}var m$=(e)=>p$(e,!1),g$=(e)=>p$(e,!0);function O$(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,o;if(t){for(let i of e.state.facet(re.scrollMargins)){let s=i(e);if(s===null||s===void 0?void 0:s.top)n=Math.max(s===null||s===void 0?void 0:s.top,n);if(s===null||s===void 0?void 0:s.bottom)r=Math.max(s===null||s===void 0?void 0:s.bottom,r)}o=e.scrollDOM.clientHeight-n-r}else o=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,o-5)}}function b$(e,t){let n=O$(e),{state:r}=e,o=yu(r.selection,(s)=>s.empty?e.moveVertically(s,t,n.height):Ig(s,t));if(o.eq(r.selection))return!1;let i;if(n.selfScroll){let s=e.coordsAtPos(r.selection.main.head),a=e.scrollDOM.getBoundingClientRect(),l=a.top+n.marginTop,c=a.bottom-n.marginBottom;if(s&&s.top>l&&s.bottom<c)i=re.scrollIntoView(o.main.head,{y:"start",yMargin:s.top-l})}return e.dispatch(co(r,o),{effects:i}),!0}var GM=(e)=>b$(e,!1),Rx=(e)=>b$(e,!0);function Gs(e,t,n){let r=e.lineBlockAt(t.head),o=e.moveToLineBoundary(t,n);if(o.head==t.head&&o.head!=(n?r.to:r.from))o=e.moveToLineBoundary(t,n,!1);if(!n&&o.head==r.from&&r.length){let i=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;if(i&&t.head!=r.from+i)o=j.cursor(r.from+i)}return o}var U9=(e)=>uo(e,(t)=>Gs(e,t,!0)),Y9=(e)=>uo(e,(t)=>Gs(e,t,!1)),V9=(e)=>uo(e,(t)=>Gs(e,t,!Sn(e))),q9=(e)=>uo(e,(t)=>Gs(e,t,Sn(e))),G9=(e)=>uo(e,(t)=>e.moveToLineBoundary(t,!1,!1)),H9=(e)=>uo(e,(t)=>e.moveToLineBoundary(t,!0,!1));function W9(e,t,n){let r=!1,o=yu(e.selection,(i)=>{let s=rl(e,i.head,-1)||rl(e,i.head,1)||i.head>0&&rl(e,i.head-1,1)||i.head<e.doc.length&&rl(e,i.head+1,-1);if(!s||!s.end)return i;r=!0;let a=s.start.from==i.head?s.end.to:s.end.from;return n?j.range(i.anchor,a):j.cursor(a)});if(!r)return!1;return t(co(e,o)),!0}var F9=({state:e,dispatch:t})=>W9(e,t,!1);function jr(e,t,n){let r=yu(e.state.selection,(o)=>{if(o.undirectional&&o.head>=o.anchor!=t)o=j.range(o.head,o.anchor);let i=n(o);return j.range(o.anchor,i.head,i.goalColumn,i.bidiLevel||void 0,i.assoc)});if(r.eq(e.state.selection))return!1;return e.dispatch(co(e.state,r)),!0}function y$(e,t){return jr(e,t,(n)=>e.moveByChar(n,t))}var v$=(e)=>y$(e,!Sn(e)),x$=(e)=>y$(e,Sn(e));function w$(e,t){return jr(e,t,(n)=>e.moveByGroup(n,t))}var K9=(e)=>w$(e,!Sn(e)),J9=(e)=>w$(e,Sn(e));var eU=(e)=>{let t=!Sn(e);return jr(e,t,(n)=>Xg(e.state,n,t))},tU=(e)=>{let t=Sn(e);return jr(e,t,(n)=>Xg(e.state,n,t))};function S$(e,t){return jr(e,t,(n)=>e.moveVertically(n,t))}var k$=(e)=>S$(e,!1),C$=(e)=>S$(e,!0);function R$(e,t){return jr(e,t,(n)=>e.moveVertically(n,t,O$(e).height))}var HM=(e)=>R$(e,!1),WM=(e)=>R$(e,!0),nU=(e)=>jr(e,!0,(t)=>Gs(e,t,!0)),rU=(e)=>jr(e,!1,(t)=>Gs(e,t,!1)),oU=(e)=>{let t=!Sn(e);return jr(e,t,(n)=>Gs(e,n,t))},iU=(e)=>{let t=Sn(e);return jr(e,t,(n)=>Gs(e,n,t))},sU=(e)=>jr(e,!1,(t)=>j.cursor(e.lineBlockAt(t.head).from)),aU=(e)=>jr(e,!0,(t)=>j.cursor(e.lineBlockAt(t.head).to)),FM=({state:e,dispatch:t})=>(t(co(e,{anchor:0})),!0),KM=({state:e,dispatch:t})=>(t(co(e,{anchor:e.doc.length})),!0),JM=({state:e,dispatch:t})=>(t(co(e,{anchor:e.selection.main.anchor,head:0})),!0),e$=({state:e,dispatch:t})=>(t(co(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),lU=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),cU=({state:e,dispatch:t})=>{let n=Bg(e).map(({from:r,to:o})=>j.undirectionalRange(r,Math.min(o+1,e.doc.length)));return t(e.update({selection:j.create(n),userEvent:"select"})),!0},uU=({state:e,dispatch:t})=>{let n=yu(e.selection,(r)=>{let o=Ie(e),i=o.resolveStack(r.from,1);if(r.empty){let s=o.resolveStack(r.from,-1);if(s.node.from>=i.node.from&&s.node.to<=i.node.to)i=s}for(let s=i;s;s=s.next){let{node:a}=s;if((a.from<r.from&&a.to>=r.to||a.to>r.to&&a.from<=r.from)&&s.next)return j.undirectionalRange(a.from,a.to)}return r});if(n.eq(e.selection))return!1;return t(co(e,n)),!0};function P$(e,t){let{state:n}=e,r=n.selection,o=n.selection.ranges.slice();for(let i of n.selection.ranges){let s=n.doc.lineAt(i.head);if(t?s.to<e.state.doc.length:s.from>0)for(let a=i;;){let l=e.moveVertically(a,t);if(l.head<s.from||l.head>s.to){if(!o.some((c)=>c.head==l.head))o.push(l);break}else if(l.head==a.head)break;else a=l}}if(o.length==r.ranges.length)return!1;return e.dispatch(co(n,j.create(o,o.length-1))),!0}var fU=(e)=>P$(e,!1),dU=(e)=>P$(e,!0),hU=({state:e,dispatch:t})=>{let n=e.selection,r=null;if(n.ranges.length>1)r=j.create([n.main]);else if(!n.main.empty)r=j.create([j.cursor(n.main.head)]);if(!r)return!1;return t(co(e,r)),!0};function Gd(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,o=r.changeByRange((i)=>{let{from:s,to:a}=i;if(s==a){let l=t(i);if(l<s)n="delete.backward",l=Lg(e,l,!1);else if(l>s)n="delete.forward",l=Lg(e,l,!0);s=Math.min(s,l),a=Math.max(a,l)}else s=Lg(e,s,!1),a=Lg(e,a,!0);return s==a?{range:i}:{changes:{from:s,to:a},range:j.cursor(s,s<i.head?-1:1)}});if(o.changes.empty)return!1;return e.dispatch(r.update(o,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?re.announce.of(r.phrase("Selection deleted")):void 0})),!0}function Lg(e,t,n){if(e instanceof re)for(let r of e.state.facet(re.atomicRanges).map((o)=>o(e)))r.between(t,t,(o,i)=>{if(o<t&&i>t)t=n?i:o});return t}var T$=(e,t,n)=>Gd(e,(r)=>{let o=r.from,{state:i}=e,s=i.doc.lineAt(o),a,l;if(n&&!t&&o>s.from&&o<s.from+200&&!/[^ \t]/.test(a=s.text.slice(0,o-s.from))){if(a[a.length-1]=="\t")return o-1;let c=dr(a,i.tabSize),u=c%Yd(i)||Yd(i);for(let f=0;f<u&&a[a.length-1-f]==" ";f++)o--;l=o}else if(l=Gt(s.text,o-s.from,t,t)+s.from,l==o&&s.number!=(t?i.doc.lines:1))l+=t?1:-1;else if(!t&&/[\ufe00-\ufe0f]/.test(s.text.slice(l-s.from,o-s.from)))l=Gt(s.text,l-s.from,!1,!1)+s.from;return l}),Px=(e)=>T$(e,!1,!0);var A$=(e)=>T$(e,!0,!1),Q$=(e,t)=>Gd(e,(n)=>{let r=n.head,{state:o}=e,i=o.doc.lineAt(r),s=o.charCategorizer(r);for(let a=null;;){if(r==(t?i.to:i.from)){if(r==n.head&&i.number!=(t?o.doc.lines:1))r+=t?1:-1;break}let l=Gt(i.text,r-i.from,t)+i.from,c=i.text.slice(Math.min(r,l)-i.from,Math.max(r,l)-i.from),u=s(c);if(a!=null&&u!=a)break;if(c!=" "||r!=n.head)a=u;r=l}return r}),E$=(e)=>Q$(e,!1),pU=(e)=>Q$(e,!0);var mU=(e)=>Gd(e,(t)=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)});var gU=(e)=>Gd(e,(t)=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),OU=(e)=>Gd(e,(t)=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)});var bU=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((r)=>({changes:{from:r.from,to:r.to,insert:De.of(["",""])},range:j.cursor(r.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},yU=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange((r)=>{if(!r.empty||r.from==0||r.from==e.doc.length)return{range:r};let o=r.from,i=e.doc.lineAt(o),s=o==i.from?o-1:Gt(i.text,o-i.from,!1)+i.from,a=o==i.to?o+1:Gt(i.text,o-i.from,!0)+i.from;return{changes:{from:s,to:a,insert:e.doc.slice(o,a).append(e.doc.slice(s,o))},range:j.cursor(a)}});if(n.changes.empty)return!1;return t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0};function Bg(e){let t=[],n=-1;for(let r of e.selection.ranges){let o=e.doc.lineAt(r.from),i=e.doc.lineAt(r.to);if(!r.empty&&r.to==i.from)i=e.doc.lineAt(r.to-1);if(n>=o.number){let s=t[t.length-1];s.to=i.to,s.ranges.push(r)}else t.push({from:o.from,to:i.to,ranges:[r]});n=i.number+1}return t}function M$(e,t,n){if(e.readOnly)return!1;let r=[],o=[];for(let i of Bg(e)){if(n?i.to==e.doc.length:i.from==0)continue;let s=e.doc.lineAt(n?i.to+1:i.from-1),a=s.length+1;if(n){r.push({from:i.to,to:s.to},{from:i.from,insert:s.text+e.lineBreak});for(let l of i.ranges)o.push(j.range(Math.min(e.doc.length,l.anchor+a),Math.min(e.doc.length,l.head+a)))}else{r.push({from:s.from,to:i.from},{from:i.to,insert:e.lineBreak+s.text});for(let l of i.ranges)o.push(j.range(l.anchor-a,l.head-a))}}if(!r.length)return!1;return t(e.update({changes:r,scrollIntoView:!0,selection:j.create(o,e.selection.mainIndex),userEvent:"move.line"})),!0}var vU=({state:e,dispatch:t})=>M$(e,t,!1),xU=({state:e,dispatch:t})=>M$(e,t,!0);function $$(e,t,n){if(e.readOnly)return!1;let r=[];for(let i of Bg(e))if(n)r.push({from:i.from,insert:e.doc.slice(i.from,i.to)+e.lineBreak});else r.push({from:i.to,insert:e.lineBreak+e.doc.slice(i.from,i.to)});let o=e.changes(r);return t(e.update({changes:o,selection:e.selection.map(o,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}var wU=({state:e,dispatch:t})=>$$(e,t,!1),SU=({state:e,dispatch:t})=>$$(e,t,!0),kU=(e)=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(Bg(t).map(({from:o,to:i})=>{if(o>0)o--;else if(i<t.doc.length)i++;return{from:o,to:i}})),r=yu(t.selection,(o)=>{let i=void 0;if(e.lineWrapping){let s=e.lineBlockAt(o.head),a=e.coordsAtPos(o.head,o.assoc||1);if(a)i=s.bottom+e.documentTop-a.bottom+e.defaultLineHeight/2}return e.moveVertically(o,!0,i)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function CU(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=Ie(e).resolveInner(t),r=n.childBefore(t),o=n.childAfter(t),i;if(r&&o&&r.to<=t&&o.from>=t&&(i=r.type.prop(be.closedBy))&&i.indexOf(o.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(o.from).from&&!/\S/.test(e.sliceDoc(r.to,o.from)))return{from:r.to,to:o.from};return null}var t$=D$(!1),RU=D$(!0);function D$(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange((o)=>{let{from:i,to:s}=o,a=t.doc.lineAt(i),l=!e&&i==s&&CU(t,i);if(e)i=s=(s<=a.to?a:t.doc.lineAt(s)).to;let c=new gu(t,{simulateBreak:i,simulateDoubleBreak:!!l}),u=vx(c,i);if(u==null)u=dr(/^\s*/.exec(t.doc.lineAt(i).text)[0],t.tabSize);while(s<a.to&&/\s/.test(a.text[s-a.from]))s++;if(l)({from:i,to:s}=l);else if(i>a.from&&i<a.from+100&&!/\S/.test(a.text.slice(0,i)))i=a.from;let f=["",Vd(t,u)];if(l)f.push(Vd(t,c.lineIndent(a.from,-1)));return{changes:{from:i,to:s,insert:De.of(f)},range:j.cursor(i+1+f[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Qx(e,t){let n=-1;return e.changeByRange((r)=>{let o=[];for(let s=r.from;s<=r.to;){let a=e.doc.lineAt(s);if(a.number>n&&(r.empty||r.to>a.from))t(a,o,r),n=a.number;s=a.to+1}let i=e.changes(o);return{changes:o,range:j.range(i.mapPos(r.anchor,1),i.mapPos(r.head,1))}})}var PU=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new gu(e,{overrideIndentation:(i)=>{let s=n[i];return s==null?-1:s}}),o=Qx(e,(i,s,a)=>{let l=vx(r,i.from);if(l==null)return;if(!/\S/.test(i.text))l=0;let c=/^\s*/.exec(i.text)[0],u=Vd(e,l);if(c!=u||a.from<i.from+c.length)n[i.from]=l,s.push({from:i.from,to:i.from+c.length,insert:u})});if(!o.changes.empty)t(e.update(o,{userEvent:"indent"}));return!0},_$=({state:e,dispatch:t})=>{if(e.readOnly)return!1;return t(e.update(Qx(e,(n,r)=>{r.push({from:n.from,insert:e.facet(qs)})}),{userEvent:"input.indent"})),!0},N$=({state:e,dispatch:t})=>{if(e.readOnly)return!1;return t(e.update(Qx(e,(n,r)=>{let o=/^\s*/.exec(n.text)[0];if(!o)return;let i=dr(o,e.tabSize),s=0,a=Vd(e,Math.max(0,i-Yd(e)));while(s<o.length&&s<a.length&&o.charCodeAt(s)==a.charCodeAt(s))s++;r.push({from:n.from+s,to:n.from+o.length,insert:a.slice(s)})}),{userEvent:"delete.dedent"})),!0},TU=(e)=>(e.setTabFocusMode(),!0);var AU=[{key:"Ctrl-b",run:f$,shift:v$,preventDefault:!0},{key:"Ctrl-f",run:d$,shift:x$},{key:"Ctrl-p",run:m$,shift:k$},{key:"Ctrl-n",run:g$,shift:C$},{key:"Ctrl-a",run:G9,shift:sU},{key:"Ctrl-e",run:H9,shift:aU},{key:"Ctrl-d",run:A$},{key:"Ctrl-h",run:Px},{key:"Ctrl-k",run:mU},{key:"Ctrl-Alt-h",run:E$},{key:"Ctrl-o",run:bU},{key:"Ctrl-t",run:yU},{key:"Ctrl-v",run:Rx}],QU=[{key:"ArrowLeft",run:f$,shift:v$,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:j9,shift:K9,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:V9,shift:oU,preventDefault:!0},{key:"ArrowRight",run:d$,shift:x$,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:I9,shift:J9,preventDefault:!0},{mac:"Cmd-ArrowRight",run:q9,shift:iU,preventDefault:!0},{key:"ArrowUp",run:m$,shift:k$,preventDefault:!0},{mac:"Cmd-ArrowUp",run:FM,shift:JM},{mac:"Ctrl-ArrowUp",run:GM,shift:HM},{key:"ArrowDown",run:g$,shift:C$,preventDefault:!0},{mac:"Cmd-ArrowDown",run:KM,shift:e$},{mac:"Ctrl-ArrowDown",run:Rx,shift:WM},{key:"PageUp",run:GM,shift:HM},{key:"PageDown",run:Rx,shift:WM},{key:"Home",run:Y9,shift:rU,preventDefault:!0},{key:"Mod-Home",run:FM,shift:JM},{key:"End",run:U9,shift:nU,preventDefault:!0},{key:"Mod-End",run:KM,shift:e$},{key:"Enter",run:t$,shift:t$},{key:"Mod-a",run:lU},{key:"Backspace",run:Px,shift:Px,preventDefault:!0},{key:"Delete",run:A$,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:E$,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:pU,preventDefault:!0},{mac:"Mod-Backspace",run:gU,preventDefault:!0},{mac:"Mod-Delete",run:OU,preventDefault:!0}].concat(AU.map((e)=>({mac:e.key,run:e.run,shift:e.shift}))),L$=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:B9,shift:eU},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Z9,shift:tU},{key:"Alt-ArrowUp",run:vU},{key:"Shift-Alt-ArrowUp",run:wU},{key:"Alt-ArrowDown",run:xU},{key:"Shift-Alt-ArrowDown",run:SU},{key:"Mod-Alt-ArrowUp",run:fU},{key:"Mod-Alt-ArrowDown",run:dU},{key:"Escape",run:hU},{key:"Mod-Enter",run:RU},{key:"Alt-l",mac:"Ctrl-l",run:cU},{key:"Mod-i",run:uU,preventDefault:!0},{key:"Mod-[",run:N$},{key:"Mod-]",run:_$},{key:"Mod-Alt-\\",run:PU},{key:"Shift-Mod-k",run:kU},{key:"Shift-Mod-\\",run:F9},{key:"Mod-/",run:w9},{key:"Alt-A",mac:"Ctrl-A",run:k9},{key:"Ctrl-m",mac:"Shift-Alt-m",run:TU}].concat(QU),z$={key:"Tab",run:_$,shift:N$};class Kd{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Ie(this.state).resolveInner(this.pos,-1);while(t&&e.indexOf(t.name)<0)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),o=r.search(V$(e,!1));return o<0?null:{from:n+o,to:this.pos,text:r.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){if(e=="abort"&&this.abortListeners){if(this.abortListeners.push(t),n&&n.onDocChange)this.abortOnDocChange=!0}}}function j$(e){let t=Object.keys(e).join(""),n=/\w/.test(t);if(n)t=t.replace(/\w/g,"");return`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function EU(e){let t=Object.create(null),n=Object.create(null);for(let{label:o}of e){t[o[0]]=!0;for(let i=1;i<o.length;i++)n[o[i]]=!0}let r=j$(t)+j$(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function $x(e){let t=e.map((o)=>typeof o=="string"?{label:o}:o),[n,r]=t.every((o)=>/^\w+$/.test(o.label))?[/\w*$/,/\w+$/]:EU(t);return(o)=>{let i=o.matchBefore(r);return i||o.explicit?{from:i?i.from:o.pos,options:t,validFor:n}:null}}function Y$(e,t){return(n)=>{for(let r=Ie(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(e.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return t(n)}}class Mx{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function ol(e){return e.selection.main.from}function V$(e,t){var n;let{source:r}=e,o=t&&r[0]!="^",i=r[r.length-1]!="$";if(!o&&!i)return e;return new RegExp(`${o?"^":""}(?:${r})${i?"$":""}`,(n=e.flags)!==null&&n!==void 0?n:e.ignoreCase?"i":"")}var Dx=fr.define();function MU(e,t,n,r){let{main:o}=e.selection,i=n-o.from,s=r-o.from;return{...e.changeByRange((a)=>{if(a!=o&&n!=r&&e.sliceDoc(a.from+i,a.from+s)!=e.sliceDoc(n,r))return{range:a};let l=e.toText(t);return{changes:{from:a.from+i,to:r==o.from?a.to:a.from+s,insert:l},range:j.cursor(a.from+i+l.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}var I$=new WeakMap;function $U(e){if(!Array.isArray(e))return e;let t=I$.get(e);if(!t)I$.set(e,t=$x(e));return t}var Ug=ze.define(),Wd=ze.define();class q${constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=Pi(e,t),r=Ls(n);this.chars.push(n);let o=e.slice(t,t+r),i=o.toUpperCase();this.folded.push(Pi(i==o?o.toLowerCase():i,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:o,byWord:i}=this;if(t.length==1){let O=Pi(e,0),y=Ls(O),v=y==e.length?0:-100;if(O==t[0]);else if(O==n[0])v+=-200;else return null;return this.ret(v,[0,y])}let s=e.indexOf(this.pattern);if(s==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let a=t.length,l=0;if(s<0){for(let O=0,y=Math.min(e.length,200);O<y&&l<a;){let v=Pi(e,O);if(v==t[l]||v==n[l])r[l++]=O;O+=Ls(v)}if(l<a)return null}let c=0,u=0,f=!1,d=0,h=-1,m=-1,g=/[a-z]/.test(e),b=!0;for(let O=0,y=Math.min(e.length,200),v=0;O<y&&u<a;){let x=Pi(e,O);if(s<0){if(c<a&&x==t[c])o[c++]=O;if(d<a)if(x==t[d]||x==n[d]){if(d==0)h=O;m=O+1,d++}else d=0}let w,S=x<255?x>=48&&x<=57||x>=97&&x<=122?2:x>=65&&x<=90?1:0:(w=iQ(x))!=w.toLowerCase()?1:w!=w.toUpperCase()?2:0;if(!O||S==1&&g||v==0&&S!=0){if(t[u]==x||n[u]==x&&(f=!0))i[u++]=O;else if(i.length)b=!1}v=S,O+=Ls(x)}if(u==a&&i[0]==0&&b)return this.result(-100+(f?-200:0),i,e);if(d==a&&h==0)return this.ret(-200-e.length+(m==e.length?0:-100),[0,m]);if(s>-1)return this.ret(-700-e.length,[s,s+this.pattern.length]);if(d==a)return this.ret(-900-e.length,[h,m]);if(u==a)return this.result(-100+(f?-200:0)+-700+(b?0:-1100),i,e);return t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],o=0;for(let i of t){let s=i+(this.astral?Ls(Pi(n,i)):1);if(o&&r[o-1]==i)r[o-1]=s;else r[o++]=i,r[o++]=s}return this.ret(e-n.length,r)}}class G${constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;if(n==null)return null;return this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this}}var Ht=he.define({combine(e){return ru(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:DU,filterStrict:!1,compareCompletions:(t,n)=>(t.sortText||t.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,n)=>t&&n,closeOnBlur:(t,n)=>t&&n,icons:(t,n)=>t&&n,tooltipClass:(t,n)=>(r)=>X$(t(r),n(r)),optionClass:(t,n)=>(r)=>X$(t(r),n(r)),addToOptions:(t,n)=>t.concat(n),filterStrict:(t,n)=>t||n})}});function X$(e,t){return e?t?e+" "+t:e:t}function DU(e,t,n,r,o,i){let s=e.textDirection==pt.RTL,a=s,l=!1,c="top",u,f,d=t.left-o.left,h=o.right-t.right,m=r.right-r.left,g=r.bottom-r.top;if(a&&d<Math.min(m,h))a=!1;else if(!a&&h<Math.min(m,d))a=!0;if(m<=(a?d:h))u=Math.max(o.top,Math.min(n.top,o.bottom-g))-t.top,f=Math.min(400,a?d:h);else{l=!0,f=Math.min(400,(s?t.right:o.right-t.left)-30);let y=o.bottom-t.bottom;if(y>=g||y>t.top)u=n.bottom-t.top;else c="bottom",u=t.bottom-n.top}let b=(t.bottom-t.top)/i.offsetHeight,O=(t.right-t.left)/i.offsetWidth;return{style:`${c}: ${u/b}px; max-width: ${f/O}px`,class:"cm-completionInfo-"+(l?s?"left-narrow":"right-narrow":a?"left":"right")}}var _x=ze.define();function _U(e){let t=e.addToOptions.slice();if(e.icons)t.push({render(n){let r=document.createElement("div");if(r.classList.add("cm-completionIcon"),n.type)r.classList.add(...n.type.split(/\s+/g).map((o)=>"cm-completionIcon-"+o));return r.setAttribute("aria-hidden","true"),r},position:20});return t.push({render(n,r,o,i){let s=document.createElement("span");s.className="cm-completionLabel";let a=n.displayLabel||n.label,l=0;for(let c=0;c<i.length;){let u=i[c++],f=i[c++];if(u>l)s.appendChild(document.createTextNode(a.slice(l,u)));let d=s.appendChild(document.createElement("span"));d.appendChild(document.createTextNode(a.slice(u,f))),d.className="cm-completionMatchedText",l=f}if(l<a.length)s.appendChild(document.createTextNode(a.slice(l)));return s},position:50},{render(n){if(!n.detail)return null;let r=document.createElement("span");return r.className="cm-completionDetail",r.textContent=n.detail,r},position:80}),t.sort((n,r)=>n.position-r.position).map((n)=>n.render)}function Ex(e,t,n){if(e<=n)return{from:0,to:e};if(t<0)t=0;if(t<=e>>1){let o=Math.floor(t/n);return{from:o*n,to:(o+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}class H${constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:(a)=>this.placeInfo(a),key:this},this.space=null,this.currentClass="";let r=e.state.field(t),{options:o,selected:i}=r.open,s=e.state.facet(Ht);this.optionContent=_U(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=Ex(o.length,i,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",(a)=>{let{options:l}=e.state.field(t).open;for(let c=a.target,u;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(u=/-(\d+)$/.exec(c.id))&&+u[1]<l.length){this.applyCompletion(e,l[+u[1]]),a.preventDefault();return}if(a.target==this.list){let c=this.list.classList.contains("cm-completionListIncompleteTop")&&a.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&a.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;if(c!=null)e.dispatch({effects:_x.of(c)}),a.preventDefault()}}),this.dom.addEventListener("focusout",(a)=>{let l=e.state.field(this.stateField,!1);if(l&&l.tooltip&&e.state.facet(Ht).closeOnBlur&&a.relatedTarget!=e.contentDOM)e.dispatch({effects:Wd.of(null)})}),this.showOptions(o,r.id)}mount(){this.updateSel()}showOptions(e,t){if(this.list)this.list.remove();this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener("scroll",()=>{if(this.info)this.view.requestMeasure(this.placeInfoReq)})}update(e){var t;let n=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),n!=r){let{options:o,selected:i,disabled:s}=n.open;if(!r.open||r.open.options!=o)this.range=Ex(o.length,i,e.state.facet(Ht).maxRenderedOptions),this.showOptions(o,n.id);if(this.updateSel(),s!=((t=r.open)===null||t===void 0?void 0:t.disabled))this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let n of this.currentClass.split(" "))if(n)this.dom.classList.remove(n);for(let n of t.split(" "))if(n)this.dom.classList.add(n);this.currentClass=t}}positioned(e){if(this.space=e,this.info)this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)this.range=Ex(t.options.length,t.selected,this.view.state.facet(Ht).maxRenderedOptions),this.showOptions(t.options,e.id);let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:o}=r;if(!o)return;let i=typeof o==="string"?document.createTextNode(o):o(r);if(!i)return;if("then"in i)i.then((s)=>{if(s&&this.view.state.field(this.stateField,!1)==e)this.addInfoPane(s,r)}).catch((s)=>Qn(this.view.state,s,"completion info"));else this.addInfoPane(i,r),n.setAttribute("aria-describedby",this.info.id)}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement("div");if(n.className="cm-tooltip cm-completionInfo",n.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:o}=e;n.appendChild(r),this.infoDestroy=o||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)if(n.nodeName!="LI"||!n.id)r--;else if(r==e){if(!n.hasAttribute("aria-selected"))n.setAttribute("aria-selected","true"),t=n}else if(n.hasAttribute("aria-selected"))n.removeAttribute("aria-selected"),n.removeAttribute("aria-describedby");if(t)LU(this.list,t);return t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),o=this.space;if(!o){let i=this.dom.ownerDocument.documentElement;o={left:0,top:0,right:i.clientWidth,bottom:i.clientHeight}}if(r.top>Math.min(o.bottom,t.bottom)-10||r.bottom<Math.max(o.top,t.top)+10)return null;return this.view.state.facet(Ht).positionInfo(this.view,t,r,n,o,this.dom)}placeInfo(e){if(this.info)if(e){if(e.style)this.info.style.cssText=e.style;this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")}else this.info.style.cssText="top: -1e6px"}createListBox(e,t,n){let r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",(i)=>{if(i.target==r)i.preventDefault()});let o=null;for(let i=n.from;i<n.to;i++){let{completion:s,match:a}=e[i],{section:l}=s;if(l){let f=typeof l=="string"?l:l.name;if(f!=o&&(i>n.from||n.from==0))if(o=f,typeof l!="string"&&l.header)r.appendChild(l.header(l));else{let d=r.appendChild(document.createElement("completion-section"));d.textContent=f}}let c=r.appendChild(document.createElement("li"));c.id=t+"-"+i,c.setAttribute("role","option");let u=this.optionClass(s);if(u)c.className=u;for(let f of this.optionContent){let d=f(s,this.view.state,this.view,a);if(d)c.appendChild(d)}}if(n.from)r.classList.add("cm-completionListIncompleteTop");if(n.to<e.length)r.classList.add("cm-completionListIncompleteBottom");return r}destroyInfo(){if(this.info){if(this.infoDestroy)this.infoDestroy();this.info.remove(),this.info=null}}destroy(){this.destroyInfo()}}function NU(e,t){return(n)=>new H$(n,e,t)}function LU(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=n.height/e.offsetHeight;if(r.top<n.top)e.scrollTop-=(n.top-r.top)/o;else if(r.bottom>n.bottom)e.scrollTop+=(r.bottom-n.bottom)/o}function B$(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+(e.type?1:0)}function zU(e,t){let n=[],r=null,o=null,i=(u)=>{n.push(u);let{section:f}=u.completion;if(f){if(!r)r=[];let d=typeof f=="string"?f:f.name;if(!r.some((h)=>h.name==d))r.push(typeof f=="string"?{name:d}:f)}},s=t.facet(Ht);for(let u of e)if(u.hasResult()){let f=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)i(new Mx(d,u.source,f?f(d):[],1e9-n.length));else{let d=t.sliceDoc(u.from,u.to),h,m=s.filterStrict?new G$(d):new q$(d);for(let g of u.result.options)if(h=m.match(g.label)){let b=!g.displayLabel?h.matched:f?f(g,h.matched):[],O=h.score+(g.boost||0);if(i(new Mx(g,u.source,b,O)),typeof g.section=="object"&&g.section.rank==="dynamic"){let{name:y}=g.section;if(!o)o=Object.create(null);o[y]=Math.max(O,o[y]||-1e9)}}}}if(r){let u=Object.create(null),f=0,d=(h,m)=>(h.rank==="dynamic"&&m.rank==="dynamic"?o[m.name]-o[h.name]:0)||(typeof h.rank=="number"?h.rank:1e9)-(typeof m.rank=="number"?m.rank:1e9)||(h.name<m.name?-1:1);for(let h of r.sort(d))f-=1e5,u[h.name]=f;for(let h of n){let{section:m}=h.completion;if(m)h.score+=u[typeof m=="string"?m:m.name]}}let a=[],l=null,c=s.compareCompletions;for(let u of n.sort((f,d)=>d.score-f.score||c(f.completion,d.completion))){let f=u.completion;if(!l||l.label!=f.label||l.detail!=f.detail||l.type!=null&&f.type!=null&&l.type!=f.type||l.apply!=f.apply||l.boost!=f.boost)a.push(u);else if(B$(u.completion)>B$(l))a[a.length-1]=u;l=u.completion}return a}class vu{constructor(e,t,n,r,o,i){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=o,this.disabled=i}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new vu(this.options,Z$(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,o,i){if(r&&!i&&e.some((l)=>l.isPending))return r.setDisabled();let s=zU(e,t);if(!s.length)return r&&e.some((l)=>l.isPending)?r.setDisabled():null;let a=t.facet(Ht).selectOnOpen?0:-1;if(r&&r.selected!=a&&r.selected!=-1){let l=r.options[r.selected].completion;for(let c=0;c<s.length;c++)if(s[c].completion==l){a=c;break}}return new vu(s,Z$(n,a),{pos:e.reduce((l,c)=>c.hasResult()?Math.min(l,c.from):l,1e8),create:UU,above:o.aboveCursor},r?r.timestamp:Date.now(),a,!1)}map(e){return new vu(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new vu(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class Yg{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new Yg(BU,"cm-ac-"+Math.floor(Math.random()*2000000).toString(36),null)}update(e){let{state:t}=e,n=t.facet(Ht),o=(n.override||t.languageDataAt("autocomplete",ol(t)).map($U)).map((a)=>(this.active.find((c)=>c.source==a)||new Ir(a,this.active.some((c)=>c.state!=0)?1:0)).update(e,n));if(o.length==this.active.length&&o.every((a,l)=>a==this.active[l]))o=this.active;let i=this.open,s=e.effects.some((a)=>a.is(Nx));if(i&&e.docChanged)i=i.map(e.changes);if(e.selection||o.some((a)=>a.hasResult()&&e.changes.touchesRange(a.from,a.to))||!jU(o,this.active)||s)i=vu.build(o,t,this.id,i,n,s);else if(i&&i.disabled&&!o.some((a)=>a.isPending))i=null;if(!i&&o.every((a)=>!a.isPending)&&o.some((a)=>a.hasResult()))o=o.map((a)=>a.hasResult()?new Ir(a.source,0):a);for(let a of e.effects)if(a.is(_x))i=i&&i.setSelected(a.value,this.id);return o==this.active&&i==this.open?this:new Yg(o,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?IU:XU}}function jU(e,t){if(e==t)return!0;for(let n=0,r=0;;){while(n<e.length&&!e[n].hasResult())n++;while(r<t.length&&!t[r].hasResult())r++;let o=n==e.length,i=r==t.length;if(o||i)return o==i;if(e[n++].result!=t[r++].result)return!1}}var IU={"aria-autocomplete":"list"},XU={};function Z$(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};if(t>-1)n["aria-activedescendant"]=e+"-"+t;return n}var BU=[];function W$(e,t){if(e.isUserEvent("input.complete")){let r=e.annotation(Dx);if(r&&t.activateOnCompletion(r))return 12}let n=e.isUserEvent("input.type");return n&&t.activateOnTyping?5:n?1:e.isUserEvent("delete.backward")?2:e.selection?8:e.docChanged?16:0}class Ir{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(e,t){let n=W$(e,t),r=this;if(n&8||n&16&&this.touches(e))r=new Ir(r.source,0);if(n&4&&r.state==0)r=new Ir(this.source,1);r=r.updateFor(e,n);for(let o of e.effects)if(o.is(Ug))r=new Ir(r.source,1,o.value);else if(o.is(Wd))r=new Ir(r.source,0);else if(o.is(Nx)){for(let i of o.value)if(i.source==r.source)r=i}return r}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(ol(e.state))}}class xu extends Ir{constructor(e,t,n,r,o,i){super(e,3,t);this.limit=n,this.result=r,this.from=o,this.to=i}hasResult(){return!0}updateFor(e,t){var n;if(!(t&3))return this.map(e.changes);let r=this.result;if(r.map&&!e.changes.empty)r=r.map(r,e.changes);let o=e.changes.mapPos(this.from),i=e.changes.mapPos(this.to,1),s=ol(e.state);if(s>i||!r||t&2&&(ol(e.startState)==this.from||s<this.limit))return new Ir(this.source,t&4?1:0);let a=e.changes.mapPos(this.limit);if(ZU(r.validFor,e.state,o,i))return new xu(this.source,this.explicit,a,r,o,i);if(r.update&&(r=r.update(r,o,i,new Kd(e.state,s,!1))))return new xu(this.source,this.explicit,a,r,r.from,(n=r.to)!==null&&n!==void 0?n:ol(e.state));return new Ir(this.source,1,this.explicit)}map(e){if(e.empty)return this;let t=this.result.map?this.result.map(this.result,e):this.result;if(!t)return new Ir(this.source,0);return new xu(this.source,this.explicit,e.mapPos(this.limit),t,e.mapPos(this.from),e.mapPos(this.to,1))}touches(e){return e.changes.touchesRange(this.from,this.to)}}function ZU(e,t,n,r){if(!e)return!1;let o=t.sliceDoc(n,r);return typeof e=="function"?e(o,n,r,t):V$(e,!0).test(o)}var Nx=ze.define({map(e,t){return e.map((n)=>n.map(t))}}),Gn=un.define({create(){return Yg.start()},update(e,t){return e.update(t)},provide:(e)=>[ex.from(e,(t)=>t.tooltip),re.contentAttributes.from(e,(t)=>t.attrs)]});function Lx(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(Gn).active.find((o)=>o.source==t.source);if(!(r instanceof xu))return!1;if(typeof n=="string")e.dispatch({...MU(e.state,n,r.from,r.to),annotations:Dx.of(t.completion)});else n(e,t.completion,r.from,r.to);return!0}var UU=NU(Gn,Lx);function Zg(e,t="option"){return(n)=>{let r=n.state.field(Gn,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(Ht).interactionDelay)return!1;let o=1,i;if(t=="page"&&(i=tx(n,r.open.tooltip)))o=Math.max(2,Math.floor(i.dom.offsetHeight/i.dom.querySelector("li").offsetHeight)-1);let{length:s}=r.open.options,a=r.open.selected>-1?r.open.selected+o*(e?1:-1):e?0:s-1;if(a<0)a=t=="page"?0:s-1;else if(a>=s)a=t=="page"?s-1:0;return n.dispatch({effects:_x.of(a)}),!0}}var YU=(e)=>{let t=e.state.field(Gn,!1);if(e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(Ht).interactionDelay)return!1;return Lx(e,t.open.options[t.open.selected])},Hd=(e)=>{if(!e.state.field(Gn,!1))return!1;return e.dispatch({effects:Ug.of(!0)}),!0},VU=(e)=>{let t=e.state.field(Gn,!1);if(!t||!t.active.some((n)=>n.state!=0))return!1;return e.dispatch({effects:Wd.of(null)}),!0};class F${constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}var qU=50,GU=1000,HU=pr.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(Gn).active)if(t.isPending)this.startQuery(t)}update(e){let t=e.state.field(Gn),n=e.state.facet(Ht);if(!e.selectionSet&&!e.docChanged&&e.startState.field(Gn)==t)return;let r=e.transactions.some((i)=>{let s=W$(i,n);return s&8||(i.selection||i.docChanged)&&!(s&3)});for(let i=0;i<this.running.length;i++){let s=this.running[i];if(r||s.context.abortOnDocChange&&e.docChanged||s.updates.length+e.transactions.length>qU&&Date.now()-s.time>GU){for(let a of s.context.abortListeners)try{a()}catch(l){Qn(this.view.state,l)}s.context.abortListeners=null,this.running.splice(i--,1)}else s.updates.push(...e.transactions)}if(this.debounceUpdate>-1)clearTimeout(this.debounceUpdate);if(e.transactions.some((i)=>i.effects.some((s)=>s.is(Ug))))this.pendingStart=!0;let o=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some((i)=>i.isPending&&!this.running.some((s)=>s.active.source==i.source))?setTimeout(()=>this.startUpdate(),o):-1,this.composing!=0){for(let i of e.transactions)if(i.isUserEvent("input.type"))this.composing=2;else if(this.composing==2&&i.selection)this.composing=3}}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(Gn);for(let n of t.active)if(n.isPending&&!this.running.some((r)=>r.active.source==n.source))this.startQuery(n);if(this.running.length&&t.open&&t.open.disabled)this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ht).updateSyncTime)}startQuery(e){let{state:t}=this.view,n=ol(t),r=new Kd(t,n,e.explicit,this.view),o=new F$(e,r);this.running.push(o),Promise.resolve(e.source(r)).then((i)=>{if(!o.context.aborted)o.done=i||null,this.scheduleAccept()},(i)=>{this.view.dispatch({effects:Wd.of(null)}),Qn(this.view.state,i)})}scheduleAccept(){if(this.running.every((e)=>e.done!==void 0))this.accept();else if(this.debounceAccept<0)this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Ht).updateSyncTime)}accept(){var e;if(this.debounceAccept>-1)clearTimeout(this.debounceAccept);this.debounceAccept=-1;let t=[],n=this.view.state.facet(Ht),r=this.view.state.field(Gn);for(let o=0;o<this.running.length;o++){let i=this.running[o];if(i.done===void 0)continue;if(this.running.splice(o--,1),i.done){let a=ol(i.updates.length?i.updates[0].startState:this.view.state),l=Math.min(a,i.done.from+(i.active.explicit?0:1)),c=new xu(i.active.source,i.active.explicit,l,i.done,i.done.from,(e=i.done.to)!==null&&e!==void 0?e:a);for(let u of i.updates)c=c.update(u,n);if(c.hasResult()){t.push(c);continue}}let s=r.active.find((a)=>a.source==i.active.source);if(s&&s.isPending)if(i.done==null){let a=new Ir(i.active.source,0);for(let l of i.updates)a=a.update(l,n);if(!a.isPending)t.push(a)}else this.startQuery(s)}if(t.length||r.open&&r.open.disabled)this.view.dispatch({effects:Nx.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(Gn,!1);if(t&&t.tooltip&&this.view.state.facet(Ht).closeOnBlur){let n=t.open&&tx(this.view,t.open.tooltip);if(!n||!n.dom.contains(e.relatedTarget))setTimeout(()=>this.view.dispatch({effects:Wd.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){if(this.composing==3)setTimeout(()=>this.view.dispatch({effects:Ug.of(!1)}),20);this.composing=0}}}),WU=typeof navigator=="object"&&/Win/.test(navigator.platform),FU=_r.highest(re.domEventHandlers({keydown(e,t){let n=t.state.field(Gn,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(WU&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],o=n.active.find((s)=>s.source==r.source),i=r.completion.commitCharacters||o.result.commitCharacters;if(i&&i.indexOf(e.key)>-1)Lx(t,r);return!1}})),K$=re.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:0.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:0.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'\uD835\uDC65'"}},".cm-completionIcon-constant":{"&:after":{content:"'\uD835\uDC36'"}},".cm-completionIcon-type":{"&:after":{content:"'\uD835\uDC61'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\uD83D\uDD11︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class J${constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}}class zx{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,cn.TrackDel),n=e.mapPos(this.to,1,cn.TrackDel);return t==null||n==null?null:new zx(this.field,t,n)}}class jx{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],o=e.doc.lineAt(t),i=/^\s*/.exec(o.text)[0];for(let a of this.lines){if(n.length){let l=i,c=/^\t*/.exec(a)[0].length;for(let u=0;u<c;u++)l+=e.facet(qs);r.push(t+l.length-c),a=l+a.slice(c)}n.push(a),t+=a.length+1}let s=this.fieldPositions.map((a)=>new zx(a.field,r[a.line]+a.from,r[a.line]+a.to));return{text:n,ranges:s}}static parse(e){let t=[],n=[],r=[],o;for(let i of e.split(/\r\n?|\n/)){while(o=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(i)){let s=o[1]?+o[1]:null,a=o[2]||o[3]||"",l=-1;if(s===0)s=1e9;let c=a.replace(/\\[{}]/g,(u)=>u[1]);for(let u=0;u<t.length;u++)if(s!=null?t[u].seq==s:c?t[u].name==c:!1)l=u;if(l<0){let u=0;while(u<t.length&&(s==null||t[u].seq!=null&&t[u].seq<s))u++;t.splice(u,0,{seq:s,name:c}),l=u;for(let f of r)if(f.field>=l)f.field++}for(let u of r)if(u.line==n.length&&u.from>o.index){let f=o[2]?3+(o[1]||"").length:2;u.from-=f,u.to-=f}r.push(new J$(l,n.length,o.index,o.index+c.length)),i=i.slice(0,o.index)+a+i.slice(o.index+o[0].length)}i=i.replace(/\\([{}])/g,(s,a,l)=>{for(let c of r)if(c.line==n.length&&c.from>l)c.from--,c.to--;return a}),n.push(i)}return new jx(n,r)}}var KU=we.widget({widget:new class extends $n{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),JU=we.mark({class:"cm-snippetField"});class wu{constructor(e,t){this.ranges=e,this.active=t,this.deco=we.set(e.map((n)=>(n.from==n.to?KU:JU).range(n.from,n.to)),!0)}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new wu(t,this.active)}selectionInsideField(e){return e.ranges.every((t)=>this.ranges.some((n)=>n.field==this.active&&n.from<=t.from&&n.to>=t.to))}}var Jd=ze.define({map(e,t){return e&&e.map(t)}}),eY=ze.define(),Fd=un.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(Jd))return n.value;if(n.is(eY)&&e)return new wu(e.ranges,n.value)}if(e&&t.docChanged)e=e.map(t.changes);if(e&&t.selection&&!e.selectionInsideField(t.selection))e=null;return e},provide:(e)=>re.decorations.from(e,(t)=>t?t.deco:we.none)});function Ix(e,t){return j.create(e.filter((n)=>n.field==t).map((n)=>j.range(n.from,n.to)))}function tY(e){let t=jx.parse(e);return(n,r,o,i)=>{let{text:s,ranges:a}=t.instantiate(n.state,o),{main:l}=n.state.selection,c={changes:{from:o,to:i==l.from?l.to:i,insert:De.of(s)},scrollIntoView:!0,annotations:r?[Dx.of(r),yt.userEvent.of("input.complete")]:void 0};if(a.length)c.selection=Ix(a,0);if(a.some((u)=>u.field>0)){let u=new wu(a,0),f=c.effects=[Jd.of(u)];if(n.state.field(Fd,!1)===void 0)f.push(ze.appendConfig.of([Fd,sY,aY,K$]))}n.dispatch(n.state.update(c))}}function e5(e){return({state:t,dispatch:n})=>{let r=t.field(Fd,!1);if(!r||e<0&&r.active==0)return!1;let o=r.active+e,i=e>0&&!r.ranges.some((s)=>s.field==o+e);return n(t.update({selection:Ix(r.ranges,o),effects:Jd.of(i?null:new wu(r.ranges,o)),scrollIntoView:!0})),!0}}var nY=({state:e,dispatch:t})=>{if(!e.field(Fd,!1))return!1;return t(e.update({effects:Jd.of(null)})),!0},rY=e5(1),oY=e5(-1);var iY=[{key:"Tab",run:rY,shift:oY},{key:"Escape",run:nY}],U$=he.define({combine(e){return e.length?e[0]:iY}}),sY=_r.highest(Xs.compute([U$],(e)=>e.facet(U$)));function Dn(e,t){return{...t,apply:tY(e)}}var aY=re.domEventHandlers({mousedown(e,t){let n=t.state.field(Fd,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let o=n.ranges.find((i)=>i.from<=r&&i.to>=r);if(!o||o.field==n.active)return!1;return t.dispatch({selection:Ix(n.ranges,o.field),effects:Jd.of(n.ranges.some((i)=>i.field>o.field)?new wu(n.ranges,o.field):null),scrollIntoView:!0}),!0}});var t5=new class extends to{};t5.startSide=1;t5.endSide=-1;var Qre=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent);function n5(e={}){return[FU,Gn,Ht.of(e),HU,cY,K$]}var lY=[{key:"Ctrl-Space",run:Hd},{mac:"Alt-`",run:Hd},{mac:"Alt-i",run:Hd},{key:"Escape",run:VU},{key:"ArrowDown",run:Zg(!0)},{key:"ArrowUp",run:Zg(!1)},{key:"PageDown",run:Zg(!0,"page")},{key:"PageUp",run:Zg(!1,"page")},{key:"Enter",run:YU}],cY=_r.highest(Xs.computeN([Ht],(e)=>e.facet(Ht).defaultKeymap?[lY]:[]));class Gg{static create(e,t,n,r,o){let i=r+(r<<8)+e+(t<<4)|0;return new Gg(e,t,n,i,o,[],[])}constructor(e,t,n,r,o,i,s){this.type=e,this.value=t,this.from=n,this.hash=r,this.end=o,this.children=i,this.positions=s,this.hashProp=[[be.contextHash,r]]}addChild(e,t){if(e.prop(be.contextHash)!=this.hash)e=new Be(e.type,e.children,e.positions,e.length,this.hashProp);this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let n=this.children.length-1;if(n>=0)t=Math.max(t,this.positions[n]+this.children[n].length+this.from);return new Be(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(r,o,i)=>new Be(Pt.none,r,o,i,this.hashProp)})}}var Y;(function(e){e[e.Document=1]="Document",e[e.CodeBlock=2]="CodeBlock",e[e.FencedCode=3]="FencedCode",e[e.Blockquote=4]="Blockquote",e[e.HorizontalRule=5]="HorizontalRule",e[e.BulletList=6]="BulletList",e[e.OrderedList=7]="OrderedList",e[e.ListItem=8]="ListItem",e[e.ATXHeading1=9]="ATXHeading1",e[e.ATXHeading2=10]="ATXHeading2",e[e.ATXHeading3=11]="ATXHeading3",e[e.ATXHeading4=12]="ATXHeading4",e[e.ATXHeading5=13]="ATXHeading5",e[e.ATXHeading6=14]="ATXHeading6",e[e.SetextHeading1=15]="SetextHeading1",e[e.SetextHeading2=16]="SetextHeading2",e[e.HTMLBlock=17]="HTMLBlock",e[e.LinkReference=18]="LinkReference",e[e.Paragraph=19]="Paragraph",e[e.CommentBlock=20]="CommentBlock",e[e.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",e[e.Escape=22]="Escape",e[e.Entity=23]="Entity",e[e.HardBreak=24]="HardBreak",e[e.Emphasis=25]="Emphasis",e[e.StrongEmphasis=26]="StrongEmphasis",e[e.Link=27]="Link",e[e.Image=28]="Image",e[e.InlineCode=29]="InlineCode",e[e.HTMLTag=30]="HTMLTag",e[e.Comment=31]="Comment",e[e.ProcessingInstruction=32]="ProcessingInstruction",e[e.Autolink=33]="Autolink",e[e.HeaderMark=34]="HeaderMark",e[e.QuoteMark=35]="QuoteMark",e[e.ListMark=36]="ListMark",e[e.LinkMark=37]="LinkMark",e[e.EmphasisMark=38]="EmphasisMark",e[e.CodeMark=39]="CodeMark",e[e.CodeText=40]="CodeText",e[e.CodeInfo=41]="CodeInfo",e[e.LinkTitle=42]="LinkTitle",e[e.LinkLabel=43]="LinkLabel",e[e.URL=44]="URL"})(Y||(Y={}));class p5{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class m5{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){if(this.basePos>this.pos)this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return th(this.text,e)}reset(e){this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;while(this.markers.length)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,n=0){for(let r=t;r<e;r++)n+=this.text.charCodeAt(r)==9?4-n%4:1;return n}findColumn(e){let t=0;for(let n=0;t<this.text.length&&n<e;t++)n+=this.text.charCodeAt(t)==9?4-n%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function r5(e,t,n){if(n.pos==n.text.length||e!=t.block&&n.indent>=t.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let r=(e.type==Y.OrderedList?Wx:Hx)(n,t,!1);return r>0&&(e.type!=Y.BulletList||Gx(n,t,!1)<0)&&n.text.charCodeAt(n.pos+r-1)==e.value}var g5={[Y.Blockquote](e,t,n){if(n.next!=62)return!1;return n.markers.push(Ze(Y.QuoteMark,t.lineStart+n.pos,t.lineStart+n.pos+1)),n.moveBase(n.pos+(Xr(n.text.charCodeAt(n.pos+1))?2:1)),e.end=t.lineStart+n.text.length,!0},[Y.ListItem](e,t,n){if(n.indent<n.baseIndent+e.value&&n.next>-1)return!1;return n.moveBaseColumn(n.baseIndent+e.value),!0},[Y.OrderedList]:r5,[Y.BulletList]:r5,[Y.Document](){return!0}};function Xr(e){return e==32||e==9||e==10||e==13}function th(e,t=0){while(t<e.length&&Xr(e.charCodeAt(t)))t++;return t}function o5(e,t,n){while(t>n&&Xr(e.charCodeAt(t-1)))t--;return t}function O5(e){if(e.next!=96&&e.next!=126)return-1;let t=e.pos+1;while(t<e.text.length&&e.text.charCodeAt(t)==e.next)t++;if(t<e.pos+3)return-1;if(e.next==96){for(let n=t;n<e.text.length;n++)if(e.text.charCodeAt(n)==96)return-1}return t}function b5(e){return e.next!=62?-1:e.text.charCodeAt(e.pos+1)==32?2:1}function Gx(e,t,n){if(e.next!=42&&e.next!=45&&e.next!=95)return-1;let r=1;for(let o=e.pos+1;o<e.text.length;o++){let i=e.text.charCodeAt(o);if(i==e.next)r++;else if(!Xr(i))return-1}if(n&&e.next==45&&x5(e)>-1&&e.depth==t.stack.length&&t.parser.leafBlockParsers.indexOf(P5.SetextHeading)>-1)return-1;return r<3?-1:1}function y5(e,t){for(let n=e.stack.length-1;n>=0;n--)if(e.stack[n].type==t)return!0;return!1}function Hx(e,t,n){return(e.next==45||e.next==43||e.next==42)&&(e.pos==e.text.length-1||Xr(e.text.charCodeAt(e.pos+1)))&&(!n||y5(t,Y.BulletList)||e.skipSpace(e.pos+2)<e.text.length)?1:-1}function Wx(e,t,n){let{pos:r,next:o}=e;for(;;){if(o>=48&&o<=57)r++;else break;if(r==e.text.length)return-1;o=e.text.charCodeAt(r)}if(r==e.pos||r>e.pos+9||o!=46&&o!=41||r<e.text.length-1&&!Xr(e.text.charCodeAt(r+1))||n&&!y5(t,Y.OrderedList)&&(e.skipSpace(r+1)==e.text.length||r>e.pos+1||e.next!=49))return-1;return r+1-e.pos}function v5(e){if(e.next!=35)return-1;let t=e.pos+1;while(t<e.text.length&&e.text.charCodeAt(t)==35)t++;if(t<e.text.length&&e.text.charCodeAt(t)!=32)return-1;let n=t-e.pos;return n>6?-1:n}function x5(e){if(e.next!=45&&e.next!=61||e.indent>=e.baseIndent+4)return-1;let t=e.pos+1;while(t<e.text.length&&e.text.charCodeAt(t)==e.next)t++;let n=t;while(t<e.text.length&&Xr(e.text.charCodeAt(t)))t++;return t==e.text.length?n:-1}var Zx=/^[ \t]*$/,w5=/-->/,S5=/\?>/,Ux=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,w5],[/^\s*<\?/,S5],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,Zx],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,Zx]];function k5(e,t,n){if(e.next!=60)return-1;let r=e.text.slice(e.pos);for(let o=0,i=Ux.length-(n?1:0);o<i;o++)if(Ux[o][0].test(r))return o;return-1}function i5(e,t){let n=e.countIndent(t,e.pos,e.indent),r=e.skipSpace(t),o=e.countIndent(r,t,n);return o>=n+5||r==e.text.length?n+1:o}function Hs(e,t,n){let r=e.length-1;if(r>=0&&e[r].to==t&&e[r].type==Y.CodeText)e[r].to=n;else e.push(Ze(Y.CodeText,t,n))}var Vg={LinkReference:void 0,IndentedCode(e,t){let n=t.baseIndent+4;if(t.indent<n)return!1;let r=t.findColumn(n),o=e.lineStart+r,i=e.lineStart+t.text.length,s=[],a=[];Hs(s,o,i);while(e.nextLine()&&t.depth>=e.stack.length)if(t.pos==t.text.length){Hs(a,e.lineStart-1,e.lineStart);for(let l of t.markers)a.push(l)}else if(t.indent<n)break;else{if(a.length){for(let c of a)if(c.type==Y.CodeText)Hs(s,c.from,c.to);else s.push(c);a=[]}Hs(s,e.lineStart-1,e.lineStart);for(let c of t.markers)s.push(c);i=e.lineStart+t.text.length;let l=e.lineStart+t.findColumn(t.baseIndent+4);if(l<i)Hs(s,l,i)}if(a.length){if(a=a.filter((l)=>l.type!=Y.CodeText),a.length)t.markers=a.concat(t.markers)}return e.addNode(e.buffer.writeElements(s,-o).finish(Y.CodeBlock,i-o),o),!0},FencedCode(e,t){let n=O5(t);if(n<0)return!1;let r=e.lineStart+t.pos,o=t.next,i=n-t.pos,s=t.skipSpace(n),a=o5(t.text,t.text.length,s),l=[Ze(Y.CodeMark,r,r+i)];if(s<a)l.push(Ze(Y.CodeInfo,e.lineStart+s,e.lineStart+a));for(let c=!0,u=!0,f=!1;e.nextLine()&&t.depth>=e.stack.length;c=!1){let d=t.pos;if(t.indent-t.baseIndent<4)while(d<t.text.length&&t.text.charCodeAt(d)==o)d++;if(d-t.pos>=i&&t.skipSpace(d)==t.text.length){for(let h of t.markers)l.push(h);if(u&&f)Hs(l,e.lineStart-1,e.lineStart);l.push(Ze(Y.CodeMark,e.lineStart+t.pos,e.lineStart+d)),e.nextLine();break}else{if(f=!0,!c)Hs(l,e.lineStart-1,e.lineStart),u=!1;for(let g of t.markers)l.push(g);let h=e.lineStart+t.basePos,m=e.lineStart+t.text.length;if(h<m)Hs(l,h,m),u=!1}}return e.addNode(e.buffer.writeElements(l,-r).finish(Y.FencedCode,e.prevLineEnd()-r),r),!0},Blockquote(e,t){let n=b5(t);if(n<0)return!1;return e.startContext(Y.Blockquote,t.pos),e.addNode(Y.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1),t.moveBase(t.pos+n),null},HorizontalRule(e,t){if(Gx(t,e,!1)<0)return!1;let n=e.lineStart+t.pos;return e.nextLine(),e.addNode(Y.HorizontalRule,n),!0},BulletList(e,t){let n=Hx(t,e,!1);if(n<0)return!1;if(e.block.type!=Y.BulletList)e.startContext(Y.BulletList,t.basePos,t.next);let r=i5(t,t.pos+1);return e.startContext(Y.ListItem,t.basePos,r-t.baseIndent),e.addNode(Y.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},OrderedList(e,t){let n=Wx(t,e,!1);if(n<0)return!1;if(e.block.type!=Y.OrderedList)e.startContext(Y.OrderedList,t.basePos,t.text.charCodeAt(t.pos+n-1));let r=i5(t,t.pos+n);return e.startContext(Y.ListItem,t.basePos,r-t.baseIndent),e.addNode(Y.ListMark,e.lineStart+t.pos,e.lineStart+t.pos+n),t.moveBaseColumn(r),null},ATXHeading(e,t){let n=v5(t);if(n<0)return!1;let r=t.pos,o=e.lineStart+r,i=o5(t.text,t.text.length,r),s=i;while(s>r&&t.text.charCodeAt(s-1)==t.next)s--;if(s==i||s==r||!Xr(t.text.charCodeAt(s-1)))s=t.text.length;let a=e.buffer.write(Y.HeaderMark,0,n).writeElements(e.parser.parseInline(t.text.slice(r+n+1,s),o+n+1),-o);if(s<t.text.length)a.write(Y.HeaderMark,s-r,i-r);let l=a.finish(Y.ATXHeading1-1+n,t.text.length-r);return e.nextLine(),e.addNode(l,o),!0},HTMLBlock(e,t){let n=k5(t,e,!1);if(n<0)return!1;let r=e.lineStart+t.pos,o=Ux[n][1],i=[],s=o!=Zx;while(!o.test(t.text)&&e.nextLine()){if(t.depth<e.stack.length){s=!1;break}for(let c of t.markers)i.push(c)}if(s)e.nextLine();let a=o==w5?Y.CommentBlock:o==S5?Y.ProcessingInstructionBlock:Y.HTMLBlock,l=e.prevLineEnd();return e.addNode(e.buffer.writeElements(i,-r).finish(a,l-r),r),!0},SetextHeading:void 0};class C5{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,n){if(this.stage==-1)return!1;let r=n.content+`
20
+ `+t.scrub(),o=this.advance(r);if(o>-1&&o<r.length)return this.complete(e,n,o);return!1}finish(e,t){if((this.stage==2||this.stage==3)&&th(t.content,this.pos)==t.content.length)return this.complete(e,t,t.content.length);return!1}complete(e,t,n){return e.addLeafElement(t,Ze(Y.LinkReference,this.start,this.start+n,this.elts)),!0}nextStage(e){if(e)return this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0;if(e===!1)this.stage=-1;return!1}advance(e){for(;;)if(this.stage==-1)return-1;else if(this.stage==0){if(!this.nextStage(_5(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Ze(Y.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage($5(e,th(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=th(e,this.pos),n=0;if(t>this.pos){let r=D5(e,t,this.start);if(r){let o=Xx(e,r.to-this.start);if(o>0)this.nextStage(r),n=o}}if(!n)n=Xx(e,this.pos);return n>0&&n<e.length?n:-1}else return Xx(e,this.pos)}}function Xx(e,t){for(;t<e.length;t++){let n=e.charCodeAt(t);if(n==10)break;if(!Xr(n))return-1}return t}class R5{nextLine(e,t,n){let r=t.depth<e.stack.length?-1:x5(t),o=t.next;if(r<0)return!1;let i=Ze(Y.HeaderMark,e.lineStart+t.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(n,Ze(o==61?Y.SetextHeading1:Y.SetextHeading2,n.start,e.prevLineEnd(),[...e.parser.parseInline(n.content,n.start),i])),!0}finish(){return!1}}var P5={LinkReference(e,t){return t.content.charCodeAt(0)==91?new C5(t):null},SetextHeading(){return new R5}},uY=[(e,t)=>v5(t)>=0,(e,t)=>O5(t)>=0,(e,t)=>b5(t)>=0,(e,t)=>Hx(t,e,!0)>=0,(e,t)=>Wx(t,e,!0)>=0,(e,t)=>Gx(t,e,!0)>=0,(e,t)=>k5(t,e,!0)>=0],fY={text:"",end:0};class T5{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.line=new m5,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=Gg.create(Y.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=n.length?new N5(n,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let n=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;while(n<e.markers.length&&(!r||e.markers[n].from<r.end)){let o=e.markers[n++];this.addNode(o.type,o.from,o.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let n of this.parser.blockParsers)if(n){let r=n(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}if(e.pos==e.text.length)return this.nextLine()?null:this.finish();let t=new p5(this.lineStart+e.pos,e.text.slice(e.pos));for(let n of this.parser.leafBlockParsers)if(n){let r=n(this,t);if(r)t.parsers.push(r)}e:while(this.nextLine()){if(e.pos==e.text.length)break;if(e.indent<e.baseIndent+4){for(let n of this.parser.endLeafBlock)if(n(this,e,t))break e}for(let n of t.parsers)if(n.nextLine(this,e,t))return null;t.content+=`
21
+ `+e.scrub();for(let n of e.markers)t.marks.push(n)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);if(!t)return!1;if(this.absoluteLineStart+=t,this.lineStart=L5(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to)this.lineStart++,this.absoluteLineStart++,this.readLine();else this.atEnd=!0,this.readLine();return!0}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){if(this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to)return this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1;else return this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){while(this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=fY;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let n=this.absoluteLineStart,r=this.rangeI;while(this.ranges[r].to<t.end){r++;let o=this.ranges[r].from,i=this.lineChunkAt(o);t.end=o+i.length,t.text=t.text.slice(0,this.ranges[r-1].to-n)+i,n=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:n}=this.scanLine(this.absoluteLineStart);this.absoluteLineEnd=n,e.reset(t);for(;e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],o=this.parser.skipContextMarkup[r.type];if(!o)throw Error("Unhandled block context "+Y[r.type]);let i=this.line.markers.length;if(!o(r,this,e)){if(this.line.markers.length>i)r.end=this.line.markers[this.line.markers.length-1].to;e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),n;if(!this.input.lineChunks){let r=t.indexOf(`
22
+ `);n=r<0?t:t.slice(0,r)}else n=t==`
23
+ `?"":t;return e+n.length>this.to?n.slice(0,this.to-e):n}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,n=0){this.block=Gg.create(e,n,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,n=0){this.startContext(this.parser.getNodeType(e),t,n)}addNode(e,t,n){if(typeof e=="number")e=new Be(this.parser.nodeSet.types[e],Su,Su,(n!==null&&n!==void 0?n:this.prevLineEnd())-t);this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(Vx(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){while(this.stack.length>1)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?A5(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let n of e.parsers)if(n.finish(this,e))return;let t=Vx(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Y.Paragraph,e.content.length),e.start)}elt(e,t,n,r){if(typeof e=="string")return Ze(this.parser.getNodeType(e),t,n,r);return new Kx(e,t)}get buffer(){return new Fx(this.parser.nodeSet)}}function A5(e,t,n,r,o){let i=e[t].to,s=[],a=[],l=n.from+r;function c(u,f){while(f?u>=i:u>i){let d=e[t+1].from-i;r+=d,u+=d,t++,i=e[t].to}}for(let u=n.firstChild;u;u=u.nextSibling){c(u.from+r,!0);let f=u.from+r,d,h=o.get(u.tree);if(h)d=h;else if(u.to+r>i)d=A5(e,t,u,r,o),c(u.to+r,!1);else d=u.toTree();s.push(d),a.push(f-l)}return c(n.to+r,!1),new Be(n.type,s,a,n.to+r-l,n.tree?n.tree.propValues:void 0)}class oh extends tl{constructor(e,t,n,r,o,i,s,a,l){super();this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=n,this.blockNames=r,this.endLeafBlock=o,this.skipContextMarkup=i,this.inlineParsers=s,this.inlineNames=a,this.wrappers=l,this.nodeTypes=Object.create(null);for(let c of e.types)this.nodeTypes[c.name]=c.id}createParse(e,t,n){let r=new T5(this,e,t,n);for(let o of this.wrappers)r=o(r,e,t,n);return r}configure(e){let t=Yx(e);if(!t)return this;let{nodeSet:n,skipContextMarkup:r}=this,o=this.blockParsers.slice(),i=this.leafBlockParsers.slice(),s=this.blockNames.slice(),a=this.inlineParsers.slice(),l=this.inlineNames.slice(),c=this.endLeafBlock.slice(),u=this.wrappers;if(eh(t.defineNodes)){r=Object.assign({},r);let f=n.types.slice(),d;for(let h of t.defineNodes){let{name:m,block:g,composite:b,style:O}=typeof h=="string"?{name:h}:h;if(f.some((x)=>x.name==m))continue;if(b)r[f.length]=(x,w,S)=>b(w,S,x.value);let y=f.length,v=b?["Block","BlockContext"]:!g?void 0:y>=Y.ATXHeading1&&y<=Y.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"];if(f.push(Pt.define({id:y,name:m,props:v&&[[be.group,v]]})),O){if(!d)d={};if(Array.isArray(O)||O instanceof Yn)d[m]=O;else Object.assign(d,O)}}if(n=new Zs(f),d)n=n.extend(lo(d))}if(eh(t.props))n=n.extend(...t.props);if(eh(t.remove))for(let f of t.remove){let d=this.blockNames.indexOf(f),h=this.inlineNames.indexOf(f);if(d>-1)o[d]=i[d]=void 0;if(h>-1)a[h]=void 0}if(eh(t.parseBlock))for(let f of t.parseBlock){let d=s.indexOf(f.name);if(d>-1)o[d]=f.parse,i[d]=f.leaf;else{let h=f.before?qg(s,f.before):f.after?qg(s,f.after)+1:s.length-1;o.splice(h,0,f.parse),i.splice(h,0,f.leaf),s.splice(h,0,f.name)}if(f.endLeaf)c.push(f.endLeaf)}if(eh(t.parseInline))for(let f of t.parseInline){let d=l.indexOf(f.name);if(d>-1)a[d]=f.parse;else{let h=f.before?qg(l,f.before):f.after?qg(l,f.after)+1:l.length-1;a.splice(h,0,f.parse),l.splice(h,0,f.name)}}if(t.wrap)u=u.concat(t.wrap);return new oh(n,o,i,s,c,r,a,l,u)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let n=new Wg(this,e,t);e:for(let r=t;r<n.end;){let o=n.char(r);for(let i of this.inlineParsers)if(i){let s=i(n,o,r);if(s>=0){r=s;continue e}}r++}return n.resolveMarkers(0)}}function eh(e){return e!=null&&e.length>0}function Yx(e){if(!Array.isArray(e))return e;if(e.length==0)return null;let t=Yx(e[0]);if(e.length==1)return t;let n=Yx(e.slice(1));if(!n||!t)return t||n;let r=(s,a)=>(s||Su).concat(a||Su),o=t.wrap,i=n.wrap;return{props:r(t.props,n.props),defineNodes:r(t.defineNodes,n.defineNodes),parseBlock:r(t.parseBlock,n.parseBlock),parseInline:r(t.parseInline,n.parseInline),remove:r(t.remove,n.remove),wrap:!o?i:!i?o:(s,a,l,c)=>o(i(s,a,l,c),a,l,c)}}function qg(e,t){let n=e.indexOf(t);if(n<0)throw RangeError(`Position specified relative to unknown parser ${t}`);return n}var Q5=[Pt.none];for(let e=1,t;t=Y[e];e++)Q5[e]=Pt.define({id:e,name:t,props:e>=Y.Escape?[]:[[be.group,e in g5?["Block","BlockContext"]:["Block","LeafBlock"]]],top:t=="Document"});var Su=[];class Fx{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,n,r=0){return this.content.push(e,t,n,4+r*4),this}writeElements(e,t=0){for(let n of e)n.writeTo(this,t);return this}finish(e,t){return Be.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}class ku{constructor(e,t,n,r=Su){this.type=e,this.from=t,this.to=n,this.children=r}writeTo(e,t){let n=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-n)}toTree(e){return new Fx(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}}class Kx{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Su}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function Ze(e,t,n,r){return new ku(e,t,n,r)}var E5={resolve:"Emphasis",mark:"EmphasisMark"},M5={resolve:"Emphasis",mark:"EmphasisMark"},il={},Hg={};class Hn{constructor(e,t,n,r){this.type=e,this.from=t,this.to=n,this.side=r}}var s5="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~",rh=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{rh=new RegExp("[\\p{S}|\\p{P}]","u")}catch(e){}var Bx={Escape(e,t,n){if(t!=92||n==e.end-1)return-1;let r=e.char(n+1);for(let o=0;o<s5.length;o++)if(s5.charCodeAt(o)==r)return e.append(Ze(Y.Escape,n,n+2));return-1},Entity(e,t,n){if(t!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(e.slice(n+1,n+31));return r?e.append(Ze(Y.Entity,n,n+1+r[0].length)):-1},InlineCode(e,t,n){if(t!=96||n&&e.char(n-1)==96)return-1;let r=n+1;while(r<e.end&&e.char(r)==96)r++;let o=r-n,i=0;for(;r<e.end;r++)if(e.char(r)==96){if(i++,i==o&&e.char(r+1)!=96)return e.append(Ze(Y.InlineCode,n,r+1,[Ze(Y.CodeMark,n,n+o),Ze(Y.CodeMark,r+1-o,r+1)]))}else i=0;return-1},HTMLTag(e,t,n){if(t!=60||n==e.end-1)return-1;let r=e.slice(n+1,e.end),o=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(o)return e.append(Ze(Y.Autolink,n,n+1+o[0].length,[Ze(Y.LinkMark,n,n+1),Ze(Y.URL,n+1,n+o[0].length),Ze(Y.LinkMark,n+o[0].length,n+1+o[0].length)]));let i=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(i)return e.append(Ze(Y.Comment,n,n+1+i[0].length));let s=/^\?[^]*?\?>/.exec(r);if(s)return e.append(Ze(Y.ProcessingInstruction,n,n+1+s[0].length));let a=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);if(!a)return-1;return e.append(Ze(Y.HTMLTag,n,n+1+a[0].length))},Emphasis(e,t,n){if(t!=95&&t!=42)return-1;let r=n+1;while(e.char(r)==t)r++;let o=e.slice(n-1,n),i=e.slice(r,r+1),s=rh.test(o),a=rh.test(i),l=/\s|^$/.test(o),c=/\s|^$/.test(i),u=!c&&(!a||l||s),f=!l&&(!s||c||a),d=u&&(t==42||!f||s),h=f&&(t==42||!u||a);return e.append(new Hn(t==95?E5:M5,n,r,(d?1:0)|(h?2:0)))},HardBreak(e,t,n){if(t==92&&e.char(n+1)==10)return e.append(Ze(Y.HardBreak,n,n+2));if(t==32){let r=n+1;while(e.char(r)==32)r++;if(e.char(r)==10&&r>=n+2)return e.append(Ze(Y.HardBreak,n,r+1))}return-1},Link(e,t,n){return t==91?e.append(new Hn(il,n,n+1,1)):-1},Image(e,t,n){return t==33&&e.char(n+1)==91?e.append(new Hn(Hg,n,n+2,1)):-1},LinkEnd(e,t,n){if(t!=93)return-1;for(let r=e.parts.length-1;r>=0;r--){let o=e.parts[r];if(o instanceof Hn&&(o.type==il||o.type==Hg)){if(!o.side||e.skipSpace(o.to)==n&&!/[(\[]/.test(e.slice(n+1,n+2)))return e.parts[r]=null,-1;let i=e.takeContent(r),s=e.parts[r]=dY(e,i,o.type==il?Y.Link:Y.Image,o.from,n+1);if(o.type==il)for(let a=0;a<r;a++){let l=e.parts[a];if(l instanceof Hn&&l.type==il)l.side=0}return s.to}}return-1}};function dY(e,t,n,r,o){let{text:i}=e,s=e.char(o),a=o;if(t.unshift(Ze(Y.LinkMark,r,r+(n==Y.Image?2:1))),t.push(Ze(Y.LinkMark,o-1,o)),s==40){let l=e.skipSpace(o+1),c=$5(i,l-e.offset,e.offset),u;if(c){if(l=e.skipSpace(c.to),l!=c.to){if(u=D5(i,l-e.offset,e.offset),u)l=e.skipSpace(u.to)}}if(e.char(l)==41){if(t.push(Ze(Y.LinkMark,o,o+1)),a=l+1,c)t.push(c);if(u)t.push(u);t.push(Ze(Y.LinkMark,l,a))}}else if(s==91){let l=_5(i,o-e.offset,e.offset,!1);if(l)t.push(l),a=l.to}return Ze(n,r,a,t)}function $5(e,t,n){if(e.charCodeAt(t)==60){for(let o=t+1;o<e.length;o++){let i=e.charCodeAt(o);if(i==62)return Ze(Y.URL,t+n,o+1+n);if(i==60||i==10)return!1}return null}else{let o=0,i=t;for(let s=!1;i<e.length;i++){let a=e.charCodeAt(i);if(Xr(a))break;else if(s)s=!1;else if(a==40)o++;else if(a==41){if(!o)break;o--}else if(a==92)s=!0}return i>t?Ze(Y.URL,t+n,i+n):i==e.length?null:!1}}function D5(e,t,n){let r=e.charCodeAt(t);if(r!=39&&r!=34&&r!=40)return!1;let o=r==40?41:r;for(let i=t+1,s=!1;i<e.length;i++){let a=e.charCodeAt(i);if(s)s=!1;else if(a==o)return Ze(Y.LinkTitle,t+n,i+1+n);else if(a==92)s=!0}return null}function _5(e,t,n,r){for(let o=!1,i=t+1,s=Math.min(e.length,i+999);i<s;i++){let a=e.charCodeAt(i);if(o)o=!1;else if(a==93)return r?!1:Ze(Y.LinkLabel,t+n,i+1+n);else{if(r&&!Xr(a))r=!1;if(a==91)return!1;else if(a==92)o=!0}}return null}class Wg{constructor(e,t,n){this.parser=e,this.text=t,this.offset=n,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,n,r,o){return this.append(new Hn(e,t,n,(r?1:0)|(o?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Hn&&(t.type==il||t.type==Hg))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let n=e;n<this.parts.length;n++){let r=this.parts[n];if(!(r instanceof Hn&&r.type.resolve&&r.side&2))continue;let o=r.type==E5||r.type==M5,i=r.to-r.from,s,a=n-1;for(;a>=e;a--){let m=this.parts[a];if(m instanceof Hn&&m.side&1&&m.type==r.type&&!(o&&(r.side&1||m.side&2)&&(m.to-m.from+i)%3==0&&((m.to-m.from)%3||i%3))){s=m;break}}if(!s)continue;let l=r.type.resolve,c=[],u=s.from,f=r.to;if(o){let m=Math.min(2,s.to-s.from,i);u=s.to-m,f=r.from+m,l=m==1?"Emphasis":"StrongEmphasis"}if(s.type.mark)c.push(this.elt(s.type.mark,u,s.to));for(let m=a+1;m<n;m++){if(this.parts[m]instanceof ku)c.push(this.parts[m]);this.parts[m]=null}if(r.type.mark)c.push(this.elt(r.type.mark,r.from,f));let d=this.elt(l,u,f,c);if(this.parts[a]=o&&s.from!=u?new Hn(s.type,s.from,u,s.side):null,this.parts[n]=o&&r.to!=f?new Hn(r.type,f,r.to,r.side):null)this.parts.splice(n,0,d);else this.parts[n]=d}let t=[];for(let n=e;n<this.parts.length;n++){let r=this.parts[n];if(r instanceof ku)t.push(r)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let n=this.parts[t];if(n instanceof Hn&&n.type==e&&n.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Hn?t:null}skipSpace(e){return th(this.text,e-this.offset)+this.offset}elt(e,t,n,r){if(typeof e=="string")return Ze(this.parser.getNodeType(e),t,n,r);return new Kx(e,t)}}Wg.linkStart=il;Wg.imageStart=Hg;function Vx(e,t){if(!t.length)return e;if(!e.length)return t;let n=e.slice(),r=0;for(let o of t){while(r<n.length&&n[r].to<o.to)r++;if(r<n.length&&n[r].from<o.from){let i=n[r];if(i instanceof ku)n[r]=new ku(i.type,i.from,i.to,Vx(i.children,[o]))}else n.splice(r++,0,o)}return n}var hY=[Y.CodeBlock,Y.ListItem,Y.OrderedList,Y.BulletList];class N5{constructor(e,t){if(this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length)this.fragment=e[this.i++]}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){while(this.fragment&&this.fragment.to<=e)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let o=this.fragment.to;while(o>0&&this.input.read(o-1,o)!=`
24
+ `)o--;this.fragmentEnd=o?o-1:0}let n=this.cursor;if(!n)n=this.cursor=this.fragment.tree.cursor(),n.firstChild();let r=e+this.fragment.offset;while(n.to<=r)if(!n.parent())return!1;for(;;){if(n.from>=r)return this.fragment.from<=t;if(!n.childAfter(r))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(be.contextHash)==e}takeNodes(e){let t=this.cursor,n=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),o=e.absoluteLineStart,i=o,s=e.block.children.length,a=i,l=s;for(;;){if(t.to-n>r){if(t.type.isAnonymous&&t.firstChild())continue;break}let c=L5(t.from-n,e.ranges);if(t.to-n<=e.ranges[e.rangeI].to)e.addNode(t.tree,c);else{let u=new Be(e.parser.nodeSet.types[Y.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(u,t.tree),e.addNode(u,c)}if(t.type.is("Block")){if(hY.indexOf(t.type.id)<0)i=t.to-n,s=e.block.children.length;else i=a,s=l;a=t.to-n,l=e.block.children.length}if(!t.nextSibling())break}while(e.block.children.length>s)e.block.children.pop(),e.block.positions.pop();return i-o}}function L5(e,t){let n=e;for(let r=1;r<t.length;r++){let o=t[r-1].to,i=t[r].from;if(o<e)n-=i-o}return n}var pY=lo({"Blockquote/...":C.quote,HorizontalRule:C.contentSeparator,"ATXHeading1/... SetextHeading1/...":C.heading1,"ATXHeading2/... SetextHeading2/...":C.heading2,"ATXHeading3/...":C.heading3,"ATXHeading4/...":C.heading4,"ATXHeading5/...":C.heading5,"ATXHeading6/...":C.heading6,"Comment CommentBlock":C.comment,Escape:C.escape,Entity:C.character,"Emphasis/...":C.emphasis,"StrongEmphasis/...":C.strong,"Link/... Image/...":C.link,"OrderedList/... BulletList/...":C.list,"BlockQuote/...":C.quote,"InlineCode CodeText":C.monospace,"URL Autolink":C.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":C.processingInstruction,"CodeInfo LinkLabel":C.labelName,LinkTitle:C.string,Paragraph:C.content}),z5=new oh(new Zs(Q5).extend(pY),Object.keys(Vg).map((e)=>Vg[e]),Object.keys(Vg).map((e)=>P5[e]),Object.keys(Vg),uY,g5,Object.keys(Bx).map((e)=>Bx[e]),Object.keys(Bx),[]);function mY(e,t,n){let r=[];for(let o=e.firstChild,i=t;;o=o.nextSibling){let s=o?o.from:n;if(s>i)r.push({from:i,to:s});if(!o)break;i=o.to}return r}function j5(e){let{codeParser:t,htmlParser:n}=e;return{wrap:Qg((o,i)=>{let s=o.type.id;if(t&&(s==Y.CodeBlock||s==Y.FencedCode)){let a="";if(s==Y.FencedCode){let c=o.node.getChild(Y.CodeInfo);if(c)a=i.read(c.from,c.to)}let l=t(a);if(l)return{parser:l,overlay:(c)=>c.type.id==Y.CodeText,bracketed:s==Y.FencedCode}}else if(n&&(s==Y.HTMLBlock||s==Y.HTMLTag||s==Y.CommentBlock))return{parser:n,overlay:mY(o.node,o.from,o.to)};return null})}}var gY={resolve:"Strikethrough",mark:"StrikethroughMark"},OY={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":C.strikethrough}},{name:"StrikethroughMark",style:C.processingInstruction}],parseInline:[{name:"Strikethrough",parse(e,t,n){if(t!=126||e.char(n+1)!=126||e.char(n+2)==126)return-1;let r=e.slice(n-1,n),o=e.slice(n+2,n+3),i=/\s|^$/.test(r),s=/\s|^$/.test(o),a=rh.test(r),l=rh.test(o);return e.addDelimiter(gY,n,n+2,!s&&(!l||i||a),!i&&(!a||s||l))},after:"Emphasis"}]};function nh(e,t,n=0,r,o=0){let i=0,s=!0,a=-1,l=-1,c=!1,u=()=>{r.push(e.elt("TableCell",o+a,o+l,e.parser.parseInline(t.slice(a,l),o+a)))};for(let f=n;f<t.length;f++){let d=t.charCodeAt(f);if(d==124&&!c){if(!s||a>-1)i++;if(s=!1,r){if(a>-1)u();r.push(e.elt("TableDelimiter",f+o,f+o+1))}a=l=-1}else if(c||d!=32&&d!=9){if(a<0)a=f;l=f+1}c=!c&&d==92}if(a>-1){if(i++,r)u()}return i}function a5(e,t){for(let n=t;n<e.length;n++){let r=e.charCodeAt(n);if(r==124)return!0;if(r==92)n++}return!1}var I5=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class qx{constructor(){this.rows=null}nextLine(e,t,n){if(this.rows==null){this.rows=!1;let r;if((t.next==45||t.next==58||t.next==124)&&I5.test(r=t.text.slice(t.pos))){let o=[];if(nh(e,n.content,0,o,n.start)==nh(e,r,0))this.rows=[e.elt("TableHeader",n.start,n.start+n.content.length,o),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)]}}else if(this.rows){let r=[];nh(e,t.text,t.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,r))}return!1}finish(e,t){if(!this.rows)return!1;return e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0}}var bY={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":C.heading}},"TableRow",{name:"TableCell",style:C.content},{name:"TableDelimiter",style:C.processingInstruction}],parseBlock:[{name:"Table",leaf(e,t){return a5(t.content,0)?new qx:null},endLeaf(e,t,n){if(n.parsers.some((o)=>o instanceof qx)||!a5(t.text,t.basePos))return!1;let r=e.peekLine();return I5.test(r)&&nh(e,t.text,t.basePos)==nh(e,r,t.basePos)},before:"SetextHeading"}]};class X5{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}var yY={defineNodes:[{name:"Task",block:!0,style:C.list},{name:"TaskMarker",style:C.atom}],parseBlock:[{name:"TaskList",leaf(e,t){return/^\[[ xX]\][ \t]/.test(t.content)&&e.parentType().name=="ListItem"?new X5:null},after:"SetextHeading"}]},l5=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,c5=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,vY=/[\w-]+\.[\w-]+($|[/:])/,u5=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,f5=/\/[a-zA-Z\d@.]+/gy;function d5(e,t,n,r){let o=0;for(let i=t;i<n;i++)if(e[i]==r)o++;return o}function xY(e,t){c5.lastIndex=t;let n=c5.exec(e);if(!n||vY.exec(n[0])[0].indexOf("_")>-1)return-1;let r=t+n[0].length;for(;;){let o=e[r-1],i;if(/[?!.,:*_~]/.test(o)||o==")"&&d5(e,t,r,")")>d5(e,t,r,"("))r--;else if(o==";"&&(i=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(e.slice(t,r))))r=t+i.index;else break}return r}function h5(e,t){u5.lastIndex=t;let n=u5.exec(e);if(!n)return-1;let r=n[0][n[0].length-1];return r=="_"||r=="-"?-1:t+n[0].length-(r=="."?1:0)}var wY={parseInline:[{name:"Autolink",parse(e,t,n){let r=n-e.offset;if(r&&/\w/.test(e.text[r-1]))return-1;l5.lastIndex=r;let o=l5.exec(e.text),i=-1;if(!o)return-1;if(o[1]||o[2]){if(i=xY(e.text,r+o[0].length),i>-1&&e.hasOpenLink){let s=/([^\[\]]|\[[^\]]*\])*/.exec(e.text.slice(r,i));i=r+s[0].length}}else if(o[3])i=h5(e.text,r);else if(i=h5(e.text,r+o[0].length),i>-1&&o[0]=="xmpp:"){if(f5.lastIndex=i,o=f5.exec(e.text),o)i=o.index+o[0].length}if(i<0)return-1;return e.addElement(e.elt("URL",n,i+e.offset)),i+e.offset}}]},B5=[bY,yY,OY,wY];function Z5(e,t,n){return(r,o,i)=>{if(o!=e||r.char(i+1)==e)return-1;let s=[r.elt(n,i,i+1)];for(let a=i+1;a<r.end;a++){let l=r.char(a);if(l==e)return r.addElement(r.elt(t,i,a+1,s.concat(r.elt(n,a,a+1))));if(l==92)s.push(r.elt("Escape",a,a+++2));if(Xr(l))break}return-1}}var U5={defineNodes:[{name:"Superscript",style:C.special(C.content)},{name:"SuperscriptMark",style:C.processingInstruction}],parseInline:[{name:"Superscript",parse:Z5(94,"Superscript","SuperscriptMark")}]},Y5={defineNodes:[{name:"Subscript",style:C.special(C.content)},{name:"SubscriptMark",style:C.processingInstruction}],parseInline:[{name:"Subscript",parse:Z5(126,"Subscript","SubscriptMark")}]},V5={defineNodes:[{name:"Emoji",style:C.character}],parseInline:[{name:"Emoji",parse(e,t,n){let r;if(t!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(e.slice(n+1,e.end))))return-1;return e.addElement(e.elt("Emoji",n,n+1+r[0].length))}}]};class Fg{constructor(e,t,n,r,o,i,s,a,l,c=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=o,this.score=i,this.buffer=s,this.bufferBase=a,this.curContext=l,this.lookAhead=c,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new Fg(e,[],t,n,n,0,[],0,r?new tw(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=e&65535,{parser:o}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),s=o.dynamicPrecedence(r);if(s)this.score+=s;if(n==0){if(r<o.minRepeatTerm&&this.reducePos<this.pos)this.reducePos=this.pos;if(this.pushState(o.getGoto(this.state,r,!0),this.reducePos),r<o.minRepeatTerm)this.storeNode(r,this.reducePos,this.reducePos,i?8:4,!0);this.reduceContext(r,this.reducePos);return}let a=this.stack.length-(n-1)*3-(e&262144?6:0),l=a?this.stack[a-2]:this.p.ranges[0].from;if(r<o.minRepeatTerm&&l==this.reducePos&&this.reducePos<this.pos)this.reducePos=this.pos;let c=this.reducePos-l;if(c>=2000&&!((t=this.p.parser.nodeSet.types[r])===null||t===void 0?void 0:t.isAnonymous)){if(l==this.p.lastBigReductionStart)this.p.bigReductionCount++,this.p.lastBigReductionSize=c;else if(this.p.lastBigReductionSize<c)this.p.bigReductionCount=1,this.p.lastBigReductionStart=l,this.p.lastBigReductionSize=c}let u=a?this.stack[a-1]:0,f=this.bufferBase+this.buffer.length-u;if(r<o.minRepeatTerm||e&131072){let d=o.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,l,d,f+4,!0)}if(e&262144)this.state=this.stack[a];else{let d=this.stack[a-3];this.state=o.getGoto(d,r,!0)}while(this.stack.length>a)this.stack.pop();this.reduceContext(r,l)}storeNode(e,t,n,r=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let i=this.buffer.length;if(i>0&&this.buffer[i-4]==0&&this.buffer[i-1]>-1){if(t==n)return;if(this.buffer[i-2]>=t){this.buffer[i-2]=n;return}}}if(!o||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let s=!1;for(let a=i;a>0&&this.buffer[a-2]>n;a-=4)if(this.buffer[a-1]>=0){s=!0;break}if(s){while(i>0&&this.buffer[i-2]>n)if(this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4)r-=4}}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let o=e,{parser:i}=this.p;this.pos=r;let s=i.stateFlag(o,1);if(!s&&(r>n||t<=i.maxNode))this.reducePos=r;if(this.pushState(o,s?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=i.maxNode)this.buffer.push(t,n,r,4)}else if(this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode)this.buffer.push(t,n,r,4)}apply(e,t,n,r){if(e&65536)this.reduce(e);else this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;if(n<0||this.p.reused[n]!=e)this.p.reused.push(e),n++;let r=this.pos;if(this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext)this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;if(t&&e.buffer[t-4]==0)t-=4;while(t>0&&e.buffer[t-2]>e.reducePos)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;while(e&&r==e.bufferBase)e=e.parent;return new Fg(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;if(n)this.storeNode(e,this.pos,t,4);this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new K5(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if((n&65536)==0)return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let r=[];for(let o=0,i;o<t.length;o+=2)if((i=t[o+1])!=this.state&&this.p.parser.hasAction(i,e))r.push(t[o],i);if(this.stack.length<120)for(let o=0;r.length<8&&o<t.length;o+=2){let i=t[o+1];if(!r.some((s,a)=>a&1&&s==i))r.push(t[o],i)}t=r}let n=[];for(let r=0;r<t.length&&n.length<4;r+=2){let o=t[r+1];if(o==this.state)continue;let i=this.split();i.pushState(o,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[r],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,o=this.stack.length-n*3;if(o<0||e.getGoto(this.stack[o],r,!1)<0){let i=this.findForcedReduction();if(i==null)return!1;t=i}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,o)=>{if(t.includes(r))return;return t.push(r),e.allActions(r,(i)=>{if(i&393216);else if(i&65536){let s=(i>>19)-o;if(s>1){let a=i&65535,l=this.stack.length-s*3;if(l>=0&&e.getGoto(this.stack[l],a,!1)>=0)return s<<19|65536|a}}else{let s=n(i,o+1);if(s!=null)return s}})};return n(this.state,0)}forceAll(){while(!this.p.parser.stateFlag(this.state,2))if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){if(this.curContext)this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){if(this.curContext)this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;if(e<0||this.buffer[e]!=-3)this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;if(e<0||this.buffer[e]!=-4)this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new tw(this.curContext.tracker,e);if(t.hash!=this.curContext.hash)this.emitContext();this.curContext=t}}setLookAhead(e){if(e<=this.lookAhead)return!1;return this.emitLookAhead(),this.lookAhead=e,!0}close(){if(this.curContext&&this.curContext.tracker.strict)this.emitContext();if(this.lookAhead>0)this.emitLookAhead()}}class tw{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class K5{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;if(n==0){if(this.stack==this.start.stack)this.stack=this.stack.slice();this.stack.push(this.state,0,0),this.base+=3}else this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class Kg{constructor(e,t,n){if(this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0)this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Kg(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;if(e!=null)this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){if(this.index-=4,this.pos-=4,this.index==0)this.maybeNext()}fork(){return new Kg(this.stack,this.pos,this.index)}}function ih(e,t=Uint16Array){if(typeof e!="string")return e;let n=null;for(let r=0,o=0;r<e.length;){let i=0;for(;;){let s=e.charCodeAt(r++),a=!1;if(s==126){i=65535;break}if(s>=92)s--;if(s>=34)s--;let l=s-32;if(l>=46)l-=46,a=!0;if(i+=l,a)break;i*=46}if(n)n[o++]=i;else n=new t(i)}return n}class sh{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}var q5=new sh;class J5{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=q5,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,o=this.pos+e;while(o<n.from){if(!r)return null;let i=this.ranges[--r];o-=n.from-i.to,n=i}while(t<0?o>n.to:o>=n.to){if(r==this.ranges.length-1)return null;let i=this.ranges[++r];o+=i.from-n.to,n=i}return o}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let o=this.resolveOffset(e,1);if(o==null)return-1;if(n=o,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let i=this.rangeIndex,s=this.range;while(s.to<=n)s=this.ranges[++i];if(this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>s.to)this.chunk2=this.chunk2.slice(0,s.to-n);r=this.chunk2.charCodeAt(0)}}if(n>=this.token.lookAhead)this.token.lookAhead=n+1;return r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError("Token end out of bounds");this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){if(this.chunkOff>=this.chunk.length){if(this.getChunk(),this.chunkOff==this.chunk.length)return this.next=-1}return this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){this.chunkOff+=e;while(this.pos+e>=this.range.to){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}if(this.pos+=e,this.pos>=this.token.lookAhead)this.token.lookAhead=this.pos+1;return this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t)this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1;else this.token=q5;if(this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;while(e<this.range.from)this.range=this.ranges[--this.rangeIndex];while(e>=this.range.to)this.range=this.ranges[++this.rangeIndex];if(e>=this.chunkPos&&e<this.chunkPos+this.chunk.length)this.chunkOff=e-this.chunkPos;else this.chunk="",this.chunkOff=0;this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;if(r.to>e)n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t))}return n}}class sl{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;eD(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}sl.prototype.contextual=sl.prototype.fallback=sl.prototype.extend=!1;class al{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e=="string"?ih(e):e}token(e,t){let n=e.pos,r=0;for(;;){let o=e.next<0,i=e.resolveOffset(1,1);if(eD(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(!o)r++;if(i==null)break;e.reset(i,e.token)}if(r)e.reset(n,e.token),e.acceptToken(this.elseToken,r)}}al.prototype.contextual=sl.prototype.fallback=sl.prototype.extend=!1;class dn{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function eD(e,t,n,r,o,i){let s=0,a=1<<r,{dialect:l}=n.p.parser;e:for(;;){if((a&e[s])==0)break;let c=e[s+1];for(let h=s+3;h<c;h+=2)if((e[h+1]&a)>0){let m=e[h];if(l.allows(m)&&(t.token.value==-1||t.token.value==m||SY(m,t.token.value,o,i))){t.acceptToken(m);break}}let u=t.next,f=0,d=e[s+2];if(t.next<0&&d>f&&e[c+d*3-3]==65535){s=e[c+d*3-1];continue e}for(;f<d;){let h=f+d>>1,m=c+h+(h<<1),g=e[m],b=e[m+1]||65536;if(u<g)d=h;else if(u>=b)f=h+1;else{s=e[m+2],t.advance();continue e}}break}}function G5(e,t,n){for(let r=t,o;(o=e[r])!=65535;r++)if(o==n)return r-t;return-1}function SY(e,t,n,r){let o=G5(n,r,t);return o<0||G5(n,r,e)<o}var gr=typeof process<"u"&&process.env&&/\bparse\b/.test(process.env.LOG),Jx=null;function H5(e,t,n){let r=e.cursor(je.IncludeAnonymous);r.moveTo(t);for(;;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}class tD{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){this.safeFrom=e.openStart?H5(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?H5(e.tree,e.to+e.offset,-1)-e.offset:e.to;while(this.trees.length)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;while(this.fragment&&this.safeTo<=e)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let o=n.children[r],i=this.start[t]+n.positions[r];if(i>e)return this.nextStart=i,null;if(o instanceof Be){if(i==e){if(i<this.safeFrom)return null;let s=i+o.length;if(s<=this.safeTo){let a=o.prop(be.lookAhead);if(!a||s+a<this.fragment.to)return o}}if(this.index[t]++,i+o.length>=Math.max(this.safeFrom,e))this.trees.push(o),this.start.push(i),this.index.push(0)}else this.index[t]++,this.nextStart=i+o.length}}}class nD{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map((n)=>new sh)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:o}=r,i=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,a=0;for(let l=0;l<o.length;l++){if((1<<l&i)==0)continue;let c=o[l],u=this.tokens[l];if(n&&!c.fallback)continue;if(c.contextual||u.start!=e.pos||u.mask!=i||u.context!=s)this.updateCachedToken(u,c,e),u.mask=i,u.context=s;if(u.lookAhead>u.end+25)a=Math.max(u.lookAhead,a);if(u.value!=0){let f=t;if(u.extended>-1)t=this.addActions(e,u.extended,u.end,t);if(t=this.addActions(e,u.value,u.end,t),!c.extend){if(n=u,t>f)break}}}while(this.actions.length>t)this.actions.pop();if(a)e.setLookAhead(a);if(!n&&e.pos==this.stream.end)n=new sh,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t);return this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new sh,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:o}=n.p;for(let i=0;i<o.specialized.length;i++)if(o.specialized[i]==e.value){let s=o.specializers[i](this.stream.read(e.start,e.end),n);if(s>=0&&n.p.parser.dialect.allows(s>>1)){if((s&1)==0)e.value=s>>1;else e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let o=0;o<r;o+=3)if(this.actions[o]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:o}=e,{parser:i}=e.p,{data:s}=i;for(let a=0;a<2;a++)for(let l=i.stateSlot(o,a?2:1);;l+=3){if(s[l]==65535)if(s[l+1]==1)l=_i(s,l+2);else{if(r==0&&s[l+1]==2)r=this.putAction(_i(s,l+2),t,n,r);break}if(s[l]==t)r=this.putAction(_i(s,l+1),t,n,r)}return r}}class rD{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new J5(t,r),this.tokens=new nD(e,this.stream),this.topTerm=e.top[1];let{from:o}=r[0];this.stacks=[Fg.start(this,e.top[0],o)],this.fragments=n.length&&this.stream.end-o>e.bufferLength*4?new tD(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,o;if(this.bigReductionCount>300&&e.length==1){let[i]=e;while(i.forceReduce()&&i.stack.length&&i.stack[i.stack.length-2]>=this.lastBigReductionStart);this.bigReductionCount=this.lastBigReductionSize=0}for(let i=0;i<e.length;i++){let s=e[i];for(;;){if(this.tokens.mainToken=null,s.pos>t)n.push(s);else if(this.advanceStack(s,n,e))continue;else{if(!r)r=[],o=[];r.push(s);let a=this.tokens.getMainToken(s);o.push(a.value,a.end)}break}}if(!n.length){let i=r&&kY(r);if(i){if(gr)console.log("Finish with "+this.stackID(i));return this.stackToTree(i)}if(this.parser.strict){if(gr&&r)console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none"));throw SyntaxError("No parse at "+t)}if(!this.recovering)this.recovering=5}if(this.recovering&&r){let i=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,o,n);if(i){if(gr)console.log("Force-finish "+this.stackID(i));return this.stackToTree(i.forceAll())}}if(this.recovering){let i=this.recovering==1?1:this.recovering*3;if(n.length>i){n.sort((s,a)=>a.score-s.score);while(n.length>i)n.pop()}if(n.some((s)=>s.reducePos>t))this.recovering--}else if(n.length>1){e:for(let i=0;i<n.length-1;i++){let s=n[i];for(let a=i+1;a<n.length;a++){let l=n[a];if(s.sameState(l)||s.buffer.length>500&&l.buffer.length>500)if((s.score-l.score||s.buffer.length-l.buffer.length)>0)n.splice(a--,1);else{n.splice(i--,1);continue e}}}if(n.length>12)n.sort((i,s)=>s.score-i.score),n.splice(12,n.length-12)}this.minStackPos=n[0].pos;for(let i=1;i<n.length;i++)if(n[i].pos<this.minStackPos)this.minStackPos=n[i].pos;return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:o}=this,i=gr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let l=e.curContext&&e.curContext.tracker.strict,c=l?e.curContext.hash:0;for(let u=this.fragments.nodeAt(r);u;){let f=this.parser.nodeSet.types[u.type.id]==u.type?o.getGoto(e.state,u.type.id):-1;if(f>-1&&u.length&&(!l||(u.prop(be.contextHash)||0)==c)){if(e.useNode(u,f),gr)console.log(i+this.stackID(e)+` (via reuse of ${o.getName(u.type.id)})`);return!0}if(!(u instanceof Be)||u.children.length==0||u.positions[0]>0)break;let d=u.children[0];if(d instanceof Be&&u.positions[0]==0)u=d;else break}}let s=o.stateSlot(e.state,4);if(s>0){if(e.reduce(s),gr)console.log(i+this.stackID(e)+` (via always-reduce ${o.getName(s&65535)})`);return!0}if(e.stack.length>=8400)while(e.stack.length>6000&&e.forceReduce());let a=this.tokens.getActions(e);for(let l=0;l<a.length;){let c=a[l++],u=a[l++],f=a[l++],d=l==a.length||!n,h=d?e:e.split(),m=this.tokens.mainToken;if(h.apply(c,u,m?m.start:h.pos,f),gr)console.log(i+this.stackID(h)+` (via ${(c&65536)==0?"shift":`reduce of ${o.getName(c&65535)}`} for ${o.getName(u)} @ ${r}${h==e?"":", split"})`);if(d)return!0;else if(h.pos>r)t.push(h);else n.push(h)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return W5(e,t),!0}}runRecovery(e,t,n){let r=null,o=!1;for(let i=0;i<e.length;i++){let s=e[i],a=t[i<<1],l=t[(i<<1)+1],c=gr?this.stackID(s)+" -> ":"";if(s.deadEnd){if(o)continue;if(o=!0,s.restart(),gr)console.log(c+this.stackID(s)+" (restarted)");if(this.advanceFully(s,n))continue}let u=s.split(),f=c;for(let d=0;d<10&&u.forceReduce();d++){if(gr)console.log(f+this.stackID(u)+" (via force-reduce)");if(this.advanceFully(u,n))break;if(gr)f=this.stackID(u)+" -> "}for(let d of s.recoverByInsert(a)){if(gr)console.log(c+this.stackID(d)+" (via recover-insert)");this.advanceFully(d,n)}if(this.stream.end>s.pos){if(l==s.pos)l++,a=0;if(s.recoverByDelete(a,l),gr)console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`);W5(s,n)}else if(!r||r.score<u.score)r=u}return r}stackToTree(e){return e.close(),Be.build({buffer:Kg.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(Jx||(Jx=new WeakMap)).get(e);if(!t)Jx.set(e,t=String.fromCodePoint(this.nextStackID++));return t+e}}function W5(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){if(t[n].score<e.score)t[n]=e;return}}t.push(e)}class oD{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}}var ew=(e)=>e;class ah{constructor(e){this.start=e.start,this.shift=e.shift||ew,this.reduce=e.reduce||ew,this.reuse=e.reuse||ew,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Ni extends tl{constructor(e){super();if(this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let s=0;s<e.repeatNodeCount;s++)t.push("");let n=Object.keys(e.topRules).map((s)=>e.topRules[s][1]),r=[];for(let s=0;s<t.length;s++)r.push([]);function o(s,a,l){r[s].push([a,a.deserialize(String(l))])}if(e.nodeProps)for(let s of e.nodeProps){let a=s[0];if(typeof a=="string")a=be[a];for(let l=1;l<s.length;){let c=s[l++];if(c>=0)o(c,a,s[l++]);else{let u=s[l+-c];for(let f=-c;f>0;f--)o(s[l++],a,u);l++}}}if(this.nodeSet=new Zs(t.map((s,a)=>Pt.define({name:a>=this.minRepeatTerm?void 0:s,id:a,props:r[a],top:n.indexOf(a)>-1,error:a==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(a)>-1}))),e.propSources)this.nodeSet=this.nodeSet.extend(...e.propSources);this.strict=!1,this.bufferLength=yM;let i=ih(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;s<this.specializerSpecs.length;s++)this.specialized[s]=this.specializerSpecs[s].term;this.specializers=this.specializerSpecs.map(F5),this.states=ih(e.states,Uint32Array),this.data=ih(e.stateData),this.goto=ih(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map((s)=>typeof s=="number"?new sl(i,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new rD(this,e,t,n);for(let o of this.wrappers)r=o(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let o=r[t+1];;){let i=r[o++],s=i&1,a=r[o++];if(s&&n)return a;for(let l=o+(i>>1);o<l;o++)if(r[o]==e)return a;if(s)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let o=this.stateSlot(e,r?2:1),i;;o+=3){if((i=n[o])==65535)if(n[o+1]==1)i=n[o=_i(n,o+2)];else if(n[o+1]==2)return _i(n,o+2);else break;if(i==t||i==0)return _i(n,o+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,(n)=>n==t?!0:null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let o=this.stateSlot(e,1);r==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=_i(this.data,o+2);else break;r=t(_i(this.data,o+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535)if(this.data[n+1]==1)n=_i(this.data,n+2);else break;if((this.data[n+2]&1)==0){let r=this.data[n+1];if(!t.some((o,i)=>i&1&&o==r))t.push(this.data[n],r)}}return t}configure(e){let t=Object.assign(Object.create(Ni.prototype),this);if(e.props)t.nodeSet=this.nodeSet.extend(...e.props);if(e.top){let n=this.topRules[e.top];if(!n)throw RangeError(`Invalid top rule name ${e.top}`);t.top=n}if(e.tokenizers)t.tokenizers=this.tokenizers.map((n)=>{let r=e.tokenizers.find((o)=>o.from==n);return r?r.to:n});if(e.specializers)t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let o=e.specializers.find((s)=>s.from==n.external);if(!o)return n;let i=Object.assign(Object.assign({},n),{external:o.to});return t.specializers[r]=F5(i),i});if(e.contextTracker)t.context=e.contextTracker;if(e.dialect)t.dialect=this.parseDialect(e.dialect);if(e.strict!=null)t.strict=e.strict;if(e.wrap)t.wrappers=t.wrappers.concat(e.wrap);if(e.bufferLength!=null)t.bufferLength=e.bufferLength;return t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let o of e.split(" ")){let i=t.indexOf(o);if(i>=0)n[i]=!0}let r=null;for(let o=0;o<t.length;o++)if(!n[o])for(let i=this.dialects[t[o]],s;(s=this.data[i++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[s]=1;return new oD(e,n,r)}static deserialize(e){return new Ni(e)}}function _i(e,t){return e[t]|e[t+1]<<16}function kY(e){let t=null;for(let n of e){let r=n.p.stoppedAt;if((n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score))t=n}return t}function F5(e){if(e.external){let t=e.extend?1:0;return(n,r)=>e.external(n,r)<<1|t}return e.get}var CY=55,RY=1,PY=56,TY=2,AY=57,QY=3,iD=4,EY=5,sw=6,hD=7,pD=8,mD=9,gD=10,MY=11,$Y=12,DY=13,nw=58,_Y=14,NY=15,sD=59,OD=21,LY=23,bD=24,zY=25,ow=27,yD=28,jY=29,IY=32,XY=35,BY=37,ZY=38,UY=0,YY=1,VY={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},qY={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},aD={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function GY(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}var lD=null,cD=null,uD=0;function iw(e,t){let n=e.pos+t;if(uD==n&&cD==e)return lD;let r=e.peek(t),o="";for(;;){if(!GY(r))break;o+=String.fromCharCode(r),r=e.peek(++t)}return cD=e,uD=n,lD=o?o.toLowerCase():r==HY||r==WY?void 0:null}var vD=60,Jg=62,aw=47,HY=63,WY=33,FY=45;function fD(e,t){this.name=e,this.parent=t}var KY=[sw,gD,hD,pD,mD],JY=new ah({start:null,shift(e,t,n,r){return KY.indexOf(t)>-1?new fD(iw(r,1)||"",e):e},reduce(e,t){return t==OD&&e?e.parent:e},reuse(e,t,n,r){let o=t.type.id;return o==sw||o==BY?new fD(iw(r,1)||"",e):e},strict:!1}),eV=new dn((e,t)=>{if(e.next!=vD){if(e.next<0&&t.context)e.acceptToken(nw);return}e.advance();let n=e.next==aw;if(n)e.advance();let r=iw(e,0);if(r===void 0)return;if(!r)return e.acceptToken(n?NY:_Y);let o=t.context?t.context.name:null;if(n){if(r==o)return e.acceptToken(MY);if(o&&qY[o])return e.acceptToken(nw,-2);if(t.dialectEnabled(UY))return e.acceptToken($Y);for(let i=t.context;i;i=i.parent)if(i.name==r)return;e.acceptToken(DY)}else{if(r=="script")return e.acceptToken(hD);if(r=="style")return e.acceptToken(pD);if(r=="textarea")return e.acceptToken(mD);if(VY.hasOwnProperty(r))return e.acceptToken(gD);if(o&&aD[o]&&aD[o][r])e.acceptToken(nw,-1);else e.acceptToken(sw)}},{contextual:!0}),tV=new dn((e)=>{for(let t=0,n=0;;n++){if(e.next<0){if(n)e.acceptToken(sD);break}if(e.next==FY)t++;else if(e.next==Jg&&t>=2){if(n>=3)e.acceptToken(sD,-2);break}else t=0;e.advance()}});function nV(e){for(;e;e=e.parent)if(e.name=="svg"||e.name=="math")return!0;return!1}var rV=new dn((e,t)=>{if(e.next==aw&&e.peek(1)==Jg){let n=t.dialectEnabled(YY)||nV(t.context);e.acceptToken(n?EY:iD,2)}else if(e.next==Jg)e.acceptToken(iD,1)});function lw(e,t,n){let r=2+e.length;return new dn((o)=>{for(let i=0,s=0,a=0;;a++){if(o.next<0){if(a)o.acceptToken(t);break}if(i==0&&o.next==vD||i==1&&o.next==aw||i>=2&&i<r&&o.next==e.charCodeAt(i-2))i++,s++;else if(i==r&&o.next==Jg){if(a>s)o.acceptToken(t,-s);else o.acceptToken(n,-(s-2));break}else if((o.next==10||o.next==13)&&a){o.acceptToken(t,1);break}else i=s=0;o.advance()}})}var oV=lw("script",CY,RY),iV=lw("style",PY,TY),sV=lw("textarea",AY,QY),aV=lo({"Text RawText IncompleteTag IncompleteCloseTag":C.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":C.angleBracket,TagName:C.tagName,"MismatchedCloseTag/TagName":[C.tagName,C.invalid],AttributeName:C.attributeName,"AttributeValue UnquotedAttributeValue":C.attributeValue,Is:C.definitionOperator,"EntityReference CharacterReference":C.character,Comment:C.blockComment,ProcessingInst:C.processingInstruction,DoctypeDecl:C.documentMeta}),xD=Ni.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,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OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:JY,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[aV],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({WaP!b`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!b`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!b`!dp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TO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[oV,iV,sV,rV,eV,tV,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function wD(e,t){let n=Object.create(null);for(let r of e.getChildren(bD)){let o=r.getChild(zY),i=r.getChild(ow)||r.getChild(yD);if(o)n[t.read(o.from,o.to)]=!i?"":i.type.id==ow?t.read(i.from+1,i.to-1):t.read(i.from,i.to)}return n}function dD(e,t){let n=e.getChild(LY);return n?t.read(n.from,n.to):" "}function rw(e,t,n){let r;for(let o of n)if(!o.attrs||o.attrs(r||(r=wD(e.node.parent.firstChild,t))))return{parser:o.parser,bracketed:!0};return null}function cw(e=[],t=[]){let n=[],r=[],o=[],i=[];for(let a of e)(a.tag=="script"?n:a.tag=="style"?r:a.tag=="textarea"?o:i).push(a);let s=t.length?Object.create(null):null;for(let a of t)(s[a.name]||(s[a.name]=[])).push(a);return Qg((a,l)=>{let c=a.type.id;if(c==jY)return rw(a,l,n);if(c==IY)return rw(a,l,r);if(c==XY)return rw(a,l,o);if(c==OD&&i.length){let u=a.node,f=u.firstChild,d=f&&dD(f,l),h;if(d){for(let m of i)if(m.tag==d&&(!m.attrs||m.attrs(h||(h=wD(f,l))))){let g=u.lastChild,b=g.type.id==ZY?g.from:u.to;if(b>f.to)return{parser:m.parser,overlay:[{from:f.to,to:b}]}}}}if(s&&c==bD){let u=a.node,f;if(f=u.firstChild){let d=s[l.read(f.from,f.to)];if(d)for(let h of d){if(h.tagName&&h.tagName!=dD(u.parent,l))continue;let m=u.lastChild;if(m.type.id==ow){let g=m.from+1,b=m.lastChild,O=m.to-(b&&b.isError?0:1);if(O>g)return{parser:h.parser,overlay:[{from:g,to:O}],bracketed:!0}}else if(m.type.id==yD)return{parser:h.parser,overlay:[{from:m.from,to:m.to}]}}}}return null})}var lV=148,SD=1,cV=149,uV=150,RD=2,fV=151,dV=3,hV=4,pV=152,PD=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],mV=58,gV=40,TD=95,OV=91,eO=45,bV=46,yV=35,vV=37,xV=38,wV=92,SV=10,kV=42;function lh(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}function uw(e){return e>=48&&e<=57}function kD(e){return uw(e)||e>=97&&e<=102||e>=65&&e<=70}var AD=(e,t,n)=>(r,o)=>{for(let i=!1,s=0,a=0;;a++){let{next:l}=r;if(lh(l)||l==eO||l==TD||i&&uw(l)){if(!i&&(l!=eO||a>0))i=!0;if(s===a&&l==eO)s++;r.advance()}else if(l==wV&&r.peek(1)!=SV){if(r.advance(),kD(r.next)){do r.advance();while(kD(r.next));if(r.next==32)r.advance()}else if(r.next>-1)r.advance();i=!0}else{if(i)r.acceptToken(s>=2&&o.canShift(RD)?t:l==gV?n:e);break}}},CV=new dn(AD(cV,RD,uV),{contextual:!0}),RV=new dn(AD(fV,dV,hV),{contextual:!0}),PV=new dn((e)=>{if(PD.includes(e.peek(-1))){let{next:t}=e;if(lh(t)||t==TD||t==yV||t==bV||t==kV||t==OV||t==mV&&lh(e.peek(1))||t==eO||t==xV)e.acceptToken(lV)}}),TV=new dn((e)=>{if(!PD.includes(e.peek(-1))){let{next:t}=e;if(t==vV)e.advance(),e.acceptToken(SD);if(lh(t)){do e.advance();while(lh(e.next)||uw(e.next));e.acceptToken(SD)}}});function CD(e){return/^#[a-f\d]{3}([a-f\d]{3}([a-f\d]{2})?)?$/i.test(e)?pV:-1}var AV=lo({"AtKeyword import charset namespace keyframes media supports font-feature-values":C.definitionKeyword,"from to selector scope MatchFlag":C.keyword,NamespaceName:C.namespace,KeyframeName:C.labelName,KeyframeRangeName:C.operatorKeyword,TagName:C.tagName,ClassName:C.className,PseudoClassName:C.constant(C.className),IdName:C.labelName,"FeatureName PropertyName":C.propertyName,AttributeName:C.attributeName,NumberLiteral:C.number,KeywordQuery:C.keyword,UnaryQueryOp:C.operatorKeyword,"CallTag ValueName FontName":C.atom,VariableName:C.variableName,Callee:C.operatorKeyword,Unit:C.unit,"UniversalSelector NestingSelector":C.definitionOperator,"MatchOp CompareOp":C.compareOperator,"ChildOp SiblingOp, LogicOp":C.logicOperator,BinOp:C.arithmeticOperator,Important:C.modifier,Comment:C.blockComment,ColorLiteral:C.color,"ParenthesizedContent StringLiteral":C.string,":":C.punctuation,PseudoOp:C.derefOperator,"; , |":C.separator,"( )":C.paren,"[ ]":C.squareBracket,"{ }":C.brace}),QV={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:88,url:158,"url-prefix":158,domain:158,regexp:158},EV={__proto__:null,or:102,and:102,not:112,only:112,layer:212},MV={__proto__:null,selector:118,style:124,layer:208},$V={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},DV={__proto__:null,to:249},QD=Ni.deserialize({version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amespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery ColorLiteral CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList PropertyName , PropertyName UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature PropertyName StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:176,nodeProps:[["isolate",-2,5,38,""],["openedBy",23,"(",30,"[",33,"{"],["closedBy",24,")",31,"]",34,"}"]],propSources:[AV],skippedNodes:[0,5,130],repeatNodeCount:17,tokenData:"IO~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu/wuv%Zvw0qwx1Sxy2qyz3Sz{3X{|3r|}8e}!O8v!O!P9e!P!Q9|!Q![:u![!];p!]!^<l!^!_<}!_!`=y!`!a>^!a!b%Z!b!c?_!c!k%Z!k!lAl!l!u%Z!u!vAl!v!}%Z!}#OA}#O#P%Z#P#QB`#Q#R/w#R#]%Z#]#^Bq#^#g%Z#g#hAl#h#o%Z#o#pGU#p#qGg#q#rHO#r#sHa#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY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jjGZSrYOy%jz;'S%j;'S;=`%{<%lO%jfGlU$gUOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%jjHTSqYOy%jz;'S%j;'S;=`%{<%lO%jfHfU#SQOy%jz!_%j!_!`0^!`;'S%j;'S;=`%{<%lO%j`H{P;=`<%l%Z",tokenizers:[PV,TV,CV,RV,1,2,3,4,new al("m~RRYZ[z{a~~g~aO$c~~dP!P!Qg~lO$d~~",28,156)],topRules:{StyleSheet:[0,6],Styles:[1,129]},dynamicPrecedences:{"97":1},specialized:[{term:172,get:(e,t)=>CD(e)<<1,external:CD},{term:150,get:(e)=>QV[e]||-1},{term:151,get:(e)=>EV[e]||-1},{term:4,get:(e)=>MV[e]||-1},{term:28,get:(e)=>$V[e]||-1},{term:149,get:(e)=>DV[e]||-1}],tokenPrec:2433});var fw=null;function dw(){if(!fw&&typeof document=="object"&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)if(r!="cssText"&&r!="cssFloat"){if(typeof e[r]=="string"){if(/[A-Z]/.test(r))r=r.replace(/[A-Z]/g,(o)=>"-"+o.toLowerCase());if(!n.has(r))t.push(r),n.add(r)}}fw=t.sort().map((r)=>({type:"property",label:r,apply:r+": "}))}return fw||[]}var ED=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map((e)=>({type:"class",label:e})),MD=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map((e)=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map((e)=>({type:"constant",label:e}))),_V=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map((e)=>({type:"type",label:e})),NV=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map((e)=>({type:"keyword",label:e})),Li=/^(\w[\w-]*|-\w[\w-]*|)$/,LV=/^-(-[\w-]*)?$/;function zV(e,t){var n;if(e.name=="("||e.type.isError)e=e.parent||e;if(e.name!="ArgList")return!1;let r=(n=e.parent)===null||n===void 0?void 0:n.firstChild;if((r===null||r===void 0?void 0:r.name)!="Callee")return!1;return t.sliceString(r.from,r.to)=="var"}var $D=new Id,jV=["Declaration"];function IV(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function DD(e,t,n){if(t.to-t.from>4096){let r=$D.get(t);if(r)return r;let o=[],i=new Set,s=t.cursor(je.IncludeAnonymous);if(s.firstChild())do for(let a of DD(e,s.node,n))if(!i.has(a.label))i.add(a.label),o.push(a);while(s.nextSibling());return $D.set(t,o),o}else{let r=[],o=new Set;return t.cursor().iterate((i)=>{var s;if(n(i)&&i.matchContext(jV)&&((s=i.node.nextSibling)===null||s===void 0?void 0:s.name)==":"){let a=e.sliceString(i.from,i.to);if(!o.has(a))o.add(a),r.push({label:a,type:"variable"})}}),r}}var XV=(e)=>(t)=>{let{state:n,pos:r}=t,o=Ie(n).resolveInner(r,-1),i=o.type.isError&&o.from==o.to-1&&n.doc.sliceString(o.from,o.to)=="-";if(o.name=="PropertyName"||(i||o.name=="TagName")&&/^(Block|Styles)$/.test(o.resolve(o.to).name))return{from:o.from,options:dw(),validFor:Li};if(o.name=="ValueName")return{from:o.from,options:MD,validFor:Li};if(o.name=="PseudoClassName")return{from:o.from,options:ED,validFor:Li};if(e(o)||(t.explicit||i)&&zV(o,n.doc))return{from:e(o)||i?o.from:r,options:DD(n.doc,IV(o),e),validFor:LV};if(o.name=="TagName"){for(let{parent:l}=o;l;l=l.parent)if(l.name=="Block")return{from:o.from,options:dw(),validFor:Li};return{from:o.from,options:_V,validFor:Li}}if(o.name=="AtKeyword")return{from:o.from,options:NV,validFor:Li};if(!t.explicit)return null;let s=o.resolve(r),a=s.childBefore(r);if(a&&a.name==":"&&s.name=="PseudoClassSelector")return{from:r,options:ED,validFor:Li};if(a&&a.name==":"&&s.name=="Declaration"||s.name=="ArgList")return{from:r,options:MD,validFor:Li};if(s.name=="Block"||s.name=="Styles")return{from:r,options:dw(),validFor:Li};return null},BV=XV((e)=>e.name=="VariableName"),ch=Mi.define({name:"css",parser:QD.configure({props:[$i.add({Declaration:Ou()}),Di.add({"Block KeyframeList":Ng})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function _D(){return new Yo(ch,ch.data.of({autocomplete:BV}))}var ZV=317,UV=318,ND=1,YV=2,VV=3,qV=4,GV=319,HV=321,WV=322,FV=5,KV=6,JV=0,pw=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],LD=125,eq=59,mw=47,tq=42,nq=43,rq=45,oq=60,iq=44,sq=63,aq=46,lq=91,cq=new ah({start:!1,shift(e,t){return t==FV||t==KV||t==HV?e:t==WV},strict:!1}),uq=new dn((e,t)=>{let{next:n}=e;if(n==LD||n==-1||t.context)e.acceptToken(GV)},{contextual:!0,fallback:!0}),fq=new dn((e,t)=>{let{next:n}=e,r;if(pw.indexOf(n)>-1)return;if(n==mw&&((r=e.peek(1))==mw||r==tq))return;if(n!=LD&&n!=eq&&n!=-1&&!t.context)e.acceptToken(ZV)},{contextual:!0}),dq=new dn((e,t)=>{if(e.next==lq&&!t.context)e.acceptToken(UV)},{contextual:!0}),hq=new dn((e,t)=>{let{next:n}=e;if(n==nq||n==rq){if(e.advance(),n==e.next){e.advance();let r=!t.context&&t.canShift(ND);e.acceptToken(r?ND:YV)}}else if(n==sq&&e.peek(1)==aq){if(e.advance(),e.advance(),e.next<48||e.next>57)e.acceptToken(VV)}},{contextual:!0});function hw(e,t){return e>=65&&e<=90||e>=97&&e<=122||e==95||e>=192||!t&&e>=48&&e<=57}var pq=new dn((e,t)=>{if(e.next!=oq||!t.dialectEnabled(JV))return;if(e.advance(),e.next==mw)return;let n=0;while(pw.indexOf(e.next)>-1)e.advance(),n++;if(hw(e.next,!0)){e.advance(),n++;while(hw(e.next,!1))e.advance(),n++;while(pw.indexOf(e.next)>-1)e.advance(),n++;if(e.next==iq)return;for(let r=0;;r++){if(r==7){if(!hw(e.next,!0))return;break}if(e.next!="extends".charCodeAt(r))break;e.advance(),n++}}e.acceptToken(qV,-n)}),mq=lo({"get set async static":C.modifier,"for while do if else switch try catch finally return throw break continue default case defer":C.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":C.operatorKeyword,"let var const using function class extends":C.definitionKeyword,"import export from":C.moduleKeyword,"with debugger new":C.keyword,TemplateString:C.special(C.string),super:C.atom,BooleanLiteral:C.bool,this:C.self,null:C.null,Star:C.modifier,VariableName:C.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":C.function(C.variableName),VariableDefinition:C.definition(C.variableName),Label:C.labelName,PropertyName:C.propertyName,PrivatePropertyName:C.special(C.propertyName),"CallExpression/MemberExpression/PropertyName":C.function(C.propertyName),"FunctionDeclaration/VariableDefinition":C.function(C.definition(C.variableName)),"ClassDeclaration/VariableDefinition":C.definition(C.className),"NewExpression/VariableName":C.className,PropertyDefinition:C.definition(C.propertyName),PrivatePropertyDefinition:C.definition(C.special(C.propertyName)),UpdateOp:C.updateOperator,"LineComment Hashbang":C.lineComment,BlockComment:C.blockComment,Number:C.number,String:C.string,Escape:C.escape,ArithOp:C.arithmeticOperator,LogicOp:C.logicOperator,BitOp:C.bitwiseOperator,CompareOp:C.compareOperator,RegExp:C.regexp,Equals:C.definitionOperator,Arrow:C.function(C.punctuation),": Spread":C.punctuation,"( )":C.paren,"[ ]":C.squareBracket,"{ }":C.brace,"InterpolationStart InterpolationEnd":C.special(C.brace),".":C.derefOperator,", ;":C.separator,"@":C.meta,TypeName:C.typeName,TypeDefinition:C.definition(C.typeName),"type enum interface implements namespace module declare":C.definitionKeyword,"abstract global Privacy readonly override":C.modifier,"is keyof unique infer asserts":C.operatorKeyword,JSXAttributeValue:C.attributeValue,JSXText:C.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":C.angleBracket,"JSXIdentifier JSXNameSpacedName":C.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":C.attributeName,"JSXBuiltin/JSXIdentifier":C.standard(C.tagName)}),gq={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:237,private:237,protected:237,readonly:239,instanceof:258,satisfies:261,import:294,keyof:351,unique:355,infer:361,asserts:397,is:399,abstract:419,implements:421,type:423,let:426,var:428,using:431,interface:437,enum:441,namespace:447,module:449,declare:453,global:457,defer:473,for:478,of:487,while:490,with:494,do:498,if:502,else:504,switch:508,case:514,try:520,catch:524,finally:528,return:532,throw:536,break:540,continue:544,debugger:548},Oq={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:403},bq={__proto__:null,"<":193},zD=Ni.deserialize({version:14,states:"$FvQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Im'#ImO1XQ`O'#GtO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JsO6[Q!0MxO'#JtO6uQ`O'#F^O6zQ,UO'#FuOOQ!0Lf'#Fg'#FgO7VO7dO'#FgO9XQMhO'#F}O9`Q`O'#F|OOQ!0Lf'#Jt'#JtOOQ!0Lb'#Js'#JsO9eQ`O'#GxOOQ['#K`'#K`O9pQ`O'#IZO9uQ!0LrO'#I[OOQ['#Ja'#JaOOQ['#I`'#I`Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GtO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EzO;hQMhO'#FfO;xQ`O'#GtOOQO'#Ka'#KaO;}Q`O'#KaO<]Q`O'#G|O<]Q`O'#G}O<]Q`O'#HPO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R)g$dY!uQ'a-f1p5{Q'l!rS'v!v!yS'x!z5}S-u'm'nQ-w'oR3T-vT#kZ%eS#jZ%eS%km,qU(h#h#i#lS.Z(i(jQ._(kQ0u+`Q3Y.[U3Z.].^.`S7S3[3]R9`7Td#^W#W#Z%h(U(_*Z+[.U/nr#gZm#h#i#l%e(i(j(k+`.[.].^.`3[3]7TS*^$x*cQ/u*_Q2V,qQ2l-WQ4`/qQ6q2eQ7s4aQ9W6rT=l'X+^V#aW%h*ZU#`W%h*ZS(V#W(_U([#Z+[/nS-]'X+^T.P(U.UV'_!e%i*[Q$lfR)y$qT)n$l)oR4V/VT*`$x*cT*i${*ZQ0x+hQ1h,XQ3_.gQ5t1jQ6P1rQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,u,z2]2`Q&l!VR,j&itmOXst!U!V!Z#d%m&i&r&t&u&w,u,z2]2`R,q&oT%lm,qR1l,ZR,i&gQ&U|S,P&V&WR1_,QR+u&PT&p!W&sT&q!W&sT2_,z2`",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty VariableDefinition Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:381,context:cq,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,208,212,216,217,219,222,225,235,238,244,246,248,250,253,259,265,267,269,271,273,275,276,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,121,122,137,140,142,143,144,145,146,148,149,168,170,172,"Expression",-23,31,33,37,41,43,45,174,176,178,179,181,182,183,185,186,187,189,190,191,202,204,206,207,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",161,"JSXStartCloseTag"],["closedBy",-2,24,169,">",40,"InterpolationEnd",50,"]",61,"}",74,")",166,"JSXEndTag"]],propSources:[mq],skippedNodes:[0,5,6,279],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$j&j(Xp([!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$j&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$j&j([!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU([!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$j&j(XpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&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(R~~aP!P!Qd~iO(S~~",25,324)],topRules:{Script:[0,7],SingleExpression:[1,277],SingleClassItem:[2,278]},dialects:{jsx:0,ts:15152},dynamicPrecedences:{"80":1,"82":1,"94":1,"170":1,"200":1},specialized:[{term:328,get:(e)=>gq[e]||-1},{term:344,get:(e)=>Oq[e]||-1},{term:95,get:(e)=>bq[e]||-1}],tokenPrec:15178});var BD=[Dn("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),Dn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),Dn("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Dn("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Dn("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),Dn(`try {
25
+ \${}
26
+ } catch (\${error}) {
27
+ \${}
28
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),Dn("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),Dn(`if (\${}) {
29
+ \${}
30
+ } else {
31
+ \${}
32
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),Dn(`class \${name} {
33
+ constructor(\${params}) {
34
+ \${}
35
+ }
36
+ }`,{label:"class",detail:"definition",type:"keyword"}),Dn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Dn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],yq=BD.concat([Dn("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Dn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Dn("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),jD=new Id,ZD=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function uh(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");if(r)n(r,e);return!0}}var vq=["FunctionDeclaration"],xq={FunctionDeclaration:uh("function"),ClassDeclaration:uh("class"),ClassExpression:()=>!0,EnumDeclaration:uh("constant"),TypeAliasDeclaration:uh("type"),NamespaceDeclaration:uh("namespace"),VariableDefinition(e,t){if(!e.matchContext(vq))t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function UD(e,t){let n=jD.get(t);if(n)return n;let r=[],o=!0;function i(s,a){let l=e.sliceString(s.from,s.to);r.push({label:l,type:a})}return t.cursor(je.IncludeAnonymous).iterate((s)=>{if(o)o=!1;else if(s.name){let a=xq[s.name];if(a&&a(s,i)||ZD.has(s.name))return!1}else if(s.to-s.from>8192){for(let a of UD(e,s.node))r.push(a);return!1}}),jD.set(t,r),r}var ID=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,YD=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function wq(e){let t=Ie(e.state).resolveInner(e.pos,-1);if(YD.indexOf(t.name)>-1)return null;let n=t.name=="VariableName"||t.to-t.from<20&&ID.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let o=t;o;o=o.parent)if(ZD.has(o.name))r=r.concat(UD(e.state.doc,o));return{options:r,from:n?t.from:e.pos,validFor:ID}}var fo=Mi.define({name:"javascript",parser:zD.configure({props:[$i.add({IfStatement:Ou({except:/^\s*({|else\b)/}),TryStatement:Ou({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:ZM,SwitchBody:(e)=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:XM({closing:"}"}),ArrowFunction:(e)=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":Ou({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Di.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Ng,BlockComment(e){return{from:e.from+2,to:e.to-2}},JSXElement(e){let t=e.firstChild;if(!t||t.name=="JSXSelfClosingTag")return null;let n=e.lastChild;return{from:t.to,to:n.type.isError?e.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(e){var t;let n=(t=e.firstChild)===null||t===void 0?void 0:t.nextSibling,r=e.lastChild;if(!n||n.type.isError)return null;return{from:n.to,to:r.type.isError?e.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),VD={test:(e)=>/^JSX/.test(e.name),facet:Zd({commentTokens:{block:{open:"{/*",close:"*/}"}}})},gw=fo.configure({dialect:"ts"},"typescript"),Ow=fo.configure({dialect:"jsx",props:[_g.add((e)=>e.isTop?[VD]:void 0)]}),bw=fo.configure({dialect:"jsx ts",props:[_g.add((e)=>e.isTop?[VD]:void 0)]},"typescript"),qD=(e)=>({label:e,type:"keyword"}),GD="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(qD),Sq=GD.concat(["declare","implements","private","protected","public"].map(qD));function HD(e={}){let t=e.jsx?e.typescript?bw:Ow:e.typescript?gw:fo,n=e.typescript?yq.concat(Sq):BD.concat(GD);return new Yo(t,[fo.data.of({autocomplete:Y$(YD,$x(n))}),fo.data.of({autocomplete:wq}),e.jsx?Rq:[]])}function kq(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(e.name=="JSXEscape"||!e.parent)return null;e=e.parent}}function XD(e,t,n=e.length){for(let r=t===null||t===void 0?void 0:t.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return e.sliceString(r.from,Math.min(r.to,n));return""}var Cq=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Rq=re.inputHandler.of((e,t,n,r,o)=>{if((Cq?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||r!=">"&&r!="/"||!fo.isActiveAt(e.state,t,-1))return!1;let i=o(),{state:s}=i,a=s.changeByRange((l)=>{var c;let{head:u}=l,f=Ie(s).resolveInner(u-1,-1),d;if(f.name=="JSXStartTag")f=f.parent;if(s.doc.sliceString(u-1,u)!=r||f.name=="JSXAttributeValue"&&f.to>u);else if(r==">"&&f.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:"</>"}};else if(r=="/"&&f.name=="JSXStartCloseTag"){let h=f.parent,m=h.parent;if(m&&h.from==u-2&&((d=XD(s.doc,m.firstChild,u))||((c=m.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let g=`${d}>`;return{range:j.cursor(u+g.length,-1),changes:{from:u,insert:g}}}}else if(r==">"){let h=kq(f);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(s.doc.sliceString(u,u+2))&&(d=XD(s.doc,h,u)))return{range:l,changes:{from:u,insert:`</${d}>`}}}return{range:l}});if(a.changes.empty)return!1;return e.dispatch([i,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0});var fh=["_blank","_self","_top","_parent"],yw=["ascii","utf-8","utf-16","latin1","latin1"],vw=["get","post","put","delete"],xw=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Or=["true","false"],de={},Pq={a:{attrs:{href:null,ping:null,type:null,media:null,target:fh,hreflang:null}},abbr:de,address:de,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:de,aside:de,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:de,base:{attrs:{href:null,target:fh}},bdi:de,bdo:de,blockquote:{attrs:{cite:null}},body:de,br:de,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:xw,formmethod:vw,formnovalidate:["novalidate"],formtarget:fh,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:de,center:de,cite:de,code:de,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:de,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:de,div:de,dl:de,dt:de,em:de,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:de,figure:de,footer:de,form:{attrs:{action:null,name:null,"accept-charset":yw,autocomplete:["on","off"],enctype:xw,method:vw,novalidate:["novalidate"],target:fh}},h1:de,h2:de,h3:de,h4:de,h5:de,h6:de,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:de,hgroup:de,hr:de,html:{attrs:{manifest:null}},i:de,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:xw,formmethod:vw,formnovalidate:["novalidate"],formtarget:fh,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:de,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:de,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:de,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:yw,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:de,noscript:de,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:de,param:{attrs:{name:null,value:null}},pre:de,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:de,rt:de,ruby:de,samp:de,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:yw}},section:de,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:de,source:{attrs:{src:null,type:null,media:null}},span:de,strong:de,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:de,summary:de,sup:de,table:de,tbody:de,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:de,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:de,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:de,time:{attrs:{datetime:null}},title:de,tr:de,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:de,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:de},JD={accesskey:null,class:null,contenteditable:Or,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Or,autocorrect:Or,autocapitalize:Or,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Or,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Or,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Or,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Or,"aria-hidden":Or,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Or,"aria-multiselectable":Or,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Or,"aria-relevant":null,"aria-required":Or,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},e_="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((e)=>"on"+e);for(let e of e_)JD[e]=null;class Cu{constructor(e,t){this.tags={...Pq,...e},this.globalAttrs={...JD,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Cu.default=new Cu;function ll(e,t,n=e.length){if(!t)return"";let r=t.firstChild,o=r&&r.getChild("TagName");return o?e.sliceString(o.from,Math.min(o.to,n)):""}function Ru(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function t_(e,t,n){let r=n.tags[ll(e,Ru(t))];return(r===null||r===void 0?void 0:r.children)||n.allTags}function ww(e,t){let n=[];for(let r=Ru(t);r&&!r.type.isTop;r=Ru(r.parent)){let o=ll(e,r);if(o&&r.lastChild.name=="CloseTag")break;if(o&&n.indexOf(o)<0&&(t.name=="EndTag"||t.from>=r.firstChild.to))n.push(o)}return n}var n_=/^[:\-\.\w\u00b7-\uffff]*$/;function WD(e,t,n,r,o){let i=/\s*>/.test(e.sliceDoc(o,o+5))?"":">",s=Ru(n,n.name=="StartTag"||n.name=="TagName");return{from:r,to:o,options:t_(e.doc,s,t).map((a)=>({label:a,type:"type"})).concat(ww(e.doc,n).map((a,l)=>({label:"/"+a,apply:"/"+a+i,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function FD(e,t,n,r){let o=/\s*>/.test(e.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:ww(e.doc,t).map((i,s)=>({label:i,apply:i+o,type:"type",boost:99-s})),validFor:n_}}function Tq(e,t,n,r){let o=[],i=0;for(let s of t_(e.doc,n,t))o.push({label:"<"+s,type:"type"});for(let s of ww(e.doc,n))o.push({label:"</"+s+">",type:"type",boost:99-i++});return{from:r,to:r,options:o,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Aq(e,t,n,r,o){let i=Ru(n),s=i?t.tags[ll(e.doc,i)]:null,a=s&&s.attrs?Object.keys(s.attrs):[],l=s&&s.globalAttrs===!1?a:a.length?a.concat(t.globalAttrNames):t.globalAttrNames;return{from:r,to:o,options:l.map((c)=>({label:c,type:"property"})),validFor:n_}}function Qq(e,t,n,r,o){var i;let s=(i=n.parent)===null||i===void 0?void 0:i.getChild("AttributeName"),a=[],l=void 0;if(s){let c=e.sliceDoc(s.from,s.to),u=t.globalAttrs[c];if(!u){let f=Ru(n),d=f?t.tags[ll(e.doc,f)]:null;u=(d===null||d===void 0?void 0:d.attrs)&&d.attrs[c]}if(u){let f=e.sliceDoc(r,o).toLowerCase(),d='"',h='"';if(/^['"]/.test(f))l=f[0]=='"'?/^[^"]*$/:/^[^']*$/,d="",h=e.sliceDoc(o,o+1)==f[0]?"":f[0],f=f.slice(1),r++;else l=/^[^\s<>='"]*$/;for(let m of u)a.push({label:m,apply:d+m+h,type:"constant"})}}return{from:r,to:o,options:a,validFor:l}}function r_(e,t){let{state:n,pos:r}=t,o=Ie(n).resolveInner(r,-1),i=o.resolve(r);for(let s=r,a;i==o&&(a=o.childBefore(s));){let l=a.lastChild;if(!l||!l.type.isError||l.from<l.to)break;i=o=a,s=l.from}if(o.name=="TagName")return o.parent&&/CloseTag$/.test(o.parent.name)?FD(n,o,o.from,r):WD(n,e,o,o.from,r);else if(o.name=="StartTag"||o.name=="IncompleteTag")return WD(n,e,o,r,r);else if(o.name=="StartCloseTag"||o.name=="IncompleteCloseTag")return FD(n,o,r,r);else if(o.name=="OpenTag"||o.name=="SelfClosingTag"||o.name=="AttributeName")return Aq(n,e,o,o.name=="AttributeName"?o.from:r,r);else if(o.name=="Is"||o.name=="AttributeValue"||o.name=="UnquotedAttributeValue")return Qq(n,e,o,o.name=="Is"?r:o.from,r);else if(t.explicit&&(i.name=="Element"||i.name=="Text"||i.name=="Document"))return Tq(n,e,o,r);else return null}function o_(e){return r_(Cu.default,e)}function Eq(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new Cu(t,n):Cu.default;return(o)=>r_(r,o)}var Mq=fo.parser.configure({top:"SingleExpression"}),i_=[{tag:"script",attrs:(e)=>e.type=="text/typescript"||e.lang=="ts",parser:gw.parser},{tag:"script",attrs:(e)=>e.type=="text/babel"||e.type=="text/jsx",parser:Ow.parser},{tag:"script",attrs:(e)=>e.type=="text/typescript-jsx",parser:bw.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:Mq},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:fo.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:ch.parser}],s_=[{name:"style",parser:ch.parser.configure({top:"Styles"})}].concat(e_.map((e)=>({name:e,parser:fo.parser}))),a_=Mi.define({name:"html",parser:xD.configure({props:[$i.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);if(e.node.to<=e.pos+t[0].length)return e.continue();return e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,n;for(let r=e.node;;){let o=r.lastChild;if(!o||o.name!="Element"||o.to!=r.to)break;t=r=o}if(t&&!((n=t.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag")))return e.lineIndent(t.from)+e.unit;return null}}),Di.add({Element(e){let{firstChild:t,lastChild:n}=e;if(!t||t.name!="OpenTag")return null;return{from:t.to,to:n.name=="CloseTag"?n.from:e.to}}}),wx.add({"OpenTag CloseTag":(e)=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),tO=a_.configure({wrap:cw(i_,s_)});function l_(e={}){let t="",n;if(e.matchClosingTags===!1)t="noMatch";if(e.selfClosingTags===!0)t=(t?t+" ":"")+"selfClosing";if(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)n=cw((e.nestedLanguages||[]).concat(i_),(e.nestedAttributes||[]).concat(s_));let r=n?a_.configure({wrap:n,dialect:t}):t?tO.configure({dialect:t}):tO;return new Yo(r,[tO.data.of({autocomplete:Eq(e)}),e.autoCloseTags!==!1?Dq:[],HD().support,_D().support])}var KD=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));function $q(e,t,n){var r;for(;;){if(((r=t.lastChild)===null||r===void 0?void 0:r.name)!="CloseTag")return!1;let o=t.parent;if(!o||ll(e,o)!=n)return!0;t=o}}var Dq=re.inputHandler.of((e,t,n,r,o)=>{if(e.composing||e.state.readOnly||t!=n||r!=">"&&r!="/"||!tO.isActiveAt(e.state,t,-1))return!1;let i=o(),{state:s}=i,a=s.changeByRange((l)=>{var c;let u=s.doc.sliceString(l.from-1,l.to)==r,{head:f}=l,d=Ie(s).resolveInner(f,-1),h;if(u&&r==">"&&d.name=="EndTag"){let m=d.parent;if((h=ll(s.doc,m.parent,f))&&!KD.has(h)&&!$q(s.doc,m.parent,h)){let g=f+(s.doc.sliceString(f,f+1)===">"?1:0),b=`</${h}>`;return{range:l,changes:{from:f,to:g,insert:b}}}}else if(u&&r=="/"&&d.name=="IncompleteCloseTag"){let m=d.parent;if(d.from==f-2&&((c=m.lastChild)===null||c===void 0?void 0:c.name)!="CloseTag"&&(h=ll(s.doc,m,f))&&!KD.has(h)){let g=f+(s.doc.sliceString(f,f+1)===">"?1:0),b=`${h}>`;return{range:j.cursor(f+b.length,-1),changes:{from:f,to:g,insert:b}}}}return{range:l}});if(a.changes.empty)return!1;return e.dispatch([i,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0});var f_=Zd({commentTokens:{block:{open:"<!--",close:"-->"}}}),d_=new be,h_=z5.configure({props:[Di.add((e)=>!e.is("Block")||e.is("Document")||Cw(e)!=null||_q(e)?void 0:(t,n)=>({from:n.doc.lineAt(t.from).to,to:t.to})),d_.add(Cw),$i.add({Document:()=>null}),Vs.add({Document:f_})]});function Cw(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function _q(e){return e.name=="OrderedList"||e.name=="BulletList"}function Nq(e,t){let n=e;for(;;){let r=n.nextSibling,o;if(!r||(o=Cw(r.type))!=null&&o<=t)break;n=r}return n.to}var Lq=UM.of((e,t,n)=>{for(let r=Ie(e).resolveInner(n,-1);r;r=r.parent){if(r.from<t)break;let o=r.type.prop(d_);if(o==null)continue;let i=Nq(r,o);if(i>n)return{from:n,to:i}}return null});function Rw(e){return new Vn(f_,e,[],"markdown")}var zq=Rw(h_),jq=h_.configure([B5,Y5,U5,V5,{props:[Di.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),Pu=Rw(jq);function Iq(e,t){return(n)=>{if(n&&e){let r=null;if(n=/\S*/.exec(n)[0],typeof e=="function")r=e(n);else r=Ud.matchLanguageName(e,n,!0);if(r instanceof Ud)return r.support?r.support.language.parser:hu.getSkippingParser(r.load());else if(r)return r.parser}return t?t.parser:null}}class nO{constructor(e,t,n,r,o,i,s){this.node=e,this.from=t,this.to=n,this.spaceBefore=r,this.spaceAfter=o,this.type=i,this.item=s}blank(e,t=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){while(n.length<e)n+=" ";return n}else{for(let r=this.to-this.from-n.length-this.spaceAfter.length;r>0;r--)n+=" ";return n+(t?this.spaceAfter:"")}}marker(e,t){let n=this.node.name=="OrderedList"?String(+m_(this.item,e)[2]+t):"";return this.spaceBefore+n+this.type+this.spaceAfter}}function p_(e,t){let n=[],r=[];for(let o=e;o;o=o.parent){if(o.name=="FencedCode")return r;if(o.name=="ListItem"||o.name=="Blockquote")n.push(o)}for(let o=n.length-1;o>=0;o--){let i=n[o],s,a=t.lineAt(i.from),l=i.from-a.from;if(i.name=="Blockquote"&&(s=/^ *>( ?)/.exec(a.text.slice(l))))r.push(new nO(i,l,l+s[0].length,"",s[1],">",null));else if(i.name=="ListItem"&&i.parent.name=="OrderedList"&&(s=/^( *)\d+([.)])( *)/.exec(a.text.slice(l)))){let c=s[3],u=s[0].length;if(c.length>=4)c=c.slice(0,c.length-4),u-=4;r.push(new nO(i.parent,l,l+u,s[1],c,s[2],i))}else if(i.name=="ListItem"&&i.parent.name=="BulletList"&&(s=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(a.text.slice(l)))){let c=s[4],u=s[0].length;if(c.length>4)c=c.slice(0,c.length-4),u-=4;let f=s[2];if(s[3])f+=s[3].replace(/[xX]/," ");r.push(new nO(i.parent,l,l+u,s[1],c,f,i))}}return r}function m_(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function Sw(e,t,n,r=0){for(let o=-1,i=e;;){if(i.name=="ListItem"){let a=m_(i,t),l=+a[2];if(o>=0){if(l!=o+1)return;n.push({from:i.from+a[1].length,to:i.from+a[0].length,insert:String(o+2+r)})}o=l}let s=i.nextSibling;if(!s)break;i=s}}function Pw(e,t){let n=/^[ \t]*/.exec(e)[0].length;if(!n||t.facet(qs)!="\t")return e;let r=dr(e,4,n),o="";for(let i=r;i>0;)if(i>=4)o+="\t",i-=4;else o+=" ",i--;return o+e.slice(n)}var Xq=(e={})=>({state:t,dispatch:n})=>{let r=Ie(t),{doc:o}=t,i=null,s=t.changeByRange((a)=>{if(!a.empty||!Pu.isActiveAt(t,a.from,-1)&&!Pu.isActiveAt(t,a.from,1))return i={range:a};let l=a.from,c=o.lineAt(l),u=p_(r.resolveInner(l,-1),o);while(u.length&&u[u.length-1].from>l-c.from)u.pop();if(!u.length)return i={range:a};let f=u[u.length-1];if(f.to-f.spaceAfter.length>l-c.from)return i={range:a};let d=l>=f.to-f.spaceAfter.length&&!/\S/.test(c.text.slice(f.to));if(f.item&&d){if(f.item.from<c.from&&!/^[\s>]*$/.test(c.text.slice(0,f.to)))return i={range:a};let O=f.node.firstChild,y=f.node.getChild("ListItem","ListItem");if(O.to>=l||y&&y.to<l||c.from>0&&!/[^\s>]/.test(o.lineAt(c.from-1).text)||e.nonTightLists===!1){let v=u.length>1?u[u.length-2]:null,x,w="";if(v&&v.item)x=c.from+v.from,w=v.marker(o,1);else x=c.from+(v?v.to:0);let S=[{from:x,to:l,insert:w}];if(f.node.name=="OrderedList")Sw(f.item,o,S,-2);if(v&&v.node.name=="OrderedList")Sw(v.item,o,S);return{range:j.cursor(x+w.length),changes:S}}else{let v=u_(u,t,c);return{range:j.cursor(l+v.length+1),changes:{from:c.from,insert:v+t.lineBreak}}}}if(f.node.name=="Blockquote"&&d&&c.from){let O=o.lineAt(c.from-1),y=/>\s*$/.exec(O.text);if(y&&y.index==f.from){let v=t.changes([{from:O.from+y.index,to:O.to},{from:c.from+f.from,to:c.to}]);return{range:a.map(v),changes:v}}}let h=[];if(f.node.name=="OrderedList")Sw(f.item,o,h);let m=f.item&&f.item.from<c.from,g="";if(!m||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=f.to)for(let O=0,y=u.length-1;O<=y;O++)g+=O==y&&!m?u[O].marker(o,1):u[O].blank(O<y?dr(c.text,4,u[O+1].from)-g.length:null);let b=l;while(b>c.from&&/\s/.test(c.text.charAt(b-c.from-1)))b--;if(g=Pw(g,t),Zq(f.node,t.doc))g=u_(u,t,c)+t.lineBreak+g;return h.push({from:b,to:l,insert:t.lineBreak+g}),{range:j.cursor(b+g.length+1),changes:h}});if(i)return!1;return n(t.update(s,{scrollIntoView:!0,userEvent:"input"})),!0},Bq=Xq();function c_(e){return e.name=="QuoteMark"||e.name=="ListMark"}function Zq(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let n=e.firstChild,r=e.getChild("ListItem","ListItem");if(!r)return!1;let o=t.lineAt(n.to),i=t.lineAt(r.from),s=/^[\s>]*$/.test(o.text);return o.number+(s?0:1)<i.number}function u_(e,t,n){let r="";for(let o=0,i=e.length-2;o<=i;o++)r+=e[o].blank(o<i?dr(n.text,4,e[o+1].from)-r.length:null,o<i);return Pw(r,t)}function Uq(e,t){let n=e.resolveInner(t,-1),r=t;if(c_(n))r=n.from,n=n.parent;for(let o;o=n.childBefore(r);)if(c_(o))r=o.from;else if(o.name=="OrderedList"||o.name=="BulletList")n=o.lastChild,r=n.to;else break;return n}var Yq=({state:e,dispatch:t})=>{let n=Ie(e),r=null,o=e.changeByRange((i)=>{let s=i.from,{doc:a}=e;if(i.empty&&Pu.isActiveAt(e,i.from)){let l=a.lineAt(s),c=p_(Uq(n,s),a);if(c.length){let u=c[c.length-1],f=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(s-l.from>f&&!/\S/.test(l.text.slice(f,s-l.from)))return{range:j.cursor(l.from+f),changes:{from:l.from+f,to:s}};if(s-l.from==f&&(u.item&&l.from<=u.item.from||/^[\s>]*$/.test(l.text.slice(0,u.to)))){let d=l.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(l.text.slice(u.from,u.to))){let h=u.blank(dr(l.text,4,u.to)-dr(l.text,4,u.from));if(d==l.from)h=Pw(h,e);return{range:j.cursor(d+h.length),changes:{from:d,to:l.from+u.to,insert:h}}}if(d<s)return{range:j.cursor(d),changes:{from:d,to:s}}}}}return r={range:i}});if(r)return!1;return t(e.update(o,{scrollIntoView:!0,userEvent:"delete"})),!0},Tw=[{key:"Enter",run:Bq},{key:"Backspace",run:Yq}],g_=l_({matchClosingTags:!1});function O_(e={}){let{codeLanguages:t,defaultCodeLanguage:n,addKeymap:r=!0,base:{parser:o}=zq,completeHTMLTags:i=!0,pasteURLAsLink:s=!0,htmlTagLanguage:a=g_}=e;if(!(o instanceof oh))throw RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],c=[a.support,Lq],u;if(s)c.push(Hq);if(n instanceof Yo)c.push(n.support),u=n.language;else if(n)u=n;let f=t||u?Iq(t,u):void 0;if(l.push(j5({codeParser:f,htmlParser:a.language.parser})),r)c.push(_r.high(Xs.of(Tw)));let d=Rw(o.configure(l));if(i)c.push(d.data.of({autocomplete:Vq}));return new Yo(d,c)}function Vq(e){let{state:t,pos:n}=e,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n-25,n));if(!r)return null;let o=Ie(t).resolveInner(n,-1);while(o&&!o.type.isTop){if(o.name=="CodeBlock"||o.name=="FencedCode"||o.name=="ProcessingInstructionBlock"||o.name=="CommentBlock"||o.name=="Link"||o.name=="Image")return null;o=o.parent}return{from:n-r[0].length,to:n,options:qq(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}var kw=null;function qq(){if(kw)return kw;let e=o_(new Kd(Le.create({extensions:g_}),0,!0));return kw=e?e.options:[]}var Gq=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,Hq=re.domEventHandlers({paste:(e,t)=>{var n;let{main:r}=t.state.selection;if(r.empty)return!1;let o=(n=e.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!o||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(o))return!1;if(/^www\./.test(o))o="https://"+o;if(!Pu.isActiveAt(t.state,r.from,1))return!1;let i=Ie(t.state),s=!1;if(i.iterate({from:r.from,to:r.to,enter:(a)=>{if(a.from>r.from||Gq.test(a.name))s=!0},leave:(a)=>{if(a.to<r.to)s=!0}}),s)return!1;return t.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${o})`}],userEvent:"input.paste",scrollIntoView:!0}),!0}});function cl(e){let t=e.trim();if(!t||/[\x00-\x1f]/.test(t))return null;let n=/^([a-z][a-z0-9+.-]*):/i.exec(t);if(!n)return t.startsWith("//")?null:t;return["http","https","mailto"].includes(n[1].toLowerCase())?t:null}function b_(e){let t=(i)=>i.replace(/[^\n]/g," "),n="",r=!1;return e.replace(/^(```|~~~)[^\n]*\n[\s\S]*?(?:^\1[^\n]*$|(?![\s\S]))/gm,t).split(`
37
+ `).map((i)=>(r=/^( {4}|\t)/.test(i)&&i.trim()!==""?r||n.trim()==="":i.trim()===""&&r,n=i,r?t(i):i)).join(`
38
+ `).replace(/(`+)[^`\n]+?\1/g,t)}var Wq=/\[\[([^\[\]|\n]+?)(?:\|([^\[\]\n]+?))?\]\]/g;function rO(e){let t=[];for(let n of b_(e).matchAll(Wq)){let r=n[1].trim(),o=r.indexOf("#"),i=(o<0?r:r.slice(0,o)).trim(),s=o<0?"":r.slice(o+1).trim();if(i)t.push({from:n.index,to:n.index+n[0].length,name:i,label:(n[2]??n[1]).trim(),target:r,anchor:s})}return t}var Aw=["request","notes","plan","backlog","work","review","preview"];function y_(e){let t=/^idea:\s*(.+)$/i.exec(e.target);if(t)return{kind:"idea",text:t[1].trim()};let n=/^run:\s*([\w.-]+)$/i.exec(e.name);if(!n)return null;let r=e.anchor.toLowerCase(),o=/^(finding|backlog)-(\d+)$/.exec(r);if(o)return{kind:"run",id:n[1],tab:o[1]==="finding"?"review":"backlog",item:{type:o[1],n:Number(o[2])}};return{kind:"run",id:n[1],...Aw.includes(r)?{tab:r}:{}}}function oO(e,t){if(t.includes(e))return e;return t.filter((n)=>/^\d{4}-\d{2}-\d{2}-/.test(n)&&n.slice(11)===e).sort().pop()??null}function v_(e){if(e.kind!=="run")return"";return e.item?`${e.item.type} ${e.item.n}`:e.tab??""}var Fq=/(^|[ \t(])#([\p{L}\p{N}_\-/]*[\p{L}_\-][\p{L}\p{N}_\-/]*)/gmu;function dh(e){let t=[];for(let n of b_(e).matchAll(Fq)){let r=n.index+n[1].length;t.push({from:r,to:r+1+n[2].length,tag:n[2].replace(/\/+$/,"").toLowerCase()})}return t}function ul(e,t){let n=e.trim().replace(/\.md$/i,"").toLowerCase(),r=t.find((o)=>o.toLowerCase()===n);if(r)return r;return[...t].sort().find((o)=>o.toLowerCase().split("/").pop()===n)??null}function x_(e){let t={folders:new Map,notes:[]};for(let r of e){let o=r.split("/"),i=t;for(let s of o.slice(0,-1)){if(!i.folders.has(s))i.folders.set(s,{folders:new Map,notes:[]});i=i.folders.get(s)}i.notes.push(r)}let n=(r)=>({folders:new Map([...r.folders].sort(([o],[i])=>o.localeCompare(i)).map(([o,i])=>[o,n(i)])),notes:r.notes.sort((o,i)=>o.localeCompare(i))});return n(t)}function w_(e,t="",n="Untitled"){let r=new Set(e.map((i)=>i.toLowerCase())),o=(i)=>(t?t+"/":"")+i;for(let i=1;;i++){let s=o(i===1?n:`${n} ${i}`);if(!r.has(s.toLowerCase()))return s}}function S_(e){let t=(s)=>s.trim().replace(/^\|/,"").replace(/(?<!\\)\|$/,"").split(/(?<!\\)\|/).map((a)=>a.trim().replace(/\\\|/g,"|")),n=e.split(/\r?\n/).filter((s)=>s.trim()),r=t(n[0]??""),o=t(n[1]??"").map((s)=>s.startsWith(":")&&s.endsWith(":")?"center":s.endsWith(":")?"right":s.startsWith(":")?"left":""),i=n.slice(2).map((s)=>{let a=t(s);return r.map((l,c)=>a[c]??"")});return{head:r,align:o,rows:i}}function k_(e,t,n,r){if(e&&!r.some((i)=>i.dir===e))r=[...r,{dir:e,label:e.replace(/[\\/]\.kaizen$/,"")}];return{dir:[e,t,n].find((i)=>!!i&&r.some((s)=>s.dir===i))??r[0]?.dir??"",projects:r}}class Qw extends $n{on;at;constructor(e,t){super();this.on=e;this.at=t}eq(e){return e.on===this.on&&e.at===this.at}toDOM(e){let t=document.createElement("input");return t.type="checkbox",t.checked=this.on,t.className="cm-task",t.setAttribute("aria-label",this.on?"done":"to do"),t.addEventListener("mousedown",(n)=>{n.preventDefault(),e.dispatch({changes:{from:this.at,to:this.at+3,insert:this.on?"[ ]":"[x]"}})}),t}ignoreEvent(){return!0}}class Ew extends $n{eq(){return!0}toDOM(){let e=document.createElement("span");return e.className="cm-bullet",e.textContent="•",e}}class Mw extends $n{eq(){return!0}toDOM(){let e=document.createElement("span");return e.className="cm-rule",e}}class $w extends $n{src;alt;constructor(e,t){super();this.src=e;this.alt=t}eq(e){return e.src===this.src&&e.alt===this.alt}toDOM(){let e=document.createElement("img");return e.src=this.src,e.alt=this.alt,e.className="cm-img",e}}class P_ extends $n{src;at;constructor(e,t){super();this.src=e;this.at=t}eq(e){return e.src===this.src&&e.at===this.at}toDOM(e){let t=S_(this.src),n=document.createElement("div"),r=document.createElement("table");n.className="cm-table";let o=(a,l)=>{let c=document.createElement("tr");return a.forEach((u,f)=>{let d=document.createElement(l);if(d.textContent=u,t.align[f])d.style.textAlign=t.align[f];c.append(d)}),c},i=document.createElement("thead"),s=document.createElement("tbody");return i.append(o(t.head,"th")),t.rows.forEach((a)=>s.append(o(a,"td"))),r.append(i,s),n.append(r),n.addEventListener("mousedown",(a)=>{a.preventDefault(),e.dispatch({selection:{anchor:this.at}}),e.focus()}),n}ignoreEvent(){return!0}}var iO=ze.define(),Dw=un.define({create:()=>!1,update:(e,t)=>t.effects.reduce((n,r)=>r.is(iO)?r.value:n,e)});function C_(e){let t=[],n=e.selection.main,r=e.field(Dw,!1);return Ie(e).iterate({enter(o){if(o.name!=="Table")return;let i=e.doc.lineAt(o.from).from,s=e.doc.lineAt(o.to).to;if(r&&n.to>=i&&n.from<=s)return!1;return t.push(we.replace({widget:new P_(e.sliceDoc(i,s),i),block:!0}).range(i,s)),!1}}),we.set(t)}var T_=un.define({create:C_,update:(e,t)=>t.docChanged||t.selection||t.effects.some((n)=>n.is(iO))||Ie(t.startState)!==Ie(t.state)?C_(t.state):e,provide:(e)=>re.decorations.from(e)}),R_={idea:"idea",starting:"idea",running:"run",stalled:"stall",waiting:"wait",done:"done",abandoned:"aband"};function Kq(e){let n=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=document.createElementNS("http://www.w3.org/2000/svg","use");return r.setAttribute("href","#"+e),n.append(r),n}class _w extends $n{name;sub;status;href;host;constructor(e,t,n,r,o){super();this.name=e;this.sub=t;this.status=n;this.href=r;this.host=o}eq(e){return e.name===this.name&&e.sub===this.sub&&e.status===this.status&&e.href===this.href}toDOM(){let e=document.createElement("span");if(e.className="cm-board"+(this.href?"":" cm-board-missing"),e.title=this.href?"Open on the board":"Not on the board",this.status){let t=document.createElement("span");t.className="st d-"+(R_[this.status]??"idea"),t.append(Kq("s-"+(R_[this.status]??"idea"))),e.append(t)}if(e.append(this.name),this.sub){let t=document.createElement("span");t.className="sub",t.textContent="› "+this.sub,e.append(t)}return e.addEventListener("mousedown",(t)=>{if(t.preventDefault(),this.href)this.host.go(this.href);else this.host.toast("That is not on the board")}),e}ignoreEvent(){return!0}}function Jq(e,t,n){let r=(l)=>"/?"+new URLSearchParams({all:"1",dir:n,...l}).toString();if(e.kind==="idea"){let l=e.text.toLowerCase(),c=t.ideas.find((u)=>u.text.toLowerCase()===l)??t.ideas.find((u)=>u.text.toLowerCase().startsWith(l));return{name:c?.text??e.text,sub:"idea",status:c?.status??"",href:c?r({idea:c.text}):null}}let o=oO(e.id,t.runs.map((l)=>l.id)),i=t.runs.find((l)=>l.id===o),s=e.item&&i&&(e.item.type==="finding"?i.findings:i.backlog).some((l)=>l.n===e.item.n),a=!!i&&(!e.item||s);return{name:i?.short??e.id,sub:v_(e),status:i?.status??"",href:a?r({run:i.id,...e.tab?{tab:e.tab}:{},...e.item?{item:`${e.item.type}-${e.item.n}`}:{}}):null}}var Ws=we.replace({}),Nw=ze.define();function A_(e,t){let{state:n}=e,r=n.doc,o=[],i=new Set;if(e.hasFocus)for(let f of n.selection.ranges)for(let d=r.lineAt(f.from).number;d<=r.lineAt(f.to).number;d++)i.add(d);let s=(f)=>i.has(r.lineAt(f).number),a=(f,d,h)=>{if(r.lineAt(d).number===r.lineAt(h).number)o.push(f.range(d,h))},l=(f,d,h)=>{for(let m=r.lineAt(f).number;m<=r.lineAt(d).number;m++)o.push(we.line({class:h}).range(r.line(m).from))};for(let{from:f,to:d}of e.visibleRanges)Ie(n).iterate({from:f,to:d,enter(h){let m=h.name,g=/^ATXHeading(\d)$/.exec(m);if(g){l(h.from,h.from,`cm-h cm-h${Math.min(+g[1],4)}`);return}if(m==="HeaderMark"&&h.node.parent?.name.startsWith("ATX")){if(!s(h.from))a(Ws,h.from,Math.min(h.to+(r.sliceString(h.to,h.to+1)===" "?1:0),r.lineAt(h.from).to));return}if(m==="EmphasisMark"||m==="StrikethroughMark"||m==="CodeMark"&&h.node.parent?.name==="InlineCode"){if(!s(h.from))a(Ws,h.from,h.to);return}if(m==="Blockquote"){l(h.from,h.to,"cm-quote");return}if(m==="QuoteMark"){if(!s(h.from))a(Ws,h.from,Math.min(h.to+(r.sliceString(h.to,h.to+1)===" "?1:0),r.lineAt(h.from).to));return}if(m==="FencedCode")return l(h.from,h.to,"cm-fence"),o.push(we.line({class:"cm-fence-a"}).range(r.lineAt(h.from).from),we.line({class:"cm-fence-z"}).range(r.lineAt(h.to).from)),!1;if(m==="HorizontalRule"){if(!s(h.from))a(we.replace({widget:new Mw}),h.from,h.to);return}if(m==="ListMark"&&h.node.parent?.parent?.name==="BulletList"){if(s(h.from))return;let b=h.node.nextSibling?.name==="Task";a(b?Ws:we.replace({widget:new Ew}),h.from,b?Math.min(h.to+1,r.lineAt(h.from).to):h.to);return}if(m==="TaskMarker"){if(!s(h.from))a(we.replace({widget:new Qw(/x/i.test(r.sliceString(h.from,h.to)),h.from)}),h.from,h.to);return}if(m==="Image"){let b=h.node.getChild("URL"),O=h.node.getChildren("LinkMark");if(s(h.from)||!b||O.length<2)return!1;let y=cl(r.sliceString(b.from,b.to));if(y&&/^https?:/i.test(y))a(we.replace({widget:new $w(y,r.sliceString(O[0].to,O[1].from))}),h.from,h.to);return!1}if(m==="Link"){let b=h.node.getChild("URL"),O=h.node.getChildren("LinkMark");if(!b||O.length<4)return;let y=cl(r.sliceString(b.from,b.to)),v={from:O[0].to,to:O[1].from};if(s(h.from)||!y){o.push(we.mark({class:"cm-link-src"}).range(h.from,h.to));return}if(v.to>v.from)o.push(we.mark({class:"cm-link",attributes:{"data-href":y}}).range(v.from,v.to));a(Ws,O[0].from,O[0].to),a(Ws,O[1].from,h.to);return}if(m==="URL"&&h.node.parent?.name!=="Link"&&h.node.parent?.name!=="Image"){let b=cl(r.sliceString(h.from,h.to));o.push(we.mark({class:"cm-link",attributes:b&&!s(h.from)?{"data-href":b}:{}}).range(h.from,h.to))}}});let c=r.toString(),u=t.names();for(let f of rO(c)){let d=y_(f);if(d){if(s(f.from)){o.push(we.mark({class:"cm-wiki"}).range(f.from,f.to));continue}let y=Jq(d,t.board(),t.dir());a(we.replace({widget:new _w(f.label!==f.target?f.label:y.name,y.sub,y.status,y.href,t)}),f.from,f.to);continue}let h=ul(f.name,u),m="cm-wiki"+(h?"":" cm-wiki-missing");if(s(f.from)){o.push(we.mark({class:m}).range(f.from,f.to));continue}let g=c.lastIndexOf(f.label,f.to-2),b=g>f.from?g:f.from+2,O=b+f.label.length;a(Ws,f.from,b),o.push(we.mark({class:m,attributes:{"data-note":h??f.name}}).range(b,O)),a(Ws,O,f.to)}for(let f of dh(c))o.push(we.mark({class:"cm-tag",attributes:s(f.from)?{}:{"data-tag":f.tag}}).range(f.from,f.to));return we.set(o,!0)}var Q_=(e)=>pr.fromClass(class{decorations;constructor(t){this.decorations=A_(t,e)}update(t){if(t.docChanged||t.viewportChanged||t.selectionSet||t.focusChanged||Ie(t.startState)!==Ie(t.state)||t.transactions.some((n)=>n.effects.some((r)=>r.is(Nw))))this.decorations=A_(t.view,e)}},{decorations:(t)=>t.decorations}),E_=bu.define([{tag:C.emphasis,fontStyle:"italic"},{tag:C.strong,fontWeight:"600"},{tag:C.strikethrough,textDecoration:"line-through"},{tag:C.monospace,fontFamily:"var(--mono)",fontSize:"0.86em",background:"var(--bg)",borderRadius:"var(--r-s)",padding:"1px 4px"},{tag:[C.processingInstruction,C.meta,C.url,C.labelName,C.contentSeparator],color:"var(--dim)"},{tag:C.link,color:"var(--accent)"},{tag:C.quote,color:"var(--dim)"}]),M_=(e)=>re.domEventHandlers({mousedown(t){let n=t.target.closest?.("[data-href],[data-note],[data-tag]");if(!n||t.button!==0)return!1;t.preventDefault();let r=n.dataset.href;if(r&&!/^[a-z][a-z0-9+.-]*:/i.test(r)){let o=r;try{o=decodeURIComponent(r)}catch{}let i=ul(o.split("#")[0],e.names());i?e.openNote(i):e.toast(`No note named ${o}`)}else if(r)window.open(r,"_blank","noopener");else if(n.dataset.note)e.openOrCreate(n.dataset.note);else if(n.dataset.tag)e.search("#"+n.dataset.tag);return!0}});var eG=[["Checkbox","- [ ] |","to do"],["Divider",`---
39
+ |`,"line across"],["Heading 1","# |","big"],["Heading 2","## |","medium"],["Heading 3","### |","small"],["Bullet list","- |","•"],["Numbered list","1. |","1."],["Quote","> |","aside"],["Code block","```\n|\n```","monospace"],["Table",`| Column | Column |
40
+ | --- | --- |
41
+ | | |`,"rows"],["Link to note","[[|]]","[[ ]]"],["Link to run","[[run:|]]","board"],["Tag","#|","#"]];function $_(e){let t=e.matchBefore(/^[ \t]*\/[\w ]*$/);if(!t)return null;return{from:t.from+t.text.indexOf("/"),filter:!0,validFor:/^\/[\w ]*$/,options:eG.map(([r,o,i],s)=>({label:"/"+r.toLowerCase(),displayLabel:r,detail:i,boost:50-s,apply:(a,l,c,u)=>{let f=a.state.doc.lineAt(c),d=(r==="Divider"||r==="Table")&&f.number>1&&a.state.doc.line(f.number-1).text.trim()?`
42
+ `:"",h=d+o.replace("|",""),m=c+d.length+o.indexOf("|");if(a.dispatch({changes:{from:c,to:u,insert:h},selection:{anchor:m},userEvent:"input.complete"}),r.startsWith("Link to"))setTimeout(()=>Hd(a))}}))}}var D_=(e)=>(t)=>{let n=t.matchBefore(/\[\[[^\]\n|]*$/);if(!n)return null;let r=n.text.slice(2),o=t.state.sliceDoc(t.pos,t.pos+2)==="]]",i=(a,l)=>(c,u,f,d)=>{c.dispatch({changes:{from:f,to:d,insert:a+(o?"":"]]")},selection:{anchor:f+a.length+(l?0:2)},userEvent:"input.complete"})},s=/^run:\s*([\w.-]+)#([\w-]*)$/i.exec(r);if(s){let a=oO(s[1],e.board().runs.map((u)=>u.id)),l=e.board().runs.find((u)=>u.id===a);if(!l)return null;let c=(u)=>u.length>60?u.slice(0,59)+"…":u;return{from:t.pos-s[2].length,validFor:/^[\w-]*$/,options:[...Aw.map((u,f)=>({label:u,detail:"tab",boost:20-f,apply:i(u,!1)})),...l.findings.map((u)=>({label:`finding-${u.n}`,detail:c(u.text)+(u.done?" (closed)":""),apply:i(`finding-${u.n}`,!1)})),...l.backlog.map((u)=>({label:`backlog-${u.n}`,detail:`${u.status}: ${c(u.text)}`,apply:i(`backlog-${u.n}`,!1)}))]}}return{from:n.from+2,validFor:/^[^\]\n|#]*$/,options:[...e.names().map((a)=>({label:a,detail:"note",apply:i(a,!1)})),...[...e.board().runs].sort((a,l)=>l.id.localeCompare(a.id)).map((a,l)=>({label:"run:"+a.id,displayLabel:a.short,detail:a.id.slice(0,10)+" · "+a.title,boost:Math.max(-99,60-l),apply:i("run:"+a.id,!0)})),...e.board().ideas.map((a)=>({label:"idea:"+a.text,detail:"idea",apply:i("idea:"+a.text,!1)}))]}};var tG=(e,t,n)=>[n5({override:[$_,D_(e)],icons:!1}),i$(),Xs.of([...Tw,...L$,...c$,z$,{key:"Mod-s",run:()=>(e.save(),!0)}]),O_({base:Pu}),VM(E_),re.lineWrapping,re.contentAttributes.of({"aria-label":"Note",spellcheck:"true"}),Dw,re.focusChangeEffect.of((r,o)=>iO.of(o)),T_,Q_(e),M_(e),re.updateListener.of((r)=>{if(r.docChanged&&n())e.edited()}),t?Le.lineSeparator.of(`\r
43
+ `):[]];function __(e,t,n){let r=!1,o=new re({parent:e,state:Le.create({doc:t,extensions:tG(n,t.includes(`\r
44
+ `),()=>!r)})});return{text:()=>o.state.sliceDoc(),replace(i){r=!0,o.dispatch({changes:{from:0,to:o.state.doc.length,insert:i},selection:{anchor:Math.min(o.state.selection.main.head,i.length)}}),r=!1},refresh:()=>o.dispatch({effects:Nw.of(null)}),focus:()=>o.focus(),destroy:()=>o.destroy()}}var N_=()=>({runs:[],ideas:[]});var Fs=()=>{throw Error("The board has not mounted this page yet")},Tu=()=>!1,Qe={open:{card:Tu,ws:Tu,term:Tu,tab:Tu,task:Tu,homeStart:Tu},go:Fs,newTask:Fs,runPopup:Fs,scopeDir:()=>"",dirHeader:()=>({}),projects:()=>[],reload:()=>{},dataUrls:Fs,rich:Fs,pop:()=>{},motion:()=>!0,agentLine:(e)=>e.name,openSettings:Fs,openCard:Fs,openWorkspace:Fs,loadBoard:async()=>{},launched:()=>{},closePanel:()=>{},reopenPanel:()=>{},panelOpenFor:()=>!1,notify:()=>{},gitTab:()=>{},refetchRun:async()=>{},font:{min:8,max:24,read:()=>12,set:()=>{}},notices:{on:()=>!0,sounds:[],sound:()=>"",play:()=>{}},currentDir:()=>"",gitProjects:()=>[],wsHref:()=>"",pickProject:async()=>{},navigate:(e)=>void(location.href=e),runCards:()=>[]},L_=(e)=>Object.assign(Qe,e);function nG(e){if(!e||typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var rG=(e)=>{switch(e){case"success":return sG;case"info":return lG;case"warning":return aG;case"error":return cG;default:return null}},oG=Array(12).fill(0),iG=({visible:e,className:t})=>oe("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},oe("div",{className:"sonner-spinner"},oG.map((n,r)=>oe("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),sG=oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},oe("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),aG=oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},oe("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),lG=oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},oe("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),cG=oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},oe("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),uG=oe("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true"},oe("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),oe("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),fG=()=>{let[e,t]=A(document.hidden);return L(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n)},[]),e},dG=1,hG=100,z_=(e)=>{var t;return typeof(e==null?void 0:e.id)==="number"||(e==null?void 0:(t=e.id)==null?void 0:t.length)>0?e.id:dG++};class X_{constructor(){this.subscribe=(e)=>(this.subscribers.push(e),this.getActiveToasts().forEach((t)=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=(e)=>{this.subscribers.forEach((t)=>t(e))},this.addToast=(e)=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-hG;if(e<=0)return;this.toasts=this.toasts.filter((t)=>{if(e>0&&this.dismissedToasts.has(t.id))return this.dismissedToasts.delete(t.id),e--,!1;return!0})},this.create=(e)=>{let{message:t,...n}=e,r=z_(e),o=this.pendingDismissals.get(r);if(o!==void 0)cancelAnimationFrame(o),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r);let i=this.dismissedToasts.has(r),s=e.dismissible===void 0?!0:e.dismissible;if(i)this.dismissedToasts.delete(r),this.toasts=this.toasts.filter((l)=>l.id!==r);if(i?void 0:this.toasts.find((l)=>l.id===r))this.toasts=this.toasts.map((l)=>{if(l.id===r)return this.publish({...l,...e,id:r,title:t}),{...l,...e,id:r,dismissible:s,title:t};return l});else this.addToast({title:t,...n,dismissible:s,id:r});return r},this.dismiss=(e)=>{if(e===void 0||e===null)return this.getActiveToasts().forEach((n)=>{this.dismissedToasts.add(n.id),this.subscribers.forEach((r)=>r({id:n.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);if(t!==void 0)cancelAnimationFrame(t);return this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach((n)=>n({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n=void 0;if(t.loading!==void 0)n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!=="function"?t.description:void 0});let r=Promise.resolve(e instanceof Function?e():e),o=n!==void 0,i,s=r.then(async(l)=>{if(i=["resolve",l],On(l))o=!1,this.create({id:n,type:"default",message:l});else if(mG(l)&&!l.ok){o=!1;let u=typeof t.error==="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,f=typeof t.description==="function"?await t.description(`HTTP error! status: ${l.status}`):t.description,h=typeof u==="object"&&!On(u)?u:{message:u};this.create({id:n,type:"error",description:f,...h})}else if(l instanceof Error){o=!1;let u=typeof t.error==="function"?await t.error(l):t.error,f=typeof t.description==="function"?await t.description(l):t.description,h=typeof u==="object"&&!On(u)?u:{message:u};this.create({id:n,type:"error",description:f,...h})}else if(t.success!==void 0){o=!1;let u=typeof t.success==="function"?await t.success(l):t.success,f=typeof t.description==="function"?await t.description(l):t.description,h=typeof u==="object"&&!On(u)?u:{message:u};this.create({id:n,type:"success",description:f,...h})}}).catch(async(l)=>{if(i=["reject",l],t.error!==void 0){o=!1;let c=typeof t.error==="function"?await t.error(l):t.error,u=typeof t.description==="function"?await t.description(l):t.description,d=typeof c==="object"&&!On(c)?c:{message:c};this.create({id:n,type:"error",description:u,...d})}}).finally(()=>{if(o)this.dismiss(n),n=void 0;t.finally==null||t.finally.call(t)}),a=()=>new Promise((l,c)=>s.then(()=>i[0]==="reject"?c(i[1]):l(i[1])).catch(c));if(typeof n!=="string"&&typeof n!=="number")return{unwrap:a};else return Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{let n=z_(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter((e)=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}}var Wn=new X_,pG=(e,t)=>Wn.message(e,t),mG=(e)=>e&&typeof e==="object"&&("ok"in e)&&typeof e.ok==="boolean"&&("status"in e)&&typeof e.status==="number",gG=pG,OG=()=>Wn.toasts,bG=()=>Wn.getActiveToasts(),Lw=Object.assign(gG,{success:Wn.success,info:Wn.info,warning:Wn.warning,error:Wn.error,custom:Wn.custom,message:Wn.message,promise:Wn.promise,dismiss:Wn.dismiss,loading:Wn.loading},{getHistory:OG,getToasts:bG});nG("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function sO(e){return e.label!==void 0}var yG=3,vG="24px",xG="16px",j_=4000,wG=356,SG=14,kG=45,CG=200;function qo(...e){return e.filter(Boolean).join(" ")}function RG(e){let[t,n]=e.split("-"),r=[];if(t)r.push(t);if(n)r.push(n);return r}var PG=(e)=>{var t,n,r,o,i,s,a,l,c;let{invert:u,toast:f,unstyled:d,interacting:h,setHeights:m,visibleToasts:g,heights:b,index:O,toasts:y,expanded:v,removeToast:x,defaultRichColors:w,closeButton:S,style:k,cancelButtonStyle:R,actionButtonStyle:Q,className:E="",descriptionClassName:_="",duration:N,position:V,gap:U,expandByDefault:F,classNames:Z,icons:se,closeButtonAriaLabel:K="Close toast"}=e,[te,I]=A(null),[pe,M]=A(null),[H,q]=A(!1),[X,D]=A(!1),[ae,Ce]=A(!1),[J,fe]=A(!1),[qe,Xe]=A(!1),[ve,Se]=A(0),[Ee,Ul]=A(0),li=T(f.duration||N||j_),Yl=T(null),ci=T(null),O8=O===0,b8=O+1<=g,kn=f.type,sC=kn!=null?kn:"default",Vl=f.dismissible!==!1,y8=f.className||"",v8=f.descriptionClassName||"",rp=ce(()=>b.findIndex((ke)=>ke.toastId===f.id)||0,[b,f.id]),x8=ce(()=>{var ke;return(ke=f.closeButton)!=null?ke:S},[f.closeButton,S]),aC=ce(()=>f.duration||N||j_,[f.duration,N]),N0=T(0),ql=T(0),lC=T(0),Gl=T(null),[w8,S8]=V.split("-"),cC=ce(()=>b.reduce((ke,Nt,Jt)=>{if(Jt>=rp)return ke;return ke+Nt.height},0),[b,rp]),uC=fG(),xo=ce(()=>{var ke;return(ke=e.swipeDirections)!=null?ke:RG(V)},[e.swipeDirections,V]),k8=f.invert||u,L0=kn==="loading";ql.current=ce(()=>rp*U+cC,[rp,cC]),L(()=>{li.current=aC},[aC]),L(()=>{q(!0)},[]),L(()=>{let ke=ci.current;if(ke){let Nt=ke.getBoundingClientRect().height;return Ul(Nt),m((Jt)=>[{toastId:f.id,height:Nt,position:f.position},...Jt]),()=>m((Jt)=>Jt.filter((Nn)=>Nn.toastId!==f.id))}},[m,f.id]),Lt(()=>{if(!H)return;let ke=ci.current,Nt=ke.style.height;ke.style.height="auto";let Jt=ke.getBoundingClientRect().height;ke.style.height=Nt,Ul(Jt),m((Nn)=>{if(!Nn.find((en)=>en.toastId===f.id))return[{toastId:f.id,height:Jt,position:f.position},...Nn];else return Nn.map((en)=>en.toastId===f.id?{...en,height:Jt}:en)})},[H,f.title,f.description,m,f.id,f.jsx,f.action,f.cancel]);let os=G(()=>{D(!0),Se(ql.current),m((ke)=>ke.filter((Nt)=>Nt.toastId!==f.id)),setTimeout(()=>{x(f)},CG)},[f,x,m,ql]);L(()=>{if(f.promise&&kn==="loading"||f.duration===1/0||f.type==="loading")return;let ke,Nt=()=>{if(lC.current<N0.current){let Nn=new Date().getTime()-N0.current;li.current=li.current-Nn}lC.current=new Date().getTime()},Jt=()=>{if(li.current===1/0)return;N0.current=new Date().getTime(),ke=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),os()},li.current)};if(v||h||uC)Nt();else Jt();return()=>clearTimeout(ke)},[v,h,f,kn,uC,os]),L(()=>{if(f.delete)os(),f.onDismiss==null||f.onDismiss.call(f,f)},[os,f.delete]);function fC(){var ke;if(se==null?void 0:se.loading){var Nt;return oe("div",{className:qo(Z==null?void 0:Z.loader,f==null?void 0:(Nt=f.classNames)==null?void 0:Nt.loader,"sonner-loader"),"data-visible":kn==="loading"},se.loading)}return oe(iG,{className:qo(Z==null?void 0:Z.loader,f==null?void 0:(ke=f.classNames)==null?void 0:ke.loader),visible:kn==="loading"})}let C8=f.icon||(se==null?void 0:se[kn])||rG(kn);var dC,hC;return oe("li",{tabIndex:0,ref:ci,className:qo(E,y8,Z==null?void 0:Z.toast,f==null?void 0:(t=f.classNames)==null?void 0:t.toast,Z==null?void 0:Z[sC],f==null?void 0:(n=f.classNames)==null?void 0:n[sC]),"data-sonner-toast":"","data-rich-colors":(dC=f.richColors)!=null?dC:w,"data-styled":!Boolean(f.jsx||f.unstyled||d),"data-mounted":H,"data-promise":Boolean(f.promise),"data-swiped":qe,"data-removed":X,"data-visible":b8,"data-y-position":w8,"data-x-position":S8,"data-index":O,"data-front":O8,"data-swiping":ae,"data-dismissible":Vl,"data-type":kn,"data-invert":k8,"data-swipe-out":J,"data-swipe-direction":pe,"data-expanded":Boolean(v||F&&H),"data-testid":f.testId,style:{"--index":O,"--toasts-before":O,"--z-index":y.length-O,"--offset":`${X?ve:ql.current}px`,"--initial-height":F?"auto":`${Ee}px`,...k,...f.style},onDragEnd:()=>{Ce(!1),I(null),Gl.current=null},onPointerDown:(ke)=>{if(ke.button===2)return;if(L0||!Vl)return;if(Yl.current=new Date,Se(ql.current),ke.target.setPointerCapture(ke.pointerId),ke.target.tagName==="BUTTON")return;Ce(!0),Gl.current={x:ke.clientX,y:ke.clientY}},onPointerUp:()=>{var ke,Nt,Jt;if(J||!Vl)return;Gl.current=null;let Nn=Number(((ke=ci.current)==null?void 0:ke.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),cf=Number(((Nt=ci.current)==null?void 0:Nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),en=new Date().getTime()-((Jt=Yl.current)==null?void 0:Jt.getTime()),vr=te==="x"?Nn:cf,wo=Math.abs(vr)/en;if((te==="x"?xo.includes(Nn>0?"right":"left"):xo.includes(cf>0?"bottom":"top"))&&(Math.abs(vr)>=kG||wo>0.11)){if(Se(ql.current),f.onDismiss==null||f.onDismiss.call(f,f),te==="x")M(Nn>0?"right":"left");else M(cf>0?"down":"up");os(),fe(!0);return}else{var So,j0;(So=ci.current)==null||So.style.setProperty("--swipe-amount-x","0px"),(j0=ci.current)==null||j0.style.setProperty("--swipe-amount-y","0px")}Xe(!1),Ce(!1),I(null)},onPointerMove:(ke)=>{var Nt,Jt,Nn;if(!Gl.current||!Vl)return;if(((Nt=window.getSelection())==null?void 0:Nt.toString().length)>0)return;let en=ke.clientY-Gl.current.y,vr=ke.clientX-Gl.current.x;if(!te&&(Math.abs(vr)>1||Math.abs(en)>1))I(Math.abs(vr)>Math.abs(en)?"x":"y");let wo={x:0,y:0},z0=(So)=>1/(1.5+Math.abs(So)/20);if(te==="y"){if(xo.includes("top")||xo.includes("bottom"))if(xo.includes("top")&&en<0||xo.includes("bottom")&&en>0)wo.y=en;else{let So=en*z0(en);wo.y=Math.abs(So)<Math.abs(en)?So:en}}else if(te==="x"){if(xo.includes("left")||xo.includes("right"))if(xo.includes("left")&&vr<0||xo.includes("right")&&vr>0)wo.x=vr;else{let So=vr*z0(vr);wo.x=Math.abs(So)<Math.abs(vr)?So:vr}}if(Math.abs(wo.x)>0||Math.abs(wo.y)>0)Xe(!0);(Jt=ci.current)==null||Jt.style.setProperty("--swipe-amount-x",`${wo.x}px`),(Nn=ci.current)==null||Nn.style.setProperty("--swipe-amount-y",`${wo.y}px`)}},x8&&!f.jsx&&kn!=="loading"?oe("button",{"aria-label":K,"data-disabled":L0,"data-close-button":!0,onClick:L0||!Vl?()=>{}:()=>{os(),f.onDismiss==null||f.onDismiss.call(f,f)},className:qo(Z==null?void 0:Z.closeButton,f==null?void 0:(r=f.classNames)==null?void 0:r.closeButton)},(hC=se==null?void 0:se.close)!=null?hC:uG):null,(kn||f.icon||f.promise)&&f.icon!==null&&((se==null?void 0:se[kn])!==null||f.icon)?oe("div",{"data-icon":"",className:qo(Z==null?void 0:Z.icon,f==null?void 0:(o=f.classNames)==null?void 0:o.icon)},kn==="loading"?f.icon||fC():f.promise?fC():null,kn!=="loading"?C8:null):null,oe("div",{"data-content":"",className:qo(Z==null?void 0:Z.content,f==null?void 0:(i=f.classNames)==null?void 0:i.content)},oe("div",{"data-title":"",className:qo(Z==null?void 0:Z.title,f==null?void 0:(s=f.classNames)==null?void 0:s.title)},f.jsx?f.jsx:typeof f.title==="function"?f.title():f.title),f.description?oe("div",{"data-description":"",className:qo(_,v8,Z==null?void 0:Z.description,f==null?void 0:(a=f.classNames)==null?void 0:a.description)},typeof f.description==="function"?f.description():f.description):null),On(f.cancel)?f.cancel:f.cancel&&sO(f.cancel)?oe("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||R,onClick:(ke)=>{if(!sO(f.cancel))return;if(!Vl)return;f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,ke),os()},className:qo(Z==null?void 0:Z.cancelButton,f==null?void 0:(l=f.classNames)==null?void 0:l.cancelButton)},f.cancel.label):null,On(f.action)?f.action:f.action&&sO(f.action)?oe("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||Q,onClick:(ke)=>{if(!sO(f.action))return;if(f.action.onClick==null||f.action.onClick.call(f.action,ke),ke.defaultPrevented)return;os()},className:qo(Z==null?void 0:Z.actionButton,f==null?void 0:(c=f.classNames)==null?void 0:c.actionButton)},f.action.label):null)};function I_(){if(typeof window>"u")return"ltr";if(typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");if(e==="auto"||!e)return window.getComputedStyle(document.documentElement).direction;return e}function TG(e,t){let n={};return[e,t].forEach((r,o)=>{let i=o===1,s=i?"--mobile-offset":"--offset",a=i?xG:vG;function l(c){["top","right","bottom","left"].forEach((u)=>{n[`${s}-${u}`]=typeof c==="number"?`${c}px`:c})}if(typeof r==="number"||typeof r==="string")l(r);else if(typeof r==="object")["top","right","bottom","left"].forEach((c)=>{if(r[c]===void 0)n[`${s}-${c}`]=a;else n[`${s}-${c}`]=typeof r[c]==="number"?`${r[c]}px`:r[c]});else l(a)}),n}var B_=B(function(t,n){let{id:r,invert:o,position:i="bottom-right",hotkey:s=["altKey","KeyT"],expand:a,closeButton:l,className:c,offset:u,mobileOffset:f,theme:d="light",richColors:h,duration:m,style:g,visibleToasts:b=yG,toastOptions:O,dir:y=I_(),gap:v=SG,icons:x,customAriaLabel:w,containerAriaLabel:S="Notifications"}=t,[k,R]=A([]),Q=ce(()=>{if(r)return k.filter((q)=>q.toasterId===r);return k.filter((q)=>!q.toasterId)},[k,r]),E=ce(()=>Array.from(new Set([i].concat(Q.filter((q)=>q.position).map((q)=>q.position)))),[Q,i]),[_,N]=A([]),[V,U]=A(!1),[F,Z]=A(!1),[se,K]=A(d!=="system"?d:typeof window<"u"?window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":"light"),te=T(null),I=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),pe=T(null),M=T(!1),H=G((q)=>{R((X)=>{var D;if(!((D=X.find((ae)=>ae.id===q.id))==null?void 0:D.delete))Wn.dismiss(q.id);return X.filter(({id:ae})=>ae!==q.id)})},[]);return L(()=>Wn.subscribe((q)=>{if(q.dismiss){requestAnimationFrame(()=>{R((X)=>X.map((D)=>D.id===q.id?{...D,delete:!0}:D))});return}setTimeout(()=>{wr(()=>{R((X)=>{let D=X.findIndex((ae)=>ae.id===q.id);if(D!==-1)return[...X.slice(0,D),{...X[D],...q},...X.slice(D+1)];return[q,...X]})})})}),[]),L(()=>{if(d!=="system"){K(d);return}if(d==="system")if(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches)K("dark");else K("light");if(typeof window>"u")return;let q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:X})=>{if(X)K("dark");else K("light")})}catch(X){q.addListener(({matches:D})=>{try{if(D)K("dark");else K("light")}catch(ae){console.error(ae)}})}},[d]),L(()=>{if(k.length<=1)U(!1)},[k]),L(()=>{let q=(X)=>{var D;if(s.length>0&&s.every((J)=>X[J]||X.code===J)){var Ce;U(!0),(Ce=te.current)==null||Ce.focus()}if(X.code==="Escape"&&(document.activeElement===te.current||((D=te.current)==null?void 0:D.contains(document.activeElement))))U(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[s]),L(()=>{if(te.current)return()=>{if(pe.current)pe.current.focus({preventScroll:!0}),pe.current=null,M.current=!1}},[te.current]),oe("section",{ref:n,"aria-label":w!=null?w:`${S} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},E.map((q,X)=>{var D;let[ae,Ce]=q.split("-");if(!Q.length)return null;return oe("ol",{key:q,dir:y==="auto"?I_():y,tabIndex:-1,ref:te,className:c,"data-sonner-toaster":!0,"data-sonner-theme":se,"data-y-position":ae,"data-x-position":Ce,style:{"--front-toast-height":`${((D=_[0])==null?void 0:D.height)||0}px`,"--width":`${wG}px`,"--gap":`${v}px`,...g,...TG(u,f)},onBlur:(J)=>{if(M.current&&!J.currentTarget.contains(J.relatedTarget)){if(M.current=!1,pe.current)pe.current.focus({preventScroll:!0}),pe.current=null}},onFocus:(J)=>{if(J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false")return;if(!M.current)M.current=!0,pe.current=J.relatedTarget},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{if(!F)U(!1)},onDragEnd:()=>U(!1),onPointerDown:(J)=>{if(J.target instanceof HTMLElement&&J.target.dataset.dismissible==="false")return;Z(!0)},onPointerUp:()=>Z(!1)},Q.filter((J)=>!J.position&&X===0||J.position===q).map((J,fe)=>{var qe,Xe;return oe(PG,{key:J.id,icons:x,index:fe,toast:J,defaultRichColors:h,duration:(qe=O==null?void 0:O.duration)!=null?qe:m,className:O==null?void 0:O.className,descriptionClassName:O==null?void 0:O.descriptionClassName,invert:o,visibleToasts:b,closeButton:(Xe=O==null?void 0:O.closeButton)!=null?Xe:l,interacting:F,position:q,style:O==null?void 0:O.style,unstyled:O==null?void 0:O.unstyled,classNames:O==null?void 0:O.classNames,cancelButtonStyle:O==null?void 0:O.cancelButtonStyle,actionButtonStyle:O==null?void 0:O.actionButtonStyle,closeButtonAriaLabel:O==null?void 0:O.closeButtonAriaLabel,removeToast:H,toasts:Q.filter((ve)=>ve.position==J.position),heights:_.filter((ve)=>ve.position==J.position),setHeights:N,expandByDefault:a,gap:v,expanded:V,swipeDirections:t.swipeDirections})}))}))});var zw;function AG(e,t){if(zw!==void 0)Lw.dismiss(zw);zw=Lw(e,t)}function Pe(e,t){AG(e,{duration:t?8000:4000,action:t?{label:"Report",onClick:()=>void window.open("/issue?"+new URLSearchParams(t),"_blank","noopener")}:void 0})}var Z_=(e)=>{let t,n=new Set,r=(c,u)=>{let f=typeof c==="function"?c(t):c;if(!Object.is(f,t)){let d=t;t=(u!=null?u:typeof f!=="object"||f===null)?f:Object.assign({},t,f),n.forEach((h)=>h(t,d))}},o=()=>t,a={setState:r,getState:o,getInitialState:()=>l,subscribe:(c)=>(n.add(c),()=>n.delete(c))},l=t=e(r,o,a);return a},U_=(e)=>e?Z_(e):Z_;var QG=(e)=>e;function EG(e,t=QG){let n=Jl(e.subscribe,G(()=>t(e.getState()),[e,t]),()=>t(e.getInitialState()));return q0(n),n}var Y_=(e)=>{let t=U_(e),n=(r)=>EG(t,r);return Object.assign(n,t),n},Oe=(e)=>e?Y_(e):Y_;var Au=Oe()(()=>({open:null}));function zi(e){return new Promise((t)=>{Au.getState().open?.answer(!1),Au.setState({open:{...e,answer:t}})})}function jw(e){let t=Au.getState().open;Au.setState({open:null}),t?.answer(e)}var ji=(e,t)=>{let n=t-e;return n<3600000?Math.round(n/60000)+"m":n<86400000?Math.round(n/3600000)+"h":Math.round(n/86400000)+"d"};var H_=[],W_=(e)=>void H_.push(e);function fl(e){Promise.allSettled(H_.map((t)=>t())).then(()=>location.href=e)}function F_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=F_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function aO(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=F_(e))&&(r&&(r+=" "),r+=t);return r}var MG=(e,t)=>{let n=Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},$G=(e,t)=>({classGroupId:e,validator:t}),r4=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n});var K_=[];var DG=(e)=>{let t=NG(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:(s)=>{if(s.startsWith("[")&&s.endsWith("]"))return _G(s);let a=s.split("-"),l=a[0]===""&&a.length>1?1:0;return o4(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){let l=r[s],c=n[s];if(l){if(c)return MG(c,l);return l}return c||K_}return n[s]||K_}}},o4=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let o=e[t],i=n.nextPart.get(o);if(i){let c=o4(e,t+1,i);if(c)return c}let s=n.validators;if(s===null)return;let a=t===0?e.join("-"):e.slice(t).join("-"),l=s.length;for(let c=0;c<l;c++){let u=s[c];if(u.validator(a))return u.classGroupId}return},_G=(e)=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),NG=(e)=>{let{theme:t,classGroups:n}=e;return LG(n,t)},LG=(e,t)=>{let n=r4();for(let r in e){let o=e[r];Xw(o,n,r,t)}return n},Xw=(e,t,n,r)=>{let o=e.length;for(let i=0;i<o;i++){let s=e[i];zG(s,t,n,r)}},zG=(e,t,n,r)=>{if(typeof e==="string"){jG(e,t,n);return}if(typeof e==="function"){IG(e,t,n,r);return}XG(e,t,n,r)},jG=(e,t,n)=>{let r=e===""?t:i4(t,e);r.classGroupId=n},IG=(e,t,n,r)=>{if(BG(e)){Xw(e(r),t,n,r);return}if(t.validators===null)t.validators=[];t.validators.push($G(n,e))},XG=(e,t,n,r)=>{let o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){let[a,l]=o[s];Xw(l,i4(t,a),n,r)}},i4=(e,t)=>{let n=e,r=t.split("-"),o=r.length;for(let i=0;i<o;i++){let s=r[i],a=n.nextPart.get(s);if(!a)a=r4(),n.nextPart.set(s,a);n=a}return n},BG=(e)=>("isThemeGetter"in e)&&e.isThemeGetter===!0,ZG=(e)=>{if(e<1)return{get:()=>{return},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),o=(i,s)=>{if(n[i]=s,t++,t>e)t=0,r=n,n=Object.create(null)};return{get(i){let s=n[i];if(s!==void 0)return s;if((s=r[i])!==void 0)return o(i,s),s},set(i,s){if(i in n)n[i]=s;else o(i,s)}}};var UG=[],J_=(e,t,n,r,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:o}),YG=(e)=>{let{prefix:t,experimentalParseClassName:n}=e,r=(o)=>{let i=[],s=0,a=0,l=0,c,u=o.length;for(let g=0;g<u;g++){let b=o[g];if(s===0&&a===0){if(b===":"){i.push(o.slice(l,g)),l=g+1;continue}if(b==="/"){c=g;continue}}if(b==="[")s++;else if(b==="]")s--;else if(b==="(")a++;else if(b===")")a--}let f=i.length===0?o:o.slice(l),d=f,h=!1;if(f.endsWith("!"))d=f.slice(0,-1),h=!0;else if(f.startsWith("!"))d=f.slice(1),h=!0;let m=c&&c>l?c-l:void 0;return J_(i,h,d,m)};if(t){let o=t+":",i=r;r=(s)=>s.startsWith(o)?i(s.slice(o.length)):J_(UG,!1,s,void 0,!0)}if(n){let o=r;r=(i)=>n({className:i,parseClassName:o})}return r},VG=(e)=>{let t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),(n)=>{let r=[],o=[];for(let i=0;i<n.length;i++){let s=n[i],a=s[0]==="[",l=t.has(s);if(a||l){if(o.length>0)o.sort(),r.push(...o),o=[];r.push(s)}else o.push(s)}if(o.length>0)o.sort(),r.push(...o);return r}},qG=(e)=>({cache:ZG(e.cacheSize),parseClassName:YG(e),sortModifiers:VG(e),postfixLookupClassGroupIds:GG(e),...DG(e)}),GG=(e)=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},HG=/\s+/,WG=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=t,a=[],l=e.trim().split(HG),c="";for(let u=l.length-1;u>=0;u-=1){let f=l[u],{isExternal:d,modifiers:h,hasImportantModifier:m,baseClassName:g,maybePostfixModifierPosition:b}=n(f);if(d){c=f+(c.length>0?" "+c:c);continue}let O=!!b,y;if(O){let k=g.substring(0,b);y=r(k);let R=y&&s[y]?r(g):void 0;if(R&&R!==y)y=R,O=!1}else y=r(g);if(!y){if(!O){c=f+(c.length>0?" "+c:c);continue}if(y=r(g),!y){c=f+(c.length>0?" "+c:c);continue}O=!1}let v=h.length===0?"":h.length===1?h[0]:i(h).join(":"),x=m?v+"!":v,w=x+y;if(a.indexOf(w)>-1)continue;a.push(w);let S=o(y,O);for(let k=0;k<S.length;++k){let R=S[k];a.push(x+R)}c=f+(c.length>0?" "+c:c)}return c},FG=(...e)=>{let t=0,n,r,o="";while(t<e.length)if(n=e[t++]){if(r=s4(n))o&&(o+=" "),o+=r}return o},s4=(e)=>{if(typeof e==="string")return e;let t,n="";for(let r=0;r<e.length;r++)if(e[r]){if(t=s4(e[r]))n&&(n+=" "),n+=t}return n},KG=(e,...t)=>{let n,r,o,i,s=(l)=>{let c=t.reduce((u,f)=>f(u),e());return n=qG(c),r=n.cache.get,o=n.cache.set,i=a,a(l)},a=(l)=>{let c=r(l);if(c)return c;let u=WG(l,n);return o(l,u),u};return i=s,(...l)=>i(FG(...l))},JG=[],It=(e)=>{let t=(n)=>n[e]||JG;return t.isThemeGetter=!0,t.themeKey=e,t},a4=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,l4=/^\((?:(\w[\w-]*):)?(.+)\)$/i,eH=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,tH=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,nH=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,rH=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,oH=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,iH=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ks=(e)=>eH.test(e),Ae=(e)=>!!e&&!Number.isNaN(Number(e)),Go=(e)=>!!e&&Number.isInteger(Number(e)),Iw=(e)=>e.endsWith("%")&&Ae(e.slice(0,-1)),Ii=(e)=>tH.test(e),c4=()=>!0,sH=(e)=>nH.test(e)&&!rH.test(e),Bw=()=>!1,aH=(e)=>oH.test(e),lH=(e)=>iH.test(e),cH=(e)=>!ie(e)&&!le(e),uH=(e)=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),fH=(e)=>Js(e,d4,Bw),ie=(e)=>a4.test(e),dl=(e)=>Js(e,h4,sH),e4=(e)=>Js(e,yH,Ae),dH=(e)=>Js(e,m4,c4),hH=(e)=>Js(e,p4,Bw),t4=(e)=>Js(e,u4,Bw),pH=(e)=>Js(e,f4,lH),lO=(e)=>Js(e,g4,aH),le=(e)=>l4.test(e),hh=(e)=>hl(e,h4),mH=(e)=>hl(e,p4),n4=(e)=>hl(e,u4),gH=(e)=>hl(e,d4),OH=(e)=>hl(e,f4),cO=(e)=>hl(e,g4,!0),bH=(e)=>hl(e,m4,!0),Js=(e,t,n)=>{let r=a4.exec(e);if(r){if(r[1])return t(r[1]);return n(r[2])}return!1},hl=(e,t,n=!1)=>{let r=l4.exec(e);if(r){if(r[1])return t(r[1]);return n}return!1},u4=(e)=>e==="position"||e==="percentage",f4=(e)=>e==="image"||e==="url",d4=(e)=>e==="length"||e==="size"||e==="bg-size",h4=(e)=>e==="length",yH=(e)=>e==="number",p4=(e)=>e==="family-name",m4=(e)=>e==="number"||e==="weight",g4=(e)=>e==="shadow";var vH=()=>{let e=It("color"),t=It("font"),n=It("text"),r=It("font-weight"),o=It("tracking"),i=It("leading"),s=It("breakpoint"),a=It("container"),l=It("spacing"),c=It("radius"),u=It("shadow"),f=It("inset-shadow"),d=It("text-shadow"),h=It("drop-shadow"),m=It("blur"),g=It("perspective"),b=It("aspect"),O=It("ease"),y=It("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],x=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...x(),le,ie],S=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto","contain","none"],R=()=>[le,ie,l],Q=()=>[Ks,"full","auto",...R()],E=()=>[Go,"none","subgrid",le,ie],_=()=>["auto",{span:["full",Go,le,ie]},Go,le,ie],N=()=>[Go,"auto",le,ie],V=()=>["auto","min","max","fr",le,ie],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],Z=()=>["auto",...R()],se=()=>[Ks,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],K=()=>[a,Ks,"screen","full","dvw","lvw","svw","min","max","fit",...R()],te=()=>[Ks,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],I=()=>[e,le,ie],pe=()=>[...x(),n4,t4,{position:[le,ie]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",gH,fH,{size:[le,ie]}],q=()=>[Iw,hh,dl],X=()=>["","none","full",c,le,ie],D=()=>["",Ae,hh,dl],ae=()=>["solid","dashed","dotted","double"],Ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>[Ae,Iw,n4,t4],fe=()=>["","none",m,le,ie],qe=()=>["none",Ae,le,ie],Xe=()=>["none",Ae,le,ie],ve=()=>[Ae,le,ie],Se=()=>[Ks,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ii],breakpoint:[Ii],color:[c4],container:[Ii],"drop-shadow":[Ii],ease:["in","out","in-out"],font:[cH],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ii],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ii],shadow:[Ii],spacing:["px",Ae],text:[Ii],"text-shadow":[Ii],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ks,ie,le,b]}],container:["container"],"container-type":[{"@container":["","normal","size",le,ie]}],"container-named":[uH],columns:[{columns:[Ae,"auto",ie,le,a]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Q()}],"inset-x":[{"inset-x":Q()}],"inset-y":[{"inset-y":Q()}],start:[{"inset-s":Q(),start:Q()}],end:[{"inset-e":Q(),end:Q()}],"inset-bs":[{"inset-bs":Q()}],"inset-be":[{"inset-be":Q()}],top:[{top:Q()}],right:[{right:Q()}],bottom:[{bottom:Q()}],left:[{left:Q()}],visibility:["visible","invisible","collapse"],z:[{z:[Go,"auto",le,ie]}],basis:[{basis:[Ks,"full","auto",a,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,Ks,"auto","initial","none",ie]}],grow:[{grow:["",Ae,le,ie]}],shrink:[{shrink:["",Ae,le,ie]}],order:[{order:[Go,"first","last","none",le,ie]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:_()}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:_()}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:Z()}],mx:[{mx:Z()}],my:[{my:Z()}],ms:[{ms:Z()}],me:[{me:Z()}],mbs:[{mbs:Z()}],mbe:[{mbe:Z()}],mt:[{mt:Z()}],mr:[{mr:Z()}],mb:[{mb:Z()}],ml:[{ml:Z()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:se()}],"inline-size":[{inline:["auto",...K()]}],"min-inline-size":[{"min-inline":["auto",...K()]}],"max-inline-size":[{"max-inline":["none",...K()]}],"block-size":[{block:["auto",...te()]}],"min-block-size":[{"min-block":["auto",...te()]}],"max-block-size":[{"max-block":["none",...te()]}],w:[{w:[a,"screen",...se()]}],"min-w":[{"min-w":[a,"screen","none",...se()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...se()]}],h:[{h:["screen","lh",...se()]}],"min-h":[{"min-h":["screen","lh","none",...se()]}],"max-h":[{"max-h":["screen","lh","none",...se()]}],"font-size":[{text:["base",n,hh,dl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,bH,dH]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Iw,ie]}],"font-family":[{font:[mH,hH,t]}],"font-features":[{"font-features":[ie]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,le,ie]}],"line-clamp":[{"line-clamp":[Ae,"none",le,e4]}],leading:[{leading:["none",i,...R()]}],"list-image":[{"list-image":["none",le,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",le,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ae(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",le,dl]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Ae,"auto",le,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"tab-size":[{tab:[Go,le,ie]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le,ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",le,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:pe()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Go,le,ie],radial:["",le,ie],conic:["",Go,le,ie]},OH,pH]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:D()}],"border-w-x":[{"border-x":D()}],"border-w-y":[{"border-y":D()}],"border-w-s":[{"border-s":D()}],"border-w-e":[{"border-e":D()}],"border-w-bs":[{"border-bs":D()}],"border-w-be":[{"border-be":D()}],"border-w-t":[{"border-t":D()}],"border-w-r":[{"border-r":D()}],"border-w-b":[{"border-b":D()}],"border-w-l":[{"border-l":D()}],"divide-x":[{"divide-x":D()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":D()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ae(),"hidden","none"]}],"divide-style":[{divide:[...ae(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ae(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,le,ie]}],"outline-w":[{outline:["",Ae,hh,dl]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","inner","none",u,cO,lO]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",f,cO,lO]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Ae,dl]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":D()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",d,cO,lO]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Ae,le,ie]}],"mix-blend":[{"mix-blend":[...Ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":J()}],"mask-image-linear-to-pos":[{"mask-linear-to":J()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":J()}],"mask-image-t-to-pos":[{"mask-t-to":J()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":J()}],"mask-image-r-to-pos":[{"mask-r-to":J()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":J()}],"mask-image-b-to-pos":[{"mask-b-to":J()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":J()}],"mask-image-l-to-pos":[{"mask-l-to":J()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":J()}],"mask-image-x-to-pos":[{"mask-x-to":J()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":J()}],"mask-image-y-to-pos":[{"mask-y-to":J()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[le,ie]}],"mask-image-radial-from-pos":[{"mask-radial-from":J()}],"mask-image-radial-to-pos":[{"mask-radial-to":J()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":x()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":J()}],"mask-image-conic-to-pos":[{"mask-conic-to":J()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:pe()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",le,ie]}],filter:[{filter:["","none",le,ie]}],blur:[{blur:fe()}],brightness:[{brightness:[Ae,le,ie]}],contrast:[{contrast:[Ae,le,ie]}],"drop-shadow":[{"drop-shadow":["","none",h,cO,lO]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Ae,le,ie]}],"hue-rotate":[{"hue-rotate":[Ae,le,ie]}],invert:[{invert:["",Ae,le,ie]}],saturate:[{saturate:[Ae,le,ie]}],sepia:[{sepia:["",Ae,le,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",le,ie]}],"backdrop-blur":[{"backdrop-blur":fe()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,le,ie]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,le,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,le,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,le,ie]}],"backdrop-invert":[{"backdrop-invert":["",Ae,le,ie]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,le,ie]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,le,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,le,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",le,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",le,ie]}],ease:[{ease:["linear","initial",O,le,ie]}],delay:[{delay:[Ae,le,ie]}],animate:[{animate:["none",y,le,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,le,ie]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:qe()}],"rotate-x":[{"rotate-x":qe()}],"rotate-y":[{"rotate-y":qe()}],"rotate-z":[{"rotate-z":qe()}],scale:[{scale:Xe()}],"scale-x":[{"scale-x":Xe()}],"scale-y":[{"scale-y":Xe()}],"scale-z":[{"scale-z":Xe()}],"scale-3d":["scale-3d"],skew:[{skew:ve()}],"skew-x":[{"skew-x":ve()}],"skew-y":[{"skew-y":ve()}],transform:[{transform:[le,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Se()}],"translate-x":[{"translate-x":Se()}],"translate-y":[{"translate-y":Se()}],"translate-z":[{"translate-z":Se()}],"translate-none":["translate-none"],zoom:[{zoom:[Go,le,ie]}],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",le,ie]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":I()}],"scrollbar-track-color":[{"scrollbar-track":I()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",le,ie]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Ae,hh,dl,e4]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["start","end","right","left"],"inset-y":["inset-bs","inset-be","top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["ps","pe","pr","pl"],py:["pbs","pbe","pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["ms","me","mr","ml"],my:["mbs","mbe","mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-s","border-w-e","border-w-r","border-w-l"],"border-w-y":["border-w-bs","border-w-be","border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-s","border-color-e","border-color-r","border-color-l"],"border-color-y":["border-color-bs","border-color-be","border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ms","scroll-me","scroll-mr","scroll-ml"],"scroll-my":["scroll-mbs","scroll-mbe","scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-ps","scroll-pe","scroll-pr","scroll-pl"],"scroll-py":["scroll-pbs","scroll-pbe","scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var O4=KG(vH);var ue=(...e)=>O4(aO(e)),b4,y4=(e)=>void(b4=e??void 0),Fn=()=>b4,Ho=()=>matchMedia("(max-width:640px)").matches;function v4(){let e=new Map,t=new Map;return(n,r,o,i)=>{let s=e.get(n);if(e.set(n,r),s&&r!==s)t.set(n,i);return s!==void 0&&!!r&&r!==s&&!(o&&i-(t.get(n)??-1/0)<60000)}}var x4=Oe()(()=>({tasks:[],tasksLoaded:!1,tasksError:"",filter:"all",query:"",scope:"",taskId:"",taskDir:"",page:null,pageError:"",pending:!1,receipt:"",draft:""})),{getState:_ie,setState:Nie}=x4;var w4=()=>globalThis.kzTerm;var xH=()=>{let e=document.documentElement.dataset.motion;return e?e==="full":!matchMedia("(prefers-reduced-motion: reduce)").matches},uO=(e)=>xH()&&document.startViewTransition?document.startViewTransition(e).updateCallbackDone:(e(),Promise.resolve());var wH=["Adara","Alya","Bellatrix","Beryllium","Cobalt","Fluorine","Krypton","Palladium","Rubidium","Xenon"],Iie=["off",...wH,"chime","bell","pop"];var Zw;addEventListener("pointerdown",()=>{try{Zw=Zw||new AudioContext,Zw.resume()}catch(e){}},{once:!0});var fO=(e)=>e.split("/").pop(),Br=(e)=>e.includes("/")?e.slice(0,e.lastIndexOf("/")):"";function S4(e,t){let n=t.trim();if(!n||n===e)return null;return n.replace(/\.md$/i,"").split("/").map((r)=>r.trim()).join("/")}var k4=(e,t)=>Br(e)===Br(t)?"Renamed":`Moved to ${Br(t)||"the top"}`;function dO(e){let t=e.trim().toLowerCase();return{text:t,tag:t.startsWith("#")?t.slice(1):null}}function C4(e,t){if(!t.text)return e;let n=t.tag;return e.filter((r)=>n!==null?dh(r.text).some((o)=>o.tag===n||o.tag.startsWith(n+"/")):r.name.toLowerCase().includes(t.text)||r.text.toLowerCase().includes(t.text))}function R4(e){let t=new Map;for(let n of e)for(let r of new Set(dh(n.text).map((o)=>o.tag)))t.set(r,(t.get(r)??0)+1);return[...t].sort((n,r)=>r[1]-n[1]||n[0].localeCompare(r[0]))}var P4=(e,t)=>e==="#"+t?"":"#"+t;function T4(e,t){let n=e.map((r)=>r.name);return e.filter((r)=>r.name!==t&&rO(r.text).some((o)=>ul(o.name,n)===t))}function A4(e,t=Date.now()){let n=(t-e)/1000;return n<60?"now":n<3600?`${Math.floor(n/60)}m`:n<86400?`${Math.floor(n/3600)}h`:`${Math.floor(n/86400)}d`}function Q4(e,t,n){let r=t&&e.includes(t)?t:n;return r&&e.includes(r)?r:null}var E4="kz-note-wide",SH=()=>{try{return localStorage.getItem(E4)==="1"}catch{return!1}},M4=(e)=>{try{localStorage.setItem(E4,e?"1":"0")}catch{}},_e=Oe()(()=>({ready:!1,dir:"",projects:[],notes:[],board:N_(),open:null,doc:0,save:"saved",conflict:null,query:"",shut:{},full:!1,wide:SH(),drawer:!1,focus:null,titleRev:0})),{getState:Ot,setState:wt}=_e;var pl=null,Uw=(e)=>{pl=e};async function hO(e){try{let t=await fetch("/vault",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({dir:Ot().dir,...e})});return{status:t.status,...await t.json().catch(()=>({}))}}catch{return{status:0,error:"The board is not running"}}}var mt=new Gv({read:()=>pl?.text()??null,timer:{set:(e,t)=>setTimeout(e,t),clear:(e)=>clearTimeout(e)},save:async(e,t,n)=>{let r=await hO({op:"save",name:e,text:t,base:n});return r.ok?{ok:!0,mtime:r.mtime}:{ok:!1,status:r.status,error:r.error,text:r.text,mtime:r.mtime}},onState:(e,t)=>wt({save:e,conflict:t}),onSaved:(e,t,n)=>$4({name:e,mtime:n,text:t}),onError:Pe}),ml=()=>mt.flush(),$4=(e)=>wt((t)=>({notes:[e,...t.notes.filter((n)=>n.name!==e.name)]}));function D4(){let e=Ot();if(e.open&&pl&&mt.dirty&&!mt.conflict)fetch("/vault",{method:"POST",keepalive:!0,headers:{"content-type":"application/json"},body:JSON.stringify({dir:e.dir,op:"save",name:e.open,text:pl.text(),base:mt.base})}).catch(()=>{})}var _4=()=>mt.keepMine();function N4(){let e=mt.takeTheirs();if(e)pl?.replace(e.text)}async function Qu(){let{dir:e}=Ot(),t;try{t=await(await fetch("/vault?dir="+encodeURIComponent(e))).json()}catch{Pe("The board is not running");return}if(!t.notes){Pe(t.error||"Could not read notes");return}let n=t.notes,r=Ot().board;try{let i=await(await fetch("/links?dir="+encodeURIComponent(e))).json();if(Array.isArray(i.runs))r=i}catch{}if(Ot().dir!==e)return;wt({notes:n,board:r,ready:!0});let o=Ot().open&&n.find((i)=>i.name===Ot().open);if(o&&o.mtime!==mt.base&&!mt.dirty&&!mt.busy)mt.adopt(o.mtime),pl?.replace(o.text);pl?.refresh()}async function ho(e){if(e===Ot().open)return!0;if(await ml(),mt.dirty)return Pe(mt.conflict?"Choose Keep mine or Load theirs first":"This note is not saved yet"),!1;ZA();let t=Ot(),n=e?t.notes.find((r)=>r.name===e):null;mt.open(e,n?.mtime??0),wt({open:e,doc:t.doc+1,drawer:!1});try{e?sessionStorage.setItem("kz-note:"+t.dir,e):sessionStorage.removeItem("kz-note:"+t.dir)}catch{}return!0}async function L4(e,t=null){let n=await hO({op:"save",name:e,text:"",base:0});if(!n.ok)return Pe(n.status===409?"A note with that name exists":n.error||"Could not create the note"),!1;if($4({name:n.name,mtime:n.mtime,text:""}),t)wt({focus:t});let r=await ho(n.name);if(t&&!r)wt({focus:null});return r}async function kH(e){let t=ul(e,Yw());if(t)return void ho(t);await L4(e,"editor")}async function pO(){let e=Ot().open;if(await L4(w_(Yw(),e?Br(e):"")))wt({focus:"title"})}var Yw=()=>Ot().notes.map((e)=>e.name);async function z4(e){let t=Ot().open,n=t?S4(t,e):null,r=()=>wt((i)=>({titleRev:i.titleRev+1}));if(!t||!n)return r();await ml(),mt.hold();let o=await hO({op:"rename",name:t,to:e});if(!o.ok)return mt.release(),Pe(o.error||"Could not rename"),r();if(Ot().open!==t)return mt.release(),Qu();mt.renamed(n),wt({open:n}),await Qu(),mt.adopt(Ot().notes.find((i)=>i.name===n)?.mtime??mt.base),mt.release(),r(),Pe(k4(t,n))}async function j4(){let e=Ot().open;if(!e)return;if(!await zi({title:"Move this note to notes/.trash?",description:e,confirmLabel:"Delete",danger:!0})||Ot().open!==e)return;mt.discard();let n=await hO({op:"delete",name:e});if(!n.ok){Pe(n.error||"Could not delete");return}Pe("Moved to notes/.trash"),wt((r)=>({notes:r.notes.filter((o)=>o.name!==e)})),await ho(null)}async function I4(e){if(e===Ot().dir)return;if(!await ho(null))return;wt({dir:e,notes:[],ready:!1,query:""});let t=new URL(location.href);t.searchParams.set("dir",e),window.history.replaceState(null,"",t),await Qu()}var mO=(e)=>wt({query:e}),X4=(e,t)=>wt((n)=>{if(!!n.shut[e]===!t)return{};let r={...n.shut};if(t)delete r[e];else r[e]=!0;return{shut:r}}),gO=(e)=>wt({full:e});function B4(e){M4(e),wt({wide:e})}var ph=(e)=>wt({drawer:e}),Z4={names:Yw,board:()=>Ot().board,dir:()=>Ot().dir,edited:()=>mt.edit(),save:()=>void ml(),openNote:(e)=>void ho(e),openOrCreate:(e)=>void kH(e),search:mO,toast:Pe,async go(e){if(await ml(),mt.dirty)return Pe("This note is not saved yet");location.href=e}};async function Y4(e={}){CH();let t;try{t=await(await fetch("/state")).json()}catch{Pe("The board is not running");return}let n=null;try{n=localStorage.getItem("kz-proj")}catch{}let r=k_(new URLSearchParams(location.search).get("dir"),n,t.dir,t.known??t.projects);wt({dir:r.dir,projects:r.projects}),await Qu();let o=null;try{o=sessionStorage.getItem("kz-note:"+r.dir)}catch{}let i=Q4(Ot().notes.map((a)=>a.name),new URLSearchParams(location.search).get("note"),o);if(i)await ho(i);let s=()=>{let a=new EventSource("/events");a.onmessage=(l)=>{if(l.data!=="changed")return;Qu(),e.onChanged?.()},a.onerror=()=>{a.close(),setTimeout(s,3000)}};s()}var U4=!1;function CH(){if(U4)return;U4=!0,addEventListener("beforeunload",(e)=>{if(mt.dirty)e.preventDefault()}),document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden")ml()}),W_(ml),addEventListener("pagehide",D4)}var Eu=Oe()(()=>({dark:!1,min:!1,setup:null,openSetup:null,look:0})),{getState:V4,setState:mh}=Eu,q4=(e)=>mh({setup:e&&e.resume?{resume:!0,step:e.step??0,total:e.total??4}:null});var OO=(e)=>{try{return localStorage.getItem(e)}catch{return null}},G4="(max-width:1100px)",H4="(max-width:640px)",RH=(e,t,n)=>n||(e?e==="min":t);function Vw(e,t){let n=matchMedia("(max-width:640px)").matches,r=RH(t,matchMedia("(max-width:1100px)").matches,n);return e.dataset.rail=r?"min":"full",e.dataset.hide=!n&&t==="min"?"1":"0",r}function W4(e=document.documentElement){Vw(e,OO("kz-rail"));let t=window.kaizenDesktop;if(t){if(e.classList.add("desk"),t.platform==="darwin")e.classList.add("mac")}if(OO("kz-color")==="blue")e.dataset.color="blue";let n=OO("kz-theme");if(n)e.dataset.theme=n;let r=OO("kz-motion");if(r)e.dataset.motion=r}function F4(){let e=navigator;if(!matchMedia("(display-mode:standalone)").matches&&!e.standalone)return;let t=document.querySelector("meta[name=viewport]");if(t)t.content+=",maximum-scale=1,user-scalable=no";if(addEventListener("gesturestart",(n)=>n.preventDefault()),e.standalone)addEventListener("resize",()=>scrollTo(0,0))}var Xi=()=>document.documentElement,PH=(e)=>{try{return localStorage.getItem(e)}catch{return null}},e3=(e,t)=>{try{t===null?localStorage.removeItem(e):localStorage.setItem(e,t)}catch{}},TH=()=>window.kaizenDesktop,AH=()=>matchMedia("(prefers-color-scheme: dark)").matches,K4=()=>Xi().dataset.theme?Xi().dataset.theme==="dark":AH(),qw=()=>{mh({dark:K4()}),TH()?.titleBar?.(K4())},t3=()=>{mh((e)=>({look:e.look+1})),w4()?.retheme()};function n3(e){if(e==="system")delete Xi().dataset.theme;else Xi().dataset.theme=e;e3("kz-theme",e==="system"?null:e),qw(),t3()}var vO=()=>n3(V4().dark?"light":"dark"),yO=null,QH=()=>matchMedia(G4),EH=()=>matchMedia(H4),bO=()=>mh({min:Vw(Xi(),yO)});function xO(){yO=Xi().dataset.rail==="min"?"full":"min",e3("kz-rail",yO),bO()}var J4=!1;function r3(){if(J4)return;if(J4=!0,W4(),!Xi().dataset.boot)F4();yO=PH("kz-rail"),QH().addEventListener("change",bO),EH().addEventListener("change",bO),bO(),addEventListener("storage",(e)=>{let t={"kz-theme":"theme","kz-color":"color","kz-motion":"motion"}[e.key??""];if(!t)return;if(e.newValue)Xi().dataset[t]=e.newValue;else delete Xi().dataset[t];t3()}),matchMedia("(prefers-color-scheme: dark)").addEventListener("change",qw),qw(),fetch("/onboarding").then((e)=>e.ok?e.json():null).then(q4).catch(()=>{})}var MH=Oe()(()=>({on:!1})),gh=(e)=>MH.setState({on:e});var Tt=Oe()(()=>({state:{project:null,projects:[],cards:[],now:Date.now(),all:!1,dir:null},loaded:!1,all:typeof location>"u"?!0:new URLSearchParams(location.search).get("all")!=="0",dir:null,every:null,tasks:null,sources:null,shells:[],changed:0})),{getState:hn,setState:ea}=Tt,gl=(e,t)=>Tt.subscribe((n,r)=>e(n)!==e(r)?t(e(n),e(r)):void 0);var o3=(e)=>e?.filter((t)=>t.attention.category==="needs-you").length??0,i3=(e)=>(e?.icebox??[]).filter((t)=>t.status==="new"&&!t.asleep).length;var s3=2000,a3=2000,l3=30000,c3=(e)=>e.replace(/"now":\d+\}$/,"");var $H=["settings","sources","terminal","board","tasks","task","run","chat","device"];function wO(e,t){let n=e==="icebox"?"sources":e==="ws"?"run":e==="ideas"?"tasks":e??"";if(!$H.includes(n))n="home";if(t?n==="board"||n==="sources":n==="chat"||n==="device")n="home";return n}var DH=(e,t)=>wO(new URLSearchParams(e).get("view"),t),u3=(e,t,n)=>n?"board":DH(e,t);var f3=(e,t)=>e==="home"?t:"?view="+(e==="sources"?"icebox":e),d3=(e,t)=>e==="task"?t?"device":"tasks":e==="run"&&t?"device":e,_H={sources:"Icebox",tasks:"Tasks",task:"Task",run:"Run",terminal:"Terminal",chat:"Chat",device:"Runs"},h3=(e,t)=>e==="home"?t?"kaizen":"Chat":_H[e]??"Board",p3=(e,t)=>e==="tasks"?"tasks":e==="task"?"task":e==="sources"?"icebox":e==="home"&&!t||e==="chat"?"home":"",m3=(e)=>e==="tasks"?"tasks":e==="task"?"task":e==="sources"?"icebox":"";function Gw(e){let t=new URLSearchParams(e);if(t.get("view")!=="run"&&t.get("view")!=="ws")return null;let n=t.get("dir");if(!n)return null;return{dir:n,...t.get("ws")?{ws:t.get("ws")}:{},...t.get("id")?{id:t.get("id")}:{},...t.get("idea")!==null?{idea:t.get("idea")}:{}}}var g3=(e,t)=>({view:e,lit:d3(e,t),title:h3(e,t),mark:e==="home"&&t,page:m3(e)}),O3=(e,t,n)=>{let r=p3(t,n);return r&&!e.includes(r)?[...e,r]:e},LH=()=>{let e=typeof location>"u"?"":location.search,t=typeof matchMedia>"u"?!1:Ho(),n=u3(e,t,typeof document<"u"&&document.documentElement.hasAttribute("data-kit"));return{...g3(n,t),seen:O3([],n,t),search:e,run:Gw(e),menu:!1,visit:0}},po=Oe()(LH),Bi=po.getState,SO={};var b3=()=>po.setState({search:location.search,run:Gw(location.search)});function Ww(e,t=!1){let n=Ho(),r=wO(e,n),o=Bi().view;if(SO.prepare?.(r),wr(()=>po.setState((i)=>({...g3(r,n),seen:O3(i.seen,r,n),menu:!1,visit:i.visit+1}))),SO.leave?.(r,o),t&&r!==o&&r!=="run"&&r!=="task")history.pushState(null,"",f3(r,location.pathname));b3(),SO.enter?.(r,o)}var Hw=!1;function y3(e){if(SO.before?.(wO(e,Ho())),e==="board"&&Bi().view==="board"){let t=Hw;return Hw=!1,void(t?history.back():uO(()=>Ww("home",!0)))}uO(()=>{Ww(e,!0),Hw=e==="board"})}var zH=(e)=>({cards:e.cards,projects:[...e.projects,...e.rail??[]],agents:e.agents??[]}),Jw=0;function jH(e,t={}){Jw++,ea({every:e,...t})}var v3="",Fw=!1,kO=!1,x3=0,w3;async function Oh(){if(Fw){kO=!0;return}let e=x3+s3-Date.now();if(e>0){w3??=setTimeout(()=>{w3=void 0,Oh()},e);return}x3=Date.now(),Fw=!0;do{kO=!1;let t=Jw;try{let n=await fetch("/state?all=1");if(!n.ok)continue;let r=await n.text(),o=c3(r);if(o===v3)continue;if(!kO&&t===Jw){v3=o;let i=JSON.parse(r);jH(zH(i))}}catch{}}while(kO);Fw=!1}var S3=0,Kw=!1;async function k3(){if(Kw||Date.now()-S3<a3)return;Kw=!0,S3=Date.now();try{let e=await fetch("/tasks?all=1");if(e.ok)ea({tasks:(await e.json()).tasks??[]})}catch{}finally{Kw=!1}}var C3=0;async function IH(e=!1){if(!e&&Date.now()-C3<l3)return;C3=Date.now();try{let t=await fetch("/sources");if(t.ok)ea({sources:await t.json()})}catch{}}async function R3(){try{return ea({shells:await(await fetch("/shells")).json()}),!0}catch{return!1}}function P3(e=!1){return k3(),gl((t)=>t.every,()=>{if(IH(),k3(),e)R3()})}var T3={cards:[],projects:[],agents:[],tasks:null},Mu=()=>{let e=Tt((n)=>n.every),t=Tt((n)=>n.tasks);return ce(()=>e?{...e,tasks:t}:{...T3,tasks:t},[e,t])},Ol=()=>{let{every:e,tasks:t}=Tt.getState();return e?{...e,tasks:t}:{...T3,tasks:t}};function bh(e){return e.toLowerCase().trim().replace(/[^a-z0-9/._-]+/g,"-").replace(/\.{2,}/g,".").replace(/\/{2,}/g,"/").replace(/(^|\/)[-.]+/g,"$1").slice(0,60).replace(/[-./]+(\/|$)/g,"$1").replace(/\/$/,"").replace(/\.lock(\/|$)/g,"-lock$1")}var CO=Oe()(()=>({open:null})),XH=0,Wo=(e={})=>CO.setState({open:{...e,n:++XH}}),$u=()=>CO.setState({open:null});async function Zi(e,t){try{let n=await fetch(e,t?{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)}:void 0),r=await n.json().catch(()=>({}));return{ok:n.ok,d:n.ok?r:{error:r.error||r.why||"that did not work"}}}catch{return{ok:!1,d:{error:"kaizen is offline"}}}}var BH=(e)=>e.includes("\\")?"\\":"/",A3=(e,t)=>e.replace(/[\\/]+$/,"")+BH(e)+t,Q3=(e)=>!!e&&!/[\\/:*?"<>|]/.test(e),E3=(e,t,n=()=>Math.random().toString(36).slice(2,6))=>e.trim()||bh(t)||"workspace-"+n(),yh="__current";var RO=new Map,vh=(e)=>e.key+"@"+(e.born??0),M3={conflict:0,failed:0,asking:0,working:1,done:2},Du={conflict:"Conflict",failed:"Land failed",asking:"Asking",working:"Working",done:"Done"},eS={conflict:"fail",failed:"fail",asking:"wait",working:"build",done:"done"};function $3(e,t,n=RO){if(e.land)return e.land==="conflict"?"conflict":"failed";if(e.asking)return"asking";if(e.busy)return n.set(vh(e),t),"working";return t-(n.get(vh(e))??-1/0)<3000?"working":"done"}var D3=(e,t,n=RO)=>Math.min(1/0,...e.filter((r)=>!r.asking&&!r.busy&&n.has(vh(r))).map((r)=>3000-(t-n.get(vh(r)))).filter((r)=>r>0)),_3=(e,t=RO)=>{let n=new Set(e.map(vh));for(let r of t.keys())if(!n.has(r))t.delete(r)},N3=(e,t,n,r,o,i=RO)=>e.filter((s)=>s.dir===t&&r({state:s.dir,ws:s.ws})===n).map((s)=>({a:s,st:$3(s,o,i)})).sort((s,a)=>M3[s.st]-M3[a.st]),tS=({a:e,st:t})=>(e.land?"":e.last)||`${Du[t]} - ${e.name}`;var ZH=86400000,z3={dirs:[],running:!0,done:!1},wh=(e)=>e.kind==="run"&&e.status==="done"&&e.accept!=="needs"&&!e.archived&&e.git==="pending";var _u=(e,t)=>t?.find((n)=>n.dir===e.state&&(n.id===e.taskId||e.kind==="run"&&[n.activeRun,...(n.runs??n.runIds??[]).map((r)=>typeof r==="string"?r:r.id),...n.legacy?.kind==="run"?[n.legacy.id]:[]].includes(e.id))),nS={wait:0,plan:1,build:2,review:3,stalled:4,idle:5,done:6,aband:7};function xh(e,t){if(t&&!(e.kind==="run"&&(e.status==="done"||e.status==="abandoned")))return t.attention.category==="needs-you"?"wait":t.attention.category==="completed"?"done":["interrupted","failed"].includes(t.status??"")?"stalled":t.status==="draft"?"idle":"build";if(e.kind==="idea")return!e.pty?.alive?"idle":e.pty.asking?"wait":e.pty.busy?"plan":"idle";if(e.status==="waiting"||e.pty?.alive&&e.pty.asking)return"wait";if(e.status==="done")return e.accept==="needs"||wh(e)?"wait":"done";if(e.status==="abandoned")return"aband";if(e.status==="stalled")return"stalled";return e.column>=3?"review":e.column===2?"build":"plan"}var L3=(e,t)=>!e.archived&&(e.kind==="idea"?!!e.pty:!["done","abandoned"].includes(e.status)||t-(e.moved??0)<ZH),Nu=(e)=>(e.title||e.text||"").split(`
45
+ `)[0],rS=(e)=>`/?view=run&dir=${encodeURIComponent(e.state)}&`+(e.kind==="run"?"id="+encodeURIComponent(e.id):"idea="+encodeURIComponent(e.text)),pn=(e,t)=>{let n=t?.find((r)=>r.dir===e)?.label||e.replace(/[\\/]\.kaizen$/,"");return n.split(/[\\/]/).pop()||n},Ui=(e)=>e.branch||(e.main?"workspace":e.path.split(/[\\/]/).pop()),UH=(e)=>e.path.split(/[\\/]/).pop()||e.path;function PO(e,t){let n=t?.find((r)=>r.dir===e.state)?.workspaces??[];return n.find((r)=>r.path===e.ws)?.path??n.find((r)=>r.main)?.path??e.ws??""}var bl=(e,t)=>e+"\x00"+t;function j3(e,t){let{filt:n,now:r}=t,o=new Set(t.pins),i=new Set(t.folded),s=e.tasks,a=(h)=>PO(h,e.projects),l=e.projects.filter((h)=>h.workspaces?.length),c=new Map,u=(h)=>h.filter((m)=>m.st==="done"?n.done:n.running),f=(h)=>{let m=xh(h,_u(h,s));return n.running&&["wait","plan","build","review","stalled"].includes(m)||n.done&&(m==="done"||m==="aband")},d=(h)=>xh(h,_u(h,s));for(let h of e.cards.filter((m)=>L3(m,r)&&f(m))){let m=h.state+"\x00"+a(h);if(!c.has(m))c.set(m,[]);c.get(m).push(h)}return l.filter((h)=>!n.dirs.length||n.dirs.includes(h.dir)).map((h)=>{let m=h.dir,g=h.workspaces.map((b)=>{let O=c.get(m+"\x00"+b.path)??[],y=e.cards.filter((S)=>S.state===m&&a(S)===b.path&&L3(S,r)),v=y.length>0&&y.every((S)=>["done","abandoned"].includes(d(S))),x=u(N3(e.agents,m,b.path,a,r)),w=O.length>0||x.length>0||n.running&&(b.main||!v);return{w:b,cs:O,ags:x,keep:w}}).filter((b)=>b.keep).sort((b,O)=>+o.has(bl(m,O.w.path))-+o.has(bl(m,b.w.path)));return{dir:m,name:pn(m,e.projects),git:h.workspaces.some((b)=>b.branch),mainWs:h.workspaces?.find((b)=>b.main)?.path??h.workspaces?.[0]?.path??m,shut:i.has(m)||!g.length,empty:!g.length,rows:g.map(({w:b,cs:O,ags:y})=>{let v=O.length?d([...O].sort((x,w)=>nS[d(x)]-nS[d(w)])[0]):"";return{w:b,path:b.path,label:Ui(b),folder:UH(b),pinned:o.has(bl(m,b.path)),st:v==="wait"||y[0]?.st==="asking"?"wait":y.some((x)=>x.st==="working")?"build":v||(y.length?"done":""),agents:y,open:!!t.open[bl(m,b.path)],tasks:YH(s,m,b,O,n)}})}}).filter((h)=>h.rows.length||n.running)}function YH(e,t,n,r,o){return(e??[]).filter((i)=>i.dir===t&&!i.legacy&&i.attention.category!=="completed"&&o.running&&i.status!=="draft"&&(r.some((s)=>_u(s,e)?.id===i.id)||n.main&&!(i.runs??i.runIds??[]).length)).sort((i,s)=>(i.created??0)-(s.created??0))}var I3=(e)=>e.attention.category==="needs-you"?"wait":e.attention.category==="completed"?"done":["interrupted","failed"].includes(e.status??"")?"stalled":e.status==="draft"?"idle":"build",X3=(e,t)=>e.dirs.some((n)=>t.includes(n))||!e.running||e.done,B3=(e,t,n)=>e.filter((r)=>t(r).toLowerCase().includes(n.toLowerCase())),Z3=(e)=>["conflict","failed","asking","working","done"].map((t)=>({st:t,rs:e.filter((n)=>n.st===t)})).filter((t)=>t.rs.length);function U3(e,t,n){let r=new URLSearchParams(e),o=r.get("id")&&t.find((i)=>i.kind==="run"&&i.state===r.get("dir")&&i.id===r.get("id"));return{dir:r.get("dir"),ws:r.get("ws")??(o?PO(o,n):null)}}var Y3=(e,t,n)=>{let r=e.filter((o,i)=>i!==t);return r.splice(n>t?n-1:n,0,e[t]),r},V3=(e,t)=>{let n=e.findIndex((r)=>t<r.top+r.height/2);return n<0?e.length:n};function q3(e,t,n){let r=e.indexOf(t);return r>=0&&n!==r&&n!==r+1?Y3(e,r,n):null}var TO=(e,t)=>{try{return JSON.parse(localStorage.getItem(e)||"null")??t}catch{return t}},AO=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch{}};gl((e)=>e.every,(e)=>e&&_3(e.agents));var oS=(e)=>_u(e,hn().tasks),ta={filt:"kz-rail-filter2",folded:"kz-rail-folded",pins:"kz-ws-pins",open:"kz-wsopen"},St=Oe()(()=>({filt:{...z3,...TO(ta.filt,{})},folded:TO(ta.folded,[]),pins:TO(ta.pins,[]),open:TO(ta.open,{}),q:"",tick:0})),G3=()=>St.setState((e)=>({tick:e.tick+1})),H3=(e)=>St.setState({q:e});function Sh(e){let t={...St.getState().filt,...e};AO(ta.filt,t),St.setState({filt:t})}function iS(e,t){let n=new Set(St.getState().folded);for(let o of e)t?n.add(o):n.delete(o);let r=[...n];AO(ta.folded,r),St.setState({folded:r})}var W3=(e)=>iS([e],!St.getState().folded.includes(e));function F3(e,t){let n=bl(e,t),r=St.getState().pins,o=r.includes(n)?r.filter((i)=>i!==n):[...r,n];AO(ta.pins,o),St.setState({pins:o})}function K3(e,t){let n=bl(e,t),r={...St.getState().open};if(r[n])delete r[n];else r[n]=!0;AO(ta.open,r),St.setState({open:r})}function J3(e){let t=new Map(e.map((r,o)=>[r,o])),n=hn().every;if(n)ea({every:{...n,projects:[...n.projects].sort((r,o)=>(t.get(r.dir)??1e9)-(t.get(o.dir)??1e9))}})}var QO=(e)=>xh(e,oS(e)),VH=(e)=>typeof e==="string"&&/[\\/]\.kaizen[\\/]home$/.test(e),na=(e,t)=>VH(e)?"/?view=board&homews=1":`/?view=ws&dir=${encodeURIComponent(e)}&ws=${encodeURIComponent(t)}`,eN=()=>Ol().projects.filter((e)=>e.workspaces?.some((t)=>t.branch)).map((e)=>({dir:e.dir,name:pn(e.dir,Ol().projects)})),yl=(e,t=Ol().projects)=>PO(e,t);var tN=Oe()(()=>({shown:(()=>{try{return JSON.parse(localStorage.getItem("kz-show")??"null")||[]}catch{return[]}})()}));var EO=Oe()(()=>({at:null})),MO=(e,t,n)=>EO.setState({at:{x:e,y:t,items:n}}),nN=()=>EO.setState({at:null});var sle=typeof location<"u"&&new URLSearchParams(location.search).has("all");var Yi={add:()=>{},search:()=>{}},iN=(e,t)=>Qe.open.task({id:e,dir:t}),sS=(e,t)=>Qe.open.ws({dir:e,ws:t}),sN=(e,t,n)=>{if(!Qe.open.term({dir:e,ws:t,key:n}))Qe.navigate(Qe.wsHref(e,t))},aN=(e)=>Wo({dir:e,start:"ws"});async function rN(e,t,n){Pe(n==="update"?"Updating…":"Deleting…");let r=await fetch("/workspace",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({dir:e,ws:t,op:n})}).catch(()=>null),o=await r?.json().catch(()=>({}));Pe(r?.ok?n==="update"?o.out||"Updated":"Deleted":o?.error||o?.why||"Failed")}var oN=(e)=>navigator.clipboard.writeText(e).then(()=>Pe("Copied"),()=>Pe("Could not copy"));function lN(e,t){let n=hn().every?.projects.find((i)=>i.dir===e)?.workspaces?.find((i)=>i.path===t);if(!n)return[];let r=Ui(n),o=St.getState().pins.includes(e+"\x00"+t);return[...n.main?[]:[{label:"Update",run:()=>void rN(e,t,"update")}],{label:"Copy path",run:()=>void oN(t)},{label:"Copy worktree name",run:()=>void oN(r)},{label:o?"Unpin":"Pin",run:()=>F3(e,t)},...n.main?[]:[{label:"Delete",run:async()=>{if(await zi({title:`Delete worktree "${r}"?`,description:`Removes the folder. Refused while it has uncommitted changes. The branch stays.
46
+
47
+ ${t}`,confirmLabel:"Delete",danger:!0}))rN(e,t,"delete")}}]]}var cN=(e)=>{let t=()=>Pe("Could not save the project order");fetch("/projects/order",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({dirs:e})}).then((n)=>!n.ok&&t(),t)};var uN={lift:null,to:-1};function fN(e,t){let[n,r]=A(uN),o=T(!1),i=T(t);return i.current=t,L(()=>{let a=e.current;if(!a)return;let l=null,c=!1,u=()=>[...a.querySelectorAll(":scope > .pgrp")],f=(w)=>r((S)=>S.lift===w.lift&&S.to===w.to?S:w),d=(w)=>{if(!l)return;clearTimeout(l.hold);let S=c,{dir:k,to:R}=l,Q=u().map((_)=>_.querySelector(".proj").dataset.proj);if(l=null,c=!1,f(uN),S)o.current=!0;let E=S&&w?q3(Q,k,R):null;if(E)i.current(E);if(S)setTimeout(()=>o.current=!1,0)},h=()=>{if(!l)return;c=!0,f({lift:l.dir,to:l.to});try{l.bar.setPointerCapture(l.id)}catch{}navigator.vibrate?.(8)},m=(w)=>{let S=w.target.closest(".pgrp > .proj");if(!S||w.button!==0||S.parentElement?.parentElement!==a)return;if(l={dir:S.dataset.proj,bar:S,id:w.pointerId,x:w.clientX,y:w.clientY,to:-1},w.pointerType!=="mouse")l.hold=setTimeout(h,300)},g=(w)=>{if(!l||w.pointerId!==l.id)return;let S=Math.hypot(w.clientX-l.x,w.clientY-l.y);if(!c){if(w.pointerType==="mouse"?S>5:S>8)w.pointerType==="mouse"?h():d(!1);if(!c)return}w.preventDefault(),l.to=V3(u().map((k)=>k.getBoundingClientRect()),w.clientY),f({lift:l.dir,to:l.to})},b=(w)=>l&&w.pointerId===l.id&&d(!0),O=()=>d(!1),y=(w)=>c&&w.preventDefault(),v=(w)=>l&&w.preventDefault(),x=(w)=>{if(c&&w.key==="Escape")w.preventDefault(),d(!1)};return a.addEventListener("pointerdown",m),a.addEventListener("pointermove",g),a.addEventListener("pointerup",b),a.addEventListener("pointercancel",O),a.addEventListener("touchmove",y,{passive:!1}),a.addEventListener("contextmenu",v,!0),addEventListener("keydown",x),()=>{clearTimeout(l?.hold),a.removeEventListener("pointerdown",m),a.removeEventListener("pointermove",g),a.removeEventListener("pointerup",b),a.removeEventListener("pointercancel",O),a.removeEventListener("touchmove",y),a.removeEventListener("contextmenu",v,!0),removeEventListener("keydown",x)}},[e]),{view:n,swallow:()=>{let a=o.current;return o.current=!1,a}}}var _le=typeof matchMedia==="function"?matchMedia("(max-width:640px)"):null;var dN=(e,t,n)=>{try{return JSON.parse(e().getItem(t)??"null")??n}catch{return n}},aS=Oe()(()=>({snap:null,tab:(()=>{try{return localStorage.getItem("kz-ideas-tab")==="backlog"?"backlog":"ideas"}catch{return"ideas"}})(),sev:null,order:dN(()=>localStorage,"kz-order",{}),picking:!1,picked:[],unfolded:[],kidsOpen:[],form:(()=>{let e=dN(()=>sessionStorage,"kz-form",null);return e?{mode:e[0],key:e[1]??void 0}:null})(),popup:null,filter:null,query:(()=>{try{return sessionStorage.getItem("kz-d:bq")??""}catch{return""}})(),archive:!1,mode:(()=>{try{return localStorage.getItem("kz-board-mode")==="runs"?"runs":"ws"}catch{return"ws"}})(),flash:[],names:{}})),{getState:kh,setState:Lu}=aS,qH=(e)=>{Lu({form:e});try{sessionStorage.setItem("kz-form",JSON.stringify(e&&["new","edit","reject"].includes(e.mode)?[e.mode,e.key??null]:null))}catch{}};var hN=()=>kh().form?.mode==="new"&&qH(null);var vl=(e,t)=>`ws:${e}:${t}`,Vi=(e)=>typeof e==="string"?[e]:e.kids.flatMap(Vi);var GH="kz-runtabs";function HH(e){let t=Array.isArray(e.screens)&&e.screens.every((o)=>o?.tree)?e.screens:[],{split:n,...r}=e;return{...r,tabs:(e.tabs??[]).filter((o)=>o&&o.kind!=="run"),hidden:(e.hidden??[]).filter((o)=>typeof o==="string"&&!o.startsWith("rn:")),screens:t,on:e.on??null}}function WH(e){try{let t=JSON.parse(e||"{}");return Object.fromEntries(Object.entries(t).filter(([,n])=>n&&typeof n==="object").map(([n,r])=>[n,HH(r)]))}catch{return{}}}var FH=()=>{try{return WH(localStorage.getItem(GH))}catch{return{}}};var lS=Oe()(()=>({all:FH(),dragging:null,target:null,browse:null,previewTick:0})),rce=lS.setState;var KH="kz-sent",Ch=Oe()(()=>({body:"",term:null,terms:[],head:null,tabs:[],tab:"",wantTab:"request",ptabs:[],runDoc:null,footer:null,doc:null,fix:null,off:[],open:!1,docked:!1,wide:!1,parked:!1,pn:!1,ro:!1,instant:!1,title:"",titleTip:"",top:0,openKey:null,card:null,openN:0,fetchAsk:0,drawAsk:0,keepNext:!1,hit:null,wantTerm:null,wantPty:null,sent:(()=>{try{return JSON.parse(sessionStorage.getItem(KH)??"[]")||[]}catch{return[]}})()})),{getState:Fo,setState:Ko}=Ch;var JH="kz-rflip";function eW(){try{return!Ho()&&localStorage.getItem(JH)==="1"}catch{return!1}}var mN=Oe()(()=>({message:null,screens:[],on:null,split:!1,agents:[],defAgent:"",pty:!0,titles:{},items:[],wsk:null,ws:null,history:[],empty:!1,menu:null,hint:!1,notes:null,picker:null,kept:{},recent:[],flip:eW(),awaiting:!1,focus:{id:null,n:0}}));var DO=mN.setState;var hce=Oe()(()=>({file:null}));var iW=Oe()(()=>({st:{}}));var ON=Oe()(()=>({snap:null,ui:{},busy:null,busyRun:null,confirm:null}));var{getState:cW,setState:bN}=ON;var yN=Oe()(()=>({ctx:null,card:null,shells:[],agents:[],defAgent:"",noPty:!1,elsewhere:[],selectTerm:null})),{getState:NO,setState:fS}=yN;var kN=Oe()(()=>({view:null,files:{},refocus:null})),{getState:MW,setState:CN}=kN;var Kde=" "+String.fromCharCode(10);function hS(e,t){let n=e&&"dir"in e?e:null;hN(),Lu({popup:{kind:"new",dir:n?.dir??null,choose:!!n,text:t}})}var vpe=Oe()(()=>({sheet:null}));var Dpe=Oe()(()=>({mode:null,net:{self:null,computers:[],tailscale:!1},usage:[],allDevices:!1}));var NW=[["grid","Grid","lgrid"],["cols","Side by side","lcols"],["rows","Stacked","lrows"]],PN="kz-terms";var RN={mode:"grid",order:[],hidden:[],max:null,sizes:{}};function LO(e){try{let t={...RN,...JSON.parse(e||"{}")};return NW.some((n)=>n[0]===t.mode)?t:{...t,mode:"grid"}}catch{return RN}}var TN=(e,t)=>t.hidden.filter((n)=>e.get(n)?.pty.alive).length;var LW=()=>{try{return LO(localStorage.getItem(PN))}catch{return LO(null)}},ju=Oe()(()=>({showing:!1,seen:!1,all:new Map,lay:typeof localStorage>"u"?LO(null):LW(),pick:null})),zW=ju.setState;function pS(e,t){let n=new Map;for(let r of e){if(r.archived||!r.pty)continue;for(let o of r.pty.all?.length?r.pty.all:[r.pty.key]){let i=o===r.pty.key?r.pty:{key:o,alive:!0,asking:!1};n.set(o,{...r,pty:i})}}for(let r of t)n.set(r.key,{kind:"shell",text:r.title,where:r.dir.replace(/[\\/]\.kaizen$/,""),state:r.dir,pty:{key:r.key,alive:!0,asking:!1}});return n}function AN(){let e=ju((o)=>o.lay),t=Tt((o)=>o.every?.cards??o.state.cards),n=Tt((o)=>o.shells),r=Tt((o)=>o.loaded);return ce(()=>r?TN(pS(t,n),e):0,[r,t,n,e])}var Rge=v4();function QN(e,t){if(e===t)return!0;if(Math.abs(e.length-t.length)>1)return!1;let n=0;while(n<e.length&&n<t.length&&e[n]===t[n])n++;if(e.length===t.length){if(e.slice(n+1)===t.slice(n+1))return!0;return e[n]===t[n+1]&&e[n+1]===t[n]&&e.slice(n+2)===t.slice(n+2)}let[r,o]=e.length<t.length?[e,t]:[t,e];return r.slice(n)===o.slice(n+1)}var IW=(e,t)=>e.includes(t)||t.length>=4&&e.split(/[^\p{L}\p{N}]+/u).some((n)=>QN(t,n.slice(0,t.length))||QN(t,n));function EN(e,t){let n=t.toLowerCase().split(/\s+/).filter(Boolean);if(!n.length)return e;let r=t.trim().toLowerCase(),o=(i)=>{let s=i.title.toLowerCase();return s===r?0:s.startsWith(r)?1:s.split(/[^\p{L}\p{N}]+/u).some((a)=>a.startsWith(r))?2:s.includes(r)?3:4};return e.filter((i)=>{let s=(i.title+" "+(i.sub??"")+" "+i.hay).toLowerCase();return n.every((a)=>IW(s,a))}).sort((i,s)=>o(i)-o(s)||+(s.dot==="wait")-+(i.dot==="wait")||(s.at??0)-(i.at??0))}var oa=Oe()(()=>({open:!1,newTask:()=>{}})),XW=["Current","Workspaces","Runs","Tasks","Chats & terminals"];function MN(e,t,n){let r=t.trim();if(!r){let s=(u,f)=>(f.at??0)-(u.at??0),a=e.filter((u)=>u.dot==="wait"&&(u.group==="Runs"||u.group==="Tasks")).sort(s).slice(0,3),l=e.filter((u)=>XW.includes(u.group)&&!a.includes(u)).sort(s).slice(0,5),c=[...a.map((u)=>({...u,group:"Needs you"})),...l.map((u)=>({...u,group:u.group==="Current"?"Current":"Recent"}))];if(c.length<4)c.push(...e.filter((u)=>u.group==="Actions"&&u.page).map((u)=>({...u,group:"Go to"})));return c}let o=EN(e,t),i=[...new Set(o.map((s)=>s.group))].flatMap((s)=>o.filter((a)=>a.group===s).slice(0,8));return i.push({group:"Create",title:`New task "${r}"`,hay:"",ico:"plus",act:()=>n(r)}),i}var wl=()=>!1,ia=(e)=>wl()?void(location.href=e):fl(e),xl=(e,t)=>()=>wl()?y3(e):ia(t),$N=(e,t)=>{if(!Qe.open.ws({dir:e,ws:t}))ia(na(e,t))},NN=()=>{try{return JSON.parse(localStorage.getItem("kz-runtabs")||"{}")}catch{return{}}},BW=(e,t,n)=>{if(Qe.open.tab({dir:e,ws:t,id:n}))return;let r=NN(),o=r[vl(e,t)],i=o?.screens?.find((s)=>Vi(s.tree).includes(n));if(i)try{o.on=i.id,localStorage.setItem("kz-runtabs",JSON.stringify(r))}catch{}ia(na(e,t))},ZW=["local","preview","note","history","shell"],UW=(e)=>{try{return localStorage.getItem("kz-browse:"+e)?.replace(/^https?:\/\//,"").replace(/\/$/,"")}catch{}},YW={wait:"needs you",plan:"planning",build:"building",review:"in review",stalled:"stalled",done:"done",aband:"abandoned"};function LN({cards:e,projects:t=[],agents:n=[]},r){let o=Date.now(),i=new URLSearchParams(location.search),s=i.get("id")&&e.find((d)=>d.kind==="run"&&d.state===i.get("dir")&&d.id===i.get("id")),a=i.get("ws")??(s?yl(s,t):null),l=[],c=NN(),u=new Map;for(let d of e){let h=d.state+"\x00"+yl(d,t);u.set(h,Math.max(u.get(h)??0,d.moved??0))}for(let d of t){let h=pn(d.dir,t);for(let m of d.workspaces??[]){let g=i.get("dir")===d.dir&&a===m.path,b=u.get(d.dir+"\x00"+m.path);l.push({group:g?"Current":"Workspaces",title:Ui(m),sub:h,when:b?ji(b,o):void 0,hay:`${Ui(m)} ${h} ${m.path} workspace`,at:g?1/0:b??0,ico:"ws",act:()=>$N(d.dir,m.path)});let O=vl(d.dir,m.path),y=c[O];for(let v of y?.tabs??[]){if(!ZW.includes(v.kind)||y.hidden?.includes(v.id))continue;let x=v.kind==="local"&&UW(O)||v.title;l.push({group:"Tabs",title:x,sub:`${Ui(m)} · ${h}`,hay:`${x} ${v.title} ${v.kind} ${v.note??""} ${Ui(m)} ${h} tab`,ico:"tab",act:()=>BW(d.dir,m.path,v.id)})}}l.push({group:"Projects",title:h,hay:`${h} ${d.dir} project`,ico:"proj",act:()=>{let m=d.workspaces?.find((g)=>g.main)??d.workspaces?.[0];m?$N(d.dir,m.path):xl("board","/?view=board")()}})}for(let d of e.filter((h)=>!h.archived)){let h=QO(d);l.push({group:d.kind==="run"?"Runs":"Tasks",title:Nu(d)||d.id,sub:[pn(d.state,t),YW[h]].filter(Boolean).join(" · "),when:d.moved?ji(d.moved,o):void 0,hay:`${Nu(d)} ${d.id??""} ${d.text??""} ${pn(d.state,t)} ${h}`,at:d.moved??0,dot:h,ico:d.kind==="run"?"run":"idea",act:()=>{if(!Qe.open.card({dir:d.state,id:d.kind==="run"?d.id:void 0,text:d.text}))ia(rS(d))}})}for(let d of r){let h=Date.parse(d.updated)||0;l.push({group:"Chats & terminals",title:d.title||"Chat",sub:d.project?pn(d.project,t):void 0,when:h?ji(h,o):void 0,hay:`${d.title} chat ${d.project??""}`,at:h,dot:d.busy?"build":void 0,ico:"chat",act:()=>{try{sessionStorage.setItem("kz-chat",d.id)}catch{}xl("home","/")()}})}for(let d of n)l.push({group:"Chats & terminals",title:d.name||d.agent||"Terminal",sub:pn(d.dir,t),hay:`${d.name} ${d.agent??""} ${d.run??""} ${d.last??""} ${pn(d.dir,t)} terminal agent`,at:d.at??d.born??0,dot:d.asking?"wait":d.busy?"build":"done",ico:"term",act:()=>{if(!Qe.open.term({dir:d.dir,ws:d.ws,key:d.key}))ia(na(d.dir,d.ws??""))}});let f=[["Chat","chat",xl("home","/"),"home",!0],["Icebox","inbox",xl("sources","/?view=icebox"),"requests sources gathered capture inbox later add note",!0],["Tasks","idea",xl("tasks","/?view=tasks"),"backlog",!0],["Board","board",xl("board","/?view=board"),"kanban runs",!0],["Notes","doc",()=>ia("/notebook"),"notebook docs",!0],["Settings","gear",xl("settings","/?view=settings"),"preferences config",!0],["New task","plus",()=>wl()?hS():ia("/?view=board"),"create add run"],["Add a project","proj",()=>Wo({dir:null}),"clone folder create workspace"],["Toggle theme","moon",vO,"dark light"],["Collapse or expand menu","side",xO,"sidebar rail"],["Keyboard shortcuts","kbd",()=>gh(!0),"keys help"],["Report an issue","bug",()=>open("/issue","_blank","noopener"),"bug feedback"]];for(let[d,h,m,g,b]of f)l.push({group:"Actions",title:d,hay:`${d} ${g??""}`,ico:h,act:m,page:b});return l}function VW(e){if(!wl())return void ia("/?view=board");hS(void 0,e)}var zO=oa;function mS(){if(wl())return DN();jO().then((e)=>{zO=e.useSearch,DN()},()=>fl("/?view=board&search=1"))}function DN(){zO.setState({open:!0,newTask:VW})}var _N=()=>zO.getState().open?zO.setState({open:!1}):mS();function zN(e){wl=()=>e,Yi.search=mS;let t=/Mac|iP(hone|ad)/.test(navigator.platform),n;if(wl()&&new URLSearchParams(location.search).get("search")==="1"){let o=new URLSearchParams(location.search);o.delete("search"),history.replaceState(null,"",location.pathname+(o.toString()?"?"+o:"")+location.hash),n=setTimeout(mS,400)}let r=(o)=>{if(o.ctrlKey&&o.shiftKey&&o.code==="Space")return o.preventDefault(),o.stopPropagation(),void _N();if(o.target?.closest?.(".xterm"))return;let i=t?o.metaKey:o.ctrlKey,s=o.key.toLowerCase();if(i&&!o.altKey&&(s==="k"&&!o.shiftKey||t&&s==="j"&&!o.shiftKey))o.preventDefault(),o.stopPropagation(),_N()};return addEventListener("keydown",r,!0),()=>(clearTimeout(n),removeEventListener("keydown",r,!0))}var jN=()=>document.documentElement.hasAttribute("data-kit");var IN=()=>window.kzKit?Promise.resolve(window.kzKit):Promise.reject(Error("this page has no kit"));var Iu=!1;async function jO(){let e=await IN();return e.setHost({gitProjects:eN,wsHref:na,navigate:fl,pickProject:async(t)=>{await fetch("/cd",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({dir:t})}).catch(()=>null);try{localStorage.setItem("kz-proj",t)}catch{}fl("/notebook?dir="+encodeURIComponent(t))}}),e}function qW(e){if(Iu)return Wo(e);let t=new URLSearchParams({view:"board",add:e.start??"1"});if(e.dir)t.set("adddir",e.dir);jO().then((n)=>n.openAdd(e),()=>fl("/?"+t))}function GW(){let e=new URLSearchParams(location.search),t=e.get("add");if(!t||!Iu)return;let n=e.get("adddir");return e.delete("add"),e.delete("adddir"),history.replaceState(null,"",location.pathname+(e.toString()?"?"+e:"")+location.hash),setTimeout(()=>Wo({dir:n,...t==="ws"||t==="folder"||t==="clone"||t==="create"?{start:t}:{}}),400)}var HW=()=>document.getAnimations().forEach((e)=>{if(e.animationName?.startsWith("si-")&&e.startTime!==0)e.startTime=0});function XN(e={}){Iu=!!e.board;let t=zN(Iu),n=!1,r=(a)=>a.nodeType===1&&(a.classList.contains("si")||a.querySelector(".si")),o=new MutationObserver((a)=>{if(n||!a.some((l)=>[...l.addedNodes].some(r)))return;n=!0,requestAnimationFrame(()=>{n=!1,HW()})});o.observe(document.body,{childList:!0,subtree:!0});let i=P3(Iu);if(!Iu&&jN())jO().catch(()=>{});let s=GW();if(e.video){if(e.video.add)e.video.add.onclick=Yi.add;if(e.video.search)e.video.search.onclick=(a)=>(a.preventDefault(),Yi.search())}return()=>(o.disconnect(),i(),t(),clearTimeout(s))}Yi.add=()=>{let e=new URLSearchParams(location.search);qW({dir:["run","ws"].includes(e.get("view")??"")?e.get("dir"):WW()})};function WW(){try{let e=JSON.parse(localStorage.getItem("kz-rail-filter2")||"{}").dirs;return Array.isArray(e)&&e.length===1?e[0]:null}catch{return null}}var FW=Symbol.for("react.transitional.element"),KW=Symbol.for("react.fragment");function BN(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var o in t)o!=="key"&&(n[o]=t[o])}else n=t;return t=n.ref,{$$typeof:FW,type:e,key:r,ref:t!==void 0?t:null,props:n}}var st=KW,p=BN,P=BN;var JW=Object.defineProperty,Zr=(e,t)=>JW(e,"name",{value:t,configurable:!0});function eF(e,t){let n=gn(t);n.displayName=e+"Context";let r=Zr((i)=>{let{children:s,...a}=i,l=ce(()=>a,Object.values(a));return p(n.Provider,{value:l,children:s})},"Provider");r.displayName=e+"Provider";function o(i,s={}){let{optional:a=!1}=s,l=bn(n);if(l)return l;if(t!==void 0)return t;if(a)return;throw Error(`\`${i}\` must be used within \`${e}\``)}return Zr(o,"useContext"),[r,o]}Zr(eF,"createContext");function at(e,t=[]){let n=[];function r(i,s){let a=gn(s);a.displayName=i+"Context";let l=n.length;n=[...n,s];let c=Zr((f)=>{let{scope:d,children:h,...m}=f,g=d?.[e]?.[l]||a,b=ce(()=>m,Object.values(m));return p(g.Provider,{value:b,children:h})},"Provider");c.displayName=i+"Provider";function u(f,d,h={}){let{optional:m=!1}=h,g=d?.[e]?.[l]||a,b=bn(g);if(b)return b;if(s!==void 0)return s;if(m)return;throw Error(`\`${f}\` must be used within \`${i}\``)}return Zr(u,"useContext"),[c,u]}Zr(r,"createContext");let o=Zr(()=>{let i=n.map((s)=>gn(s));return Zr(function(a){let l=a?.[e]||i;return ce(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])},"useScope")},"createScope");return o.scopeName=e,[r,ZN(o,...t)]}Zr(at,"createContextScope");function ZN(...e){let t=e[0];if(e.length===1)return t;let n=Zr(()=>{let r=e.map((o)=>({useScope:o(),scopeName:o.scopeName}));return Zr(function(i){let s=r.reduce((a,{useScope:l,scopeName:c})=>{let f=l(i)[`__scope${c}`];return{...a,...f}},{});return ce(()=>({[`__scope${t.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}Zr(ZN,"composeContextScopes");var tF=Object.defineProperty,OS=(e,t)=>tF(e,"name",{value:t,configurable:!0});function gS(e,t){if(typeof e==="function")return e(t);else if(e!==null&&e!==void 0)e.current=t}OS(gS,"setRef");function sa(...e){return(t)=>{let n=!1,r=e.map((o)=>{let i=gS(o,t);if(!n&&typeof i=="function")n=!0;return i});if(n)return()=>{for(let o=0;o<r.length;o++){let i=r[o];if(typeof i=="function")i();else gS(e[o],null)}}}}OS(sa,"composeRefs");function ye(...e){return G(sa(...e),e)}OS(ye,"useComposedRefs");var nF=Object.defineProperty,Xu=(e,t)=>nF(e,"name",{value:t,configurable:!0}),UN=!!(typeof window<"u"&&window.document&&window.document.createElement);function ne(e,t,{checkForDefaultPrevented:n=!0}={}){return Xu(function(o){if(e?.(o),n===!1||!o||!o.defaultPrevented)return t?.(o)},"handleEvent")}Xu(ne,"composeEventHandlers");function rF(e){if(!UN)throw Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Xu(rF,"getOwnerWindow");function bS(e){if(!UN)throw Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Xu(bS,"getOwnerDocument");function YN(e,t=!1){let{activeElement:n}=bS(e);if(!n?.nodeName)return null;if(VN(n)&&n.contentDocument)return YN(n.contentDocument.body,t);if(t){let r=n.getAttribute("aria-activedescendant");if(r){let o=bS(n).getElementById(r);if(o)return o}}return n}Xu(YN,"getActiveElement");function VN(e){return e.tagName==="IFRAME"}Xu(VN,"isFrame");var Ue=globalThis?.document?Lt:()=>{};var oF=Object.defineProperty,iF=(e,t)=>oF(e,"name",{value:t,configurable:!0}),sF=me[" useId ".trim().toString()]||(()=>{return}),aF=0;function nt(e){let[t,n]=A(sF());return Ue(()=>{if(!e)n((r)=>r??String(aF++))},[e]),e||(t?`radix-${t}`:"")}iF(nt,"useId");var IO=!1;var lF=Object.defineProperty,cF=(e,t)=>lF(e,"name",{value:t,configurable:!0}),qN=me[" useEffectEvent ".trim().toString()],GN=me[" useInsertionEffect ".trim().toString()];function yS(e){if(typeof qN==="function")return qN(e);let t=T(()=>{throw Error("Cannot call an event handler while rendering.")});if(typeof GN==="function")GN(()=>{t.current=e});else Ue(()=>{t.current=e});return ce(()=>(...n)=>t.current?.(...n),[])}cF(yS,"useEffectEvent");var uF=Object.defineProperty,Rh=(e,t)=>uF(e,"name",{value:t,configurable:!0}),fF=me[" useInsertionEffect ".trim().toString()]||Ue;function Wt({prop:e,defaultProp:t,onChange:n=Rh(()=>{},"onChange"),caller:r}){let[o,i,s]=WN({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;if(IO){let u=T(e!==void 0);L(()=>{let f=u.current;if(f!==a)console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`);u.current=a},[a,r])}let c=G((u)=>{if(a){let f=FN(u)?u(e):u;if(f!==e)s.current?.(f)}else i(u)},[a,e,i,s]);return[l,c]}Rh(Wt,"useControllableState");function WN({defaultProp:e,onChange:t}){let[n,r]=A(e),o=T(n),i=T(t);return fF(()=>{i.current=t},[t]),L(()=>{if(o.current!==n)i.current?.(n),o.current=n},[n,o]),[n,r,i]}Rh(WN,"useUncontrolledState");function FN(e){return typeof e==="function"}Rh(FN,"isFunction");var HN=Symbol("RADIX:SYNC_STATE");function dF(e,t,n,r){let{prop:o,defaultProp:i,onChange:s,caller:a}=t,l=o!==void 0,c=yS(s);if(IO){let b=T(o!==void 0);L(()=>{let O=b.current;if(O!==l)console.warn(`${a} is changing from ${O?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`);b.current=l},[l,a])}let u=[{...n,state:i}];if(r)u.push(r);let[f,d]=Kl((b,O)=>{if(O.type===HN)return{...b,state:O.state};let y=e(b,O);if(l&&!Object.is(y.state,b.state))c(y.state);return y},...u),h=f.state,m=T(h);L(()=>{if(m.current!==h){if(m.current=h,!l)c(h)}},[h,m,l]);let g=ce(()=>{if(o!==void 0)return{...f,state:o};return f},[f,o]);return L(()=>{if(l&&!Object.is(o,f.state))d({type:HN,state:o})},[o,f.state,l]),[g,d]}Rh(dF,"useControllableStateReducer");var hF=Object.defineProperty,br=(e,t)=>hF(e,"name",{value:t,configurable:!0});function Ft(e){let t=B((n,r)=>{let{children:o,...i}=n,s=null,a=!1,l=[];if(o=rL(o),Vr.forEach(o,(d)=>{if(tL(d)){a=!0;let h=d,m="child"in h.props?h.props.child:h.props.children;while(xS(m)&&typeof XO==="function")m=XO(m._payload);s=mF(h,m),l.push(s?.props?.children)}else l.push(d)}),s)s=xr(s,void 0,l);else if(!a&&Vr.count(o)===1&&On(o))s=o;let c=s?eL(s):void 0,u=ye(r,c);if(!s){if(o||o===0)throw Error(a?bF(e):OF(e));return o}let f=JN(i,s.props??{});if(s.type!==er)f.ref=r?u:c;return xr(s,f)});return t.displayName=`${e}.Slot`,t}br(Ft,"createSlot");var pF=Ft("Slot"),KN=Symbol.for("radix.slottable");function vS(e){let t=br((n)=>("child"in n)?n.children(n.child):n.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=KN,t}br(vS,"createSlottable");var mF=br((e,t)=>{if("child"in e.props){if(!On(t))return null;return xr(t,void 0,e.props.children(t.props.children))}return On(t)?t:null},"getSlottableElementFromSlottable");function JN(e,t){let n={...t};for(let r in t){let o=e[r],i=t[r];if(/^on[A-Z]/.test(r)){if(o&&i)n[r]=(...a)=>{let l=i(...a);return o(...a),l};else if(o)n[r]=o}else if(r==="style")n[r]={...o,...i};else if(r==="className")n[r]=[o,i].filter(Boolean).join(" ");else if(r==="aria-describedby")n[r]=oL(i,o)}return{...e,...n}}br(JN,"mergeProps");function eL(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}br(eL,"getElementRef");function tL(e){return On(e)&&typeof e.type==="function"&&"__radixId"in e.type&&e.type.__radixId===KN}br(tL,"isSlottable");var gF=Symbol.for("react.lazy");function xS(e){return e!=null&&typeof e==="object"&&"$$typeof"in e&&e.$$typeof===gF&&"_payload"in e&&nL(e._payload)}br(xS,"isLazyComponent");function nL(e){return typeof e==="object"&&e!==null&&"then"in e}br(nL,"isPromiseLike");function rL(e){let t=e;while(xS(t)&&typeof XO==="function")t=XO(t._payload);return t}br(rL,"useUnwrappedLazy");function oL(...e){let t=new Set;for(let n of e){if(typeof n!=="string")continue;for(let r of String(n).trim().split(/\s+/))if(r)t.add(r)}return t.size>0?Array.from(t).join(" "):void 0}br(oL,"concatAriaDescribedby");var OF=br((e)=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),bF=br((e)=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),XO=me[" use ".trim().toString()];var yF=Object.defineProperty,vF=(e,t)=>yF(e,"name",{value:t,configurable:!0}),xF=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ge=xF.reduce((e,t)=>{let n=Ft(`Primitive.${t}`),r=B((o,i)=>{let{asChild:s,...a}=o,l=s?n:t;if(typeof window<"u")window[Symbol.for("radix-ui")]=!0;return p(l,{...a,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ph(e,t){if(e)wr(()=>e.dispatchEvent(t))}vF(Ph,"dispatchDiscreteCustomEvent");var wF=Object.defineProperty,SF=(e,t)=>wF(e,"name",{value:t,configurable:!0}),sL=me[" useInsertionEffect ".trim().toString()];function Xt(e){let t=T(e);if(typeof sL==="function")sL(()=>{t.current=e});else Ue(()=>{t.current=e});return ce(()=>(...n)=>t.current?.(...n),[])}SF(Xt,"useCallbackRef");var kF=Object.defineProperty,Kt=(e,t)=>kF(e,"name",{value:t,configurable:!0}),wS="dismissableLayer.update",CF="dismissableLayer.pointerDownOutside",RF="dismissableLayer.focusOutside",aL,lL=gn({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Jo=B(Kt(function(t,n){let{disableOutsidePointerEvents:r=!1,deferPointerDownOutside:o=!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:l,onDismiss:c,...u}=t,f=bn(lL),[d,h]=A(null),m=d?.ownerDocument??globalThis?.document,[,g]=A({}),b=ye(n,h),O=Array.from(f.layers),[y]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),v=y?O.indexOf(y):-1,x=d?O.indexOf(d):-1,w=f.layersWithOutsidePointerEventsDisabled.size>0,S=x>=v,k=T(!1),R=cL((N)=>{if(s?.(N),l?.(N),!N.defaultPrevented)c?.()},{ownerDocument:m,deferPointerDownOutside:o,isDeferredPointerDownOutsideRef:k,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:G((N)=>{if(!(N instanceof Node))return!1;let V=[...f.branches].some((U)=>U.contains(N));return S&&!V},[f.branches,S])}),Q=uL((N)=>{if(o&&k.current)return;let V=N.target;if([...f.branches].some((F)=>F.contains(V)))return;if(a?.(N),l?.(N),!N.defaultPrevented)c?.()},m),E=d?x===O.length-1:!1,_=Xt((N)=>{if(N.key!=="Escape")return;if(i?.(N),!N.defaultPrevented&&c)N.preventDefault(),c()});return L(()=>{if(!E)return;return m.addEventListener("keydown",_,{capture:!0}),()=>m.removeEventListener("keydown",_,{capture:!0})},[m,E,_]),L(()=>{if(!d)return;if(r){if(f.layersWithOutsidePointerEventsDisabled.size===0)aL=m.body.style.pointerEvents,m.body.style.pointerEvents="none";f.layersWithOutsidePointerEventsDisabled.add(d)}return f.layers.add(d),SS(),()=>{if(r){if(f.layersWithOutsidePointerEventsDisabled.delete(d),f.layersWithOutsidePointerEventsDisabled.size===0)m.body.style.pointerEvents=aL}}},[d,m,r,f]),L(()=>()=>{if(!d)return;f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),SS()},[d,f]),L(()=>{let N=Kt(()=>g({}),"handleUpdate");return document.addEventListener(wS,N),()=>document.removeEventListener(wS,N)},[]),p(ge.div,{...u,ref:b,style:{pointerEvents:w?S?"auto":"none":void 0,...t.style},onFocusCapture:ne(t.onFocusCapture,Q.onFocusCapture),onBlurCapture:ne(t.onBlurCapture,Q.onBlurCapture),onPointerDownCapture:ne(t.onPointerDownCapture,R.onPointerDownCapture)})},"DismissableLayer"));function kS(){let e=bn(lL),[t,n]=A(null);return L(()=>{if(!t)return;return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Kt(kS,"useDismissableLayerSurface");var PF=Kt(()=>!0,"IS_TRUE");function cL(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:o,dismissableSurfaces:i,shouldHandlePointerDownOutside:s=PF}=t,a=Xt(e),l=T(!1),c=T(!1),u=T(new Map),f=T(()=>{});return L(()=>{function d(){c.current=!1,o.current=!1,u.current.clear()}Kt(d,"resetOutsideInteraction");function h(){return Array.from(u.current.values()).some(Boolean)}Kt(h,"isOutsideInteractionIntercepted");function m(v){if(!c.current)return;let x=v.target;if(!(x instanceof Node&&[...i].some((S)=>S.contains(x))))u.current.set(v.type,!0);if(v.type==="click")window.setTimeout(()=>{if(c.current)f.current()},0)}Kt(m,"handleInteractionCapture");function g(v){if(c.current)u.current.set(v.type,!1)}Kt(g,"handleInteractionBubble");let b=Kt((v)=>{if(v.target&&!l.current){let w=function(){n.removeEventListener("click",f.current);let k=h();if(d(),!k)CS(CF,a,S,{discrete:!0})};var x=w;if(Kt(w,"handleAndDispatchPointerDownOutsideEvent"),!s(v.target)){n.removeEventListener("click",f.current),d(),l.current=!1;return}let S={originalEvent:v};if(c.current=!0,o.current=r&&v.button===0,u.current.clear(),!r||v.button!==0)w();else n.removeEventListener("click",f.current),f.current=w,n.addEventListener("click",f.current,{once:!0})}else n.removeEventListener("click",f.current),d();l.current=!1},"handlePointerDown"),O=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let v of O)n.addEventListener(v,m,!0),n.addEventListener(v,g);let y=window.setTimeout(()=>{n.addEventListener("pointerdown",b)},0);return()=>{window.clearTimeout(y),n.removeEventListener("pointerdown",b),n.removeEventListener("click",f.current);for(let v of O)n.removeEventListener(v,m,!0),n.removeEventListener(v,g)}},[n,a,r,o,i,s]),{onPointerDownCapture:Kt(()=>l.current=!0,"onPointerDownCapture")}}Kt(cL,"usePointerDownOutside");function uL(e,t=globalThis?.document){let n=Xt(e),r=T(!1);return L(()=>{let o=Kt((i)=>{if(i.target&&!r.current)CS(RF,n,{originalEvent:i},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:Kt(()=>r.current=!0,"onFocusCapture"),onBlurCapture:Kt(()=>r.current=!1,"onBlurCapture")}}Kt(uL,"useFocusOutside");function SS(){let e=new CustomEvent(wS);document.dispatchEvent(e)}Kt(SS,"dispatchUpdate");function CS(e,t,n,{discrete:r}){let o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});if(t)o.addEventListener(e,t,{once:!0});if(r)Ph(o,i);else o.dispatchEvent(i)}Kt(CS,"handleAndDispatchCustomEvent");var TF=Object.defineProperty,_t=(e,t)=>TF(e,"name",{value:t,configurable:!0}),RS="focusScope.autoFocusOnMount",PS="focusScope.autoFocusOnUnmount",fL={bubbles:!1,cancelable:!0},aa=B(_t(function(t,n){let{loop:r=!1,trapped:o=!1,branches:i,onMountAutoFocus:s,onUnmountAutoFocus:a,...l}=t,[c,u]=A(null),f=Xt(s),d=Xt(a),h=T(null),m=ye(n,u),g=T(i);L(()=>{g.current=i});let b=G((v)=>{if(!v)return!1;if(c?.contains(v))return!0;return Boolean(g.current?.some((x)=>x.contains(v)))},[c]),O=T({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;L(()=>{if(o){let S=function(E){if(O.paused||!c)return;let _=E.target;if(b(_))h.current=_;else qi(h.current,{select:!0})},k=function(E){if(O.paused||!c)return;let _=E.relatedTarget;if(_===null)return;if(!b(_))qi(h.current,{select:!0})},R=function(E){if(document.activeElement!==document.body)return;for(let N of E)if(N.removedNodes.length>0)qi(c)};var v=S,x=k,w=R;_t(S,"handleFocusIn"),_t(k,"handleFocusOut"),_t(R,"handleMutations"),document.addEventListener("focusin",S),document.addEventListener("focusout",k);let Q=new MutationObserver(R);if(c)Q.observe(c,{childList:!0,subtree:!0});return()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",k),Q.disconnect()}}},[o,c,O.paused,b]),L(()=>{if(c){dL.add(O);let v=document.activeElement;if(!c.contains(v)){let w=new CustomEvent(RS,fL);if(c.addEventListener(RS,f),c.dispatchEvent(w),!w.defaultPrevented){if(pL(yL(QS(c)),{select:!0}),document.activeElement===v)qi(c)}}return()=>{c.removeEventListener(RS,f);let w=c.ownerDocument,S=CustomEvent;setTimeout(()=>{let k=new S(PS,fL);if(c.addEventListener(PS,d),c.dispatchEvent(k),!k.defaultPrevented)qi(v??w.body,{select:!0});c.removeEventListener(PS,d),dL.remove(O)},0)}}},[c,f,d,O]);let y=G((v)=>{if(!r&&!o)return;if(O.paused)return;let x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(x&&w){let S=v.currentTarget,[k,R]=mL(S);if(!(k&&R)){if(w===S)v.preventDefault()}else if(!v.shiftKey&&w===R){if(v.preventDefault(),r)qi(k,{select:!0})}else if(v.shiftKey&&w===k){if(v.preventDefault(),r)qi(R,{select:!0})}}},[r,o,O.paused]);return p(ge.div,{tabIndex:-1,...l,ref:m,onKeyDown:y})},"FocusScope")),hL=gn(null);function Sl({registry:e,children:t}){if(!e)return t;return p(hL.Provider,{value:e,children:t})}_t(Sl,"FocusScopeBranchProvider");function kl(){let[e,t]=A([]),n=ce(()=>({add:_t((r)=>t((o)=>o.includes(r)?o:[...o,r]),"add"),remove:_t((r)=>t((o)=>o.filter((i)=>i!==r)),"remove")}),[]);return{nodes:e,registry:n}}_t(kl,"useFocusScopeBranchRegistry");function Cl(e){let t=bn(hL);L(()=>{if(!e||!t)return;return t.add(e),()=>t.remove(e)},[e,t])}_t(Cl,"useFocusScopeBranch");function pL(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(qi(r,{select:t}),document.activeElement!==n)return}_t(pL,"focusFirst");function mL(e){let t=QS(e),n=TS(t,e),r=TS(t.reverse(),e);return[n,r]}_t(mL,"getTabbableEdges");function QS(e){let t=[],r=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:_t((o)=>{let i=o.tagName==="INPUT"&&o.type==="hidden";if(o.disabled||o.hidden||i)return NodeFilter.FILTER_SKIP;return o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});while(r.nextNode())t.push(r.currentNode);return t}_t(QS,"getTabbableCandidates");function TS(e,t){let n=typeof t.checkVisibility==="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):gL(r,{upTo:t})))return r}_t(TS,"findVisible");function gL(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;while(e){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}_t(gL,"isHidden");function OL(e){return e.tagName==="INPUT"&&typeof e.select==="function"}_t(OL,"isSelectableInput");function qi(e,{select:t=!1}={}){if(e&&e.focus){let r=(e.ownerDocument??document).activeElement;if(e.focus({preventScroll:!0}),e!==r&&OL(e)&&t)e.select()}}_t(qi,"focus");var dL=bL();function bL(){let e=[];return{add(t){let n=e[0];if(t!==n)n?.pause();e=AS(e,t),e.unshift(t)},remove(t){e=AS(e,t),e[0]?.resume()}}}_t(bL,"createFocusScopesStack");function AS(e,t){let n=[...e],r=n.indexOf(t);if(r!==-1)n.splice(r,1);return n}_t(AS,"arrayRemove");function yL(e){return e.filter((t)=>t.tagName!=="A")}_t(yL,"removeLinks");var AF=Object.defineProperty,QF=(e,t)=>AF(e,"name",{value:t,configurable:!0}),ei=B(QF(function(t,n){let{container:r,...o}=t,[i,s]=A(!1);Ue(()=>s(!0),[]);let a=r||i&&globalThis?.document?.body;return a?ec(p(ge.div,{...o,ref:n}),a):null},"Portal"));var EF=Object.defineProperty,Gi=(e,t)=>EF(e,"name",{value:t,configurable:!0});function vL(e,t){return Kl((n,r)=>t[n][r]??n,e)}Gi(vL,"useStateMachine");var mn=Gi((e)=>{let{present:t,children:n}=e,r=xL(t),o=typeof n==="function"?n({present:r.isPresent}):Vr.only(n),i=wL(r.ref,SL(o));return typeof n==="function"||r.isPresent?xr(o,{ref:i}):null},"Presence");function xL(e){let[t,n]=A(),r=T(null),o=T(e),i=T("none"),s=T(void 0),a=e?"mounted":"unmounted",[l,c]=vL(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return L(()=>{if(l==="mounted")i.current=s.current??Bu(r.current),s.current=void 0;else i.current="none"},[l]),Ue(()=>{let u=r.current,f=o.current;if(f!==e){let h=i.current,m=Bu(u);if(e)s.current=m,c("MOUNT");else if(m==="none"||u?.display==="none")c("UNMOUNT");else if(f&&h!==m)c("ANIMATION_OUT");else c("UNMOUNT");o.current=e}},[e,c]),Ue(()=>{if(t){let u,f=t.ownerDocument.defaultView??window,d=Gi((m)=>{let b=Bu(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&b){if(c("ANIMATION_END"),!o.current){let O=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{if(t.style.animationFillMode==="forwards")t.style.animationFillMode=O})}}},"handleAnimationEnd"),h=Gi((m)=>{if(m.target===t)i.current=Bu(r.current)},"handleAnimationStart");return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:G((u)=>{if(u){let f=getComputedStyle(u);r.current=f,s.current=Bu(f)}else r.current=null;n(u)},[])}}Gi(xL,"usePresence");function ES(e,t){if(typeof e==="function")return e(t);else if(e!==null&&e!==void 0)e.current=t}Gi(ES,"setRef");function wL(...e){let t=T(e);return t.current=e,G((n)=>{let r=t.current,o=!1,i=r.map((s)=>{let a=ES(s,n);if(!o&&typeof a==="function")o=!0;return a});if(o)return()=>{for(let s=0;s<i.length;s++){let a=i[s];if(typeof a==="function")a();else ES(r[s],null)}}},[])}Gi(wL,"useStableComposedRefs");function Bu(e){return e?.animationName||"none"}Gi(Bu,"getAnimationName");function SL(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}Gi(SL,"getElementRef");var MF=Object.defineProperty,$S=(e,t)=>MF(e,"name",{value:t,configurable:!0}),BO=0,Zu=null;function $F(e){return ti(),e.children}$S($F,"FocusGuards");function ti(){L(()=>{if(!Zu)Zu={start:MS(),end:MS()};let{start:e,end:t}=Zu;if(document.body.firstElementChild!==e)document.body.insertAdjacentElement("afterbegin",e);if(document.body.lastElementChild!==t)document.body.insertAdjacentElement("beforeend",t);return BO++,()=>{if(BO===1)Zu?.start.remove(),Zu?.end.remove(),Zu=null;BO=Math.max(0,BO-1)}},[])}$S(ti,"useFocusGuards");function MS(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}$S(MS,"createFocusGuard");var Kn=function(){return Kn=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i))t[i]=n[i]}return t},Kn.apply(this,arguments)};function ZO(e,t){var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0)n[r]=e[r];if(e!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)if(t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o]))n[r[o]]=e[r[o]]}return n}function kL(e,t,n){if(n||arguments.length===2){for(var r=0,o=t.length,i;r<o;r++)if(i||!(r in t)){if(!i)i=Array.prototype.slice.call(t,0,r);i[r]=t[r]}}return e.concat(i||Array.prototype.slice.call(t))}var Rl="right-scroll-bar-position",Pl="width-before-scroll-bar",DS="with-scroll-bars-hidden",_S="--removed-body-scroll-bar-size";function UO(e,t){if(typeof e==="function")e(t);else if(e)e.current=t;return e}function CL(e,t){var n=A(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;if(o!==r)n.value=r,n.callback(r,o)}}}})[0];return n.callback=t,n.facade}var DF=typeof window<"u"?Lt:L,RL=new WeakMap;function NS(e,t){var n=CL(t||null,function(r){return e.forEach(function(o){return UO(o,r)})});return DF(function(){var r=RL.get(n);if(r){var o=new Set(r),i=new Set(e),s=n.current;o.forEach(function(a){if(!i.has(a))UO(a,null)}),i.forEach(function(a){if(!o.has(a))UO(a,s)})}RL.set(n,e)},[e]),n}function _F(e){return e}function NF(e,t){if(t===void 0)t=_F;var n=[],r=!1,o={read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");if(n.length)return n[n.length-1];return e},useMedium:function(i){var s=t(i,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(i){r=!0;while(n.length){var s=n;n=[],s.forEach(i)}n={push:function(a){return i(a)},filter:function(){return n}}},assignMedium:function(i){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(i),s=n}var l=function(){var u=s;s=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){s.push(u),c()},filter:function(u){return s=s.filter(u),n}}}};return o}function LS(e){if(e===void 0)e={};var t=NF(null);return t.options=Kn({async:!0,ssr:!1},e),t}var PL=function(e){var t=e.sideCar,n=ZO(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return oe(r,Kn({},n))};PL.isSideCarExport=!0;function zS(e,t){return e.useMedium(t),PL}var YO=LS();var jS=function(){return},Th=B(function(e,t){var n=T(null),r=A({onScrollCapture:jS,onWheelCapture:jS,onTouchMoveCapture:jS}),o=r[0],i=r[1],{forwardProps:s,children:a,className:l,removeScrollBar:c,enabled:u,shards:f,sideCar:d,noRelative:h,noIsolation:m,inert:g,allowPinchZoom:b,as:O}=e,y=O===void 0?"div":O,v=e.gapMode,x=ZO(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,S=NS([n,t]),k=Kn(Kn({},x),o);return oe(er,null,u&&oe(w,{sideCar:YO,removeScrollBar:c,shards:f,noRelative:h,noIsolation:m,inert:g,setCallbacks:i,allowPinchZoom:!!b,lockRef:n,gapMode:v}),s?xr(Vr.only(a),Kn(Kn({},k),{ref:S})):oe(y,Kn({},k,{className:l,ref:S}),a))});Th.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Th.classNames={fullWidth:Pl,zeroRight:Rl};var TL;var AL=function(){if(TL)return TL;if(typeof __webpack_nonce__<"u")return __webpack_nonce__;return};function LF(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=AL();if(t)e.setAttribute("nonce",t);return e}function zF(e,t){if(e.styleSheet)e.styleSheet.cssText=t;else e.appendChild(document.createTextNode(t))}function jF(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var IS=function(){var e=0,t=null;return{add:function(n){if(e==0){if(t=LF())zF(t,n),jF(t)}e++},remove:function(){if(e--,!e&&t)t.parentNode&&t.parentNode.removeChild(t),t=null}}};var XS=function(){var e=IS();return function(t,n){L(function(){return e.add(t),function(){e.remove()}},[t&&n])}};var Ah=function(){var e=XS(),t=function(n){var{styles:r,dynamic:o}=n;return e(r,o),null};return t};var IF={left:0,top:0,right:0,gap:0},BS=function(e){return parseInt(e||"",10)||0},XF=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[BS(n),BS(r),BS(o)]},ZS=function(e){if(e===void 0)e="margin";if(typeof window>"u")return IF;var t=XF(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}};var BF=Ah(),Uu="data-scroll-locked",ZF=function(e,t,n,r){var{left:o,top:i,right:s,gap:a}=e;if(n===void 0)n="margin";return`
48
+ .`.concat(DS,` {
49
+ overflow: hidden `).concat(r,`;
50
+ padding-right: `).concat(a,"px ").concat(r,`;
51
+ }
52
+ body[`).concat(Uu,`] {
53
+ overflow: hidden `).concat(r,`;
54
+ overscroll-behavior: contain;
55
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
56
+ padding-left: `.concat(o,`px;
57
+ padding-top: `).concat(i,`px;
58
+ padding-right: `).concat(s,`px;
59
+ margin-left:0;
60
+ margin-top:0;
61
+ margin-right: `).concat(a,"px ").concat(r,`;
62
+ `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
63
+ }
64
+
65
+ .`).concat(Rl,` {
66
+ right: `).concat(a,"px ").concat(r,`;
67
+ }
68
+
69
+ .`).concat(Pl,` {
70
+ margin-right: `).concat(a,"px ").concat(r,`;
71
+ }
72
+
73
+ .`).concat(Rl," .").concat(Rl,` {
74
+ right: 0 `).concat(r,`;
75
+ }
76
+
77
+ .`).concat(Pl," .").concat(Pl,` {
78
+ margin-right: 0 `).concat(r,`;
79
+ }
80
+
81
+ body[`).concat(Uu,`] {
82
+ `).concat(_S,": ").concat(a,`px;
83
+ }
84
+ `)},QL=function(){var e=parseInt(document.body.getAttribute(Uu)||"0",10);return isFinite(e)?e:0},UF=function(){L(function(){return document.body.setAttribute(Uu,(QL()+1).toString()),function(){var e=QL()-1;if(e<=0)document.body.removeAttribute(Uu);else document.body.setAttribute(Uu,e.toString())}},[])},US=function(e){var{noRelative:t,noImportant:n,gapMode:r}=e,o=r===void 0?"margin":r;UF();var i=ce(function(){return ZS(o)},[o]);return oe(BF,{styles:ZF(i,!t,o,!n?"!important":"")})};var YS=!1;if(typeof window<"u")try{Yu=Object.defineProperty({},"passive",{get:function(){return YS=!0,!0}}),window.addEventListener("test",Yu,Yu),window.removeEventListener("test",Yu,Yu)}catch(e){YS=!1}var Yu,Tl=YS?{passive:!1}:!1;var YF=function(e){return e.tagName==="TEXTAREA"},EL=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!YF(e)&&n[t]==="visible")},VF=function(e){return EL(e,"overflowY")},qF=function(e){return EL(e,"overflowX")},VS=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot)r=r.host;var o=ML(e,r);if(o){var i=$L(e,r),s=i[1],a=i[2];if(s>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},GF=function(e){var{scrollTop:t,scrollHeight:n,clientHeight:r}=e;return[t,n,r]},HF=function(e){var{scrollLeft:t,scrollWidth:n,clientWidth:r}=e;return[t,n,r]},ML=function(e,t){return e==="v"?VF(t):qF(t)},$L=function(e,t){return e==="v"?GF(t):HF(t)},WF=function(e,t){return e==="h"&&t==="rtl"?-1:1},DL=function(e,t,n,r,o){var i=WF(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),c=!1,u=s>0,f=0,d=0;do{if(!a)break;var h=$L(e,a),m=h[0],g=h[1],b=h[2],O=g-b-i*m;if(m||O){if(ML(e,a))f+=O,d+=m}var y=a.parentNode;a=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));if(u&&(o&&Math.abs(f)<1||!o&&s>f))c=!0;else if(!u&&(o&&Math.abs(d)<1||!o&&-s>d))c=!0;return c};var VO=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_L=function(e){return[e.deltaX,e.deltaY]},NL=function(e){return e&&"current"in e?e.current:e},FF=function(e,t){return e[0]===t[0]&&e[1]===t[1]},KF=function(e){return`
85
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
86
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
87
+ `)},JF=0,Vu=[];function LL(e){var t=T([]),n=T([0,0]),r=T(),o=A(JF++)[0],i=A(Ah)[0],s=T(e);L(function(){s.current=e},[e]),L(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=kL([e.lockRef.current],(e.shards||[]).map(NL),!0).filter(Boolean);return g.forEach(function(b){return b.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(o))})}}return},[e.inert,e.lockRef.current,e.shards]);var a=G(function(g,b){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var O=VO(g),y=n.current,v="deltaX"in g?g.deltaX:y[0]-O[0],x="deltaY"in g?g.deltaY:y[1]-O[1],w,S=g.target,k=Math.abs(v)>Math.abs(x)?"h":"v";if("touches"in g&&k==="h"&&S.type==="range")return!1;var R=window.getSelection(),Q=R&&R.anchorNode,E=Q?Q===S||Q.contains(S):!1;if(E)return!1;var _=VS(k,S);if(!_)return!0;if(_)w=k;else w=k==="v"?"h":"v",_=VS(k,S);if(!_)return!1;if(!r.current&&"changedTouches"in g&&(v||x))r.current=w;if(!w)return!0;var N=r.current||w;return DL(N,b,g,N==="h"?v:x,!0)},[]),l=G(function(g){var b=g;if(!Vu.length||Vu[Vu.length-1]!==i)return;var O="deltaY"in b?_L(b):VO(b),y=t.current.filter(function(w){return w.name===b.type&&(w.target===b.target||b.target===w.shadowParent)&&FF(w.delta,O)})[0];if(y&&y.should){if(b.cancelable)b.preventDefault();return}if(!y){var v=(s.current.shards||[]).map(NL).filter(Boolean).filter(function(w){return w.contains(b.target)}),x=v.length>0?a(b,v[0]):!s.current.noIsolation;if(x){if(b.cancelable)b.preventDefault()}}},[]),c=G(function(g,b,O,y){var v={name:g,delta:b,target:O,should:y,shadowParent:eK(O)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(x){return x!==v})},1)},[]),u=G(function(g){n.current=VO(g),r.current=void 0},[]),f=G(function(g){c(g.type,_L(g),g.target,a(g,e.lockRef.current))},[]),d=G(function(g){c(g.type,VO(g),g.target,a(g,e.lockRef.current))},[]);L(function(){return Vu.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,Tl),document.addEventListener("touchmove",l,Tl),document.addEventListener("touchstart",u,Tl),function(){Vu=Vu.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,Tl),document.removeEventListener("touchmove",l,Tl),document.removeEventListener("touchstart",u,Tl)}},[]);var{removeScrollBar:h,inert:m}=e;return oe(er,null,m?oe(i,{styles:KF(o)}):null,h?oe(US,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function eK(e){var t=null;while(e!==null){if(e instanceof ShadowRoot)t=e.host,e=e.host;e=e.parentNode}return t}var zL=zS(YO,LL);var jL=B(function(e,t){return oe(Th,Kn({},e,{ref:t,sideCar:zL}))});jL.classNames=Th.classNames;var Hi=jL;var tK=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},qu=new WeakMap,qO=new WeakMap,GO={},qS=0,IL=function(e){return e&&(e.host||IL(e.parentNode))},nK=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=IL(n);if(r&&e.contains(r))return r;return console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null}).filter(function(n){return Boolean(n)})},rK=function(e,t,n,r){var o=nK(t,Array.isArray(e)?e:[e]);if(!GO[n])GO[n]=new WeakMap;var i=GO[n],s=[],a=new Set,l=new Set(o),c=function(f){if(!f||a.has(f))return;a.add(f),c(f.parentNode)};o.forEach(c);var u=function(f){if(!f||l.has(f))return;Array.prototype.forEach.call(f.children,function(d){if(a.has(d))u(d);else try{var h=d.getAttribute(r),m=h!==null&&h!=="false",g=(qu.get(d)||0)+1,b=(i.get(d)||0)+1;if(qu.set(d,g),i.set(d,b),s.push(d),g===1&&m)qO.set(d,!0);if(b===1)d.setAttribute(n,"true");if(!m)d.setAttribute(r,"true")}catch(O){console.error("aria-hidden: cannot operate on ",d,O)}})};return u(t),a.clear(),qS++,function(){if(s.forEach(function(f){var d=qu.get(f)-1,h=i.get(f)-1;if(qu.set(f,d),i.set(f,h),!d){if(!qO.has(f))f.removeAttribute(r);qO.delete(f)}if(!h)f.removeAttribute(n)}),qS--,!qS)qu=new WeakMap,qu=new WeakMap,qO=new WeakMap,GO={}}},la=function(e,t,n){if(n===void 0)n="data-aria-hidden";var r=Array.from(Array.isArray(e)?e:[e]),o=t||tK(e);if(!o)return function(){return null};return r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),rK(r,o,n,"aria-hidden")};var oK=Object.defineProperty,Jn=(e,t)=>oK(e,"name",{value:t,configurable:!0}),HS="Dialog",[XL,WS]=at(HS),[iK,mo]=XL(HS),Gu=Jn((e)=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!0}=e,a=T(null),l=T(null),{nodes:c,registry:u}=kl(),[f,d]=Wt({prop:r,defaultProp:o??!1,onChange:i,caller:HS}),[h,m]=A(0),[g,b]=A(0);return p(iK,{scope:t,triggerRef:a,contentRef:l,contentId:nt(),titleId:nt(),descriptionId:nt(),titlePresent:h>0,descriptionPresent:g>0,setTitleCount:m,setDescriptionCount:b,open:f,onOpenChange:d,onOpenToggle:G(()=>d((O)=>!O),[d]),modal:s,branchNodes:c,branchRegistry:u,children:n})},"Dialog"),sK="DialogTrigger",HO=B(Jn(function(t,n){let{__scopeDialog:r,...o}=t,i=mo(sK,r),s=ye(n,i.triggerRef);return p(ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":WO(i.open),...o,ref:s,onClick:ne(t.onClick,i.onOpenToggle)})},"DialogTrigger")),BL="DialogPortal",[aK,ZL]=XL(BL,{forceMount:void 0}),Eh=Jn((e)=>{let{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=mo(BL,t);return p(aK,{scope:t,forceMount:n,children:Vr.map(r,(s)=>p(mn,{present:n||i.open,children:p(ei,{asChild:!0,container:o,children:s})}))})},"DialogPortal"),GS="DialogOverlay",Mh=B(Jn(function(t,n){let r=ZL(GS,t.__scopeDialog),{forceMount:o=r.forceMount,...i}=t,s=mo(GS,t.__scopeDialog);return s.modal?p(mn,{present:o||s.open,children:p(cK,{...i,ref:n})}):null},"DialogOverlay")),lK=Ft("DialogOverlay.RemoveScroll"),cK=B(Jn(function(t,n){let{__scopeDialog:r,...o}=t,i=mo(GS,r),s=kS(),a=ye(n,s);return p(Hi,{as:lK,allowPinchZoom:!0,shards:ce(()=>[i.contentRef,...i.branchNodes.map((l)=>({current:l}))],[i.contentRef,i.branchNodes]),children:p(ge.div,{"data-state":WO(i.open),...o,ref:a,style:{pointerEvents:"auto",...o.style}})})},"DialogOverlayImpl")),Qh="DialogContent",$h=B(Jn(function(t,n){let r=ZL(Qh,t.__scopeDialog),{forceMount:o=r.forceMount,...i}=t,s=mo(Qh,t.__scopeDialog);return p(mn,{present:o||s.open,children:s.modal?p(uK,{...i,ref:n}):p(fK,{...i,ref:n})})},"DialogContent")),uK=B(Jn(function(t,n){let r=mo(Qh,t.__scopeDialog),o=T(null),i=ye(n,r.contentRef,o);return L(()=>{let s=o.current;if(s)return la(s)},[]),p(UL,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,onCloseAutoFocus:ne(t.onCloseAutoFocus,(s)=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:ne(t.onPointerDownOutside,(s)=>{let a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0;if(a.button===2||l)s.preventDefault()}),onFocusOutside:ne(t.onFocusOutside,(s)=>s.preventDefault())})},"DialogContentModal")),fK=B(Jn(function(t,n){let r=mo(Qh,t.__scopeDialog),o=T(!1),i=T(!1);return p(UL,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:(s)=>{if(t.onCloseAutoFocus?.(s),!s.defaultPrevented){if(!o.current)r.triggerRef.current?.focus();s.preventDefault()}o.current=!1,i.current=!1},onInteractOutside:(s)=>{if(t.onInteractOutside?.(s),!s.defaultPrevented){if(o.current=!0,s.detail.originalEvent.type==="pointerdown")i.current=!0}let a=s.target;if(r.triggerRef.current?.contains(a))s.preventDefault();if(s.detail.originalEvent.type==="focusin"&&i.current)s.preventDefault()}})},"DialogContentNonModal")),UL=B(Jn(function(t,n){let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,"aria-describedby":a,children:l,...c}=t,u=mo(Qh,r);return ti(),p(Sl,{registry:u.branchRegistry,children:p(aa,{asChild:!0,loop:!0,trapped:o,branches:u.branchNodes,onMountAutoFocus:i,onUnmountAutoFocus:s,children:p(Jo,{role:"dialog",id:u.contentId,"aria-labelledby":u.titlePresent?u.titleId:void 0,"aria-describedby":u.descriptionPresent?YL(a,u.descriptionId):a,"data-state":WO(u.open),...c,ref:n,deferPointerDownOutside:!0,onDismiss:()=>u.onOpenChange(!1),children:l})})})},"DialogContentImpl")),FS=B(Jn(function(t,n){let{__scopeDialog:r,...o}=t,i=mo("DialogTitle",r),{setTitleCount:s}=i;return Ue(()=>(s((a)=>a+1),()=>s((a)=>a-1)),[s]),p(ge.h2,{id:i.titleId,...o,ref:n})},"DialogTitle")),KS=B(Jn(function(t,n){let{__scopeDialog:r,...o}=t,i=mo("DialogDescription",r),{setDescriptionCount:s}=i;return Ue(()=>(s((a)=>a+1),()=>s((a)=>a-1)),[s]),p(ge.p,{id:i.descriptionId,...o,ref:n})},"DialogDescription")),dK="DialogClose",Dh=B(Jn(function(t,n){let{__scopeDialog:r,...o}=t,i=mo(dK,r);return p(ge.button,{type:"button",...o,ref:n,onClick:ne(t.onClick,()=>i.onOpenChange(!1))})},"DialogClose"));function YL(...e){let t=new Set;for(let n of e){if(typeof n!=="string")continue;for(let r of String(n).trim().split(/\s+/))if(r)t.add(r)}return t.size>0?Array.from(t).join(" "):void 0}Jn(YL,"concatAriaDescribedby");function WO(e){return e?"open":"closed"}Jn(WO,"getState");var hK=Object.defineProperty,Wi=(e,t)=>hK(e,"name",{value:t,configurable:!0}),pK="AlertDialog",[mK,Xbe]=at(pK,[WS]),Fi=WS(),gK=Wi((e)=>{let{__scopeAlertDialog:t,...n}=e,r=Fi(t);return p(Gu,{...r,...n,modal:!0})},"AlertDialog"),Bbe=B(Wi(function(t,n){let{__scopeAlertDialog:r,...o}=t,i=Fi(r);return p(HO,{...i,...o,ref:n})},"AlertDialogTrigger")),OK=Wi((e)=>{let{__scopeAlertDialog:t,...n}=e,r=Fi(t);return p(Eh,{...r,...n})},"AlertDialogPortal"),bK=B(Wi(function(t,n){let{__scopeAlertDialog:r,...o}=t,i=Fi(r);return p(Mh,{...i,...o,ref:n})},"AlertDialogOverlay")),yK="AlertDialogContent",[vK,xK]=mK(yK),wK=B(Wi(function(t,n){let{__scopeAlertDialog:r,children:o,...i}=t,s=Fi(r),a=T(null),l=ye(n,a),c=T(null);return p(vK,{scope:r,cancelRef:c,children:p($h,{role:"alertdialog",...s,...i,ref:l,onOpenAutoFocus:ne(i.onOpenAutoFocus,(u)=>{u.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:(u)=>u.preventDefault(),onInteractOutside:(u)=>u.preventDefault(),children:o})})},"AlertDialogContent")),SK=B(Wi(function(t,n){let{__scopeAlertDialog:r,...o}=t,i=Fi(r);return p(FS,{...i,...o,ref:n})},"AlertDialogTitle")),kK=B(Wi(function(t,n){let{__scopeAlertDialog:r,...o}=t,i=Fi(r);return p(KS,{...i,...o,ref:n})},"AlertDialogDescription")),CK=B(Wi(function(t,n){let{__scopeAlertDialog:r,...o}=t,i=Fi(r);return p(Dh,{...i,...o,ref:n})},"AlertDialogAction")),RK="AlertDialogCancel",PK=B(Wi(function(t,n){let{__scopeAlertDialog:r,...o}=t,{cancelRef:i}=xK(RK,r),s=Fi(r),a=ye(n,i);return p(Dh,{...s,...o,ref:a})},"AlertDialogCancel"));var TK=Object.defineProperty,AK=(e,t)=>TK(e,"name",{value:t,configurable:!0});function Nh(e){let[t,n]=A(void 0);return Ue(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let r=0,o=new ResizeObserver((i)=>{if(!Array.isArray(i))return;if(!i.length)return;let s=i[0];window.cancelAnimationFrame(r),r=window.requestAnimationFrame(()=>{let a,l;if("borderBoxSize"in s){let c=s.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,l=u.blockSize}else a=e.offsetWidth,l=e.offsetHeight;n({width:a,height:l})})});return o.observe(e,{box:"border-box"}),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}else n(void 0)},[e]),t}AK(Nh,"useSize");var QK=Object.defineProperty,Ki=(e,t)=>QK(e,"name",{value:t,configurable:!0}),JS="Checkbox",[EK,Jbe]=at(JS),[MK,ek]=EK(JS);function qL(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:i,form:s,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:f}=e,[d,h]=Wt({prop:n,defaultProp:o??!1,onChange:l,caller:JS}),[m,g]=A(null),[b,O]=A(null),[y,v]=A(null),x=m?!!s||!!m.closest("form"):!0,w={checked:d,disabled:i,setChecked:h,control:m,setControl:g,name:a,form:s,value:u,userClick:y,onUserClick:v,required:c,defaultChecked:Ur(o)?!1:o,isFormControl:x,bubbleInput:b,setBubbleInput:O};return p(MK,{scope:t,...w,children:GL(f)?f(w):r})}Ki(qL,"CheckboxProvider");var $K="CheckboxTrigger",DK=B(Ki(function({__scopeCheckbox:t,onKeyDown:n,onClick:r,...o},i){let{control:s,value:a,disabled:l,checked:c,required:u,setControl:f,setChecked:d,onUserClick:h,isFormControl:m,bubbleInput:g}=ek($K,t),b=ye(i,f),O=T(c);return L(()=>{let y=s?.form;if(y){let v=Ki(()=>d(O.current),"reset");return y.addEventListener("reset",v),()=>y.removeEventListener("reset",v)}},[s,d]),p(ge.button,{type:"button",role:"checkbox","aria-checked":Ur(c)?"mixed":c,"aria-required":u,"data-state":tk(c),"data-disabled":l?"":void 0,disabled:l,value:a,...o,ref:b,onKeyDown:ne(n,(y)=>{if(y.key==="Enter")y.preventDefault()}),onClick:ne(r,(y)=>{let v=y.isPropagationStopped();if(h({requestedChecked:Ur(c)?!0:!c,hasConsumerStoppedPropagation:v}),d((x)=>Ur(x)?!0:!x),g&&m){if(!v)y.stopPropagation()}})})},"CheckboxTrigger")),_K=B(Ki(function(t,n){let{__scopeCheckbox:r,name:o,checked:i,defaultChecked:s,required:a,disabled:l,value:c,onCheckedChange:u,form:f,...d}=t;return p(qL,{__scopeCheckbox:r,checked:i,defaultChecked:s,disabled:l,required:a,onCheckedChange:u,name:o,form:f,value:c,internal_do_not_use_render:({isFormControl:h})=>P(st,{children:[p(DK,{...d,ref:n,__scopeCheckbox:r}),h&&p(jK,{__scopeCheckbox:r})]})})},"Checkbox")),NK="CheckboxIndicator",LK=B(Ki(function(t,n){let{__scopeCheckbox:r,forceMount:o,...i}=t,s=ek(NK,r);return p(mn,{present:o||Ur(s.checked)||s.checked===!0,children:p(ge.span,{"data-state":tk(s.checked),"data-disabled":s.disabled?"":void 0,...i,ref:n,style:{pointerEvents:"none",...t.style}})})},"CheckboxIndicator")),zK="CheckboxBubbleInput",jK=B(Ki(function({__scopeCheckbox:t,onClick:n,...r},o){let{control:i,userClick:s,checked:a,defaultChecked:l,required:c,disabled:u,name:f,value:d,form:h,bubbleInput:m,setBubbleInput:g}=ek(zK,t),b=ye(o,g),O=Nh(i),y=T(!1),v=T(a),x=T(s),w=T(null);L(()=>{let k=m;if(!k)return;let R=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(R,"checked").set;if(!E)return;let _=v.current!==a;v.current=a;let N=s!==null&&s!==x.current;if(x.current=s,N){if(w.current=_?null:s,_)k.indeterminate=Ur(a),E.call(k,Ur(a)?!1:a);k.dispatchEvent(new Event("click",{bubbles:!s.hasConsumerStoppedPropagation}))}else if(_){let V=w.current;w.current=null;let U=V?.requestedChecked===a;y.current=!0,k.indeterminate=Ur(a),E.call(k,Ur(a)?!1:a),k.dispatchEvent(new Event("click",{bubbles:!(U&&V.hasConsumerStoppedPropagation)})),y.current=!1}},[m,a,s]);let S=T(Ur(a)?!1:a);return p(ge.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??S.current,required:c,disabled:u,name:f,value:d,form:h,...r,tabIndex:-1,ref:b,onClick:ne(n,(k)=>{if(y.current)k.stopPropagation()}),style:{...r.style,...O,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function GL(e){return typeof e==="function"}Ki(GL,"isFunction");function Ur(e){return e==="indeterminate"}Ki(Ur,"isIndeterminate");function tk(e){return Ur(e)?"indeterminate":e?"checked":"unchecked"}Ki(tk,"getState");var IK=Object.defineProperty,Bt=(e,t)=>IK(e,"name",{value:t,configurable:!0});function Al(e){let t=e+"CollectionProvider",[n,r]=at(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=Bt((g)=>{let{scope:b,children:O}=g,y=T(null),v=T(new Map).current;return p(o,{scope:b,itemMap:v,collectionRef:y,children:O})},"CollectionProvider");s.displayName=t;let a=e+"CollectionSlot",l=Ft(a),c=B((g,b)=>{let{scope:O,children:y}=g,v=i(a,O),x=ye(b,v.collectionRef);return p(l,{ref:x,children:y})});c.displayName=a;let u=e+"CollectionItemSlot",f="data-radix-collection-item",d=Ft(u),h=B((g,b)=>{let{scope:O,children:y,...v}=g,x=T(null),w=ye(b,x),S=i(u,O);return L(()=>(S.itemMap.set(x,{ref:x,...v}),()=>void S.itemMap.delete(x))),p(d,{...{[f]:""},ref:w,children:y})});h.displayName=u;function m(g){let b=i(e+"CollectionConsumer",g);return G(()=>{let y=b.collectionRef.current;if(!y)return[];let v=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(b.itemMap.values()).sort((S,k)=>v.indexOf(S.ref.current)-v.indexOf(k.ref.current))},[b.collectionRef,b.itemMap])}return Bt(m,"useCollection"),[{Provider:s,Slot:c,ItemSlot:h},m,r]}Bt(Al,"createCollection");var WL=new WeakMap,FO=class e extends Map{static{Bt(this,"OrderedDict")}#e;constructor(t){super(t);this.#e=[...super.keys()],WL.set(this,!0)}set(t,n){if(WL.get(this)&&!this.has(t))this.#e.push(t);return super.set(t,n),this}insert(t,n,r){let o=this.has(n),i=o?this.size:this.size+1,s=nk(t),a=s>=0?Math.min(s,i-1):Math.max(i+s,0);if(o?this.#e.indexOf(n)===a:a===this.size)return this.set(n,r),this;let l=this.#e.filter((u)=>u!==n);l.splice(a,0,n);let c=l.map((u)=>[u,u===n?r:this.get(u)]);this.clear();for(let[u,f]of c)this.set(u,f);return this}with(t,n,r){let o=new e(this);return o.insert(t,n,r),o}before(t){let n=this.#e.indexOf(t)-1;if(n<0)return;return this.entryAt(n)}setBefore(t,n,r){let o=this.#e.indexOf(t);if(o===-1)return this;let i=this.#e.indexOf(n),s=i!==-1&&i<o?o-1:o;return this.insert(s,n,r)}after(t){let n=this.#e.indexOf(t);if(n=n===-1||n===this.size-1?-1:n+1,n===-1)return;return this.entryAt(n)}setAfter(t,n,r){let o=this.#e.indexOf(t);if(o===-1)return this;let i=this.#e.indexOf(n),s=i!==-1&&i<=o?o:o+1;return this.insert(s,n,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(t){let n=super.delete(t);if(n)this.#e.splice(this.#e.indexOf(t),1);return n}deleteAt(t){let n=this.keyAt(t);if(n!==void 0)return this.delete(n);return!1}at(t){let n=KO(this.#e,t);if(n!==void 0)return this.get(n)}entryAt(t){let n=KO(this.#e,t);if(n!==void 0)return[n,this.get(n)]}indexOf(t){return this.#e.indexOf(t)}keyAt(t){return KO(this.#e,t)}from(t,n){let r=this.indexOf(t);if(r===-1)return;let o=r+n;if(o<0)o=0;if(o>=this.size)o=this.size-1;return this.at(o)}keyFrom(t,n){let r=this.indexOf(t);if(r===-1)return;let o=r+n;if(o<0)o=0;if(o>=this.size)o=this.size-1;return this.keyAt(o)}find(t,n){let r=0;for(let o of this){if(Reflect.apply(t,n,[o,r,this]))return o;r++}return}findIndex(t,n){let r=0;for(let o of this){if(Reflect.apply(t,n,[o,r,this]))return r;r++}return-1}filter(t,n){let r=[],o=0;for(let i of this){if(Reflect.apply(t,n,[i,o,this]))r.push(i);o++}return new e(r)}map(t,n){let r=[],o=0;for(let i of this)r.push([i[0],Reflect.apply(t,n,[i,o,this])]),o++;return new e(r)}reduce(...t){let[n,r]=t,o=t.length>1;if(!o&&this.size===0)throw TypeError("Reduce of empty OrderedDict with no initial value");let i=0,s=r;for(let a of this){if(i===0&&!o)s=a;else s=Reflect.apply(n,this,[s,a,i,this]);i++}return s}reduceRight(...t){let[n,r]=t,o=t.length>1;if(!o&&this.size===0)throw TypeError("Reduce of empty OrderedDict with no initial value");let i=r;for(let s=this.size-1;s>=0;s--){let a=this.entryAt(s);if(s===this.size-1&&!o)i=a;else i=Reflect.apply(n,this,[i,a,s,this])}return i}sort(t){if(typeof t!=="function")throw TypeError("OrderedDict.sort requires a compare function");let n=[...this.entries()].sort(t);this.clear();for(let[r,o]of n)this.set(r,o);return this}toSorted(t){if(typeof t!=="function")throw TypeError("OrderedDict.toSorted requires a compare function");let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let n=this.size-1;n>=0;n--){let r=this.keyAt(n),o=this.get(r);t.set(r,o)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let o of this.#e.slice(t,n))r.set(o,this.get(o));return r}every(t,n){let r=0;for(let o of this){if(!Reflect.apply(t,n,[o,r,this]))return!1;r++}return!0}some(t,n){let r=0;for(let o of this){if(Reflect.apply(t,n,[o,r,this]))return!0;r++}return!1}};function KO(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=FL(e,t);return n===-1?void 0:e[n]}Bt(KO,"at");function FL(e,t){let n=e.length,r=nk(t),o=r>=0?r:n+r;return o<0||o>=n?-1:o}Bt(FL,"toSafeIndex");function nk(e){return e!==e||e===0?0:Math.trunc(e)}Bt(nk,"toSafeInteger");function XK(e){let t=e+"CollectionProvider",[n,r]=at(t),[o,i]=n(t);o.displayName=e+"CollectionStableContextProvider";let[s,a]=n(t);s.displayName=e+"CollectionStatefulContextProvider";let l=Bt(({state:S,...k})=>S?p(u,{...k,state:S}):p(c,{...k}),"CollectionProvider");l.displayName=t;let c=Bt((S)=>{let k=y();return p(u,{...S,state:k})},"CollectionInit");c.displayName=e+"CollectionInit";let u=Bt((S)=>{let{scope:k,children:R,state:Q}=S,E=T(null),[_,N]=A(null),V=ye(E,N),[U,F]=Q,Z=T(new FO),se=G(()=>{let K=Z.current;if(!ez(K))K.sort(JO);return K},[]);return L(()=>{if(!_)return;let K=tz(()=>{F((te)=>{let I=te.toSorted(JO);return I.some(([M],H)=>te.keyAt(H)!==M)?I:te})});return K.observe(_,{childList:!0,subtree:!0}),()=>{K.disconnect()}},[_,F]),p(o,{scope:k,collectionElementRef:V,collectionElementRefObject:E,getCollection:se,setCollection:F,registryRef:Z,children:p(s,{scope:k,collectionElement:_,collection:U,children:R})})},"CollectionProviderImpl");u.displayName=e+"CollectionProviderImpl";let f=e+"CollectionSlot",d=Ft(f),h=B((S,k)=>{let{scope:R,children:Q}=S,E=i(f,R),_=ye(k,E.collectionElementRef);return p(d,{ref:_,children:Q})});h.displayName=f;let m=e+"CollectionItemSlot",g="data-radix-collection-item",b=Ft(m),O=B((S,k)=>{let{scope:R,children:Q,...E}=S,_=T(null),N=i(m,R),{setCollection:V,registryRef:U}=N,F=T(E);if(!KL(F.current,E))F.current=E;let Z=F.current,se=G((I)=>{let pe=U.current;if(I)pe.set(I,{...F.current,element:I});else if(_.current)pe.delete(_.current)},[U]),K=ye(k,se,_);Ue(()=>{let I=_.current,pe=U.current;if(I&&pe.has(I))pe.set(I,{...Z,element:I})},[Z,U]);let te=T(null);return L(()=>{let I=_.current,pe=te.current;if((pe?.element??null)===I&&(!I||pe?.itemData===Z))return;te.current=I?{element:I,itemData:Z}:null,V((M)=>{let H=new FO(M);if(pe&&pe.element!==I)H.delete(pe.element);if(I)H.set(I,{...Z,element:I});return H.sort(JO)})}),L(()=>()=>{let I=te.current;if(te.current=null,!I)return;V((pe)=>{if(!pe.has(I.element))return pe;let M=new FO(pe);return M.delete(I.element),M})},[V]),p(b,{...{[g]:""},ref:K,children:Q})});O.displayName=m;function y(){return A(new FO)}Bt(y,"useInitCollection");function v(S){let{collection:k}=a(e+"CollectionConsumer",S);return k}Bt(v,"useCollection");function x(S){let{getCollection:k}=i(e+"CollectionConsumer",S);return k}return Bt(x,"useGetCollection"),[{Provider:l,Slot:h,ItemSlot:O},{createCollectionScope:r,useCollection:v,useGetCollection:x,useInitCollection:y}]}Bt(XK,"createCollection");function KL(e,t){if(e===t)return!0;if(typeof e!=="object"||typeof t!=="object")return!1;if(e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let o of n){if(!Object.prototype.hasOwnProperty.call(t,o))return!1;if(e[o]!==t[o])return!1}return!0}Bt(KL,"shallowEqual");function JL(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Bt(JL,"isElementPreceding");function ez(e){let t;for(let n of e.keys()){if(t){let r=t.compareDocumentPosition(n);if(!(r&Node.DOCUMENT_POSITION_DISCONNECTED)&&r&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}Bt(ez,"isInDocumentOrder");function JO(e,t){return!e[1].element||!t[1].element?0:JL(e[1].element,t[1].element)?-1:1}Bt(JO,"sortByDocumentPosition");function tz(e){return new MutationObserver((n)=>{for(let r of n)if(r.type==="childList"){e();return}})}Bt(tz,"getChildListObserver");var BK=Object.defineProperty,ZK=(e,t)=>BK(e,"name",{value:t,configurable:!0}),UK={LTR:"ltr",RTL:"rtl"},YK=gn(void 0);function Ji(e){let t=bn(YK);return e||t||UK.LTR}ZK(Ji,"useDirection");var oz=["top","right","bottom","left"];var{min:ni,max:go,round:zh,floor:jh}=Math,ri=(e)=>({x:e,y:e}),VK={left:"right",right:"left",bottom:"top",top:"bottom"};function rk(e,t,n){return go(e,ni(t,n))}function oi(e,t){return typeof e==="function"?e(t):e}function es(e){return e.split("-")[0]}function Ql(e){return e.split("-")[1]}function t0(e){return e==="x"?"y":"x"}function n0(e){return e==="y"?"height":"width"}function Oo(e){let t=e[0];return t==="t"||t==="b"?"y":"x"}function r0(e){return t0(Oo(e))}function iz(e,t,n){if(n===void 0)n=!1;let r=Ql(e),o=r0(e),i=n0(o),s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";if(t.reference[i]>t.floating[i])s=Lh(s);return[s,Lh(s)]}function sz(e){let t=Lh(e);return[e0(e),t,e0(t)]}function e0(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var nz=["left","right"],rz=["right","left"],qK=["top","bottom"],GK=["bottom","top"];function HK(e,t,n){switch(e){case"top":case"bottom":if(n)return t?rz:nz;return t?nz:rz;case"left":case"right":return t?qK:GK;default:return[]}}function az(e,t,n,r){let o=Ql(e),i=HK(es(e),n==="start",r);if(o){if(i=i.map((s)=>s+"-"+o),t)i=i.concat(i.map(e0))}return i}function Lh(e){let t=es(e);return VK[t]+e.slice(t.length)}function WK(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function ok(e){return typeof e!=="number"?WK(e):{top:e,right:e,bottom:e,left:e}}function El(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function lz(e,t,n){let{reference:r,floating:o}=e,i=Oo(t),s=r0(t),a=n0(s),l=es(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,d=r[a]/2-o[a]/2,h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-o.width,y:f};break;default:h={x:r.x,y:r.y}}let m=Ql(t);if(m)h[s]+=d*(m==="end"?1:-1)*(n&&c?-1:1);return h}async function fz(e,t){var n;if(t===void 0)t={};let{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=oi(t,e),m=ok(h),b=a[d?f==="floating"?"reference":"floating":f],O=El(await i.getClippingRect({element:((n=await(i.isElement==null?void 0:i.isElement(b)))!=null?n:!0)?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=f==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,v=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(v))&&await(i.getScale==null?void 0:i.getScale(v))||{x:1,y:1},w=El(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:v,strategy:l}):y);return{top:(O.top-w.top+m.top)/x.y,bottom:(w.bottom-O.bottom+m.bottom)/x.y,left:(O.left-w.left+m.left)/x.x,right:(w.right-O.right+m.right)/x.x}}var FK=50,dz=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=s.detectOverflow?s:{...s,detectOverflow:fz},l=await(s.isRTL==null?void 0:s.isRTL(t)),c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=lz(c,r,l),d=r,h=0,m={};for(let g=0;g<i.length;g++){let b=i[g];if(!b)continue;let{name:O,fn:y}=b,{x:v,y:x,data:w,reset:S}=await y({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:a,elements:{reference:e,floating:t}});if(u=v!=null?v:u,f=x!=null?x:f,m[O]={...m[O],...w},S&&h<FK){if(h++,typeof S==="object"){if(S.placement)d=S.placement;if(S.rects)c=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):S.rects;({x:u,y:f}=lz(c,d,l))}g=-1}}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}},hz=(e)=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=oi(e,t)||{};if(c==null)return{};let f=ok(u),d={x:n,y:r},h=r0(o),m=n0(h),g=await s.getDimensions(c),b=h==="y",O=b?"top":"left",y=b?"bottom":"right",v=b?"clientHeight":"clientWidth",x=i.reference[m]+i.reference[h]-d[h]-i.floating[m],w=d[h]-i.reference[h],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c)),k=S?S[v]:0;if(!k||!await(s.isElement==null?void 0:s.isElement(S)))k=a.floating[v]||i.floating[m];let R=x/2-w/2,Q=k/2-g[m]/2-1,E=ni(f[O],Q),_=ni(f[y],Q),N=k-g[m]-_,V=k/2-g[m]/2+R,U=rk(E,V,N),F=!l.arrow&&Ql(o)!=null&&V!==U&&i.reference[m]/2-(V<E?E:_)-g[m]/2<0,Z=F?V<E?V-E:V-N:0;return{[h]:d[h]+Z,data:{[h]:U,centerOffset:V-U-Z,...F&&{alignmentOffset:Z}},reset:F}}});var pz=function(e){if(e===void 0)e={};return{name:"flip",options:e,async fn(t){var n,r;let{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...b}=oi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let O=es(o),y=Oo(a),v=es(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),w=d||(v||!g?[Lh(a)]:sz(a)),S=m!=="none";if(!d&&S)w.push(...az(a,g,m,x));let k=[a,...w],R=await l.detectOverflow(t,b),Q=[],E=((r=i.flip)==null?void 0:r.overflows)||[];if(u)Q.push(R[O]);if(f){let U=iz(o,s,x);Q.push(R[U[0]],R[U[1]])}if(E=[...E,{placement:o,overflows:Q}],!Q.every((U)=>U<=0)){var _,N;let U=(((_=i.flip)==null?void 0:_.index)||0)+1,F=k[U];if(F){if(!(f==="alignment"?y!==Oo(F):!1)||E.every((K)=>Oo(K.placement)===y?K.overflows[0]>0:!0))return{data:{index:U,overflows:E},reset:{placement:F}}}let Z=(N=E.filter((se)=>se.overflows[0]<=0).sort((se,K)=>se.overflows[1]-K.overflows[1])[0])==null?void 0:N.placement;if(!Z)switch(h){case"bestFit":{var V;let se=(V=E.filter((K)=>{if(S){let te=Oo(K.placement);return te===y||te==="y"}return!0}).map((K)=>[K.placement,K.overflows.filter((te)=>te>0).reduce((te,I)=>te+I,0)]).sort((K,te)=>K[1]-te[1])[0])==null?void 0:V[0];if(se)Z=se;break}case"initialPlacement":Z=a;break}if(o!==Z)return{reset:{placement:Z}}}return{}}}};function cz(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function uz(e){return oz.some((t)=>e[t]>=0)}var mz=function(e){if(e===void 0)e={};return{name:"hide",options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:o="referenceHidden",...i}=oi(e,t);switch(o){case"referenceHidden":{let s=await r.detectOverflow(t,{...i,elementContext:"reference"}),a=cz(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:uz(a)}}}case"escaped":{let s=await r.detectOverflow(t,{...i,altBoundary:!0}),a=cz(s,n.floating);return{data:{escapedOffsets:a,escaped:uz(a)}}}default:return{}}}}};var gz=new Set(["left","top"]);async function KK(e,t){let{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=es(n),a=Ql(n),l=Oo(n)==="y",c=gz.has(s)?-1:1,u=i&&l?-1:1,f=oi(t,e),{mainAxis:d,crossAxis:h,alignmentAxis:m}=typeof f==="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};if(a&&typeof m==="number")h=a==="end"?m*-1:m;return l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}var Oz=function(e){if(e===void 0)e=0;return{name:"offset",options:e,async fn(t){var n,r;let{x:o,y:i,placement:s,middlewareData:a}=t,l=await KK(t,e);if(s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset)return{};return{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},bz=function(e){if(e===void 0)e={};return{name:"shift",options:e,async fn(t){let{x:n,y:r,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:(y)=>{let{x:v,y:x}=y;return{x:v,y:x}}},...c}=oi(e,t),u={x:n,y:r},f=await i.detectOverflow(t,c),d=Oo(o),h=t0(d),m=u[h],g=u[d],b=(y,v)=>rk(v+f[y==="y"?"top":"left"],v,v-f[y==="y"?"bottom":"right"]);if(s)m=b(h,m);if(a)g=b(d,g);let O=l.fn({...t,[h]:m,[d]:g});return{...O,data:{x:O.x-n,y:O.y-r,enabled:{[h]:s,[d]:a}}}}}},yz=function(e){if(e===void 0)e={};return{options:e,fn(t){var n,r;let{x:o,y:i,placement:s,rects:a,middlewareData:l}=t,{offset:c=0,mainAxis:u=!0,crossAxis:f=!0}=oi(e,t),d={x:o,y:i},h=Oo(s),m=t0(h),g=d[m],b=d[h],O=oi(c,t),y=typeof O==="number"?{mainAxis:O,crossAxis:0}:{mainAxis:(n=O.mainAxis)!=null?n:0,crossAxis:(r=O.crossAxis)!=null?r:0};if(u){let w=m==="y"?"height":"width",S=a.reference[m]-a.floating[w]+y.mainAxis,k=a.reference[m]+a.reference[w]-y.mainAxis;if(g<S)g=S;else if(g>k)g=k}if(f){var v,x;let w=m==="y"?"width":"height",S=gz.has(es(s)),k=a.reference[h]-a.floating[w]+(S?((v=l.offset)==null?void 0:v[h])||0:0)+(S?0:y.crossAxis),R=a.reference[h]+a.reference[w]+(S?0:((x=l.offset)==null?void 0:x[h])||0)-(S?y.crossAxis:0);if(b<k)b=k;else if(b>R)b=R}return{[m]:g,[h]:b}}}},vz=function(e){if(e===void 0)e={};return{name:"size",options:e,async fn(t){let{placement:n,rects:r,platform:o,elements:i}=t,{apply:s=()=>{},...a}=oi(e,t),l=await o.detectOverflow(t,a),c=es(n),u=Ql(n),f=Oo(n)==="y",{width:d,height:h}=r.floating,m,g;if(c==="top"||c==="bottom")m=c,g=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right";else g=c,m=u==="end"?"top":"bottom";let b=h-l.top-l.bottom,O=d-l.left-l.right,y=ni(h-l[m],b),v=ni(d-l[g],O),x=t.middlewareData.shift,w=!x,S=y,k=v;if(x!=null&&x.enabled.x)k=O;if(x!=null&&x.enabled.y)S=b;if(w&&!u)if(f)k=d-2*go(l.left,l.right);else S=h-2*go(l.top,l.bottom);await s({...t,availableWidth:k,availableHeight:S});let R=await o.getDimensions(i.floating);if(d!==R.width||h!==R.height)return{reset:{rects:!0}};return{}}}};function o0(){return typeof window<"u"}function Dl(e){if(wz(e))return(e.nodeName||"").toLowerCase();return"#document"}function _n(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ii(e){var t;return(t=(wz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wz(e){if(!o0())return!1;return e instanceof Node||e instanceof _n(e).Node}function bo(e){if(!o0())return!1;return e instanceof Element||e instanceof _n(e).Element}function ts(e){if(!o0())return!1;return e instanceof HTMLElement||e instanceof _n(e).HTMLElement}function xz(e){if(!o0()||typeof ShadowRoot>"u")return!1;return e instanceof ShadowRoot||e instanceof _n(e).ShadowRoot}function Ih(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=yo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function Sz(e){return/^(table|td|th)$/.test(Dl(e))}function Xh(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}var JK=/transform|translate|scale|rotate|perspective|filter/,eJ=/paint|layout|strict|content/,Ml=(e)=>!!e&&e!=="none",ik;function i0(e){let t=bo(e)?yo(e):e;return Ml(t.transform)||Ml(t.translate)||Ml(t.scale)||Ml(t.rotate)||Ml(t.perspective)||!s0()&&(Ml(t.backdropFilter)||Ml(t.filter))||JK.test(t.willChange||"")||eJ.test(t.contain||"")}function kz(e){let t=ca(e);while(ts(t)&&!Hu(t)){if(i0(t))return t;else if(Xh(t))return null;t=ca(t)}return null}function s0(){if(ik==null)ik=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return ik}function Hu(e){return/^(html|body|#document)$/.test(Dl(e))}function yo(e){return _n(e).getComputedStyle(e)}function Bh(e){if(bo(e))return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop};return{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ca(e){if(Dl(e)==="html")return e;let t=e.assignedSlot||e.parentNode||xz(e)&&e.host||ii(e);return xz(t)?t.host:t}function Cz(e){let t=ca(e);if(Hu(t))return(e.ownerDocument||e).body;if(ts(t)&&Ih(t))return t;return Cz(t)}function $l(e,t,n){var r;if(t===void 0)t=[];if(n===void 0)n=!0;let o=Cz(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=_n(o);if(i){let a=a0(s);return t.concat(s,s.visualViewport||[],Ih(o)?o:[],a&&n?$l(a):[])}else return t.concat(o,$l(o,[],n))}function a0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Tz(e){let t=yo(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=ts(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=zh(n)!==i||zh(r)!==s;if(a)n=i,r=s;return{width:n,height:r,$:a}}function ak(e){return!bo(e)?e.contextElement:e}function Wu(e){let t=ak(e);if(!ts(t))return ri(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Tz(t),s=(i?zh(n.width):n.width)/r,a=(i?zh(n.height):n.height)/o;if(!s||!Number.isFinite(s))s=1;if(!a||!Number.isFinite(a))a=1;return{x:s,y:a}}var tJ=ri(0);function Az(e){let t=_n(e);if(!s0()||!t.visualViewport)return tJ;return{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nJ(e,t,n){if(t===void 0)t=!1;return!!n&&t&&n===_n(e)}function _l(e,t,n,r){if(t===void 0)t=!1;if(n===void 0)n=!1;let o=e.getBoundingClientRect(),i=ak(e),s=ri(1);if(t)if(r){if(bo(r))s=Wu(r)}else s=Wu(e);let a=nJ(i,n,r)?Az(i):ri(0),l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i&&r){let d=_n(i),h=bo(r)?_n(r):r,m=d,g=a0(m);while(g&&h!==m){let b=Wu(g),O=g.getBoundingClientRect(),y=yo(g),v=O.left+(g.clientLeft+parseFloat(y.paddingLeft))*b.x,x=O.top+(g.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,f*=b.y,l+=v,c+=x,m=_n(g),g=a0(m)}}return El({width:u,height:f,x:l,y:c})}function l0(e,t){let n=Bh(e).scrollLeft;if(!t)return _l(ii(e)).left+n;return t.left+n}function Qz(e,t){let n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-l0(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function rJ(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i=o==="fixed",s=ii(r),a=t?Xh(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=ri(1),u=ri(0),f=ts(r);if(f||!i){if(Dl(r)!=="body"||Ih(s))l=Bh(r);if(f){let h=_l(r);c=Wu(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}}let d=s&&!f&&!i?Qz(s,l):ri(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function oJ(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function iJ(e){let t=Bh(e),n=e.ownerDocument.body,r=go(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=go(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),i=-t.scrollLeft+l0(e),s=-t.scrollTop;if(yo(n).direction==="rtl")i+=go(e.clientWidth,n.clientWidth)-r;return{width:r,height:o,x:i,y:s}}var sJ=25;function aJ(e,t,n){if(n===void 0)n="viewport";let r=n==="layoutViewport",o=_n(e),i=ii(e),s=o.visualViewport,{clientWidth:a,clientHeight:l}=i,c=0,u=0;if(s){let d=!s0()||t==="fixed";if(r){if(!d)c=-s.offsetLeft,u=-s.offsetTop}else if(a=s.width,l=s.height,d)c=s.offsetLeft,u=s.offsetTop}if(l0(i)<=0){let d=i.ownerDocument,h=d.body,m=getComputedStyle(h),g=d.compatMode==="CSS1Compat"?parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0:0,b=Math.abs(i.clientWidth-h.clientWidth-g),O=getComputedStyle(i).scrollbarGutter==="stable both-edges"?b/2:b;if(O<=sJ)a-=O}return{width:a,height:l,x:c,y:u}}function lJ(e,t){let n=_l(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Wu(e),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Rz(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=aJ(e,n,t);else if(t==="document")r=iJ(ii(e));else if(bo(t))r=lJ(t,n);else{let o=Az(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return El(r)}function cJ(e,t){let n=t.get(e);if(n)return n;let r=$l(e,[],!1).filter((a)=>bo(a)&&Dl(a)!=="body"),o=null,i=yo(e).position==="fixed",s=i?ca(e):e;while(bo(s)&&!Hu(s)){let a=yo(s),l=i0(s),c=o?o.position:i?"fixed":"";if(!l&&(c==="fixed"||c==="absolute"&&a.position==="static"))r=r.filter((f)=>f!==s);else o=a;s=ca(s)}return t.set(e,r),r}function uJ(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,s=[...n==="clippingAncestors"?Xh(t)?[]:cJ(t,this._c):[].concat(n),r],a=Rz(t,s[0],o),{top:l,right:c,bottom:u,left:f}=a;for(let d=1;d<s.length;d++){let h=Rz(t,s[d],o);l=go(h.top,l),c=ni(h.right,c),u=ni(h.bottom,u),f=go(h.left,f)}return{width:c-f,height:u-l,x:f,y:l}}function fJ(e){let{width:t,height:n}=Tz(e);return{width:t,height:n}}function dJ(e,t,n){let r=ts(t),o=ii(t),i=n==="fixed",s=_l(e,!0,i,t),a={scrollLeft:0,scrollTop:0},l=ri(0);if(r||!i){if(Dl(t)!=="body"||Ih(o))a=Bh(t);if(r){let d=_l(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}}if(!r&&o)l.x=l0(o);let c=o&&!r&&!i?Qz(o,a):ri(0),u=s.left+a.scrollLeft-l.x-c.x,f=s.top+a.scrollTop-l.y-c.y;return{x:u,y:f,width:s.width,height:s.height}}function sk(e){return yo(e).position==="static"}function Pz(e,t){if(!ts(e)||yo(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;if(ii(e)===n)n=n.ownerDocument.body;return n}function Ez(e,t){let n=_n(e);if(Xh(e))return n;if(!ts(e)){let o=ca(e);while(o&&!Hu(o)){if(bo(o)&&!sk(o))return o;o=ca(o)}return n}let r=Pz(e,t);while(r&&Sz(r)&&sk(r))r=Pz(r,t);if(r&&Hu(r)&&sk(r)&&!i0(r))return n;return r||kz(e)||n}var hJ=async function(e){let t=this.getOffsetParent||Ez,n=this.getDimensions,r=await n(e.floating);return{reference:dJ(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function pJ(e){return yo(e).direction==="rtl"}var Mz={convertOffsetParentRelativeRectToViewportRelativeRect:rJ,getDocumentElement:ii,getClippingRect:uJ,getOffsetParent:Ez,getElementRects:hJ,getClientRects:oJ,getDimensions:fJ,getScale:Wu,isElement:bo,isRTL:pJ};function $z(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mJ(e,t,n){let r=null,o,i=ii(e);function s(){var u;clearTimeout(o),(u=r)==null||u.disconnect(),r=null}function a(u,f){if(u===void 0)u=!1;if(f===void 0)f=1;s();let d=e.getBoundingClientRect(),{left:h,top:m,width:g,height:b}=d;if(!u)t();if(!g||!b)return;let O=jh(m),y=jh(i.clientWidth-(h+g)),v=jh(i.clientHeight-(m+b)),x=jh(h),S={rootMargin:-O+"px "+-y+"px "+-v+"px "+-x+"px",threshold:go(0,ni(1,f))||1},k=!0;function R(Q){let E=Q[0].intersectionRatio;if(!$z(d,e.getBoundingClientRect()))return a();if(E!==f){if(!k)return a();if(!E)o=setTimeout(()=>{a(!1,0.0000001)},1000);else a(!1,E)}k=!1}try{r=new IntersectionObserver(R,{...S,root:i.ownerDocument})}catch(Q){r=new IntersectionObserver(R,S)}r.observe(e)}let l=_n(e),c=()=>a(n);return l.addEventListener("resize",c),a(!0),()=>{l.removeEventListener("resize",c),s()}}function lk(e,t,n,r){if(r===void 0)r={};let{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver==="function",layoutShift:a=typeof IntersectionObserver==="function",animationFrame:l=!1}=r,c=ak(e),u=o||i?[...c?$l(c):[],...t?$l(t):[]]:[];u.forEach((O)=>{o&&O.addEventListener("scroll",n),i&&O.addEventListener("resize",n)});let f=c&&a?mJ(c,n,i):null,d=-1,h=null;if(s){if(h=new ResizeObserver((O)=>{let[y]=O;if(y&&y.target===c&&h&&t)h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)});n()}),c&&!l)h.observe(c);if(t)h.observe(t)}let m,g=l?_l(e):null;if(l)b();function b(){let O=_l(e);if(g&&!$z(g,O))n();g=O,m=requestAnimationFrame(b)}return n(),()=>{var O;if(u.forEach((y)=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),f==null||f(),(O=h)==null||O.disconnect(),h=null,l)cancelAnimationFrame(m)}}var Dz=Oz;var _z=bz,Nz=pz,Lz=vz,zz=mz,ck=hz;var jz=yz,uk=(e,t,n)=>{let r=new Map,o=n!=null?n:{},i={...Mz,...o.platform,_c:r};return dz(e,t,{...o,platform:i})};var gJ=typeof document<"u",OJ=function(){},c0=gJ?Lt:OJ;function u0(e,t){if(e===t)return!0;if(typeof e!==typeof t)return!1;if(typeof e==="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e==="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!u0(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){let i=o[r];if(i==="_owner"&&e.$$typeof)continue;if(!u0(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Xz(e){if(typeof window>"u")return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Iz(e,t){let n=Xz(e);return Math.round(t*n)/n}function fk(e){let t=T(e);return c0(()=>{t.current=e}),t}function Bz(e){if(e===void 0)e={};let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,f]=A({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=A(r);if(!u0(d,r))h(r);let[m,g]=A(null),[b,O]=A(null),y=G((K)=>{if(K!==S.current)S.current=K,g(K)},[]),v=G((K)=>{if(K!==k.current)k.current=K,O(K)},[]),x=i||m,w=s||b,S=T(null),k=T(null),R=T(u),Q=l!=null,E=fk(l),_=fk(o),N=fk(c),V=G(()=>{if(!S.current||!k.current)return;let K={placement:t,strategy:n,middleware:d};if(_.current)K.platform=_.current;uk(S.current,k.current,K).then((te)=>{let I={...te,isPositioned:N.current!==!1};if(U.current&&!u0(R.current,I))R.current=I,wr(()=>{f(I)})})},[d,t,n,_,N]);c0(()=>{if(c===!1&&R.current.isPositioned)R.current.isPositioned=!1,f((K)=>({...K,isPositioned:!1}))},[c]);let U=T(!1);c0(()=>(U.current=!0,()=>{U.current=!1}),[]),c0(()=>{if(x)S.current=x;if(w)k.current=w;if(x&&w){if(E.current)return E.current(x,w,V);V()}},[x,w,V,E,Q]);let F=ce(()=>({reference:S,floating:k,setReference:y,setFloating:v}),[y,v]),Z=ce(()=>({reference:x,floating:w}),[x,w]),se=ce(()=>{let K={position:n,left:0,top:0};if(!Z.floating)return K;let te=Iz(Z.floating,u.x),I=Iz(Z.floating,u.y);if(a)return{...K,transform:"translate("+te+"px, "+I+"px)",...Xz(Z.floating)>=1.5&&{willChange:"transform"}};return{position:n,left:te,top:I}},[n,a,Z.floating,u.x,u.y]);return ce(()=>({...u,update:V,refs:F,elements:Z,floatingStyles:se}),[u,V,F,Z,se])}var bJ=(e)=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){let{element:r,padding:o}=typeof e==="function"?e(n):e;if(r&&t(r)){if(r.current!=null)return ck({element:r.current,padding:o}).fn(n);return{}}if(r)return ck({element:r,padding:o}).fn(n);return{}}}},Zz=(e,t)=>{let n=Dz(e);return{name:n.name,fn:n.fn,options:[e,t]}},Uz=(e,t)=>{let n=_z(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yz=(e,t)=>({fn:jz(e).fn,options:[e,t]}),Vz=(e,t)=>{let n=Nz(e);return{name:n.name,fn:n.fn,options:[e,t]}},qz=(e,t)=>{let n=Lz(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Gz=(e,t)=>{let n=zz(e);return{name:n.name,fn:n.fn,options:[e,t]}};var Hz=(e,t)=>{let n=bJ(e);return{name:n.name,fn:n.fn,options:[e,t]}};var yJ=Object.defineProperty,ua=(e,t)=>yJ(e,"name",{value:t,configurable:!0});var Wz={Partial:"partial",Always:"always"},Fz={Optimized:"optimized",Always:"always"},Kz="Popper",[Jz,Yr]=at(Kz),[vJ,ej]=Jz(Kz),fa=ua((e)=>{let{__scopePopper:t,children:n}=e,[r,o]=A(null),[i,s]=A(void 0);return p(vJ,{scope:t,anchor:r,onAnchorChange:o,placementState:i,setPlacementState:s,children:n})},"Popper"),xJ="PopperAnchor",ns=B(ua(function(t,n){let{__scopePopper:r,virtualRef:o,...i}=t,s=ej(xJ,r),a=T(null),l=s.onAnchorChange,c=G((g)=>{if(a.current=g,g)l(g)},[l]),u=ye(n,c),f=T(null);L(()=>{if(!o)return;let g=f.current;if(f.current=o.current,g!==f.current)l(f.current)});let d=s.placementState&&f0(s.placementState),h=d?.[0],m=d?.[1];return o?null:p(ge.div,{"data-radix-popper-side":h,"data-radix-popper-align":m,...i,ref:u})},"PopperAnchor")),tj="PopperContent",[wJ,jye]=Jz(tj),da=B(ua(function(t,n){let{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d=Wz.Partial,hideWhenDetached:h=!1,updatePositionStrategy:m=Fz.Optimized,onPlaced:g,...b}=t,O=ej(tj,r),[y,v]=A(null),x=ye(n,v),[w,S]=A(null),k=Nh(w),R=k?.width??0,Q=k?.height??0,E=o+(s!=="center"?"-"+s:""),_=typeof f==="number"?f:{top:0,right:0,bottom:0,left:0,...f},N=Array.isArray(u)?u:[u],V=N.length>0,U={padding:_,boundary:N.filter(nj),altBoundary:V},{refs:F,floatingStyles:Z,placement:se,isPositioned:K,middlewareData:te}=Bz({strategy:"fixed",placement:E,whileElementsMounted:ua((...J)=>lk(...J,{animationFrame:m===Fz.Always}),"whileElementsMounted"),elements:{reference:O.anchor},middleware:[Zz({mainAxis:i+Q,alignmentAxis:a}),c&&Uz({mainAxis:!0,crossAxis:!1,...d===Wz.Partial?{limiter:Yz()}:{},...U}),c&&Vz({...U}),qz({...U,apply:ua(({elements:J,rects:fe,availableWidth:qe,availableHeight:Xe})=>{let{width:ve,height:Se}=fe.reference,Ee=J.floating.style;Ee.setProperty("--radix-popper-available-width",`${qe}px`),Ee.setProperty("--radix-popper-available-height",`${Xe}px`),Ee.setProperty("--radix-popper-anchor-width",`${ve}px`),Ee.setProperty("--radix-popper-anchor-height",`${Se}px`)},"apply")}),w&&Hz({element:w,padding:l}),SJ({arrowWidth:R,arrowHeight:Q}),h&&Gz(V?{strategy:"referenceHidden",...U}:{strategy:"referenceHidden",padding:U.padding,altBoundary:U.altBoundary})]}),I=O.setPlacementState;Ue(()=>(I(se),()=>{I(void 0)}),[se,I]);let[pe,M]=f0(se),H=Xt(g);Ue(()=>{if(K)H?.()},[K,H]);let q=te.arrow?.x,X=te.arrow?.y,D=te.arrow?.centerOffset!==0,[ae,Ce]=A();return Ue(()=>{if(y)Ce(window.getComputedStyle(y).zIndex)},[y]),p("div",{ref:F.setFloating,"data-radix-popper-content-wrapper":"",style:{...Z,transform:K?Z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(" "),...te.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:p(wJ,{scope:r,placedSide:pe,placedAlign:M,onArrowChange:S,arrowX:q,arrowY:X,shouldHideArrow:D,children:p(ge.div,{"data-side":pe,"data-align":M,...b,ref:x,style:{...b.style,animation:!K?"none":b.style?.animation}})})})},"PopperContent"));function nj(e){return e!==null}ua(nj,"isNotNull");var SJ=ua((e)=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:r,middlewareData:o}=t,s=o.arrow?.centerOffset!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[c,u]=f0(n),f={start:"0%",center:"50%",end:"100%"}[u],d=(o.arrow?.x??0)+a/2,h=(o.arrow?.y??0)+l/2,m="",g="";if(c==="bottom")m=s?f:`${d}px`,g=`${-l}px`;else if(c==="top")m=s?f:`${d}px`,g=`${r.floating.height+l}px`;else if(c==="right")m=`${-l}px`,g=s?f:`${h}px`;else if(c==="left")m=`${r.floating.width+l}px`,g=s?f:`${h}px`;return{data:{x:m,y:g}}}}),"transformOrigin");function f0(e){let[t,n="center"]=e.split("-");return[t,n]}ua(f0,"getSideAndAlignFromPlacement");var kJ=Object.defineProperty,hk=(e,t)=>kJ(e,"name",{value:t,configurable:!0}),dk=!1;function rj(){let[e,t]=A(dk);return L(()=>{if(!dk)dk=!0,t(!0)},[]),e}hk(rj,"useIsHydrated");var oj=me[" useSyncExternalStore ".trim().toString()];function ij(){return()=>{}}hk(ij,"subscribe");function sj(){return oj(ij,()=>!0,()=>!1)}hk(sj,"useIsHydratedModern");var aj=typeof oj==="function"?sj:rj;var CJ=Object.defineProperty,Nl=(e,t)=>CJ(e,"name",{value:t,configurable:!0}),pk="rovingFocusGroup.onEntryFocus",RJ={bubbles:!1,cancelable:!0},h0="RovingFocusGroup",[mk,cj,PJ]=Al(h0),[TJ,Fu]=at(h0,[PJ]),lj={Vertical:"vertical",Horizontal:"horizontal"},AJ={LTR:"ltr",RTL:"rtl"},[QJ,EJ]=TJ(h0),uj=B(Nl(function(t,n){return p(mk.Provider,{scope:t.__scopeRovingFocusGroup,children:p(mk.Slot,{scope:t.__scopeRovingFocusGroup,children:p(MJ,{...t,ref:n})})})},"RovingFocusGroup")),MJ=B(Nl(function(t,n){let{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=t,h=T(null),m=ye(n,h),g=Ji(s),[b,O]=Wt({prop:a,defaultProp:l??null,onChange:c,caller:h0}),[y,v]=A(!1),x=Xt(u),w=cj(r),S=T(!1),[k,R]=A(0);return L(()=>{let Q=h.current;if(Q)return Q.addEventListener(pk,x),()=>Q.removeEventListener(pk,x)},[x]),p(QJ,{scope:r,orientation:o,dir:g,loop:i,currentTabStopId:b,onItemFocus:G((Q)=>O(Q),[O]),onItemShiftTab:G(()=>v(!0),[]),onFocusableItemAdd:G(()=>R((Q)=>Q+1),[]),onFocusableItemRemove:G(()=>R((Q)=>Q-1),[]),children:p(ge.div,{tabIndex:y||k===0?-1:0,"data-orientation":o,...d,ref:m,style:{outline:"none",...t.style},onMouseDown:ne(t.onMouseDown,()=>{S.current=!0}),onFocus:ne(t.onFocus,(Q)=>{let E=!S.current;if(Q.target===Q.currentTarget&&E&&!y){let _=new CustomEvent(pk,RJ);if(Q.currentTarget.dispatchEvent(_),!_.defaultPrevented){let N=w().filter((se)=>se.focusable),V=N.find((se)=>se.active),U=N.find((se)=>se.id===b),Z=[V,U,...N].filter(Boolean).map((se)=>se.ref.current);gk(Z,f)}}S.current=!1}),onBlur:ne(t.onBlur,()=>v(!1))})})},"RovingFocusGroupImpl")),$J="RovingFocusGroupItem",fj=B(Nl(function(t,n){let{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:s,children:a,...l}=t,c=nt(),u=s||c,f=EJ($J,r),d=f.currentTabStopId===u,h=cj(r),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:b}=f,O=aj();return Ue(()=>{if(!O||!o)return;return m(),()=>g()},[O,o,m,g]),L(()=>{if(O||!o)return;return m(),()=>g()},[O,o,m,g]),p(mk.ItemSlot,{scope:r,id:u,focusable:o,active:i,children:p(ge.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...l,ref:n,onMouseDown:ne(t.onMouseDown,(y)=>{if(!o)y.preventDefault();else f.onItemFocus(u)}),onFocus:ne(t.onFocus,()=>f.onItemFocus(u)),onKeyDown:ne(t.onKeyDown,(y)=>{if(y.key==="Tab"&&y.shiftKey){f.onItemShiftTab();return}if(y.target!==y.currentTarget)return;let v=hj(y,f.orientation,f.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let w=h().filter((S)=>S.focusable).map((S)=>S.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){if(v==="prev")w.reverse();let S=w.indexOf(y.currentTarget);w=f.loop?pj(w,S+1):w.slice(S+1)}setTimeout(()=>gk(w))}}),children:typeof a==="function"?a({isCurrentTabStop:d,hasTabStop:b!=null}):a})})},"RovingFocusGroupItem")),DJ={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function dj(e,t){if(t!==AJ.RTL)return e;return e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}Nl(dj,"getDirectionAwareKey");function hj(e,t,n){let r=dj(e.key,n);if(t===lj.Vertical&&["ArrowLeft","ArrowRight"].includes(r))return;if(t===lj.Horizontal&&["ArrowUp","ArrowDown"].includes(r))return;return DJ[r]}Nl(hj,"getFocusIntent");function gk(e,t=!1){let n=document.activeElement;for(let r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}Nl(gk,"focusFirst");function pj(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Nl(pj,"wrapArray");var NJ=Object.defineProperty,lt=(e,t)=>NJ(e,"name",{value:t,configurable:!0});var Ok=["Enter"," "],LJ=["ArrowDown","PageUp","Home"],gj=["ArrowUp","PageDown","End"],zJ=[...LJ,...gj],Ove={ltr:[...Ok,"ArrowRight"],rtl:[...Ok,"ArrowLeft"]};var m0="Menu",[bk,jJ,IJ]=Al(m0),[Ll,xk]=at(m0,[IJ,Yr,Fu]),wk=Yr(),Oj=Fu(),[XJ,Zh]=Ll(m0),[BJ,Sk]=Ll(m0),bj=lt((e)=>{let{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:i,modal:s=!0}=e,a=wk(t),[l,c]=A(null),u=T(!1),f=Xt(i),d=Ji(o);return L(()=>{let h=lt(()=>{u.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},"handleKeyDown"),m=lt(()=>u.current=!1,"handlePointer");return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),L(()=>{if(!n)return;let h=lt(()=>f(!1),"handleBlur");return window.addEventListener("blur",h),()=>window.removeEventListener("blur",h)},[n,f]),p(fa,{...a,children:p(XJ,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c,children:p(BJ,{scope:t,onClose:G(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:d,modal:s,children:r})})})},"Menu"),yj=B(lt(function(t,n){let{__scopeMenu:r,...o}=t,i=wk(r);return p(ns,{...i,...o,ref:n})},"MenuAnchor")),vj="MenuPortal",[ZJ,UJ]=Ll(vj,{forceMount:void 0}),xj=lt((e)=>{let{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Zh(vj,t);return p(ZJ,{scope:t,forceMount:n,children:p(mn,{present:n||i.open,children:p(ei,{asChild:!0,container:o,children:r})})})},"MenuPortal"),ha="MenuContent",[YJ,wj]=Ll(ha),Sj=B(lt(function(t,n){let r=UJ(ha,t.__scopeMenu),{forceMount:o=r.forceMount,...i}=t,s=Zh(ha,t.__scopeMenu),a=Sk(ha,t.__scopeMenu);return p(bk.Provider,{scope:t.__scopeMenu,children:p(mn,{present:o||s.open,children:p(bk.Slot,{scope:t.__scopeMenu,children:a.modal?p(VJ,{...i,ref:n}):p(qJ,{...i,ref:n})})})})},"MenuContent")),VJ=B(lt(function(t,n){let r=Zh(ha,t.__scopeMenu),o=T(null),i=ye(n,o);return L(()=>{let s=o.current;if(s)return la(s)},[]),p(kj,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ne(t.onFocusOutside,(s)=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentModal")),qJ=B(lt(function(t,n){let r=Zh(ha,t.__scopeMenu);return p(kj,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})},"MenuRootContentNonModal")),GJ=Ft("MenuContent.ScrollLock"),kj=B(lt(function(t,n){let{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:m,disableOutsideScroll:g,...b}=t,O=Zh(ha,r),y=Sk(ha,r),v=wk(r),x=Oj(r),w=jJ(r),[S,k]=A(null),R=T(null),[Q,E]=A(null);Cl(Q);let{nodes:_,registry:N}=kl(),V=Boolean(i||g),U=ye(n,R,O.onContentChange,E),F=T(0),Z=T(""),se=T(0),K=T(null),te=T("right"),I=T(0),pe=ce(()=>g?[R,..._.map((D)=>({current:D}))]:[],[R,_,g]),M=g?Hi:er,H=g?{as:GJ,allowPinchZoom:!0,shards:pe}:void 0,q=lt((D)=>{let ae=Z.current+D,Ce=w().filter((Ee)=>!Ee.disabled),J=document.activeElement,fe=Ce.find((Ee)=>Ee.ref.current===J)?.textValue,qe=Ce.map((Ee)=>Ee.textValue),Xe=Mj(qe,ae,fe),ve=Ce.find((Ee)=>Ee.textValue===Xe)?.ref.current;function Se(Ee){if(Z.current=Ee,window.clearTimeout(F.current),Ee!=="")F.current=window.setTimeout(()=>Se(""),1000)}if(lt(Se,"updateSearch"),Se(ae),ve)setTimeout(()=>ve.focus())},"handleTypeaheadSearch");L(()=>()=>window.clearTimeout(F.current),[]),ti();let X=G((D)=>te.current===K.current?.side&&Dj(D,K.current?.area),[]);return p(YJ,{scope:r,searchRef:Z,onItemEnter:G((D)=>{if(X(D))D.preventDefault()},[X]),onItemLeave:G((D)=>{if(X(D))return;R.current?.focus(),k(null)},[X]),onTriggerLeave:G((D)=>{if(X(D))D.preventDefault()},[X]),pointerGraceTimerRef:se,onPointerGraceIntentChange:G((D)=>{K.current=D},[]),children:p(Sl,{registry:V?N:null,children:p(M,{...H,children:p(aa,{asChild:!0,trapped:i,branches:_,onMountAutoFocus:ne(s,(D)=>{D.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p(Jo,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:h,onDismiss:m,children:p(uj,{asChild:!0,...x,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:k,onEntryFocus:ne(c,(D)=>{if(!y.isUsingKeyboardRef.current)D.preventDefault()}),preventScrollOnEntryFocus:!0,children:p(da,{role:"menu","aria-orientation":"vertical","data-state":Tj(O.open),"data-radix-menu-content":"",dir:y.dir,...v,...b,ref:U,style:{outline:"none",...b.style},onKeyDown:ne(b.onKeyDown,(D)=>{let Ce=D.target.closest("[data-radix-menu-content]")===D.currentTarget,J=D.ctrlKey||D.altKey||D.metaKey,fe=D.key.length===1;if(Ce){if(D.key==="Tab")D.preventDefault();if(!J&&fe)q(D.key)}let qe=R.current;if(D.target!==qe)return;if(!zJ.includes(D.key))return;D.preventDefault();let ve=w().filter((Se)=>!Se.disabled).map((Se)=>Se.ref.current);if(gj.includes(D.key))ve.reverse();Qj(ve)}),onBlur:ne(t.onBlur,(D)=>{if(!D.currentTarget.contains(D.target))window.clearTimeout(F.current),Z.current=""}),onPointerMove:ne(t.onPointerMove,p0((D)=>{let ae=D.target,Ce=I.current!==D.clientX;if(D.currentTarget.contains(ae)&&Ce){let J=D.clientX>I.current?"right":"left";te.current=J,I.current=D.clientX}}))})})})})})})})},"MenuContentImpl")),Cj=B(lt(function(t,n){let{__scopeMenu:r,...o}=t;return p(ge.div,{role:"group",...o,ref:n})},"MenuGroup"));var yk="MenuItem",mj="menu.itemSelect",Rj=B(lt(function(t,n){let{disabled:r=!1,onSelect:o,...i}=t,s=T(null),a=Sk(yk,t.__scopeMenu),l=wj(yk,t.__scopeMenu),c=ye(n,s),u=T(!1),f=lt(()=>{let d=s.current;if(!r&&d){let h=new CustomEvent(mj,{bubbles:!0,cancelable:!0});if(d.addEventListener(mj,(m)=>o?.(m),{once:!0}),Ph(d,h),h.defaultPrevented)u.current=!1;else a.onClose()}},"handleSelect");return p(HJ,{...i,ref:c,disabled:r,onClick:ne(t.onClick,f),onPointerDown:(d)=>{t.onPointerDown?.(d),u.current=!0},onPointerUp:ne(t.onPointerUp,(d)=>{if(!u.current)d.currentTarget?.click()}),onKeyDown:ne(t.onKeyDown,(d)=>{if(r||d.target!==d.currentTarget)return;if(l.searchRef.current!==""&&d.key===" ")return;if(Ok.includes(d.key))d.currentTarget.click(),d.preventDefault()})})},"MenuItem")),HJ=B(lt(function(t,n){let{__scopeMenu:r,disabled:o=!1,textValue:i,...s}=t,a=wj(yk,r),l=Oj(r),c=T(null),u=ye(n,c),[f,d]=A(!1),[h,m]=A("");return L(()=>{let g=c.current;if(g)m((g.textContent??"").trim())},[s.children]),p(bk.ItemSlot,{scope:r,disabled:o,textValue:i??h,children:p(fj,{asChild:!0,...l,focusable:!o,children:p(ge.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:ne(t.onPointerMove,p0((g)=>{if(o)a.onItemLeave(g);else if(a.onItemEnter(g),!g.defaultPrevented)g.currentTarget.focus({preventScroll:!0})})),onPointerLeave:ne(t.onPointerLeave,p0((g)=>a.onItemLeave(g))),onFocus:ne(t.onFocus,()=>d(!0)),onBlur:ne(t.onBlur,()=>d(!1))})})})},"MenuItemImpl"));var WJ="MenuRadioGroup",[FJ,bve]=Ll(WJ,{value:void 0,onValueChange:lt(()=>{},"onValueChange")}),Pj=B(lt(function(t,n){let{value:r,onValueChange:o,...i}=t,s=Xt(o);return p(FJ,{scope:t.__scopeMenu,value:r,onValueChange:s,children:p(Cj,{...i,ref:n})})},"MenuRadioGroup"));var KJ="MenuItemIndicator",[yve,vve]=Ll(KJ,{checked:!1});var JJ="MenuSub",[xve,wve]=Ll(JJ);function Tj(e){return e?"open":"closed"}lt(Tj,"getOpenState");function Aj(e){return e==="indeterminate"}lt(Aj,"isIndeterminate");function eee(e){return Aj(e)?"indeterminate":e?"checked":"unchecked"}lt(eee,"getCheckedState");function Qj(e){let t=document.activeElement;for(let n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}lt(Qj,"focusFirst");function Ej(e,t){return e.map((n,r)=>e[(t+r)%e.length])}lt(Ej,"wrapArray");function Mj(e,t,n){let o=t.length>1&&Array.from(t).every((c)=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1,s=Ej(e,Math.max(i,0));if(o.length===1)s=s.filter((c)=>c!==n);let l=s.find((c)=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}lt(Mj,"getNextMatch");function $j(e,t){let{x:n,y:r}=e,o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){let a=t[i],l=t[s],{x:c,y:u}=a,{x:f,y:d}=l;if(u>r!==d>r&&n<(f-c)*(r-u)/(d-u)+c)o=!o}return o}lt($j,"isPointInPolygon");function Dj(e,t){if(!t)return!1;let n={x:e.clientX,y:e.clientY};return $j(n,t)}lt(Dj,"isPointerInGraceArea");function p0(e){return(t)=>t.pointerType==="mouse"?e(t):void 0}lt(p0,"whenMouse");var nee=Object.defineProperty,Ku=(e,t)=>nee(e,"name",{value:t,configurable:!0}),kk="DropdownMenu",[ree,Ive]=at(kk,[xk]),Ju=xk(),[oee,_j]=ree(kk),iee=Ku((e)=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,l=Ju(t),c=T(null),[u,f]=Wt({prop:o,defaultProp:i??!1,onChange:s,caller:kk});return p(oee,{scope:t,triggerId:nt(),triggerRef:c,contentId:nt(),open:u,onOpenChange:f,onOpenToggle:G(()=>f((d)=>!d),[f]),modal:a,children:p(bj,{...l,open:u,onOpenChange:f,dir:r,modal:a,children:n})})},"DropdownMenu"),see="DropdownMenuTrigger",aee=B(Ku(function(t,n){let{__scopeDropdownMenu:r,disabled:o=!1,...i}=t,s=_j(see,r),a=Ju(r),l=ye(n,s.triggerRef);return p(yj,{asChild:!0,...a,children:p(ge.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:l,onPointerDown:ne(t.onPointerDown,(c)=>{if(!o&&c.button===0&&c.ctrlKey===!1){if(s.onOpenToggle(),!s.open)c.preventDefault()}}),onKeyDown:ne(t.onKeyDown,(c)=>{if(o)return;if(["Enter"," "].includes(c.key))s.onOpenToggle();if(c.key==="ArrowDown")s.onOpenChange(!0);if(["Enter"," ","ArrowDown"].includes(c.key))c.preventDefault()})})})},"DropdownMenuTrigger")),lee=Ku((e)=>{let{__scopeDropdownMenu:t,...n}=e,r=Ju(t);return p(xj,{...r,...n})},"DropdownMenuPortal"),cee="DropdownMenuContent",uee=B(Ku(function(t,n){let{__scopeDropdownMenu:r,...o}=t,i=_j(cee,r),s=Ju(r),a=T(!1);return p(Sj,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...o,ref:n,onCloseAutoFocus:ne(t.onCloseAutoFocus,(l)=>{if(!a.current)i.triggerRef.current?.focus();a.current=!1,l.preventDefault()}),onInteractOutside:ne(t.onInteractOutside,(l)=>{let c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;if(!i.modal||f)a.current=!0}),style:{...t.style,...{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}})},"DropdownMenuContent"));var fee=B(Ku(function(t,n){let{__scopeDropdownMenu:r,...o}=t,i=Ju(r);return p(Rj,{...i,...o,ref:n})},"DropdownMenuItem"));var dee=B(Ku(function(t,n){let{__scopeDropdownMenu:r,...o}=t,i=Ju(r);return p(Pj,{...i,...o,ref:n})},"DropdownMenuRadioGroup"));var hee=Object.defineProperty,pee=(e,t)=>hee(e,"name",{value:t,configurable:!0}),mee=B(pee(function(t,n){return p(ge.label,{...t,ref:n,onMouseDown:(r)=>{if(r.target.closest("button, input, select, textarea"))return;if(t.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1)r.preventDefault()}})},"Label"));var gee=Object.defineProperty,si=(e,t)=>gee(e,"name",{value:t,configurable:!0}),Ck="Popover",[zj,i1e]=at(Ck,[Yr]),g0=Yr(),[Oee,zl]=zj(Ck),bee=si((e)=>{let{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=g0(t),l=T(null),[c,u]=A(!1),[f,d]=A(0),[h,m]=A(0),[g,b]=Wt({prop:r,defaultProp:o??!1,onChange:i,caller:Ck});return p(fa,{...a,children:p(Oee,{scope:t,contentId:nt(),titleId:nt(),descriptionId:nt(),titlePresent:f>0,descriptionPresent:h>0,setTitleCount:d,setDescriptionCount:m,triggerRef:l,open:g,onOpenChange:b,onOpenToggle:G(()=>b((O)=>!O),[b]),hasCustomAnchor:c,onCustomAnchorAdd:G(()=>u(!0),[]),onCustomAnchorRemove:G(()=>u(!1),[]),modal:s,children:n})})},"Popover"),yee="PopoverAnchor",vee=B(si(function(t,n){let{__scopePopover:r,...o}=t,i=zl(yee,r),s=g0(r),{onCustomAnchorAdd:a,onCustomAnchorRemove:l}=i;return L(()=>(a(),()=>l()),[a,l]),p(ns,{...s,...o,ref:n})},"PopoverAnchor")),xee="PopoverTrigger",wee=B(si(function(t,n){let{__scopePopover:r,...o}=t,i=zl(xee,r),s=g0(r),a=ye(n,i.triggerRef),l=p(ge.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Rk(i.open),...o,ref:a,onClick:ne(t.onClick,i.onOpenToggle)});return i.hasCustomAnchor?l:p(ns,{asChild:!0,...s,children:l})},"PopoverTrigger")),jj="PopoverPortal",[See,kee]=zj(jj,{forceMount:void 0}),Cee=si((e)=>{let{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=zl(jj,t);return p(See,{scope:t,forceMount:n,children:p(mn,{present:n||i.open,children:p(ei,{asChild:!0,container:o,children:r})})})},"PopoverPortal"),Uh="PopoverContent",Ree=B(si(function(t,n){let r=kee(Uh,t.__scopePopover),{forceMount:o=r.forceMount,...i}=t,s=zl(Uh,t.__scopePopover);return p(mn,{present:o||s.open,children:s.modal?p(Tee,{...i,ref:n}):p(Aee,{...i,ref:n})})},"PopoverContent")),Pee=Ft("PopoverContent.RemoveScroll"),Tee=B(si(function(t,n){let r=zl(Uh,t.__scopePopover),o=T(null),i=ye(n,o),s=T(!1),{nodes:a,registry:l}=kl();return L(()=>{let c=o.current;if(c)return la(c)},[]),p(Hi,{as:Pee,allowPinchZoom:!0,shards:ce(()=>[o,...a.map((c)=>({current:c}))],[o,a]),children:p(Ij,{...t,ref:i,branchNodes:a,branchRegistry:l,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ne(t.onCloseAutoFocus,(c)=>{if(c.preventDefault(),!s.current)r.triggerRef.current?.focus()}),onPointerDownOutside:ne(t.onPointerDownOutside,(c)=>{let u=c.detail.originalEvent,f=u.button===0&&u.ctrlKey===!0,d=u.button===2||f;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:ne(t.onFocusOutside,(c)=>c.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),Aee=B(si(function(t,n){let r=zl(Uh,t.__scopePopover),o=T(!1),i=T(!1);return p(Ij,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:(s)=>{if(t.onCloseAutoFocus?.(s),!s.defaultPrevented){if(!o.current)r.triggerRef.current?.focus();s.preventDefault()}o.current=!1,i.current=!1},onInteractOutside:(s)=>{if(t.onInteractOutside?.(s),!s.defaultPrevented){if(o.current=!0,s.detail.originalEvent.type==="pointerdown")i.current=!0}let a=s.target;if(r.triggerRef.current?.contains(a))s.preventDefault();if(s.detail.originalEvent.type==="focusin"&&i.current)s.preventDefault()}})},"PopoverContentNonModal")),Ij=B(si(function(t,n){let{__scopePopover:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,"aria-describedby":d,branchNodes:h,branchRegistry:m,...g}=t,b=zl(Uh,r),O=g0(r),[y,v]=A(null),x=ye(n,v);return Cl(y),ti(),p(Sl,{registry:m,children:p(aa,{asChild:!0,loop:!0,trapped:o,branches:h,onMountAutoFocus:i,onUnmountAutoFocus:s,children:p(Jo,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:p(da,{"data-state":Rk(b.open),role:"dialog",id:b.contentId,"aria-labelledby":b.titlePresent?b.titleId:void 0,"aria-describedby":b.descriptionPresent?Xj(d,b.descriptionId):d,...O,...g,ref:x,style:{...g.style,...{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}})})})})},"PopoverContentImpl"));function Rk(e){return e?"open":"closed"}si(Rk,"getState");function Xj(...e){let t=new Set;for(let n of e){if(typeof n!=="string")continue;for(let r of String(n).trim().split(/\s+/))if(r)t.add(r)}return t.size>0?Array.from(t).join(" "):void 0}si(Xj,"concatAriaDescribedby");var Qee=Object.defineProperty,Eee=(e,t)=>Qee(e,"name",{value:t,configurable:!0});function O0(e,[t,n]){return Math.min(n,Math.max(t,e))}Eee(O0,"clamp");var Mee=Object.defineProperty,$ee=(e,t)=>Mee(e,"name",{value:t,configurable:!0}),Pk=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Zj=B($ee(function(t,n){return p(ge.span,{...t,ref:n,style:{...Pk,...t.style}})},"VisuallyHidden"));var _ee=Object.defineProperty,et=(e,t)=>_ee(e,"name",{value:t,configurable:!0}),Uj={ItemAligned:"item-aligned",Popper:"popper"},Nee={LTR:"ltr",RTL:"rtl"},Lee=[" ","Enter","ArrowUp","ArrowDown"],zee=[" ","Enter"],ef="Select",[y0,Ak,jee]=Al(ef),[Il,E1e]=at(ef,[jee,Yr]),Qk=Yr(),[Iee,pa]=Il(ef),[Xee,Bee]=Il(ef);function qj(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:d,required:h,form:m,internal_do_not_use_render:g}=e,b=Qk(t),[O,y]=A(null),[v,x]=A(null),[w,S]=A(!1),k=Ji(c),[R,Q]=Wt({prop:r,defaultProp:o??!1,onChange:i,caller:ef}),[E,_]=Wt({prop:s,defaultProp:a,onChange:l,caller:ef}),N=T(null),V=T(!1),[U,F]=A(null),Z=et((D)=>{F({value:D,hasConsumerStoppedPropagation:V.current}),_(D)},"handleUserSelect"),se=T(E);L(()=>{let D=m?O?.ownerDocument.getElementById(m):O?.form;if(D instanceof HTMLFormElement){let ae=et(()=>_(se.current),"reset");return D.addEventListener("reset",ae),()=>D.removeEventListener("reset",ae)}},[m,O,_]);let K=O?!!m||!!O.closest("form"):!0,[te,I]=A(new Set),pe=nt(),M=Array.from(te).map((D)=>D.props.value).join(";"),H=G((D)=>{I((ae)=>new Set(ae).add(D))},[]),q=G((D)=>{I((ae)=>{let Ce=new Set(ae);return Ce.delete(D),Ce})},[]),X={required:h,trigger:O,onTriggerChange:y,valueNode:v,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:S,contentId:pe,value:E,onValueChange:_,hasConsumerStoppedPropagationRef:V,userSelection:U,onUserSelect:Z,open:R,onOpenChange:Q,dir:k,triggerPointerDownPosRef:N,disabled:d,name:u,autoComplete:f,form:m,nativeOptions:te,nativeSelectKey:M,isFormControl:K};return p(fa,{...b,children:p(Iee,{scope:t,...X,children:p(y0.Provider,{scope:t,children:p(Xee,{scope:t,onNativeOptionAdd:H,onNativeOptionRemove:q,children:Wj(g)?g(X):n})})})})}et(qj,"SelectProvider");var Zee=et((e)=>{let{__scopeSelect:t,children:n,...r}=e;return p(qj,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:o})=>P(st,{children:[n,o?p(pte,{__scopeSelect:t}):null]})})},"Select"),Uee="SelectTrigger",Yee=B(et(function(t,n){let{__scopeSelect:r,disabled:o=!1,...i}=t,s=Qk(r),a=pa(Uee,r),l=a.disabled||o,c=ye(n,a.onTriggerChange),u=Ak(r),f=T("touch"),[d,h,m]=Ek((b)=>{let O=u().filter((x)=>!x.disabled),y=O.find((x)=>x.value===a.value),v=Mk(O,b,y);if(v!==void 0)a.onUserSelect(v.value)}),g=et((b)=>{if(!l)a.onOpenChange(!0),m();if(b)a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)}},"handleOpen");return p(ns,{asChild:!0,...s,children:p(ge.button,{type:"button",role:"combobox","aria-controls":a.open?a.contentId:void 0,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Yh(a.value)?"":void 0,...i,ref:c,onClick:ne(i.onClick,(b)=>{if(b.currentTarget.focus(),f.current!=="mouse")g(b)}),onPointerDown:ne(i.onPointerDown,(b)=>{f.current=b.pointerType;let O=b.target;if(O.hasPointerCapture(b.pointerId))O.releasePointerCapture(b.pointerId);if(b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse")g(b),b.preventDefault()}),onKeyDown:ne(i.onKeyDown,(b)=>{let O=d.current!=="";if(!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1)a.hasConsumerStoppedPropagationRef.current=b.isPropagationStopped(),h(b.key);if(O&&b.key===" ")return;if(Lee.includes(b.key))g(),b.preventDefault()})})})},"SelectTrigger")),Vee="SelectValue",qee=B(et(function(t,n){let{__scopeSelect:r,className:o,style:i,children:s,placeholder:a="",...l}=t,c=pa(Vee,r),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,d=ye(n,c.onValueNodeChange);Ue(()=>{u(f)},[u,f]);let h=Yh(c.value);return p(ge.span,{...l,asChild:h?!1:l.asChild,ref:d,style:{pointerEvents:"none"},children:p(er,{children:h?a:s},h?"placeholder":"value")})},"SelectValue")),Gee=B(et(function(t,n){let{__scopeSelect:r,children:o,...i}=t;return p(ge.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})},"SelectIcon")),Hee="SelectPortal",[Wee,Fee]=Il(Hee,{forceMount:void 0}),Kee=et((e)=>{let{__scopeSelect:t,forceMount:n,...r}=e;return p(Wee,{scope:e.__scopeSelect,forceMount:n,children:p(ei,{asChild:!0,...r})})},"SelectPortal"),jl="SelectContent",Jee=B(et(function(t,n){let r=Fee(jl,t.__scopeSelect),{forceMount:o=r.forceMount,...i}=t,s=pa(jl,t.__scopeSelect),[a,l]=A();return Ue(()=>{l(new DocumentFragment)},[]),p(mn,{present:o||s.open,children:({present:c})=>c?p(nte,{...i,ref:n}):p(ete,{...i,fragment:a})})},"SelectContent")),ete=B(et(function(t,n){let{__scopeSelect:r,children:o,fragment:i}=t;if(!i)return null;return ec(p(Gj,{scope:r,children:p(y0.Slot,{scope:r,children:p("div",{ref:n,children:o})})}),i)},"SelectContentFragment")),vo=10,[Gj,v0]=Il(jl),tte=Ft("SelectContent.RemoveScroll"),nte=B(et(function(t,n){let{__scopeSelect:r}=t,{position:o=Uj.ItemAligned,onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:b,avoidCollisions:O,...y}=t,v=pa(jl,r),[x,w]=A(null),[S,k]=A(null),R=ye(n,w),[Q,E]=A(null),[_,N]=A(null),V=Ak(r),[U,F]=A(!1),Z=T(!1),se=T(!1),K=T(!1);L(()=>{if(x)return la(x)},[x]),ti();let te=G((fe)=>{let[qe,...Xe]=V().map((Ee)=>Ee.ref.current),[ve]=Xe.slice(-1),Se=document.activeElement;for(let Ee of fe){if(Ee===Se)return;if(Ee?.scrollIntoView({block:"nearest"}),Ee===qe&&S)S.scrollTop=0;if(Ee===ve&&S)S.scrollTop=S.scrollHeight;if(Ee?.focus(),document.activeElement!==Se)return}},[V,S]),I=G(()=>te([Q,x]),[te,Q,x]);L(()=>{if(U)I()},[U,I]);let{onOpenChange:pe,triggerPointerDownPosRef:M}=v;L(()=>{if(x){let fe={x:0,y:0},qe=et((ve)=>{fe={x:Math.abs(Math.round(ve.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(ve.pageY)-(M.current?.y??0))}},"handlePointerMove"),Xe=et((ve)=>{if(fe.x<=10&&fe.y<=10)ve.preventDefault();else if(!ve.composedPath().includes(x))pe(!1);document.removeEventListener("pointermove",qe),M.current=null},"handlePointerUp");if(M.current!==null)document.addEventListener("pointermove",qe),document.addEventListener("pointerup",Xe,{capture:!0,once:!0});return()=>{document.removeEventListener("pointermove",qe),document.removeEventListener("pointerup",Xe,{capture:!0})}}},[x,pe,M]),L(()=>{let fe=et(()=>pe(!1),"close");return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[pe]);let[H,q]=Ek((fe)=>{let qe=V().filter((Se)=>!Se.disabled),Xe=qe.find((Se)=>Se.ref.current===document.activeElement),ve=Mk(qe,fe,Xe);if(ve)setTimeout(()=>ve.ref.current?.focus())}),X=G((fe,qe,Xe)=>{let ve=!se.current;if(ve)se.current=!0;let Se=!Z.current&&!Xe;if(v.value!==void 0&&v.value===qe||Se){if(E(fe),Se)Z.current=!0}else if(ve)E(fe)},[v.value]),D=G(()=>x?.focus(),[x]),ae=G((fe,qe,Xe)=>{if(!fe)return;let ve=!K.current;if(ve)K.current=!0;let Se=!Z.current&&!Xe;if(v.value!==void 0&&v.value===qe||Se)N(fe);else if(ve)N(fe)},[v.value]),Ce=o===Uj.Popper?Yj:rte,J=Ce===Yj?{side:l,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:h,collisionPadding:m,sticky:g,hideWhenDetached:b,avoidCollisions:O}:{};return p(Gj,{scope:r,content:x,viewport:S,onViewportChange:k,itemRefCallback:X,selectedItem:Q,onItemLeave:D,itemTextRefCallback:ae,focusSelectedItem:I,selectedItemText:_,position:o,isPositioned:U,searchRef:H,children:p(Hi,{as:tte,allowPinchZoom:!0,children:p(aa,{asChild:!0,trapped:v.open,onMountAutoFocus:(fe)=>{fe.preventDefault()},onUnmountAutoFocus:ne(i,(fe)=>{v.trigger?.focus({preventScroll:!0}),fe.preventDefault()}),children:p(Jo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:(fe)=>fe.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:p(Ce,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:(fe)=>fe.preventDefault(),...y,...J,onPlaced:()=>F(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:ne(y.onKeyDown,(fe)=>{let qe=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab")fe.preventDefault();if(!qe&&fe.key.length===1)q(fe.key);if(["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let ve=V().filter((Se)=>!Se.disabled).map((Se)=>Se.ref.current);if(["ArrowUp","End"].includes(fe.key))ve=ve.slice().reverse();if(["ArrowUp","ArrowDown"].includes(fe.key)){let Se=fe.target,Ee=ve.indexOf(Se);ve=ve.slice(Ee+1)}setTimeout(()=>te(ve)),fe.preventDefault()}})})})})})})},"SelectContentImpl")),rte=B(et(function(t,n){let{__scopeSelect:r,onPlaced:o,...i}=t,s=pa(jl,r),a=v0(jl,r),[l,c]=A(null),[u,f]=A(null),d=ye(n,f),h=Ak(r),m=T(!1),g=T(!0),{viewport:b,selectedItem:O,selectedItemText:y,focusSelectedItem:v}=a,x=G(()=>{if(s.trigger&&s.valueNode&&l&&u&&b&&O&&y){let R=s.trigger.getBoundingClientRect(),Q=u.getBoundingClientRect(),E=s.valueNode.getBoundingClientRect(),_=y.getBoundingClientRect();if(s.dir!==Nee.RTL){let Xe=_.left-Q.left,ve=E.left-Xe,Se=R.left-ve,Ee=R.width+Se,Ul=Math.max(Ee,Q.width),li=window.innerWidth-vo,Yl=O0(ve,[vo,Math.max(vo,li-Ul)]);l.style.minWidth=Ee+"px",l.style.left=Yl+"px"}else{let Xe=Q.right-_.right,ve=window.innerWidth-E.right-Xe,Se=window.innerWidth-R.right-ve,Ee=R.width+Se,Ul=Math.max(Ee,Q.width),li=window.innerWidth-vo,Yl=O0(ve,[vo,Math.max(vo,li-Ul)]);l.style.minWidth=Ee+"px",l.style.right=Yl+"px"}let N=h(),V=window.innerHeight-vo*2,U=b.scrollHeight,F=window.getComputedStyle(u),Z=parseInt(F.borderTopWidth,10),se=parseInt(F.paddingTop,10),K=parseInt(F.borderBottomWidth,10),te=parseInt(F.paddingBottom,10),I=Z+se+U+te+K,pe=Math.min(O.offsetHeight*5,I),M=window.getComputedStyle(b),H=parseInt(M.paddingTop,10),q=parseInt(M.paddingBottom,10),X=R.top+R.height/2-vo,D=V-X,ae=O.offsetHeight/2,Ce=O.offsetTop+ae,J=Z+se+Ce,fe=I-J;if(J<=X){let Xe=N.length>0&&O===N[N.length-1].ref.current;l.style.bottom="0px";let ve=u.clientHeight-b.offsetTop-b.offsetHeight,Se=Math.max(D,ae+(Xe?q:0)+ve+K),Ee=J+Se;l.style.height=Ee+"px"}else{let Xe=N.length>0&&O===N[0].ref.current;l.style.top="0px";let Se=Math.max(X,Z+b.offsetTop+(Xe?H:0)+ae)+fe;l.style.height=Se+"px",b.scrollTop=J-X+b.offsetTop}l.style.margin=`${vo}px 0`,l.style.minHeight=pe+"px",l.style.maxHeight=V+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,l,u,b,O,y,s.dir,o]);Ue(()=>x(),[x]);let[w,S]=A();Ue(()=>{if(u)S(window.getComputedStyle(u).zIndex)},[u]);let k=G((R)=>{if(R&&g.current===!0)x(),v?.(),g.current=!1},[x,v]);return p(ote,{scope:r,contentWrapper:l,shouldExpandOnScrollRef:m,onScrollButtonChange:k,children:p("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:p(ge.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})},"SelectItemAlignedPosition")),Yj=B(et(function(t,n){let{__scopeSelect:r,align:o="start",collisionPadding:i=vo,...s}=t,a=Qk(r);return p(da,{...a,...s,ref:n,align:o,collisionPadding:i,style:{boxSizing:"border-box",...s.style,...{"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}})},"SelectPopperPosition")),[ote,ite]=Il(jl,{}),Vj="SelectViewport",ste=B(et(function(t,n){let{__scopeSelect:r,nonce:o,...i}=t,s=v0(Vj,r),a=ite(Vj,r),l=ye(n,s.onViewportChange),c=T(0);return P(st,{children:[p("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p(y0.Slot,{scope:r,children:p(ge.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:ne(i.onScroll,(u)=>{let f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=a;if(h?.current&&d){let m=Math.abs(c.current-f.scrollTop);if(m>0){let g=window.innerHeight-vo*2,b=parseFloat(d.style.minHeight),O=parseFloat(d.style.height),y=Math.max(b,O);if(y<g){let v=y+m,x=Math.min(g,v),w=v-x;if(d.style.height=x+"px",d.style.bottom==="0px")f.scrollTop=w>0?w:0,d.style.justifyContent="flex-end"}}}c.current=f.scrollTop})})})]})},"SelectViewport")),ate="SelectGroup",[M1e,$1e]=Il(ate);var Tk="SelectItem",[lte,Hj]=Il(Tk),cte=B(et(function(t,n){let{__scopeSelect:r,value:o,disabled:i=!1,textValue:s,...a}=t,l=pa(Tk,r),c=v0(Tk,r),u=l.value===o,[f,d]=A(s??""),[h,m]=A(!1),g=Xt((x)=>c.itemRefCallback?.(x,o,i)),b=ye(n,g),O=nt(),y=T("touch");function v(x){l.hasConsumerStoppedPropagationRef.current=x.isPropagationStopped(),l.onUserSelect(o),l.onOpenChange(!1)}return et(v,"handleSelect"),p(lte,{scope:r,value:o,disabled:i,textId:O,isSelected:u,onItemTextChange:G((x)=>{d((w)=>w||(x?.textContent??"").trim())},[]),children:p(y0.ItemSlot,{scope:r,value:o,disabled:i,textValue:f,children:p(ge.div,{role:"option","aria-labelledby":O,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:b,onFocus:ne(a.onFocus,()=>m(!0)),onBlur:ne(a.onBlur,()=>m(!1)),onClick:ne(a.onClick,(x)=>{if(i)return;if(y.current!=="mouse")v(x)}),onPointerUp:ne(a.onPointerUp,(x)=>{if(i)return;if(y.current==="mouse")v(x)}),onPointerDown:ne(a.onPointerDown,(x)=>{y.current=x.pointerType}),onPointerMove:ne(a.onPointerMove,(x)=>{if(y.current=x.pointerType,i)c.onItemLeave?.();else if(y.current==="mouse")x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:ne(a.onPointerLeave,(x)=>{if(x.currentTarget===document.activeElement)c.onItemLeave?.()}),onKeyDown:ne(a.onKeyDown,(x)=>{if(i||x.target!==x.currentTarget)return;if(c.searchRef?.current!==""&&x.key===" ")return;if(zee.includes(x.key))v(x);if(x.key===" ")x.preventDefault()})})})})},"SelectItem")),b0="SelectItemText",ute=B(et(function(t,n){let{__scopeSelect:r,className:o,style:i,...s}=t,a=pa(b0,r),l=v0(b0,r),c=Hj(b0,r),u=Bee(b0,r),[f,d]=A(null),h=Xt((v)=>l.itemTextRefCallback?.(v,c.value,c.disabled)),m=ye(n,d,c.onItemTextChange,h),g=f?.textContent,b=ce(()=>p("option",{value:c.value,disabled:c.disabled,children:g},c.value),[c.disabled,c.value,g]),{onNativeOptionAdd:O,onNativeOptionRemove:y}=u;return Ue(()=>(O(b),()=>y(b)),[O,y,b]),P(st,{children:[p(ge.span,{id:c.textId,...s,ref:m}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren&&!Yh(a.value)?ec(s.children,a.valueNode):null]})},"SelectItemText")),fte="SelectItemIndicator",dte=B(et(function(t,n){let{__scopeSelect:r,...o}=t;return Hj(fte,r).isSelected?p(ge.span,{"aria-hidden":!0,...o,ref:n}):null},"SelectItemIndicator"));var hte="SelectBubbleInput",pte=B(et(function({__scopeSelect:t,...n},r){let o=pa(hte,t),{value:i,onValueChange:s,required:a,disabled:l,name:c,autoComplete:u,form:f,userSelection:d}=o,{nativeOptions:h,nativeSelectKey:m}=o,g=T(null),b=ye(r,g),O=i??"",y=T(O),v=T(d),x=T(!1),w=Array.from(h).some((S)=>(S.props.value??"")==="");return L(()=>{let S=g.current;if(!S)return;let k=window.HTMLSelectElement.prototype,Q=Object.getOwnPropertyDescriptor(k,"value").set,E=d!==null&&d!==v.current;v.current=d;let _=y.current!==O;y.current=O;let N=E&&_;if(E&&!_&&d.value!==O&&!d.hasConsumerStoppedPropagation&&Q){x.current=!0;try{Q.call(S,d.value),S.dispatchEvent(new Event("change",{bubbles:!0}))}finally{x.current=!1,Q.call(S,O)}return}let V=N&&!d.hasConsumerStoppedPropagation;if(_&&Q){let U=new Event("change",{bubbles:V});Q.call(S,O),S.dispatchEvent(U)}},[O,d]),P(ge.select,{"aria-hidden":!0,required:a,tabIndex:-1,name:c,autoComplete:u,disabled:l,form:f,onChange:(S)=>{if(!x.current)s(S.target.value)},...n,style:{...Pk,...n.style},ref:b,defaultValue:O,children:[Yh(i)&&!w?p("option",{value:""}):null,Array.from(h)]},m)},"SelectBubbleInput"));function Wj(e){return typeof e==="function"}et(Wj,"isFunction");function Yh(e){return e===""||e===void 0}et(Yh,"shouldShowPlaceholder");function Ek(e){let t=Xt(e),n=T(""),r=T(0),o=G((s)=>{let a=n.current+s;t(a);function l(c){if(n.current=c,window.clearTimeout(r.current),c!=="")r.current=window.setTimeout(()=>l(""),1000)}et(l,"updateSearch"),l(a)},[t]),i=G(()=>{n.current="",window.clearTimeout(r.current)},[]);return L(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}et(Ek,"useTypeaheadSearch");function Mk(e,t,n){let o=t.length>1&&Array.from(t).every((c)=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1,s=Fj(e,Math.max(i,0));if(o.length===1)s=s.filter((c)=>c!==n);let l=s.find((c)=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}et(Mk,"findNextItem");function Fj(e,t){return e.map((n,r)=>e[(t+r)%e.length])}et(Fj,"wrapArray");var mte=Object.defineProperty,$k=(e,t)=>mte(e,"name",{value:t,configurable:!0}),gte={Automatic:"automatic",Manual:"manual"},Dk="Tabs",[Ote,X1e]=at(Dk,[Fu]),B1e=Fu(),[bte,Z1e]=Ote(Dk),yte=B($k(function(t,n){let{__scopeTabs:r,value:o,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:l,activationMode:c=gte.Automatic,...u}=t,f=Ji(l),[d,h]=Wt({prop:o,onChange:i,defaultProp:s??"",caller:Dk});return p(bte,{scope:r,baseId:nt(),value:d,onValueChange:h,orientation:a,dir:f,activationMode:c,children:p(ge.div,{dir:f,"data-orientation":a,...u,ref:n})})},"Tabs"));function vte(e,t){return`${e}-trigger-${t}`}$k(vte,"makeTriggerId");function xte(e,t){return`${e}-content-${t}`}$k(xte,"makeContentId");var wte=Object.defineProperty,Zt=(e,t)=>wte(e,"name",{value:t,configurable:!0}),[Lk,oxe]=at("Tooltip",[Yr]),zk=Yr(),Ste="TooltipProvider",kte=700,_k="tooltip.open",[Cte,jk]=Lk(Ste),Rte=Zt((e)=>{let{__scopeTooltip:t,delayDuration:n=kte,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,s=T(!0),a=T(!1),l=T(0);return L(()=>{let c=l.current;return()=>window.clearTimeout(c)},[]),p(Cte,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:G(()=>{if(r<=0)return;window.clearTimeout(l.current),s.current=!1},[r]),onClose:G(()=>{if(r<=0)return;window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:G((c)=>{a.current=c},[]),disableHoverableContent:o,children:i})},"TooltipProvider"),Nk="Tooltip",[Pte,qh]=Lk(Nk),Tte=Zt((e)=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=jk(Nk,e.__scopeTooltip),c=zk(t),[u,f]=A(null),[d,h]=A(void 0),m=nt(),g=T(0),b=s??l.disableHoverableContent,O=a??l.delayDuration,y=T(!1),[v,x]=Wt({prop:r,defaultProp:o??!1,onChange:Zt((E)=>{if(E)l.onOpen(),document.dispatchEvent(new CustomEvent(_k));else l.onClose();i?.(E)},"onChange"),caller:Nk}),w=ce(()=>v?y.current?"delayed-open":"instant-open":"closed",[v]),S=G(()=>{window.clearTimeout(g.current),g.current=0,y.current=!1,x(!0)},[x]),k=G(()=>{window.clearTimeout(g.current),g.current=0,x(!1)},[x]),R=G(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{y.current=!0,x(!0),g.current=0},O)},[O,x]);return L(()=>()=>{if(g.current)window.clearTimeout(g.current),g.current=0},[]),p(fa,{...c,children:p(Pte,{scope:t,contentId:d??m,setContentId:h,open:v,stateAttribute:w,trigger:u,onTriggerChange:f,onTriggerEnter:G(()=>{if(l.isOpenDelayedRef.current)R();else S()},[l.isOpenDelayedRef,R,S]),onTriggerLeave:G(()=>{if(b)k();else window.clearTimeout(g.current),g.current=0},[k,b]),onOpen:S,onClose:k,disableHoverableContent:b,children:n})})},"Tooltip"),e6="TooltipTrigger",Ate=B(Zt(function(t,n){let{__scopeTooltip:r,"aria-describedby":o,...i}=t,s=qh(e6,r),a=jk(e6,r),l=zk(r),c=T(null),u=ye(n,c,s.onTriggerChange),f=T(!1),d=T(!1),h=G(()=>f.current=!1,[]);return L(()=>()=>document.removeEventListener("pointerup",h),[h]),p(ns,{asChild:!0,...l,children:p(ge.button,{"aria-describedby":s.open?c6(o,s.contentId):o,"data-state":s.stateAttribute,...i,ref:u,onPointerMove:ne(t.onPointerMove,(m)=>{if(m.pointerType==="touch")return;if(!d.current&&!a.isPointerInTransitRef.current)s.onTriggerEnter(),d.current=!0}),onPointerLeave:ne(t.onPointerLeave,()=>{s.onTriggerLeave(),d.current=!1}),onPointerDown:ne(t.onPointerDown,()=>{if(s.open)s.onClose();f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:ne(t.onFocus,()=>{if(!f.current)s.onOpen()}),onBlur:ne(t.onBlur,s.onClose),onClick:ne(t.onClick,s.onClose)})})},"TooltipTrigger")),t6="TooltipPortal",[Qte,Ete]=Lk(t6,{forceMount:void 0}),Mte=Zt((e)=>{let{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=qh(t6,t);return p(Qte,{scope:t,forceMount:n,children:p(mn,{present:n||i.open,children:p(ei,{asChild:!0,container:o,children:r})})})},"TooltipPortal"),Vh="TooltipContent",$te=B(Zt(function(t,n){let r=Ete(Vh,t.__scopeTooltip),{forceMount:o=r.forceMount,side:i="top",...s}=t,a=qh(Vh,t.__scopeTooltip);return p(mn,{present:o||a.open,children:a.disableHoverableContent?p(n6,{side:i,...s,ref:n}):p(Dte,{side:i,...s,ref:n})})},"TooltipContent")),Dte=B(Zt(function(t,n){let r=qh(Vh,t.__scopeTooltip),o=jk(Vh,t.__scopeTooltip),i=T(null),s=ye(n,i),[a,l]=A(null),{trigger:c,onClose:u}=r,f=i.current,{onPointerInTransitChange:d}=o,h=G(()=>{l(null),d(!1)},[d]),m=G((g,b)=>{let O=g.currentTarget,y={x:g.clientX,y:g.clientY},v=r6(y,O.getBoundingClientRect()),x=o6(y,v),w=i6(b.getBoundingClientRect()),S=a6([...x,...w]);l(S),d(!0)},[d]);return L(()=>()=>h(),[h]),L(()=>{if(c&&f){let g=Zt((O)=>m(O,f),"handleTriggerLeave"),b=Zt((O)=>m(O,c),"handleContentLeave");return c.addEventListener("pointerleave",g),f.addEventListener("pointerleave",b),()=>{c.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",b)}}},[c,f,m,h]),L(()=>{if(a){let g=Zt((b)=>{let O=b.target,y={x:b.clientX,y:b.clientY},v=c?.contains(O)||f?.contains(O),x=!s6(y,a);if(v)h();else if(x)h(),u()},"handleTrackPointerGrace");return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[c,f,a,u,h]),p(n6,{...t,ref:s})},"TooltipContentHoverable")),_te=vS("TooltipContent"),n6=B(Zt(function(t,n){let{__scopeTooltip:r,children:o,"aria-label":i,id:s,onEscapeKeyDown:a,onPointerDownOutside:l,...c}=t,u=qh(Vh,r),f=zk(r),{onClose:d}=u,[h,m]=A(null),g=ye(n,m);Cl(h),L(()=>(document.addEventListener(_k,d),()=>document.removeEventListener(_k,d)),[d]),L(()=>{if(u.trigger){let O=Zt((y)=>{if(y.target instanceof Node&&y.target.contains(u.trigger))d()},"handleScroll");return window.addEventListener("scroll",O,{capture:!0}),()=>window.removeEventListener("scroll",O,{capture:!0})}},[u.trigger,d]);let{setContentId:b}=u;return Ue(()=>(b(s),()=>{b(void 0)}),[s,b]),p(Jo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:(O)=>O.preventDefault(),onDismiss:d,children:P(da,{"data-state":u.stateAttribute,role:i?void 0:"tooltip",id:i?void 0:u.contentId,...f,...c,ref:g,style:{...c.style,...{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}},children:[p(_te,{children:o}),i?p(Zj,{id:u.contentId,role:"tooltip",children:i}):null]})})},"TooltipContentImpl"));function r6(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw Error("unreachable")}}Zt(r6,"getExitSideFromRect");function o6(e,t,n=5){let r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}Zt(o6,"getPaddedExitPoints");function i6(e){let{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}Zt(i6,"getPointsFromRect");function s6(e,t){let{x:n,y:r}=e,o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){let a=t[i],l=t[s],{x:c,y:u}=a,{x:f,y:d}=l;if(u>r!==d>r&&n<(f-c)*(r-u)/(d-u)+c)o=!o}return o}Zt(s6,"isPointInPolygon");function a6(e){let t=e.slice();return t.sort((n,r)=>{if(n.x<r.x)return-1;else if(n.x>r.x)return 1;else if(n.y<r.y)return-1;else if(n.y>r.y)return 1;else return 0}),l6(t)}Zt(a6,"getHull");function l6(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let o=e[r];while(t.length>=2){let i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();let n=[];for(let r=e.length-1;r>=0;r--){let o=e[r];while(n.length>=2){let i=n[n.length-1],s=n[n.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}if(n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y)return t;else return t.concat(n)}Zt(l6,"getHullPresorted");function c6(...e){let t=new Set;for(let n of e){if(typeof n!=="string")continue;for(let r of String(n).trim().split(/\s+/))if(r)t.add(r)}return t.size>0?Array.from(t).join(" "):void 0}Zt(c6,"concatAriaDescribedby");var f6=(e)=>typeof e==="boolean"?`${e}`:e===0?"0":e,d6=aO,x0=(e,t)=>(n)=>{var r;if((t===null||t===void 0?void 0:t.variants)==null)return d6(e,n===null||n===void 0?void 0:n.class,n===null||n===void 0?void 0:n.className);let{variants:o,defaultVariants:i}=t,s=Object.keys(o).map((c)=>{let u=n===null||n===void 0?void 0:n[c],f=i===null||i===void 0?void 0:i[c];if(u===null)return null;let d=f6(u)||f6(f);return o[c][d]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;if(d===void 0)return c;return c[f]=d,c},{}),l=t===null||t===void 0?void 0:(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every((m)=>{let[g,b]=m;return Array.isArray(b)?b.includes({...i,...a}[g]):{...i,...a}[g]===b})?[...c,f,d]:c},[]);return d6(e,s,l,n===null||n===void 0?void 0:n.class,n===null||n===void 0?void 0:n.className)};var w0=x0("inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-sm border px-3 py-1 text-base font-medium shadow-sm transition-colors disabled:cursor-default disabled:opacity-50",{variants:{variant:{default:"border-border bg-card text-foreground hover:border-muted-foreground",primary:"border-primary bg-primary text-primary-foreground hover:bg-[color-mix(in_srgb,var(--accent)_88%,var(--ink))]",ghost:"border-transparent bg-transparent text-muted-foreground shadow-none hover:bg-muted hover:text-foreground",danger:"border-border bg-card text-danger hover:border-danger"},size:{md:"min-h-(--btn-s)",sm:"min-h-(--btn-xs) px-2 text-sm"}},defaultVariants:{variant:"default",size:"md"}});function rs({className:e,variant:t,size:n,asChild:r,type:o="button",...i}){let s=r?pF:"button";return p(s,{...r?{}:{type:o},className:ue(w0({variant:t,size:n}),e),...i})}var h6=gK,p6=({className:e,...t})=>p(SK,{className:ue("text-lg font-semibold",e),...t}),m6=({className:e,...t})=>p(kK,{className:ue("text-base text-muted-foreground",e),...t});function g6({className:e,...t}){return P(OK,{container:Fn(),children:[p(bK,{className:"fixed inset-0 z-50 bg-black/45"}),p(wK,{className:ue("fixed left-1/2 top-1/2 z-50 flex w-[min(420px,calc(100vw-32px))] -translate-x-1/2 -translate-y-1/2 flex-col gap-2.5 rounded-lg border border-border bg-background p-4 text-foreground outline-none",e),...t})]})}var O6=({className:e,...t})=>p(PK,{className:ue(w0({variant:"default"}),e),...t}),b6=({className:e,danger:t,...n})=>p(CK,{className:ue(w0({variant:t?"danger":"primary"}),e),...n});var Zxe=x0("inline-flex items-center gap-1.5 text-sm",{variants:{tone:{neutral:"text-muted-foreground",warning:"text-warning",success:"text-success",danger:"text-danger",ink:"text-foreground"}},defaultVariants:{tone:"neutral"}});function kt({name:e,sprite:t="i",className:n,...r}){return p("svg",{"aria-hidden":"true",className:ue("size-[18px]",n),...r,children:p("use",{href:`#${t}-${e}`})})}function S0({className:e,...t}){return p(_K,{className:ue("grid size-4 place-items-center rounded-xs border border-border bg-card data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:p(LK,{children:p(kt,{name:"check",className:"size-3"})})})}var y6=1,Nte=0.9,Lte=0.8,zte=0.17,Ik=0.1,Xk=0.999,jte=0.9999,Ite=0.99,Xte=/[\\\/_+.#"@\[\(\{&]/,Bte=/[\\\/_+.#"@\[\(\{&]/g,Zte=/[\s-]/,x6=/[\s-]/g;function Bk(e,t,n,r,o,i,s){if(i===t.length)return o===e.length?y6:Ite;var a=`${o},${i}`;if(s[a]!==void 0)return s[a];for(var l=r.charAt(i),c=n.indexOf(l,o),u=0,f,d,h,m;c>=0;)f=Bk(e,t,n,r,c+1,i+1,s),f>u&&(c===o?f*=y6:Xte.test(e.charAt(c-1))?(f*=Lte,h=e.slice(o,c-1).match(Bte),h&&o>0&&(f*=Math.pow(Xk,h.length))):Zte.test(e.charAt(c-1))?(f*=Nte,m=e.slice(o,c-1).match(x6),m&&o>0&&(f*=Math.pow(Xk,m.length))):(f*=zte,o>0&&(f*=Math.pow(Xk,c-o))),e.charAt(c)!==t.charAt(i)&&(f*=jte)),(f<Ik&&n.charAt(c-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(c-1)!==r.charAt(i))&&(d=Bk(e,t,n,r,c+1,i+2,s),d*Ik>f&&(f=d*Ik)),f>u&&(u=f),c=n.indexOf(l,c+1);return s[a]=u,u}function v6(e){return e.toLowerCase().replace(x6," ")}function w6(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Bk(e,t,v6(e),v6(t),0,0,{})}var Gh='[cmdk-group=""]',Zk='[cmdk-group-items=""]',Ute='[cmdk-group-heading=""]',k6='[cmdk-item=""]',S6=`${k6}:not([aria-disabled="true"])`,Uk="cmdk-item-select",tf="data-value",Yte=(e,t,n)=>w6(e,t,n),C6=gn(void 0),Hh=()=>bn(C6),R6=gn(void 0),Yk=()=>bn(R6),P6=gn(void 0),T6=B((e,t)=>{let n=nf(()=>{var M,H;return{search:"",value:(H=(M=e.value)!=null?M:e.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=nf(()=>new Set),o=nf(()=>new Map),i=nf(()=>new Map),s=nf(()=>new Set),a=A6(e),{label:l,children:c,value:u,onValueChange:f,filter:d,shouldFilter:h,loop:m,disablePointerSelection:g=!1,vimBindings:b=!0,...O}=e,y=nt(),v=nt(),x=nt(),w=T(null),S=nne();Xl(()=>{if(u!==void 0){let M=u.trim();n.current.value=M,k.emit()}},[u]),Xl(()=>{S(6,V)},[]);let k=ce(()=>({subscribe:(M)=>(s.current.add(M),()=>s.current.delete(M)),snapshot:()=>n.current,setState:(M,H,q)=>{var X,D,ae,Ce;if(!Object.is(n.current[M],H)){if(n.current[M]=H,M==="search")N(),E(),S(1,_);else if(M==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let J=document.getElementById(x);J?J.focus():(X=document.getElementById(y))==null||X.focus()}if(S(7,()=>{var J;n.current.selectedItemId=(J=U())==null?void 0:J.id,k.emit()}),q||S(5,V),((D=a.current)==null?void 0:D.value)!==void 0){let J=H!=null?H:"";(Ce=(ae=a.current).onValueChange)==null||Ce.call(ae,J);return}}k.emit()}},emit:()=>{s.current.forEach((M)=>M())}}),[]),R=ce(()=>({value:(M,H,q)=>{var X;H!==((X=i.current.get(M))==null?void 0:X.value)&&(i.current.set(M,{value:H,keywords:q}),n.current.filtered.items.set(M,Q(H,q)),S(2,()=>{E(),k.emit()}))},item:(M,H)=>(r.current.add(M),H&&(o.current.has(H)?o.current.get(H).add(M):o.current.set(H,new Set([M]))),S(3,()=>{N(),E(),n.current.value||_(),k.emit()}),()=>{i.current.delete(M),r.current.delete(M),n.current.filtered.items.delete(M);let q=U();S(4,()=>{N(),(q==null?void 0:q.getAttribute("id"))===M&&_(),k.emit()})}),group:(M)=>(o.current.has(M)||o.current.set(M,new Set),()=>{i.current.delete(M),o.current.delete(M)}),filter:()=>a.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:y,inputId:x,labelId:v,listInnerRef:w}),[]);function Q(M,H){var q,X;let D=(X=(q=a.current)==null?void 0:q.filter)!=null?X:Yte;return M?D(M,n.current.search,H):0}function E(){if(!n.current.search||a.current.shouldFilter===!1)return;let M=n.current.filtered.items,H=[];n.current.filtered.groups.forEach((X)=>{let D=o.current.get(X),ae=0;D.forEach((Ce)=>{let J=M.get(Ce);ae=Math.max(J,ae)}),H.push([X,ae])});let q=w.current;F().sort((X,D)=>{var ae,Ce;let J=X.getAttribute("id"),fe=D.getAttribute("id");return((ae=M.get(fe))!=null?ae:0)-((Ce=M.get(J))!=null?Ce:0)}).forEach((X)=>{let D=X.closest(Zk);D?D.appendChild(X.parentElement===D?X:X.closest(`${Zk} > *`)):q.appendChild(X.parentElement===q?X:X.closest(`${Zk} > *`))}),H.sort((X,D)=>D[1]-X[1]).forEach((X)=>{var D;let ae=(D=w.current)==null?void 0:D.querySelector(`${Gh}[${tf}="${encodeURIComponent(X[0])}"]`);ae==null||ae.parentElement.appendChild(ae)})}function _(){let M=F().find((q)=>q.getAttribute("aria-disabled")!=="true"),H=M==null?void 0:M.getAttribute(tf);k.setState("value",H||void 0)}function N(){var M,H,q,X;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let D=0;for(let ae of r.current){let Ce=(H=(M=i.current.get(ae))==null?void 0:M.value)!=null?H:"",J=(X=(q=i.current.get(ae))==null?void 0:q.keywords)!=null?X:[],fe=Q(Ce,J);n.current.filtered.items.set(ae,fe),fe>0&&D++}for(let[ae,Ce]of o.current)for(let J of Ce)if(n.current.filtered.items.get(J)>0){n.current.filtered.groups.add(ae);break}n.current.filtered.count=D}function V(){var M,H,q;let X=U();X&&(((M=X.parentElement)==null?void 0:M.firstChild)===X&&((q=(H=X.closest(Gh))==null?void 0:H.querySelector(Ute))==null||q.scrollIntoView({block:"nearest"})),X.scrollIntoView({block:"nearest"}))}function U(){var M;return(M=w.current)==null?void 0:M.querySelector(`${k6}[aria-selected="true"]`)}function F(){var M;return Array.from(((M=w.current)==null?void 0:M.querySelectorAll(S6))||[])}function Z(M){let H=F()[M];H&&k.setState("value",H.getAttribute(tf))}function se(M){var H;let q=U(),X=F(),D=X.findIndex((Ce)=>Ce===q),ae=X[D+M];(H=a.current)!=null&&H.loop&&(ae=D+M<0?X[X.length-1]:D+M===X.length?X[0]:X[D+M]),ae&&k.setState("value",ae.getAttribute(tf))}function K(M){let H=U(),q=H==null?void 0:H.closest(Gh),X;for(;q&&!X;)q=M>0?ene(q,Gh):tne(q,Gh),X=q==null?void 0:q.querySelector(S6);X?k.setState("value",X.getAttribute(tf)):se(M)}let te=()=>Z(F().length-1),I=(M)=>{M.preventDefault(),M.metaKey?te():M.altKey?K(1):se(1)},pe=(M)=>{M.preventDefault(),M.metaKey?Z(0):M.altKey?K(-1):se(-1)};return oe(ge.div,{ref:t,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:(M)=>{var H;(H=O.onKeyDown)==null||H.call(O,M);let q=M.nativeEvent.isComposing||M.keyCode===229;if(!(M.defaultPrevented||q))switch(M.key){case"n":case"j":{b&&M.ctrlKey&&I(M);break}case"ArrowDown":{I(M);break}case"p":case"k":{b&&M.ctrlKey&&pe(M);break}case"ArrowUp":{pe(M);break}case"Home":{M.preventDefault(),Z(0);break}case"End":{M.preventDefault(),te();break}case"Enter":{M.preventDefault();let X=U();if(X){let D=new Event(Uk);X.dispatchEvent(D)}}}}},oe("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:one},l),k0(e,(M)=>oe(R6.Provider,{value:k},oe(C6.Provider,{value:R},M))))}),Vte=B((e,t)=>{var n,r;let o=nt(),i=T(null),s=bn(P6),a=Hh(),l=A6(e),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;Xl(()=>{if(!c)return a.item(o,s==null?void 0:s.id)},[c]);let u=Q6(o,i,[e.value,e.children,i],e.keywords),f=Yk(),d=ma((S)=>S.value&&S.value===u.current),h=ma((S)=>c||a.filter()===!1?!0:S.search?S.filtered.items.get(o)>0:!0);L(()=>{let S=i.current;if(!(!S||e.disabled))return S.addEventListener(Uk,m),()=>S.removeEventListener(Uk,m)},[h,e.onSelect,e.disabled]);function m(){var S,k;g(),(k=(S=l.current).onSelect)==null||k.call(S,u.current)}function g(){f.setState("value",u.current,!0)}if(!h)return null;let{disabled:b,value:O,onSelect:y,forceMount:v,keywords:x,...w}=e;return oe(ge.div,{ref:sa(i,t),...w,id:o,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!d,"data-disabled":!!b,"data-selected":!!d,onPointerMove:b||a.getDisablePointerSelection()?void 0:g,onClick:b?void 0:m},e.children)}),qte=B((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,s=nt(),a=T(null),l=T(null),c=nt(),u=Hh(),f=ma((h)=>o||u.filter()===!1?!0:h.search?h.filtered.groups.has(s):!0);Xl(()=>u.group(s),[]),Q6(s,a,[e.value,e.heading,l]);let d=ce(()=>({id:s,forceMount:o}),[o]);return oe(ge.div,{ref:sa(a,t),...i,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&oe("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),k0(e,(h)=>oe("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},oe(P6.Provider,{value:d},h))))}),Gte=B((e,t)=>{let{alwaysRender:n,...r}=e,o=T(null),i=ma((s)=>!s.search);return!n&&!i?null:oe(ge.div,{ref:sa(o,t),...r,"cmdk-separator":"",role:"separator"})}),Hte=B((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,i=Yk(),s=ma((c)=>c.search),a=ma((c)=>c.selectedItemId),l=Hh();return L(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),oe(ge.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:o?e.value:s,onChange:(c)=>{o||i.setState("search",c.target.value),n==null||n(c.target.value)}})}),Wte=B((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=T(null),s=T(null),a=ma((c)=>c.selectedItemId),l=Hh();return L(()=>{if(s.current&&i.current){let c=s.current,u=i.current,f,d=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let h=c.offsetHeight;u.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return d.observe(c),()=>{cancelAnimationFrame(f),d.unobserve(c)}}},[]),oe(ge.div,{ref:sa(i,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:l.listId},k0(e,(c)=>oe("div",{ref:sa(s,l.listInnerRef),"cmdk-list-sizer":""},c)))}),Fte=B((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:s,...a}=e;return oe(Gu,{open:n,onOpenChange:r},oe(Eh,{container:s},oe(Mh,{"cmdk-overlay":"",className:o}),oe($h,{"aria-label":e.label,"cmdk-dialog":"",className:i},oe(T6,{ref:t,...a}))))}),Kte=B((e,t)=>ma((n)=>n.filtered.count===0)?oe(ge.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Jte=B((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return oe(ge.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},k0(e,(s)=>oe("div",{"aria-hidden":!0},s)))}),Bl=Object.assign(T6,{List:Wte,Item:Vte,Input:Hte,Group:qte,Separator:Gte,Dialog:Fte,Empty:Kte,Loading:Jte});function ene(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function tne(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function A6(e){let t=T(e);return Xl(()=>{t.current=e}),t}var Xl=typeof window>"u"?L:Lt;function nf(e){let t=T();return t.current===void 0&&(t.current=e()),t}function ma(e){let t=Yk(),n=()=>e(t.snapshot());return Jl(t.subscribe,n,n)}function Q6(e,t,n,r=[]){let o=T(),i=Hh();return Xl(()=>{var s;let a=(()=>{var c;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():o.current}})(),l=r.map((c)=>c.trim());i.value(e,a,l),(s=t.current)==null||s.setAttribute(tf,a),o.current=a}),o}var nne=()=>{let[e,t]=A(),n=nf(()=>new Map);return Xl(()=>{n.current.forEach((r)=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function rne(e){let t=e.type;return typeof t=="function"?t(e.props):("render"in t)?t.render(e.props):e}function k0({asChild:e,children:t},n){return e&&On(t)?xr(rne(t),{ref:t.ref},n(t.props.children)):n(t)}var one={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var Wh=({className:e,...t})=>p(Bl,{className:ue("flex flex-col text-base",e),...t}),Fh=({className:e,...t})=>p(Bl.Input,{className:ue("mb-1.5 h-8 w-full rounded-sm border border-border bg-card px-2.5 text-base text-foreground outline-none placeholder:text-muted-foreground focus-visible:border-muted-foreground",e),...t}),Kh=({className:e,...t})=>p(Bl.List,{className:ue("max-h-72 overflow-auto",e),...t}),Vk=({className:e,...t})=>p(Bl.Empty,{className:ue("px-2 py-3 text-center text-muted-foreground",e),...t}),Jh=({className:e,...t})=>p(Bl.Item,{className:ue("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-muted-foreground data-[selected=true]:bg-muted data-[selected=true]:text-foreground",e),...t}),C0=({className:e,...t})=>p(Bl.Group,{className:ue("[&_[cmdk-group-heading]]:flex [&_[cmdk-group-heading]]:items-center [&_[cmdk-group-heading]]:gap-1.5 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:pb-1 [&_[cmdk-group-heading]]:pt-2 [&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-foreground",e),...t});var R0=Gu,fwe=HO,dwe=Dh,ep=({className:e,...t})=>p(FS,{className:ue("text-lg font-semibold",e),...t});function P0({className:e,...t}){return P(Eh,{container:Fn(),children:[p(Mh,{className:"fixed inset-0 z-50 bg-black/45"}),p($h,{className:ue("fixed left-1/2 top-1/2 z-50 flex w-[min(480px,calc(100vw-32px))] max-h-[calc(100dvh-32px)] -translate-x-1/2 -translate-y-1/2 flex-col gap-2.5 rounded-lg border border-border bg-background p-4 text-foreground outline-none",e),...t})]})}var qk=(e)=>p(iee,{modal:!1,...e}),Gk=aee;function Hk({className:e,align:t="end",sideOffset:n=4,...r}){return p(lee,{container:Fn(),children:p(uee,{align:t,sideOffset:n,className:ue("z-50 flex min-w-40 max-w-[calc(100vw-32px)] flex-col rounded-md border border-border bg-card p-1.5 text-base text-foreground shadow-md outline-none animate-fade-in",e),...r})})}var Wk=({className:e,...t})=>p(fee,{className:ue("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-muted-foreground outline-none data-[disabled]:opacity-50 data-[highlighted]:bg-muted data-[highlighted]:text-foreground",e),...t});var Owe=dee;var ine="h-(--btn-s) w-full rounded-sm border border-border bg-card px-2.5 py-1 text-base text-foreground placeholder:text-muted-foreground hover:border-muted-foreground focus-visible:border-muted-foreground aria-[invalid=true]:border-danger";function ai({className:e,...t}){return p("input",{className:ue(ine,e),...t})}function Fk({className:e,...t}){return p(mee,{className:ue("block text-base font-medium text-foreground",e),...t})}var rf=bee,of=wee,Awe=vee;function sf({className:e,align:t="end",sideOffset:n=4,...r}){return p(Cee,{container:Fn(),children:p(Ree,{align:t,sideOffset:n,className:ue("z-50 max-w-[calc(100vw-32px)] rounded-md border border-border bg-card p-1.5 text-base text-foreground shadow-md outline-none animate-fade-in",e),...r})})}var T0=Zee,A0=qee;function Q0({className:e,size:t="md",children:n,...r}){return P(Yee,{className:ue("inline-flex max-w-full items-center justify-between gap-2 rounded-sm border border-border bg-card px-2.5 text-base text-foreground hover:border-muted-foreground data-[placeholder]:text-muted-foreground",t==="sm"?"h-7 text-sm":"h-(--btn-s)",e),...r,children:[p("span",{className:"min-w-0 truncate",children:n}),p(Gee,{asChild:!0,children:p(kt,{name:"chev",className:"size-3 shrink-0 text-muted-foreground"})})]})}function E0({className:e,children:t,...n}){return p(Kee,{container:Fn(),children:p(Jee,{position:"popper",sideOffset:4,className:ue("z-50 max-h-72 min-w-(--radix-select-trigger-width) max-w-[calc(100vw-32px)] overflow-hidden rounded-md border border-border bg-card p-1.5 text-base text-foreground shadow-md animate-fade-in",e),...n,children:p(ste,{children:t})})})}var tp=({className:e,children:t,...n})=>P(cte,{className:ue("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-muted-foreground outline-none data-[highlighted]:bg-muted data-[highlighted]:text-foreground data-[state=checked]:font-medium data-[state=checked]:text-foreground",e),...n,children:[p(ute,{children:t}),p(dte,{className:"ml-auto",children:p(kt,{name:"check",className:"size-3.5 text-primary"})})]});var jwe=Gu,Iwe=HO,Xwe=Dh;var Bwe=KS;var E6=({theme:e="system"})=>p(B_,{theme:e,position:"bottom-left",offset:{left:28,bottom:56},mobileOffset:{left:16,bottom:68},style:{"--normal-bg":"var(--bg-2)","--normal-text":"var(--ink)","--normal-border":"var(--line)",fontFamily:"var(--font)"},toastOptions:{className:"toast",style:{fontSize:"var(--fs)",borderRadius:"var(--r)",boxShadow:"var(--shadow-2)"}}});var tSe=yte;var M6=(e)=>p(Rte,{delayDuration:400,...e}),$6=Tte,D6=Ate,_6=({className:e,sideOffset:t=6,...n})=>p(Mte,{container:Fn(),children:p($te,{sideOffset:t,className:ue("z-50 max-w-72 rounded-sm border border-border bg-card px-2 py-1 text-sm text-foreground shadow-md animate-fade-in",e),...n})});function af({icon:e,label:t,active:n,size:r="md",href:o,className:i,children:s,...a}){return P($6,{children:[p(D6,{asChild:!0,children:P(o?"a":"button",{...o?{href:o}:{type:"button"},"aria-label":n?`${t} (on)`:t,className:ue("relative grid shrink-0 place-items-center rounded-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",r==="sm"?"size-(--btn-xs) max-[640px]:size-8 [&_svg]:size-(--ico)":"size-(--btn-s)",n&&"text-foreground",i),...a,children:[typeof e==="string"?p(kt,{name:e}):e,n&&p("span",{"aria-hidden":"true",className:"absolute right-1.5 top-1.5 size-[7px] rounded-full bg-primary shadow-[0_0_0_2px_var(--bg)]"}),s]})}),p(_6,{children:t})]})}function N6({open:e,title:t,description:n,confirmLabel:r,danger:o,onConfirm:i,onCancel:s}){return p(h6,{open:e,onOpenChange:(a)=>!a&&s(),children:P(g6,{children:[p(p6,{children:t}),n&&p(m6,{className:"whitespace-pre-line",children:n}),P("div",{className:"mt-1 flex justify-end gap-1.5",children:[p(O6,{children:"Cancel"}),p(b6,{danger:o,onClick:i,children:r})]})]})})}function L6(){let e=Au((t)=>t.open);return p(N6,{open:!!e,title:e?.title??"",description:e?.description,confirmLabel:e?.confirmLabel??"OK",danger:e?.danger,onConfirm:()=>jw(!0),onCancel:()=>jw(!1)})}function Kk({id:e,label:t,help:n,error:r,inline:o,row:i,dim:s,children:a}){let l=uf(),c=e??l,u=`${c}-help`,f=`${c}-err`,d=[n&&u,r&&f].filter(Boolean).join(" ")||void 0,h=a({id:c,"aria-describedby":d,"aria-invalid":r?!0:void 0},`${c}-l`),m=n&&p("p",{id:u,className:ue("text-sm text-muted-foreground",i&&"col-start-1 text-xs leading-normal"),children:n}),g=r&&p("p",{id:f,role:"alert",className:"text-sm text-danger",children:r});if(i)return P("div",{className:"grid min-h-11 grid-cols-[minmax(0,1fr)_auto] gap-x-6 gap-y-0.5 px-3.5 py-2.5 @max-[520px]:grid-cols-1",children:[p(Fk,{id:`${c}-l`,htmlFor:c,className:ue("self-center text-sm font-normal text-strong",s&&"opacity-50"),children:t}),p("div",{className:ue("col-start-2 self-center justify-self-end @max-[520px]:col-start-1 @max-[520px]:row-auto @max-[520px]:mt-1.5 @max-[520px]:max-w-full @max-[520px]:justify-self-start",(n||r)&&"row-span-2",s&&"opacity-50"),children:h}),m,g]});return P("div",{className:o?"flex min-w-0 items-center gap-1.5":"flex flex-col gap-1.5",children:[p(Fk,{id:`${c}-l`,htmlFor:c,className:o?"shrink-0 text-xs text-muted-foreground":void 0,children:t}),h,m,g]})}function Jk({options:e,value:t,onChange:n,placeholder:r="Choose",label:o,className:i,groupIcons:s,open:a,onOpenChange:l}){let[c,u]=A(!1),f=a??c,d=(b)=>(u(b),l?.(b)),h=e.find((b)=>b.value===t),m=(b)=>P(Jh,{value:`${e.indexOf(b)}:${b.value}`,keywords:[b.label,b.group??"",b.search??""],onSelect:()=>{n(b.value),d(!1)},children:[b.icon,p("span",{className:"min-w-0 flex-1 truncate",children:b.label}),b.count!=null&&p("i",{className:"text-xs not-italic tabular-nums text-muted-foreground",children:b.count}),b.value===t&&p(kt,{name:"check",className:"size-3.5 text-primary"})]},b.value),g=[...new Set(e.map((b)=>b.group).filter((b)=>!!b))];return P(rf,{open:f,onOpenChange:d,children:[p(of,{asChild:!0,children:P("button",{type:"button","aria-label":h?`${o}: ${h.label}`:o,className:ue("inline-flex h-(--btn-s) max-w-full items-center justify-between gap-2 rounded-sm border border-border bg-card px-2.5 text-base hover:border-muted-foreground",!h&&"text-muted-foreground",i),children:[h?.icon,p("span",{className:"min-w-0 truncate",children:h?.label??r}),p(kt,{name:"chev",className:"size-3 shrink-0 text-muted-foreground"})]})}),p(sf,{align:"start",className:"w-[320px]",children:P(Wh,{filter:(b,O,y)=>y?.join(" ").toLowerCase().includes(O.trim().toLowerCase())?1:0,children:[p(Fh,{placeholder:"Search…","aria-label":`Search ${o}`}),P(Kh,{children:[p(Vk,{children:"Nothing matches"}),e.filter((b)=>!b.group).map(m),g.map((b)=>p(C0,{heading:s?.[b]?P(st,{children:[s[b],b]}):b,children:e.filter((O)=>O.group===b).map(m)},b))]})]})})]})}var z6=(e)=>e.split(/[\\/]/).pop()||e;var ane=(e)=>{try{return localStorage.getItem(e)}catch{return null}},j6=Oe()(()=>({data:null,loaded:!1,view:ane("kz-ice-view")==="sort"?"sort":"cards",board:"",kinds:[],cat:"",src:"",sel:[],cur:null,open:null,armed:null,form:null,task:null,reply:null,styles:{},cap:{text:"",files:[],board:"",boardDir:null,dir:null,busy:!1},srcShow:!1,srcAdd:!1,srcKind:"link",draft:{url:"",q:"",plat:"x",label:"",cat:"",to:""},swipe:null,busy:!1,order:[],deck:[],ask:null,tick:0})),I6=j6.getState;var M0=j6.setState;function eC({dir:e,label:t="",size:n=16,logo:r}){let[o,i]=A(!1);return(r??Qe.projects().some((a)=>a.dir===e&&a.logo))&&!o?p("img",{src:"/project-logo?dir="+encodeURIComponent(e),alt:"",loading:"lazy",onError:()=>i(!0),className:"shrink-0 rounded-xs object-contain",style:{width:n,height:n}}):p("span",{"aria-hidden":"true",className:"inline-grid shrink-0 place-items-center rounded-xs bg-muted text-[10px] font-semibold text-muted-foreground",style:{width:n,height:n},children:(z6(t)||"?").charAt(0).toUpperCase()})}var B6=({state:e})=>p("span",{"aria-hidden":"true",className:`si kz-keep ${e}`});var une=typeof navigator<"u"&&/Mac/.test(navigator.platform)?"⌘":"Ctrl",Zl={autoComplete:"off",spellCheck:!1};function D0({title:e,hint:t,err:n,go:r,busy:o,back:i,onSubmit:s,keys:a,children:l}){return P("form",{className:"flex flex-col gap-2.5",onSubmit:(c)=>(c.preventDefault(),s()),onKeyDown:(c)=>{if(a&&c.key==="Enter"&&(c.ctrlKey||c.metaKey))c.preventDefault(),c.currentTarget.requestSubmit()},children:[p(ep,{className:"text-base font-semibold",children:e}),t&&p("p",{className:"text-sm text-muted-foreground",children:t}),l,n&&p("p",{role:"alert",className:"rounded-xs border border-[color-mix(in_srgb,var(--danger)_30%,transparent)] bg-[color-mix(in_srgb,var(--danger)_10%,transparent)] px-3 py-2 text-sm text-danger",children:n}),P("div",{className:"flex flex-wrap items-center justify-end gap-1.5",children:[a&&P("kbd",{"aria-hidden":!0,className:"mr-auto font-mono text-xs text-muted-foreground",children:[une," ↵"]}),i&&p(rs,{variant:"ghost",onClick:i,children:"Back to add options"}),p(rs,{variant:"ghost",onClick:$u,children:"Cancel"}),p(rs,{variant:"primary",type:"submit",disabled:!!o,children:o||r})]})]})}var tC=(e,t)=>{$u(),Pe(t),Qe.pickProject(e)};async function nC(e,t){let n=await Zi("/pick-folder",{});if(n.d.path)e(t?A3(n.d.path,t()):n.d.path)}var rC=({children:e,onPick:t})=>P("div",{className:"flex items-center gap-1.5",children:[e,p(rs,{variant:"ghost",onClick:t,children:"Pick…"})]});function $0({title:e,sub:t,to:n,go:r}){return P(rs,{className:"h-auto flex-col items-start gap-0.5 whitespace-normal px-3 py-2 text-left",onClick:()=>r(n),children:[p("b",{className:"font-semibold",children:e}),p("small",{className:"text-sm font-normal text-muted-foreground",children:t})]})}function fne({back:e}){let[t,n]=A(""),[r,o]=A(""),[i,s]=A(!1);return p(D0,{title:"Existing folder",hint:"Pick a folder, or type its path. A .kaizen folder is added to it.",err:r,go:"Add project",busy:i?"Adding...":"",back:e,onSubmit:async()=>{if(!t.trim())return;s(!0);let a=await Zi("/add-project",{path:t.trim()});s(!1),a.ok?tC(a.d.dir,a.d.already?"Project already added":"Project added"):o(a.d.error)},children:p(rC,{onPick:()=>void nC(n),children:p(ai,{...Zl,autoFocus:!0,value:t,onChange:(a)=>n(a.target.value),placeholder:"/path/to/folder","aria-label":"Folder",required:!0})})})}function dne({back:e}){let[t,n]=A(""),[r,o]=A(""),[i,s]=A(""),[a,l]=A(!1),c=T(""),u=T(""),f=T(""),d=async(h=t,m=r)=>{if(!h.trim())return!1;f.current=h;let g=await Zi("/clone",{url:h.trim(),check:!0});if(!g.ok)return s(g.d.error),!1;if(s(""),u.current=g.d.name,!m.trim()||m===c.current)c.current=g.d.to,o(g.d.to);return!0};return P(D0,{title:"Clone from URL",hint:"Enter the Git URL (https or ssh) and choose where to clone it.",err:i,go:"Clone",busy:a?"Cloning...":"",back:e,onSubmit:async()=>{if(!await d())return;l(!0);let h=await Zi("/clone",{url:t.trim(),to:r.trim()||void 0});l(!1),h.ok?tC(h.d.dir,"Cloned"):s(h.d.error)},children:[p(ai,{...Zl,autoFocus:!0,value:t,onChange:(h)=>n(h.target.value),onBlur:()=>t!==f.current&&void d(),placeholder:"https://github.com/user/repo.git","aria-label":"Git URL",required:!0}),p(rC,{onPick:async()=>await d()?nC(o,()=>u.current):void 0,children:p(ai,{...Zl,value:r,onChange:(h)=>o(h.target.value),placeholder:"Folder to clone into","aria-label":"Clone into"})})]})}function hne({back:e}){let[t,n]=A(""),[r,o]=A(""),[i,s]=A(!0),[a,l]=A(""),[c,u]=A(!1),f=T(""),d=T(""),h=T(null),m=async(g)=>{n(g),d.current=g.trim();let b=d.current;if(!Q3(b)||r.trim()&&r!==f.current)return;let O=await Zi("/new-project",{name:b,check:!0});if(O.ok&&d.current===b)f.current=O.d.to,o(O.d.to)};return P(D0,{title:"Create a new project",hint:"Name it and kaizen will create the folder with a .kaizen inside.",err:a,go:"Create project",busy:c?"Creating...":"",back:e,onSubmit:async()=>{if(!t.trim())return h.current?.focus();u(!0);let g=await Zi("/new-project",{name:t.trim(),to:r.trim()||void 0,git:i});if(u(!1),!g.ok)return l(g.d.error);tC(g.d.dir,g.d.git===!1?"Project created, but git init failed":"Project created")},children:[p(ai,{...Zl,ref:h,autoFocus:!0,value:t,onChange:(g)=>void m(g.target.value),placeholder:"my-project","aria-label":"Name",required:!0}),p(rC,{onPick:()=>void nC(o,()=>t.trim()),children:p(ai,{...Zl,value:r,onChange:(g)=>o(g.target.value),placeholder:"Folder to create","aria-label":"Create in"})}),P("label",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[p(S0,{checked:i,onCheckedChange:(g)=>s(g===!0)})," Git repository"]})]})}function pne({dir:e,back:t}){let n=Qe.gitProjects(),[r,o]=A(n.some((O)=>O.dir===e)?e:n[0]?.dir??""),[i,s]=A({def:"",list:[]}),[a,l]=A(yh),[c,u]=A(""),[f,d]=A(""),[h,m]=A(""),[g,b]=A(!1);return L(()=>{let O=!0;return Zi("/branches?dir="+encodeURIComponent(r)).then((y)=>{if(!O)return;let{def:v="",branches:x=[]}=y.ok?y.d:{};s({def:v,list:x}),l(x.length?v||x[0]:yh)}),()=>{O=!1}},[r]),P(D0,{title:"New workspace",err:h,go:"Create workspace",busy:g?"Creating...":"",back:t,keys:!0,onSubmit:async()=>{if(g)return;m(""),b(!0);let O=await Zi("/worktree",{dir:r,branch:E3(f,c),base:a===yh?void 0:a});if(b(!1),!O.ok)return m(O.d.error);$u(),Qe.navigate(Qe.wsHref(r,O.d.path))},children:[p(Kk,{label:"Project",children:(O)=>P(T0,{value:r,onValueChange:o,children:[p(Q0,{...O,"aria-label":"Project",className:"min-w-0 flex-1",children:p(A0,{})}),p(E0,{children:n.map((y)=>p(tp,{value:y.dir,children:y.name},y.dir))})]})}),P("div",{className:"flex items-center justify-between gap-2",children:[P("span",{id:"wsfl",className:"text-sm text-muted-foreground",children:["Create from ",p("i",{className:"opacity-70 not-italic",children:"[Optional]"})]}),P("label",{className:"flex min-w-0 items-center gap-1 text-sm text-muted-foreground",children:["from",P(T0,{value:a,onValueChange:l,children:[p(Q0,{size:"sm","aria-label":"Start from branch",className:"max-w-[200px]",children:p(A0,{})}),p(E0,{children:i.list.length?i.list.map((O)=>p(tp,{value:O,children:O},O)):p(tp,{value:yh,children:"current branch"})})]})]})]}),p(ai,{...Zl,autoFocus:!0,value:c,onChange:(O)=>u(O.target.value),placeholder:"What is this workspace for?","aria-labelledby":"wsfl"}),P("details",{className:"group",children:[p("summary",{className:"cursor-pointer py-0.5 text-sm text-muted-foreground group-open:mb-2",children:"Advanced"}),p(Kk,{label:"Branch name",children:(O)=>p(ai,{...O,...Zl,value:f,onChange:(y)=>d(y.target.value),placeholder:bh(c)||"feature/my-branch"})})]})]})}function mne({go:e}){let t=Qe.gitProjects().length>0;return P("div",{className:"flex flex-col gap-2.5",children:[p(ep,{className:"text-base font-semibold",children:"Add a project"}),p("p",{className:"text-sm text-muted-foreground",children:"Add a project to get started with kaizen."}),p($0,{title:"Existing folder",sub:"A project, a Git repo, or any folder",to:"folder",go:e}),p("p",{className:"text-sm text-muted-foreground",children:"Other ways to add"}),p($0,{title:"Clone from URL",sub:"Clone a remote Git repository",to:"clone",go:e}),p($0,{title:"Create new project",sub:"Start from an empty folder",to:"create",go:e}),t&&p($0,{title:"New workspace",sub:"A branch in its own folder, in a project you have",to:"ws",go:e}),p("div",{className:"flex justify-end",children:p(rs,{variant:"ghost",onClick:$u,children:"Cancel"})})]})}function gne({dir:e,start:t}){let[n,r]=A(t??"menu"),o=t==="ws"?void 0:()=>r("menu");return P(P0,{"aria-describedby":void 0,"aria-label":"Add a project",className:ue(n==="ws"&&"w-[min(576px,calc(100vw-32px))] max-h-[85dvh] overflow-y-auto"),children:[n==="menu"&&p(mne,{go:r}),n==="folder"&&p(fne,{back:o}),n==="clone"&&p(dne,{back:o}),n==="create"&&p(hne,{back:o}),n==="ws"&&p(pne,{dir:e,back:o})]})}function Z6(){let e=CO((t)=>t.open);return p(R0,{open:!!e,onOpenChange:(t)=>!t&&$u(),children:e&&p(gne,{dir:e.dir,start:e.start},e.n)})}function U6(){let e=EO((t)=>t.at);return P(qk,{open:!!e,onOpenChange:(t)=>!t&&nN(),children:[p(Gk,{asChild:!0,children:p("span",{"aria-hidden":!0,className:"pointer-events-none fixed size-0",style:{left:e?.x??0,top:e?.y??0}})}),p(Hk,{align:"start",sideOffset:0,className:"min-w-[170px]",children:e?.items.map((t)=>p(Wk,{onSelect:t.run,children:t.label},t.label))})]})}function Y6(e){let t=Mu(),[n,r]=A([]);return L(()=>{if(!e)return r([]);let o=new AbortController;return fetch("/chats",{signal:o.signal}).then((i)=>i.json()).then((i)=>r(i.chats??[])).catch(()=>{}),()=>o.abort()},[e]),ce(()=>e?LN(t,n):[],[e,t,n])}var One={ws:P(st,{children:[p("circle",{cx:"6",cy:"6",r:"2"}),p("circle",{cx:"6",cy:"18",r:"2"}),p("circle",{cx:"18",cy:"8",r:"2"}),p("path",{d:"M6 8v8M18 10c0 4-6 3-12 6"})]}),run:p("path",{d:"M5 4l14 8-14 8z"}),idea:p("path",{d:"M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.5 1 2.5h6c0-1 .3-1.8 1-2.5A6 6 0 0 0 12 3z"}),chat:p("path",{d:"M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z"}),term:p("path",{d:"M4 17l6-5-6-5M12 19h8"}),proj:p("path",{d:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),page:P(st,{children:[p("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2"}),p("path",{d:"M4 9h16"})]}),act:p("path",{d:"M13 3L5 14h6l-1 7 8-11h-6z"}),tab:P(st,{children:[p("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),p("path",{d:"M3 9h8V5"})]}),plus:p("path",{d:"M12 5v14M5 12h14"}),search:P(st,{children:[p("circle",{cx:"11",cy:"11",r:"7"}),p("path",{d:"M20 20l-4-4"})]})},V6=({name:e,className:t})=>p("svg",{viewBox:"0 0 24 24","aria-hidden":"true",className:t,children:p("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:One[e]??p("use",{href:`#i-${e}`})})});function bne({text:e,words:t}){if(!t.length)return p(st,{children:e});let n=new RegExp(`(${t.map((r)=>r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|")})`,"gi");return p(st,{children:e.split(n).map((r,o)=>o%2?p("b",{className:"font-semibold text-strong",children:r},o):r)})}function q6(){let e=oa((h)=>h.open),t=oa((h)=>h.newTask),n=Y6(e),[r,o]=A(""),[i,s]=A("0"),a=ce(()=>MN(n,r,t),[n,r,t]);L(()=>{if(e)o("")},[e]);let l=T(!1),c=()=>oa.setState({open:!1});L(()=>s("0"),[r]);let u=[];a.forEach((h,m)=>{let g=u.find((b)=>b[0]===h.group);g?g[1].push({row:h,n:m}):u.push([h.group,[{row:h,n:m}]])});let f=!!r.trim()&&a.length===1,d=ce(()=>r.toLowerCase().split(/\s+/).filter(Boolean),[r]);return p(R0,{open:e,onOpenChange:(h)=>!h&&c(),children:P(P0,{"aria-label":"Search","aria-describedby":void 0,onCloseAutoFocus:(h)=>{if(!l.current)return;l.current=!1,h.preventDefault()},className:"top-[14vh] w-[min(560px,calc(100vw-32px))] translate-y-0 gap-0 overflow-hidden rounded-md p-0 shadow-md",children:[p(ep,{className:"sr-only",children:"Search"}),P(Wh,{shouldFilter:!1,value:i,onValueChange:s,loop:!0,className:"max-h-[min(480px,72vh)]",children:[P("div",{className:"flex items-center gap-2 border-b border-border px-3",children:[p(V6,{name:"search",className:"size-[15px] flex-none text-muted-foreground"}),p(Fh,{value:r,onValueChange:o,placeholder:"Search","aria-label":"Search",autoFocus:!0,autoComplete:"off",spellCheck:!1,className:"mb-0 h-10 min-w-0 flex-1 border-0 bg-transparent px-0 text-lg focus-visible:border-0"})]}),P(Kh,{className:"max-h-none flex-1 overflow-auto p-1",children:[u.map(([h,m])=>p(C0,{heading:h,children:m.map(({row:g,n:b})=>P(Jh,{value:String(b),className:"h-(--btn-s) gap-2 px-2 text-base text-foreground",onSelect:()=>{l.current=!0,c(),setTimeout(g.act,0)},children:[p(V6,{name:g.ico,className:"size-3.5 flex-none text-muted-foreground"}),g.dot&&p(B6,{state:g.dot}),p("span",{className:"min-w-0 truncate",children:p(bne,{text:g.title,words:d})}),g.sub&&p("span",{className:"min-w-0 flex-[0_1_auto] truncate text-sm text-muted-foreground",children:g.sub}),g.when&&p("span",{className:"ml-auto flex-none pl-2 text-xs text-muted-foreground",children:g.when})]},b))},h)),f&&p("div",{className:"px-2 py-3.5 text-center text-sm text-muted-foreground",children:"No results"})]}),P("span",{role:"status","aria-live":"polite",className:"sr-only",children:[a.length," result",a.length===1?"":"s"," found"]})]})]})})}var yne={kind:"daily",time:"09:00",day:"mon",grace_minutes:"720",precheck_timeout:"60"},vne=()=>{let e=document.documentElement.dataset,t=!0;try{t=localStorage.getItem("kz-haptic")!=="off"}catch{}return{theme:e.theme||"system",color:e.color||"monochrome",motion:e.motion||"system",font:Qe.font.read(),notify:Qe.notices.on(),haptic:t,sound:Qe.notices.sound()}},G6=Oe()(()=>({data:null,scope:"all",page:null,q:"",back:!1,prefs:vne(),local:{},openAgents:[],draft:{...yne},editing:"",busy:"",typed:{},startQ:"",startBack:!1,pageGen:0}));var{getState:H6,setState:W6}=G6;var wne=[["App",[{id:"general",title:"General",desc:"About kaizen, storage, folders and how the app opens.",ico:"gear"},{id:"appearance",title:"Appearance",desc:"Theme, color and motion in this browser.",ico:"sun"},{id:"notifications",title:"Notifications",desc:"Notices and sounds in this browser.",ico:"inbox"},{id:"keyboard",title:"Keyboard & Dictation",desc:"Shortcuts, and speech-to-text dictation run in the browser.",ico:"kbd"},{id:"terminal",title:"Terminal",desc:"Board terminals and the terminal dashboard.",ico:"term"}]],["Agents",[{id:"agents",title:"Agents",desc:"Manage AI agents, set a default, and customize commands.",ico:"ai"},{id:"models",title:"Models",desc:"The model each agent runs its stages and handoff sessions on.",ico:"mem"},{id:"accounts",title:"AI Accounts",desc:"Who is signed in to each AI tool kaizen runs. Add accounts only to switch between more than one.",ico:"link"},{id:"skills",title:"Skills",desc:"What your agents can do. Changes apply to new sessions.",ico:"note"}]],["Workflow",[{id:"runs",title:"Runs",desc:"How a run is carried out: who builds, who reviews, and what it remembers.",ico:"play"},{id:"approvals",title:"Approvals",desc:"Where a run stops and waits for you.",ico:"check"},{id:"autofix",title:"Auto-fix",desc:"What happens to review findings.",ico:"bug"},{id:"orchestration",title:"Orchestration",desc:"Split a run into workers, each in its own terminal. Off by default.",ico:"lgrid"},{id:"automations",title:"Automations",desc:"Schedules that start a run in this project.",ico:"clock"},{id:"git",title:"Git",desc:"Branches and commits for each run.",ico:"pen"}]],["Connections",[{id:"integrations",title:"Integrations",desc:"Icebox sources and ChatGPT, your Google account, and web research.",ico:"ext"},{id:"mobile",title:"Phone",desc:"Open kaizen from your phone, and send files to WhatsApp.",ico:"phone"}]]],ORe=wne.flatMap(([,e])=>e);var yr=(e)=>["path",{d:e}],yRe=[yr("M10 4a2 2 0 1 1 4 0v2h5v5h-2a2 2 0 1 0 0 4h2v5H5v-5h2a2 2 0 1 0 0-4H5V6h5Z")],vRe={kaizen:[yr("M4 7h11M4 12h7M4 17h11"),yr("m16 11 2 2 3-4")],"kaizen-help":[["circle",{cx:12,cy:12,r:9}],yr("M9.5 9.5a2.5 2.5 0 1 1 3.8 2.1c-.9.6-1.3 1.1-1.3 2.1"),yr("M12 17h.01")],"kaizen-book":[yr("M12 6c-2-1.5-5-2-8-2v15c3 0 6 .5 8 2 2-1.5 5-2 8-2V4c-3 0-6 .5-8 2Z"),yr("M12 6v15")],"kaizen-deck":[["rect",{x:3,y:4,width:18,height:12,rx:1}],yr("M12 16v4M8 20h8M8 12l3-3 2 2 3-3")],"kaizen-computer":[["rect",{x:3,y:4,width:18,height:12,rx:1}],yr("M8 20h8M12 16v4M9 8l5 3-2 .8-.8 2Z")],"kaizen-game":[["rect",{x:2,y:7,width:20,height:11,rx:5}],yr("M7 10.5v4M5 12.5h4"),["circle",{cx:16,cy:11.5,r:0.6}],["circle",{cx:18,cy:13.5,r:0.6}]],"kaizen-video":[["rect",{x:3,y:6,width:13,height:12,rx:2}],yr("m16 10 5-3v10l-5-3")],rea:[["circle",{cx:10.5,cy:10.5,r:6}],yr("m15 15 6 6"),yr("M8.5 9 7 10.5 8.5 12M12.5 9l1.5 1.5-1.5 1.5")]};var F6=Oe()(()=>({ver:null,later:(()=>{try{return localStorage.getItem("kz-upd-later")}catch{return null}})()}));var Sne=["claude","codex","gemini"],oC=({a:e})=>p("svg",{"aria-hidden":"true",children:p("use",{href:`#i-${Sne.includes(e.agent??"")?e.agent:"ai"}`})}),iC=({st:e})=>p("i",{className:`si ${eS[e]}`}),K6=(e,t)=>!e?"":t-e<60000?"now":ji(e,t);function J6({rows:e,now:t,open:n,dir:r,ws:o}){if(!e.length)return null;let i=(a,l)=>(a.preventDefault(),sN(r,o,l));if(e.length===1){let a=e[0];return p("div",{className:"wag",children:P("button",{type:"button",className:"aone",title:`${a.a.name}: open its terminal`,onClick:(l)=>i(l,a.a.key),children:[p(iC,{st:a.st}),p(oC,{a:a.a}),P("span",{className:"atx",children:[Du[a.st]," - ",a.a.name]}),p("small",{children:K6(a.a.at,t)})]})})}let s=p("button",{type:"button",className:`wchev${n?" on":""}`,"aria-expanded":n,"aria-label":`${e.length} agents: ${n?"hide":"show"} the list`,onClick:(a)=>(a.preventDefault(),K3(r,o)),children:p("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:p("path",{d:"M6 9l6 6 6-6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})});if(n)return P(st,{children:[P("div",{className:"wag",children:[P("span",{className:"aht",children:[e.length," agents"]}),s]}),p("div",{className:"alist",children:e.map((a)=>P("button",{type:"button",className:"arow",title:tS(a),onClick:(l)=>i(l,a.a.key),children:[p(iC,{st:a.st}),p(oC,{a:a.a}),p("span",{className:"atx",children:tS(a)}),p("small",{children:K6(a.a.at,t)})]},a.a.key))})]});return P("div",{className:"wag",children:[p("span",{className:"chips",children:Z3(e).map((a)=>P("span",{className:"chip",children:[p(iC,{st:a.st}),a.rs.map((l)=>p("button",{type:"button",className:"amark",title:`${l.a.name} - ${Du[a.st]}: open its terminal`,"aria-label":`${l.a.name} - ${Du[a.st]}: open its terminal`,onClick:(c)=>i(c,l.a.key),children:p(oC,{a:l.a})},l.a.key))]},a.st))}),s]})}var _0=({on:e,label:t,children:n,onChange:r})=>P("label",{className:"flex min-w-0 cursor-pointer items-center gap-2 rounded-xs px-2 py-1.5 whitespace-nowrap hover:bg-muted",children:[p(S0,{checked:e,onCheckedChange:(o)=>r(o===!0),"aria-label":t}),n]});function e8(){let[e,t]=A(!1),n=Mu(),r=St((f)=>f.filt),o=St((f)=>f.folded),i=St((f)=>f.q),s=n.projects.filter((f)=>f.workspaces?.length).map((f)=>f.dir),a=B3(s,(f)=>pn(f,n.projects),i),l=X3(r,s),c=s.length>0&&s.every((f)=>o.includes(f)),u=(f)=>(d)=>Sh({dirs:d?[...new Set([...r.dirs,f])]:r.dirs.filter((h)=>h!==f)});return P(rf,{open:e,onOpenChange:t,children:[p(of,{asChild:!0,children:p("button",{type:"button",id:"pfilter","aria-pressed":l,"aria-label":"Show one project",title:l?"Filter on: choose projects and kinds":"Filter projects and kinds",children:p("svg",{children:p("use",{href:"#r-filter"})})})}),P(sf,{align:"start",className:"flex max-h-[60vh] w-[220px] flex-col gap-px p-1.5 text-sm","aria-label":"Filter the Projects list",children:[p(ai,{placeholder:"Search projects…","aria-label":"Search projects",autoComplete:"off",spellCheck:!1,value:i,onChange:(f)=>H3(f.target.value),className:"mb-1.5"}),P("div",{className:"flex items-center gap-0.5",children:[p("div",{className:"min-w-0 flex-1",children:p(_0,{on:!r.dirs.length,label:"All projects",onChange:()=>Sh({dirs:[]}),children:"All projects"})}),p("button",{type:"button",className:"grid size-6 place-items-center rounded-xs text-muted-foreground hover:bg-muted hover:text-foreground",title:c?"Expand all":"Collapse all","aria-label":c?"Expand all projects":"Collapse all projects",onClick:()=>iS(s,!c),children:p("svg",{viewBox:"0 0 16 16",className:"size-3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:p("path",{d:c?"M4 3l4 3 4-3M4 13l4-3 4 3":"M4 6l4-3 4 3M4 10l4 3 4-3"})})})]}),p("div",{className:"flex min-h-0 flex-1 flex-col gap-px overflow-auto",children:a.map((f)=>P(_0,{on:r.dirs.includes(f),label:pn(f,n.projects),onChange:u(f),children:[p(eC,{dir:f,label:pn(f,n.projects),logo:n.projects.some((d)=>d.dir===f&&d.logo)}),p("span",{className:"min-w-0 truncate",children:pn(f,n.projects)})]},f))}),P("div",{className:"mt-1 flex flex-none flex-col gap-px border-t border-border pt-0.5",children:[p("div",{className:"mx-2 mt-2 mb-0.5 text-xs font-semibold text-muted-foreground",children:"Show"}),p(_0,{on:r.running,label:"Running",onChange:(f)=>Sh({running:f}),children:"Running"}),p(_0,{on:r.done,label:"Done",onChange:(f)=>Sh({done:f}),children:"Done"})]})]})]})}var t8=(e,t)=>{if(!(e.ctrlKey||e.metaKey||e.shiftKey||e.button!==0)&&t())e.preventDefault()};function kne({dir:e,name:t,logo:n}){let[r,o]=A(!1);return n&&!r?p("img",{className:"plogo",src:"/project-logo?dir="+encodeURIComponent(e),alt:"",loading:"lazy",onError:()=>o(!0)}):p("span",{className:"plogo","aria-hidden":"true",children:(t||"?").charAt(0).toUpperCase()})}var Cne=()=>p("svg",{viewBox:"0 0 24 24","aria-label":"Pinned",style:{width:12,height:12,flex:"none",marginLeft:4,color:"var(--accent)"},children:p("path",{d:"M12 17v5M9 3h6l-1 6 3 3v2H7v-2l3-3z",fill:"currentColor",stroke:"currentColor",strokeWidth:"1.5",strokeLinejoin:"round"})}),Rne=()=>p("svg",{viewBox:"0 0 24 24","aria-hidden":"true",children:P("g",{fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p("circle",{cx:"6",cy:"6",r:"2"}),p("circle",{cx:"6",cy:"18",r:"2"}),p("circle",{cx:"18",cy:"8",r:"2"}),p("path",{d:"M6 8v8M18 10c0 4-6 3-12 6"})]})});function Pne({t:e}){return P("a",{className:"rtask",href:`/?view=task&task=${encodeURIComponent(e.id)}&dir=${encodeURIComponent(e.dir)}`,"data-task-id":e.id,title:`${e.attention.reason} · ${e.attention.action}`,onClick:(t)=>t8(t,()=>iN(e.id,e.dir)),children:[p("span",{className:`si ${I3(e)}`}),P("span",{children:[p("b",{children:e.title}),p("small",{children:e.attention.reason})]})]})}function Tne({dir:e,r:t,now:n,current:r}){return P(st,{children:[P("div",{className:"wsr wsc",children:[P("a",{className:"row ws",href:Qe.wsHref(e,t.path),"data-dir":e,"data-ws":t.path,title:t.path,"aria-current":r?"true":void 0,onClick:(o)=>t8(o,()=>sS(e,t.path)),onContextMenu:(o)=>{let i=lN(e,t.path);if(!i.length)return;o.preventDefault(),MO(Math.min(o.clientX,innerWidth-190),Math.min(o.clientY,innerHeight-i.length*34-16),i)},children:[p("span",{className:`si ${t.st||"none"}`}),P("div",{className:"wl",children:[P("span",{className:"l1",children:[p("b",{children:t.label}),t.pinned&&p(Cne,{})]}),P("span",{className:"l2",children:[p("span",{children:t.folder}),!t.w.main&&p(Rne,{})]})]})]}),p(J6,{rows:t.agents,now:n,open:t.open,dir:e,ws:t.path})]}),t.tasks.map((o)=>p(Pne,{t:o},o.id))]})}function Ane({g:e,logo:t,now:n,cur:r,lift:o,before:i}){let s=(a)=>{if(a.preventDefault(),e.empty&&sS(e.dir,e.mainWs))return;W3(e.dir)};return P(st,{children:[P("div",{className:`pgrp${i?" rank-before":""}`,children:[P("button",{type:"button",className:`proj${e.shut?" shut":""}${o?" rank-lift":""}`,"data-proj":e.dir,"data-ws":e.mainWs,"data-empty":e.empty?"":void 0,title:e.dir,"aria-expanded":!e.shut,onClick:s,children:[p(kne,{dir:e.dir,name:e.name,logo:t}),p("span",{className:"pname",children:e.name}),p("svg",{className:"fchev",viewBox:"0 0 24 24","aria-hidden":"true",children:p("path",{d:"M9 6l6 6-6 6",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})]}),e.git&&p("button",{type:"button",className:"wadd",title:`New workspace in ${e.name}`,"aria-label":`New workspace in ${e.name}`,onClick:(a)=>(a.preventDefault(),aN(e.dir)),children:p("svg",{"aria-hidden":"true",children:p("use",{href:"#r-plus"})})})]}),!e.shut&&p("div",{className:"pws",children:e.rows.map((a)=>p(Tne,{dir:e.dir,r:a,now:n,current:r.dir===e.dir&&r.ws===a.path},a.path))})]})}function n8(){let e=Mu(),t=Tt((g)=>g.every!==null),n=St((g)=>g.filt),r=St((g)=>g.folded),o=St((g)=>g.pins),i=St((g)=>g.open),s=po((g)=>g.search),a=St((g)=>g.tick),l=T(null),c=fN(l,(g)=>{J3(g),cN(g)}),{groups:u,now:f,wait:d}=ce(()=>{let g=Date.now();return{groups:j3(e,{filt:n,pins:o,folded:r,open:i,now:g}),now:g,wait:D3(e.agents,g)}},[e,n,o,r,i,a]);L(()=>{if(d===1/0)return;let g=setTimeout(G3,d+20);return()=>clearTimeout(g)},[d,u]);let h=U3(s,e.cards,e.projects),m=new Set(e.projects.filter((g)=>g.logo).map((g)=>g.dir));return P("div",{ref:l,className:`rlist${c.view.to===u.length?" rank-end":""}`,onClickCapture:(g)=>c.swallow()&&(g.preventDefault(),g.stopPropagation()),children:[u.map((g,b)=>p(Ane,{g,logo:m.has(g.dir),now:f,cur:h,lift:c.view.lift===g.dir,before:c.view.to===b},g.dir)),t&&!u.length&&p("div",{className:"none",children:"No projects"})]})}function r8(e){let t=e.label?{role:"img","aria-label":e.label}:{};return P("pre",{className:"mark",...t,children:[p("span",{children:"█ █ ▄▀█ █ ▀▀█ █▀▀ █▄ █"}),`
88
+ `,p("span",{children:"█▀▄ █▀█ █ ▄▀ ██▄ █ ▀█"}),`
89
+ `,p("span",{children:"█ █ █ █ █ █▄▄ █▄▄ █ █"})]})}function lf(e){let t=po((n)=>n.lit);return P("a",{className:e.className??"it",href:e.href,"data-view":e.view,"data-n":e.n||void 0,title:e.title,"aria-label":e.aria,"aria-current":t===e.view?"page":void 0,children:[p("svg",{children:p("use",{href:`#${e.icon}`})}),p("span",{className:"lbl",children:e.label??e.title}),e.children]})}function o8(e){let{min:t,dark:n,setup:r,openSetup:o}=Eu(),i=po((g)=>g.lit),s=F6((g)=>g.ver?.update?g.ver.latest:""),a=Tt((g)=>o3(g.tasks)),l=Tt((g)=>g.tasks!==null),c=Tt((g)=>i3(g.sources)),u=Tt((g)=>g.loaded),f=AN(),d=!l?"Tasks: every task and run, filtered":a?`Tasks · ${a} need you`:"Tasks",h=t?"Expand menu":"Collapse menu",m=n?"Dark theme: switch to light":"Light theme: switch to dark";return P("nav",{className:"rail","aria-label":"Main",children:[P("div",{className:"top",children:[P("a",{className:"home",href:"/",title:"Home","aria-label":"kaizen home",children:[p(r8,{}),p("span",{className:"mascot"})]}),p(af,{size:"sm",icon:"side",label:h,id:"fold","aria-expanded":!t,onClick:xO})]}),P("a",{className:"it gs-it",href:"#",id:"gsearch",title:"Search everything",onClick:(g)=>(g.preventDefault(),Yi.search()),children:[P("svg",{viewBox:"0 0 24 24",children:[p("circle",{cx:"11",cy:"11",r:"7",fill:"none",stroke:"currentColor",strokeWidth:"2"}),p("path",{d:"M20 20l-4-4",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),p("span",{className:"lbl",children:"Search"})]}),P("a",{className:"it",href:"/","data-view":"home",title:"Chat with the project's agent","aria-current":i==="home"?"page":void 0,children:[p("svg",{className:"dkl",children:p("use",{href:"#r-chat"})}),p("svg",{className:"phl",children:p("use",{href:"#i-home"})}),P("span",{className:"lbl",children:[p("span",{className:"dkl",children:"Chat"}),p("span",{className:"phl",children:"Home"})]})]}),p(lf,{className:"it ponly",href:"/?view=chat",view:"chat",title:"Chat with kaizen's agent",label:"Chat",icon:"r-chat"}),p(lf,{className:"it ponly",href:"/?view=device",view:"device",title:"This computer's runs",label:"Runs",icon:"r-runs"}),p(lf,{className:"it ponly",href:"/?view=terminal",view:"terminal",n:f,title:u?"Terminal: every agent kaizen runs"+(f?` (${f} hidden)`:""):"Open terminals across all projects",label:"Terminal",icon:"r-term"}),P(lf,{className:"it fold",href:"/?view=icebox",view:"sources",title:"Icebox: requests gathered from your sources",label:"Icebox",icon:"r-tray",children:[p("span",{className:"srcs",id:"rail-srcs",children:e.srcs}),p("span",{className:"n",id:"ice-n",children:c||""})]}),p(lf,{href:"/?view=tasks",view:"tasks",n:a,title:d,aria:l?d:void 0,label:"Tasks",icon:"r-bulb"}),P("a",{className:"it",href:"/?setup=1",id:"rsetup",onClick:(g)=>{if(!o)return;g.preventDefault(),o()},hidden:!r,title:r?`Continue setup: step ${r.step+1} of ${r.total}`:"Continue setup",children:[p("span",{className:"ring",style:r?{"--p":Math.round(r.step/r.total*100)+"%"}:void 0}),p("span",{className:"lbl",children:"Setup"})]}),P("div",{className:"psec",children:[p("span",{className:"lbl",children:"Projects"}),p("a",{className:"pbd",href:"/?view=board","data-view":"board",title:"Board","aria-label":"Board","aria-current":i==="board"?"page":void 0,children:p("svg",{children:p("use",{href:"#i-board"})})}),p("span",{id:"pfilter-host",style:{display:"contents"},children:p(e8,{})}),p("button",{id:"padd",title:"Add project or workspace","aria-label":"Add project or workspace",onClick:()=>Yi.add(),children:p("svg",{children:p("use",{href:"#r-plus"})})})]}),e.before,p("div",{className:"plist",id:"plist","aria-label":"Tasks and runs by project",children:p(n8,{})}),P("div",{className:"rbot",children:[p(lf,{className:ue("it fold",s&&"upd"),href:"/?view=settings",view:"settings",title:s?`Settings: ${globalThis.kaizenDesktop?"Kaizen":"kaizen"} ${s} is available`:"Settings",aria:"Settings",icon:"i-gear"}),p("a",{className:"ib xs",href:"/issue",target:"_blank",rel:"noopener",title:"Report an issue","aria-label":"Report an issue",children:p("svg",{children:p("use",{href:"#r-bug"})})}),p("button",{className:"ib xs",id:"kbd",title:"Keyboard shortcuts","aria-label":"Keyboard shortcuts",onClick:()=>gh(!0),children:p("svg",{children:p("use",{href:"#r-kbd"})})}),P("button",{className:"ib xs th",id:"themet",title:m,"aria-label":m,"data-dark":n,onClick:vO,children:[p("svg",{className:"sun",children:p("use",{href:"#i-sun"})}),p("svg",{className:"moon",children:p("use",{href:"#i-moon"})})]})]})]})}function i8({notebook:e=!1}){return p("svg",{style:{display:"none"},"aria-hidden":"true",children:P("defs",{children:[p("symbol",{id:"i-clip",viewBox:"0 0 24 24",children:p("path",{d:"M21.4 11.1l-9.2 9.2a6 6 0 0 1-8.5-8.5l9.2-9.2a4 4 0 0 1 5.7 5.7l-9.2 9.2a2 2 0 0 1-2.8-2.8l8.5-8.5"})}),P("symbol",{id:"i-bug",viewBox:"0 0 24 24",children:[p("rect",{x:"8",y:"6",width:"8",height:"14",rx:"4"}),p("path",{d:"M12 20v-9M8 12H4M20 12h-4M9 7 7 4M15 7l2-3M8 17l-3 2M16 17l3 2M8.5 8.5 5 7M15.5 8.5 19 7"})]}),P("symbol",{id:"i-kbd",viewBox:"0 0 24 24",children:[p("rect",{x:"2",y:"6",width:"20",height:"12",rx:"2"}),p("path",{d:"M6 10h.01M10 10h.01M14 10h.01M18 10h.01M7 14h10"})]}),p("symbol",{id:"i-check",viewBox:"0 0 24 24",children:p("path",{d:"M20 6 9 17l-5-5"})}),P("symbol",{id:"i-clock",viewBox:"0 0 24 24",children:[p("circle",{cx:"12",cy:"12",r:"9"}),p("path",{d:"M12 7v5l3 2"})]}),p("symbol",{id:"i-chev",viewBox:"0 0 24 24",children:p("path",{d:e?"M9 6l6 6-6 6":"m6 9 6 6 6-6"})}),e&&P(st,{children:[p("symbol",{id:"i-box",viewBox:"0 0 24 24",children:p("path",{d:"M4 5v14M20 5v14M8 12h8M11 9l-3 3 3 3M13 9l3 3-3 3"})}),p("symbol",{id:"i-folder",viewBox:"0 0 24 24",children:p("path",{d:"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"})}),p("symbol",{id:"i-list",viewBox:"0 0 24 24",children:p("path",{d:"M4 6h16M4 12h16M4 18h16"})}),p("symbol",{id:"i-wide",viewBox:"0 0 24 24",children:p("path",{d:"M3 12h18M7 8l-4 4 4 4M17 8l4 4-4 4"})})]}),P("symbol",{id:"i-ai",viewBox:"0 0 24 24",children:[p("path",{d:"M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9z"}),p("path",{d:"M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z"})]}),p("symbol",{id:"i-google",viewBox:"0 0 24 24",children:p("path",{fill:"currentColor",stroke:"none",d:"M12.48 10.92v3.28h7.84c-.24 1.84-.85 3.18-1.73 4.1-1.08 1.08-2.76 2.26-5.7 2.26-4.82 0-8.6-3.89-8.6-8.72s3.78-8.72 8.6-8.72c2.6 0 4.5 1.02 5.9 2.34l2.31-2.31C19.13 1.19 16.56 0 12.48 0 5.87 0 .31 5.39.31 12s5.56 12 12.17 12c3.57 0 6.26-1.17 8.37-3.36 2.16-2.16 2.84-5.21 2.84-7.66 0-.76-.05-1.47-.17-2.06z"})}),p("symbol",{id:"i-popout",viewBox:"0 0 24 24",children:p("path",{d:"M14 4h6v6M20 4l-8 8M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5"})}),p("symbol",{id:"i-plus",viewBox:"0 0 24 24",children:p("path",{d:"M12 5v14M5 12h14"})}),p("symbol",{id:"i-send",viewBox:"0 0 24 24",children:p("path",{d:"M12 19V5M6 11l6-6 6 6"})}),p("symbol",{id:"i-home",viewBox:"0 0 24 24",children:p("path",{d:"M4 11l8-7 8 7v8a1 1 0 0 1-1 1h-4v-6h-6v6H5a1 1 0 0 1-1-1z"})}),P("symbol",{id:"i-gear",viewBox:"0 0 24 24",children:[p("circle",{cx:"12",cy:"12",r:"3"}),p("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"})]}),P("symbol",{id:"i-inbox",viewBox:"0 0 24 24",children:[p("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"}),p("path",{d:"M5.5 5.1L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.5-6.9A2 2 0 0 0 16.8 4H7.2a2 2 0 0 0-1.7 1.1z"})]}),p("symbol",{id:"i-link",viewBox:"0 0 24 24",children:p("path",{d:"M10 13a5 5 0 0 0 7.1.4l3-3a5 5 0 0 0-7.1-7.1l-1.7 1.7M14 11a5 5 0 0 0-7.1-.4l-3 3a5 5 0 0 0 7.1 7.1l1.7-1.7"})}),p("symbol",{id:"i-play",viewBox:"0 0 24 24",children:p("path",{d:"M6 4l14 8-14 8z"})}),P("symbol",{id:"i-mic",viewBox:"0 0 24 24",children:[p("rect",{x:"9",y:"3",width:"6",height:"11",rx:"3"}),p("path",{d:"M5 11a7 7 0 0 0 14 0M12 18v3M9 21h6"})]}),p("symbol",{id:"i-pen",viewBox:"0 0 24 24",children:p("path",{d:"M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"})}),p("symbol",{id:"i-x",viewBox:"0 0 24 24",children:p("path",{d:"M18 6L6 18M6 6l12 12"})}),p("symbol",{id:"i-filter",viewBox:"0 0 24 24",children:p("path",{d:"M4 5h16l-6 8v6l-4-2v-4z"})}),P("symbol",{id:"i-note",viewBox:"0 0 24 24",children:[p("path",{d:"M6 3h9l4 4v14H6z"}),p("path",{d:"M14 3v5h5M9 13h6M9 17h6"})]}),P("symbol",{id:"i-video",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"6",width:"13",height:"12",rx:"2"}),p("path",{d:"M16 10.5l5-3v9l-5-3z"})]}),p("symbol",{id:"i-trash",viewBox:"0 0 24 24",children:p("path",{d:"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14M10 11v6M14 11v6"})}),P("symbol",{id:"i-ask",viewBox:"0 0 24 24",children:[p("path",{d:"M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z"}),p("path",{d:"M9.8 9.5a2.3 2.3 0 0 1 4.4.8c0 1.5-2.2 2-2.2 3.2M12 16.5h.01"})]}),p("symbol",{id:"i-mem",viewBox:"0 0 24 24",children:p("path",{d:"M3 7h18v9H3zM7 16v3M12 16v3M17 16v3M7 10v3M12 10v3M17 10v3"})}),p("symbol",{id:"i-term",viewBox:"0 0 24 24",children:p("path",{d:"M4 17l6-5-6-5M12 19h8"})}),p("symbol",{id:"i-max",viewBox:"0 0 24 24",children:p("path",{d:"M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5"})}),p("symbol",{id:"i-min",viewBox:"0 0 24 24",children:p("path",{d:"M9 4v5H4M15 4v5h5M9 20v-5H4M15 20v-5h5"})}),P("symbol",{id:"i-lgrid",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),p("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),p("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),p("rect",{x:"14",y:"14",width:"7",height:"7",rx:"1"})]}),P("symbol",{id:"i-lcols",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),p("path",{d:"M12 3v18"})]}),P("symbol",{id:"i-lrows",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),p("path",{d:"M3 12h18"})]}),p("symbol",{id:"i-dash",viewBox:"0 0 24 24",children:p("path",{d:"M5 12h14"})}),p("symbol",{id:"i-close",viewBox:"0 0 24 24",children:p("path",{d:"M18 6L6 18M6 6l12 12"})}),P("symbol",{id:"i-more",viewBox:"0 0 24 24",children:[p("circle",{cx:"5",cy:"12",r:"1.2",fill:"currentColor"}),p("circle",{cx:"12",cy:"12",r:"1.2",fill:"currentColor"}),p("circle",{cx:"19",cy:"12",r:"1.2",fill:"currentColor"})]}),P("symbol",{id:"i-open",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),p("path",{d:"M15 3v18"})]}),P("symbol",{id:"i-archive",viewBox:"0 0 24 24",children:[p("rect",{x:"2",y:"3",width:"20",height:"5",rx:"1"}),p("path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8M10 12h4"})]}),P("symbol",{id:"i-restore",viewBox:"0 0 24 24",children:[p("path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),p("path",{d:"M3 3v5h5"})]}),p("symbol",{id:"i-b-x",viewBox:"0 0 24 24",children:p("path",{fill:"currentColor",stroke:"none",d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})}),p("symbol",{id:"i-b-tiktok",viewBox:"0 0 24 24",children:p("path",{fill:"currentColor",stroke:"none",d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"})}),p("symbol",{id:"i-b-instagram",viewBox:"0 0 24 24",children:p("path",{fill:"currentColor",stroke:"none",d:"M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077"})}),p("symbol",{id:"i-b-threads",viewBox:"0 0 24 24",children:p("path",{fill:"currentColor",stroke:"none",d:"M18.263 11.097c-.03-3.486-1.92-5.586-5.111-5.586-2.13 0-3.922.963-4.863 2.499l2.062 1.438c.535-.843 1.272-1.543 2.628-1.543 1.528 0 2.318.85 2.544 2.431a15 15 0 0 0-2.236-.173c-4.125 0-6.068 1.867-6.068 4.336s1.943 3.99 4.804 3.99c3.139 0 5.013-2.115 5.781-4.735.798.361 1.348 1.204 1.348 2.47 0 3.387-3.907 5.232-7.22 5.232-4.885 0-8.077-3.207-8.077-8.424 0-6.392 4.223-10.487 9.9-10.487 3.808 0 5.69 1.671 6.97 3.914l2.108-1.475C21.44 2.078 18.331 0 13.663 0 6.227 0 1.168 5.277 1.168 12.934c0 7 4.953 11.066 10.856 11.066 4.878 0 9.809-2.846 9.809-7.716 0-2.545-1.46-4.231-3.569-5.187m-6.33 4.855c-1.077 0-2.026-.512-2.026-1.453 0-1.483 1.822-1.934 3.606-1.934.678 0 1.34.045 1.927.173-.422 1.927-1.671 3.215-3.508 3.214Z"})}),P("symbol",{id:"i-at",viewBox:"0 0 24 24",children:[p("circle",{cx:"12",cy:"12",r:"4"}),p("path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.9 7.9"})]}),P("symbol",{id:"i-sheet",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),p("path",{d:"M3 9h18M3 15h18M9 3v18"})]}),P("symbol",{id:"i-doc",viewBox:"0 0 24 24",children:[p("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),p("path",{d:"M14 2v6h6M16 13H8M16 17H8M10 9H8"})]}),p("symbol",{id:"i-refresh",viewBox:"0 0 24 24",children:p("path",{d:"M21 3v5h-5M3 21v-5h5M20.5 13A9 9 0 0 1 5.7 18.3L3 16M3.5 11A9 9 0 0 1 18.3 5.7L21 8"})}),p("symbol",{id:"i-ext",viewBox:"0 0 24 24",children:p("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6M15 3h6v6M10 14L21 3"})}),P("symbol",{id:"i-board",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),p("path",{d:"M9 4v16M15 4v16"})]}),P("symbol",{id:"i-search",viewBox:"0 0 24 24",children:[p("circle",{cx:"11",cy:"11",r:"7"}),p("path",{d:"M20 20l-4-4"})]}),P("symbol",{id:"i-side",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),p("path",{d:"M9 3v18"})]}),p("symbol",{id:"i-claude",viewBox:"0 0 24 24",children:p("path",{fill:"#D97757",stroke:"none",d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}),p("symbol",{id:"i-gemini",viewBox:"0 0 24 24",children:p("path",{fill:"#8E75B2",stroke:"none",d:"M11.04 19.32Q12 21.51 12 24q0-2.49.93-4.68.96-2.19 2.58-3.81t3.81-2.55Q21.51 12 24 12q-2.49 0-4.68-.93a12.3 12.3 0 0 1-3.81-2.58 12.3 12.3 0 0 1-2.58-3.81Q12 2.49 12 0q0 2.49-.96 4.68-.93 2.19-2.55 3.81a12.3 12.3 0 0 1-3.81 2.58Q2.49 12 0 12q2.49 0 4.68.96 2.19.93 3.81 2.55t2.55 3.81"})}),p("symbol",{id:"i-codex",viewBox:"0 0 24 24",children:p("path",{fill:"currentColor",stroke:"none",d:"M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"})}),p("symbol",{id:"i-arrow",viewBox:"0 0 24 24",children:p("path",{d:"M5 12h14M13 6l6 6-6 6"})}),P("symbol",{id:"i-img",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),p("circle",{cx:"9",cy:"10",r:"2"}),p("path",{d:"m21 17-5-5-9 8"})]}),p("symbol",{id:"i-a-pick",viewBox:"0 0 24 24",children:p("path",{d:"m5 3 14 7-6 2-2 6z"})}),p("symbol",{id:"i-a-text",viewBox:"0 0 24 24",children:p("path",{d:"M5 6V4h14v2M12 4v16M9 20h6"})}),P("symbol",{id:"i-a-multi",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"3",width:"10",height:"10",rx:"1.5"}),p("rect",{x:"11",y:"11",width:"10",height:"10",rx:"1.5"})]}),p("symbol",{id:"i-a-area",viewBox:"0 0 24 24",children:p("rect",{x:"3.5",y:"3.5",width:"17",height:"17",rx:"2",strokeDasharray:"3 3"})}),p("symbol",{id:"i-a-pause",viewBox:"0 0 24 24",children:p("path",{d:"M9 5v14M15 5v14"})}),P("symbol",{id:"i-a-copy",viewBox:"0 0 24 24",children:[p("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"}),p("path",{d:"M5 15V6a2 2 0 0 1 2-2h8"})]}),P("symbol",{id:"i-eye",viewBox:"0 0 24 24",children:[p("path",{d:"M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"}),p("circle",{cx:"12",cy:"12",r:"3"})]}),p("symbol",{id:"t-request",viewBox:"0 0 24 24",children:p("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),p("symbol",{id:"t-notes",viewBox:"0 0 24 24",children:p("path",{d:"M12 17v5M9 3h6l-1 6 3 3H7l3-3z"})}),P("symbol",{id:"t-explore",viewBox:"0 0 24 24",children:[p("circle",{cx:"12",cy:"12",r:"9"}),p("path",{d:"m16 8-2.5 5.5L8 16l2.5-5.5L16 8z"})]}),P("symbol",{id:"t-plan",viewBox:"0 0 24 24",children:[p("path",{d:"M9 5h11M9 12h11M9 19h11"}),p("path",{d:"M4 5l1 1 2-2M4 12l1 1 2-2M4 19h2"})]}),P("symbol",{id:"t-backlog",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"4",width:"18",height:"5",rx:"1"}),p("path",{d:"M5 9v10h14V9M10 13h4"})]}),p("symbol",{id:"t-impl",viewBox:"0 0 24 24",children:p("path",{d:"M16 18l6-6-6-6M8 6l-6 6 6 6"})}),P("symbol",{id:"t-git",viewBox:"0 0 24 24",children:[p("circle",{cx:"6",cy:"5",r:"2"}),p("circle",{cx:"6",cy:"19",r:"2"}),p("circle",{cx:"18",cy:"8",r:"2"}),p("path",{d:"M6 7v10M18 10c0 5-12 3-12 7"})]}),P("symbol",{id:"t-review",viewBox:"0 0 24 24",children:[p("path",{d:"M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"}),p("circle",{cx:"12",cy:"12",r:"3"})]}),P("symbol",{id:"t-preview",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"4",width:"18",height:"16",rx:"3"}),p("circle",{cx:"9",cy:"10",r:"2"}),p("path",{d:"M21 16l-5-5-9 9"})]}),p("symbol",{id:"t-book",viewBox:"0 0 24 24",children:p("path",{d:"M4 4h6a3 3 0 0 1 3 3v13a2 2 0 0 0-2-2H4zM20 4h-6a3 3 0 0 0-3 3v13a2 2 0 0 1 2-2h7z"})}),P("symbol",{id:"i-phone",viewBox:"0 0 24 24",children:[p("rect",{x:"7",y:"2",width:"10",height:"20",rx:"3"}),p("path",{d:"M11 18h2"})]}),P("symbol",{id:"i-sun",viewBox:"0 0 24 24",children:[p("circle",{cx:"12",cy:"12",r:"4"}),p("path",{d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"})]}),p("symbol",{id:"i-moon",viewBox:"0 0 24 24",children:p("path",{d:"M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5z"})}),p("symbol",{id:"s-idea",viewBox:"0 0 16 16",children:p("circle",{cx:"8",cy:"8",r:"6",strokeDasharray:"2 2.5"})}),P("symbol",{id:"s-start",viewBox:"0 0 16 16",children:[p("circle",{cx:"8",cy:"8",r:"6",strokeDasharray:"2 2.5"}),p("path",{d:"M6.5 5.5v5l4-2.5z",fill:"currentColor",stroke:"none"})]}),P("symbol",{id:"s-run",viewBox:"0 0 16 16",children:[p("circle",{cx:"8",cy:"8",r:"6"}),p("path",{d:"M8 2a6 6 0 0 1 0 12z",fill:"currentColor",stroke:"none"})]}),P("symbol",{id:"s-stall",viewBox:"0 0 16 16",children:[p("circle",{cx:"8",cy:"8",r:"6"}),p("path",{d:"M8 2a6 6 0 0 1 0 12z",fill:"currentColor",stroke:"none",opacity:".35"})]}),P("symbol",{id:"s-wait",viewBox:"0 0 16 16",children:[p("circle",{cx:"8",cy:"8",r:"6"}),p("path",{d:"M8 5v3.5M8 11v.1"})]}),P("symbol",{id:"s-done",viewBox:"0 0 16 16",children:[p("circle",{cx:"8",cy:"8",r:"6",fill:"currentColor",stroke:"none"}),p("path",{d:"M5.5 8l1.8 1.8L10.8 6",stroke:"var(--bg-2)"})]}),P("symbol",{id:"s-aband",viewBox:"0 0 16 16",children:[p("circle",{cx:"8",cy:"8",r:"6"}),p("path",{d:"M5.5 5.5l5 5M10.5 5.5l-5 5"})]}),p("symbol",{id:"c-claude",viewBox:"0 0 16 16",children:p("path",{d:"M8 2v12M2 8h12M3.8 3.8l8.4 8.4M12.2 3.8l-8.4 8.4"})}),P("symbol",{id:"c-codex",viewBox:"0 0 16 16",children:[p("path",{d:"M8 2l5.2 3v6L8 14l-5.2-3V5z"}),p("circle",{cx:"8",cy:"8",r:"2"})]}),p("symbol",{id:"c-agy",viewBox:"0 0 16 16",children:p("path",{d:"M8 13V4M4.5 7.5L8 4l3.5 3.5M4 13h8"})}),p("symbol",{id:"c-opencode",viewBox:"0 0 16 16",children:p("path",{d:"M3 4l4 4-4 4M8.5 12H13"})}),p("symbol",{id:"c-gemini",viewBox:"0 0 16 16",children:p("path",{d:"M8 2c0 4 2 6 6 6-4 0-6 2-6 6 0-4-2-6-6-6 4 0 6-2 6-6z"})}),p("symbol",{id:"c-cursor",viewBox:"0 0 16 16",children:p("path",{d:"M4 3l9 5-4 1-1 4z"})}),P("symbol",{id:"c-full",viewBox:"0 0 16 16",children:[p("circle",{cx:"5.5",cy:"8",r:"3"}),p("circle",{cx:"11",cy:"8",r:"3"})]}),p("symbol",{id:"c-lite",viewBox:"0 0 16 16",children:p("circle",{cx:"8",cy:"8",r:"3"})}),P("symbol",{id:"c-git",viewBox:"0 0 16 16",children:[p("circle",{cx:"4.5",cy:"3.5",r:"1.5"}),p("circle",{cx:"4.5",cy:"12.5",r:"1.5"}),p("circle",{cx:"11.5",cy:"5.5",r:"1.5"}),p("path",{d:"M4.5 5v6M11.5 7c0 2.5-7 1.5-7 4"})]}),p("symbol",{id:"r-bulb",viewBox:"0 0 24 24",children:p("path",{d:"M9 18h6M10 21h4M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.5 1 2.5h6c0-1 .3-1.8 1-2.5A6 6 0 0 0 12 3z"})}),P("symbol",{id:"r-tray",viewBox:"0 0 24 24",children:[p("path",{d:"M12 3v9M8.5 8.5 12 12l3.5-3.5"}),p("path",{d:"M3 14h5l1.5 2.5h5L16 14h5"}),p("path",{d:"M3 14v5a1 1 0 0 0 1 1h16a1 1 0 0 0 1-1v-5l-2.5-6H15M9 8H5.5L3 14"})]}),p("symbol",{id:"r-filter",viewBox:"0 0 24 24",children:p("path",{d:"M4 5h16l-6 8v6l-4-2v-4z"})}),p("symbol",{id:"r-plus",viewBox:"0 0 24 24",children:p("path",{d:"M12 5v14M5 12h14"})}),P("symbol",{id:"r-bug",viewBox:"0 0 24 24",children:[p("rect",{x:"8",y:"6",width:"8",height:"14",rx:"4"}),p("path",{d:"M12 20v-9M8 12H4M20 12h-4M9 7 7 4M15 7l2-3M8 17l-3 2M16 17l3 2"})]}),P("symbol",{id:"r-kbd",viewBox:"0 0 24 24",children:[p("rect",{x:"2",y:"6",width:"20",height:"12",rx:"2"}),p("path",{d:"M6 10h.01M10 10h.01M14 10h.01M18 10h.01M7 14h10"})]}),P("symbol",{id:"r-desk",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"4",width:"18",height:"12",rx:"2"}),p("path",{d:"M8 20h8M12 16v4"})]}),p("symbol",{id:"r-chat",viewBox:"0 0 24 24",children:p("path",{d:"M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z"})}),P("symbol",{id:"r-runs",viewBox:"0 0 24 24",children:[p("path",{d:"M9 6h11M9 12h11M9 18h11"}),p("circle",{cx:"4.5",cy:"6",r:"1.2"}),p("circle",{cx:"4.5",cy:"12",r:"1.2"}),p("circle",{cx:"4.5",cy:"18",r:"1.2"})]}),P("symbol",{id:"r-term",viewBox:"0 0 24 24",children:[p("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),p("path",{d:"m7 9 3 3-3 3M13 15h4"})]})]})})}function s8(){let e=T(null);return Lt(()=>{let t=Ot(),n=__(e.current,t.notes.find((r)=>r.name===t.open)?.text??"",Z4);if(Uw(n),t.focus==="editor")n.focus(),wt({focus:null});return()=>{Uw(null),n.destroy()}},[]),p("div",{id:"editor",ref:e})}function Qne(){let e=_e((o)=>o.open),t=_e((o)=>o.titleRev),n=_e((o)=>o.focus),r=T(null);return Lt(()=>{let o=r.current;if(n==="title")wt({focus:null}),o.value=e,o.focus(),o.select();else if(document.activeElement!==o)o.value=e},[e,t,n]),p("input",{id:"title",ref:r,defaultValue:e,"aria-label":"Note name; a / puts it in a folder",spellCheck:!1,autoComplete:"off",onKeyDown:(o)=>{if(o.key==="Enter")o.preventDefault(),o.currentTarget.blur();if(o.key==="Escape")o.currentTarget.value=e,o.currentTarget.blur()},onBlur:(o)=>void z4(o.currentTarget.value)})}function Ene(){let e=_e((l)=>l.open),t=_e((l)=>l.save),n=_e((l)=>l.conflict),r=_e((l)=>l.full),o=_e((l)=>l.wide);if(n)return P("div",{id:"meta",children:[p("span",{className:"warnw",children:"This note changed somewhere else since you opened it."}),P("span",{className:"acts",children:[p("button",{className:"btn ghost",id:"theirs",onClick:N4,children:"Load theirs"}),p("button",{className:"btn pri",id:"mine",onClick:_4,children:"Keep mine"})]})]});let i=Br(e),s=o?"Boxed width":"Full width";return P("div",{id:"meta",children:[p("span",{children:i||"Notes"}),p("span",{children:"·"}),p("span",{id:"saved",children:t==="saving"?"Saving…":t==="unsaved"?"Not saved yet":"Saved"}),p("span",{className:"sp"}),p("button",{className:"ib",id:"wide",title:s,"aria-label":s,"aria-pressed":o,onClick:()=>B4(!o),children:p(kt,{name:o?"box":"wide",className:"size-4"})}),p("button",{className:"ib",id:"full",title:r?"Exit full screen (Esc)":"Full screen","aria-label":r?"Exit full screen":"Full screen",onClick:()=>gO(!r),children:p(kt,{name:r?"min":"max",className:"size-4"})}),p("button",{className:"ib",id:"trash",title:"Delete note","aria-label":"Delete note",onClick:()=>void j4(),children:p(kt,{name:"trash",className:"size-4"})})]})}function Mne(){let e=_e((r)=>r.open),t=_e((r)=>r.notes),n=ce(()=>T4(t,e),[t,e]);return P("section",{className:"links",id:"links",hidden:!n.length,children:[p("h3",{children:"Linked from"}),p("ul",{children:n.map((r)=>p("li",{children:P("button",{className:"nt","data-open":r.name,onClick:()=>void ho(r.name),children:[p("span",{className:"nm",children:fO(r.name)}),Br(r.name)&&p("span",{className:"fd",children:Br(r.name)})]})},r.name))})]})}function a8(){let e=_e((o)=>o.ready),t=_e((o)=>o.open),n=_e((o)=>o.doc),r=_e((o)=>o.notes.length);if(!e)return null;if(t)return P("article",{id:"pane",children:[p(Qne,{}),p(Ene,{}),p(s8,{},n),p(Mne,{})]});if(r)return p("div",{className:"blank",id:"pick",children:p("p",{children:"Pick a note on the left, or start a new one."})});return P("div",{className:"blank",id:"empty",children:[p("div",{className:"mascot"}),p("b",{children:"Nothing here yet"}),P("p",{children:["Notes are markdown files in this project's ",p("code",{children:".kaizen/notes"})," folder. Link them with"," ",p("code",{children:"[[Note name]]"}),", tag them with ",p("code",{children:"#tag"}),"."]}),p("button",{className:"btn pri",id:"new2",onClick:()=>void pO(),children:"New note"})]})}var l8=new WeakMap,$ne=(e,t)=>{let n=l8.get(e);if(!n)l8.set(e,n=new Map(e.map((r)=>[r.name,r.mtime])));return n.get(t)};function c8({name:e,withFolder:t}){let n=_e((o)=>o.open===e),r=_e((o)=>$ne(o.notes,e));return p("li",{children:P("button",{className:"nt"+(n?" cur":""),"data-open":e,"aria-current":n?"true":void 0,onClick:()=>void ho(e),children:[p("span",{className:"nm",children:fO(e)}),t&&Br(e)&&p("span",{className:"fd",children:Br(e)}),p("span",{className:"age",children:r?A4(r):""})]})})}function u8({tr:e,path:t}){let n=_e((r)=>r.shut);return P("ul",{children:[[...e.folders].map(([r,o])=>{let i=t+r;return p("li",{children:P("details",{"data-folder":i,open:!n[i],onToggle:(s)=>X4(i,s.currentTarget.open),children:[P("summary",{children:[p("i",{className:"chev",children:p(kt,{name:"chev",className:"size-3"})}),p(kt,{name:"folder",className:"size-[15px]"}),p("span",{children:r})]}),p(u8,{tr:o,path:i+"/"})]})},i)}),e.notes.map((r)=>p(c8,{name:r},r))]})}function f8(){let e=_e((s)=>s.ready),t=_e((s)=>s.notes),n=_e((s)=>s.query),r=dO(n),o=ce(()=>r.text?C4(t,r):[],[t,n]),i=ce(()=>x_(t.map((s)=>s.name)),[t]);if(!e)return p(st,{children:[0,1,2,3,4].map((s)=>p("span",{className:"skel",style:{height:14,margin:"8px 0"}},s))});if(r.text)return o.length?p("ul",{children:o.map((s)=>p(c8,{name:s.name,withFolder:!0},s.name))}):p("p",{className:"none",children:"No note matches."});return t.length?p(u8,{tr:i,path:""}):null}function d8(){let e=_e((o)=>o.projects),t=_e((o)=>o.dir),n=_e((o)=>o.drawer),r=e.map((o)=>({value:o.dir,label:o.label.split(/[\\/]/).filter(Boolean).pop()||o.label,search:o.label}));return P("div",{className:"hdr",children:[p("h1",{children:"Notes"}),p("button",{className:"ib",id:"side",title:"Notes list","aria-label":"Notes list",onClick:()=>ph(!n),children:p(kt,{name:"list"})}),p("div",{id:"proj",className:"kz-ui",children:p(Jk,{options:r,value:t,onChange:(o)=>void I4(o),label:"Project",className:"border-transparent bg-transparent hover:border-border"})}),p("span",{className:"sp"}),p("button",{className:"btn pri",id:"new",onClick:()=>void pO(),children:"New note"})]})}function h8(){let e=_e((o)=>o.notes),t=_e((o)=>o.query),n=ce(()=>R4(e),[e]),r=dO(t).tag;return P("nav",{className:"side","aria-label":"Notes",children:[p("input",{className:"sel",id:"q",type:"search",placeholder:"Search notes, or #tag","aria-label":"Search notes",spellCheck:!1,autoComplete:"off",value:t,onChange:(o)=>mO(o.target.value)}),p("h3",{id:"tagsh",hidden:!n.length,children:"Tags"}),p("div",{className:"tags",id:"tags",children:n.map(([o,i])=>P("button",{className:"chip"+(o===r?" on":""),"data-tag":o,"aria-pressed":o===r,onClick:()=>mO(P4(t,o)),children:["#",o," ",p("span",{children:i})]},o))}),p("h3",{children:"Notes"}),p("div",{className:"tree",id:"tree",children:p(f8,{})})]})}function p8(){let e=_e((i)=>i.open),t=_e((i)=>i.doc),n=_e((i)=>i.full),r=_e((i)=>i.wide),o=_e((i)=>i.drawer);return L(()=>{let i=document.body.classList;i.toggle("full",!!e&&n),i.toggle("wide",r),i.toggle("side-open",o)},[e,n,r,o]),Lt(UA,[t]),L(()=>{let i=(a)=>{if(!a.target.closest?.(".side,#side"))ph(!1)},s=(a)=>{if(a.key!=="Escape"||a.target.matches?.("input"))return;ph(!1),gO(!1)};return document.addEventListener("click",i),document.addEventListener("keydown",s),()=>{document.removeEventListener("click",i),document.removeEventListener("keydown",s)}},[]),P("div",{className:"app",children:[p(d8,{}),P("div",{className:"wrap",children:[p(h8,{}),p("main",{className:"main",children:p("div",{className:"page",children:p(a8,{})})})]})]})}function m8({embed:e}){let t=Eu((n)=>n.dark);return P(M6,{children:[p(i8,{notebook:!0}),!e&&p(o8,{}),p(p8,{}),p("div",{id:"kz-kit",className:"kz-ui",ref:y4,children:P("div",{children:[p(E6,{theme:t?"dark":"light"}),p(L6,{}),!e&&P(st,{children:[p(q6,{}),p(U6,{}),p(Z6,{})]})]})})]})}var Dne={useSearch:oa,openAdd:Wo,openWsMenu:MO,ask:zi,toast:Pe,setHost:L_},g8=()=>void(window.kzKit??=Dne);var np=new URLSearchParams(location.search).has("embed");if(np)document.body.classList.add("embed");r3();if(!np)g8();wr(()=>qv(document.getElementById("root")).render(oe(m8,{embed:np})));if(!np)XN(),Oh();Y4({onChanged:np?void 0:()=>void Oh()});