@jetcrab/pi-desk 1.1.12 → 1.1.13-dev

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 (315) hide show
  1. package/docs/plugins.md +21 -1
  2. package/package.json +2 -2
  3. package/src/app/api/work-sessions/rename/route.ts +1 -0
  4. package/src/client/l2_biz/auth/l2-login.tsx +1 -1
  5. package/src/client/l2_biz/plugin-host/l2-plugin-session-sidebar-tab.tsx +6 -2
  6. package/src/client/l2_biz/settings/l2-auth-settings.tsx +1 -1
  7. package/src/client/l2_biz/settings/views/l2-appearance-settings.tsx +1 -16
  8. package/src/client/l2_biz/task-center/l2-task-center.tsx +4 -30
  9. package/src/client/l2_biz/workbench/file-workspace/l2-plugin-standalone-file-preview.tsx +45 -7
  10. package/src/client/l2_biz/workbench/hooks/l2-work-session-rename.ts +57 -0
  11. package/src/client/l2_biz/workbench/l2-work-session-columns.tsx +0 -11
  12. package/src/client/l2_biz/workbench/l2-work-session-sidebar.tsx +107 -6
  13. package/src/client/l2_biz/workbench/l2-workbench-biz.ts +5 -0
  14. package/src/client/l2_biz/workbench/l2-workbench-chat-composer.tsx +333 -350
  15. package/src/client/l2_biz/workbench/l2-workbench.tsx +46 -1
  16. package/src/client/l2_biz/workbench/views/l2-work-session-rename-dialog.tsx +88 -0
  17. package/src/client/l3_modules/project-files/l3-markdown-preview.module.css +81 -0
  18. package/src/client/l3_modules/project-files/l3-markdown-preview.tsx +52 -0
  19. package/src/client/l3_modules/project-files/l3-project-document-view.tsx +26 -8
  20. package/src/client/l3_modules/project-files/l3-project-file-runtime.ts +16 -1
  21. package/src/client/l3_modules/project-files/l3-project-text-preview.ts +5 -0
  22. package/src/client/l3_modules/work-session-visual/l3-work-session-visual-effects.module.css +0 -36
  23. package/src/client/l3_modules/work-session-visual/l3-work-session-visual-view.tsx +0 -5
  24. package/src/client/l4_foundation/plugin-host/l4-plugin-host-runtime.ts +71 -1
  25. package/src/client/l4_foundation/styles/l4-globals.css +0 -19
  26. package/src/client/l4_foundation/ui/code/l4-code-preview.tsx +2 -1
  27. package/src/common/l2_biz/auth/l2-auth-contract.ts +2 -2
  28. package/src/common/l2_biz/auth/l2-auth-messages.ts +2 -2
  29. package/src/common/l2_biz/settings/l2-settings-messages.ts +0 -6
  30. package/src/common/l2_biz/work-session/l2-work-session-contract.ts +9 -0
  31. package/src/common/l2_biz/workbench/l2-workbench-locale-messages.ts +6 -0
  32. package/src/common/l3_modules/project-files/l3-project-files-locale-messages.ts +4 -0
  33. package/src/common/l4_foundation/locale/l4-host-error-messages.ts +6 -0
  34. package/src/server/l1_entry/api/l1-work-session-rename-route.ts +52 -0
  35. package/src/server/l2_biz/work-session/l2-work-session-chat-runtime.ts +5 -0
  36. package/src/server/l2_biz/work-session/l2-work-session-manage.ts +13 -0
  37. package/src/server/l3_modules/work-session/l3-work-session.ts +4 -0
  38. package/src/server/l4_foundation/pi/l4-pi-chat-worker.ts +12 -1
  39. package/src/server/l4_foundation/pi/l4-pi-work-session-runtime.ts +5 -0
  40. package/temp/build/pi-desk/release/.next/BUILD_ID +1 -1
  41. package/temp/build/pi-desk/release/.next/app-path-routes-manifest.json +1 -0
  42. package/temp/build/pi-desk/release/.next/build-manifest.json +3 -3
  43. package/temp/build/pi-desk/release/.next/prerender-manifest.json +3 -3
  44. package/temp/build/pi-desk/release/.next/react-loadable-manifest.json +1 -2
  45. package/temp/build/pi-desk/release/.next/required-server-files.js +3 -3
  46. package/temp/build/pi-desk/release/.next/required-server-files.json +3 -3
  47. package/temp/build/pi-desk/release/.next/routes-manifest.json +6 -0
  48. package/temp/build/pi-desk/release/.next/server/app/_global-error/page.js +1 -1
  49. package/temp/build/pi-desk/release/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  50. package/temp/build/pi-desk/release/.next/server/app/_global-error.html +1 -1
  51. package/temp/build/pi-desk/release/.next/server/app/_global-error.rsc +1 -1
  52. package/temp/build/pi-desk/release/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  53. package/temp/build/pi-desk/release/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  54. package/temp/build/pi-desk/release/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  55. package/temp/build/pi-desk/release/.next/server/app/_not-found/page.js +1 -1
  56. package/temp/build/pi-desk/release/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  57. package/temp/build/pi-desk/release/.next/server/app/api/auth/login/route.js +2 -2
  58. package/temp/build/pi-desk/release/.next/server/app/api/auth/logout/route.js +1 -1
  59. package/temp/build/pi-desk/release/.next/server/app/api/auth-settings/get/route.js +1 -1
  60. package/temp/build/pi-desk/release/.next/server/app/api/auth-settings/replace/route.js +1 -1
  61. package/temp/build/pi-desk/release/.next/server/app/api/capability-modes/get/route.js +1 -1
  62. package/temp/build/pi-desk/release/.next/server/app/api/capability-modes/replace/route.js +1 -1
  63. package/temp/build/pi-desk/release/.next/server/app/api/chat/context/get/route.js +1 -1
  64. package/temp/build/pi-desk/release/.next/server/app/api/chat/images/get/route.js +1 -1
  65. package/temp/build/pi-desk/release/.next/server/app/api/chat/messages/get/route.js +1 -1
  66. package/temp/build/pi-desk/release/.next/server/app/api/health/route.js +1 -1
  67. package/temp/build/pi-desk/release/.next/server/app/api/mcp-check/get/route.js +1 -1
  68. package/temp/build/pi-desk/release/.next/server/app/api/mcp-settings/del/route.js +1 -1
  69. package/temp/build/pi-desk/release/.next/server/app/api/mcp-settings/get/route.js +1 -1
  70. package/temp/build/pi-desk/release/.next/server/app/api/mcp-settings/replace/route.js +1 -1
  71. package/temp/build/pi-desk/release/.next/server/app/api/model-catalog/list/route.js +1 -1
  72. package/temp/build/pi-desk/release/.next/server/app/api/model-settings/get/route.js +1 -1
  73. package/temp/build/pi-desk/release/.next/server/app/api/model-settings/replace/route.js +1 -1
  74. package/temp/build/pi-desk/release/.next/server/app/api/pi/directories/list/route.js +1 -1
  75. package/temp/build/pi-desk/release/.next/server/app/api/pi/directory-entries/list/route.js +1 -1
  76. package/temp/build/pi-desk/release/.next/server/app/api/pi/directory-ignores/list/route.js +1 -1
  77. package/temp/build/pi-desk/release/.next/server/app/api/pi/directory-ignores/replace/route.js +1 -1
  78. package/temp/build/pi-desk/release/.next/server/app/api/pi/models/list/route.js +1 -1
  79. package/temp/build/pi-desk/release/.next/server/app/api/pi/session-user-messages/list/route.js +1 -1
  80. package/temp/build/pi-desk/release/.next/server/app/api/pi/sessions/list/route.js +1 -1
  81. package/temp/build/pi-desk/release/.next/server/app/api/plugin-catalog/get/route.js +1 -1
  82. package/temp/build/pi-desk/release/.next/server/app/api/plugin-catalog/search/route.js +1 -1
  83. package/temp/build/pi-desk/release/.next/server/app/api/plugin-catalog/settings-get/route.js +1 -1
  84. package/temp/build/pi-desk/release/.next/server/app/api/plugin-catalog/settings-replace/route.js +1 -1
  85. package/temp/build/pi-desk/release/.next/server/app/api/plugins/add/route.js +1 -1
  86. package/temp/build/pi-desk/release/.next/server/app/api/plugins/apply/route.js +1 -1
  87. package/temp/build/pi-desk/release/.next/server/app/api/plugins/batch/route.js +1 -1
  88. package/temp/build/pi-desk/release/.next/server/app/api/plugins/browser-resources/[resourceGroup]/[...resourcePath]/route.js +1 -1
  89. package/temp/build/pi-desk/release/.next/server/app/api/plugins/del/route.js +1 -1
  90. package/temp/build/pi-desk/release/.next/server/app/api/plugins/enabled-set/route.js +1 -1
  91. package/temp/build/pi-desk/release/.next/server/app/api/plugins/get/route.js +1 -1
  92. package/temp/build/pi-desk/release/.next/server/app/api/plugins/host-runtime/[runtimeVersion]/[...resourcePath]/route.js +1 -1
  93. package/temp/build/pi-desk/release/.next/server/app/api/plugins/list/route.js +1 -1
  94. package/temp/build/pi-desk/release/.next/server/app/api/plugins/reload/route.js +1 -1
  95. package/temp/build/pi-desk/release/.next/server/app/api/plugins/update/route.js +1 -1
  96. package/temp/build/pi-desk/release/.next/server/app/api/project-files/get/route.js +1 -1
  97. package/temp/build/pi-desk/release/.next/server/app/api/project-files/list/route.js +1 -1
  98. package/temp/build/pi-desk/release/.next/server/app/api/project-files/reveal/route.js +1 -1
  99. package/temp/build/pi-desk/release/.next/server/app/api/project-files/search/route.js +1 -1
  100. package/temp/build/pi-desk/release/.next/server/app/api/project-git/get/route.js +1 -1
  101. package/temp/build/pi-desk/release/.next/server/app/api/project-git-branches/list/route.js +1 -1
  102. package/temp/build/pi-desk/release/.next/server/app/api/project-git-changes/list/route.js +1 -1
  103. package/temp/build/pi-desk/release/.next/server/app/api/project-git-diff/get/route.js +1 -1
  104. package/temp/build/pi-desk/release/.next/server/app/api/project-git-heads/get/route.js +1 -1
  105. package/temp/build/pi-desk/release/.next/server/app/api/project-git-log/list/route.js +1 -1
  106. package/temp/build/pi-desk/release/.next/server/app/api/project-model-default/get/route.js +1 -1
  107. package/temp/build/pi-desk/release/.next/server/app/api/project-model-default/replace/route.js +1 -1
  108. package/temp/build/pi-desk/release/.next/server/app/api/skill-files/get/route.js +1 -1
  109. package/temp/build/pi-desk/release/.next/server/app/api/skill-files/list/route.js +1 -1
  110. package/temp/build/pi-desk/release/.next/server/app/api/skill-files/replace/route.js +1 -1
  111. package/temp/build/pi-desk/release/.next/server/app/api/skills/list/route.js +1 -1
  112. package/temp/build/pi-desk/release/.next/server/app/api/task-center/images/get/route.js +1 -1
  113. package/temp/build/pi-desk/release/.next/server/app/api/task-center/messages/get/route.js +1 -1
  114. package/temp/build/pi-desk/release/.next/server/app/api/work-session-git-branch/add/route.js +1 -1
  115. package/temp/build/pi-desk/release/.next/server/app/api/work-session-git-branch/replace/route.js +1 -1
  116. package/temp/build/pi-desk/release/.next/server/app/api/work-session-tree/get/route.js +1 -1
  117. package/temp/build/pi-desk/release/.next/server/app/api/work-session-tree-entry/get/route.js +1 -1
  118. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/add/route.js +1 -1
  119. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/branch/route.js +1 -1
  120. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/del/route.js +1 -1
  121. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/rename/route.js +1 -0
  122. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/rename/route_client-reference-manifest.js +1 -0
  123. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/replace/route.js +1 -1
  124. package/temp/build/pi-desk/release/.next/server/app/api/work-sessions/sort/route.js +1 -1
  125. package/temp/build/pi-desk/release/.next/server/app/favicon.ico/route.js +1 -1
  126. package/temp/build/pi-desk/release/.next/server/app/login/page.js +1 -1
  127. package/temp/build/pi-desk/release/.next/server/app/login/page_client-reference-manifest.js +1 -1
  128. package/temp/build/pi-desk/release/.next/server/app/page.js +80 -314
  129. package/temp/build/pi-desk/release/.next/server/app/page_client-reference-manifest.js +1 -1
  130. package/temp/build/pi-desk/release/.next/server/app-paths-manifest.json +1 -0
  131. package/temp/build/pi-desk/release/.next/server/chunks/23054.js +1 -1
  132. package/temp/build/pi-desk/release/.next/server/chunks/25406.js +8 -8
  133. package/temp/build/pi-desk/release/.next/server/chunks/33658.js +296 -0
  134. package/temp/build/pi-desk/release/.next/server/chunks/35985.js +5 -5
  135. package/temp/build/pi-desk/release/.next/server/chunks/48180.js +1 -1
  136. package/temp/build/pi-desk/release/.next/server/chunks/49900.js +2 -2
  137. package/temp/build/pi-desk/release/.next/server/chunks/6917.js +1 -1
  138. package/temp/build/pi-desk/release/.next/server/chunks/82499.js +3 -3
  139. package/temp/build/pi-desk/release/.next/server/chunks/92386.js +3 -3
  140. package/temp/build/pi-desk/release/.next/server/chunks/94296.js +2 -2
  141. package/temp/build/pi-desk/release/.next/server/middleware-build-manifest.js +1 -1
  142. package/temp/build/pi-desk/release/.next/server/middleware-react-loadable-manifest.js +1 -1
  143. package/temp/build/pi-desk/release/.next/server/pages/500.html +1 -1
  144. package/temp/build/pi-desk/release/.next/server/server-reference-manifest.json +1 -1
  145. package/temp/build/pi-desk/release/.next/static/YdOQ7klRBI5tJb5NpDVLW/_buildManifest.js +1 -0
  146. package/temp/build/pi-desk/release/.next/static/chunks/31087-ba426d09d6f68bfd.js +1 -0
  147. package/temp/build/pi-desk/release/.next/static/chunks/39654-b5fedd762ea0312e.js +238 -0
  148. package/temp/build/pi-desk/release/.next/static/chunks/49516-cc4dcd84d64ab4fe.js +81 -0
  149. package/temp/build/pi-desk/release/.next/static/chunks/75130-d2ca74894aff8085.js +13 -0
  150. package/temp/build/pi-desk/release/.next/static/chunks/app/_global-error/page-5137efe26947191b.js +1 -0
  151. package/temp/build/pi-desk/release/.next/static/chunks/app/_not-found/page-5137efe26947191b.js +1 -0
  152. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth/login/route-5137efe26947191b.js +1 -0
  153. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth/logout/route-5137efe26947191b.js +1 -0
  154. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth-settings/get/route-5137efe26947191b.js +1 -0
  155. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth-settings/replace/route-5137efe26947191b.js +1 -0
  156. package/temp/build/pi-desk/release/.next/static/chunks/app/api/capability-modes/get/route-5137efe26947191b.js +1 -0
  157. package/temp/build/pi-desk/release/.next/static/chunks/app/api/capability-modes/replace/route-5137efe26947191b.js +1 -0
  158. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/context/get/route-5137efe26947191b.js +1 -0
  159. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/images/get/route-5137efe26947191b.js +1 -0
  160. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/messages/get/route-5137efe26947191b.js +1 -0
  161. package/temp/build/pi-desk/release/.next/static/chunks/app/api/health/route-5137efe26947191b.js +1 -0
  162. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-check/get/route-5137efe26947191b.js +1 -0
  163. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/del/route-5137efe26947191b.js +1 -0
  164. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/get/route-5137efe26947191b.js +1 -0
  165. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/replace/route-5137efe26947191b.js +1 -0
  166. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-catalog/list/route-5137efe26947191b.js +1 -0
  167. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-settings/get/route-5137efe26947191b.js +1 -0
  168. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-settings/replace/route-5137efe26947191b.js +1 -0
  169. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directories/list/route-5137efe26947191b.js +1 -0
  170. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-entries/list/route-5137efe26947191b.js +1 -0
  171. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-ignores/list/route-5137efe26947191b.js +1 -0
  172. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-ignores/replace/route-5137efe26947191b.js +1 -0
  173. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/models/list/route-5137efe26947191b.js +1 -0
  174. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/session-user-messages/list/route-5137efe26947191b.js +1 -0
  175. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/sessions/list/route-5137efe26947191b.js +1 -0
  176. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/get/route-5137efe26947191b.js +1 -0
  177. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/search/route-5137efe26947191b.js +1 -0
  178. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/settings-get/route-5137efe26947191b.js +1 -0
  179. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/settings-replace/route-5137efe26947191b.js +1 -0
  180. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/add/route-5137efe26947191b.js +1 -0
  181. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/apply/route-5137efe26947191b.js +1 -0
  182. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/batch/route-5137efe26947191b.js +1 -0
  183. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/browser-resources/[resourceGroup]/[...resourcePath]/route-5137efe26947191b.js +1 -0
  184. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/del/route-5137efe26947191b.js +1 -0
  185. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/enabled-set/route-5137efe26947191b.js +1 -0
  186. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/get/route-5137efe26947191b.js +1 -0
  187. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/host-runtime/[runtimeVersion]/[...resourcePath]/route-5137efe26947191b.js +1 -0
  188. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/list/route-5137efe26947191b.js +1 -0
  189. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/reload/route-5137efe26947191b.js +1 -0
  190. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/update/route-5137efe26947191b.js +1 -0
  191. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/get/route-5137efe26947191b.js +1 -0
  192. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/list/route-5137efe26947191b.js +1 -0
  193. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/reveal/route-5137efe26947191b.js +1 -0
  194. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/search/route-5137efe26947191b.js +1 -0
  195. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git/get/route-5137efe26947191b.js +1 -0
  196. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-branches/list/route-5137efe26947191b.js +1 -0
  197. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-changes/list/route-5137efe26947191b.js +1 -0
  198. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-diff/get/route-5137efe26947191b.js +1 -0
  199. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-heads/get/route-5137efe26947191b.js +1 -0
  200. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-log/list/route-5137efe26947191b.js +1 -0
  201. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-model-default/get/route-5137efe26947191b.js +1 -0
  202. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-model-default/replace/route-5137efe26947191b.js +1 -0
  203. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/get/route-5137efe26947191b.js +1 -0
  204. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/list/route-5137efe26947191b.js +1 -0
  205. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/replace/route-5137efe26947191b.js +1 -0
  206. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skills/list/route-5137efe26947191b.js +1 -0
  207. package/temp/build/pi-desk/release/.next/static/chunks/app/api/task-center/images/get/route-5137efe26947191b.js +1 -0
  208. package/temp/build/pi-desk/release/.next/static/chunks/app/api/task-center/messages/get/route-5137efe26947191b.js +1 -0
  209. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-git-branch/add/route-5137efe26947191b.js +1 -0
  210. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-git-branch/replace/route-5137efe26947191b.js +1 -0
  211. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-tree/get/route-5137efe26947191b.js +1 -0
  212. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-tree-entry/get/route-5137efe26947191b.js +1 -0
  213. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/add/route-5137efe26947191b.js +1 -0
  214. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/branch/route-5137efe26947191b.js +1 -0
  215. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/del/route-5137efe26947191b.js +1 -0
  216. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/rename/route-5137efe26947191b.js +1 -0
  217. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/replace/route-5137efe26947191b.js +1 -0
  218. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/sort/route-5137efe26947191b.js +1 -0
  219. package/temp/build/pi-desk/release/.next/static/chunks/app/layout-358978b7cfe69a5f.js +3 -0
  220. package/temp/build/pi-desk/release/.next/static/chunks/app/login/page-84892b06243891f0.js +1 -0
  221. package/temp/build/pi-desk/release/.next/static/chunks/app/page-cc05e71bf51adb57.js +158 -0
  222. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/app-error-5137efe26947191b.js +1 -0
  223. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/forbidden-5137efe26947191b.js +1 -0
  224. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/unauthorized-5137efe26947191b.js +1 -0
  225. package/temp/build/pi-desk/release/.next/static/chunks/webpack-40a782fc8a3535b9.js +1 -0
  226. package/temp/build/pi-desk/release/.next/static/css/095a062e18f96657.css +1 -0
  227. package/temp/build/pi-desk/release/.next/static/css/{adb1d4e48dd43c0a.css → 949d0d1a99d5de92.css} +1 -1
  228. package/temp/build/pi-desk/release/.next/trace-build +1 -1
  229. package/src/client/l2_biz/workbench/hooks/l2-work-session-column-motion.ts +0 -87
  230. package/src/client/l3_modules/work-session-visual/l3-work-session-status-border.tsx +0 -66
  231. package/src/client/l4_foundation/ui/l4-power-saving.ts +0 -45
  232. package/src/client/l4_foundation/ui/l4-window-reveal.ts +0 -30
  233. package/temp/build/pi-desk/release/.next/server/chunks/56284.js +0 -62
  234. package/temp/build/pi-desk/release/.next/static/96geGVI-j_dC6I3k-XFCB/_buildManifest.js +0 -1
  235. package/temp/build/pi-desk/release/.next/static/chunks/31087-333cae396a52f232.js +0 -1
  236. package/temp/build/pi-desk/release/.next/static/chunks/45992-92d8b8b10fcfbb6b.js +0 -13
  237. package/temp/build/pi-desk/release/.next/static/chunks/47340-c1c09c77c1a88514.js +0 -318
  238. package/temp/build/pi-desk/release/.next/static/chunks/57208-d6d38167dabb91e4.js +0 -1
  239. package/temp/build/pi-desk/release/.next/static/chunks/app/_global-error/page-dde4fd973791f7f7.js +0 -1
  240. package/temp/build/pi-desk/release/.next/static/chunks/app/_not-found/page-dde4fd973791f7f7.js +0 -1
  241. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth/login/route-dde4fd973791f7f7.js +0 -1
  242. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth/logout/route-dde4fd973791f7f7.js +0 -1
  243. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth-settings/get/route-dde4fd973791f7f7.js +0 -1
  244. package/temp/build/pi-desk/release/.next/static/chunks/app/api/auth-settings/replace/route-dde4fd973791f7f7.js +0 -1
  245. package/temp/build/pi-desk/release/.next/static/chunks/app/api/capability-modes/get/route-dde4fd973791f7f7.js +0 -1
  246. package/temp/build/pi-desk/release/.next/static/chunks/app/api/capability-modes/replace/route-dde4fd973791f7f7.js +0 -1
  247. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/context/get/route-dde4fd973791f7f7.js +0 -1
  248. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/images/get/route-dde4fd973791f7f7.js +0 -1
  249. package/temp/build/pi-desk/release/.next/static/chunks/app/api/chat/messages/get/route-dde4fd973791f7f7.js +0 -1
  250. package/temp/build/pi-desk/release/.next/static/chunks/app/api/health/route-dde4fd973791f7f7.js +0 -1
  251. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-check/get/route-dde4fd973791f7f7.js +0 -1
  252. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/del/route-dde4fd973791f7f7.js +0 -1
  253. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/get/route-dde4fd973791f7f7.js +0 -1
  254. package/temp/build/pi-desk/release/.next/static/chunks/app/api/mcp-settings/replace/route-dde4fd973791f7f7.js +0 -1
  255. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-catalog/list/route-dde4fd973791f7f7.js +0 -1
  256. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-settings/get/route-dde4fd973791f7f7.js +0 -1
  257. package/temp/build/pi-desk/release/.next/static/chunks/app/api/model-settings/replace/route-dde4fd973791f7f7.js +0 -1
  258. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directories/list/route-dde4fd973791f7f7.js +0 -1
  259. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-entries/list/route-dde4fd973791f7f7.js +0 -1
  260. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-ignores/list/route-dde4fd973791f7f7.js +0 -1
  261. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/directory-ignores/replace/route-dde4fd973791f7f7.js +0 -1
  262. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/models/list/route-dde4fd973791f7f7.js +0 -1
  263. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/session-user-messages/list/route-dde4fd973791f7f7.js +0 -1
  264. package/temp/build/pi-desk/release/.next/static/chunks/app/api/pi/sessions/list/route-dde4fd973791f7f7.js +0 -1
  265. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/get/route-dde4fd973791f7f7.js +0 -1
  266. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/search/route-dde4fd973791f7f7.js +0 -1
  267. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/settings-get/route-dde4fd973791f7f7.js +0 -1
  268. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugin-catalog/settings-replace/route-dde4fd973791f7f7.js +0 -1
  269. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/add/route-dde4fd973791f7f7.js +0 -1
  270. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/apply/route-dde4fd973791f7f7.js +0 -1
  271. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/batch/route-dde4fd973791f7f7.js +0 -1
  272. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/browser-resources/[resourceGroup]/[...resourcePath]/route-dde4fd973791f7f7.js +0 -1
  273. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/del/route-dde4fd973791f7f7.js +0 -1
  274. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/enabled-set/route-dde4fd973791f7f7.js +0 -1
  275. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/get/route-dde4fd973791f7f7.js +0 -1
  276. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/host-runtime/[runtimeVersion]/[...resourcePath]/route-dde4fd973791f7f7.js +0 -1
  277. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/list/route-dde4fd973791f7f7.js +0 -1
  278. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/reload/route-dde4fd973791f7f7.js +0 -1
  279. package/temp/build/pi-desk/release/.next/static/chunks/app/api/plugins/update/route-dde4fd973791f7f7.js +0 -1
  280. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/get/route-dde4fd973791f7f7.js +0 -1
  281. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/list/route-dde4fd973791f7f7.js +0 -1
  282. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/reveal/route-dde4fd973791f7f7.js +0 -1
  283. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-files/search/route-dde4fd973791f7f7.js +0 -1
  284. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git/get/route-dde4fd973791f7f7.js +0 -1
  285. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-branches/list/route-dde4fd973791f7f7.js +0 -1
  286. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-changes/list/route-dde4fd973791f7f7.js +0 -1
  287. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-diff/get/route-dde4fd973791f7f7.js +0 -1
  288. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-heads/get/route-dde4fd973791f7f7.js +0 -1
  289. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-git-log/list/route-dde4fd973791f7f7.js +0 -1
  290. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-model-default/get/route-dde4fd973791f7f7.js +0 -1
  291. package/temp/build/pi-desk/release/.next/static/chunks/app/api/project-model-default/replace/route-dde4fd973791f7f7.js +0 -1
  292. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/get/route-dde4fd973791f7f7.js +0 -1
  293. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/list/route-dde4fd973791f7f7.js +0 -1
  294. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skill-files/replace/route-dde4fd973791f7f7.js +0 -1
  295. package/temp/build/pi-desk/release/.next/static/chunks/app/api/skills/list/route-dde4fd973791f7f7.js +0 -1
  296. package/temp/build/pi-desk/release/.next/static/chunks/app/api/task-center/images/get/route-dde4fd973791f7f7.js +0 -1
  297. package/temp/build/pi-desk/release/.next/static/chunks/app/api/task-center/messages/get/route-dde4fd973791f7f7.js +0 -1
  298. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-git-branch/add/route-dde4fd973791f7f7.js +0 -1
  299. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-git-branch/replace/route-dde4fd973791f7f7.js +0 -1
  300. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-tree/get/route-dde4fd973791f7f7.js +0 -1
  301. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-session-tree-entry/get/route-dde4fd973791f7f7.js +0 -1
  302. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/add/route-dde4fd973791f7f7.js +0 -1
  303. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/branch/route-dde4fd973791f7f7.js +0 -1
  304. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/del/route-dde4fd973791f7f7.js +0 -1
  305. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/replace/route-dde4fd973791f7f7.js +0 -1
  306. package/temp/build/pi-desk/release/.next/static/chunks/app/api/work-sessions/sort/route-dde4fd973791f7f7.js +0 -1
  307. package/temp/build/pi-desk/release/.next/static/chunks/app/layout-839162b6cfae8347.js +0 -3
  308. package/temp/build/pi-desk/release/.next/static/chunks/app/login/page-4532a3bbee48e219.js +0 -1
  309. package/temp/build/pi-desk/release/.next/static/chunks/app/page-4b6367cde5c04597.js +0 -158
  310. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/app-error-dde4fd973791f7f7.js +0 -1
  311. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/forbidden-dde4fd973791f7f7.js +0 -1
  312. package/temp/build/pi-desk/release/.next/static/chunks/next/dist/client/components/builtin/unauthorized-dde4fd973791f7f7.js +0 -1
  313. package/temp/build/pi-desk/release/.next/static/chunks/webpack-735430d61da52e9d.js +0 -1
  314. package/temp/build/pi-desk/release/.next/static/css/4a5dda7ff3a82c4a.css +0 -1
  315. /package/temp/build/pi-desk/release/.next/static/{96geGVI-j_dC6I3k-XFCB → YdOQ7klRBI5tJb5NpDVLW}/_ssgManifest.js +0 -0
@@ -11,7 +11,7 @@ ${a}</tr>
11
11
  `}tablecell(a){let b=this.parser.parseInline(a.tokens),c=a.header?"th":"td";return(a.align?`<${c} align="${a.align}">`:`<${c}>`)+b+`</${c}>
12
12
  `}strong({tokens:a}){return`<strong>${this.parser.parseInline(a)}</strong>`}em({tokens:a}){return`<em>${this.parser.parseInline(a)}</em>`}codespan({text:a}){return`<code>${a}</code>`}br(a){return"<br>"}del({tokens:a}){return`<del>${this.parser.parseInline(a)}</del>`}link({href:a,title:b,tokens:c}){let d=this.parser.parseInline(c),e=t(a);if(null===e)return d;let f='<a href="'+(a=e)+'"';return b&&(f+=' title="'+b+'"'),f+=">"+d+"</a>"}image({href:a,title:b,text:c}){let d=t(a);if(null===d)return c;a=d;let e=`<img src="${a}" alt="${c}"`;return b&&(e+=` title="${b}"`),e+=">"}text(a){return"tokens"in a&&a.tokens?this.parser.parseInline(a.tokens):a.text}}class ak{strong({text:a}){return a}em({text:a}){return a}codespan({text:a}){return a}del({text:a}){return a}html({text:a}){return a}text({text:a}){return a}link({text:a}){return""+a}image({text:a}){return""+a}br(){return""}}class al{options;renderer;textRenderer;constructor(a){this.options=a||j,this.options.renderer=this.options.renderer||new aj,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ak}static parse(a,b){return new al(b).parse(a)}static parseInline(a,b){return new al(b).parseInline(a)}parse(a,b=!0){let c="";for(let d=0;d<a.length;d++){let e=a[d];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[e.type]){let a=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==a||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(e.type)){c+=a||"";continue}}switch(e.type){case"space":c+=this.renderer.space(e);continue;case"hr":c+=this.renderer.hr(e);continue;case"heading":c+=this.renderer.heading(e);continue;case"code":c+=this.renderer.code(e);continue;case"table":c+=this.renderer.table(e);continue;case"blockquote":c+=this.renderer.blockquote(e);continue;case"list":c+=this.renderer.list(e);continue;case"html":c+=this.renderer.html(e);continue;case"paragraph":c+=this.renderer.paragraph(e);continue;case"text":{let f=e,g=this.renderer.text(f);for(;d+1<a.length&&"text"===a[d+1].type;)f=a[++d],g+="\n"+this.renderer.text(f);b?c+=this.renderer.paragraph({type:"paragraph",raw:g,text:g,tokens:[{type:"text",raw:g,text:g}]}):c+=g;continue}default:{let a='Token with "'+e.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw Error(a)}}}return c}parseInline(a,b){b=b||this.renderer;let c="";for(let d=0;d<a.length;d++){let e=a[d];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[e.type]){let a=this.options.extensions.renderers[e.type].call({parser:this},e);if(!1!==a||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(e.type)){c+=a||"";continue}}switch(e.type){case"escape":case"text":c+=b.text(e);break;case"html":c+=b.html(e);break;case"link":c+=b.link(e);break;case"image":c+=b.image(e);break;case"strong":c+=b.strong(e);break;case"em":c+=b.em(e);break;case"codespan":c+=b.codespan(e);break;case"br":c+=b.br(e);break;case"del":c+=b.del(e);break;default:{let a='Token with "'+e.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw Error(a)}}}return c}}class am{options;constructor(a){this.options=a||j}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(a){return a}postprocess(a){return a}processAllTokens(a){return a}}class an{defaults=i();options=this.setOptions;parse=this.parseMarkdown(ai.lex,al.parse);parseInline=this.parseMarkdown(ai.lexInline,al.parseInline);Parser=al;Renderer=aj;TextRenderer=ak;Lexer=ai;Tokenizer=y;Hooks=am;constructor(...a){this.use(...a)}walkTokens(a,b){let c=[];for(let d of a)switch(c=c.concat(b.call(this,d)),d.type){case"table":for(let a of d.header)c=c.concat(this.walkTokens(a.tokens,b));for(let a of d.rows)for(let d of a)c=c.concat(this.walkTokens(d.tokens,b));break;case"list":c=c.concat(this.walkTokens(d.items,b));break;default:{let a=d;this.defaults.extensions?.childTokens?.[a.type]?this.defaults.extensions.childTokens[a.type].forEach(d=>{let e=a[d].flat(1/0);c=c.concat(this.walkTokens(e,b))}):a.tokens&&(c=c.concat(this.walkTokens(a.tokens,b)))}}return c}use(...a){let b=this.defaults.extensions||{renderers:{},childTokens:{}};return a.forEach(a=>{let c={...a};if(c.async=this.defaults.async||c.async||!1,a.extensions&&(a.extensions.forEach(a=>{if(!a.name)throw Error("extension name required");if("renderer"in a){let c=b.renderers[a.name];c?b.renderers[a.name]=function(...b){let d=a.renderer.apply(this,b);return!1===d&&(d=c.apply(this,b)),d}:b.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||"block"!==a.level&&"inline"!==a.level)throw Error("extension level must be 'block' or 'inline'");let c=b[a.level];c?c.unshift(a.tokenizer):b[a.level]=[a.tokenizer],a.start&&("block"===a.level?b.startBlock?b.startBlock.push(a.start):b.startBlock=[a.start]:"inline"===a.level&&(b.startInline?b.startInline.push(a.start):b.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(b.childTokens[a.name]=a.childTokens)}),c.extensions=b),a.renderer){let b=this.defaults.renderer||new aj(this.defaults);for(let c in a.renderer){if(!(c in b))throw Error(`renderer '${c}' does not exist`);if(["options","parser"].includes(c))continue;let d=a.renderer[c],e=b[c];b[c]=(...a)=>{let c=d.apply(b,a);return!1===c&&(c=e.apply(b,a)),c||""}}c.renderer=b}if(a.tokenizer){let b=this.defaults.tokenizer||new y(this.defaults);for(let c in a.tokenizer){if(!(c in b))throw Error(`tokenizer '${c}' does not exist`);if(["options","rules","lexer"].includes(c))continue;let d=a.tokenizer[c],e=b[c];b[c]=(...a)=>{let c=d.apply(b,a);return!1===c&&(c=e.apply(b,a)),c}}c.tokenizer=b}if(a.hooks){let b=this.defaults.hooks||new am;for(let c in a.hooks){if(!(c in b))throw Error(`hook '${c}' does not exist`);if("options"===c)continue;let d=a.hooks[c],e=b[c];am.passThroughHooks.has(c)?b[c]=a=>{if(this.defaults.async)return Promise.resolve(d.call(b,a)).then(a=>e.call(b,a));let c=d.call(b,a);return e.call(b,c)}:b[c]=(...a)=>{let c=d.apply(b,a);return!1===c&&(c=e.apply(b,a)),c}}c.hooks=b}if(a.walkTokens){let b=this.defaults.walkTokens,d=a.walkTokens;c.walkTokens=function(a){let c=[];return c.push(d.call(this,a)),b&&(c=c.concat(b.call(this,a))),c}}this.defaults={...this.defaults,...c}}),this}setOptions(a){return this.defaults={...this.defaults,...a},this}lexer(a,b){return ai.lex(a,b??this.defaults)}parser(a,b){return al.parse(a,b??this.defaults)}parseMarkdown(a,b){return(c,d)=>{let e={...d},f={...this.defaults,...e},g=this.onError(!!f.silent,!!f.async);if(!0===this.defaults.async&&!1===e.async)return g(Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(null==c)return g(Error("marked(): input parameter is undefined or null"));if("string"!=typeof c)return g(Error("marked(): input parameter is of type "+Object.prototype.toString.call(c)+", string expected"));if(f.hooks&&(f.hooks.options=f),f.async)return Promise.resolve(f.hooks?f.hooks.preprocess(c):c).then(b=>a(b,f)).then(a=>f.hooks?f.hooks.processAllTokens(a):a).then(a=>f.walkTokens?Promise.all(this.walkTokens(a,f.walkTokens)).then(()=>a):a).then(a=>b(a,f)).then(a=>f.hooks?f.hooks.postprocess(a):a).catch(g);try{f.hooks&&(c=f.hooks.preprocess(c));let d=a(c,f);f.hooks&&(d=f.hooks.processAllTokens(d)),f.walkTokens&&this.walkTokens(d,f.walkTokens);let e=b(d,f);return f.hooks&&(e=f.hooks.postprocess(e)),e}catch(a){return g(a)}}}onError(a,b){return c=>{if(c.message+="\nPlease report this to https://github.com/markedjs/marked.",a){let a="<p>An error occurred:</p><pre>"+q(c.message+"",!0)+"</pre>";return b?Promise.resolve(a):a}if(b)return Promise.reject(c);throw c}}}let ao=new an;function ap(a,b){return ao.parse(a,b)}ap.options=ap.setOptions=function(a){return ao.setOptions(a),ap.defaults=ao.defaults,j=ap.defaults,ap},ap.getDefaults=i,ap.defaults=j,ap.use=function(...a){return ao.use(...a),ap.defaults=ao.defaults,j=ap.defaults,ap},ap.walkTokens=function(a,b){return ao.walkTokens(a,b)},ap.parseInline=ao.parseInline,ap.Parser=al,ap.parser=al.parse,ap.Renderer=aj,ap.TextRenderer=ak,ap.Lexer=ai,ap.lexer=ai.lex,ap.Tokenizer=y,ap.Hooks=am,ap.parse=ap,ap.options,ap.setOptions,ap.use,ap.walkTokens,ap.parseInline,al.parse;let aq=ai.lex;var ar=c(8253),as=c(77497),at=c(29943);c(30996);var au=c(50498),av=c(26529),aw=c(54957),ax=c(75082),ay=c(23975),az=c(62677),aA=c(46857),aB=c(34349);let aC=Object.freeze({image:({href:a,title:b,text:c})=>{let d=[],f=[];return a&&({href:a,dimensions:d}=(0,e.nI)(a),f.push(`src="${(0,e.oO)(a)}"`)),c&&f.push(`alt="${(0,e.oO)(c)}"`),b&&f.push(`title="${(0,e.oO)(b)}"`),d.length&&(f=f.concat(d)),"<img "+f.join(" ")+">"},paragraph({tokens:a}){return`<p>${this.parser.parseInline(a)}</p>`},link({href:a,title:b,tokens:c}){let d=this.parser.parseInline(c);if("string"!=typeof a)return"";a===d&&(d=(0,e._W)(d)),b="string"==typeof b?(0,e.oO)((0,e._W)(b)):"",a=(0,e._W)(a),!b&&a.startsWith(`${as.ny.file}:`)&&(b=function(a){try{let b=aw.r.parse(a);if(b.scheme===as.ny.file){let a=b.fsPath,c=b.fragment;return(0,e.oO)(c?`${a}#${c}`:a)}}catch{}return""}(a));let f=a.startsWith(`${as.ny.command}:`);a=a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;");let g=b||(f?"":a);return`<a href="${a}" title="${g}" draggable="false">${d}</a>`}});function aD(a,b={},c){var d,e,i,j,k;let l,m,n,o,p,q,r=new h.Cm,s=!1,t=new an(...b.markedExtensions??[]),{renderer:u,codeBlocks:v,syncCodeBlocks:w}=(d=t,e=b,i=a,(l=new d.Renderer(e.markedOptions)).image=aC.image,l.link=aC.link,l.paragraph=aC.paragraph,i.supportAlertSyntax&&(j=l.blockquote,l.blockquote=function(a){let{tokens:b}=a,c=b[0];if(c?.type!=="paragraph")return j.call(this,a);let d=c.tokens;if(!d||0===d.length)return j.call(this,a);let e=d[0];if(e?.type!=="text")return j.call(this,a);let f=/^\s*\[!(NOTE|TIP|IMPORTANT|WARNING|CAUTION)\]\s*?\n*/i,g=e.raw.match(f);if(!g)return j.call(this,a);e.raw=e.raw.replace(f,""),e.text=e.text.replace(f,"");let h=g[1],i=h.charAt(0).toUpperCase()+h.slice(1).toLowerCase(),k=h.toLowerCase(),l=(0,aB.s)({id:{note:"info",tip:"light-bulb",important:"comment",warning:"alert",caution:"stop"}[k]}).outerHTML,m=this.parser.parse(b);return`<blockquote data-severity="${k}"><p><span>${l}${i}</span>${m.substring(3)}</blockquote>
13
13
  `}),m=[],n=[],e.codeBlockRendererSync?l.code=({text:a,lang:b,raw:c})=>{let d=g.r.nextId(),f=e.codeBlockRendererSync(aG(b),a,c);return n.push([d,f]),`<div class="code" data-code="${d}">${(0,av.ih)(a)}</div>`}:e.codeBlockRenderer&&(l.code=({text:a,lang:b})=>{let c=g.r.nextId(),d=e.codeBlockRenderer(aG(b),a);return m.push(d.then(a=>[c,a])),`<div class="code" data-code="${c}">${(0,av.ih)(a)}</div>`}),i.supportHtml||(l.html=({text:a})=>e.sanitizerConfig?.replaceWithPlaintext?(0,av.ih)(a):(i.isTrusted?a.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?a:""),{renderer:l,codeBlocks:m,syncCodeBlocks:n}),x=((o=(k=a).value).length>1e5&&(o=`${o.substr(0,1e5)}…`),k.supportThemeIcons&&(o=(0,f.sA)(o)),o);if(b.fillInIncompleteTokens){let a={...t.defaults,...b.markedOptions,renderer:u},c=function(a){for(let b=0;b<3;b++){let b=function(a){let b,c;for(b=0;b<a.length;b++){let d=a[b];if("paragraph"===d.type&&d.raw.match(/(\n|^)\|/)){c=function(a){let b,c=aN(a),d=c.split("\n"),e=!1;for(let a=0;a<d.length;a++){let c=d[a].trim();if(void 0===b&&c.match(/^\s*\|/)){let a=c.match(/(\|[^\|]+)(?=\||$)/g);a&&(b=a.length)}else if("number"==typeof b)if(!c.match(/^\s*\|/))return;else{if(a!==d.length-1)return;e=!0}}if("number"==typeof b&&b>0){let a=e?d.slice(0,-1).join("\n"):c,f=!!a.match(/\|\s*$/);return aq(a+(f?"":"|")+`
14
- |${" --- |".repeat(b)}`)}}(a.slice(b));break}}let d=a.length-1;for(;d>=0&&("space"===a[d].type||"html"===a[d].type);)d--;let e=d>=0?a[d]:void 0,f=a.slice(d+1);if(!c&&e?.type==="list"){let a=function(a){let b,c=a.items[a.items.length-1],d=c.tokens?c.tokens[c.tokens.length-1]:void 0,e=a=>{let b=a.items.at(-1),c=b?.tokens.at(-1);return c?.type==="heading"||c?.type==="list"&&e(c)};if(d?.type!=="text"||"inRawBlock"in c){if(e(a)){let b=aq(a.raw.trim()+" &nbsp;")[0];if("list"!==b.type)return;return b}}else b=aO(d);if(!b||"paragraph"!==b.type)return;let f=aN(a.items.slice(0,-1)),g=c.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!g)return;let h=aq(f+(g+aN(c.tokens.slice(0,-1))+b.raw))[0];if("list"===h.type)return h}(e);a&&(c=[a,...f],b=d)}if(!c&&e?.type==="paragraph"){let a=aO(e);a&&(c=[a,...f],b=d)}if(c){let d=[...a.slice(0,b),...c];return d.links=a.links,d}let g=a.at(-1);if(g?.type==="heading"){let b=function(a,b){if(a.raw.match(/-\s*$/))return aq(b+" &nbsp;")}(g,aN(a));if(b)return b}return null}(a);if(b)a=b;else break}return a}(t.lexer(x,a));p=t.parser(c,a)}else p=t.parse(x,{...b?.markedOptions,renderer:u,async:!1});a.supportThemeIcons&&(p=(0,aB.n)(p).map(a=>"string"==typeof a?a:a.outerHTML).join(""));let y=document.createElement("div"),z=aK(a,b.sanitizerConfig??{});if((0,ay.D$)(y,p,z),function(a,b,c){for(let d of c.querySelectorAll("img, audio, video, source")){let c=d.getAttribute("src");if(c){let e=c;try{a.baseUri&&(e=aH(aw.r.from(a.baseUri),e))}catch(a){}if(d.setAttribute("src",aF(a,e,!0)),b.sanitizerConfig?.remoteImageIsAllowed){let a=aw.r.parse(e);a.scheme===as.ny.file||a.scheme===as.ny.data||b.sanitizerConfig.remoteImageIsAllowed(a)||d.replaceWith((0,ax.$)("",void 0,d.outerHTML))}}}for(let b of c.querySelectorAll("a")){let c=b.getAttribute("href");if(b.setAttribute("href",""),!c||/^data:|javascript:/i.test(c)||/^command:/i.test(c)&&!a.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(c))b.replaceWith(...b.childNodes);else{let d=aF(a,c,!1);a.baseUri&&(d=aH(aw.r.from(a.baseUri),c)),b.dataset.href=d}}}(a,b,y),c?(q=c,(0,ax.Ln)(c,...y.childNodes)):q=y,v.length>0)Promise.all(v).then(a=>{if(s)return;let c=new Map(a);for(let a of q.querySelectorAll("div[data-code]")){let b=c.get(a.dataset.code??"");b&&(0,ax.Ln)(a,b)}b.asyncRenderCallback?.()});else if(w.length>0){let a=new Map(w);for(let b of q.querySelectorAll("div[data-code]")){let c=a.get(b.dataset.code??"");c&&(0,ax.Ln)(b,c)}}if(b.asyncRenderCallback)for(let a of q.getElementsByTagName("img")){let c=r.add((0,ax.ko)(a,"load",()=>{c.dispose(),b.asyncRenderCallback()}))}if(b.actionHandler){let c=c=>{let d=new aA.P((0,ax.zk)(q),c);(d.leftButton||d.middleButton)&&aE(a,b,d)};r.add((0,ax.ko)(q,"click",c)),r.add((0,ax.ko)(q,"auxclick",c)),r.add((0,ax.ko)(q,"keydown",c=>{let d=new az.Z(c);(d.equals(10)||d.equals(3))&&aE(a,b,d)}))}for(let a of[...q.getElementsByTagName("input")])if(a.attributes.getNamedItem("type")?.value==="checkbox")a.setAttribute("disabled","");else if(b.sanitizerConfig?.replaceWithPlaintext){let b=(0,ay.cZ)(a);b?a.parentElement?.replaceChild(b,a):a.remove()}else a.remove();return{element:q,dispose:()=>{s=!0,r.dispose()}}}function aE(a,b,c){let e=c.target.closest("a[data-href]");if((0,ax.sb)(e))try{let c=e.dataset.href;c&&(a.baseUri&&(c=aH(aw.r.from(a.baseUri),c)),b.actionHandler?.(c,a))}catch(a){(0,d.dz)(a)}finally{c.preventDefault(),c.stopPropagation()}}function aF(a,b,c){let d=a.uris&&a.uris[b],e=aw.r.revive(d);return c?b.startsWith(as.ny.data+":")?b:(e||(e=aw.r.parse(b)),as.zl.uriToBrowserUri(e).toString(!0)):e&&aw.r.parse(b).toString()!==e.toString()?(e.query&&(e=e.with({query:function(a,b){let c;try{c=(0,ar.qg)(decodeURIComponent(b))}catch(a){}return c?encodeURIComponent(JSON.stringify(c=(0,at.PI)(c,b=>a.uris&&a.uris[b]?aw.r.revive(a.uris[b]):void 0))):b}(a,e.query)})),e.toString()):b}function aG(a){if(!a)return"";let b=a.split(/[\s+|:|,|\{|\?]/,1);return b.length?b[0]:a}function aH(a,b){return/^\w[\w\d+.-]*:/.test(b)?b:a.path.endsWith("/")?(0,au.o1)(a,b).toString():(0,au.o1)((0,au.pD)(a),b).toString()}let aI=Object.freeze([...ay.TT,"input"]),aJ=Object.freeze(["align","autoplay","alt","colspan","controls","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","target","title","type","width","start","checked","disabled","value","data-code","data-href","data-severity",{attributeName:"style",shouldKeep:(a,b)=>"SPAN"===a.tagName&&"style"===b.attrName&&/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(border-radius:[0-9]+px;)?$/.test(b.attrValue)},{attributeName:"class",shouldKeep:(a,b)=>"SPAN"===a.tagName&&"class"===b.attrName&&/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(b.attrValue)}]);function aK(a,b){let c=a.isTrusted??!1,d=[as.ny.http,as.ny.https,as.ny.mailto,as.ny.file,as.ny.vscodeFileResource,as.ny.vscodeRemote,as.ny.vscodeRemoteResource,as.ny.vscodeNotebookCell,as.ny.internal];return c&&d.push(as.ny.command),b.allowedLinkSchemes?.augment&&d.push(...b.allowedLinkSchemes.augment),{allowedTags:{override:b.allowedTags?.override??aI},allowedAttributes:{override:b.allowedAttributes?.override??aJ},allowedLinkProtocols:{override:d},allowRelativeLinkPaths:!!a.baseUri,allowedMediaProtocols:{override:[as.ny.http,as.ny.https,as.ny.data,as.ny.file,as.ny.vscodeFileResource,as.ny.vscodeRemote,as.ny.vscodeRemoteResource]},allowRelativeMediaPaths:!!a.baseUri,replaceWithPlaintext:b.replaceWithPlaintext}}function aL(a,b){let c;if("string"==typeof a)return a;let d=a.value??"";return d.length>1e5&&(d=`${d.substr(0,1e5)}…`),(function(a,b,c={}){let d=aK(b,c);return(0,ay.pn)(a,d)})(ap(d,{async:!1,renderer:((c=new aj).code=({text:a})=>(0,av.ih)(a),c.blockquote=({text:a})=>a+"\n",c.html=a=>"",c.heading=function({tokens:a}){return this.parser.parseInline(a)+"\n"},c.hr=()=>"",c.list=function({items:a}){return a.map(a=>this.listitem(a)).join("\n")+"\n"},c.listitem=({text:a})=>a+"\n",c.paragraph=function({tokens:a}){return this.parser.parseInline(a)+"\n"},c.table=function({header:a,rows:b}){return a.map(a=>this.tablecell(a)).join(" ")+"\n"+b.map(a=>a.map(a=>this.tablecell(a)).join(" ")).join("\n")+"\n"},c.tablerow=({text:a})=>a,c.tablecell=function({tokens:a}){return this.parser.parseInline(a)},c.strong=({text:a})=>a,c.em=({text:a})=>a,c.codespan=({text:a})=>a,c.br=a=>"\n",c.del=({text:a})=>a,c.image=a=>"",c.text=({text:a})=>a,c.link=({text:a})=>a,c)}),{isTrusted:!1},{}).toString().replace(/&(#\d+|[a-zA-Z]+);/g,a=>aM.get(a)??a).trim()}let aM=new Map([["&quot;",'"'],["&nbsp;"," "],["&amp;","&"],["&#39;","'"],["&lt;","<"],["&gt;",">"]]);function aN(a){let b="";return a.forEach(a=>{b+=a.raw}),b}function aO(a){if(a.tokens)for(let b=a.tokens.length-1;b>=0;b--){let c=a.tokens[b];if("text"===c.type){let d=c.raw.split("\n"),e=d[d.length-1];if(e.includes("`"))return aP(a,"`");if(e.includes("**"))return aP(a,"**");if(e.match(/\*\w/))return aP(a,"*");else if(e.match(/(^|\s)__\w/))return aP(a,"__");else if(e.match(/(^|\s)_\w/))return aP(a,"_");else if(e.match(/(^|\s)\[.*\]\(\w*/)||e.match(/^[^\[]*\]\([^\)]*$/)&&a.tokens.slice(0,b).some(a=>"text"===a.type&&a.raw.match(/\[[^\]]*$/))){let c=a.tokens.slice(b+1);if(c[0]?.type==="link"&&c[1]?.type==="text"&&c[1].raw.match(/^ *"[^"]*$/)||e.match(/^[^"]* +"[^"]*$/))return aP(a,'")',!1);return aP(a,")",!1)}else if(e.match(/(^|\s)\[\w*[^\]]*$/))return aP(a,"](https://microsoft.com)",!1)}}}function aP(a,b,c=!0){let d=aN(Array.isArray(a)?a:[a]);return aq((c?d.trimEnd():d)+b)[0]}},31622:(a,b,c)=>{"use strict";c.d(b,{G:()=>q,r:()=>v});var d=c(47322),e=c(61556),f=c(18216),g=c(51027);class h{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(a,b){a.selectNodeContents(b)}static _readClientRects(a,b,c,d,e){let f=this._createRange();try{return f.setStart(a,b),f.setEnd(c,d),f.getClientRects()}catch(a){return null}finally{this._detachRange(f,e)}}static _mergeAdjacentRanges(a){if(1===a.length)return a;a.sort(g.IO.compare);let b=[],c=0,d=a[0];for(let e=1,f=a.length;e<f;e++){let f=a[e];d.left+d.width+.9>=f.left?d.width=Math.max(d.width,f.left+f.width-d.left):(b[c++]=d,d=f)}return b[c++]=d,b}static _createHorizontalRangesFromClientRects(a,b,c){if(!a||0===a.length)return null;let d=[];for(let e=0,f=a.length;e<f;e++){let f=a[e];d[e]=new g.IO(Math.max(0,(f.left-b)/c),f.width/c)}return this._mergeAdjacentRanges(d)}static readHorizontalRanges(a,b,c,d,e,f){let g=a.children.length-1;if(0>g)return null;if((b=Math.min(g,Math.max(0,b)))===(d=Math.min(g,Math.max(0,d)))&&c===e&&0===c&&!a.children[b].firstChild){let c=a.children[b].getClientRects();return f.markDidDomLayout(),this._createHorizontalRangesFromClientRects(c,f.clientRectDeltaLeft,f.clientRectScale)}b!==d&&d>0&&0===e&&(d--,e=0x40000000);let h=a.children[b].firstChild,i=a.children[d].firstChild;if(h&&i||(!h&&0===c&&b>0&&(h=a.children[b-1].firstChild,c=0x40000000),!i&&0===e&&d>0&&(i=a.children[d-1].firstChild,e=0x40000000)),!h||!i)return null;c=Math.min(h.textContent.length,Math.max(0,c)),e=Math.min(i.textContent.length,Math.max(0,e));let j=this._readClientRects(h,c,i,e,f.endNode);return f.markDidDomLayout(),this._createHorizontalRangesFromClientRects(j,f.clientRectDeltaLeft,f.clientRectScale)}}var i=c(21762),j=c(32920),k=c(98030),l=c(21495),m=c(39482),n=c(94630);let o=!!f.ib||!f.j9&&!d.gm&&!d.nr,p=!0;class q{static{this.CLASS_NAME="view-line"}constructor(a,b){this._viewGpuContext=a,this._options=b,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(a){if(this._renderedViewLine)this._renderedViewLine.domNode=(0,e.Z)(a);else throw Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(a){this._isMaybeInvalid=!0,this._options=a}onSelectionChanged(){return(!!(0,k.Bb)(this._options.themeType)||this._renderedViewLine?.input.renderWhitespace===2)&&(this._isMaybeInvalid=!0,!0)}renderLine(a,b,c,d,e){if(this._options.useGpu&&this._viewGpuContext?.canRender(this._options,d,a))return this._renderedViewLine?.domNode?.domNode.remove(),this._renderedViewLine=null,!1;if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;let f=d.getViewLineRenderingData(a),g=this._options,h=i.d.filter(f.inlineDecorations,a,f.minColumn,f.maxColumn),s="off"===g.experimentalWhitespaceRendering?g.renderWhitespace:"none",t=!f.hasVariableFonts,v=null;if((0,k.Bb)(g.themeType)||"selection"===s)for(let b of d.selections){if(b.endLineNumber<a||b.startLineNumber>a)continue;let c=b.startLineNumber===a?b.startColumn:f.minColumn,d=b.endLineNumber===a?b.endColumn:f.maxColumn;c<d&&((0,k.Bb)(g.themeType)&&h.push(new i.d(c,d,"inline-selected-text",0)),"selection"===s&&(v||(v=[]),v.push(new m.L(c-1,d-1))))}let w=new j.zL(g.useMonospaceOptimizations,g.canUseHalfwidthRightwardsArrow,f.content,f.continuesWithWrappedLine,f.isBasicASCII,f.containsRTL,f.minColumn-1,f.tokens,h,f.tabSize,f.startVisibleColumn,g.spaceWidth,g.middotWidth,g.wsmiddotWidth,g.stopRenderingLineAfter,s,g.renderControlCharacters,g.fontLigatures!==l.Bc.OFF,v,f.textDirection,g.verticalScrollbarSize);if(this._renderedViewLine&&this._renderedViewLine.input.equals(w))return!1;e.appendString("<div "),f.textDirection===n.z4.RTL?e.appendString('dir="rtl" '):f.containsRTL&&e.appendString('dir="ltr" '),e.appendString('style="top:'),e.appendString(String(b)),e.appendString("px;height:"),e.appendString(String(c)),e.appendString("px;line-height:"),e.appendString(String(c)),f.textDirection===n.z4.RTL&&(e.appendString("px;padding-right:"),e.appendString(String(g.verticalScrollbarSize))),e.appendString('px;" class="'),e.appendString(q.CLASS_NAME),e.appendString('">');let x=(0,j.UW)(w,e);e.appendString("</div>");let y=null;return t&&p&&o&&f.isBasicASCII&&w.isLTR&&g.useMonospaceOptimizations&&0===x.containsForeignElements&&(y=new r(this._renderedViewLine?this._renderedViewLine.domNode:null,w,x.characterMapping)),y||(y=u(this._renderedViewLine?this._renderedViewLine.domNode:null,w,x.characterMapping,x.containsForeignElements)),this._renderedViewLine=y,!0}layoutLine(a,b,c){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(b),this._renderedViewLine.domNode.setHeight(c),this._renderedViewLine.domNode.setLineHeight(c))}isRenderedRTL(){return!!this._renderedViewLine&&this._renderedViewLine.input.textDirection===n.z4.RTL}getWidth(a){return this._renderedViewLine?this._renderedViewLine.getWidth(a):0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof r}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof r?this._renderedViewLine.monospaceAssumptionsAreValid():p}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof r&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(a,b,c,d){if(!this._renderedViewLine)return null;b=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,b)),c=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,c));let e=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==e&&b>e+1&&c>e+1)return new g.pj(!0,[new g.IO(this.getWidth(d),0)]);-1!==e&&b>e+1&&(b=e+1),-1!==e&&c>e+1&&(c=e+1);let f=this._renderedViewLine.getVisibleRangesForRange(a,b,c,d);return f&&f.length>0?new g.pj(!1,f):null}getColumnOfNodeOffset(a,b){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(a,b):1}resetCachedWidth(){this._renderedViewLine?.resetCachedWidth()}}class r{constructor(a,b,c){this._cachedWidth=-1,this.domNode=a,this.input=b;const d=Math.floor(b.lineContent.length/300);if(d>0){this._keyColumnPixelOffsetCache=new Float32Array(d);for(let a=0;a<d;a++)this._keyColumnPixelOffsetCache[a]=-1}else this._keyColumnPixelOffsetCache=null;this._characterMapping=c,this._charWidth=b.spaceWidth}getWidth(a){if(!this.domNode||this.input.lineContent.length<300){let a=this._characterMapping.getHorizontalOffset(this._characterMapping.length);return Math.round(this._charWidth*a)}return -1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,a?.markDidDomLayout()),this._cachedWidth}getWidthIsFast(){return this.input.lineContent.length<300||-1!==this._cachedWidth}resetCachedWidth(){this._cachedWidth=-1}monospaceAssumptionsAreValid(){return this.domNode?(this.input.lineContent.length<300&&Math.abs(this.getWidth(null)-this.domNode.domNode.firstChild.offsetWidth)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),p=!1),p):p}toSlowRenderedLine(){return u(this.domNode,this.input,this._characterMapping,0)}getVisibleRangesForRange(a,b,c,d){let e=this._getColumnPixelOffset(a,b,d),f=this._getColumnPixelOffset(a,c,d);return[new g.IO(e,f-e)]}_getColumnPixelOffset(a,b,c){if(b<=300){let a=this._characterMapping.getHorizontalOffset(b);return this._charWidth*a}let d=Math.floor((b-1)/300)-1,e=(d+1)*300+1,f=-1;if(this._keyColumnPixelOffsetCache&&-1===(f=this._keyColumnPixelOffsetCache[d])&&(f=this._actualReadPixelOffset(a,e,c),this._keyColumnPixelOffsetCache[d]=f),-1===f){let a=this._characterMapping.getHorizontalOffset(b);return this._charWidth*a}let g=this._characterMapping.getHorizontalOffset(e),h=this._characterMapping.getHorizontalOffset(b);return f+this._charWidth*(h-g)}_getReadingTarget(a){return a.domNode.firstChild}_actualReadPixelOffset(a,b,c){if(!this.domNode)return -1;let d=this._characterMapping.getDomPosition(b),e=h.readHorizontalRanges(this._getReadingTarget(this.domNode),d.partIndex,d.charIndex,d.partIndex,d.charIndex,c);return e&&0!==e.length?e[0].left:-1}getColumnOfNodeOffset(a,b){return v(this._characterMapping,a,b)}}class s{constructor(a,b,c,d){if(this.domNode=a,this.input=b,this._characterMapping=c,this._isWhitespaceOnly=/^\s*$/.test(b.lineContent),this._containsForeignElements=d,this._cachedWidth=-1,this._pixelOffsetCache=null,b.isLTR){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let a=0,b=this._characterMapping.length;a<=b;a++)this._pixelOffsetCache[a]=-1}}_getReadingTarget(a){return a.domNode.firstChild}getWidth(a){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,a?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return -1!==this._cachedWidth}resetCachedWidth(){if(this._cachedWidth=-1,null!==this._pixelOffsetCache)for(let a=0,b=this._pixelOffsetCache.length;a<b;a++)this._pixelOffsetCache[a]=-1}getVisibleRangesForRange(a,b,c,d){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){let e=this._readPixelOffset(this.domNode,a,b,d);if(-1===e)return null;let f=this._readPixelOffset(this.domNode,a,c,d);return -1===f?null:[new g.IO(e,f-e)]}return this._readVisibleRangesForRange(this.domNode,a,b,c,d)}_readVisibleRangesForRange(a,b,c,d,e){if(c!==d)return this._readRawVisibleRangesForRange(a,c,d,e);{let d=this._readPixelOffset(a,b,c,e);return -1===d?null:[new g.IO(d,0)]}}_readPixelOffset(a,b,c,d){if(this.input.isLTR&&0===this._characterMapping.length){if(0===this._containsForeignElements||2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth(d);let b=this._getReadingTarget(a);return b.firstChild?(d.markDidDomLayout(),b.firstChild.offsetWidth):0}if(null!==this._pixelOffsetCache){let e=this._pixelOffsetCache[c];if(-1!==e)return e;let f=this._actualReadPixelOffset(a,b,c,d);return this._pixelOffsetCache[c]=f,f}return this._actualReadPixelOffset(a,b,c,d)}_actualReadPixelOffset(a,b,c,d){if(0===this._characterMapping.length){let b=h.readHorizontalRanges(this._getReadingTarget(a),0,0,0,0,d);return b&&0!==b.length?b[0].left:-1}if(this.input.isLTR&&c===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth(d);let e=this._characterMapping.getDomPosition(c),f=h.readHorizontalRanges(this._getReadingTarget(a),e.partIndex,e.charIndex,e.partIndex,e.charIndex,d);if(!f||0===f.length)return -1;let g=f[0].left;if(this.input.isBasicASCII){let a=this._characterMapping.getHorizontalOffset(c),b=Math.round(this.input.spaceWidth*a);if(1>=Math.abs(b-g))return b}return g}_readRawVisibleRangesForRange(a,b,c,d){if(this.input.isLTR&&1===b&&c===this._characterMapping.length)return[new g.IO(0,this.getWidth(d))];let e=this._characterMapping.getDomPosition(b),f=this._characterMapping.getDomPosition(c);return h.readHorizontalRanges(this._getReadingTarget(a),e.partIndex,e.charIndex,f.partIndex,f.charIndex,d)}getColumnOfNodeOffset(a,b){return v(this._characterMapping,a,b)}}class t extends s{_readVisibleRangesForRange(a,b,c,d,e){let f=super._readVisibleRangesForRange(a,b,c,d,e);if(!f||0===f.length||c===d||1===c&&d===this._characterMapping.length)return f;if(this.input.isLTR){let c=this._readPixelOffset(a,b,d,e);if(-1!==c){let a=f[f.length-1];a.left<c&&(a.width=c-a.left)}}return f}}let u=d.Tc?function(a,b,c,d){return new t(a,b,c,d)}:function(a,b,c,d){return new s(a,b,c,d)};function v(a,b,c){let d=b.textContent.length,e=-1;for(;b;)b=b.previousSibling,e++;return a.getColumn(new j.wZ(e,c),d)}},32043:()=>{},32809:(a,b,c)=>{"use strict";c.d(b,{$_:()=>B,HT:()=>w,pU:()=>v});var d,e,f,g=c(70687),h=c(33040),i=c(5355),j=c(63060),k=c(95091),l=c(85214),m=c(54957),n=c(72816),o=c(52491),p=c(29498),q=c(76631);(e||(e={})).getDefinition=function(a,b){let c=a.defaults;for(;j.L.isThemeIcon(c);){let a=u.getIcon(c.id);if(!a)return;c=a.defaults}return c},(d=f||(f={})).toJSONObject=function(a){return{weight:a.weight,style:a.style,src:a.src.map(a=>({format:a.format,location:a.location.toString()}))}},d.fromJSONObject=function(a){let b=a=>(0,l.Kg)(a)?a:void 0;if(a&&Array.isArray(a.src)&&a.src.every(a=>(0,l.Kg)(a.format)&&(0,l.Kg)(a.location)))return{weight:b(a.weight),style:b(a.style),src:a.src.map(a=>({format:a.format,location:m.r.parse(a.location)}))}};let r=/^([\w_-]+)$/,s=(0,n.kg)(2093,"The font ID must only contain letters, numbers, underscores and dashes.");class t extends q.jG{constructor(){super(),this._onDidChange=this._register(new k.vl),this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,n.kg)(2094,"The id of the font to use. If not set, the font that is defined first is used."),pattern:r.source,patternErrorMessage:s},fontCharacter:{type:"string",description:(0,n.kg)(2095,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${j.L.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(a,b,c,d){let e=this.iconsById[a];if(e){if(c&&!e.description){e.description=c,this.iconSchema.properties[a].markdownDescription=`${c} $(${a})`;let b=this.iconReferenceSchema.enum.indexOf(a);-1!==b&&(this.iconReferenceSchema.enumDescriptions[b]=c),this._onDidChange.fire()}return e}this.iconsById[a]={id:a,description:c,defaults:b,deprecationMessage:d};let f={$ref:"#/definitions/icons"};return d&&(f.deprecationMessage=d),c&&(f.markdownDescription=`${c}: $(${a})`),this.iconSchema.properties[a]=f,this.iconReferenceSchema.enum.push(a),this.iconReferenceSchema.enumDescriptions.push(c||""),this._onDidChange.fire(),{id:a}}getIcons(){return Object.keys(this.iconsById).map(a=>this.iconsById[a])}getIcon(a){return this.iconsById[a]}getIconSchema(){return this.iconSchema}toString(){let a=(a,b)=>a.id.localeCompare(b.id),b=a=>{for(;j.L.isThemeIcon(a.defaults);)a=this.iconsById[a.defaults.id];return`codicon codicon-${a?a.id:""}`},c=[];c.push("| preview | identifier | default codicon ID | description"),c.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");let d=Object.keys(this.iconsById).map(a=>this.iconsById[a]);for(let e of d.filter(a=>!!a.description).sort(a))c.push(`|<i class="${b(e)}"></i>|${e.id}|${j.L.isThemeIcon(e.defaults)?e.defaults.id:e.id}|${e.description||""}|`);for(let e of(c.push("| preview | identifier "),c.push("| ----------- | --------------------------------- |"),d.filter(a=>!j.L.isThemeIcon(a.defaults)).sort(a)))c.push(`|<i class="${b(e)}"></i>|${e.id}|`);return c.join("\n")}}let u=new t;function v(a,b,c,d){return u.registerIcon(a,b,c,d)}function w(){return u}p.O.add("base.contributions.icons",u);let x=(0,i.J)();for(let a in x){let b="\\"+x[a].toString(16);u.registerIcon(a,{fontCharacter:b})}let y="vscode://schemas/icons",z=p.O.as(o.F.JSONContribution);z.registerSchema(y,u.getIconSchema());let A=new g.uC(()=>z.notifySchemaChanged(y),200);u.onDidChange(()=>{A.isScheduled()||A.schedule()});let B=v("widget-close",h.W.close,(0,n.kg)(2096,"Icon for the close action in widgets."));v("goto-previous-location",h.W.arrowUp,(0,n.kg)(2097,"Icon for goto previous editor location.")),v("goto-next-location",h.W.arrowDown,(0,n.kg)(2098,"Icon for goto next editor location.")),j.L.modify(h.W.sync,"spin"),j.L.modify(h.W.loading,"spin")},32920:(a,b,c)=>{"use strict";c.d(b,{wZ:()=>k,zL:()=>j,yf:()=>m,UW:()=>n,Md:()=>p});var d=c(72816),e=c(26529),f=c(50411),g=c(21762);class h{constructor(a,b,c,d){this.endIndex=a,this.type=b,this.metadata=c,this.containsRTL=d,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}var i=c(94630);class j{get isLTR(){return!this.containsRTL&&this.textDirection!==i.z4.RTL}constructor(a,b,c,d,e,f,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w=!1){this.useMonospaceOptimizations=a,this.canUseHalfwidthRightwardsArrow=b,this.lineContent=c,this.continuesWithWrappedLine=d,this.isBasicASCII=e,this.containsRTL=f,this.fauxIndentLength=h,this.lineTokens=i,this.lineDecorations=j.sort(g.d.compare),this.tabSize=k,this.startVisibleColumn=l,this.spaceWidth=m,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===q?4:"boundary"===q?1:"selection"===q?2:3*("trailing"===q),this.renderControlCharacters=r,this.fontLigatures=s,this.selectionsOnLine=t&&t.sort((a,b)=>a.start<b.start?-1:1),this.renderNewLineWhenEmpty=w,this.textDirection=u,this.verticalScrollbarSize=v,Math.abs(o-m)<Math.abs(n-m)?(this.renderSpaceWidth=o,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=n,this.renderSpaceCharCode=183)}sameSelection(a){if(null===this.selectionsOnLine)return null===a;if(null===a||a.length!==this.selectionsOnLine.length)return!1;for(let b=0;b<this.selectionsOnLine.length;b++)if(!this.selectionsOnLine[b].equals(a[b]))return!1;return!0}equals(a){return this.useMonospaceOptimizations===a.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===a.canUseHalfwidthRightwardsArrow&&this.lineContent===a.lineContent&&this.continuesWithWrappedLine===a.continuesWithWrappedLine&&this.isBasicASCII===a.isBasicASCII&&this.containsRTL===a.containsRTL&&this.fauxIndentLength===a.fauxIndentLength&&this.tabSize===a.tabSize&&this.startVisibleColumn===a.startVisibleColumn&&this.spaceWidth===a.spaceWidth&&this.renderSpaceWidth===a.renderSpaceWidth&&this.renderSpaceCharCode===a.renderSpaceCharCode&&this.stopRenderingLineAfter===a.stopRenderingLineAfter&&this.renderWhitespace===a.renderWhitespace&&this.renderControlCharacters===a.renderControlCharacters&&this.fontLigatures===a.fontLigatures&&g.d.equalsArr(this.lineDecorations,a.lineDecorations)&&this.lineTokens.equals(a.lineTokens)&&this.sameSelection(a.selectionsOnLine)&&this.textDirection===a.textDirection&&this.verticalScrollbarSize===a.verticalScrollbarSize&&this.renderNewLineWhenEmpty===a.renderNewLineWhenEmpty}}class k{constructor(a,b){this.partIndex=a,this.charIndex=b}}class l{static getPartIndex(a){return(0xffff0000&a)>>>16}static getCharIndex(a){return(65535&a)>>>0}constructor(a,b){this.length=a,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(a,b,c,d){this._data[a-1]=(c|b<<16)>>>0,this._horizontalOffset[a-1]=d}getHorizontalOffset(a){return 0===this._horizontalOffset.length?0:this._horizontalOffset[a-1]}charOffsetToPartData(a){return 0===this.length?0:a<0?this._data[0]:a>=this.length?this._data[this.length-1]:this._data[a]}getDomPosition(a){let b=this.charOffsetToPartData(a-1);return new k(l.getPartIndex(b),l.getCharIndex(b))}getColumn(a,b){return this.partDataToCharOffset(a.partIndex,b,a.charIndex)+1}partDataToCharOffset(a,b,c){let d;if(0===this.length)return 0;let e=(c|a<<16)>>>0,f=0,g=this.length-1;for(;f+1<g;){let a=f+g>>>1,b=this._data[a];if(b===e)return a;b>e?g=a:f=a}if(f===g)return f;let h=this._data[f],i=this._data[g];if(h===e)return f;if(i===e)return g;let j=l.getPartIndex(h),k=l.getCharIndex(h);return d=j!==l.getPartIndex(i)?b:l.getCharIndex(i),c-k<=d-c?f:g}}class m{constructor(a,b){this._renderLineOutputBrand=void 0,this.characterMapping=a,this.containsForeignElements=b}}function n(a,b){if(0===a.lineContent.length){if(a.lineDecorations.length>0){b.appendString("<span>");let c=0,d=0,e=0;for(let f of a.lineDecorations)(1===f.type||2===f.type)&&(b.appendString('<span class="'),b.appendString(f.className),b.appendString('"></span>'),1===f.type&&(e|=1,c++),2===f.type&&(e|=2,d++));b.appendString("</span>");let f=new l(1,c+d);return f.setColumnInfo(1,c,0,0),new m(f,e)}return a.renderNewLineWhenEmpty?b.appendString("<span><span>\n</span></span>"):b.appendString("<span><span></span></span>"),new m(new l(0,0),0)}return function(a,b){var c;let f=a.fontIsMonospace,g=a.canUseHalfwidthRightwardsArrow,h=a.containsForeignElements,i=a.lineContent,j=a.len,k=a.isOverflowing,n=a.overflowingCharCount,o=a.parts,p=a.fauxIndentLength,q=a.tabSize,s=a.startVisibleColumn,t=a.spaceWidth,u=a.renderSpaceCharCode,v=a.renderWhitespace,w=a.renderControlCharacters,x=new l(j+1,o.length),y=!1,z=0,A=s,B=0,C=0,D=0;b.appendString("<span>");for(let a=0,c=o.length;a<c;a++){let c=o[a],d=c.endIndex,k=c.type,l=c.containsRTL,m=0!==v&&c.isWhitespace(),n=m&&!f&&("mtkw"===k||!h),s=z===d&&c.isPseudoAfter();if(B=0,b.appendString("<span "),l&&b.appendString('style="unicode-bidi:isolate" '),b.appendString('class="'),b.appendString(n?"mtkz":k),b.appendASCIICharCode(34),m){let c=0;{let a=z,b=A;for(;a<d;a++){let d=(9===i.charCodeAt(a)?q-b%q:1)|0;c+=d,a>=p&&(b+=d)}}for(n&&(b.appendString(' style="width:'),b.appendString(String(t*c)),b.appendString('px"')),b.appendASCIICharCode(62);z<d;z++){let c,d;if(x.setColumnInfo(z+1,a-D,B,C),D=0,9===i.charCodeAt(z)){d=c=q-A%q|0,!g||d>1?b.appendCharCode(8594):b.appendCharCode(65515);for(let a=2;a<=d;a++)b.appendCharCode(160)}else c=2,d=1,b.appendCharCode(u),b.appendCharCode(8204);B+=c,C+=d,z>=p&&(A+=d)}}else for(b.appendASCIICharCode(62);z<d;z++){x.setColumnInfo(z+1,a-D,B,C),D=0;let c=i.charCodeAt(z),d=1,f=1;switch(c){case 9:f=d=q-A%q;for(let a=1;a<=d;a++)b.appendCharCode(160);break;case 32:b.appendCharCode(160);break;case 60:b.appendString("&lt;");break;case 62:b.appendString("&gt;");break;case 38:b.appendString("&amp;");break;case 0:w?b.appendCharCode(9216):b.appendString("&#00;");break;case 65279:case 8232:case 8233:case 133:b.appendCharCode(65533);break;default:(0,e.ne)(c)&&f++,w&&c<32?b.appendCharCode(9216+c):w&&127===c?b.appendCharCode(9249):w&&r(c)?(b.appendString("[U+"),b.appendString(c.toString(16).toUpperCase().padStart(4,"0")),b.appendString("]"),f=d=8):b.appendCharCode(c)}B+=d,C+=f,z>=p&&(A+=f)}s?D++:D=0,z>=j&&!y&&c.isPseudoAfter()&&(y=!0,x.setColumnInfo(z+1,a,B,C)),b.appendString("</span>")}return y||x.setColumnInfo(j+1,o.length-1,B,C),k&&(b.appendString('<span class="mtkoverflow">'),b.appendString((0,d.kg)(832,"Show more ({0})",(c=n)<1024?(0,d.kg)(833,"{0} chars",c):c<1048576?`${(c/1024).toFixed(1)} KB`:`${(c/1024/1024).toFixed(1)} MB`)),b.appendString("</span>")),b.appendString("</span>"),new m(x,h)}(function(a){let b,c,d,f=a.lineContent;-1!==a.stopRenderingLineAfter&&a.stopRenderingLineAfter<f.length?(b=!0,c=f.length-a.stopRenderingLineAfter,d=a.stopRenderingLineAfter):(b=!1,c=0,d=f.length);let i=function(a,b,c,d,f){let g=[],i=0;d>0&&(g[i++]=new h(d,"",0,!1));let j=d;for(let k=0,l=c.getCount();k<l;k++){let l=c.getEndOffset(k);if(l<=d)continue;let m=c.getClassName(k);if(l>=f){let c=!!b&&(0,e.E_)(a.substring(j,f));g[i++]=new h(f,m,0,c);break}let n=!!b&&(0,e.E_)(a.substring(j,l));g[i++]=new h(l,m,0,n),j=l}return g}(f,a.containsRTL,a.lineTokens,a.fauxIndentLength,d);a.renderControlCharacters&&!a.isBasicASCII&&(i=function(a,b){let c=[],d=new h(0,"",0,!1),e=0;for(let f of b){let b=f.endIndex;for(;e<b;e++)r(a.charCodeAt(e))&&(e>d.endIndex&&(d=new h(e,f.type,f.metadata,f.containsRTL),c.push(d)),d=new h(e+1,"mtkcontrol",f.metadata,!1),c.push(d));e>d.endIndex&&(d=new h(b,f.type,f.metadata,f.containsRTL),c.push(d))}return c}(f,i)),(4===a.renderWhitespace||1===a.renderWhitespace||2===a.renderWhitespace&&a.selectionsOnLine||3===a.renderWhitespace&&!a.continuesWithWrappedLine)&&(i=function(a,b,c,d){let f,g=a.continuesWithWrappedLine,i=a.fauxIndentLength,j=a.tabSize,k=a.startVisibleColumn,l=a.useMonospaceOptimizations,m=a.selectionsOnLine,n=1===a.renderWhitespace,o=3===a.renderWhitespace,p=a.renderSpaceWidth!==a.spaceWidth,q=[],r=0,s=0,t=d[0].type,u=d[s].containsRTL,v=d[s].endIndex,w=d.length,x=!1,y=(0,e.HG)(b);-1===y?(x=!0,y=c,f=c):f=(0,e.lT)(b);let z=!1,A=0,B=m&&m[A],C=k%j;for(let a=i;a<c;a++){let g,k=b.charCodeAt(a);if(B&&B.endExclusive<=a&&(A++,B=m&&m[A]),a<y||a>f)g=!0;else if(9===k)g=!0;else if(32===k)if(n)if(z)g=!0;else{let d=a+1<c?b.charCodeAt(a+1):0;g=32===d||9===d}else g=!0;else g=!1;if(g&&m&&(g=!!B&&B.start<=a&&a<B.endExclusive),g&&o&&(g=x||a>f),g&&u&&a>=y&&a<=f&&(g=!1),z){if(!g||!l&&C>=j){if(p){let b=r>0?q[r-1].endIndex:i;for(let c=b+1;c<=a;c++)q[r++]=new h(c,"mtkw",1,!1)}else q[r++]=new h(a,"mtkw",1,!1);C%=j}}else(a===v||g&&a>i)&&(q[r++]=new h(a,t,0,u),C%=j);for(9===k?C=j:(0,e.ne)(k)?C+=2:C++,z=g;a===v;)if(++s<w)t=d[s].type,u=d[s].containsRTL,v=d[s].endIndex;else break}let D=!1;if(z)if(g&&n){let a=c>0?b.charCodeAt(c-1):0,d=c>1?b.charCodeAt(c-2):0;(32!==a||32===d||9===d)&&(D=!0)}else D=!0;if(D)if(p){let a=r>0?q[r-1].endIndex:i;for(let b=a+1;b<=c;b++)q[r++]=new h(b,"mtkw",1,!1)}else q[r++]=new h(c,"mtkw",1,!1);else q[r++]=new h(c,t,0,u);return q}(a,f,d,i));let j=0;if(a.lineDecorations.length>0){for(let b=0,c=a.lineDecorations.length;b<c;b++){let c=a.lineDecorations[b];3===c.type||1===c.type?j|=1:2===c.type&&(j|=2)}i=function(a,b,c){c.sort(g.d.compare);let d=g.Bs.normalize(a,c),e=d.length,f=0,i=[],j=0,k=0;for(let a=0,c=b.length;a<c;a++){let c=b[a],g=c.endIndex,l=c.type,m=c.metadata,n=c.containsRTL;for(;f<e&&d[f].startOffset<g;){let a=d[f];if(a.startOffset>k&&(k=a.startOffset,i[j++]=new h(k,l,m,n)),a.endOffset+1<=g)k=a.endOffset+1,i[j++]=new h(k,l+" "+a.className,m|a.metadata,n),f++;else{k=g,i[j++]=new h(k,l+" "+a.className,m|a.metadata,n);break}}g>k&&(k=g,i[j++]=new h(k,l,m,n))}let l=b[b.length-1].endIndex;if(f<e&&d[f].startOffset===l)for(;f<e&&d[f].startOffset===l;){let a=d[f];i[j++]=new h(k,a.className,a.metadata,!1),f++}return i}(f,i,a.lineDecorations)}return i=a.containsRTL?function(a,b){if(0===b.length)return b;let c=b[0];if(!c.containsRTL)return b;let d=c.endIndex,e=0;for(let b=0;b<d;b++){let c=a.charCodeAt(b);if(32!==c&&9!==c){e=b;break}}if(0===e)return b;let f=[];f.push(new h(e,c.type,c.metadata,!1)),f.push(new h(d,c.type,c.metadata,c.containsRTL));for(let a=1;a<b.length;a++)f.push(b[a]);return f}(f,i):function(a,b,c){let d=0,e=[],f=0;if(c)for(let c=0,g=b.length;c<g;c++){let g=b[c],i=g.endIndex;if(d+50<i){let b=g.type,c=g.metadata,j=g.containsRTL,k=-1,l=d;for(let g=d;g<i;g++)32===a.charCodeAt(g)&&(k=g),-1!==k&&g-l>=50&&(e[f++]=new h(k+1,b,c,j),l=k+1,k=-1);l!==i&&(e[f++]=new h(i,b,c,j))}else e[f++]=g;d=i}else for(let a=0,c=b.length;a<c;a++){let c=b[a],g=c.endIndex,i=g-d;if(i>50){let a=c.type,b=c.metadata,j=c.containsRTL,k=Math.ceil(i/50);for(let c=1;c<k;c++){let g=d+50*c;e[f++]=new h(g,a,b,j)}e[f++]=new h(g,a,b,j)}else e[f++]=c;d=g}return e}(f,i,!a.isBasicASCII||a.fontLigatures),new q(a.useMonospaceOptimizations,a.canUseHalfwidthRightwardsArrow,f,d,b,c,i,j,a.fauxIndentLength,a.tabSize,a.startVisibleColumn,a.spaceWidth,a.renderSpaceCharCode,a.renderWhitespace,a.renderControlCharacters)}(a),b)}class o{constructor(a,b,c){this.characterMapping=a,this.html=b,this.containsForeignElements=c}}function p(a){let b=new f.fe(1e4),c=n(a,b);return new o(c.characterMapping,b.build(),c.containsForeignElements)}class q{constructor(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){this.fontIsMonospace=a,this.canUseHalfwidthRightwardsArrow=b,this.lineContent=c,this.len=d,this.isOverflowing=e,this.overflowingCharCount=f,this.parts=g,this.containsForeignElements=h,this.fauxIndentLength=i,this.tabSize=j,this.startVisibleColumn=k,this.spaceWidth=l,this.renderSpaceCharCode=m,this.renderWhitespace=n,this.renderControlCharacters=o}}function r(a){return a<32?9!==a:127===a||!!(a>=8234)&&!!(a<=8238)||!!(a>=8294)&&!!(a<=8297)||!!(a>=8206)&&!!(a<=8207)||1564===a}},33402:(a,b,c)=>{"use strict";c.d(b,{uB:()=>q,ks:()=>u,qO:()=>w,DX:()=>t,dS:()=>e,fE:()=>r,PF:()=>v,ih:()=>F,tc:()=>G,aU:()=>E,Fl:()=>y,E_:()=>x,HW:()=>B,xX:()=>A,gW:()=>z});var d,e,f=c(72816);c(54957);var g=c(13352);c(99817),c(40981);var h=c(95606),i=c(80926),j=c(99187);c(58254);var k=c(99998),l=c(29498),m=c(45186);c(85214);var n=c(37788),o=c(75082);class p{static{this.REGISTERED_COMMANDS=new Set}static getRegisteredCommands(){return[...p.REGISTERED_COMMANDS]}static registerCommand(a){p.REGISTERED_COMMANDS.add(a)}}class q{constructor(a){this.id=a.id,this.precondition=a.precondition,this._kbOpts=a.kbOpts,this._menuOpts=a.menuOpts,this.metadata=a.metadata,this.canTriggerInlineEdits=a.canTriggerInlineEdits}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts)for(let a of Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts]){let b=a.kbExpr;this.precondition&&(b=b?j.M$.and(b,this.precondition):this.precondition);let c={id:this.id,weight:a.weight,args:a.args,when:b,primary:a.primary,secondary:a.secondary,win:a.win,linux:a.linux,mac:a.mac};k.f.registerKeybindingRule(c)}i.w.registerCommand({id:this.id,handler:(a,b)=>this.runCommand(a,b),metadata:this.metadata}),this.canTriggerInlineEdits&&p.registerCommand(this.id)}_registerMenuItem(a){h.ZG.appendMenuItem(a.menuId,{group:a.group,command:{id:this.id,title:a.title,icon:a.icon,precondition:this.precondition},when:a.when,order:a.order})}}class r extends q{constructor(){super(...arguments),this._implementations=[]}addImplementation(a,b,c,d){return this._implementations.push({priority:a,name:b,implementation:c,when:d}),this._implementations.sort((a,b)=>b.priority-a.priority),{dispose:()=>{for(let a=0;a<this._implementations.length;a++)if(this._implementations[a].implementation===c)return void this._implementations.splice(a,1)}}}runCommand(a,b){let c=a.get(n.rr),d=a.get(j.fN);for(let e of(c.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`),this._implementations)){if(e.when){let a=d.getContext((0,o.bq)());if(!e.when.evaluate(a))continue}let f=e.implementation(a,b);if(f){if(c.trace(`Command '${this.id}' was handled by '${e.name}'.`),"boolean"==typeof f)return;return f}}c.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class s extends q{constructor(a,b){super(b),this.command=a}runCommand(a,b){return this.command.runCommand(a,b)}}class t extends q{static bindToContribution(a){return class extends t{constructor(a){super(a),this._callback=a.handler}runEditorCommand(b,c,d){let e=a(c);e&&this._callback(e,d)}}}static runEditorCommand(a,b,c,d){let e=a.get(g.T),f=e.getFocusedCodeEditor()||e.getActiveCodeEditor();if(f)return f.invokeWithinContext(a=>{if(a.get(j.fN).contextMatchesRules(c??void 0))return d(a,f,b)})}runCommand(a,b){return t.runEditorCommand(a,b,this.precondition,(a,b,c)=>this.runEditorCommand(a,b,c))}}class u extends t{static convertOptions(a){let b;function c(b){return b.menuId||(b.menuId=h.D8.EditorContext),b.title||(b.title="string"==typeof a.label?a.label:a.label.value),b.when=j.M$.and(a.precondition,b.when),b}return b=Array.isArray(a.menuOpts)?a.menuOpts:a.menuOpts?[a.menuOpts]:[],Array.isArray(a.contextMenuOpts)?b.push(...a.contextMenuOpts.map(c)):a.contextMenuOpts&&b.push(c(a.contextMenuOpts)),a.menuOpts=b,a}constructor(a){super(u.convertOptions(a)),"string"==typeof a.label?(this.label=a.label,this.alias=a.alias??a.label):(this.label=a.label.value,this.alias=a.alias??a.label.original)}runEditorCommand(a,b,c){return this.reportTelemetry(a,b),this.run(a,b,c||{})}reportTelemetry(a,b){a.get(m.k).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class v extends u{constructor(){super(...arguments),this._implementations=[]}addImplementation(a,b){return this._implementations.push([a,b]),this._implementations.sort((a,b)=>b[0]-a[0]),{dispose:()=>{for(let a=0;a<this._implementations.length;a++)if(this._implementations[a][1]===b)return void this._implementations.splice(a,1)}}}run(a,b,c){for(let d of this._implementations){let e=d[1](a,b,c);if(e){if("boolean"==typeof e)return;return e}}}}class w extends h.L{run(a,...b){let c=a.get(g.T),d=c.getFocusedCodeEditor()||c.getActiveCodeEditor();if(d)return d.invokeWithinContext(a=>{let c=a.get(j.fN),e=a.get(n.rr);return c.contextMatchesRules(this.desc.precondition??void 0)?this.runEditorCommand(a,d,...b):void e.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize())})}}function x(a){return C.INSTANCE.registerEditorCommand(a),a}function y(a){let b=new a;return C.INSTANCE.registerEditorAction(b),b}function z(a){return C.INSTANCE.registerEditorAction(a),a}function A(a){C.INSTANCE.registerEditorAction(a)}function B(a,b,c){C.INSTANCE.registerEditorContribution(a,b,c)}(d=e||(e={})).getEditorCommand=function(a){return C.INSTANCE.getEditorCommand(a)},d.getEditorActions=function(){return C.INSTANCE.getEditorActions()},d.getEditorContributions=function(){return C.INSTANCE.getEditorContributions()},d.getSomeEditorContributions=function(a){return C.INSTANCE.getEditorContributions().filter(b=>a.indexOf(b.id)>=0)},d.getDiffEditorContributions=function(){return C.INSTANCE.getDiffEditorContributions()};class C{static{this.INSTANCE=new C}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(a,b,c){this.editorContributions.push({id:a,ctor:b,instantiation:c})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(a){a.register(),this.editorActions.push(a)}getEditorActions(){return this.editorActions}registerEditorCommand(a){a.register(),this.editorCommands[a.id]=a}getEditorCommand(a){return this.editorCommands[a]||null}}function D(a){return a.register(),a}l.O.add("editor.contributions",C.INSTANCE);let E=D(new r({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:h.D8.MenubarEditMenu,group:"1_do",title:(0,f.kg)(73,"&&Undo"),order:1},{menuId:h.D8.CommandPalette,group:"",title:(0,f.kg)(74,"Undo"),order:1},{menuId:h.D8.SimpleEditorContext,group:"1_do",title:(0,f.kg)(75,"Undo"),order:1}]}));D(new s(E,{id:"default:undo",precondition:void 0}));let F=D(new r({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:h.D8.MenubarEditMenu,group:"1_do",title:(0,f.kg)(76,"&&Redo"),order:2},{menuId:h.D8.CommandPalette,group:"",title:(0,f.kg)(77,"Redo"),order:1},{menuId:h.D8.SimpleEditorContext,group:"1_do",title:(0,f.kg)(78,"Redo"),order:2}]}));D(new s(F,{id:"default:redo",precondition:void 0}));let G=D(new r({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:h.D8.MenubarSelectionMenu,group:"1_basic",title:(0,f.kg)(79,"&&Select All"),order:1},{menuId:h.D8.CommandPalette,group:"",title:(0,f.kg)(80,"Select All"),order:1},{menuId:h.D8.SimpleEditorContext,group:"9_select",title:(0,f.kg)(81,"Select All"),order:1}]}))},33641:(a,b,c)=>{"use strict";c.d(b,{i:()=>i});var d=c(35527),e=c(17577),f=c(72473);class g extends f.V{constructor(a,b){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=b,this.intlSegmenterLocales.length>0?this._segmenter=d.x.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let b=0,c=a.length;b<c;b++)this.set(a.charCodeAt(b),2);this.set(32,1),this.set(9,1)}findPrevIntlWordBeforeOrAtOffset(a,b){let c=null;for(let d of this._getIntlSegmenterWordsOnLine(a)){if(d.index>b)break;c=d}return c}findNextIntlWordAtOrAfterOffset(a,b){for(let c of this._getIntlSegmenterWordsOnLine(a))if(!(c.index<b))return c;return null}_getIntlSegmenterWordsOnLine(a){return this._segmenter?(this._cachedLine===a||(this._cachedLine=a,this._cachedSegments=this._filterWordSegments(this._segmenter.value.segment(a))),this._cachedSegments):[]}_filterWordSegments(a){let b=[];for(let c of a)this._isWordLike(c)&&b.push(c);return b}_isWordLike(a){return!!a.isWordLike}}let h=new e.qK(10);function i(a,b){let c=`${a}/${b.join(",")}`,d=h.get(c);return d||(d=new g(a,b),h.set(c,d)),d}},33836:(a,b,c)=>{"use strict";function d(a,b){let c=0,d=0,e=a.length;for(;d<e;){let e=a.charCodeAt(d);if(32===e)c++;else if(9===e)c=c-c%b+b;else break;d++}return d===e?-1:c}c.d(b,{G:()=>d})},33896:(a,b,c)=>{"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS;c.d(b,{A5:()=>I,Ah:()=>J,DD:()=>z,DO:()=>L,EI:()=>w,Gn:()=>d,H_:()=>T,Ic:()=>K,Io:()=>g,KU:()=>x,Kb:()=>m,M$:()=>s,OV:()=>F,QP:()=>h,Qj:()=>j,R3:()=>C,SB:()=>P,U7:()=>V,VW:()=>u,VX:()=>D,WA:()=>R,WU:()=>q,XR:()=>O,YT:()=>G,ZS:()=>r,_E:()=>f,cj:()=>A,dE:()=>H,d_:()=>B,e0:()=>n,h5:()=>k,hS:()=>E,hW:()=>M,jT:()=>Q,kK:()=>X,kf:()=>p,l:()=>t,m9:()=>W,of:()=>l,ok:()=>e,ov:()=>N,p2:()=>o,qw:()=>y,r4:()=>v,t7:()=>i,tJ:()=>Y,v0:()=>S,z4:()=>U}),(Z=d||(d={}))[Z.Unknown=0]="Unknown",Z[Z.Disabled=1]="Disabled",Z[Z.Enabled=2]="Enabled",($=e||(e={}))[$.Invoke=1]="Invoke",$[$.Auto=2]="Auto",(_=f||(f={}))[_.None=0]="None",_[_.KeepWhitespace=1]="KeepWhitespace",_[_.InsertAsSnippet=4]="InsertAsSnippet",(aa=g||(g={}))[aa.Method=0]="Method",aa[aa.Function=1]="Function",aa[aa.Constructor=2]="Constructor",aa[aa.Field=3]="Field",aa[aa.Variable=4]="Variable",aa[aa.Class=5]="Class",aa[aa.Struct=6]="Struct",aa[aa.Interface=7]="Interface",aa[aa.Module=8]="Module",aa[aa.Property=9]="Property",aa[aa.Event=10]="Event",aa[aa.Operator=11]="Operator",aa[aa.Unit=12]="Unit",aa[aa.Value=13]="Value",aa[aa.Constant=14]="Constant",aa[aa.Enum=15]="Enum",aa[aa.EnumMember=16]="EnumMember",aa[aa.Keyword=17]="Keyword",aa[aa.Text=18]="Text",aa[aa.Color=19]="Color",aa[aa.File=20]="File",aa[aa.Reference=21]="Reference",aa[aa.Customcolor=22]="Customcolor",aa[aa.Folder=23]="Folder",aa[aa.TypeParameter=24]="TypeParameter",aa[aa.User=25]="User",aa[aa.Issue=26]="Issue",aa[aa.Tool=27]="Tool",aa[aa.Snippet=28]="Snippet",(ab=h||(h={}))[ab.Deprecated=1]="Deprecated",(ac=i||(i={}))[ac.Invoke=0]="Invoke",ac[ac.TriggerCharacter=1]="TriggerCharacter",ac[ac.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions",(ad=j||(j={}))[ad.EXACT=0]="EXACT",ad[ad.ABOVE=1]="ABOVE",ad[ad.BELOW=2]="BELOW",(ae=k||(k={}))[ae.NotSet=0]="NotSet",ae[ae.ContentFlush=1]="ContentFlush",ae[ae.RecoverFromMarkers=2]="RecoverFromMarkers",ae[ae.Explicit=3]="Explicit",ae[ae.Paste=4]="Paste",ae[ae.Undo=5]="Undo",ae[ae.Redo=6]="Redo",(af=l||(l={}))[af.LF=1]="LF",af[af.CRLF=2]="CRLF",(ag=m||(m={}))[ag.Text=0]="Text",ag[ag.Read=1]="Read",ag[ag.Write=2]="Write",(ah=n||(n={}))[ah.None=0]="None",ah[ah.Keep=1]="Keep",ah[ah.Brackets=2]="Brackets",ah[ah.Advanced=3]="Advanced",ah[ah.Full=4]="Full",(ai=o||(o={}))[ai.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",ai[ai.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",ai[ai.accessibilitySupport=2]="accessibilitySupport",ai[ai.accessibilityPageSize=3]="accessibilityPageSize",ai[ai.allowOverflow=4]="allowOverflow",ai[ai.allowVariableLineHeights=5]="allowVariableLineHeights",ai[ai.allowVariableFonts=6]="allowVariableFonts",ai[ai.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",ai[ai.ariaLabel=8]="ariaLabel",ai[ai.ariaRequired=9]="ariaRequired",ai[ai.autoClosingBrackets=10]="autoClosingBrackets",ai[ai.autoClosingComments=11]="autoClosingComments",ai[ai.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",ai[ai.autoClosingDelete=13]="autoClosingDelete",ai[ai.autoClosingOvertype=14]="autoClosingOvertype",ai[ai.autoClosingQuotes=15]="autoClosingQuotes",ai[ai.autoIndent=16]="autoIndent",ai[ai.autoIndentOnPaste=17]="autoIndentOnPaste",ai[ai.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",ai[ai.automaticLayout=19]="automaticLayout",ai[ai.autoSurround=20]="autoSurround",ai[ai.bracketPairColorization=21]="bracketPairColorization",ai[ai.guides=22]="guides",ai[ai.codeLens=23]="codeLens",ai[ai.codeLensFontFamily=24]="codeLensFontFamily",ai[ai.codeLensFontSize=25]="codeLensFontSize",ai[ai.colorDecorators=26]="colorDecorators",ai[ai.colorDecoratorsLimit=27]="colorDecoratorsLimit",ai[ai.columnSelection=28]="columnSelection",ai[ai.comments=29]="comments",ai[ai.contextmenu=30]="contextmenu",ai[ai.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",ai[ai.cursorBlinking=32]="cursorBlinking",ai[ai.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",ai[ai.cursorStyle=34]="cursorStyle",ai[ai.cursorSurroundingLines=35]="cursorSurroundingLines",ai[ai.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",ai[ai.cursorWidth=37]="cursorWidth",ai[ai.cursorHeight=38]="cursorHeight",ai[ai.disableLayerHinting=39]="disableLayerHinting",ai[ai.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",ai[ai.domReadOnly=41]="domReadOnly",ai[ai.dragAndDrop=42]="dragAndDrop",ai[ai.dropIntoEditor=43]="dropIntoEditor",ai[ai.editContext=44]="editContext",ai[ai.emptySelectionClipboard=45]="emptySelectionClipboard",ai[ai.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",ai[ai.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",ai[ai.extraEditorClassName=48]="extraEditorClassName",ai[ai.fastScrollSensitivity=49]="fastScrollSensitivity",ai[ai.find=50]="find",ai[ai.fixedOverflowWidgets=51]="fixedOverflowWidgets",ai[ai.folding=52]="folding",ai[ai.foldingStrategy=53]="foldingStrategy",ai[ai.foldingHighlight=54]="foldingHighlight",ai[ai.foldingImportsByDefault=55]="foldingImportsByDefault",ai[ai.foldingMaximumRegions=56]="foldingMaximumRegions",ai[ai.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",ai[ai.fontFamily=58]="fontFamily",ai[ai.fontInfo=59]="fontInfo",ai[ai.fontLigatures=60]="fontLigatures",ai[ai.fontSize=61]="fontSize",ai[ai.fontWeight=62]="fontWeight",ai[ai.fontVariations=63]="fontVariations",ai[ai.formatOnPaste=64]="formatOnPaste",ai[ai.formatOnType=65]="formatOnType",ai[ai.glyphMargin=66]="glyphMargin",ai[ai.gotoLocation=67]="gotoLocation",ai[ai.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",ai[ai.hover=69]="hover",ai[ai.inDiffEditor=70]="inDiffEditor",ai[ai.inlineSuggest=71]="inlineSuggest",ai[ai.letterSpacing=72]="letterSpacing",ai[ai.lightbulb=73]="lightbulb",ai[ai.lineDecorationsWidth=74]="lineDecorationsWidth",ai[ai.lineHeight=75]="lineHeight",ai[ai.lineNumbers=76]="lineNumbers",ai[ai.lineNumbersMinChars=77]="lineNumbersMinChars",ai[ai.linkedEditing=78]="linkedEditing",ai[ai.links=79]="links",ai[ai.matchBrackets=80]="matchBrackets",ai[ai.minimap=81]="minimap",ai[ai.mouseStyle=82]="mouseStyle",ai[ai.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",ai[ai.mouseWheelZoom=84]="mouseWheelZoom",ai[ai.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",ai[ai.multiCursorModifier=86]="multiCursorModifier",ai[ai.mouseMiddleClickAction=87]="mouseMiddleClickAction",ai[ai.multiCursorPaste=88]="multiCursorPaste",ai[ai.multiCursorLimit=89]="multiCursorLimit",ai[ai.occurrencesHighlight=90]="occurrencesHighlight",ai[ai.occurrencesHighlightDelay=91]="occurrencesHighlightDelay",ai[ai.overtypeCursorStyle=92]="overtypeCursorStyle",ai[ai.overtypeOnPaste=93]="overtypeOnPaste",ai[ai.overviewRulerBorder=94]="overviewRulerBorder",ai[ai.overviewRulerLanes=95]="overviewRulerLanes",ai[ai.padding=96]="padding",ai[ai.pasteAs=97]="pasteAs",ai[ai.parameterHints=98]="parameterHints",ai[ai.peekWidgetDefaultFocus=99]="peekWidgetDefaultFocus",ai[ai.placeholder=100]="placeholder",ai[ai.definitionLinkOpensInPeek=101]="definitionLinkOpensInPeek",ai[ai.quickSuggestions=102]="quickSuggestions",ai[ai.quickSuggestionsDelay=103]="quickSuggestionsDelay",ai[ai.readOnly=104]="readOnly",ai[ai.readOnlyMessage=105]="readOnlyMessage",ai[ai.renameOnType=106]="renameOnType",ai[ai.renderRichScreenReaderContent=107]="renderRichScreenReaderContent",ai[ai.renderControlCharacters=108]="renderControlCharacters",ai[ai.renderFinalNewline=109]="renderFinalNewline",ai[ai.renderLineHighlight=110]="renderLineHighlight",ai[ai.renderLineHighlightOnlyWhenFocus=111]="renderLineHighlightOnlyWhenFocus",ai[ai.renderValidationDecorations=112]="renderValidationDecorations",ai[ai.renderWhitespace=113]="renderWhitespace",ai[ai.revealHorizontalRightPadding=114]="revealHorizontalRightPadding",ai[ai.roundedSelection=115]="roundedSelection",ai[ai.rulers=116]="rulers",ai[ai.scrollbar=117]="scrollbar",ai[ai.scrollBeyondLastColumn=118]="scrollBeyondLastColumn",ai[ai.scrollBeyondLastLine=119]="scrollBeyondLastLine",ai[ai.scrollPredominantAxis=120]="scrollPredominantAxis",ai[ai.selectionClipboard=121]="selectionClipboard",ai[ai.selectionHighlight=122]="selectionHighlight",ai[ai.selectionHighlightMaxLength=123]="selectionHighlightMaxLength",ai[ai.selectionHighlightMultiline=124]="selectionHighlightMultiline",ai[ai.selectOnLineNumbers=125]="selectOnLineNumbers",ai[ai.showFoldingControls=126]="showFoldingControls",ai[ai.showUnused=127]="showUnused",ai[ai.snippetSuggestions=128]="snippetSuggestions",ai[ai.smartSelect=129]="smartSelect",ai[ai.smoothScrolling=130]="smoothScrolling",ai[ai.stickyScroll=131]="stickyScroll",ai[ai.stickyTabStops=132]="stickyTabStops",ai[ai.stopRenderingLineAfter=133]="stopRenderingLineAfter",ai[ai.suggest=134]="suggest",ai[ai.suggestFontSize=135]="suggestFontSize",ai[ai.suggestLineHeight=136]="suggestLineHeight",ai[ai.suggestOnTriggerCharacters=137]="suggestOnTriggerCharacters",ai[ai.suggestSelection=138]="suggestSelection",ai[ai.tabCompletion=139]="tabCompletion",ai[ai.tabIndex=140]="tabIndex",ai[ai.trimWhitespaceOnDelete=141]="trimWhitespaceOnDelete",ai[ai.unicodeHighlighting=142]="unicodeHighlighting",ai[ai.unusualLineTerminators=143]="unusualLineTerminators",ai[ai.useShadowDOM=144]="useShadowDOM",ai[ai.useTabStops=145]="useTabStops",ai[ai.wordBreak=146]="wordBreak",ai[ai.wordSegmenterLocales=147]="wordSegmenterLocales",ai[ai.wordSeparators=148]="wordSeparators",ai[ai.wordWrap=149]="wordWrap",ai[ai.wordWrapBreakAfterCharacters=150]="wordWrapBreakAfterCharacters",ai[ai.wordWrapBreakBeforeCharacters=151]="wordWrapBreakBeforeCharacters",ai[ai.wordWrapColumn=152]="wordWrapColumn",ai[ai.wordWrapOverride1=153]="wordWrapOverride1",ai[ai.wordWrapOverride2=154]="wordWrapOverride2",ai[ai.wrappingIndent=155]="wrappingIndent",ai[ai.wrappingStrategy=156]="wrappingStrategy",ai[ai.showDeprecated=157]="showDeprecated",ai[ai.inertialScroll=158]="inertialScroll",ai[ai.inlayHints=159]="inlayHints",ai[ai.wrapOnEscapedLineFeeds=160]="wrapOnEscapedLineFeeds",ai[ai.effectiveCursorStyle=161]="effectiveCursorStyle",ai[ai.editorClassName=162]="editorClassName",ai[ai.pixelRatio=163]="pixelRatio",ai[ai.tabFocusMode=164]="tabFocusMode",ai[ai.layoutInfo=165]="layoutInfo",ai[ai.wrappingInfo=166]="wrappingInfo",ai[ai.defaultColorDecorators=167]="defaultColorDecorators",ai[ai.colorDecoratorsActivatedOn=168]="colorDecoratorsActivatedOn",ai[ai.inlineCompletionsAccessibilityVerbose=169]="inlineCompletionsAccessibilityVerbose",ai[ai.effectiveEditContext=170]="effectiveEditContext",ai[ai.scrollOnMiddleClick=171]="scrollOnMiddleClick",ai[ai.effectiveAllowVariableFonts=172]="effectiveAllowVariableFonts",ai[ai.doubleClickSelectsBlock=173]="doubleClickSelectsBlock",(aj=p||(p={}))[aj.TextDefined=0]="TextDefined",aj[aj.LF=1]="LF",aj[aj.CRLF=2]="CRLF",(ak=q||(q={}))[ak.LF=0]="LF",ak[ak.CRLF=1]="CRLF",(al=r||(r={}))[al.Left=1]="Left",al[al.Center=2]="Center",al[al.Right=3]="Right",(am=s||(s={}))[am.Increase=0]="Increase",am[am.Decrease=1]="Decrease",(an=t||(t={}))[an.None=0]="None",an[an.Indent=1]="Indent",an[an.IndentOutdent=2]="IndentOutdent",an[an.Outdent=3]="Outdent",(ao=u||(u={}))[ao.Both=0]="Both",ao[ao.Right=1]="Right",ao[ao.Left=2]="Left",ao[ao.None=3]="None",(ap=v||(v={}))[ap.Type=1]="Type",ap[ap.Parameter=2]="Parameter",(aq=w||(w={}))[aq.Accepted=0]="Accepted",aq[aq.Rejected=1]="Rejected",aq[aq.Ignored=2]="Ignored",(ar=x||(x={}))[ar.Code=1]="Code",ar[ar.Label=2]="Label",(as=y||(y={}))[as.Automatic=0]="Automatic",as[as.Explicit=1]="Explicit",(at=z||(z={}))[at.DependsOnKbLayout=-1]="DependsOnKbLayout",at[at.Unknown=0]="Unknown",at[at.Backspace=1]="Backspace",at[at.Tab=2]="Tab",at[at.Enter=3]="Enter",at[at.Shift=4]="Shift",at[at.Ctrl=5]="Ctrl",at[at.Alt=6]="Alt",at[at.PauseBreak=7]="PauseBreak",at[at.CapsLock=8]="CapsLock",at[at.Escape=9]="Escape",at[at.Space=10]="Space",at[at.PageUp=11]="PageUp",at[at.PageDown=12]="PageDown",at[at.End=13]="End",at[at.Home=14]="Home",at[at.LeftArrow=15]="LeftArrow",at[at.UpArrow=16]="UpArrow",at[at.RightArrow=17]="RightArrow",at[at.DownArrow=18]="DownArrow",at[at.Insert=19]="Insert",at[at.Delete=20]="Delete",at[at.Digit0=21]="Digit0",at[at.Digit1=22]="Digit1",at[at.Digit2=23]="Digit2",at[at.Digit3=24]="Digit3",at[at.Digit4=25]="Digit4",at[at.Digit5=26]="Digit5",at[at.Digit6=27]="Digit6",at[at.Digit7=28]="Digit7",at[at.Digit8=29]="Digit8",at[at.Digit9=30]="Digit9",at[at.KeyA=31]="KeyA",at[at.KeyB=32]="KeyB",at[at.KeyC=33]="KeyC",at[at.KeyD=34]="KeyD",at[at.KeyE=35]="KeyE",at[at.KeyF=36]="KeyF",at[at.KeyG=37]="KeyG",at[at.KeyH=38]="KeyH",at[at.KeyI=39]="KeyI",at[at.KeyJ=40]="KeyJ",at[at.KeyK=41]="KeyK",at[at.KeyL=42]="KeyL",at[at.KeyM=43]="KeyM",at[at.KeyN=44]="KeyN",at[at.KeyO=45]="KeyO",at[at.KeyP=46]="KeyP",at[at.KeyQ=47]="KeyQ",at[at.KeyR=48]="KeyR",at[at.KeyS=49]="KeyS",at[at.KeyT=50]="KeyT",at[at.KeyU=51]="KeyU",at[at.KeyV=52]="KeyV",at[at.KeyW=53]="KeyW",at[at.KeyX=54]="KeyX",at[at.KeyY=55]="KeyY",at[at.KeyZ=56]="KeyZ",at[at.Meta=57]="Meta",at[at.ContextMenu=58]="ContextMenu",at[at.F1=59]="F1",at[at.F2=60]="F2",at[at.F3=61]="F3",at[at.F4=62]="F4",at[at.F5=63]="F5",at[at.F6=64]="F6",at[at.F7=65]="F7",at[at.F8=66]="F8",at[at.F9=67]="F9",at[at.F10=68]="F10",at[at.F11=69]="F11",at[at.F12=70]="F12",at[at.F13=71]="F13",at[at.F14=72]="F14",at[at.F15=73]="F15",at[at.F16=74]="F16",at[at.F17=75]="F17",at[at.F18=76]="F18",at[at.F19=77]="F19",at[at.F20=78]="F20",at[at.F21=79]="F21",at[at.F22=80]="F22",at[at.F23=81]="F23",at[at.F24=82]="F24",at[at.NumLock=83]="NumLock",at[at.ScrollLock=84]="ScrollLock",at[at.Semicolon=85]="Semicolon",at[at.Equal=86]="Equal",at[at.Comma=87]="Comma",at[at.Minus=88]="Minus",at[at.Period=89]="Period",at[at.Slash=90]="Slash",at[at.Backquote=91]="Backquote",at[at.BracketLeft=92]="BracketLeft",at[at.Backslash=93]="Backslash",at[at.BracketRight=94]="BracketRight",at[at.Quote=95]="Quote",at[at.OEM_8=96]="OEM_8",at[at.IntlBackslash=97]="IntlBackslash",at[at.Numpad0=98]="Numpad0",at[at.Numpad1=99]="Numpad1",at[at.Numpad2=100]="Numpad2",at[at.Numpad3=101]="Numpad3",at[at.Numpad4=102]="Numpad4",at[at.Numpad5=103]="Numpad5",at[at.Numpad6=104]="Numpad6",at[at.Numpad7=105]="Numpad7",at[at.Numpad8=106]="Numpad8",at[at.Numpad9=107]="Numpad9",at[at.NumpadMultiply=108]="NumpadMultiply",at[at.NumpadAdd=109]="NumpadAdd",at[at.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",at[at.NumpadSubtract=111]="NumpadSubtract",at[at.NumpadDecimal=112]="NumpadDecimal",at[at.NumpadDivide=113]="NumpadDivide",at[at.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",at[at.ABNT_C1=115]="ABNT_C1",at[at.ABNT_C2=116]="ABNT_C2",at[at.AudioVolumeMute=117]="AudioVolumeMute",at[at.AudioVolumeUp=118]="AudioVolumeUp",at[at.AudioVolumeDown=119]="AudioVolumeDown",at[at.BrowserSearch=120]="BrowserSearch",at[at.BrowserHome=121]="BrowserHome",at[at.BrowserBack=122]="BrowserBack",at[at.BrowserForward=123]="BrowserForward",at[at.MediaTrackNext=124]="MediaTrackNext",at[at.MediaTrackPrevious=125]="MediaTrackPrevious",at[at.MediaStop=126]="MediaStop",at[at.MediaPlayPause=127]="MediaPlayPause",at[at.LaunchMediaPlayer=128]="LaunchMediaPlayer",at[at.LaunchMail=129]="LaunchMail",at[at.LaunchApp2=130]="LaunchApp2",at[at.Clear=131]="Clear",at[at.MAX_VALUE=132]="MAX_VALUE",(au=A||(A={}))[au.Hint=1]="Hint",au[au.Info=2]="Info",au[au.Warning=4]="Warning",au[au.Error=8]="Error",(av=B||(B={}))[av.Unnecessary=1]="Unnecessary",av[av.Deprecated=2]="Deprecated",(aw=C||(C={}))[aw.Inline=1]="Inline",aw[aw.Gutter=2]="Gutter",(ax=D||(D={}))[ax.Normal=1]="Normal",ax[ax.Underlined=2]="Underlined",(ay=E||(E={}))[ay.UNKNOWN=0]="UNKNOWN",ay[ay.TEXTAREA=1]="TEXTAREA",ay[ay.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",ay[ay.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",ay[ay.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",ay[ay.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",ay[ay.CONTENT_TEXT=6]="CONTENT_TEXT",ay[ay.CONTENT_EMPTY=7]="CONTENT_EMPTY",ay[ay.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",ay[ay.CONTENT_WIDGET=9]="CONTENT_WIDGET",ay[ay.OVERVIEW_RULER=10]="OVERVIEW_RULER",ay[ay.SCROLLBAR=11]="SCROLLBAR",ay[ay.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",ay[ay.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR",(az=F||(F={}))[az.AIGenerated=1]="AIGenerated",(aA=G||(G={}))[aA.Invoke=0]="Invoke",aA[aA.Automatic=1]="Automatic",(aB=H||(H={}))[aB.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",aB[aB.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",aB[aB.TOP_CENTER=2]="TOP_CENTER",(aC=I||(I={}))[aC.Left=1]="Left",aC[aC.Center=2]="Center",aC[aC.Right=4]="Right",aC[aC.Full=7]="Full",(aD=J||(J={}))[aD.Word=0]="Word",aD[aD.Line=1]="Line",aD[aD.Suggest=2]="Suggest",(aE=K||(K={}))[aE.Left=0]="Left",aE[aE.Right=1]="Right",aE[aE.None=2]="None",aE[aE.LeftOfInjectedText=3]="LeftOfInjectedText",aE[aE.RightOfInjectedText=4]="RightOfInjectedText",(aF=L||(L={}))[aF.Off=0]="Off",aF[aF.On=1]="On",aF[aF.Relative=2]="Relative",aF[aF.Interval=3]="Interval",aF[aF.Custom=4]="Custom",(aG=M||(M={}))[aG.None=0]="None",aG[aG.Text=1]="Text",aG[aG.Blocks=2]="Blocks",(aH=N||(N={}))[aH.Smooth=0]="Smooth",aH[aH.Immediate=1]="Immediate",(aI=O||(O={}))[aI.Auto=1]="Auto",aI[aI.Hidden=2]="Hidden",aI[aI.Visible=3]="Visible",(aJ=P||(P={}))[aJ.LTR=0]="LTR",aJ[aJ.RTL=1]="RTL",(aK=Q||(Q={})).Off="off",aK.OnCode="onCode",aK.On="on",(aL=R||(R={}))[aL.Invoke=1]="Invoke",aL[aL.TriggerCharacter=2]="TriggerCharacter",aL[aL.ContentChange=3]="ContentChange",(aM=S||(S={}))[aM.File=0]="File",aM[aM.Module=1]="Module",aM[aM.Namespace=2]="Namespace",aM[aM.Package=3]="Package",aM[aM.Class=4]="Class",aM[aM.Method=5]="Method",aM[aM.Property=6]="Property",aM[aM.Field=7]="Field",aM[aM.Constructor=8]="Constructor",aM[aM.Enum=9]="Enum",aM[aM.Interface=10]="Interface",aM[aM.Function=11]="Function",aM[aM.Variable=12]="Variable",aM[aM.Constant=13]="Constant",aM[aM.String=14]="String",aM[aM.Number=15]="Number",aM[aM.Boolean=16]="Boolean",aM[aM.Array=17]="Array",aM[aM.Object=18]="Object",aM[aM.Key=19]="Key",aM[aM.Null=20]="Null",aM[aM.EnumMember=21]="EnumMember",aM[aM.Struct=22]="Struct",aM[aM.Event=23]="Event",aM[aM.Operator=24]="Operator",aM[aM.TypeParameter=25]="TypeParameter",(aN=T||(T={}))[aN.Deprecated=1]="Deprecated",(aO=U||(U={}))[aO.LTR=0]="LTR",aO[aO.RTL=1]="RTL",(aP=V||(V={}))[aP.Hidden=0]="Hidden",aP[aP.Blink=1]="Blink",aP[aP.Smooth=2]="Smooth",aP[aP.Phase=3]="Phase",aP[aP.Expand=4]="Expand",aP[aP.Solid=5]="Solid",(aQ=W||(W={}))[aQ.Line=1]="Line",aQ[aQ.Block=2]="Block",aQ[aQ.Underline=3]="Underline",aQ[aQ.LineThin=4]="LineThin",aQ[aQ.BlockOutline=5]="BlockOutline",aQ[aQ.UnderlineThin=6]="UnderlineThin",(aR=X||(X={}))[aR.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",aR[aR.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",aR[aR.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",aR[aR.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter",(aS=Y||(Y={}))[aS.None=0]="None",aS[aS.Same=1]="Same",aS[aS.Indent=2]="Indent",aS[aS.DeepIndent=3]="DeepIndent"},34183:(a,b,c)=>{"use strict";c.d(b,{CU:()=>g,b1:()=>j,bu:()=>k,t4:()=>h,tA:()=>i,vw:()=>l});var d=c(72816),e=c(55404),f=c(37327);let g=(0,f.x1)("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},(0,d.kg)(1838,"Overall foreground color. This color is only used if not overridden by a component."));(0,f.x1)("strongForeground",{dark:"#FFFFFF",light:"#000000",hcDark:"#FFFFFF",hcLight:"#000000"},(0,d.kg)(1839,"Highest-contrast foreground color, intended for text or icons that need maximum legibility across various backgrounds. This color is only used if not overridden by a component.")),(0,f.x1)("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},(0,d.kg)(1840,"Overall foreground for disabled elements. This color is only used if not overridden by a component.")),(0,f.x1)("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},(0,d.kg)(1841,"Overall foreground color for error messages. This color is only used if not overridden by a component.")),(0,f.x1)("descriptionForeground",{light:"#717171",dark:(0,f.JO)(g,.7),hcDark:(0,f.JO)(g,.7),hcLight:(0,f.JO)(g,.7)},(0,d.kg)(1842,"Foreground color for description text providing additional information, for example for a label."));let h=(0,f.x1)("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},(0,d.kg)(1843,"The default color for icons in the workbench.")),i=(0,f.x1)("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},(0,d.kg)(1844,"Overall border color for focused elements. This color is only used if not overridden by a component.")),j=(0,f.x1)("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},(0,d.kg)(1845,"An extra border around elements to separate them from others for greater contrast.")),k=(0,f.x1)("contrastActiveBorder",{light:null,dark:null,hcDark:i,hcLight:i},(0,d.kg)(1846,"An extra border around active elements to separate them from others for greater contrast."));(0,f.x1)("selection.background",null,(0,d.kg)(1847,"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));let l=(0,f.x1)("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},(0,d.kg)(1848,"Foreground color for links in text."));(0,f.x1)("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},(0,d.kg)(1849,"Foreground color for links in text when clicked on and on mouse hover.")),(0,f.x1)("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:e.Q1.black,hcLight:"#292929"},(0,d.kg)(1850,"Color for text separators.")),(0,f.x1)("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#FFFFFF",hcLight:"#FFFFFF"},(0,d.kg)(1851,"Foreground color for preformatted text segments.")),(0,f.x1)("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:null,hcLight:"#09345f"},(0,d.kg)(1852,"Background color for preformatted text segments.")),(0,f.x1)("textPreformat.border",{light:null,dark:null,hcDark:j,hcLight:null},(0,d.kg)(1853,"Border color for preformatted text segments.")),(0,f.x1)("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},(0,d.kg)(1854,"Background color for block quotes in text.")),(0,f.x1)("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:e.Q1.white,hcLight:"#292929"},(0,d.kg)(1855,"Border color for block quotes in text.")),(0,f.x1)("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:e.Q1.black,hcLight:"#F2F2F2"},(0,d.kg)(1856,"Background color for code blocks in text."))},34349:(a,b,c)=>{"use strict";c.d(b,{n:()=>g,s:()=>h});var d=c(75082),e=c(63060);let f=RegExp(`(\\\\)?\\$\\((${e.L.iconNameExpression}(?:${e.L.iconModifierExpression})?)\\)`,"g");function g(a,b){let c,d=[],e=0,g=0;for(;null!==(c=f.exec(a));){e<(g=c.index||0)&&d.push(a.substring(e,g)),e=(c.index||0)+c[0].length;let[,f,i]=c;d.push(f?`$(${i})`:h({id:i},b))}return e<a.length&&d.push(a.substring(e)),d}function h(a,b){let c=(0,d.$)("span"),f=e.L.asClassNameArray(a);return b&&f.push("codicon-colored"),c.classList.add(...f),c}},34547:(a,b,c)=>{"use strict";c.d(b,{AT:()=>j,OI:()=>g,ZX:()=>i}),c(93539),c(87175),c(78014),c(95091);var d=c(76631),e=c(14960);c(14670),c(60548);var f=c(87873);function g(a,b){let c=new h(!0,b);a.addObserver(c);try{c.beginUpdate(a)}finally{c.endUpdate(a)}return(0,d.s)(()=>{a.removeObserver(c)})}c(74864),(0,f.Bm)(g);class h{constructor(a,b){this._forceRecompute=a,this._handleValue=b,this._counter=0}beginUpdate(a){this._counter++}endUpdate(a){1===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(a.get()):a.reportChanges()),this._counter--}handlePossibleChange(a){}handleChange(a,b){}}function i(a,b){let c;return(0,e.C)({owner:a,debugReferenceFn:b},a=>c=b(a,c))}function j(a){return!!a&&void 0!==a.read&&void 0!==a.reportChanges}},34793:(a,b,c)=>{"use strict";c.d(b,{B:()=>e,q:()=>l});var d,e,f=c(75082),g=c(27612),h=c(90605),i=c(95091),j=c(76631),k=c(14322);(d=e||(e={})).Tap="-monaco-gesturetap",d.Change="-monaco-gesturechange",d.Start="-monaco-gesturestart",d.End="-monaco-gesturesend",d.Contextmenu="-monaco-gesturecontextmenu";class l extends j.jG{static{this.SCROLL_FRICTION=-.005}static{this.HOLD_DELAY=700}static{this.CLEAR_TAP_COUNT_TIME=400}constructor(){super(),this.dispatched=!1,this.targets=new k.w,this.ignoreTargets=new k.w,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(i.Jh.runAndSubscribe(f.Iv,({window:a,disposables:b})=>{b.add((0,f.ko)(a.document,"touchstart",a=>this.onTouchStart(a),{passive:!1})),b.add((0,f.ko)(a.document,"touchend",b=>this.onTouchEnd(a,b))),b.add((0,f.ko)(a.document,"touchmove",a=>this.onTouchMove(a),{passive:!1}))},{window:g.G,disposables:this._store}))}static addTarget(a){if(!l.isTouchDevice())return j.jG.None;l.INSTANCE||(l.INSTANCE=(0,j.lC)(new l));let b=l.INSTANCE.targets.push(a);return(0,j.s)(b)}static ignoreTarget(a){if(!l.isTouchDevice())return j.jG.None;l.INSTANCE||(l.INSTANCE=(0,j.lC)(new l));let b=l.INSTANCE.ignoreTargets.push(a);return(0,j.s)(b)}static isTouchDevice(){return"ontouchstart"in g.G||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(a){let b=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let c=0,d=a.targetTouches.length;c<d;c++){let d=a.targetTouches.item(c);this.activeTouches[d.identifier]={id:d.identifier,initialTarget:d.target,initialTimeStamp:b,initialPageX:d.pageX,initialPageY:d.pageY,rollingTimestamps:[b],rollingPageX:[d.pageX],rollingPageY:[d.pageY]};let f=this.newGestureEvent(e.Start,d.target);f.pageX=d.pageX,f.pageY=d.pageY,this.dispatchEvent(f)}this.dispatched&&(a.preventDefault(),a.stopPropagation(),this.dispatched=!1)}onTouchEnd(a,b){let c=Date.now(),d=Object.keys(this.activeTouches).length;for(let f=0,g=b.changedTouches.length;f<g;f++){let g=b.changedTouches.item(f);if(!this.activeTouches.hasOwnProperty(String(g.identifier))){console.warn("move of an UNKNOWN touch",g);continue}let h=this.activeTouches[g.identifier],i=Date.now()-h.initialTimeStamp;if(i<l.HOLD_DELAY&&30>Math.abs(h.initialPageX-h.rollingPageX.at(-1))&&30>Math.abs(h.initialPageY-h.rollingPageY.at(-1))){let a=this.newGestureEvent(e.Tap,h.initialTarget);a.pageX=h.rollingPageX.at(-1),a.pageY=h.rollingPageY.at(-1),this.dispatchEvent(a)}else if(i>=l.HOLD_DELAY&&30>Math.abs(h.initialPageX-h.rollingPageX.at(-1))&&30>Math.abs(h.initialPageY-h.rollingPageY.at(-1))){let a=this.newGestureEvent(e.Contextmenu,h.initialTarget);a.pageX=h.rollingPageX.at(-1),a.pageY=h.rollingPageY.at(-1),this.dispatchEvent(a)}else if(1===d){let b=h.rollingPageX.at(-1),d=h.rollingPageY.at(-1),e=h.rollingTimestamps.at(-1)-h.rollingTimestamps[0],f=b-h.rollingPageX[0],g=d-h.rollingPageY[0],i=[...this.targets].filter(a=>h.initialTarget instanceof Node&&a.contains(h.initialTarget));this.inertia(a,i,c,Math.abs(f)/e,f>0?1:-1,b,Math.abs(g)/e,g>0?1:-1,d)}this.dispatchEvent(this.newGestureEvent(e.End,h.initialTarget)),delete this.activeTouches[g.identifier]}this.dispatched&&(b.preventDefault(),b.stopPropagation(),this.dispatched=!1)}newGestureEvent(a,b){let c=document.createEvent("CustomEvent");return c.initEvent(a,!1,!0),c.initialTarget=b,c.tapCount=0,c}dispatchEvent(a){if(a.type===e.Tap){let b=new Date().getTime(),c=0;c=b-this._lastSetTapCountTime>l.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=b,a.tapCount=c}else(a.type===e.Change||a.type===e.Contextmenu)&&(this._lastSetTapCountTime=0);if(a.initialTarget instanceof Node){for(let b of this.ignoreTargets)if(b.contains(a.initialTarget))return;let b=[];for(let c of this.targets)if(c.contains(a.initialTarget)){let d=0,e=a.initialTarget;for(;e&&e!==c;)d++,e=e.parentElement;b.push([d,c])}for(let[c,d]of(b.sort((a,b)=>a[0]-b[0]),b))d.dispatchEvent(a),this.dispatched=!0}}inertia(a,b,c,d,g,h,i,j,k){this.handle=(0,f.PG)(a,()=>{let f=Date.now(),m=f-c,n=0,o=0,p=!0;d+=l.SCROLL_FRICTION*m,i+=l.SCROLL_FRICTION*m,d>0&&(p=!1,n=g*d*m),i>0&&(p=!1,o=j*i*m);let q=this.newGestureEvent(e.Change);q.translationX=n,q.translationY=o,b.forEach(a=>a.dispatchEvent(q)),p||this.inertia(a,b,f,d,g,h+n,i,j,k+o)})}onTouchMove(a){let b=Date.now();for(let c=0,d=a.changedTouches.length;c<d;c++){let d=a.changedTouches.item(c);if(!this.activeTouches.hasOwnProperty(String(d.identifier))){console.warn("end of an UNKNOWN touch",d);continue}let f=this.activeTouches[d.identifier],g=this.newGestureEvent(e.Change,f.initialTarget);g.translationX=d.pageX-f.rollingPageX.at(-1),g.translationY=d.pageY-f.rollingPageY.at(-1),g.pageX=d.pageX,g.pageY=d.pageY,this.dispatchEvent(g),f.rollingPageX.length>3&&(f.rollingPageX.shift(),f.rollingPageY.shift(),f.rollingTimestamps.shift()),f.rollingPageX.push(d.pageX),f.rollingPageY.push(d.pageY),f.rollingTimestamps.push(b)}this.dispatched&&(a.preventDefault(),a.stopPropagation(),this.dispatched=!1)}}!function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);f>3&&g&&Object.defineProperty(b,c,g)}([h.B],l,"isTouchDevice",null)},35001:(a,b,c)=>{"use strict";c.d(b,{$P:()=>h,Zp:()=>g});var d,e,f=c(67786);function g(a,b,c){let d=c.mode===e.ALIGN?c.offset:c.offset+c.size,f=c.mode===e.ALIGN?c.offset+c.size:c.offset;return 0===c.position?b<=a-d?{position:d,result:"ok"}:b<=f?{position:f-b,result:"flipped"}:{position:Math.max(a-b,0),result:"overlap"}:b<=f?{position:f-b,result:"ok"}:b<=a-d&&f<b/2?{position:d,result:"flipped"}:{position:0,result:"overlap"}}function h(a,b,c,d){let h,i,j=d?.anchorAlignment??0,k=d?.anchorPosition??0;if(0===(d?.anchorAxisAlignment??0)){let d={offset:c.top-a.top,size:c.height,position:+(0!==k)},l={offset:c.left,size:c.width,position:+(0!==j),mode:e.ALIGN},m=g(a.height,b.height,d);h=m.position+a.top,"flipped"===m.result&&(k=+(0===k)),f.Q.intersects({start:h,end:h+b.height},{start:d.offset,end:d.offset+d.size})&&(l.mode=e.AVOID);let n=g(a.width,b.width,l);i=n.position,"flipped"===n.result&&(j=+(0===j))}else{let d={offset:c.left,size:c.width,position:+(0!==j)},l={offset:c.top,size:c.height,position:+(0!==k),mode:e.ALIGN},m=g(a.width,b.width,d);i=m.position,"flipped"===m.result&&(j=+(0===j)),f.Q.intersects({start:i,end:i+b.width},{start:d.offset,end:d.offset+d.size})&&(l.mode=e.AVOID);let n=g(a.height,b.height,l);h=n.position+a.top,"flipped"===n.result&&(k=+(0===k))}let l=a.width-(i+b.width),m=a.height-(h+b.height);return{top:h,left:i,bottom:m,right:l,anchorAlignment:j,anchorPosition:k}}(d=e||(e={}))[d.AVOID=0]="AVOID",d[d.ALIGN=1]="ALIGN"},35117:()=>{},35412:()=>{},35440:(a,b,c)=>{"use strict";c.d(b,{b:()=>d,t:()=>e});let d=function(){if("function"==typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let a=new Uint8Array(16),b=[];for(let a=0;a<256;a++)b.push(a.toString(16).padStart(2,"0"));return function(){crypto.getRandomValues(a),a[6]=15&a[6]|64,a[8]=63&a[8]|128;let c=0,d="";return d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]],d+="-",d+=b[a[c++]],d+=b[a[c++]],d+="-",d+=b[a[c++]],d+=b[a[c++]],d+="-",d+=b[a[c++]],d+=b[a[c++]],d+="-",d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]]}}();function e(a){return`${a}-${d()}`}},35590:(a,b,c)=>{"use strict";c.d(b,{$D:()=>d,I_:()=>f,To:()=>e,Ym:()=>g});let d=(0,c(58254).u1)("undoRedoService");class e{constructor(a,b){this.resource=a,this.elements=b}}class f{static{this._ID=0}constructor(){this.id=f._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new f}}class g{static{this._ID=0}constructor(){this.id=g._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new g}}},36036:(a,b,c)=>{"use strict";let d,e,f,g;c.d(b,{$M:()=>L,FX:()=>y,GE:()=>N,dG:()=>Q,gP:()=>B,lO:()=>O,ou:()=>K,rY:()=>M,v_:()=>P});var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G=c(33040);c(54957);var H=c(61822),I=c(75643),J=c(72816);class K{constructor(a,b,c){this.offset=a,this.type=b,this.language=c,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class L{constructor(a,b){this.tokens=a,this.endState=b,this._tokenizationResultBrand=void 0}}class M{constructor(a,b,c){this.tokens=a,this.fontInfo=b,this.endState=c,this._encodedTokenizationResultBrand=void 0}}(h=t||(t={}))[h.Increase=0]="Increase",h[h.Decrease=1]="Decrease",i=u||(u={}),(d=new Map).set(0,G.W.symbolMethod),d.set(1,G.W.symbolFunction),d.set(2,G.W.symbolConstructor),d.set(3,G.W.symbolField),d.set(4,G.W.symbolVariable),d.set(5,G.W.symbolClass),d.set(6,G.W.symbolStruct),d.set(7,G.W.symbolInterface),d.set(8,G.W.symbolModule),d.set(9,G.W.symbolProperty),d.set(10,G.W.symbolEvent),d.set(11,G.W.symbolOperator),d.set(12,G.W.symbolUnit),d.set(13,G.W.symbolValue),d.set(15,G.W.symbolEnum),d.set(14,G.W.symbolConstant),d.set(15,G.W.symbolEnum),d.set(16,G.W.symbolEnumMember),d.set(17,G.W.symbolKeyword),d.set(28,G.W.symbolSnippet),d.set(18,G.W.symbolText),d.set(19,G.W.symbolColor),d.set(20,G.W.symbolFile),d.set(21,G.W.symbolReference),d.set(22,G.W.symbolCustomColor),d.set(23,G.W.symbolFolder),d.set(24,G.W.symbolTypeParameter),d.set(25,G.W.account),d.set(26,G.W.issues),d.set(27,G.W.tools),i.toIcon=function(a){let b=d.get(a);return b||(console.info("No codicon found for CompletionItemKind "+a),b=G.W.symbolProperty),b},i.toLabel=function(a){switch(a){case 0:return(0,J.kg)(763,"Method");case 1:return(0,J.kg)(764,"Function");case 2:return(0,J.kg)(765,"Constructor");case 3:return(0,J.kg)(766,"Field");case 4:return(0,J.kg)(767,"Variable");case 5:return(0,J.kg)(768,"Class");case 6:return(0,J.kg)(769,"Struct");case 7:return(0,J.kg)(770,"Interface");case 8:return(0,J.kg)(771,"Module");case 9:return(0,J.kg)(772,"Property");case 10:return(0,J.kg)(773,"Event");case 11:return(0,J.kg)(774,"Operator");case 12:return(0,J.kg)(775,"Unit");case 13:return(0,J.kg)(776,"Value");case 14:return(0,J.kg)(777,"Constant");case 15:return(0,J.kg)(778,"Enum");case 16:return(0,J.kg)(779,"Enum Member");case 17:return(0,J.kg)(780,"Keyword");case 18:return(0,J.kg)(781,"Text");case 19:return(0,J.kg)(782,"Color");case 20:return(0,J.kg)(783,"File");case 21:return(0,J.kg)(784,"Reference");case 22:return(0,J.kg)(785,"Custom Color");case 23:return(0,J.kg)(786,"Folder");case 24:return(0,J.kg)(787,"Type Parameter");case 25:return(0,J.kg)(788,"User");case 26:return(0,J.kg)(789,"Issue");case 27:return(0,J.kg)(790,"Tool");case 28:return(0,J.kg)(791,"Snippet");default:return""}},(e=new Map).set("method",0),e.set("function",1),e.set("constructor",2),e.set("field",3),e.set("variable",4),e.set("class",5),e.set("struct",6),e.set("interface",7),e.set("module",8),e.set("property",9),e.set("event",10),e.set("operator",11),e.set("unit",12),e.set("value",13),e.set("constant",14),e.set("enum",15),e.set("enum-member",16),e.set("enumMember",16),e.set("keyword",17),e.set("snippet",28),e.set("text",18),e.set("color",19),e.set("file",20),e.set("reference",21),e.set("customcolor",22),e.set("folder",23),e.set("type-parameter",24),e.set("typeParameter",24),e.set("account",25),e.set("issue",26),e.set("tool",27),i.fromString=function(a,b){let c=e.get(a);return void 0!==c||b||(c=9),c},(j=v||(v={}))[j.Automatic=0]="Automatic",j[j.Explicit=1]="Explicit";class N{constructor(a,b,c,d){this.range=a,this.text=b,this.completionKind=c,this.isSnippetText=d}equals(a){return H.Q.lift(this.range).equalsRange(a.range)&&this.text===a.text&&this.completionKind===a.completionKind&&this.isSnippetText===a.isSnippetText}}(k=w||(w={}))[k.Code=1]="Code",k[k.Label=2]="Label",(l=x||(x={}))[l.Accepted=0]="Accepted",l[l.Rejected=1]="Rejected",l[l.Ignored=2]="Ignored",(m=y||(y={}))[m.Automatic=0]="Automatic",m[m.PasteAs=1]="PasteAs",(n=z||(z={}))[n.Invoke=1]="Invoke",n[n.TriggerCharacter=2]="TriggerCharacter",n[n.ContentChange=3]="ContentChange",(o=A||(A={}))[o.Text=0]="Text",o[o.Read=1]="Read",o[o.Write=2]="Write",(0,J.kg)(792,"array"),(0,J.kg)(793,"boolean"),(0,J.kg)(794,"class"),(0,J.kg)(795,"constant"),(0,J.kg)(796,"constructor"),(0,J.kg)(797,"enumeration"),(0,J.kg)(798,"enumeration member"),(0,J.kg)(799,"event"),(0,J.kg)(800,"field"),(0,J.kg)(801,"file"),(0,J.kg)(802,"function"),(0,J.kg)(803,"interface"),(0,J.kg)(804,"key"),(0,J.kg)(805,"method"),(0,J.kg)(806,"module"),(0,J.kg)(807,"namespace"),(0,J.kg)(808,"null"),(0,J.kg)(809,"number"),(0,J.kg)(810,"object"),(0,J.kg)(811,"operator"),(0,J.kg)(812,"package"),(0,J.kg)(813,"property"),(0,J.kg)(814,"string"),(0,J.kg)(815,"struct"),(0,J.kg)(816,"type parameter"),(0,J.kg)(817,"variable"),p=B||(B={}),(f=new Map).set(0,G.W.symbolFile),f.set(1,G.W.symbolModule),f.set(2,G.W.symbolNamespace),f.set(3,G.W.symbolPackage),f.set(4,G.W.symbolClass),f.set(5,G.W.symbolMethod),f.set(6,G.W.symbolProperty),f.set(7,G.W.symbolField),f.set(8,G.W.symbolConstructor),f.set(9,G.W.symbolEnum),f.set(10,G.W.symbolInterface),f.set(11,G.W.symbolFunction),f.set(12,G.W.symbolVariable),f.set(13,G.W.symbolConstant),f.set(14,G.W.symbolString),f.set(15,G.W.symbolNumber),f.set(16,G.W.symbolBoolean),f.set(17,G.W.symbolArray),f.set(18,G.W.symbolObject),f.set(19,G.W.symbolKey),f.set(20,G.W.symbolNull),f.set(21,G.W.symbolEnumMember),f.set(22,G.W.symbolStruct),f.set(23,G.W.symbolEvent),f.set(24,G.W.symbolOperator),f.set(25,G.W.symbolTypeParameter),p.toIcon=function(a){let b=f.get(a);return b||(console.info("No codicon found for SymbolKind "+a),b=G.W.symbolProperty),b},(g=new Map).set(0,20),g.set(1,8),g.set(2,8),g.set(3,8),g.set(4,5),g.set(5,0),g.set(6,9),g.set(7,3),g.set(8,2),g.set(9,15),g.set(10,7),g.set(11,1),g.set(12,4),g.set(13,14),g.set(14,18),g.set(15,13),g.set(16,13),g.set(17,13),g.set(18,13),g.set(19,17),g.set(20,13),g.set(21,16),g.set(22,6),g.set(23,10),g.set(24,11),g.set(25,24),p.toCompletionKind=function(a){let b=g.get(a);return void 0===b&&(console.info("No completion kind found for SymbolKind "+a),b=20),b};class O{static{this.Comment=new O("comment")}static{this.Imports=new O("imports")}static{this.Region=new O("region")}static fromValue(a){switch(a){case"comment":return O.Comment;case"imports":return O.Imports;case"region":return O.Region}return new O(a)}constructor(a){this.value=a}}(q=C||(C={}))[q.AIGenerated=1]="AIGenerated",(r=D||(D={}))[r.Invoke=0]="Invoke",r[r.Automatic=1]="Automatic",(E||(E={})).is=function(a){return!!a&&"object"==typeof a&&"string"==typeof a.id&&"string"==typeof a.title},(s=F||(F={}))[s.Type=1]="Type",s[s.Parameter=2]="Parameter";class P{constructor(a){this.createSupport=a,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(a=>{a&&a.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}let Q=new I.d},36540:(a,b,c)=>{"use strict";c.d(b,{Eq:()=>s,bs:()=>r,y:()=>u,wL:()=>v,EB:()=>o});var d=c(18216),e=c(57667),f=c(35440),g=c(57616),h=c(81296),i=c(54957),j=c(29498);class k{}j.O.add("workbench.contributions.dragAndDrop",new k);class l{static{this.INSTANCE=new l}static getInstance(){return l.INSTANCE}hasData(a){return a&&a===this.proto}getData(a){if(this.hasData(a))return this.data}}function m(a){if(d.ib&&"function"==typeof globalThis.vscode?.webUtils?.getPathForFile)return globalThis.vscode?.webUtils?.getPathForFile(a)}let n=Object.freeze(["CodeEditors","CodeFiles",g.t.RESOURCES,g.t.INTERNAL_URI_LIST]);function o(a,b,c){let{dataToCopy:d,metadata:e}=q(a);return p(d.text,e,c),{dataToCopy:d,metadata:e}}function p(a,b,c){r.INSTANCE.set(c?a.replace(/\r\n/g,"\n"):a,b)}function q(a){let b=a.getEditorOption(45),c=a.getEditorOption(31),e=a.getCursorStates().map(a=>a.modelState.selection),g=function(a,b,c,e){let f,{sourceRanges:g,sourceText:h}=a.getPlainTextToCopy(b,c,d.uF),i=a.model.getEOL(),j=c&&1===b.length&&b[0].isEmpty(),k=Array.isArray(h)?h:null,l=Array.isArray(h)?h.join(i):h,m=null;if(s.forceCopyWithSyntaxHighlighting||e&&h.length<65536){let d=a.getRichTextToCopy(b,c);d&&(f=d.html,m=d.mode)}return{isFromEmptySelection:j,sourceRanges:g,multicursorText:k,text:l,html:f,mode:m}}(a,e,b,c),h={version:1,id:(0,f.b)(),isFromEmptySelection:g.isFromEmptySelection,multicursorText:g.multicursorText,mode:g.mode};return{dataToCopy:g,metadata:h}}class r{static{this.INSTANCE=new r}constructor(){this._lastState=null}set(a,b){this._lastState={lastCopiedValue:a,data:b}}get(a){return this._lastState&&this._lastState.lastCopiedValue===a?this._lastState.data:(this._lastState=null,null)}}let s={forceCopyWithSyntaxHighlighting:!1,electronBugWorkaroundCopyEventHasFired:!1},t={getTextData(a){let b=a.getData(e.K.text),c=null,d=a.getData("vscode-editor-data");if("string"==typeof d)try{c=JSON.parse(d),1!==c.version&&(c=null)}catch(a){}return 0===b.length&&null===c&&a.files.length>0?[Array.prototype.slice.call(a.files,0).map(a=>a.name).join("\n"),null]:[b,c]},setTextData(a,b,c,d){a.setData(e.K.text,b),"string"==typeof c&&a.setData("text/html",c),a.setData("vscode-editor-data",JSON.stringify(d))}};function u(a,b,c,d,e){let{dataToCopy:f,metadata:g}=q(c.viewModel),h=!1;return{isCut:b,clipboardData:{setData:(b,c)=>{a.clipboardData?.setData(b,c)}},dataToCopy:f,ensureClipboardGetsEditorData:()=>{a.preventDefault(),a.clipboardData&&t.setTextData(a.clipboardData,f.text,f.html,g),p(f.text,g,e),d.trace("ensureClipboardGetsEditorSelection with id : ",g.id," with text.length: ",f.text.length)},setHandled:()=>{h=!0,a.preventDefault(),a.stopImmediatePropagation()},get isHandled(){return h}}}function v(a){var b;let c=!1,[d,f]=a.clipboardData?t.getTextData(a.clipboardData):["",null];return f=f||r.INSTANCE.get(d),{clipboardData:(b=a.clipboardData,{types:Array.from(b?.types??[]),files:Array.prototype.slice.call(b?.files??[],0),getData:a=>b?.getData(a)??""}),metadata:f,text:d,toExternalVSDataTransfer:()=>a.clipboardData?function(a,b=!1){let c=function(a){let b=new h.Vq;for(let c of a.items){let a=c.type;if("string"===c.kind){let d=new Promise(a=>c.getAsString(a));b.append(a,(0,h.gf)(d))}else if("file"===c.kind){let d=c.getAsFile();d&&b.append(a,function(a){let b=m(a),c=b?i.r.parse(b):void 0;return(0,h.VX)(a.name,c,async()=>new Uint8Array(await a.arrayBuffer()))}(d))}}return b}(a),d=c.get(g.t.INTERNAL_URI_LIST);if(d)c.replace(e.K.uriList,d);else if(b||!c.has(e.K.uriList)){let b=[];for(let c of a.items){let a=c.getAsFile();if(a){let c=m(a);try{c?b.push(i.r.file(c).toString()):b.push(i.r.parse(a.name,!0).toString())}catch{}}}b.length&&c.replace(e.K.uriList,(0,h.gf)(h.jt.create(b)))}for(let a of n)c.delete(a);return c}(a.clipboardData):void 0,browserEvent:a,setHandled:()=>{c=!0,a.preventDefault(),a.stopImmediatePropagation()},get isHandled(){return c}}}},36685:()=>{},36901:(a,b,c)=>{"use strict";c.d(b,{J7:()=>i,aV:()=>h,nd:()=>g});var d=c(18216),e=c(72816),f=c(99187);new f.N1("isMac",d.zx,(0,e.kg)(1746,"Whether the operating system is macOS")),new f.N1("isLinux",d.j9,(0,e.kg)(1747,"Whether the operating system is Linux"));let g=new f.N1("isWindows",d.uF,(0,e.kg)(1748,"Whether the operating system is Windows"));new f.N1("isWeb",d.HZ,(0,e.kg)(1749,"Whether the platform is a web browser")),new f.N1("isMacNative",d.zx&&!d.HZ,(0,e.kg)(1750,"Whether the operating system is macOS on a non-browser platform")),new f.N1("isIOS",d.un,(0,e.kg)(1751,"Whether the operating system is iOS")),new f.N1("isMobile",d.Fr,(0,e.kg)(1752,"Whether the platform is a mobile web browser")),new f.N1("isDevelopment",!1,!0),new f.N1("productQualityType","",(0,e.kg)(1753,"Quality type of VS Code"));let h="inputFocus",i=new f.N1(h,!1,(0,e.kg)(1754,"Whether keyboard focus is inside an input box"))},37327:(a,b,c)=>{"use strict";c.d(b,{Bb:()=>l,Fd:()=>o,Gu:()=>m,HP:()=>n,Hz:()=>w,JO:()=>u,a:()=>t,e$:()=>s,oG:()=>x,x1:()=>r,yL:()=>v});var d=c(43765),e=c(70687),f=c(55404),g=c(95091),h=c(52491),i=c(29498),j=c(72816),k=c(76631);function l(a){return`--vscode-${a.replace(/\./g,"-")}`}function m(a){return`var(${l(a)})`}function n(a,b){return`var(${l(a)}, ${b})`}let o={ColorContribution:"base.contributions.colors"};class p extends k.jG{constructor(){super(),this._onDidChangeSchema=this._register(new g.vl),this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(a,b,c,d=!1,e){this.colorsById[a]={id:a,description:c,defaults:b,needsTransparency:d,deprecationMessage:e};let f={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return e&&(f.deprecationMessage=e),d&&(f.pattern="^#(?:(?<rgba>[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",f.patternErrorMessage=(0,j.kg)(2091,"This color must be transparent or it will obscure content")),this.colorSchema.properties[a]={description:c,oneOf:[f,{type:"string",const:"default",description:(0,j.kg)(2092,"Use the default color.")}]},this.colorReferenceSchema.enum.push(a),this.colorReferenceSchema.enumDescriptions.push(c),this._onDidChangeSchema.fire(),a}getColors(){return Object.keys(this.colorsById).map(a=>this.colorsById[a])}resolveDefaultColor(a,b){let c=this.colorsById[a];if(c?.defaults){var e;return function a(b,c){if(null===b);else if("string"==typeof b)return"#"===b[0]?f.Q1.fromHex(b):c.getColor(b);else if(b instanceof f.Q1)return b;else if("object"==typeof b)return function(b,c){switch(b.op){case 0:return a(b.value,c)?.darken(b.factor);case 1:return a(b.value,c)?.lighten(b.factor);case 2:return a(b.value,c)?.transparent(b.factor);case 7:{let d=a(b.color,c)||f.Q1.transparent,e=a(b.with,c)||f.Q1.transparent;return d.mix(e,b.ratio)}case 3:{let d=a(b.background,c);if(!d)return a(b.value,c);return a(b.value,c)?.makeOpaque(d)}case 4:for(let d of b.values){let b=a(d,c);if(b)return b}return;case 6:return a(c.defines(b.if)?b.then:b.else,c);case 5:{let d=a(b.value,c);if(!d)return;let e=a(b.background,c);if(!e)return d.transparent(b.factor*b.transparency);return d.isDarkerThan(e)?f.Q1.getLighterColor(d,e,b.factor).transparent(b.transparency):f.Q1.getDarkerColor(d,e,b.factor).transparent(b.transparency)}default:throw(0,d.xb)()}}(b,c)}(null!==(e=c.defaults)&&"object"==typeof e&&"light"in e&&"dark"in e?c.defaults[b.type]:c.defaults,b)}}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort((a,b)=>{let c=+(-1!==a.indexOf(".")),d=+(-1!==b.indexOf("."));return c!==d?c-d:a.localeCompare(b)}).map(a=>`- \`${a}\`: ${this.colorsById[a].description}`).join("\n")}}let q=new p;function r(a,b,c,d,e){return q.registerColor(a,b,c,d,e)}function s(a,b){return{op:0,value:a,factor:b}}function t(a,b){return{op:1,value:a,factor:b}}function u(a,b){return{op:2,value:a,factor:b}}function v(...a){return{op:4,values:a}}function w(a,b,c){return{op:6,if:a,then:b,else:c}}function x(a,b,c,d){return{op:5,value:a,background:b,factor:c,transparency:d}}i.O.add(o.ColorContribution,q);let y="vscode://schemas/workbench-colors",z=i.O.as(h.F.JSONContribution);z.registerSchema(y,q.getColorSchema());let A=new e.uC(()=>z.notifySchemaChanged(y),200);q.onDidChangeSchema(()=>{A.isScheduled()||A.schedule()})},37758:(a,b,c)=>{"use strict";c.d(b,{IR:()=>k,KW:()=>r});var d=c(66036),e=c(95091),f=c(76631),g=c(18216),h=c(26529);let i="default",j=!1;function k(a){g.HZ&&(j||(j=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(a.message))}class l{constructor(a,b,c,d,e){this.vsWorker=a,this.req=b,this.channel=c,this.method=d,this.args=e,this.type=0}}class m{constructor(a,b,c,d){this.vsWorker=a,this.seq=b,this.res=c,this.err=d,this.type=1}}class n{constructor(a,b,c,d,e){this.vsWorker=a,this.req=b,this.channel=c,this.eventName=d,this.arg=e,this.type=2}}class o{constructor(a,b,c){this.vsWorker=a,this.req=b,this.event=c,this.type=3}}class p{constructor(a,b){this.vsWorker=a,this.req=b,this.type=4}}class q{constructor(a){this._workerId=-1,this._handler=a,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(a){this._workerId=a}async sendMessage(a,b,c){let d=String(++this._lastSentReq);return new Promise((e,f)=>{this._pendingReplies[d]={resolve:e,reject:f},this._send(new l(this._workerId,d,a,b,c))})}listen(a,b,c){let d=null,f=new e.vl({onWillAddFirstListener:()=>{d=String(++this._lastSentReq),this._pendingEmitters.set(d,f),this._send(new n(this._workerId,d,a,b,c))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(d),this._send(new p(this._workerId,d)),d=null}});return f.event}handleMessage(a){a&&a.vsWorker&&(-1===this._workerId||a.vsWorker===this._workerId)&&this._handleMessage(a)}createProxyToRemoteChannel(a,b){return new Proxy(Object.create(null),{get:(c,d)=>("string"!=typeof d||c[d]||(t(d)?c[d]=b=>this.listen(a,d,b):s(d)?c[d]=this.listen(a,d,void 0):36===d.charCodeAt(0)&&(c[d]=async(...c)=>(await b?.(),this.sendMessage(a,d,c)))),c[d])})}_handleMessage(a){switch(a.type){case 1:return this._handleReplyMessage(a);case 0:return this._handleRequestMessage(a);case 2:return this._handleSubscribeEventMessage(a);case 3:return this._handleEventMessage(a);case 4:return this._handleUnsubscribeEventMessage(a)}}_handleReplyMessage(a){if(!this._pendingReplies[a.seq])return void console.warn("Got reply to unknown seq");let b=this._pendingReplies[a.seq];if(delete this._pendingReplies[a.seq],a.err){let c=a.err;if(a.err.$isError){let b=Error();b.name=a.err.name,b.message=a.err.message,b.stack=a.err.stack,c=b}b.reject(c);return}b.resolve(a.res)}_handleRequestMessage(a){let b=a.req;this._handler.handleMessage(a.channel,a.method,a.args).then(a=>{this._send(new m(this._workerId,b,a,void 0))},a=>{a.detail instanceof Error&&(a.detail=(0,d.cU)(a.detail)),this._send(new m(this._workerId,b,void 0,(0,d.cU)(a)))})}_handleSubscribeEventMessage(a){let b=a.req,c=this._handler.handleEvent(a.channel,a.eventName,a.arg)(a=>{this._send(new o(this._workerId,b,a))});this._pendingEvents.set(b,c)}_handleEventMessage(a){let b=this._pendingEmitters.get(a.req);void 0===b?console.warn("Got event for unknown req"):b.fire(a.event)}_handleUnsubscribeEventMessage(a){let b=this._pendingEvents.get(a.req);void 0===b?console.warn("Got unsubscribe for unknown req"):(b.dispose(),this._pendingEvents.delete(a.req))}_send(a){let b=[];if(0===a.type)for(let c=0;c<a.args.length;c++){let d=a.args[c];d instanceof ArrayBuffer&&b.push(d)}else 1===a.type&&a.res instanceof ArrayBuffer&&b.push(a.res);this._handler.sendMessage(a,b)}}class r extends f.jG{constructor(a){super(),this._localChannels=new Map,this._worker=this._register(a),this._register(this._worker.onMessage(a=>{this._protocol.handleMessage(a)})),this._register(this._worker.onError(a=>{k(a),(0,d.dz)(a)})),this._protocol=new q({sendMessage:(a,b)=>{this._worker.postMessage(a,b)},handleMessage:(a,b,c)=>this._handleMessage(a,b,c),handleEvent:(a,b,c)=>this._handleEvent(a,b,c)}),this._protocol.setWorkerId(this._worker.getId()),this._onModuleLoaded=this._protocol.sendMessage(i,"$initialize",[this._worker.getId()]).then(()=>{}),this.proxy=this._protocol.createProxyToRemoteChannel(i,async()=>{await this._onModuleLoaded}),this._onModuleLoaded.catch(a=>{this._onError("Worker failed to load ",a)})}_handleMessage(a,b,c){let d=this._localChannels.get(a);if(!d)return Promise.reject(Error(`Missing channel ${a} on main thread`));let e=d[b];if("function"!=typeof e)return Promise.reject(Error(`Missing method ${b} on main thread channel ${a}`));try{return Promise.resolve(e.apply(d,c))}catch(a){return Promise.reject(a)}}_handleEvent(a,b,c){let d=this._localChannels.get(a);if(!d)throw Error(`Missing channel ${a} on main thread`);if(t(b)){let e=d[b];if("function"!=typeof e)throw Error(`Missing dynamic event ${b} on main thread channel ${a}.`);let f=e.call(d,c);if("function"!=typeof f)throw Error(`Missing dynamic event ${b} on main thread channel ${a}.`);return f}if(s(b)){let c=d[b];if("function"!=typeof c)throw Error(`Missing event ${b} on main thread channel ${a}.`);return c}throw Error(`Malformed event name ${b}`)}setChannel(a,b){this._localChannels.set(a,b)}_onError(a,b){console.error(a),console.info(b)}}function s(a){return"o"===a[0]&&"n"===a[1]&&(0,h.Wv)(a.charCodeAt(2))}function t(a){return/^onDynamic/.test(a)&&(0,h.Wv)(a.charCodeAt(9))}},37788:(a,b,c)=>{"use strict";c.d(b,{$b:()=>e,Cr:()=>t,DA:()=>x,Dk:()=>u,rr:()=>o,xd:()=>p});var d,e,f=c(95091),g=c(40427),h=c(76631),i=c(17577),j=c(50498),k=c(85214),l=c(54957),m=c(99187),n=c(58254);let o=(0,n.u1)("logService"),p=(0,n.u1)("loggerService");(d=e||(e={}))[d.Off=0]="Off",d[d.Trace=1]="Trace",d[d.Debug=2]="Debug",d[d.Info=3]="Info",d[d.Warning=4]="Warning",d[d.Error=5]="Error";let q=e.Info;function r(a,...b){(function(a){switch(a){case"debug":return console.debug;case"error":return console.error;case"info":return console.info;case"log":return console.log;case"warn":return console.warn}})(a).apply(console,b)}class s extends h.jG{constructor(){super(...arguments),this.level=q,this._onDidChangeLogLevel=this._register(new f.vl)}get onDidChangeLogLevel(){return this._onDidChangeLogLevel.event}setLevel(a){this.level!==a&&(this.level=a,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(a){var b;return b=this.level,b!==e.Off&&b<=a}canLog(a){return!this._store.isDisposed&&this.checkLogLevel(a)}}class t extends s{constructor(a=q,b=!0){super(),this.useColors=b,this.setLevel(a)}trace(a,...b){this.canLog(e.Trace)&&(this.useColors?r("log","%cTRACE","color: #888",a,...b):r("log",a,...b))}debug(a,...b){this.canLog(e.Debug)&&(this.useColors?r("log","%cDEBUG","background: #eee; color: #888",a,...b):r("log",a,...b))}info(a,...b){this.canLog(e.Info)&&(this.useColors?r("log","%c INFO","color: #33f",a,...b):r("log",a,...b))}warn(a,...b){this.canLog(e.Warning)&&(this.useColors?r("warn","%c WARN","color: #993",a,...b):r("log",a,...b))}error(a,...b){this.canLog(e.Error)&&(this.useColors?r("error","%c ERR","color: #f33",a,...b):r("error",a,...b))}}class u extends s{constructor(a){super(),this.loggers=a,a.length&&this.setLevel(a[0].getLevel())}setLevel(a){for(let b of this.loggers)b.setLevel(a);super.setLevel(a)}trace(a,...b){for(let c of this.loggers)c.trace(a,...b)}debug(a,...b){for(let c of this.loggers)c.debug(a,...b)}info(a,...b){for(let c of this.loggers)c.info(a,...b)}warn(a,...b){for(let c of this.loggers)c.warn(a,...b)}error(a,...b){for(let c of this.loggers)c.error(a,...b)}dispose(){for(let a of this.loggers)a.dispose();super.dispose()}}class v extends h.jG{constructor(a,b,c){if(super(),this.logLevel=a,this.logsHome=b,this._loggers=new i.fT,this._onDidChangeLoggers=this._register(new f.vl),this._onDidChangeVisibility=this._register(new f.vl),c)for(const a of c)this._loggers.set(a.resource,{logger:void 0,info:a})}getLoggerEntry(a){return(0,k.Kg)(a)?[...this._loggers.values()].find(b=>b.info.id===a):this._loggers.get(a)}createLogger(a,b){let c=this.toResource(a),d=(0,k.Kg)(a)?a:b?.id??(0,g.tW)(c.toString()).toString(16),f=this._loggers.get(c)?.logger,h=b?.logLevel==="always"?e.Trace:b?.logLevel;f||(f=this.doCreateLogger(c,h??this.getLogLevel(c)??this.logLevel,{...b,id:d}));let i={logger:f,info:{resource:c,id:d,logLevel:h,name:b?.name,hidden:b?.hidden,group:b?.group,extensionId:b?.extensionId,when:b?.when}};return this.registerLogger(i.info),this._loggers.set(c,i),f}toResource(a){return(0,k.Kg)(a)?(0,j.uJ)(this.logsHome,`${a.replace(/[\\/:\*\?"<>\|]/g,"")}.log`):a}setVisibility(a,b){let c=this.getLoggerEntry(a);c&&!c.info.hidden!==b&&(c.info.hidden=!b,this._loggers.set(c.info.resource,c),this._onDidChangeVisibility.fire([c.info.resource,b]))}getLogLevel(a){let b;return a&&(b=this._loggers.get(a)?.info.logLevel),b??this.logLevel}registerLogger(a){let b=this._loggers.get(a.resource);b?b.info.hidden!==a.hidden&&this.setVisibility(a.resource,!a.hidden):(this._loggers.set(a.resource,{info:a,logger:void 0}),this._onDidChangeLoggers.fire({added:[a],removed:[]}))}dispose(){this._loggers.forEach(a=>a.logger?.dispose()),this._loggers.clear(),super.dispose()}}class w{constructor(){this.onDidChangeLogLevel=new f.vl().event}setLevel(a){}getLevel(){return e.Info}trace(a){}debug(a){}info(a){}warn(a){}error(a){}dispose(){}}class x extends v{constructor(){super(e.Off,l.r.parse("log:///log"))}doCreateLogger(a,b,c){return new w}}new m.N1("logLevel",function(a){switch(a){case e.Trace:return"trace";case e.Debug:return"debug";case e.Info:return"info";case e.Warning:return"warn";case e.Error:return"error";case e.Off:return"off"}}(e.Info))},37814:(a,b,c)=>{"use strict";c.d(b,{KG:()=>i,vx:()=>j});var d=c(39870),e=c(75082),f=c(76631),g=c(35001),h=c(18216);function i(a){if((0,e.sb)(a)){let b=(0,e.BK)(a),c=(0,e.mU)(a);return{top:b.top*c,left:b.left*c,width:b.width*c,height:b.height*c}}return a&&"number"==typeof a.x&&"number"==typeof a.y?{top:a.y,left:a.x,width:a.width||1,height:a.height||2}:{top:a.posy,left:a.posx,width:2,height:2}}c(50157);class j extends f.jG{static{this.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"]}static{this.BUBBLE_DOWN_EVENTS=["click"]}constructor(a,b){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=f.jG.None,this.toDisposeOnSetContainer=f.jG.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=(0,e.$)(".context-view"),(0,e.jD)(this.view),this.setContainer(a,b),this._register((0,f.s)(()=>this.setContainer(null,1)))}setContainer(a,b){this.useFixedPosition=1!==b;let c=this.useShadowDOM;if(this.useShadowDOM=3===b,(a!==this.container||c!==this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null),this.container=null),a)){if(this.container=a,this.useShadowDOM){this.shadowRootHostElement=(0,e.$)(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});let a=document.createElement("style");a.textContent=k,this.shadowRoot.appendChild(a),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild((0,e.$)("slot"))}else this.container.appendChild(this.view);let b=new f.Cm;j.BUBBLE_UP_EVENTS.forEach(a=>{b.add((0,e.un)(this.container,a,a=>{this.onDOMEvent(a,!1)}))}),j.BUBBLE_DOWN_EVENTS.forEach(a=>{b.add((0,e.un)(this.container,a,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=b}}show(a){this.isVisible()&&this.hide(),(0,e.w_)(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(a.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",(0,e.WU)(this.view),this.toDisposeOnClean=a.render(this.view)||f.jG.None,this.delegate=a,this.doLayout(),this.delegate.focus?.()}getViewElement(){return this.view}layout(){if(this.isVisible()){if(!1===this.delegate.canRelayout&&!(h.un&&d.e.pointerEvents))return void this.hide();this.delegate?.layout?.(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let a=i(this.delegate.getAnchor()),b=this.container?(0,e.zk)(this.container):(0,e.fz)(),c={top:b.pageYOffset,left:b.pageXOffset,width:b.innerWidth,height:b.innerHeight},d={width:(0,e.Tr)(this.view),height:(0,e.OK)(this.view)},f=this.delegate.anchorPosition,h=this.delegate.anchorAlignment,j=this.delegate.anchorAxisAlignment,{top:k,left:l}=(0,g.$P)(c,d,a,{anchorAlignment:h,anchorPosition:f,anchorAxisAlignment:j});this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===f?"bottom":"top"),this.view.classList.add(0===h?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);let m=(0,e.BK)(this.container),n=this.container.scrollTop||0,o=this.container.scrollLeft||0;this.view.style.top=`${k-(this.useFixedPosition?(0,e.BK)(this.view).top:m.top)+n}px`,this.view.style.left=`${l-(this.useFixedPosition?(0,e.BK)(this.view).left:m.left)+o}px`,this.view.style.width="initial"}hide(a){let b=this.delegate;this.delegate=null,b?.onHide&&b.onHide(a);let c=this.toDisposeOnClean;this.toDisposeOnClean=f.jG.None,c.dispose(),(0,e.jD)(this.view)}isVisible(){return!!this.delegate}onDOMEvent(a,b){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(a,(0,e.zk)(a).document.activeElement):b&&!(0,e.QX)(a.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}let k=`
14
+ |${" --- |".repeat(b)}`)}}(a.slice(b));break}}let d=a.length-1;for(;d>=0&&("space"===a[d].type||"html"===a[d].type);)d--;let e=d>=0?a[d]:void 0,f=a.slice(d+1);if(!c&&e?.type==="list"){let a=function(a){let b,c=a.items[a.items.length-1],d=c.tokens?c.tokens[c.tokens.length-1]:void 0,e=a=>{let b=a.items.at(-1),c=b?.tokens.at(-1);return c?.type==="heading"||c?.type==="list"&&e(c)};if(d?.type!=="text"||"inRawBlock"in c){if(e(a)){let b=aq(a.raw.trim()+" &nbsp;")[0];if("list"!==b.type)return;return b}}else b=aO(d);if(!b||"paragraph"!==b.type)return;let f=aN(a.items.slice(0,-1)),g=c.raw.match(/^(\s*(-|\d+\.|\*) +)/)?.[0];if(!g)return;let h=aq(f+(g+aN(c.tokens.slice(0,-1))+b.raw))[0];if("list"===h.type)return h}(e);a&&(c=[a,...f],b=d)}if(!c&&e?.type==="paragraph"){let a=aO(e);a&&(c=[a,...f],b=d)}if(c){let d=[...a.slice(0,b),...c];return d.links=a.links,d}let g=a.at(-1);if(g?.type==="heading"){let b=function(a,b){if(a.raw.match(/-\s*$/))return aq(b+" &nbsp;")}(g,aN(a));if(b)return b}return null}(a);if(b)a=b;else break}return a}(t.lexer(x,a));p=t.parser(c,a)}else p=t.parse(x,{...b?.markedOptions,renderer:u,async:!1});a.supportThemeIcons&&(p=(0,aB.n)(p).map(a=>"string"==typeof a?a:a.outerHTML).join(""));let y=document.createElement("div"),z=aK(a,b.sanitizerConfig??{});if((0,ay.D$)(y,p,z),function(a,b,c){for(let d of c.querySelectorAll("img, audio, video, source")){let c=d.getAttribute("src");if(c){let e=c;try{a.baseUri&&(e=aH(aw.r.from(a.baseUri),e))}catch(a){}if(d.setAttribute("src",aF(a,e,!0)),b.sanitizerConfig?.remoteImageIsAllowed){let a=aw.r.parse(e);a.scheme===as.ny.file||a.scheme===as.ny.data||b.sanitizerConfig.remoteImageIsAllowed(a)||d.replaceWith((0,ax.$)("",void 0,d.outerHTML))}}}for(let b of c.querySelectorAll("a")){let c=b.getAttribute("href");if(b.setAttribute("href",""),!c||/^data:|javascript:/i.test(c)||/^command:/i.test(c)&&!a.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(c))b.replaceWith(...b.childNodes);else{let d=aF(a,c,!1);a.baseUri&&(d=aH(aw.r.from(a.baseUri),c)),b.dataset.href=d}}}(a,b,y),c?(q=c,(0,ax.Ln)(c,...y.childNodes)):q=y,v.length>0)Promise.all(v).then(a=>{if(s)return;let c=new Map(a);for(let a of q.querySelectorAll("div[data-code]")){let b=c.get(a.dataset.code??"");b&&(0,ax.Ln)(a,b)}b.asyncRenderCallback?.()});else if(w.length>0){let a=new Map(w);for(let b of q.querySelectorAll("div[data-code]")){let c=a.get(b.dataset.code??"");c&&(0,ax.Ln)(b,c)}}if(b.asyncRenderCallback)for(let a of q.getElementsByTagName("img")){let c=r.add((0,ax.ko)(a,"load",()=>{c.dispose(),b.asyncRenderCallback()}))}if(b.actionHandler){let c=c=>{let d=new aA.P((0,ax.zk)(q),c);(d.leftButton||d.middleButton)&&aE(a,b,d)};r.add((0,ax.ko)(q,"click",c)),r.add((0,ax.ko)(q,"auxclick",c)),r.add((0,ax.ko)(q,"keydown",c=>{let d=new az.Z(c);(d.equals(10)||d.equals(3))&&aE(a,b,d)}))}for(let a of[...q.getElementsByTagName("input")])if(a.attributes.getNamedItem("type")?.value==="checkbox")a.setAttribute("disabled","");else if(b.sanitizerConfig?.replaceWithPlaintext){let b=(0,ay.cZ)(a);b?a.parentElement?.replaceChild(b,a):a.remove()}else a.remove();return{element:q,dispose:()=>{s=!0,r.dispose()}}}function aE(a,b,c){let e=c.target.closest("a[data-href]");if((0,ax.sb)(e))try{let c=e.dataset.href;c&&(a.baseUri&&(c=aH(aw.r.from(a.baseUri),c)),b.actionHandler?.(c,a))}catch(a){(0,d.dz)(a)}finally{c.preventDefault(),c.stopPropagation()}}function aF(a,b,c){let d=a.uris&&a.uris[b],e=aw.r.revive(d);return c?b.startsWith(as.ny.data+":")?b:(e||(e=aw.r.parse(b)),as.zl.uriToBrowserUri(e).toString(!0)):e&&aw.r.parse(b).toString()!==e.toString()?(e.query&&(e=e.with({query:function(a,b){let c;try{c=(0,ar.qg)(decodeURIComponent(b))}catch(a){}return c?encodeURIComponent(JSON.stringify(c=(0,at.PI)(c,b=>a.uris&&a.uris[b]?aw.r.revive(a.uris[b]):void 0))):b}(a,e.query)})),e.toString()):b}function aG(a){if(!a)return"";let b=a.split(/[\s+|:|,|\{|\?]/,1);return b.length?b[0]:a}function aH(a,b){return/^\w[\w\d+.-]*:/.test(b)?b:a.path.endsWith("/")?(0,au.o1)(a,b).toString():(0,au.o1)((0,au.pD)(a),b).toString()}let aI=Object.freeze([...ay.TT,"input"]),aJ=Object.freeze(["align","autoplay","alt","colspan","controls","draggable","height","href","loop","muted","playsinline","poster","rowspan","src","target","title","type","width","start","checked","disabled","value","data-code","data-href","data-severity",{attributeName:"style",shouldKeep:(a,b)=>"SPAN"===a.tagName&&"style"===b.attrName&&/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z0-9]+)+\));)?(border-radius:[0-9]+px;)?$/.test(b.attrValue)},{attributeName:"class",shouldKeep:(a,b)=>"SPAN"===a.tagName&&"class"===b.attrName&&/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(b.attrValue)}]);function aK(a,b){let c=a.isTrusted??!1,d=[as.ny.http,as.ny.https,as.ny.mailto,as.ny.file,as.ny.vscodeFileResource,as.ny.vscodeRemote,as.ny.vscodeRemoteResource,as.ny.vscodeNotebookCell,as.ny.internal];return c&&d.push(as.ny.command),b.allowedLinkSchemes?.augment&&d.push(...b.allowedLinkSchemes.augment),{allowedTags:{override:b.allowedTags?.override??aI},allowedAttributes:{override:b.allowedAttributes?.override??aJ},allowedLinkProtocols:{override:d},allowRelativeLinkPaths:!!a.baseUri,allowedMediaProtocols:{override:[as.ny.http,as.ny.https,as.ny.data,as.ny.file,as.ny.vscodeFileResource,as.ny.vscodeRemote,as.ny.vscodeRemoteResource]},allowRelativeMediaPaths:!!a.baseUri,replaceWithPlaintext:b.replaceWithPlaintext}}function aL(a,b){let c;if("string"==typeof a)return a;let d=a.value??"";return d.length>1e5&&(d=`${d.substr(0,1e5)}…`),(function(a,b,c={}){let d=aK(b,c);return(0,ay.pn)(a,d)})(ap(d,{async:!1,renderer:((c=new aj).code=({text:a})=>(0,av.ih)(a),c.blockquote=({text:a})=>a+"\n",c.html=a=>"",c.heading=function({tokens:a}){return this.parser.parseInline(a)+"\n"},c.hr=()=>"",c.list=function({items:a}){return a.map(a=>this.listitem(a)).join("\n")+"\n"},c.listitem=({text:a})=>a+"\n",c.paragraph=function({tokens:a}){return this.parser.parseInline(a)+"\n"},c.table=function({header:a,rows:b}){return a.map(a=>this.tablecell(a)).join(" ")+"\n"+b.map(a=>a.map(a=>this.tablecell(a)).join(" ")).join("\n")+"\n"},c.tablerow=({text:a})=>a,c.tablecell=function({tokens:a}){return this.parser.parseInline(a)},c.strong=({text:a})=>a,c.em=({text:a})=>a,c.codespan=({text:a})=>a,c.br=a=>"\n",c.del=({text:a})=>a,c.image=a=>"",c.text=({text:a})=>a,c.link=({text:a})=>a,c)}),{isTrusted:!1},{}).toString().replace(/&(#\d+|[a-zA-Z]+);/g,a=>aM.get(a)??a).trim()}let aM=new Map([["&quot;",'"'],["&nbsp;"," "],["&amp;","&"],["&#39;","'"],["&lt;","<"],["&gt;",">"]]);function aN(a){let b="";return a.forEach(a=>{b+=a.raw}),b}function aO(a){if(a.tokens)for(let b=a.tokens.length-1;b>=0;b--){let c=a.tokens[b];if("text"===c.type){let d=c.raw.split("\n"),e=d[d.length-1];if(e.includes("`"))return aP(a,"`");if(e.includes("**"))return aP(a,"**");if(e.match(/\*\w/))return aP(a,"*");else if(e.match(/(^|\s)__\w/))return aP(a,"__");else if(e.match(/(^|\s)_\w/))return aP(a,"_");else if(e.match(/(^|\s)\[.*\]\(\w*/)||e.match(/^[^\[]*\]\([^\)]*$/)&&a.tokens.slice(0,b).some(a=>"text"===a.type&&a.raw.match(/\[[^\]]*$/))){let c=a.tokens.slice(b+1);if(c[0]?.type==="link"&&c[1]?.type==="text"&&c[1].raw.match(/^ *"[^"]*$/)||e.match(/^[^"]* +"[^"]*$/))return aP(a,'")',!1);return aP(a,")",!1)}else if(e.match(/(^|\s)\[\w*[^\]]*$/))return aP(a,"](https://microsoft.com)",!1)}}}function aP(a,b,c=!0){let d=aN(Array.isArray(a)?a:[a]);return aq((c?d.trimEnd():d)+b)[0]}},31622:(a,b,c)=>{"use strict";c.d(b,{G:()=>q,r:()=>v});var d=c(47322),e=c(61556),f=c(18216),g=c(51027);class h{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(a,b){a.selectNodeContents(b)}static _readClientRects(a,b,c,d,e){let f=this._createRange();try{return f.setStart(a,b),f.setEnd(c,d),f.getClientRects()}catch(a){return null}finally{this._detachRange(f,e)}}static _mergeAdjacentRanges(a){if(1===a.length)return a;a.sort(g.IO.compare);let b=[],c=0,d=a[0];for(let e=1,f=a.length;e<f;e++){let f=a[e];d.left+d.width+.9>=f.left?d.width=Math.max(d.width,f.left+f.width-d.left):(b[c++]=d,d=f)}return b[c++]=d,b}static _createHorizontalRangesFromClientRects(a,b,c){if(!a||0===a.length)return null;let d=[];for(let e=0,f=a.length;e<f;e++){let f=a[e];d[e]=new g.IO(Math.max(0,(f.left-b)/c),f.width/c)}return this._mergeAdjacentRanges(d)}static readHorizontalRanges(a,b,c,d,e,f){let g=a.children.length-1;if(0>g)return null;if((b=Math.min(g,Math.max(0,b)))===(d=Math.min(g,Math.max(0,d)))&&c===e&&0===c&&!a.children[b].firstChild){let c=a.children[b].getClientRects();return f.markDidDomLayout(),this._createHorizontalRangesFromClientRects(c,f.clientRectDeltaLeft,f.clientRectScale)}b!==d&&d>0&&0===e&&(d--,e=0x40000000);let h=a.children[b].firstChild,i=a.children[d].firstChild;if(h&&i||(!h&&0===c&&b>0&&(h=a.children[b-1].firstChild,c=0x40000000),!i&&0===e&&d>0&&(i=a.children[d-1].firstChild,e=0x40000000)),!h||!i)return null;c=Math.min(h.textContent.length,Math.max(0,c)),e=Math.min(i.textContent.length,Math.max(0,e));let j=this._readClientRects(h,c,i,e,f.endNode);return f.markDidDomLayout(),this._createHorizontalRangesFromClientRects(j,f.clientRectDeltaLeft,f.clientRectScale)}}var i=c(21762),j=c(32920),k=c(98030),l=c(21495),m=c(39482),n=c(94630);let o=!!f.ib||!f.j9&&!d.gm&&!d.nr,p=!0;class q{static{this.CLASS_NAME="view-line"}constructor(a,b){this._viewGpuContext=a,this._options=b,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(a){if(this._renderedViewLine)this._renderedViewLine.domNode=(0,e.Z)(a);else throw Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(a){this._isMaybeInvalid=!0,this._options=a}onSelectionChanged(){return(!!(0,k.Bb)(this._options.themeType)||this._renderedViewLine?.input.renderWhitespace===2)&&(this._isMaybeInvalid=!0,!0)}renderLine(a,b,c,d,e){if(this._options.useGpu&&this._viewGpuContext?.canRender(this._options,d,a))return this._renderedViewLine?.domNode?.domNode.remove(),this._renderedViewLine=null,!1;if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;let f=d.getViewLineRenderingData(a),g=this._options,h=i.d.filter(f.inlineDecorations,a,f.minColumn,f.maxColumn),s="off"===g.experimentalWhitespaceRendering?g.renderWhitespace:"none",t=!f.hasVariableFonts,v=null;if((0,k.Bb)(g.themeType)||"selection"===s)for(let b of d.selections){if(b.endLineNumber<a||b.startLineNumber>a)continue;let c=b.startLineNumber===a?b.startColumn:f.minColumn,d=b.endLineNumber===a?b.endColumn:f.maxColumn;c<d&&((0,k.Bb)(g.themeType)&&h.push(new i.d(c,d,"inline-selected-text",0)),"selection"===s&&(v||(v=[]),v.push(new m.L(c-1,d-1))))}let w=new j.zL(g.useMonospaceOptimizations,g.canUseHalfwidthRightwardsArrow,f.content,f.continuesWithWrappedLine,f.isBasicASCII,f.containsRTL,f.minColumn-1,f.tokens,h,f.tabSize,f.startVisibleColumn,g.spaceWidth,g.middotWidth,g.wsmiddotWidth,g.stopRenderingLineAfter,s,g.renderControlCharacters,g.fontLigatures!==l.Bc.OFF,v,f.textDirection,g.verticalScrollbarSize);if(this._renderedViewLine&&this._renderedViewLine.input.equals(w))return!1;e.appendString("<div "),f.textDirection===n.z4.RTL?e.appendString('dir="rtl" '):f.containsRTL&&e.appendString('dir="ltr" '),e.appendString('style="top:'),e.appendString(String(b)),e.appendString("px;height:"),e.appendString(String(c)),e.appendString("px;line-height:"),e.appendString(String(c)),f.textDirection===n.z4.RTL&&(e.appendString("px;padding-right:"),e.appendString(String(g.verticalScrollbarSize))),e.appendString('px;" class="'),e.appendString(q.CLASS_NAME),e.appendString('">');let x=(0,j.UW)(w,e);e.appendString("</div>");let y=null;return t&&p&&o&&f.isBasicASCII&&w.isLTR&&g.useMonospaceOptimizations&&0===x.containsForeignElements&&(y=new r(this._renderedViewLine?this._renderedViewLine.domNode:null,w,x.characterMapping)),y||(y=u(this._renderedViewLine?this._renderedViewLine.domNode:null,w,x.characterMapping,x.containsForeignElements)),this._renderedViewLine=y,!0}layoutLine(a,b,c){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(b),this._renderedViewLine.domNode.setHeight(c),this._renderedViewLine.domNode.setLineHeight(c))}isRenderedRTL(){return!!this._renderedViewLine&&this._renderedViewLine.input.textDirection===n.z4.RTL}getWidth(a){return this._renderedViewLine?this._renderedViewLine.getWidth(a):0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof r}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof r?this._renderedViewLine.monospaceAssumptionsAreValid():p}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof r&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(a,b,c,d){if(!this._renderedViewLine)return null;b=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,b)),c=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,c));let e=this._renderedViewLine.input.stopRenderingLineAfter;if(-1!==e&&b>e+1&&c>e+1)return new g.pj(!0,[new g.IO(this.getWidth(d),0)]);-1!==e&&b>e+1&&(b=e+1),-1!==e&&c>e+1&&(c=e+1);let f=this._renderedViewLine.getVisibleRangesForRange(a,b,c,d);return f&&f.length>0?new g.pj(!1,f):null}getColumnOfNodeOffset(a,b){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(a,b):1}resetCachedWidth(){this._renderedViewLine?.resetCachedWidth()}}class r{constructor(a,b,c){this._cachedWidth=-1,this.domNode=a,this.input=b;const d=Math.floor(b.lineContent.length/300);if(d>0){this._keyColumnPixelOffsetCache=new Float32Array(d);for(let a=0;a<d;a++)this._keyColumnPixelOffsetCache[a]=-1}else this._keyColumnPixelOffsetCache=null;this._characterMapping=c,this._charWidth=b.spaceWidth}getWidth(a){if(!this.domNode||this.input.lineContent.length<300){let a=this._characterMapping.getHorizontalOffset(this._characterMapping.length);return Math.round(this._charWidth*a)}return -1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,a?.markDidDomLayout()),this._cachedWidth}getWidthIsFast(){return this.input.lineContent.length<300||-1!==this._cachedWidth}resetCachedWidth(){this._cachedWidth=-1}monospaceAssumptionsAreValid(){return this.domNode?(this.input.lineContent.length<300&&Math.abs(this.getWidth(null)-this.domNode.domNode.firstChild.offsetWidth)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),p=!1),p):p}toSlowRenderedLine(){return u(this.domNode,this.input,this._characterMapping,0)}getVisibleRangesForRange(a,b,c,d){let e=this._getColumnPixelOffset(a,b,d),f=this._getColumnPixelOffset(a,c,d);return[new g.IO(e,f-e)]}_getColumnPixelOffset(a,b,c){if(b<=300){let a=this._characterMapping.getHorizontalOffset(b);return this._charWidth*a}let d=Math.floor((b-1)/300)-1,e=(d+1)*300+1,f=-1;if(this._keyColumnPixelOffsetCache&&-1===(f=this._keyColumnPixelOffsetCache[d])&&(f=this._actualReadPixelOffset(a,e,c),this._keyColumnPixelOffsetCache[d]=f),-1===f){let a=this._characterMapping.getHorizontalOffset(b);return this._charWidth*a}let g=this._characterMapping.getHorizontalOffset(e),h=this._characterMapping.getHorizontalOffset(b);return f+this._charWidth*(h-g)}_getReadingTarget(a){return a.domNode.firstChild}_actualReadPixelOffset(a,b,c){if(!this.domNode)return -1;let d=this._characterMapping.getDomPosition(b),e=h.readHorizontalRanges(this._getReadingTarget(this.domNode),d.partIndex,d.charIndex,d.partIndex,d.charIndex,c);return e&&0!==e.length?e[0].left:-1}getColumnOfNodeOffset(a,b){return v(this._characterMapping,a,b)}}class s{constructor(a,b,c,d){if(this.domNode=a,this.input=b,this._characterMapping=c,this._isWhitespaceOnly=/^\s*$/.test(b.lineContent),this._containsForeignElements=d,this._cachedWidth=-1,this._pixelOffsetCache=null,b.isLTR){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let a=0,b=this._characterMapping.length;a<=b;a++)this._pixelOffsetCache[a]=-1}}_getReadingTarget(a){return a.domNode.firstChild}getWidth(a){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,a?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return -1!==this._cachedWidth}resetCachedWidth(){if(this._cachedWidth=-1,null!==this._pixelOffsetCache)for(let a=0,b=this._pixelOffsetCache.length;a<b;a++)this._pixelOffsetCache[a]=-1}getVisibleRangesForRange(a,b,c,d){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){let e=this._readPixelOffset(this.domNode,a,b,d);if(-1===e)return null;let f=this._readPixelOffset(this.domNode,a,c,d);return -1===f?null:[new g.IO(e,f-e)]}return this._readVisibleRangesForRange(this.domNode,a,b,c,d)}_readVisibleRangesForRange(a,b,c,d,e){if(c!==d)return this._readRawVisibleRangesForRange(a,c,d,e);{let d=this._readPixelOffset(a,b,c,e);return -1===d?null:[new g.IO(d,0)]}}_readPixelOffset(a,b,c,d){if(this.input.isLTR&&0===this._characterMapping.length){if(0===this._containsForeignElements||2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth(d);let b=this._getReadingTarget(a);return b.firstChild?(d.markDidDomLayout(),b.firstChild.offsetWidth):0}if(null!==this._pixelOffsetCache){let e=this._pixelOffsetCache[c];if(-1!==e)return e;let f=this._actualReadPixelOffset(a,b,c,d);return this._pixelOffsetCache[c]=f,f}return this._actualReadPixelOffset(a,b,c,d)}_actualReadPixelOffset(a,b,c,d){if(0===this._characterMapping.length){let b=h.readHorizontalRanges(this._getReadingTarget(a),0,0,0,0,d);return b&&0!==b.length?b[0].left:-1}if(this.input.isLTR&&c===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth(d);let e=this._characterMapping.getDomPosition(c),f=h.readHorizontalRanges(this._getReadingTarget(a),e.partIndex,e.charIndex,e.partIndex,e.charIndex,d);if(!f||0===f.length)return -1;let g=f[0].left;if(this.input.isBasicASCII){let a=this._characterMapping.getHorizontalOffset(c),b=Math.round(this.input.spaceWidth*a);if(1>=Math.abs(b-g))return b}return g}_readRawVisibleRangesForRange(a,b,c,d){if(this.input.isLTR&&1===b&&c===this._characterMapping.length)return[new g.IO(0,this.getWidth(d))];let e=this._characterMapping.getDomPosition(b),f=this._characterMapping.getDomPosition(c);return h.readHorizontalRanges(this._getReadingTarget(a),e.partIndex,e.charIndex,f.partIndex,f.charIndex,d)}getColumnOfNodeOffset(a,b){return v(this._characterMapping,a,b)}}class t extends s{_readVisibleRangesForRange(a,b,c,d,e){let f=super._readVisibleRangesForRange(a,b,c,d,e);if(!f||0===f.length||c===d||1===c&&d===this._characterMapping.length)return f;if(this.input.isLTR){let c=this._readPixelOffset(a,b,d,e);if(-1!==c){let a=f[f.length-1];a.left<c&&(a.width=c-a.left)}}return f}}let u=d.Tc?function(a,b,c,d){return new t(a,b,c,d)}:function(a,b,c,d){return new s(a,b,c,d)};function v(a,b,c){let d=b.textContent.length,e=-1;for(;b;)b=b.previousSibling,e++;return a.getColumn(new j.wZ(e,c),d)}},32809:(a,b,c)=>{"use strict";c.d(b,{$_:()=>B,HT:()=>w,pU:()=>v});var d,e,f,g=c(70687),h=c(33040),i=c(5355),j=c(63060),k=c(95091),l=c(85214),m=c(54957),n=c(72816),o=c(52491),p=c(29498),q=c(76631);(e||(e={})).getDefinition=function(a,b){let c=a.defaults;for(;j.L.isThemeIcon(c);){let a=u.getIcon(c.id);if(!a)return;c=a.defaults}return c},(d=f||(f={})).toJSONObject=function(a){return{weight:a.weight,style:a.style,src:a.src.map(a=>({format:a.format,location:a.location.toString()}))}},d.fromJSONObject=function(a){let b=a=>(0,l.Kg)(a)?a:void 0;if(a&&Array.isArray(a.src)&&a.src.every(a=>(0,l.Kg)(a.format)&&(0,l.Kg)(a.location)))return{weight:b(a.weight),style:b(a.style),src:a.src.map(a=>({format:a.format,location:m.r.parse(a.location)}))}};let r=/^([\w_-]+)$/,s=(0,n.kg)(2093,"The font ID must only contain letters, numbers, underscores and dashes.");class t extends q.jG{constructor(){super(),this._onDidChange=this._register(new k.vl),this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,n.kg)(2094,"The id of the font to use. If not set, the font that is defined first is used."),pattern:r.source,patternErrorMessage:s},fontCharacter:{type:"string",description:(0,n.kg)(2095,"The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${j.L.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(a,b,c,d){let e=this.iconsById[a];if(e){if(c&&!e.description){e.description=c,this.iconSchema.properties[a].markdownDescription=`${c} $(${a})`;let b=this.iconReferenceSchema.enum.indexOf(a);-1!==b&&(this.iconReferenceSchema.enumDescriptions[b]=c),this._onDidChange.fire()}return e}this.iconsById[a]={id:a,description:c,defaults:b,deprecationMessage:d};let f={$ref:"#/definitions/icons"};return d&&(f.deprecationMessage=d),c&&(f.markdownDescription=`${c}: $(${a})`),this.iconSchema.properties[a]=f,this.iconReferenceSchema.enum.push(a),this.iconReferenceSchema.enumDescriptions.push(c||""),this._onDidChange.fire(),{id:a}}getIcons(){return Object.keys(this.iconsById).map(a=>this.iconsById[a])}getIcon(a){return this.iconsById[a]}getIconSchema(){return this.iconSchema}toString(){let a=(a,b)=>a.id.localeCompare(b.id),b=a=>{for(;j.L.isThemeIcon(a.defaults);)a=this.iconsById[a.defaults.id];return`codicon codicon-${a?a.id:""}`},c=[];c.push("| preview | identifier | default codicon ID | description"),c.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");let d=Object.keys(this.iconsById).map(a=>this.iconsById[a]);for(let e of d.filter(a=>!!a.description).sort(a))c.push(`|<i class="${b(e)}"></i>|${e.id}|${j.L.isThemeIcon(e.defaults)?e.defaults.id:e.id}|${e.description||""}|`);for(let e of(c.push("| preview | identifier "),c.push("| ----------- | --------------------------------- |"),d.filter(a=>!j.L.isThemeIcon(a.defaults)).sort(a)))c.push(`|<i class="${b(e)}"></i>|${e.id}|`);return c.join("\n")}}let u=new t;function v(a,b,c,d){return u.registerIcon(a,b,c,d)}function w(){return u}p.O.add("base.contributions.icons",u);let x=(0,i.J)();for(let a in x){let b="\\"+x[a].toString(16);u.registerIcon(a,{fontCharacter:b})}let y="vscode://schemas/icons",z=p.O.as(o.F.JSONContribution);z.registerSchema(y,u.getIconSchema());let A=new g.uC(()=>z.notifySchemaChanged(y),200);u.onDidChange(()=>{A.isScheduled()||A.schedule()});let B=v("widget-close",h.W.close,(0,n.kg)(2096,"Icon for the close action in widgets."));v("goto-previous-location",h.W.arrowUp,(0,n.kg)(2097,"Icon for goto previous editor location.")),v("goto-next-location",h.W.arrowDown,(0,n.kg)(2098,"Icon for goto next editor location.")),j.L.modify(h.W.sync,"spin"),j.L.modify(h.W.loading,"spin")},32920:(a,b,c)=>{"use strict";c.d(b,{wZ:()=>k,zL:()=>j,yf:()=>m,UW:()=>n,Md:()=>p});var d=c(72816),e=c(26529),f=c(50411),g=c(21762);class h{constructor(a,b,c,d){this.endIndex=a,this.type=b,this.metadata=c,this.containsRTL=d,this._linePartBrand=void 0}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}var i=c(94630);class j{get isLTR(){return!this.containsRTL&&this.textDirection!==i.z4.RTL}constructor(a,b,c,d,e,f,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w=!1){this.useMonospaceOptimizations=a,this.canUseHalfwidthRightwardsArrow=b,this.lineContent=c,this.continuesWithWrappedLine=d,this.isBasicASCII=e,this.containsRTL=f,this.fauxIndentLength=h,this.lineTokens=i,this.lineDecorations=j.sort(g.d.compare),this.tabSize=k,this.startVisibleColumn=l,this.spaceWidth=m,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===q?4:"boundary"===q?1:"selection"===q?2:3*("trailing"===q),this.renderControlCharacters=r,this.fontLigatures=s,this.selectionsOnLine=t&&t.sort((a,b)=>a.start<b.start?-1:1),this.renderNewLineWhenEmpty=w,this.textDirection=u,this.verticalScrollbarSize=v,Math.abs(o-m)<Math.abs(n-m)?(this.renderSpaceWidth=o,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=n,this.renderSpaceCharCode=183)}sameSelection(a){if(null===this.selectionsOnLine)return null===a;if(null===a||a.length!==this.selectionsOnLine.length)return!1;for(let b=0;b<this.selectionsOnLine.length;b++)if(!this.selectionsOnLine[b].equals(a[b]))return!1;return!0}equals(a){return this.useMonospaceOptimizations===a.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===a.canUseHalfwidthRightwardsArrow&&this.lineContent===a.lineContent&&this.continuesWithWrappedLine===a.continuesWithWrappedLine&&this.isBasicASCII===a.isBasicASCII&&this.containsRTL===a.containsRTL&&this.fauxIndentLength===a.fauxIndentLength&&this.tabSize===a.tabSize&&this.startVisibleColumn===a.startVisibleColumn&&this.spaceWidth===a.spaceWidth&&this.renderSpaceWidth===a.renderSpaceWidth&&this.renderSpaceCharCode===a.renderSpaceCharCode&&this.stopRenderingLineAfter===a.stopRenderingLineAfter&&this.renderWhitespace===a.renderWhitespace&&this.renderControlCharacters===a.renderControlCharacters&&this.fontLigatures===a.fontLigatures&&g.d.equalsArr(this.lineDecorations,a.lineDecorations)&&this.lineTokens.equals(a.lineTokens)&&this.sameSelection(a.selectionsOnLine)&&this.textDirection===a.textDirection&&this.verticalScrollbarSize===a.verticalScrollbarSize&&this.renderNewLineWhenEmpty===a.renderNewLineWhenEmpty}}class k{constructor(a,b){this.partIndex=a,this.charIndex=b}}class l{static getPartIndex(a){return(0xffff0000&a)>>>16}static getCharIndex(a){return(65535&a)>>>0}constructor(a,b){this.length=a,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(a,b,c,d){this._data[a-1]=(c|b<<16)>>>0,this._horizontalOffset[a-1]=d}getHorizontalOffset(a){return 0===this._horizontalOffset.length?0:this._horizontalOffset[a-1]}charOffsetToPartData(a){return 0===this.length?0:a<0?this._data[0]:a>=this.length?this._data[this.length-1]:this._data[a]}getDomPosition(a){let b=this.charOffsetToPartData(a-1);return new k(l.getPartIndex(b),l.getCharIndex(b))}getColumn(a,b){return this.partDataToCharOffset(a.partIndex,b,a.charIndex)+1}partDataToCharOffset(a,b,c){let d;if(0===this.length)return 0;let e=(c|a<<16)>>>0,f=0,g=this.length-1;for(;f+1<g;){let a=f+g>>>1,b=this._data[a];if(b===e)return a;b>e?g=a:f=a}if(f===g)return f;let h=this._data[f],i=this._data[g];if(h===e)return f;if(i===e)return g;let j=l.getPartIndex(h),k=l.getCharIndex(h);return d=j!==l.getPartIndex(i)?b:l.getCharIndex(i),c-k<=d-c?f:g}}class m{constructor(a,b){this._renderLineOutputBrand=void 0,this.characterMapping=a,this.containsForeignElements=b}}function n(a,b){if(0===a.lineContent.length){if(a.lineDecorations.length>0){b.appendString("<span>");let c=0,d=0,e=0;for(let f of a.lineDecorations)(1===f.type||2===f.type)&&(b.appendString('<span class="'),b.appendString(f.className),b.appendString('"></span>'),1===f.type&&(e|=1,c++),2===f.type&&(e|=2,d++));b.appendString("</span>");let f=new l(1,c+d);return f.setColumnInfo(1,c,0,0),new m(f,e)}return a.renderNewLineWhenEmpty?b.appendString("<span><span>\n</span></span>"):b.appendString("<span><span></span></span>"),new m(new l(0,0),0)}return function(a,b){var c;let f=a.fontIsMonospace,g=a.canUseHalfwidthRightwardsArrow,h=a.containsForeignElements,i=a.lineContent,j=a.len,k=a.isOverflowing,n=a.overflowingCharCount,o=a.parts,p=a.fauxIndentLength,q=a.tabSize,s=a.startVisibleColumn,t=a.spaceWidth,u=a.renderSpaceCharCode,v=a.renderWhitespace,w=a.renderControlCharacters,x=new l(j+1,o.length),y=!1,z=0,A=s,B=0,C=0,D=0;b.appendString("<span>");for(let a=0,c=o.length;a<c;a++){let c=o[a],d=c.endIndex,k=c.type,l=c.containsRTL,m=0!==v&&c.isWhitespace(),n=m&&!f&&("mtkw"===k||!h),s=z===d&&c.isPseudoAfter();if(B=0,b.appendString("<span "),l&&b.appendString('style="unicode-bidi:isolate" '),b.appendString('class="'),b.appendString(n?"mtkz":k),b.appendASCIICharCode(34),m){let c=0;{let a=z,b=A;for(;a<d;a++){let d=(9===i.charCodeAt(a)?q-b%q:1)|0;c+=d,a>=p&&(b+=d)}}for(n&&(b.appendString(' style="width:'),b.appendString(String(t*c)),b.appendString('px"')),b.appendASCIICharCode(62);z<d;z++){let c,d;if(x.setColumnInfo(z+1,a-D,B,C),D=0,9===i.charCodeAt(z)){d=c=q-A%q|0,!g||d>1?b.appendCharCode(8594):b.appendCharCode(65515);for(let a=2;a<=d;a++)b.appendCharCode(160)}else c=2,d=1,b.appendCharCode(u),b.appendCharCode(8204);B+=c,C+=d,z>=p&&(A+=d)}}else for(b.appendASCIICharCode(62);z<d;z++){x.setColumnInfo(z+1,a-D,B,C),D=0;let c=i.charCodeAt(z),d=1,f=1;switch(c){case 9:f=d=q-A%q;for(let a=1;a<=d;a++)b.appendCharCode(160);break;case 32:b.appendCharCode(160);break;case 60:b.appendString("&lt;");break;case 62:b.appendString("&gt;");break;case 38:b.appendString("&amp;");break;case 0:w?b.appendCharCode(9216):b.appendString("&#00;");break;case 65279:case 8232:case 8233:case 133:b.appendCharCode(65533);break;default:(0,e.ne)(c)&&f++,w&&c<32?b.appendCharCode(9216+c):w&&127===c?b.appendCharCode(9249):w&&r(c)?(b.appendString("[U+"),b.appendString(c.toString(16).toUpperCase().padStart(4,"0")),b.appendString("]"),f=d=8):b.appendCharCode(c)}B+=d,C+=f,z>=p&&(A+=f)}s?D++:D=0,z>=j&&!y&&c.isPseudoAfter()&&(y=!0,x.setColumnInfo(z+1,a,B,C)),b.appendString("</span>")}return y||x.setColumnInfo(j+1,o.length-1,B,C),k&&(b.appendString('<span class="mtkoverflow">'),b.appendString((0,d.kg)(832,"Show more ({0})",(c=n)<1024?(0,d.kg)(833,"{0} chars",c):c<1048576?`${(c/1024).toFixed(1)} KB`:`${(c/1024/1024).toFixed(1)} MB`)),b.appendString("</span>")),b.appendString("</span>"),new m(x,h)}(function(a){let b,c,d,f=a.lineContent;-1!==a.stopRenderingLineAfter&&a.stopRenderingLineAfter<f.length?(b=!0,c=f.length-a.stopRenderingLineAfter,d=a.stopRenderingLineAfter):(b=!1,c=0,d=f.length);let i=function(a,b,c,d,f){let g=[],i=0;d>0&&(g[i++]=new h(d,"",0,!1));let j=d;for(let k=0,l=c.getCount();k<l;k++){let l=c.getEndOffset(k);if(l<=d)continue;let m=c.getClassName(k);if(l>=f){let c=!!b&&(0,e.E_)(a.substring(j,f));g[i++]=new h(f,m,0,c);break}let n=!!b&&(0,e.E_)(a.substring(j,l));g[i++]=new h(l,m,0,n),j=l}return g}(f,a.containsRTL,a.lineTokens,a.fauxIndentLength,d);a.renderControlCharacters&&!a.isBasicASCII&&(i=function(a,b){let c=[],d=new h(0,"",0,!1),e=0;for(let f of b){let b=f.endIndex;for(;e<b;e++)r(a.charCodeAt(e))&&(e>d.endIndex&&(d=new h(e,f.type,f.metadata,f.containsRTL),c.push(d)),d=new h(e+1,"mtkcontrol",f.metadata,!1),c.push(d));e>d.endIndex&&(d=new h(b,f.type,f.metadata,f.containsRTL),c.push(d))}return c}(f,i)),(4===a.renderWhitespace||1===a.renderWhitespace||2===a.renderWhitespace&&a.selectionsOnLine||3===a.renderWhitespace&&!a.continuesWithWrappedLine)&&(i=function(a,b,c,d){let f,g=a.continuesWithWrappedLine,i=a.fauxIndentLength,j=a.tabSize,k=a.startVisibleColumn,l=a.useMonospaceOptimizations,m=a.selectionsOnLine,n=1===a.renderWhitespace,o=3===a.renderWhitespace,p=a.renderSpaceWidth!==a.spaceWidth,q=[],r=0,s=0,t=d[0].type,u=d[s].containsRTL,v=d[s].endIndex,w=d.length,x=!1,y=(0,e.HG)(b);-1===y?(x=!0,y=c,f=c):f=(0,e.lT)(b);let z=!1,A=0,B=m&&m[A],C=k%j;for(let a=i;a<c;a++){let g,k=b.charCodeAt(a);if(B&&B.endExclusive<=a&&(A++,B=m&&m[A]),a<y||a>f)g=!0;else if(9===k)g=!0;else if(32===k)if(n)if(z)g=!0;else{let d=a+1<c?b.charCodeAt(a+1):0;g=32===d||9===d}else g=!0;else g=!1;if(g&&m&&(g=!!B&&B.start<=a&&a<B.endExclusive),g&&o&&(g=x||a>f),g&&u&&a>=y&&a<=f&&(g=!1),z){if(!g||!l&&C>=j){if(p){let b=r>0?q[r-1].endIndex:i;for(let c=b+1;c<=a;c++)q[r++]=new h(c,"mtkw",1,!1)}else q[r++]=new h(a,"mtkw",1,!1);C%=j}}else(a===v||g&&a>i)&&(q[r++]=new h(a,t,0,u),C%=j);for(9===k?C=j:(0,e.ne)(k)?C+=2:C++,z=g;a===v;)if(++s<w)t=d[s].type,u=d[s].containsRTL,v=d[s].endIndex;else break}let D=!1;if(z)if(g&&n){let a=c>0?b.charCodeAt(c-1):0,d=c>1?b.charCodeAt(c-2):0;(32!==a||32===d||9===d)&&(D=!0)}else D=!0;if(D)if(p){let a=r>0?q[r-1].endIndex:i;for(let b=a+1;b<=c;b++)q[r++]=new h(b,"mtkw",1,!1)}else q[r++]=new h(c,"mtkw",1,!1);else q[r++]=new h(c,t,0,u);return q}(a,f,d,i));let j=0;if(a.lineDecorations.length>0){for(let b=0,c=a.lineDecorations.length;b<c;b++){let c=a.lineDecorations[b];3===c.type||1===c.type?j|=1:2===c.type&&(j|=2)}i=function(a,b,c){c.sort(g.d.compare);let d=g.Bs.normalize(a,c),e=d.length,f=0,i=[],j=0,k=0;for(let a=0,c=b.length;a<c;a++){let c=b[a],g=c.endIndex,l=c.type,m=c.metadata,n=c.containsRTL;for(;f<e&&d[f].startOffset<g;){let a=d[f];if(a.startOffset>k&&(k=a.startOffset,i[j++]=new h(k,l,m,n)),a.endOffset+1<=g)k=a.endOffset+1,i[j++]=new h(k,l+" "+a.className,m|a.metadata,n),f++;else{k=g,i[j++]=new h(k,l+" "+a.className,m|a.metadata,n);break}}g>k&&(k=g,i[j++]=new h(k,l,m,n))}let l=b[b.length-1].endIndex;if(f<e&&d[f].startOffset===l)for(;f<e&&d[f].startOffset===l;){let a=d[f];i[j++]=new h(k,a.className,a.metadata,!1),f++}return i}(f,i,a.lineDecorations)}return i=a.containsRTL?function(a,b){if(0===b.length)return b;let c=b[0];if(!c.containsRTL)return b;let d=c.endIndex,e=0;for(let b=0;b<d;b++){let c=a.charCodeAt(b);if(32!==c&&9!==c){e=b;break}}if(0===e)return b;let f=[];f.push(new h(e,c.type,c.metadata,!1)),f.push(new h(d,c.type,c.metadata,c.containsRTL));for(let a=1;a<b.length;a++)f.push(b[a]);return f}(f,i):function(a,b,c){let d=0,e=[],f=0;if(c)for(let c=0,g=b.length;c<g;c++){let g=b[c],i=g.endIndex;if(d+50<i){let b=g.type,c=g.metadata,j=g.containsRTL,k=-1,l=d;for(let g=d;g<i;g++)32===a.charCodeAt(g)&&(k=g),-1!==k&&g-l>=50&&(e[f++]=new h(k+1,b,c,j),l=k+1,k=-1);l!==i&&(e[f++]=new h(i,b,c,j))}else e[f++]=g;d=i}else for(let a=0,c=b.length;a<c;a++){let c=b[a],g=c.endIndex,i=g-d;if(i>50){let a=c.type,b=c.metadata,j=c.containsRTL,k=Math.ceil(i/50);for(let c=1;c<k;c++){let g=d+50*c;e[f++]=new h(g,a,b,j)}e[f++]=new h(g,a,b,j)}else e[f++]=c;d=g}return e}(f,i,!a.isBasicASCII||a.fontLigatures),new q(a.useMonospaceOptimizations,a.canUseHalfwidthRightwardsArrow,f,d,b,c,i,j,a.fauxIndentLength,a.tabSize,a.startVisibleColumn,a.spaceWidth,a.renderSpaceCharCode,a.renderWhitespace,a.renderControlCharacters)}(a),b)}class o{constructor(a,b,c){this.characterMapping=a,this.html=b,this.containsForeignElements=c}}function p(a){let b=new f.fe(1e4),c=n(a,b);return new o(c.characterMapping,b.build(),c.containsForeignElements)}class q{constructor(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){this.fontIsMonospace=a,this.canUseHalfwidthRightwardsArrow=b,this.lineContent=c,this.len=d,this.isOverflowing=e,this.overflowingCharCount=f,this.parts=g,this.containsForeignElements=h,this.fauxIndentLength=i,this.tabSize=j,this.startVisibleColumn=k,this.spaceWidth=l,this.renderSpaceCharCode=m,this.renderWhitespace=n,this.renderControlCharacters=o}}function r(a){return a<32?9!==a:127===a||!!(a>=8234)&&!!(a<=8238)||!!(a>=8294)&&!!(a<=8297)||!!(a>=8206)&&!!(a<=8207)||1564===a}},33402:(a,b,c)=>{"use strict";c.d(b,{uB:()=>q,ks:()=>u,qO:()=>w,DX:()=>t,dS:()=>e,fE:()=>r,PF:()=>v,ih:()=>F,tc:()=>G,aU:()=>E,Fl:()=>y,E_:()=>x,HW:()=>B,xX:()=>A,gW:()=>z});var d,e,f=c(72816);c(54957);var g=c(13352);c(99817),c(40981);var h=c(95606),i=c(80926),j=c(99187);c(58254);var k=c(99998),l=c(29498),m=c(45186);c(85214);var n=c(37788),o=c(75082);class p{static{this.REGISTERED_COMMANDS=new Set}static getRegisteredCommands(){return[...p.REGISTERED_COMMANDS]}static registerCommand(a){p.REGISTERED_COMMANDS.add(a)}}class q{constructor(a){this.id=a.id,this.precondition=a.precondition,this._kbOpts=a.kbOpts,this._menuOpts=a.menuOpts,this.metadata=a.metadata,this.canTriggerInlineEdits=a.canTriggerInlineEdits}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts)for(let a of Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts]){let b=a.kbExpr;this.precondition&&(b=b?j.M$.and(b,this.precondition):this.precondition);let c={id:this.id,weight:a.weight,args:a.args,when:b,primary:a.primary,secondary:a.secondary,win:a.win,linux:a.linux,mac:a.mac};k.f.registerKeybindingRule(c)}i.w.registerCommand({id:this.id,handler:(a,b)=>this.runCommand(a,b),metadata:this.metadata}),this.canTriggerInlineEdits&&p.registerCommand(this.id)}_registerMenuItem(a){h.ZG.appendMenuItem(a.menuId,{group:a.group,command:{id:this.id,title:a.title,icon:a.icon,precondition:this.precondition},when:a.when,order:a.order})}}class r extends q{constructor(){super(...arguments),this._implementations=[]}addImplementation(a,b,c,d){return this._implementations.push({priority:a,name:b,implementation:c,when:d}),this._implementations.sort((a,b)=>b.priority-a.priority),{dispose:()=>{for(let a=0;a<this._implementations.length;a++)if(this._implementations[a].implementation===c)return void this._implementations.splice(a,1)}}}runCommand(a,b){let c=a.get(n.rr),d=a.get(j.fN);for(let e of(c.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`),this._implementations)){if(e.when){let a=d.getContext((0,o.bq)());if(!e.when.evaluate(a))continue}let f=e.implementation(a,b);if(f){if(c.trace(`Command '${this.id}' was handled by '${e.name}'.`),"boolean"==typeof f)return;return f}}c.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class s extends q{constructor(a,b){super(b),this.command=a}runCommand(a,b){return this.command.runCommand(a,b)}}class t extends q{static bindToContribution(a){return class extends t{constructor(a){super(a),this._callback=a.handler}runEditorCommand(b,c,d){let e=a(c);e&&this._callback(e,d)}}}static runEditorCommand(a,b,c,d){let e=a.get(g.T),f=e.getFocusedCodeEditor()||e.getActiveCodeEditor();if(f)return f.invokeWithinContext(a=>{if(a.get(j.fN).contextMatchesRules(c??void 0))return d(a,f,b)})}runCommand(a,b){return t.runEditorCommand(a,b,this.precondition,(a,b,c)=>this.runEditorCommand(a,b,c))}}class u extends t{static convertOptions(a){let b;function c(b){return b.menuId||(b.menuId=h.D8.EditorContext),b.title||(b.title="string"==typeof a.label?a.label:a.label.value),b.when=j.M$.and(a.precondition,b.when),b}return b=Array.isArray(a.menuOpts)?a.menuOpts:a.menuOpts?[a.menuOpts]:[],Array.isArray(a.contextMenuOpts)?b.push(...a.contextMenuOpts.map(c)):a.contextMenuOpts&&b.push(c(a.contextMenuOpts)),a.menuOpts=b,a}constructor(a){super(u.convertOptions(a)),"string"==typeof a.label?(this.label=a.label,this.alias=a.alias??a.label):(this.label=a.label.value,this.alias=a.alias??a.label.original)}runEditorCommand(a,b,c){return this.reportTelemetry(a,b),this.run(a,b,c||{})}reportTelemetry(a,b){a.get(m.k).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class v extends u{constructor(){super(...arguments),this._implementations=[]}addImplementation(a,b){return this._implementations.push([a,b]),this._implementations.sort((a,b)=>b[0]-a[0]),{dispose:()=>{for(let a=0;a<this._implementations.length;a++)if(this._implementations[a][1]===b)return void this._implementations.splice(a,1)}}}run(a,b,c){for(let d of this._implementations){let e=d[1](a,b,c);if(e){if("boolean"==typeof e)return;return e}}}}class w extends h.L{run(a,...b){let c=a.get(g.T),d=c.getFocusedCodeEditor()||c.getActiveCodeEditor();if(d)return d.invokeWithinContext(a=>{let c=a.get(j.fN),e=a.get(n.rr);return c.contextMatchesRules(this.desc.precondition??void 0)?this.runEditorCommand(a,d,...b):void e.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,this.desc.precondition?.serialize())})}}function x(a){return C.INSTANCE.registerEditorCommand(a),a}function y(a){let b=new a;return C.INSTANCE.registerEditorAction(b),b}function z(a){return C.INSTANCE.registerEditorAction(a),a}function A(a){C.INSTANCE.registerEditorAction(a)}function B(a,b,c){C.INSTANCE.registerEditorContribution(a,b,c)}(d=e||(e={})).getEditorCommand=function(a){return C.INSTANCE.getEditorCommand(a)},d.getEditorActions=function(){return C.INSTANCE.getEditorActions()},d.getEditorContributions=function(){return C.INSTANCE.getEditorContributions()},d.getSomeEditorContributions=function(a){return C.INSTANCE.getEditorContributions().filter(b=>a.indexOf(b.id)>=0)},d.getDiffEditorContributions=function(){return C.INSTANCE.getDiffEditorContributions()};class C{static{this.INSTANCE=new C}constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(a,b,c){this.editorContributions.push({id:a,ctor:b,instantiation:c})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(a){a.register(),this.editorActions.push(a)}getEditorActions(){return this.editorActions}registerEditorCommand(a){a.register(),this.editorCommands[a.id]=a}getEditorCommand(a){return this.editorCommands[a]||null}}function D(a){return a.register(),a}l.O.add("editor.contributions",C.INSTANCE);let E=D(new r({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:h.D8.MenubarEditMenu,group:"1_do",title:(0,f.kg)(73,"&&Undo"),order:1},{menuId:h.D8.CommandPalette,group:"",title:(0,f.kg)(74,"Undo"),order:1},{menuId:h.D8.SimpleEditorContext,group:"1_do",title:(0,f.kg)(75,"Undo"),order:1}]}));D(new s(E,{id:"default:undo",precondition:void 0}));let F=D(new r({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:h.D8.MenubarEditMenu,group:"1_do",title:(0,f.kg)(76,"&&Redo"),order:2},{menuId:h.D8.CommandPalette,group:"",title:(0,f.kg)(77,"Redo"),order:1},{menuId:h.D8.SimpleEditorContext,group:"1_do",title:(0,f.kg)(78,"Redo"),order:2}]}));D(new s(F,{id:"default:redo",precondition:void 0}));let G=D(new r({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:h.D8.MenubarSelectionMenu,group:"1_basic",title:(0,f.kg)(79,"&&Select All"),order:1},{menuId:h.D8.CommandPalette,group:"",title:(0,f.kg)(80,"Select All"),order:1},{menuId:h.D8.SimpleEditorContext,group:"9_select",title:(0,f.kg)(81,"Select All"),order:1}]}))},33641:(a,b,c)=>{"use strict";c.d(b,{i:()=>i});var d=c(35527),e=c(17577),f=c(72473);class g extends f.V{constructor(a,b){super(0),this._segmenter=null,this._cachedLine=null,this._cachedSegments=[],this.intlSegmenterLocales=b,this.intlSegmenterLocales.length>0?this._segmenter=d.x.Segmenter(this.intlSegmenterLocales,{granularity:"word"}):this._segmenter=null;for(let b=0,c=a.length;b<c;b++)this.set(a.charCodeAt(b),2);this.set(32,1),this.set(9,1)}findPrevIntlWordBeforeOrAtOffset(a,b){let c=null;for(let d of this._getIntlSegmenterWordsOnLine(a)){if(d.index>b)break;c=d}return c}findNextIntlWordAtOrAfterOffset(a,b){for(let c of this._getIntlSegmenterWordsOnLine(a))if(!(c.index<b))return c;return null}_getIntlSegmenterWordsOnLine(a){return this._segmenter?(this._cachedLine===a||(this._cachedLine=a,this._cachedSegments=this._filterWordSegments(this._segmenter.value.segment(a))),this._cachedSegments):[]}_filterWordSegments(a){let b=[];for(let c of a)this._isWordLike(c)&&b.push(c);return b}_isWordLike(a){return!!a.isWordLike}}let h=new e.qK(10);function i(a,b){let c=`${a}/${b.join(",")}`,d=h.get(c);return d||(d=new g(a,b),h.set(c,d)),d}},33836:(a,b,c)=>{"use strict";function d(a,b){let c=0,d=0,e=a.length;for(;d<e;){let e=a.charCodeAt(d);if(32===e)c++;else if(9===e)c=c-c%b+b;else break;d++}return d===e?-1:c}c.d(b,{G:()=>d})},33896:(a,b,c)=>{"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,aA,aB,aC,aD,aE,aF,aG,aH,aI,aJ,aK,aL,aM,aN,aO,aP,aQ,aR,aS;c.d(b,{A5:()=>I,Ah:()=>J,DD:()=>z,DO:()=>L,EI:()=>w,Gn:()=>d,H_:()=>T,Ic:()=>K,Io:()=>g,KU:()=>x,Kb:()=>m,M$:()=>s,OV:()=>F,QP:()=>h,Qj:()=>j,R3:()=>C,SB:()=>P,U7:()=>V,VW:()=>u,VX:()=>D,WA:()=>R,WU:()=>q,XR:()=>O,YT:()=>G,ZS:()=>r,_E:()=>f,cj:()=>A,dE:()=>H,d_:()=>B,e0:()=>n,h5:()=>k,hS:()=>E,hW:()=>M,jT:()=>Q,kK:()=>X,kf:()=>p,l:()=>t,m9:()=>W,of:()=>l,ok:()=>e,ov:()=>N,p2:()=>o,qw:()=>y,r4:()=>v,t7:()=>i,tJ:()=>Y,v0:()=>S,z4:()=>U}),(Z=d||(d={}))[Z.Unknown=0]="Unknown",Z[Z.Disabled=1]="Disabled",Z[Z.Enabled=2]="Enabled",($=e||(e={}))[$.Invoke=1]="Invoke",$[$.Auto=2]="Auto",(_=f||(f={}))[_.None=0]="None",_[_.KeepWhitespace=1]="KeepWhitespace",_[_.InsertAsSnippet=4]="InsertAsSnippet",(aa=g||(g={}))[aa.Method=0]="Method",aa[aa.Function=1]="Function",aa[aa.Constructor=2]="Constructor",aa[aa.Field=3]="Field",aa[aa.Variable=4]="Variable",aa[aa.Class=5]="Class",aa[aa.Struct=6]="Struct",aa[aa.Interface=7]="Interface",aa[aa.Module=8]="Module",aa[aa.Property=9]="Property",aa[aa.Event=10]="Event",aa[aa.Operator=11]="Operator",aa[aa.Unit=12]="Unit",aa[aa.Value=13]="Value",aa[aa.Constant=14]="Constant",aa[aa.Enum=15]="Enum",aa[aa.EnumMember=16]="EnumMember",aa[aa.Keyword=17]="Keyword",aa[aa.Text=18]="Text",aa[aa.Color=19]="Color",aa[aa.File=20]="File",aa[aa.Reference=21]="Reference",aa[aa.Customcolor=22]="Customcolor",aa[aa.Folder=23]="Folder",aa[aa.TypeParameter=24]="TypeParameter",aa[aa.User=25]="User",aa[aa.Issue=26]="Issue",aa[aa.Tool=27]="Tool",aa[aa.Snippet=28]="Snippet",(ab=h||(h={}))[ab.Deprecated=1]="Deprecated",(ac=i||(i={}))[ac.Invoke=0]="Invoke",ac[ac.TriggerCharacter=1]="TriggerCharacter",ac[ac.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions",(ad=j||(j={}))[ad.EXACT=0]="EXACT",ad[ad.ABOVE=1]="ABOVE",ad[ad.BELOW=2]="BELOW",(ae=k||(k={}))[ae.NotSet=0]="NotSet",ae[ae.ContentFlush=1]="ContentFlush",ae[ae.RecoverFromMarkers=2]="RecoverFromMarkers",ae[ae.Explicit=3]="Explicit",ae[ae.Paste=4]="Paste",ae[ae.Undo=5]="Undo",ae[ae.Redo=6]="Redo",(af=l||(l={}))[af.LF=1]="LF",af[af.CRLF=2]="CRLF",(ag=m||(m={}))[ag.Text=0]="Text",ag[ag.Read=1]="Read",ag[ag.Write=2]="Write",(ah=n||(n={}))[ah.None=0]="None",ah[ah.Keep=1]="Keep",ah[ah.Brackets=2]="Brackets",ah[ah.Advanced=3]="Advanced",ah[ah.Full=4]="Full",(ai=o||(o={}))[ai.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",ai[ai.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",ai[ai.accessibilitySupport=2]="accessibilitySupport",ai[ai.accessibilityPageSize=3]="accessibilityPageSize",ai[ai.allowOverflow=4]="allowOverflow",ai[ai.allowVariableLineHeights=5]="allowVariableLineHeights",ai[ai.allowVariableFonts=6]="allowVariableFonts",ai[ai.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",ai[ai.ariaLabel=8]="ariaLabel",ai[ai.ariaRequired=9]="ariaRequired",ai[ai.autoClosingBrackets=10]="autoClosingBrackets",ai[ai.autoClosingComments=11]="autoClosingComments",ai[ai.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",ai[ai.autoClosingDelete=13]="autoClosingDelete",ai[ai.autoClosingOvertype=14]="autoClosingOvertype",ai[ai.autoClosingQuotes=15]="autoClosingQuotes",ai[ai.autoIndent=16]="autoIndent",ai[ai.autoIndentOnPaste=17]="autoIndentOnPaste",ai[ai.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",ai[ai.automaticLayout=19]="automaticLayout",ai[ai.autoSurround=20]="autoSurround",ai[ai.bracketPairColorization=21]="bracketPairColorization",ai[ai.guides=22]="guides",ai[ai.codeLens=23]="codeLens",ai[ai.codeLensFontFamily=24]="codeLensFontFamily",ai[ai.codeLensFontSize=25]="codeLensFontSize",ai[ai.colorDecorators=26]="colorDecorators",ai[ai.colorDecoratorsLimit=27]="colorDecoratorsLimit",ai[ai.columnSelection=28]="columnSelection",ai[ai.comments=29]="comments",ai[ai.contextmenu=30]="contextmenu",ai[ai.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",ai[ai.cursorBlinking=32]="cursorBlinking",ai[ai.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",ai[ai.cursorStyle=34]="cursorStyle",ai[ai.cursorSurroundingLines=35]="cursorSurroundingLines",ai[ai.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",ai[ai.cursorWidth=37]="cursorWidth",ai[ai.cursorHeight=38]="cursorHeight",ai[ai.disableLayerHinting=39]="disableLayerHinting",ai[ai.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",ai[ai.domReadOnly=41]="domReadOnly",ai[ai.dragAndDrop=42]="dragAndDrop",ai[ai.dropIntoEditor=43]="dropIntoEditor",ai[ai.editContext=44]="editContext",ai[ai.emptySelectionClipboard=45]="emptySelectionClipboard",ai[ai.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",ai[ai.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",ai[ai.extraEditorClassName=48]="extraEditorClassName",ai[ai.fastScrollSensitivity=49]="fastScrollSensitivity",ai[ai.find=50]="find",ai[ai.fixedOverflowWidgets=51]="fixedOverflowWidgets",ai[ai.folding=52]="folding",ai[ai.foldingStrategy=53]="foldingStrategy",ai[ai.foldingHighlight=54]="foldingHighlight",ai[ai.foldingImportsByDefault=55]="foldingImportsByDefault",ai[ai.foldingMaximumRegions=56]="foldingMaximumRegions",ai[ai.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",ai[ai.fontFamily=58]="fontFamily",ai[ai.fontInfo=59]="fontInfo",ai[ai.fontLigatures=60]="fontLigatures",ai[ai.fontSize=61]="fontSize",ai[ai.fontWeight=62]="fontWeight",ai[ai.fontVariations=63]="fontVariations",ai[ai.formatOnPaste=64]="formatOnPaste",ai[ai.formatOnType=65]="formatOnType",ai[ai.glyphMargin=66]="glyphMargin",ai[ai.gotoLocation=67]="gotoLocation",ai[ai.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",ai[ai.hover=69]="hover",ai[ai.inDiffEditor=70]="inDiffEditor",ai[ai.inlineSuggest=71]="inlineSuggest",ai[ai.letterSpacing=72]="letterSpacing",ai[ai.lightbulb=73]="lightbulb",ai[ai.lineDecorationsWidth=74]="lineDecorationsWidth",ai[ai.lineHeight=75]="lineHeight",ai[ai.lineNumbers=76]="lineNumbers",ai[ai.lineNumbersMinChars=77]="lineNumbersMinChars",ai[ai.linkedEditing=78]="linkedEditing",ai[ai.links=79]="links",ai[ai.matchBrackets=80]="matchBrackets",ai[ai.minimap=81]="minimap",ai[ai.mouseStyle=82]="mouseStyle",ai[ai.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",ai[ai.mouseWheelZoom=84]="mouseWheelZoom",ai[ai.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",ai[ai.multiCursorModifier=86]="multiCursorModifier",ai[ai.mouseMiddleClickAction=87]="mouseMiddleClickAction",ai[ai.multiCursorPaste=88]="multiCursorPaste",ai[ai.multiCursorLimit=89]="multiCursorLimit",ai[ai.occurrencesHighlight=90]="occurrencesHighlight",ai[ai.occurrencesHighlightDelay=91]="occurrencesHighlightDelay",ai[ai.overtypeCursorStyle=92]="overtypeCursorStyle",ai[ai.overtypeOnPaste=93]="overtypeOnPaste",ai[ai.overviewRulerBorder=94]="overviewRulerBorder",ai[ai.overviewRulerLanes=95]="overviewRulerLanes",ai[ai.padding=96]="padding",ai[ai.pasteAs=97]="pasteAs",ai[ai.parameterHints=98]="parameterHints",ai[ai.peekWidgetDefaultFocus=99]="peekWidgetDefaultFocus",ai[ai.placeholder=100]="placeholder",ai[ai.definitionLinkOpensInPeek=101]="definitionLinkOpensInPeek",ai[ai.quickSuggestions=102]="quickSuggestions",ai[ai.quickSuggestionsDelay=103]="quickSuggestionsDelay",ai[ai.readOnly=104]="readOnly",ai[ai.readOnlyMessage=105]="readOnlyMessage",ai[ai.renameOnType=106]="renameOnType",ai[ai.renderRichScreenReaderContent=107]="renderRichScreenReaderContent",ai[ai.renderControlCharacters=108]="renderControlCharacters",ai[ai.renderFinalNewline=109]="renderFinalNewline",ai[ai.renderLineHighlight=110]="renderLineHighlight",ai[ai.renderLineHighlightOnlyWhenFocus=111]="renderLineHighlightOnlyWhenFocus",ai[ai.renderValidationDecorations=112]="renderValidationDecorations",ai[ai.renderWhitespace=113]="renderWhitespace",ai[ai.revealHorizontalRightPadding=114]="revealHorizontalRightPadding",ai[ai.roundedSelection=115]="roundedSelection",ai[ai.rulers=116]="rulers",ai[ai.scrollbar=117]="scrollbar",ai[ai.scrollBeyondLastColumn=118]="scrollBeyondLastColumn",ai[ai.scrollBeyondLastLine=119]="scrollBeyondLastLine",ai[ai.scrollPredominantAxis=120]="scrollPredominantAxis",ai[ai.selectionClipboard=121]="selectionClipboard",ai[ai.selectionHighlight=122]="selectionHighlight",ai[ai.selectionHighlightMaxLength=123]="selectionHighlightMaxLength",ai[ai.selectionHighlightMultiline=124]="selectionHighlightMultiline",ai[ai.selectOnLineNumbers=125]="selectOnLineNumbers",ai[ai.showFoldingControls=126]="showFoldingControls",ai[ai.showUnused=127]="showUnused",ai[ai.snippetSuggestions=128]="snippetSuggestions",ai[ai.smartSelect=129]="smartSelect",ai[ai.smoothScrolling=130]="smoothScrolling",ai[ai.stickyScroll=131]="stickyScroll",ai[ai.stickyTabStops=132]="stickyTabStops",ai[ai.stopRenderingLineAfter=133]="stopRenderingLineAfter",ai[ai.suggest=134]="suggest",ai[ai.suggestFontSize=135]="suggestFontSize",ai[ai.suggestLineHeight=136]="suggestLineHeight",ai[ai.suggestOnTriggerCharacters=137]="suggestOnTriggerCharacters",ai[ai.suggestSelection=138]="suggestSelection",ai[ai.tabCompletion=139]="tabCompletion",ai[ai.tabIndex=140]="tabIndex",ai[ai.trimWhitespaceOnDelete=141]="trimWhitespaceOnDelete",ai[ai.unicodeHighlighting=142]="unicodeHighlighting",ai[ai.unusualLineTerminators=143]="unusualLineTerminators",ai[ai.useShadowDOM=144]="useShadowDOM",ai[ai.useTabStops=145]="useTabStops",ai[ai.wordBreak=146]="wordBreak",ai[ai.wordSegmenterLocales=147]="wordSegmenterLocales",ai[ai.wordSeparators=148]="wordSeparators",ai[ai.wordWrap=149]="wordWrap",ai[ai.wordWrapBreakAfterCharacters=150]="wordWrapBreakAfterCharacters",ai[ai.wordWrapBreakBeforeCharacters=151]="wordWrapBreakBeforeCharacters",ai[ai.wordWrapColumn=152]="wordWrapColumn",ai[ai.wordWrapOverride1=153]="wordWrapOverride1",ai[ai.wordWrapOverride2=154]="wordWrapOverride2",ai[ai.wrappingIndent=155]="wrappingIndent",ai[ai.wrappingStrategy=156]="wrappingStrategy",ai[ai.showDeprecated=157]="showDeprecated",ai[ai.inertialScroll=158]="inertialScroll",ai[ai.inlayHints=159]="inlayHints",ai[ai.wrapOnEscapedLineFeeds=160]="wrapOnEscapedLineFeeds",ai[ai.effectiveCursorStyle=161]="effectiveCursorStyle",ai[ai.editorClassName=162]="editorClassName",ai[ai.pixelRatio=163]="pixelRatio",ai[ai.tabFocusMode=164]="tabFocusMode",ai[ai.layoutInfo=165]="layoutInfo",ai[ai.wrappingInfo=166]="wrappingInfo",ai[ai.defaultColorDecorators=167]="defaultColorDecorators",ai[ai.colorDecoratorsActivatedOn=168]="colorDecoratorsActivatedOn",ai[ai.inlineCompletionsAccessibilityVerbose=169]="inlineCompletionsAccessibilityVerbose",ai[ai.effectiveEditContext=170]="effectiveEditContext",ai[ai.scrollOnMiddleClick=171]="scrollOnMiddleClick",ai[ai.effectiveAllowVariableFonts=172]="effectiveAllowVariableFonts",ai[ai.doubleClickSelectsBlock=173]="doubleClickSelectsBlock",(aj=p||(p={}))[aj.TextDefined=0]="TextDefined",aj[aj.LF=1]="LF",aj[aj.CRLF=2]="CRLF",(ak=q||(q={}))[ak.LF=0]="LF",ak[ak.CRLF=1]="CRLF",(al=r||(r={}))[al.Left=1]="Left",al[al.Center=2]="Center",al[al.Right=3]="Right",(am=s||(s={}))[am.Increase=0]="Increase",am[am.Decrease=1]="Decrease",(an=t||(t={}))[an.None=0]="None",an[an.Indent=1]="Indent",an[an.IndentOutdent=2]="IndentOutdent",an[an.Outdent=3]="Outdent",(ao=u||(u={}))[ao.Both=0]="Both",ao[ao.Right=1]="Right",ao[ao.Left=2]="Left",ao[ao.None=3]="None",(ap=v||(v={}))[ap.Type=1]="Type",ap[ap.Parameter=2]="Parameter",(aq=w||(w={}))[aq.Accepted=0]="Accepted",aq[aq.Rejected=1]="Rejected",aq[aq.Ignored=2]="Ignored",(ar=x||(x={}))[ar.Code=1]="Code",ar[ar.Label=2]="Label",(as=y||(y={}))[as.Automatic=0]="Automatic",as[as.Explicit=1]="Explicit",(at=z||(z={}))[at.DependsOnKbLayout=-1]="DependsOnKbLayout",at[at.Unknown=0]="Unknown",at[at.Backspace=1]="Backspace",at[at.Tab=2]="Tab",at[at.Enter=3]="Enter",at[at.Shift=4]="Shift",at[at.Ctrl=5]="Ctrl",at[at.Alt=6]="Alt",at[at.PauseBreak=7]="PauseBreak",at[at.CapsLock=8]="CapsLock",at[at.Escape=9]="Escape",at[at.Space=10]="Space",at[at.PageUp=11]="PageUp",at[at.PageDown=12]="PageDown",at[at.End=13]="End",at[at.Home=14]="Home",at[at.LeftArrow=15]="LeftArrow",at[at.UpArrow=16]="UpArrow",at[at.RightArrow=17]="RightArrow",at[at.DownArrow=18]="DownArrow",at[at.Insert=19]="Insert",at[at.Delete=20]="Delete",at[at.Digit0=21]="Digit0",at[at.Digit1=22]="Digit1",at[at.Digit2=23]="Digit2",at[at.Digit3=24]="Digit3",at[at.Digit4=25]="Digit4",at[at.Digit5=26]="Digit5",at[at.Digit6=27]="Digit6",at[at.Digit7=28]="Digit7",at[at.Digit8=29]="Digit8",at[at.Digit9=30]="Digit9",at[at.KeyA=31]="KeyA",at[at.KeyB=32]="KeyB",at[at.KeyC=33]="KeyC",at[at.KeyD=34]="KeyD",at[at.KeyE=35]="KeyE",at[at.KeyF=36]="KeyF",at[at.KeyG=37]="KeyG",at[at.KeyH=38]="KeyH",at[at.KeyI=39]="KeyI",at[at.KeyJ=40]="KeyJ",at[at.KeyK=41]="KeyK",at[at.KeyL=42]="KeyL",at[at.KeyM=43]="KeyM",at[at.KeyN=44]="KeyN",at[at.KeyO=45]="KeyO",at[at.KeyP=46]="KeyP",at[at.KeyQ=47]="KeyQ",at[at.KeyR=48]="KeyR",at[at.KeyS=49]="KeyS",at[at.KeyT=50]="KeyT",at[at.KeyU=51]="KeyU",at[at.KeyV=52]="KeyV",at[at.KeyW=53]="KeyW",at[at.KeyX=54]="KeyX",at[at.KeyY=55]="KeyY",at[at.KeyZ=56]="KeyZ",at[at.Meta=57]="Meta",at[at.ContextMenu=58]="ContextMenu",at[at.F1=59]="F1",at[at.F2=60]="F2",at[at.F3=61]="F3",at[at.F4=62]="F4",at[at.F5=63]="F5",at[at.F6=64]="F6",at[at.F7=65]="F7",at[at.F8=66]="F8",at[at.F9=67]="F9",at[at.F10=68]="F10",at[at.F11=69]="F11",at[at.F12=70]="F12",at[at.F13=71]="F13",at[at.F14=72]="F14",at[at.F15=73]="F15",at[at.F16=74]="F16",at[at.F17=75]="F17",at[at.F18=76]="F18",at[at.F19=77]="F19",at[at.F20=78]="F20",at[at.F21=79]="F21",at[at.F22=80]="F22",at[at.F23=81]="F23",at[at.F24=82]="F24",at[at.NumLock=83]="NumLock",at[at.ScrollLock=84]="ScrollLock",at[at.Semicolon=85]="Semicolon",at[at.Equal=86]="Equal",at[at.Comma=87]="Comma",at[at.Minus=88]="Minus",at[at.Period=89]="Period",at[at.Slash=90]="Slash",at[at.Backquote=91]="Backquote",at[at.BracketLeft=92]="BracketLeft",at[at.Backslash=93]="Backslash",at[at.BracketRight=94]="BracketRight",at[at.Quote=95]="Quote",at[at.OEM_8=96]="OEM_8",at[at.IntlBackslash=97]="IntlBackslash",at[at.Numpad0=98]="Numpad0",at[at.Numpad1=99]="Numpad1",at[at.Numpad2=100]="Numpad2",at[at.Numpad3=101]="Numpad3",at[at.Numpad4=102]="Numpad4",at[at.Numpad5=103]="Numpad5",at[at.Numpad6=104]="Numpad6",at[at.Numpad7=105]="Numpad7",at[at.Numpad8=106]="Numpad8",at[at.Numpad9=107]="Numpad9",at[at.NumpadMultiply=108]="NumpadMultiply",at[at.NumpadAdd=109]="NumpadAdd",at[at.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",at[at.NumpadSubtract=111]="NumpadSubtract",at[at.NumpadDecimal=112]="NumpadDecimal",at[at.NumpadDivide=113]="NumpadDivide",at[at.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",at[at.ABNT_C1=115]="ABNT_C1",at[at.ABNT_C2=116]="ABNT_C2",at[at.AudioVolumeMute=117]="AudioVolumeMute",at[at.AudioVolumeUp=118]="AudioVolumeUp",at[at.AudioVolumeDown=119]="AudioVolumeDown",at[at.BrowserSearch=120]="BrowserSearch",at[at.BrowserHome=121]="BrowserHome",at[at.BrowserBack=122]="BrowserBack",at[at.BrowserForward=123]="BrowserForward",at[at.MediaTrackNext=124]="MediaTrackNext",at[at.MediaTrackPrevious=125]="MediaTrackPrevious",at[at.MediaStop=126]="MediaStop",at[at.MediaPlayPause=127]="MediaPlayPause",at[at.LaunchMediaPlayer=128]="LaunchMediaPlayer",at[at.LaunchMail=129]="LaunchMail",at[at.LaunchApp2=130]="LaunchApp2",at[at.Clear=131]="Clear",at[at.MAX_VALUE=132]="MAX_VALUE",(au=A||(A={}))[au.Hint=1]="Hint",au[au.Info=2]="Info",au[au.Warning=4]="Warning",au[au.Error=8]="Error",(av=B||(B={}))[av.Unnecessary=1]="Unnecessary",av[av.Deprecated=2]="Deprecated",(aw=C||(C={}))[aw.Inline=1]="Inline",aw[aw.Gutter=2]="Gutter",(ax=D||(D={}))[ax.Normal=1]="Normal",ax[ax.Underlined=2]="Underlined",(ay=E||(E={}))[ay.UNKNOWN=0]="UNKNOWN",ay[ay.TEXTAREA=1]="TEXTAREA",ay[ay.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",ay[ay.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",ay[ay.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",ay[ay.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",ay[ay.CONTENT_TEXT=6]="CONTENT_TEXT",ay[ay.CONTENT_EMPTY=7]="CONTENT_EMPTY",ay[ay.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",ay[ay.CONTENT_WIDGET=9]="CONTENT_WIDGET",ay[ay.OVERVIEW_RULER=10]="OVERVIEW_RULER",ay[ay.SCROLLBAR=11]="SCROLLBAR",ay[ay.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",ay[ay.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR",(az=F||(F={}))[az.AIGenerated=1]="AIGenerated",(aA=G||(G={}))[aA.Invoke=0]="Invoke",aA[aA.Automatic=1]="Automatic",(aB=H||(H={}))[aB.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",aB[aB.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",aB[aB.TOP_CENTER=2]="TOP_CENTER",(aC=I||(I={}))[aC.Left=1]="Left",aC[aC.Center=2]="Center",aC[aC.Right=4]="Right",aC[aC.Full=7]="Full",(aD=J||(J={}))[aD.Word=0]="Word",aD[aD.Line=1]="Line",aD[aD.Suggest=2]="Suggest",(aE=K||(K={}))[aE.Left=0]="Left",aE[aE.Right=1]="Right",aE[aE.None=2]="None",aE[aE.LeftOfInjectedText=3]="LeftOfInjectedText",aE[aE.RightOfInjectedText=4]="RightOfInjectedText",(aF=L||(L={}))[aF.Off=0]="Off",aF[aF.On=1]="On",aF[aF.Relative=2]="Relative",aF[aF.Interval=3]="Interval",aF[aF.Custom=4]="Custom",(aG=M||(M={}))[aG.None=0]="None",aG[aG.Text=1]="Text",aG[aG.Blocks=2]="Blocks",(aH=N||(N={}))[aH.Smooth=0]="Smooth",aH[aH.Immediate=1]="Immediate",(aI=O||(O={}))[aI.Auto=1]="Auto",aI[aI.Hidden=2]="Hidden",aI[aI.Visible=3]="Visible",(aJ=P||(P={}))[aJ.LTR=0]="LTR",aJ[aJ.RTL=1]="RTL",(aK=Q||(Q={})).Off="off",aK.OnCode="onCode",aK.On="on",(aL=R||(R={}))[aL.Invoke=1]="Invoke",aL[aL.TriggerCharacter=2]="TriggerCharacter",aL[aL.ContentChange=3]="ContentChange",(aM=S||(S={}))[aM.File=0]="File",aM[aM.Module=1]="Module",aM[aM.Namespace=2]="Namespace",aM[aM.Package=3]="Package",aM[aM.Class=4]="Class",aM[aM.Method=5]="Method",aM[aM.Property=6]="Property",aM[aM.Field=7]="Field",aM[aM.Constructor=8]="Constructor",aM[aM.Enum=9]="Enum",aM[aM.Interface=10]="Interface",aM[aM.Function=11]="Function",aM[aM.Variable=12]="Variable",aM[aM.Constant=13]="Constant",aM[aM.String=14]="String",aM[aM.Number=15]="Number",aM[aM.Boolean=16]="Boolean",aM[aM.Array=17]="Array",aM[aM.Object=18]="Object",aM[aM.Key=19]="Key",aM[aM.Null=20]="Null",aM[aM.EnumMember=21]="EnumMember",aM[aM.Struct=22]="Struct",aM[aM.Event=23]="Event",aM[aM.Operator=24]="Operator",aM[aM.TypeParameter=25]="TypeParameter",(aN=T||(T={}))[aN.Deprecated=1]="Deprecated",(aO=U||(U={}))[aO.LTR=0]="LTR",aO[aO.RTL=1]="RTL",(aP=V||(V={}))[aP.Hidden=0]="Hidden",aP[aP.Blink=1]="Blink",aP[aP.Smooth=2]="Smooth",aP[aP.Phase=3]="Phase",aP[aP.Expand=4]="Expand",aP[aP.Solid=5]="Solid",(aQ=W||(W={}))[aQ.Line=1]="Line",aQ[aQ.Block=2]="Block",aQ[aQ.Underline=3]="Underline",aQ[aQ.LineThin=4]="LineThin",aQ[aQ.BlockOutline=5]="BlockOutline",aQ[aQ.UnderlineThin=6]="UnderlineThin",(aR=X||(X={}))[aR.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",aR[aR.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",aR[aR.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",aR[aR.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter",(aS=Y||(Y={}))[aS.None=0]="None",aS[aS.Same=1]="Same",aS[aS.Indent=2]="Indent",aS[aS.DeepIndent=3]="DeepIndent"},34183:(a,b,c)=>{"use strict";c.d(b,{CU:()=>g,b1:()=>j,bu:()=>k,t4:()=>h,tA:()=>i,vw:()=>l});var d=c(72816),e=c(55404),f=c(37327);let g=(0,f.x1)("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},(0,d.kg)(1838,"Overall foreground color. This color is only used if not overridden by a component."));(0,f.x1)("strongForeground",{dark:"#FFFFFF",light:"#000000",hcDark:"#FFFFFF",hcLight:"#000000"},(0,d.kg)(1839,"Highest-contrast foreground color, intended for text or icons that need maximum legibility across various backgrounds. This color is only used if not overridden by a component.")),(0,f.x1)("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},(0,d.kg)(1840,"Overall foreground for disabled elements. This color is only used if not overridden by a component.")),(0,f.x1)("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},(0,d.kg)(1841,"Overall foreground color for error messages. This color is only used if not overridden by a component.")),(0,f.x1)("descriptionForeground",{light:"#717171",dark:(0,f.JO)(g,.7),hcDark:(0,f.JO)(g,.7),hcLight:(0,f.JO)(g,.7)},(0,d.kg)(1842,"Foreground color for description text providing additional information, for example for a label."));let h=(0,f.x1)("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},(0,d.kg)(1843,"The default color for icons in the workbench.")),i=(0,f.x1)("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},(0,d.kg)(1844,"Overall border color for focused elements. This color is only used if not overridden by a component.")),j=(0,f.x1)("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},(0,d.kg)(1845,"An extra border around elements to separate them from others for greater contrast.")),k=(0,f.x1)("contrastActiveBorder",{light:null,dark:null,hcDark:i,hcLight:i},(0,d.kg)(1846,"An extra border around active elements to separate them from others for greater contrast."));(0,f.x1)("selection.background",null,(0,d.kg)(1847,"The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor."));let l=(0,f.x1)("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},(0,d.kg)(1848,"Foreground color for links in text."));(0,f.x1)("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#21A6FF",hcLight:"#0F4A85"},(0,d.kg)(1849,"Foreground color for links in text when clicked on and on mouse hover.")),(0,f.x1)("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:e.Q1.black,hcLight:"#292929"},(0,d.kg)(1850,"Color for text separators.")),(0,f.x1)("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#FFFFFF",hcLight:"#FFFFFF"},(0,d.kg)(1851,"Foreground color for preformatted text segments.")),(0,f.x1)("textPreformat.background",{light:"#0000001A",dark:"#FFFFFF1A",hcDark:null,hcLight:"#09345f"},(0,d.kg)(1852,"Background color for preformatted text segments.")),(0,f.x1)("textPreformat.border",{light:null,dark:null,hcDark:j,hcLight:null},(0,d.kg)(1853,"Border color for preformatted text segments.")),(0,f.x1)("textBlockQuote.background",{light:"#f2f2f2",dark:"#222222",hcDark:null,hcLight:"#F2F2F2"},(0,d.kg)(1854,"Background color for block quotes in text.")),(0,f.x1)("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:e.Q1.white,hcLight:"#292929"},(0,d.kg)(1855,"Border color for block quotes in text.")),(0,f.x1)("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:e.Q1.black,hcLight:"#F2F2F2"},(0,d.kg)(1856,"Background color for code blocks in text."))},34349:(a,b,c)=>{"use strict";c.d(b,{n:()=>g,s:()=>h});var d=c(75082),e=c(63060);let f=RegExp(`(\\\\)?\\$\\((${e.L.iconNameExpression}(?:${e.L.iconModifierExpression})?)\\)`,"g");function g(a,b){let c,d=[],e=0,g=0;for(;null!==(c=f.exec(a));){e<(g=c.index||0)&&d.push(a.substring(e,g)),e=(c.index||0)+c[0].length;let[,f,i]=c;d.push(f?`$(${i})`:h({id:i},b))}return e<a.length&&d.push(a.substring(e)),d}function h(a,b){let c=(0,d.$)("span"),f=e.L.asClassNameArray(a);return b&&f.push("codicon-colored"),c.classList.add(...f),c}},34547:(a,b,c)=>{"use strict";c.d(b,{AT:()=>j,OI:()=>g,ZX:()=>i}),c(93539),c(87175),c(78014),c(95091);var d=c(76631),e=c(14960);c(14670),c(60548);var f=c(87873);function g(a,b){let c=new h(!0,b);a.addObserver(c);try{c.beginUpdate(a)}finally{c.endUpdate(a)}return(0,d.s)(()=>{a.removeObserver(c)})}c(74864),(0,f.Bm)(g);class h{constructor(a,b){this._forceRecompute=a,this._handleValue=b,this._counter=0}beginUpdate(a){this._counter++}endUpdate(a){1===this._counter&&this._forceRecompute&&(this._handleValue?this._handleValue(a.get()):a.reportChanges()),this._counter--}handlePossibleChange(a){}handleChange(a,b){}}function i(a,b){let c;return(0,e.C)({owner:a,debugReferenceFn:b},a=>c=b(a,c))}function j(a){return!!a&&void 0!==a.read&&void 0!==a.reportChanges}},34793:(a,b,c)=>{"use strict";c.d(b,{B:()=>e,q:()=>l});var d,e,f=c(75082),g=c(27612),h=c(90605),i=c(95091),j=c(76631),k=c(14322);(d=e||(e={})).Tap="-monaco-gesturetap",d.Change="-monaco-gesturechange",d.Start="-monaco-gesturestart",d.End="-monaco-gesturesend",d.Contextmenu="-monaco-gesturecontextmenu";class l extends j.jG{static{this.SCROLL_FRICTION=-.005}static{this.HOLD_DELAY=700}static{this.CLEAR_TAP_COUNT_TIME=400}constructor(){super(),this.dispatched=!1,this.targets=new k.w,this.ignoreTargets=new k.w,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(i.Jh.runAndSubscribe(f.Iv,({window:a,disposables:b})=>{b.add((0,f.ko)(a.document,"touchstart",a=>this.onTouchStart(a),{passive:!1})),b.add((0,f.ko)(a.document,"touchend",b=>this.onTouchEnd(a,b))),b.add((0,f.ko)(a.document,"touchmove",a=>this.onTouchMove(a),{passive:!1}))},{window:g.G,disposables:this._store}))}static addTarget(a){if(!l.isTouchDevice())return j.jG.None;l.INSTANCE||(l.INSTANCE=(0,j.lC)(new l));let b=l.INSTANCE.targets.push(a);return(0,j.s)(b)}static ignoreTarget(a){if(!l.isTouchDevice())return j.jG.None;l.INSTANCE||(l.INSTANCE=(0,j.lC)(new l));let b=l.INSTANCE.ignoreTargets.push(a);return(0,j.s)(b)}static isTouchDevice(){return"ontouchstart"in g.G||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(a){let b=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let c=0,d=a.targetTouches.length;c<d;c++){let d=a.targetTouches.item(c);this.activeTouches[d.identifier]={id:d.identifier,initialTarget:d.target,initialTimeStamp:b,initialPageX:d.pageX,initialPageY:d.pageY,rollingTimestamps:[b],rollingPageX:[d.pageX],rollingPageY:[d.pageY]};let f=this.newGestureEvent(e.Start,d.target);f.pageX=d.pageX,f.pageY=d.pageY,this.dispatchEvent(f)}this.dispatched&&(a.preventDefault(),a.stopPropagation(),this.dispatched=!1)}onTouchEnd(a,b){let c=Date.now(),d=Object.keys(this.activeTouches).length;for(let f=0,g=b.changedTouches.length;f<g;f++){let g=b.changedTouches.item(f);if(!this.activeTouches.hasOwnProperty(String(g.identifier))){console.warn("move of an UNKNOWN touch",g);continue}let h=this.activeTouches[g.identifier],i=Date.now()-h.initialTimeStamp;if(i<l.HOLD_DELAY&&30>Math.abs(h.initialPageX-h.rollingPageX.at(-1))&&30>Math.abs(h.initialPageY-h.rollingPageY.at(-1))){let a=this.newGestureEvent(e.Tap,h.initialTarget);a.pageX=h.rollingPageX.at(-1),a.pageY=h.rollingPageY.at(-1),this.dispatchEvent(a)}else if(i>=l.HOLD_DELAY&&30>Math.abs(h.initialPageX-h.rollingPageX.at(-1))&&30>Math.abs(h.initialPageY-h.rollingPageY.at(-1))){let a=this.newGestureEvent(e.Contextmenu,h.initialTarget);a.pageX=h.rollingPageX.at(-1),a.pageY=h.rollingPageY.at(-1),this.dispatchEvent(a)}else if(1===d){let b=h.rollingPageX.at(-1),d=h.rollingPageY.at(-1),e=h.rollingTimestamps.at(-1)-h.rollingTimestamps[0],f=b-h.rollingPageX[0],g=d-h.rollingPageY[0],i=[...this.targets].filter(a=>h.initialTarget instanceof Node&&a.contains(h.initialTarget));this.inertia(a,i,c,Math.abs(f)/e,f>0?1:-1,b,Math.abs(g)/e,g>0?1:-1,d)}this.dispatchEvent(this.newGestureEvent(e.End,h.initialTarget)),delete this.activeTouches[g.identifier]}this.dispatched&&(b.preventDefault(),b.stopPropagation(),this.dispatched=!1)}newGestureEvent(a,b){let c=document.createEvent("CustomEvent");return c.initEvent(a,!1,!0),c.initialTarget=b,c.tapCount=0,c}dispatchEvent(a){if(a.type===e.Tap){let b=new Date().getTime(),c=0;c=b-this._lastSetTapCountTime>l.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=b,a.tapCount=c}else(a.type===e.Change||a.type===e.Contextmenu)&&(this._lastSetTapCountTime=0);if(a.initialTarget instanceof Node){for(let b of this.ignoreTargets)if(b.contains(a.initialTarget))return;let b=[];for(let c of this.targets)if(c.contains(a.initialTarget)){let d=0,e=a.initialTarget;for(;e&&e!==c;)d++,e=e.parentElement;b.push([d,c])}for(let[c,d]of(b.sort((a,b)=>a[0]-b[0]),b))d.dispatchEvent(a),this.dispatched=!0}}inertia(a,b,c,d,g,h,i,j,k){this.handle=(0,f.PG)(a,()=>{let f=Date.now(),m=f-c,n=0,o=0,p=!0;d+=l.SCROLL_FRICTION*m,i+=l.SCROLL_FRICTION*m,d>0&&(p=!1,n=g*d*m),i>0&&(p=!1,o=j*i*m);let q=this.newGestureEvent(e.Change);q.translationX=n,q.translationY=o,b.forEach(a=>a.dispatchEvent(q)),p||this.inertia(a,b,f,d,g,h+n,i,j,k+o)})}onTouchMove(a){let b=Date.now();for(let c=0,d=a.changedTouches.length;c<d;c++){let d=a.changedTouches.item(c);if(!this.activeTouches.hasOwnProperty(String(d.identifier))){console.warn("end of an UNKNOWN touch",d);continue}let f=this.activeTouches[d.identifier],g=this.newGestureEvent(e.Change,f.initialTarget);g.translationX=d.pageX-f.rollingPageX.at(-1),g.translationY=d.pageY-f.rollingPageY.at(-1),g.pageX=d.pageX,g.pageY=d.pageY,this.dispatchEvent(g),f.rollingPageX.length>3&&(f.rollingPageX.shift(),f.rollingPageY.shift(),f.rollingTimestamps.shift()),f.rollingPageX.push(d.pageX),f.rollingPageY.push(d.pageY),f.rollingTimestamps.push(b)}this.dispatched&&(a.preventDefault(),a.stopPropagation(),this.dispatched=!1)}}!function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);f>3&&g&&Object.defineProperty(b,c,g)}([h.B],l,"isTouchDevice",null)},35001:(a,b,c)=>{"use strict";c.d(b,{$P:()=>h,Zp:()=>g});var d,e,f=c(67786);function g(a,b,c){let d=c.mode===e.ALIGN?c.offset:c.offset+c.size,f=c.mode===e.ALIGN?c.offset+c.size:c.offset;return 0===c.position?b<=a-d?{position:d,result:"ok"}:b<=f?{position:f-b,result:"flipped"}:{position:Math.max(a-b,0),result:"overlap"}:b<=f?{position:f-b,result:"ok"}:b<=a-d&&f<b/2?{position:d,result:"flipped"}:{position:0,result:"overlap"}}function h(a,b,c,d){let h,i,j=d?.anchorAlignment??0,k=d?.anchorPosition??0;if(0===(d?.anchorAxisAlignment??0)){let d={offset:c.top-a.top,size:c.height,position:+(0!==k)},l={offset:c.left,size:c.width,position:+(0!==j),mode:e.ALIGN},m=g(a.height,b.height,d);h=m.position+a.top,"flipped"===m.result&&(k=+(0===k)),f.Q.intersects({start:h,end:h+b.height},{start:d.offset,end:d.offset+d.size})&&(l.mode=e.AVOID);let n=g(a.width,b.width,l);i=n.position,"flipped"===n.result&&(j=+(0===j))}else{let d={offset:c.left,size:c.width,position:+(0!==j)},l={offset:c.top,size:c.height,position:+(0!==k),mode:e.ALIGN},m=g(a.width,b.width,d);i=m.position,"flipped"===m.result&&(j=+(0===j)),f.Q.intersects({start:i,end:i+b.width},{start:d.offset,end:d.offset+d.size})&&(l.mode=e.AVOID);let n=g(a.height,b.height,l);h=n.position+a.top,"flipped"===n.result&&(k=+(0===k))}let l=a.width-(i+b.width),m=a.height-(h+b.height);return{top:h,left:i,bottom:m,right:l,anchorAlignment:j,anchorPosition:k}}(d=e||(e={}))[d.AVOID=0]="AVOID",d[d.ALIGN=1]="ALIGN"},35117:()=>{},35412:()=>{},35440:(a,b,c)=>{"use strict";c.d(b,{b:()=>d,t:()=>e});let d=function(){if("function"==typeof crypto.randomUUID)return crypto.randomUUID.bind(crypto);let a=new Uint8Array(16),b=[];for(let a=0;a<256;a++)b.push(a.toString(16).padStart(2,"0"));return function(){crypto.getRandomValues(a),a[6]=15&a[6]|64,a[8]=63&a[8]|128;let c=0,d="";return d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]],d+="-",d+=b[a[c++]],d+=b[a[c++]],d+="-",d+=b[a[c++]],d+=b[a[c++]],d+="-",d+=b[a[c++]],d+=b[a[c++]],d+="-",d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]],d+=b[a[c++]]}}();function e(a){return`${a}-${d()}`}},35590:(a,b,c)=>{"use strict";c.d(b,{$D:()=>d,I_:()=>f,To:()=>e,Ym:()=>g});let d=(0,c(58254).u1)("undoRedoService");class e{constructor(a,b){this.resource=a,this.elements=b}}class f{static{this._ID=0}constructor(){this.id=f._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new f}}class g{static{this._ID=0}constructor(){this.id=g._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}static{this.None=new g}}},36036:(a,b,c)=>{"use strict";let d,e,f,g;c.d(b,{$M:()=>L,FX:()=>y,GE:()=>N,dG:()=>Q,gP:()=>B,lO:()=>O,ou:()=>K,rY:()=>M,v_:()=>P});var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G=c(33040);c(54957);var H=c(61822),I=c(75643),J=c(72816);class K{constructor(a,b,c){this.offset=a,this.type=b,this.language=c,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}class L{constructor(a,b){this.tokens=a,this.endState=b,this._tokenizationResultBrand=void 0}}class M{constructor(a,b,c){this.tokens=a,this.fontInfo=b,this.endState=c,this._encodedTokenizationResultBrand=void 0}}(h=t||(t={}))[h.Increase=0]="Increase",h[h.Decrease=1]="Decrease",i=u||(u={}),(d=new Map).set(0,G.W.symbolMethod),d.set(1,G.W.symbolFunction),d.set(2,G.W.symbolConstructor),d.set(3,G.W.symbolField),d.set(4,G.W.symbolVariable),d.set(5,G.W.symbolClass),d.set(6,G.W.symbolStruct),d.set(7,G.W.symbolInterface),d.set(8,G.W.symbolModule),d.set(9,G.W.symbolProperty),d.set(10,G.W.symbolEvent),d.set(11,G.W.symbolOperator),d.set(12,G.W.symbolUnit),d.set(13,G.W.symbolValue),d.set(15,G.W.symbolEnum),d.set(14,G.W.symbolConstant),d.set(15,G.W.symbolEnum),d.set(16,G.W.symbolEnumMember),d.set(17,G.W.symbolKeyword),d.set(28,G.W.symbolSnippet),d.set(18,G.W.symbolText),d.set(19,G.W.symbolColor),d.set(20,G.W.symbolFile),d.set(21,G.W.symbolReference),d.set(22,G.W.symbolCustomColor),d.set(23,G.W.symbolFolder),d.set(24,G.W.symbolTypeParameter),d.set(25,G.W.account),d.set(26,G.W.issues),d.set(27,G.W.tools),i.toIcon=function(a){let b=d.get(a);return b||(console.info("No codicon found for CompletionItemKind "+a),b=G.W.symbolProperty),b},i.toLabel=function(a){switch(a){case 0:return(0,J.kg)(763,"Method");case 1:return(0,J.kg)(764,"Function");case 2:return(0,J.kg)(765,"Constructor");case 3:return(0,J.kg)(766,"Field");case 4:return(0,J.kg)(767,"Variable");case 5:return(0,J.kg)(768,"Class");case 6:return(0,J.kg)(769,"Struct");case 7:return(0,J.kg)(770,"Interface");case 8:return(0,J.kg)(771,"Module");case 9:return(0,J.kg)(772,"Property");case 10:return(0,J.kg)(773,"Event");case 11:return(0,J.kg)(774,"Operator");case 12:return(0,J.kg)(775,"Unit");case 13:return(0,J.kg)(776,"Value");case 14:return(0,J.kg)(777,"Constant");case 15:return(0,J.kg)(778,"Enum");case 16:return(0,J.kg)(779,"Enum Member");case 17:return(0,J.kg)(780,"Keyword");case 18:return(0,J.kg)(781,"Text");case 19:return(0,J.kg)(782,"Color");case 20:return(0,J.kg)(783,"File");case 21:return(0,J.kg)(784,"Reference");case 22:return(0,J.kg)(785,"Custom Color");case 23:return(0,J.kg)(786,"Folder");case 24:return(0,J.kg)(787,"Type Parameter");case 25:return(0,J.kg)(788,"User");case 26:return(0,J.kg)(789,"Issue");case 27:return(0,J.kg)(790,"Tool");case 28:return(0,J.kg)(791,"Snippet");default:return""}},(e=new Map).set("method",0),e.set("function",1),e.set("constructor",2),e.set("field",3),e.set("variable",4),e.set("class",5),e.set("struct",6),e.set("interface",7),e.set("module",8),e.set("property",9),e.set("event",10),e.set("operator",11),e.set("unit",12),e.set("value",13),e.set("constant",14),e.set("enum",15),e.set("enum-member",16),e.set("enumMember",16),e.set("keyword",17),e.set("snippet",28),e.set("text",18),e.set("color",19),e.set("file",20),e.set("reference",21),e.set("customcolor",22),e.set("folder",23),e.set("type-parameter",24),e.set("typeParameter",24),e.set("account",25),e.set("issue",26),e.set("tool",27),i.fromString=function(a,b){let c=e.get(a);return void 0!==c||b||(c=9),c},(j=v||(v={}))[j.Automatic=0]="Automatic",j[j.Explicit=1]="Explicit";class N{constructor(a,b,c,d){this.range=a,this.text=b,this.completionKind=c,this.isSnippetText=d}equals(a){return H.Q.lift(this.range).equalsRange(a.range)&&this.text===a.text&&this.completionKind===a.completionKind&&this.isSnippetText===a.isSnippetText}}(k=w||(w={}))[k.Code=1]="Code",k[k.Label=2]="Label",(l=x||(x={}))[l.Accepted=0]="Accepted",l[l.Rejected=1]="Rejected",l[l.Ignored=2]="Ignored",(m=y||(y={}))[m.Automatic=0]="Automatic",m[m.PasteAs=1]="PasteAs",(n=z||(z={}))[n.Invoke=1]="Invoke",n[n.TriggerCharacter=2]="TriggerCharacter",n[n.ContentChange=3]="ContentChange",(o=A||(A={}))[o.Text=0]="Text",o[o.Read=1]="Read",o[o.Write=2]="Write",(0,J.kg)(792,"array"),(0,J.kg)(793,"boolean"),(0,J.kg)(794,"class"),(0,J.kg)(795,"constant"),(0,J.kg)(796,"constructor"),(0,J.kg)(797,"enumeration"),(0,J.kg)(798,"enumeration member"),(0,J.kg)(799,"event"),(0,J.kg)(800,"field"),(0,J.kg)(801,"file"),(0,J.kg)(802,"function"),(0,J.kg)(803,"interface"),(0,J.kg)(804,"key"),(0,J.kg)(805,"method"),(0,J.kg)(806,"module"),(0,J.kg)(807,"namespace"),(0,J.kg)(808,"null"),(0,J.kg)(809,"number"),(0,J.kg)(810,"object"),(0,J.kg)(811,"operator"),(0,J.kg)(812,"package"),(0,J.kg)(813,"property"),(0,J.kg)(814,"string"),(0,J.kg)(815,"struct"),(0,J.kg)(816,"type parameter"),(0,J.kg)(817,"variable"),p=B||(B={}),(f=new Map).set(0,G.W.symbolFile),f.set(1,G.W.symbolModule),f.set(2,G.W.symbolNamespace),f.set(3,G.W.symbolPackage),f.set(4,G.W.symbolClass),f.set(5,G.W.symbolMethod),f.set(6,G.W.symbolProperty),f.set(7,G.W.symbolField),f.set(8,G.W.symbolConstructor),f.set(9,G.W.symbolEnum),f.set(10,G.W.symbolInterface),f.set(11,G.W.symbolFunction),f.set(12,G.W.symbolVariable),f.set(13,G.W.symbolConstant),f.set(14,G.W.symbolString),f.set(15,G.W.symbolNumber),f.set(16,G.W.symbolBoolean),f.set(17,G.W.symbolArray),f.set(18,G.W.symbolObject),f.set(19,G.W.symbolKey),f.set(20,G.W.symbolNull),f.set(21,G.W.symbolEnumMember),f.set(22,G.W.symbolStruct),f.set(23,G.W.symbolEvent),f.set(24,G.W.symbolOperator),f.set(25,G.W.symbolTypeParameter),p.toIcon=function(a){let b=f.get(a);return b||(console.info("No codicon found for SymbolKind "+a),b=G.W.symbolProperty),b},(g=new Map).set(0,20),g.set(1,8),g.set(2,8),g.set(3,8),g.set(4,5),g.set(5,0),g.set(6,9),g.set(7,3),g.set(8,2),g.set(9,15),g.set(10,7),g.set(11,1),g.set(12,4),g.set(13,14),g.set(14,18),g.set(15,13),g.set(16,13),g.set(17,13),g.set(18,13),g.set(19,17),g.set(20,13),g.set(21,16),g.set(22,6),g.set(23,10),g.set(24,11),g.set(25,24),p.toCompletionKind=function(a){let b=g.get(a);return void 0===b&&(console.info("No completion kind found for SymbolKind "+a),b=20),b};class O{static{this.Comment=new O("comment")}static{this.Imports=new O("imports")}static{this.Region=new O("region")}static fromValue(a){switch(a){case"comment":return O.Comment;case"imports":return O.Imports;case"region":return O.Region}return new O(a)}constructor(a){this.value=a}}(q=C||(C={}))[q.AIGenerated=1]="AIGenerated",(r=D||(D={}))[r.Invoke=0]="Invoke",r[r.Automatic=1]="Automatic",(E||(E={})).is=function(a){return!!a&&"object"==typeof a&&"string"==typeof a.id&&"string"==typeof a.title},(s=F||(F={}))[s.Type=1]="Type",s[s.Parameter=2]="Parameter";class P{constructor(a){this.createSupport=a,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(a=>{a&&a.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}let Q=new I.d},36540:(a,b,c)=>{"use strict";c.d(b,{Eq:()=>s,bs:()=>r,y:()=>u,wL:()=>v,EB:()=>o});var d=c(18216),e=c(57667),f=c(35440),g=c(57616),h=c(81296),i=c(54957),j=c(29498);class k{}j.O.add("workbench.contributions.dragAndDrop",new k);class l{static{this.INSTANCE=new l}static getInstance(){return l.INSTANCE}hasData(a){return a&&a===this.proto}getData(a){if(this.hasData(a))return this.data}}function m(a){if(d.ib&&"function"==typeof globalThis.vscode?.webUtils?.getPathForFile)return globalThis.vscode?.webUtils?.getPathForFile(a)}let n=Object.freeze(["CodeEditors","CodeFiles",g.t.RESOURCES,g.t.INTERNAL_URI_LIST]);function o(a,b,c){let{dataToCopy:d,metadata:e}=q(a);return p(d.text,e,c),{dataToCopy:d,metadata:e}}function p(a,b,c){r.INSTANCE.set(c?a.replace(/\r\n/g,"\n"):a,b)}function q(a){let b=a.getEditorOption(45),c=a.getEditorOption(31),e=a.getCursorStates().map(a=>a.modelState.selection),g=function(a,b,c,e){let f,{sourceRanges:g,sourceText:h}=a.getPlainTextToCopy(b,c,d.uF),i=a.model.getEOL(),j=c&&1===b.length&&b[0].isEmpty(),k=Array.isArray(h)?h:null,l=Array.isArray(h)?h.join(i):h,m=null;if(s.forceCopyWithSyntaxHighlighting||e&&h.length<65536){let d=a.getRichTextToCopy(b,c);d&&(f=d.html,m=d.mode)}return{isFromEmptySelection:j,sourceRanges:g,multicursorText:k,text:l,html:f,mode:m}}(a,e,b,c),h={version:1,id:(0,f.b)(),isFromEmptySelection:g.isFromEmptySelection,multicursorText:g.multicursorText,mode:g.mode};return{dataToCopy:g,metadata:h}}class r{static{this.INSTANCE=new r}constructor(){this._lastState=null}set(a,b){this._lastState={lastCopiedValue:a,data:b}}get(a){return this._lastState&&this._lastState.lastCopiedValue===a?this._lastState.data:(this._lastState=null,null)}}let s={forceCopyWithSyntaxHighlighting:!1,electronBugWorkaroundCopyEventHasFired:!1},t={getTextData(a){let b=a.getData(e.K.text),c=null,d=a.getData("vscode-editor-data");if("string"==typeof d)try{c=JSON.parse(d),1!==c.version&&(c=null)}catch(a){}return 0===b.length&&null===c&&a.files.length>0?[Array.prototype.slice.call(a.files,0).map(a=>a.name).join("\n"),null]:[b,c]},setTextData(a,b,c,d){a.setData(e.K.text,b),"string"==typeof c&&a.setData("text/html",c),a.setData("vscode-editor-data",JSON.stringify(d))}};function u(a,b,c,d,e){let{dataToCopy:f,metadata:g}=q(c.viewModel),h=!1;return{isCut:b,clipboardData:{setData:(b,c)=>{a.clipboardData?.setData(b,c)}},dataToCopy:f,ensureClipboardGetsEditorData:()=>{a.preventDefault(),a.clipboardData&&t.setTextData(a.clipboardData,f.text,f.html,g),p(f.text,g,e),d.trace("ensureClipboardGetsEditorSelection with id : ",g.id," with text.length: ",f.text.length)},setHandled:()=>{h=!0,a.preventDefault(),a.stopImmediatePropagation()},get isHandled(){return h}}}function v(a){var b;let c=!1,[d,f]=a.clipboardData?t.getTextData(a.clipboardData):["",null];return f=f||r.INSTANCE.get(d),{clipboardData:(b=a.clipboardData,{types:Array.from(b?.types??[]),files:Array.prototype.slice.call(b?.files??[],0),getData:a=>b?.getData(a)??""}),metadata:f,text:d,toExternalVSDataTransfer:()=>a.clipboardData?function(a,b=!1){let c=function(a){let b=new h.Vq;for(let c of a.items){let a=c.type;if("string"===c.kind){let d=new Promise(a=>c.getAsString(a));b.append(a,(0,h.gf)(d))}else if("file"===c.kind){let d=c.getAsFile();d&&b.append(a,function(a){let b=m(a),c=b?i.r.parse(b):void 0;return(0,h.VX)(a.name,c,async()=>new Uint8Array(await a.arrayBuffer()))}(d))}}return b}(a),d=c.get(g.t.INTERNAL_URI_LIST);if(d)c.replace(e.K.uriList,d);else if(b||!c.has(e.K.uriList)){let b=[];for(let c of a.items){let a=c.getAsFile();if(a){let c=m(a);try{c?b.push(i.r.file(c).toString()):b.push(i.r.parse(a.name,!0).toString())}catch{}}}b.length&&c.replace(e.K.uriList,(0,h.gf)(h.jt.create(b)))}for(let a of n)c.delete(a);return c}(a.clipboardData):void 0,browserEvent:a,setHandled:()=>{c=!0,a.preventDefault(),a.stopImmediatePropagation()},get isHandled(){return c}}}},36685:()=>{},36901:(a,b,c)=>{"use strict";c.d(b,{J7:()=>i,aV:()=>h,nd:()=>g});var d=c(18216),e=c(72816),f=c(99187);new f.N1("isMac",d.zx,(0,e.kg)(1746,"Whether the operating system is macOS")),new f.N1("isLinux",d.j9,(0,e.kg)(1747,"Whether the operating system is Linux"));let g=new f.N1("isWindows",d.uF,(0,e.kg)(1748,"Whether the operating system is Windows"));new f.N1("isWeb",d.HZ,(0,e.kg)(1749,"Whether the platform is a web browser")),new f.N1("isMacNative",d.zx&&!d.HZ,(0,e.kg)(1750,"Whether the operating system is macOS on a non-browser platform")),new f.N1("isIOS",d.un,(0,e.kg)(1751,"Whether the operating system is iOS")),new f.N1("isMobile",d.Fr,(0,e.kg)(1752,"Whether the platform is a mobile web browser")),new f.N1("isDevelopment",!1,!0),new f.N1("productQualityType","",(0,e.kg)(1753,"Quality type of VS Code"));let h="inputFocus",i=new f.N1(h,!1,(0,e.kg)(1754,"Whether keyboard focus is inside an input box"))},37327:(a,b,c)=>{"use strict";c.d(b,{Bb:()=>l,Fd:()=>o,Gu:()=>m,HP:()=>n,Hz:()=>w,JO:()=>u,a:()=>t,e$:()=>s,oG:()=>x,x1:()=>r,yL:()=>v});var d=c(43765),e=c(70687),f=c(55404),g=c(95091),h=c(52491),i=c(29498),j=c(72816),k=c(76631);function l(a){return`--vscode-${a.replace(/\./g,"-")}`}function m(a){return`var(${l(a)})`}function n(a,b){return`var(${l(a)}, ${b})`}let o={ColorContribution:"base.contributions.colors"};class p extends k.jG{constructor(){super(),this._onDidChangeSchema=this._register(new g.vl),this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(a,b,c,d=!1,e){this.colorsById[a]={id:a,description:c,defaults:b,needsTransparency:d,deprecationMessage:e};let f={type:"string",format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return e&&(f.deprecationMessage=e),d&&(f.pattern="^#(?:(?<rgba>[0-9a-fA-f]{3}[0-9a-eA-E])|(?:[0-9a-fA-F]{6}(?:(?![fF]{2})(?:[0-9a-fA-F]{2}))))?$",f.patternErrorMessage=(0,j.kg)(2091,"This color must be transparent or it will obscure content")),this.colorSchema.properties[a]={description:c,oneOf:[f,{type:"string",const:"default",description:(0,j.kg)(2092,"Use the default color.")}]},this.colorReferenceSchema.enum.push(a),this.colorReferenceSchema.enumDescriptions.push(c),this._onDidChangeSchema.fire(),a}getColors(){return Object.keys(this.colorsById).map(a=>this.colorsById[a])}resolveDefaultColor(a,b){let c=this.colorsById[a];if(c?.defaults){var e;return function a(b,c){if(null===b);else if("string"==typeof b)return"#"===b[0]?f.Q1.fromHex(b):c.getColor(b);else if(b instanceof f.Q1)return b;else if("object"==typeof b)return function(b,c){switch(b.op){case 0:return a(b.value,c)?.darken(b.factor);case 1:return a(b.value,c)?.lighten(b.factor);case 2:return a(b.value,c)?.transparent(b.factor);case 7:{let d=a(b.color,c)||f.Q1.transparent,e=a(b.with,c)||f.Q1.transparent;return d.mix(e,b.ratio)}case 3:{let d=a(b.background,c);if(!d)return a(b.value,c);return a(b.value,c)?.makeOpaque(d)}case 4:for(let d of b.values){let b=a(d,c);if(b)return b}return;case 6:return a(c.defines(b.if)?b.then:b.else,c);case 5:{let d=a(b.value,c);if(!d)return;let e=a(b.background,c);if(!e)return d.transparent(b.factor*b.transparency);return d.isDarkerThan(e)?f.Q1.getLighterColor(d,e,b.factor).transparent(b.transparency):f.Q1.getDarkerColor(d,e,b.factor).transparent(b.transparency)}default:throw(0,d.xb)()}}(b,c)}(null!==(e=c.defaults)&&"object"==typeof e&&"light"in e&&"dark"in e?c.defaults[b.type]:c.defaults,b)}}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort((a,b)=>{let c=+(-1!==a.indexOf(".")),d=+(-1!==b.indexOf("."));return c!==d?c-d:a.localeCompare(b)}).map(a=>`- \`${a}\`: ${this.colorsById[a].description}`).join("\n")}}let q=new p;function r(a,b,c,d,e){return q.registerColor(a,b,c,d,e)}function s(a,b){return{op:0,value:a,factor:b}}function t(a,b){return{op:1,value:a,factor:b}}function u(a,b){return{op:2,value:a,factor:b}}function v(...a){return{op:4,values:a}}function w(a,b,c){return{op:6,if:a,then:b,else:c}}function x(a,b,c,d){return{op:5,value:a,background:b,factor:c,transparency:d}}i.O.add(o.ColorContribution,q);let y="vscode://schemas/workbench-colors",z=i.O.as(h.F.JSONContribution);z.registerSchema(y,q.getColorSchema());let A=new e.uC(()=>z.notifySchemaChanged(y),200);q.onDidChangeSchema(()=>{A.isScheduled()||A.schedule()})},37758:(a,b,c)=>{"use strict";c.d(b,{IR:()=>k,KW:()=>r});var d=c(66036),e=c(95091),f=c(76631),g=c(18216),h=c(26529);let i="default",j=!1;function k(a){g.HZ&&(j||(j=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(a.message))}class l{constructor(a,b,c,d,e){this.vsWorker=a,this.req=b,this.channel=c,this.method=d,this.args=e,this.type=0}}class m{constructor(a,b,c,d){this.vsWorker=a,this.seq=b,this.res=c,this.err=d,this.type=1}}class n{constructor(a,b,c,d,e){this.vsWorker=a,this.req=b,this.channel=c,this.eventName=d,this.arg=e,this.type=2}}class o{constructor(a,b,c){this.vsWorker=a,this.req=b,this.event=c,this.type=3}}class p{constructor(a,b){this.vsWorker=a,this.req=b,this.type=4}}class q{constructor(a){this._workerId=-1,this._handler=a,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(a){this._workerId=a}async sendMessage(a,b,c){let d=String(++this._lastSentReq);return new Promise((e,f)=>{this._pendingReplies[d]={resolve:e,reject:f},this._send(new l(this._workerId,d,a,b,c))})}listen(a,b,c){let d=null,f=new e.vl({onWillAddFirstListener:()=>{d=String(++this._lastSentReq),this._pendingEmitters.set(d,f),this._send(new n(this._workerId,d,a,b,c))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(d),this._send(new p(this._workerId,d)),d=null}});return f.event}handleMessage(a){a&&a.vsWorker&&(-1===this._workerId||a.vsWorker===this._workerId)&&this._handleMessage(a)}createProxyToRemoteChannel(a,b){return new Proxy(Object.create(null),{get:(c,d)=>("string"!=typeof d||c[d]||(t(d)?c[d]=b=>this.listen(a,d,b):s(d)?c[d]=this.listen(a,d,void 0):36===d.charCodeAt(0)&&(c[d]=async(...c)=>(await b?.(),this.sendMessage(a,d,c)))),c[d])})}_handleMessage(a){switch(a.type){case 1:return this._handleReplyMessage(a);case 0:return this._handleRequestMessage(a);case 2:return this._handleSubscribeEventMessage(a);case 3:return this._handleEventMessage(a);case 4:return this._handleUnsubscribeEventMessage(a)}}_handleReplyMessage(a){if(!this._pendingReplies[a.seq])return void console.warn("Got reply to unknown seq");let b=this._pendingReplies[a.seq];if(delete this._pendingReplies[a.seq],a.err){let c=a.err;if(a.err.$isError){let b=Error();b.name=a.err.name,b.message=a.err.message,b.stack=a.err.stack,c=b}b.reject(c);return}b.resolve(a.res)}_handleRequestMessage(a){let b=a.req;this._handler.handleMessage(a.channel,a.method,a.args).then(a=>{this._send(new m(this._workerId,b,a,void 0))},a=>{a.detail instanceof Error&&(a.detail=(0,d.cU)(a.detail)),this._send(new m(this._workerId,b,void 0,(0,d.cU)(a)))})}_handleSubscribeEventMessage(a){let b=a.req,c=this._handler.handleEvent(a.channel,a.eventName,a.arg)(a=>{this._send(new o(this._workerId,b,a))});this._pendingEvents.set(b,c)}_handleEventMessage(a){let b=this._pendingEmitters.get(a.req);void 0===b?console.warn("Got event for unknown req"):b.fire(a.event)}_handleUnsubscribeEventMessage(a){let b=this._pendingEvents.get(a.req);void 0===b?console.warn("Got unsubscribe for unknown req"):(b.dispose(),this._pendingEvents.delete(a.req))}_send(a){let b=[];if(0===a.type)for(let c=0;c<a.args.length;c++){let d=a.args[c];d instanceof ArrayBuffer&&b.push(d)}else 1===a.type&&a.res instanceof ArrayBuffer&&b.push(a.res);this._handler.sendMessage(a,b)}}class r extends f.jG{constructor(a){super(),this._localChannels=new Map,this._worker=this._register(a),this._register(this._worker.onMessage(a=>{this._protocol.handleMessage(a)})),this._register(this._worker.onError(a=>{k(a),(0,d.dz)(a)})),this._protocol=new q({sendMessage:(a,b)=>{this._worker.postMessage(a,b)},handleMessage:(a,b,c)=>this._handleMessage(a,b,c),handleEvent:(a,b,c)=>this._handleEvent(a,b,c)}),this._protocol.setWorkerId(this._worker.getId()),this._onModuleLoaded=this._protocol.sendMessage(i,"$initialize",[this._worker.getId()]).then(()=>{}),this.proxy=this._protocol.createProxyToRemoteChannel(i,async()=>{await this._onModuleLoaded}),this._onModuleLoaded.catch(a=>{this._onError("Worker failed to load ",a)})}_handleMessage(a,b,c){let d=this._localChannels.get(a);if(!d)return Promise.reject(Error(`Missing channel ${a} on main thread`));let e=d[b];if("function"!=typeof e)return Promise.reject(Error(`Missing method ${b} on main thread channel ${a}`));try{return Promise.resolve(e.apply(d,c))}catch(a){return Promise.reject(a)}}_handleEvent(a,b,c){let d=this._localChannels.get(a);if(!d)throw Error(`Missing channel ${a} on main thread`);if(t(b)){let e=d[b];if("function"!=typeof e)throw Error(`Missing dynamic event ${b} on main thread channel ${a}.`);let f=e.call(d,c);if("function"!=typeof f)throw Error(`Missing dynamic event ${b} on main thread channel ${a}.`);return f}if(s(b)){let c=d[b];if("function"!=typeof c)throw Error(`Missing event ${b} on main thread channel ${a}.`);return c}throw Error(`Malformed event name ${b}`)}setChannel(a,b){this._localChannels.set(a,b)}_onError(a,b){console.error(a),console.info(b)}}function s(a){return"o"===a[0]&&"n"===a[1]&&(0,h.Wv)(a.charCodeAt(2))}function t(a){return/^onDynamic/.test(a)&&(0,h.Wv)(a.charCodeAt(9))}},37788:(a,b,c)=>{"use strict";c.d(b,{$b:()=>e,Cr:()=>t,DA:()=>x,Dk:()=>u,rr:()=>o,xd:()=>p});var d,e,f=c(95091),g=c(40427),h=c(76631),i=c(17577),j=c(50498),k=c(85214),l=c(54957),m=c(99187),n=c(58254);let o=(0,n.u1)("logService"),p=(0,n.u1)("loggerService");(d=e||(e={}))[d.Off=0]="Off",d[d.Trace=1]="Trace",d[d.Debug=2]="Debug",d[d.Info=3]="Info",d[d.Warning=4]="Warning",d[d.Error=5]="Error";let q=e.Info;function r(a,...b){(function(a){switch(a){case"debug":return console.debug;case"error":return console.error;case"info":return console.info;case"log":return console.log;case"warn":return console.warn}})(a).apply(console,b)}class s extends h.jG{constructor(){super(...arguments),this.level=q,this._onDidChangeLogLevel=this._register(new f.vl)}get onDidChangeLogLevel(){return this._onDidChangeLogLevel.event}setLevel(a){this.level!==a&&(this.level=a,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(a){var b;return b=this.level,b!==e.Off&&b<=a}canLog(a){return!this._store.isDisposed&&this.checkLogLevel(a)}}class t extends s{constructor(a=q,b=!0){super(),this.useColors=b,this.setLevel(a)}trace(a,...b){this.canLog(e.Trace)&&(this.useColors?r("log","%cTRACE","color: #888",a,...b):r("log",a,...b))}debug(a,...b){this.canLog(e.Debug)&&(this.useColors?r("log","%cDEBUG","background: #eee; color: #888",a,...b):r("log",a,...b))}info(a,...b){this.canLog(e.Info)&&(this.useColors?r("log","%c INFO","color: #33f",a,...b):r("log",a,...b))}warn(a,...b){this.canLog(e.Warning)&&(this.useColors?r("warn","%c WARN","color: #993",a,...b):r("log",a,...b))}error(a,...b){this.canLog(e.Error)&&(this.useColors?r("error","%c ERR","color: #f33",a,...b):r("error",a,...b))}}class u extends s{constructor(a){super(),this.loggers=a,a.length&&this.setLevel(a[0].getLevel())}setLevel(a){for(let b of this.loggers)b.setLevel(a);super.setLevel(a)}trace(a,...b){for(let c of this.loggers)c.trace(a,...b)}debug(a,...b){for(let c of this.loggers)c.debug(a,...b)}info(a,...b){for(let c of this.loggers)c.info(a,...b)}warn(a,...b){for(let c of this.loggers)c.warn(a,...b)}error(a,...b){for(let c of this.loggers)c.error(a,...b)}dispose(){for(let a of this.loggers)a.dispose();super.dispose()}}class v extends h.jG{constructor(a,b,c){if(super(),this.logLevel=a,this.logsHome=b,this._loggers=new i.fT,this._onDidChangeLoggers=this._register(new f.vl),this._onDidChangeVisibility=this._register(new f.vl),c)for(const a of c)this._loggers.set(a.resource,{logger:void 0,info:a})}getLoggerEntry(a){return(0,k.Kg)(a)?[...this._loggers.values()].find(b=>b.info.id===a):this._loggers.get(a)}createLogger(a,b){let c=this.toResource(a),d=(0,k.Kg)(a)?a:b?.id??(0,g.tW)(c.toString()).toString(16),f=this._loggers.get(c)?.logger,h=b?.logLevel==="always"?e.Trace:b?.logLevel;f||(f=this.doCreateLogger(c,h??this.getLogLevel(c)??this.logLevel,{...b,id:d}));let i={logger:f,info:{resource:c,id:d,logLevel:h,name:b?.name,hidden:b?.hidden,group:b?.group,extensionId:b?.extensionId,when:b?.when}};return this.registerLogger(i.info),this._loggers.set(c,i),f}toResource(a){return(0,k.Kg)(a)?(0,j.uJ)(this.logsHome,`${a.replace(/[\\/:\*\?"<>\|]/g,"")}.log`):a}setVisibility(a,b){let c=this.getLoggerEntry(a);c&&!c.info.hidden!==b&&(c.info.hidden=!b,this._loggers.set(c.info.resource,c),this._onDidChangeVisibility.fire([c.info.resource,b]))}getLogLevel(a){let b;return a&&(b=this._loggers.get(a)?.info.logLevel),b??this.logLevel}registerLogger(a){let b=this._loggers.get(a.resource);b?b.info.hidden!==a.hidden&&this.setVisibility(a.resource,!a.hidden):(this._loggers.set(a.resource,{info:a,logger:void 0}),this._onDidChangeLoggers.fire({added:[a],removed:[]}))}dispose(){this._loggers.forEach(a=>a.logger?.dispose()),this._loggers.clear(),super.dispose()}}class w{constructor(){this.onDidChangeLogLevel=new f.vl().event}setLevel(a){}getLevel(){return e.Info}trace(a){}debug(a){}info(a){}warn(a){}error(a){}dispose(){}}class x extends v{constructor(){super(e.Off,l.r.parse("log:///log"))}doCreateLogger(a,b,c){return new w}}new m.N1("logLevel",function(a){switch(a){case e.Trace:return"trace";case e.Debug:return"debug";case e.Info:return"info";case e.Warning:return"warn";case e.Error:return"error";case e.Off:return"off"}}(e.Info))},37814:(a,b,c)=>{"use strict";c.d(b,{KG:()=>i,vx:()=>j});var d=c(39870),e=c(75082),f=c(76631),g=c(35001),h=c(18216);function i(a){if((0,e.sb)(a)){let b=(0,e.BK)(a),c=(0,e.mU)(a);return{top:b.top*c,left:b.left*c,width:b.width*c,height:b.height*c}}return a&&"number"==typeof a.x&&"number"==typeof a.y?{top:a.y,left:a.x,width:a.width||1,height:a.height||2}:{top:a.posy,left:a.posx,width:2,height:2}}c(50157);class j extends f.jG{static{this.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"]}static{this.BUBBLE_DOWN_EVENTS=["click"]}constructor(a,b){super(),this.container=null,this.useFixedPosition=!1,this.useShadowDOM=!1,this.delegate=null,this.toDisposeOnClean=f.jG.None,this.toDisposeOnSetContainer=f.jG.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=(0,e.$)(".context-view"),(0,e.jD)(this.view),this.setContainer(a,b),this._register((0,f.s)(()=>this.setContainer(null,1)))}setContainer(a,b){this.useFixedPosition=1!==b;let c=this.useShadowDOM;if(this.useShadowDOM=3===b,(a!==this.container||c!==this.useShadowDOM)&&(this.container&&(this.toDisposeOnSetContainer.dispose(),this.view.remove(),this.shadowRoot&&(this.shadowRoot=null,this.shadowRootHostElement?.remove(),this.shadowRootHostElement=null),this.container=null),a)){if(this.container=a,this.useShadowDOM){this.shadowRootHostElement=(0,e.$)(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});let a=document.createElement("style");a.textContent=k,this.shadowRoot.appendChild(a),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild((0,e.$)("slot"))}else this.container.appendChild(this.view);let b=new f.Cm;j.BUBBLE_UP_EVENTS.forEach(a=>{b.add((0,e.un)(this.container,a,a=>{this.onDOMEvent(a,!1)}))}),j.BUBBLE_DOWN_EVENTS.forEach(a=>{b.add((0,e.un)(this.container,a,a=>{this.onDOMEvent(a,!0)},!0))}),this.toDisposeOnSetContainer=b}}show(a){this.isVisible()&&this.hide(),(0,e.w_)(this.view),this.view.className="context-view monaco-component",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex=`${2575+(a.layer??0)}`,this.view.style.position=this.useFixedPosition?"fixed":"absolute",(0,e.WU)(this.view),this.toDisposeOnClean=a.render(this.view)||f.jG.None,this.delegate=a,this.doLayout(),this.delegate.focus?.()}getViewElement(){return this.view}layout(){if(this.isVisible()){if(!1===this.delegate.canRelayout&&!(h.un&&d.e.pointerEvents))return void this.hide();this.delegate?.layout?.(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let a=i(this.delegate.getAnchor()),b=this.container?(0,e.zk)(this.container):(0,e.fz)(),c={top:b.pageYOffset,left:b.pageXOffset,width:b.innerWidth,height:b.innerHeight},d={width:(0,e.Tr)(this.view),height:(0,e.OK)(this.view)},f=this.delegate.anchorPosition,h=this.delegate.anchorAlignment,j=this.delegate.anchorAxisAlignment,{top:k,left:l}=(0,g.$P)(c,d,a,{anchorAlignment:h,anchorPosition:f,anchorAxisAlignment:j});this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===f?"bottom":"top"),this.view.classList.add(0===h?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);let m=(0,e.BK)(this.container),n=this.container.scrollTop||0,o=this.container.scrollLeft||0;this.view.style.top=`${k-(this.useFixedPosition?(0,e.BK)(this.view).top:m.top)+n}px`,this.view.style.left=`${l-(this.useFixedPosition?(0,e.BK)(this.view).left:m.left)+o}px`,this.view.style.width="initial"}hide(a){let b=this.delegate;this.delegate=null,b?.onHide&&b.onHide(a);let c=this.toDisposeOnClean;this.toDisposeOnClean=f.jG.None,c.dispose(),(0,e.jD)(this.view)}isVisible(){return!!this.delegate}onDOMEvent(a,b){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(a,(0,e.zk)(a).document.activeElement):b&&!(0,e.QX)(a.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}let k=`
15
15
  :host {
16
16
  all: initial; /* 1st rule so subsequent properties are reset. */
17
17
  }
@@ -50,7 +50,7 @@ ${a}</tr>
50
50
  :host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }
51
51
  :host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }
52
52
  :host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }
53
- `},38238:()=>{},38750:(a,b,c)=>{"use strict";c.d(b,{yE:()=>g});var d=c(95091),e=c(76631);class f{constructor(a,b,c,d,e,f,g){this._forceIntegerValues=a,this._scrollStateBrand=void 0,this._forceIntegerValues&&(b|=0,c|=0,d|=0,e|=0,f|=0,g|=0),this.rawScrollLeft=d,this.rawScrollTop=g,b<0&&(b=0),d+b>c&&(d=c-b),d<0&&(d=0),e<0&&(e=0),g+e>f&&(g=f-e),g<0&&(g=0),this.width=b,this.scrollWidth=c,this.scrollLeft=d,this.height=e,this.scrollHeight=f,this.scrollTop=g}equals(a){return this.rawScrollLeft===a.rawScrollLeft&&this.rawScrollTop===a.rawScrollTop&&this.width===a.width&&this.scrollWidth===a.scrollWidth&&this.scrollLeft===a.scrollLeft&&this.height===a.height&&this.scrollHeight===a.scrollHeight&&this.scrollTop===a.scrollTop}withScrollDimensions(a,b){return new f(this._forceIntegerValues,void 0!==a.width?a.width:this.width,void 0!==a.scrollWidth?a.scrollWidth:this.scrollWidth,b?this.rawScrollLeft:this.scrollLeft,void 0!==a.height?a.height:this.height,void 0!==a.scrollHeight?a.scrollHeight:this.scrollHeight,b?this.rawScrollTop:this.scrollTop)}withScrollPosition(a){return new f(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==a.scrollLeft?a.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==a.scrollTop?a.scrollTop:this.rawScrollTop)}createScrollEvent(a,b){let c=this.width!==a.width,d=this.scrollWidth!==a.scrollWidth,e=this.scrollLeft!==a.scrollLeft,f=this.height!==a.height,g=this.scrollHeight!==a.scrollHeight,h=this.scrollTop!==a.scrollTop;return{inSmoothScrolling:b,oldWidth:a.width,oldScrollWidth:a.scrollWidth,oldScrollLeft:a.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:a.height,oldScrollHeight:a.scrollHeight,oldScrollTop:a.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:c,scrollWidthChanged:d,scrollLeftChanged:e,heightChanged:f,scrollHeightChanged:g,scrollTopChanged:h}}}class g extends e.jG{constructor(a){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new d.vl),this.onScroll=this._onScroll.event,this._smoothScrollDuration=a.smoothScrollDuration,this._scheduleAtNextAnimationFrame=a.scheduleAtNextAnimationFrame,this._state=new f(a.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(a){this._smoothScrollDuration=a}validateScrollPosition(a){return this._state.withScrollPosition(a)}getScrollDimensions(){return this._state}setScrollDimensions(a,b){let c=this._state.withScrollDimensions(a,b);this._setState(c,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(a){let b=this._state.withScrollPosition(a);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(b,!1)}setScrollPositionSmooth(a,b){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(a);if(this._smoothScrolling){let c;a={scrollLeft:void 0===a.scrollLeft?this._smoothScrolling.to.scrollLeft:a.scrollLeft,scrollTop:void 0===a.scrollTop?this._smoothScrolling.to.scrollTop:a.scrollTop};let d=this._state.withScrollPosition(a);if(this._smoothScrolling.to.scrollLeft===d.scrollLeft&&this._smoothScrolling.to.scrollTop===d.scrollTop)return;c=b?new j(this._smoothScrolling.from,d,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,d,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=c}else{let b=this._state.withScrollPosition(a);this._smoothScrolling=j.start(this._state,b,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let a=this._smoothScrolling.tick(),b=this._state.withScrollPosition(a);if(this._setState(b,!0),this._smoothScrolling){if(a.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(a,b){let c=this._state;c.equals(a)||(this._state=a,this._onScroll.fire(this._state.createScrollEvent(c,b)))}}class h{constructor(a,b,c){this.scrollLeft=a,this.scrollTop=b,this.isDone=c}}function i(a,b){let c=b-a;return function(b){return a+c*(1-Math.pow(1-b,3))}}class j{constructor(a,b,c,d){this.from=a,this.to=b,this.duration=d,this.startTime=c,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(a,b,c){if(Math.abs(a-b)>2.5*c){var d,e;let f,g;return a<b?(f=a+.75*c,g=b-.75*c):(f=a-.75*c,g=b+.75*c),d=i(a,f),e=i(g,b),function(a){return a<.33?d(a/.33):e((a-.33)/(1-.33))}}return i(a,b)}dispose(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(a){this.to=a.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(a){let b=(a-this.startTime)/this.duration;return b<1?new h(this.scrollLeft(b),this.scrollTop(b),!1):new h(this.to.scrollLeft,this.to.scrollTop,!0)}combine(a,b,c){return j.start(a,b,c)}static start(a,b,c){return c+=10,new j(a,b,Date.now()-10,c)}}},39014:(a,b,c)=>{"use strict";c.d(b,{Al:()=>q,EL:()=>i,HJ:()=>j,NB:()=>l,c7:()=>p,er:()=>k,iw:()=>m,nH:()=>o});var d=c(72816),e=c(55404),f=c(37327),g=c(11023),h=c(91018);let i=(0,f.x1)("quickInput.background",g.Cg,(0,d.kg)(2078,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),j=(0,f.x1)("quickInput.foreground",g.Fi,(0,d.kg)(2079,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),k=(0,f.x1)("quickInputTitle.background",{dark:new e.Q1(new e.bU(255,255,255,.105)),light:new e.Q1(new e.bU(0,0,0,.06)),hcDark:"#000000",hcLight:e.Q1.white},(0,d.kg)(2080,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),l=(0,f.x1)("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:e.Q1.white,hcLight:"#0F4A85"},(0,d.kg)(2081,"Quick picker color for grouping labels.")),m=(0,f.x1)("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:e.Q1.white,hcLight:"#0F4A85"},(0,d.kg)(2082,"Quick picker color for grouping borders.")),n=(0,f.x1)("quickInput.list.focusBackground",null,"",void 0,(0,d.kg)(2083,"Please use quickInputList.focusBackground instead")),o=(0,f.x1)("quickInputList.focusForeground",h.GV,(0,d.kg)(2084,"Quick picker foreground color for the focused item.")),p=(0,f.x1)("quickInputList.focusIconForeground",h.fE,(0,d.kg)(2085,"Quick picker icon foreground color for the focused item.")),q=(0,f.x1)("quickInputList.focusBackground",{dark:(0,f.yL)(n,h.Rj),light:(0,f.yL)(n,h.Rj),hcDark:null,hcLight:null},(0,d.kg)(2086,"Quick picker background color for the focused item."));(0,f.x1)("quickInputList.focusHighlightForeground",h.eM,(0,d.kg)(2087,"Quick picker foreground color of the match highlights on the focused item."))},39194:(a,b,c)=>{"use strict";c.d(b,{AI:()=>f,Kz:()=>h,Ot:()=>g});var d=c(12780),e=c(58254),f=d.A;let g=(0,e.u1)("notificationService");class h{}},39366:()=>{},39383:(a,b,c)=>{"use strict";c.d(b,{h:()=>g});var d=c(97195),e=c(16202),f=c(72333);function g(a,b,c,g){b.tokenization.forceTokenization(c.startLineNumber);let h=b.getLanguageIdAtPosition(c.startLineNumber,c.startColumn),i=g.getLanguageConfiguration(h);if(!i)return null;let j=new f.V(b,g).getProcessedTokenContextAroundRange(c),k=j.previousLineProcessedTokens.getLineContent(),l=j.beforeRangeProcessedTokens.getLineContent(),m=j.afterRangeProcessedTokens.getLineContent(),n=i.onEnter(a,k,l,m);if(!n)return null;let o=n.indentAction,p=n.appendText,q=n.removeText||0;p?o===d.l.Indent&&(p=" "+p):p=o===d.l.Indent||o===d.l.IndentOutdent?" ":"";let r=(0,e.Cw)(b,c.startLineNumber,c.startColumn);return q&&(r=r.substring(0,r.length-q)),{indentAction:o,appendText:p,removeText:q,indentation:r}}},39482:(a,b,c)=>{"use strict";c.d(b,{L:()=>e,h:()=>f});var d=c(66036);class e{static fromTo(a,b){return new e(a,b)}static addRange(a,b){let c=0;for(;c<b.length&&b[c].endExclusive<a.start;)c++;let d=c;for(;d<b.length&&b[d].start<=a.endExclusive;)d++;if(c===d)b.splice(c,0,a);else{let f=Math.min(a.start,b[c].start),g=Math.max(a.endExclusive,b[d-1].endExclusive);b.splice(c,d-c,new e(f,g))}}static tryCreate(a,b){if(!(a>b))return new e(a,b)}static ofLength(a){return new e(0,a)}static ofStartAndLength(a,b){return new e(a,a+b)}static emptyAt(a){return new e(a,a)}constructor(a,b){if(this.start=a,this.endExclusive=b,a>b)throw new d.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(a){return new e(this.start+a,this.endExclusive+a)}deltaStart(a){return new e(this.start+a,this.endExclusive)}deltaEnd(a){return new e(this.start,this.endExclusive+a)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(a){return this.start===a.start&&this.endExclusive===a.endExclusive}containsRange(a){return this.start<=a.start&&a.endExclusive<=this.endExclusive}contains(a){return this.start<=a&&a<this.endExclusive}join(a){return new e(Math.min(this.start,a.start),Math.max(this.endExclusive,a.endExclusive))}intersect(a){let b=Math.max(this.start,a.start),c=Math.min(this.endExclusive,a.endExclusive);if(b<=c)return new e(b,c)}intersectionLength(a){let b=Math.max(this.start,a.start);return Math.max(0,Math.min(this.endExclusive,a.endExclusive)-b)}intersects(a){return Math.max(this.start,a.start)<Math.min(this.endExclusive,a.endExclusive)}intersectsOrTouches(a){return Math.max(this.start,a.start)<=Math.min(this.endExclusive,a.endExclusive)}isBefore(a){return this.endExclusive<=a.start}isAfter(a){return this.start>=a.endExclusive}slice(a){return a.slice(this.start,this.endExclusive)}substring(a){return a.substring(this.start,this.endExclusive)}clip(a){if(this.isEmpty)throw new d.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,a))}clipCyclic(a){if(this.isEmpty)throw new d.D7(`Invalid clipping range: ${this.toString()}`);return a<this.start?this.endExclusive-(this.start-a)%this.length:a>=this.endExclusive?this.start+(a-this.start)%this.length:a}forEach(a){for(let b=this.start;b<this.endExclusive;b++)a(b)}joinRightTouching(a){if(this.endExclusive!==a.start)throw new d.D7(`Invalid join: ${this.toString()} and ${a.toString()}`);return new e(this.start,a.endExclusive)}withMargin(a,b){return void 0===b&&(b=a),new e(this.start-a,this.endExclusive+b)}}class f{constructor(){this._sortedRanges=[]}addRange(a){let b=0;for(;b<this._sortedRanges.length&&this._sortedRanges[b].endExclusive<a.start;)b++;let c=b;for(;c<this._sortedRanges.length&&this._sortedRanges[c].start<=a.endExclusive;)c++;if(b===c)this._sortedRanges.splice(b,0,a);else{let d=Math.min(a.start,this._sortedRanges[b].start),f=Math.max(a.endExclusive,this._sortedRanges[c-1].endExclusive);this._sortedRanges.splice(b,c-b,new e(d,f))}}toString(){return this._sortedRanges.map(a=>a.toString()).join(", ")}intersectsStrict(a){let b=0;for(;b<this._sortedRanges.length&&this._sortedRanges[b].endExclusive<=a.start;)b++;return b<this._sortedRanges.length&&this._sortedRanges[b].start<a.endExclusive}intersectWithRange(a){let b=new f;for(let c of this._sortedRanges){let d=c.intersect(a);d&&b.addRange(d)}return b}intersectWithRangeLength(a){return this.intersectWithRange(a).length}get length(){return this._sortedRanges.reduce((a,b)=>a+b.length,0)}}},39870:(a,b,c)=>{"use strict";c.d(b,{e:()=>f}),c(47322);var d=c(27612),e=c(18216);let f={clipboard:{writeText:e.ib||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:e.ib||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},pointerEvents:d.G.PointerEvent&&("ontouchstart"in d.G||navigator.maxTouchPoints>0)}},39924:(a,b,c)=>{"use strict";c.d(b,{A3:()=>F,AQ:()=>T,Am:()=>D,As:()=>H,BD:()=>ad,Bo:()=>ab,CM:()=>B,D0:()=>m,H0:()=>C,I2:()=>aa,IW:()=>ae,If:()=>ac,JB:()=>J,L0:()=>r,Mf:()=>l,P1:()=>aj,Pe:()=>ah,Qt:()=>t,WD:()=>ai,WS:()=>ag,WY:()=>ak,Xr:()=>N,aZ:()=>S,bB:()=>af,hz:()=>y,ik:()=>K,je:()=>p,kG:()=>j,kM:()=>n,l5:()=>X,lQ:()=>V,n4:()=>_,ob:()=>x,ow:()=>z,s7:()=>$,sC:()=>o,sH:()=>Y,sN:()=>U,ss:()=>W,tK:()=>E,tp:()=>G,vP:()=>A,vV:()=>w,vp:()=>Q,w4:()=>s,wZ:()=>L,we:()=>q,x9:()=>M,xU:()=>k,yI:()=>R,yw:()=>O,zp:()=>Z});var d=c(72816),e=c(55404),f=c(37327),g=c(34183);c(48727);var h=c(11023);c(18896),c(91018),c(62957),c(40563),c(58330),c(39014),c(26858);var i=c(46547);let j=(0,f.x1)("editor.lineHighlightBackground",null,(0,d.kg)(641,"Background color for the highlight of line at the cursor position.")),k=(0,f.x1)("editor.inactiveLineHighlightBackground",j,(0,d.kg)(642,"Background color for the highlight of line at the cursor position when the editor is not focused.")),l=(0,f.x1)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:g.b1},(0,d.kg)(643,"Background color for the border around the line at the cursor position."));(0,f.x1)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},(0,d.kg)(644,"Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,f.x1)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:g.bu,hcLight:g.bu},(0,d.kg)(645,"Background color of the border around highlighted ranges.")),(0,f.x1)("editor.symbolHighlightBackground",{dark:h.Ub,light:h.Ub,hcDark:null,hcLight:null},(0,d.kg)(646,"Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,f.x1)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:g.bu,hcLight:g.bu},(0,d.kg)(647,"Background color of the border around highlighted symbols."));let m=(0,f.x1)("editorCursor.foreground",{dark:"#AEAFAD",light:e.Q1.black,hcDark:e.Q1.white,hcLight:"#0F4A85"},(0,d.kg)(648,"Color of the editor cursor.")),n=(0,f.x1)("editorCursor.background",null,(0,d.kg)(649,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),o=(0,f.x1)("editorMultiCursor.primary.foreground",m,(0,d.kg)(650,"Color of the primary editor cursor when multiple cursors are present.")),p=(0,f.x1)("editorMultiCursor.primary.background",n,(0,d.kg)(651,"The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),q=(0,f.x1)("editorMultiCursor.secondary.foreground",m,(0,d.kg)(652,"Color of secondary editor cursors when multiple cursors are present.")),r=(0,f.x1)("editorMultiCursor.secondary.background",n,(0,d.kg)(653,"The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),s=(0,f.x1)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},(0,d.kg)(654,"Color of whitespace characters in the editor.")),t=(0,f.x1)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:e.Q1.white,hcLight:"#292929"},(0,d.kg)(655,"Color of editor line numbers.")),u=(0,f.x1)("editorIndentGuide.background",s,(0,d.kg)(656,"Color of the editor indentation guides."),!1,(0,d.kg)(657,"'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),v=(0,f.x1)("editorIndentGuide.activeBackground",s,(0,d.kg)(658,"Color of the active editor indentation guides."),!1,(0,d.kg)(659,"'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),w=(0,f.x1)("editorIndentGuide.background1",u,(0,d.kg)(660,"Color of the editor indentation guides (1).")),x=(0,f.x1)("editorIndentGuide.background2","#00000000",(0,d.kg)(661,"Color of the editor indentation guides (2).")),y=(0,f.x1)("editorIndentGuide.background3","#00000000",(0,d.kg)(662,"Color of the editor indentation guides (3).")),z=(0,f.x1)("editorIndentGuide.background4","#00000000",(0,d.kg)(663,"Color of the editor indentation guides (4).")),A=(0,f.x1)("editorIndentGuide.background5","#00000000",(0,d.kg)(664,"Color of the editor indentation guides (5).")),B=(0,f.x1)("editorIndentGuide.background6","#00000000",(0,d.kg)(665,"Color of the editor indentation guides (6).")),C=(0,f.x1)("editorIndentGuide.activeBackground1",v,(0,d.kg)(666,"Color of the active editor indentation guides (1).")),D=(0,f.x1)("editorIndentGuide.activeBackground2","#00000000",(0,d.kg)(667,"Color of the active editor indentation guides (2).")),E=(0,f.x1)("editorIndentGuide.activeBackground3","#00000000",(0,d.kg)(668,"Color of the active editor indentation guides (3).")),F=(0,f.x1)("editorIndentGuide.activeBackground4","#00000000",(0,d.kg)(669,"Color of the active editor indentation guides (4).")),G=(0,f.x1)("editorIndentGuide.activeBackground5","#00000000",(0,d.kg)(670,"Color of the active editor indentation guides (5).")),H=(0,f.x1)("editorIndentGuide.activeBackground6","#00000000",(0,d.kg)(671,"Color of the active editor indentation guides (6).")),I=(0,f.x1)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:g.bu,hcLight:g.bu},(0,d.kg)(672,"Color of editor active line number"),!1,(0,d.kg)(673,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));(0,f.x1)("editorLineNumber.activeForeground",I,(0,d.kg)(674,"Color of editor active line number"));let J=(0,f.x1)("editorLineNumber.dimmedForeground",null,(0,d.kg)(675,"Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),K=(0,f.x1)("editorRuler.foreground",{dark:"#5A5A5A",light:e.Q1.lightgrey,hcDark:e.Q1.white,hcLight:"#292929"},(0,d.kg)(676,"Color of the editor rulers."));(0,f.x1)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},(0,d.kg)(677,"Foreground color of editor CodeLens")),(0,f.x1)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},(0,d.kg)(678,"Background color behind matching brackets")),(0,f.x1)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:g.b1,hcLight:g.b1},(0,d.kg)(679,"Color for matching brackets boxes"));let L=(0,f.x1)("editorBracketMatch.foreground",null,(0,d.kg)(680,"Foreground color for matching brackets")),M=(0,f.x1)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},(0,d.kg)(681,"Color of the overview ruler border.")),N=(0,f.x1)("editorOverviewRuler.background",null,(0,d.kg)(682,"Background color of the editor overview ruler."));(0,f.x1)("editorGutter.background",h.Yt,(0,d.kg)(683,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,f.x1)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:e.Q1.fromHex("#fff").transparent(.8),hcLight:g.b1},(0,d.kg)(684,"Border color of unnecessary (unused) source code in the editor."));let O=(0,f.x1)("editorUnnecessaryCode.opacity",{dark:e.Q1.fromHex("#000a"),light:e.Q1.fromHex("#0007"),hcDark:null,hcLight:null},(0,d.kg)(685,"Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out."));(0,f.x1)("editorGhostText.border",{dark:null,light:null,hcDark:e.Q1.fromHex("#fff").transparent(.8),hcLight:e.Q1.fromHex("#292929").transparent(.8)},(0,d.kg)(686,"Border color of ghost text in the editor.")),(0,f.x1)("editorGhostText.foreground",{dark:e.Q1.fromHex("#ffffff56"),light:e.Q1.fromHex("#0007"),hcDark:null,hcLight:null},(0,d.kg)(687,"Foreground color of the ghost text in the editor.")),(0,f.x1)("editorGhostText.background",null,(0,d.kg)(688,"Background color of the ghost text in the editor."));let P=new e.Q1(new e.bU(0,122,204,.6)),Q=(0,f.x1)("editorOverviewRuler.rangeHighlightForeground",P,(0,d.kg)(689,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),R=(0,f.x1)("editorOverviewRuler.errorForeground",{dark:new e.Q1(new e.bU(255,18,18,.7)),light:new e.Q1(new e.bU(255,18,18,.7)),hcDark:new e.Q1(new e.bU(255,50,50,1)),hcLight:"#B5200D"},(0,d.kg)(690,"Overview ruler marker color for errors.")),S=(0,f.x1)("editorOverviewRuler.warningForeground",{dark:h.Hn,light:h.Hn,hcDark:h.St,hcLight:h.St},(0,d.kg)(691,"Overview ruler marker color for warnings.")),T=(0,f.x1)("editorOverviewRuler.infoForeground",{dark:h.pO,light:h.pO,hcDark:h.II,hcLight:h.II},(0,d.kg)(692,"Overview ruler marker color for infos.")),U=(0,f.x1)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},(0,d.kg)(693,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),V=(0,f.x1)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},(0,d.kg)(694,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),W=(0,f.x1)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},(0,d.kg)(695,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),X=(0,f.x1)("editorBracketHighlight.foreground4","#00000000",(0,d.kg)(696,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),Y=(0,f.x1)("editorBracketHighlight.foreground5","#00000000",(0,d.kg)(697,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),Z=(0,f.x1)("editorBracketHighlight.foreground6","#00000000",(0,d.kg)(698,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),$=(0,f.x1)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new e.Q1(new e.bU(255,18,18,.8)),light:new e.Q1(new e.bU(255,18,18,.8)),hcDark:new e.Q1(new e.bU(255,50,50,1)),hcLight:"#B5200D"},(0,d.kg)(699,"Foreground color of unexpected brackets.")),_=(0,f.x1)("editorBracketPairGuide.background1","#00000000",(0,d.kg)(700,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),aa=(0,f.x1)("editorBracketPairGuide.background2","#00000000",(0,d.kg)(701,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),ab=(0,f.x1)("editorBracketPairGuide.background3","#00000000",(0,d.kg)(702,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),ac=(0,f.x1)("editorBracketPairGuide.background4","#00000000",(0,d.kg)(703,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),ad=(0,f.x1)("editorBracketPairGuide.background5","#00000000",(0,d.kg)(704,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),ae=(0,f.x1)("editorBracketPairGuide.background6","#00000000",(0,d.kg)(705,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),af=(0,f.x1)("editorBracketPairGuide.activeBackground1","#00000000",(0,d.kg)(706,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),ag=(0,f.x1)("editorBracketPairGuide.activeBackground2","#00000000",(0,d.kg)(707,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),ah=(0,f.x1)("editorBracketPairGuide.activeBackground3","#00000000",(0,d.kg)(708,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),ai=(0,f.x1)("editorBracketPairGuide.activeBackground4","#00000000",(0,d.kg)(709,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),aj=(0,f.x1)("editorBracketPairGuide.activeBackground5","#00000000",(0,d.kg)(710,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),ak=(0,f.x1)("editorBracketPairGuide.activeBackground6","#00000000",(0,d.kg)(711,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));(0,f.x1)("editorUnicodeHighlight.border",h.Hn,(0,d.kg)(712,"Border color used to highlight unicode characters.")),(0,f.x1)("editorUnicodeHighlight.background",h.wh,(0,d.kg)(713,"Background color used to highlight unicode characters.")),(0,i.zy)((a,b)=>{let c=a.getColor(h.Yt),d=a.getColor(j),e=d&&!d.isTransparent()?d:c;e&&b.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${e}; }`)})},40002:(a,b,c)=>{"use strict";c.d(b,{I:()=>e});var d=c(66560);class e extends d.LN{constructor(a){super(),this._getContext=a}runAction(a,b){let c=this._getContext();return super.runAction(a,c)}}},40427:(a,b,c)=>{"use strict";c.d(b,{e2:()=>i,sN:()=>g,tW:()=>f,v7:()=>l});var d=c(15053),e=c(26529);function f(a){return g(a,0)}function g(a,b){switch(typeof a){case"object":var c,d,e,f;if(null===a)return h(349,b);if(Array.isArray(a)){return c=a,d=h(104579,d=b),c.reduce((a,b)=>g(b,a),d)}return e=a,f=h(181387,f=b),Object.keys(e).sort().reduce((a,b)=>(a=i(b,a),g(e[b],a)),f);case"string":return i(a,b);case"boolean":return h(a?433:863,b);case"number":return h(a,b);case"undefined":return h(937,b);default:return h(617,b)}}function h(a,b){return(b<<5)-b+a|0}function i(a,b){b=h(149417,b);for(let c=0,d=a.length;c<d;c++)b=h(a.charCodeAt(c),b);return b}function j(a,b,c=32){let d=c-b;return(a<<b|(~((1<<d)-1)&a)>>>d)>>>0}function k(a,b=32){return a instanceof ArrayBuffer?(0,d.mU)(d.MB.wrap(new Uint8Array(a))):(a>>>0).toString(16).padStart(b/4,"0")}class l{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=0x67452301,this._h1=0xefcdab89,this._h2=0x98badcfe,this._h3=0x10325476,this._h4=0xc3d2e1f0,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(a){let b,c,d=a.length;if(0===d)return;let f=this._buff,g=this._buffLen,h=this._leftoverHighSurrogate;for(0!==h?(b=h,c=-1,h=0):(b=a.charCodeAt(0),c=0);;){let i=b;if((0,e.pc)(b))if(c+1<d){let d=a.charCodeAt(c+1);(0,e.LJ)(d)?(c++,i=(0,e.z_)(b,d)):i=65533}else{h=b;break}else(0,e.LJ)(b)&&(i=65533);if(g=this._push(f,g,i),++c<d)b=a.charCodeAt(c);else break}this._buffLen=g,this._leftoverHighSurrogate=h}_push(a,b,c){return c<128?a[b++]=c:(c<2048?a[b++]=192|(1984&c)>>>6:(c<65536?a[b++]=224|(61440&c)>>>12:(a[b++]=240|(1835008&c)>>>18,a[b++]=128|(258048&c)>>>12),a[b++]=128|(4032&c)>>>6),a[b++]=128|(63&c)>>>0),b>=64&&(this._step(),b-=64,this._totalLen+=64,a[0]=a[64],a[1]=a[65],a[2]=a[66]),b}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),k(this._h0)+k(this._h1)+k(this._h2)+k(this._h3)+k(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let a=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(a/0x100000000),!1),this._buffDV.setUint32(60,a%0x100000000,!1),this._step()}_step(){let a,b,c,d=l._bigBlock32,e=this._buffDV;for(let a=0;a<64;a+=4)d.setUint32(a,e.getUint32(a,!1),!1);for(let a=64;a<320;a+=4)d.setUint32(a,j(d.getUint32(a-12,!1)^d.getUint32(a-32,!1)^d.getUint32(a-56,!1)^d.getUint32(a-64,!1),1),!1);let f=this._h0,g=this._h1,h=this._h2,i=this._h3,k=this._h4;for(let e=0;e<80;e++)e<20?(a=g&h|~g&i,b=0x5a827999):e<40?(a=g^h^i,b=0x6ed9eba1):e<60?(a=g&h|g&i|h&i,b=0x8f1bbcdc):(a=g^h^i,b=0xca62c1d6),c=j(f,5)+a+k+b+d.getUint32(4*e,!1)|0,k=i,i=h,h=j(g,30),g=f,f=c;this._h0=this._h0+f|0,this._h1=this._h1+g|0,this._h2=this._h2+h|0,this._h3=this._h3+i|0,this._h4=this._h4+k|0}}},40563:(a,b,c)=>{"use strict";c.d(b,{Aj:()=>i,IL:()=>o,K1:()=>p,Ko:()=>l,Xp:()=>j,uM:()=>m,yL:()=>n,yr:()=>k});var d=c(72816),e=c(55404),f=c(37327),g=c(11023),h=c(58330);let i=(0,f.x1)("minimap.findMatchHighlight",g.Ub,(0,d.kg)(2051,"Minimap marker color for find matches."),!0),j=(0,f.x1)("minimap.selectionOccurrenceHighlight",g.Qw,(0,d.kg)(2052,"Minimap marker color for repeating editor selections."),!0),k=(0,f.x1)("minimap.selectionHighlight",g.se,(0,d.kg)(2053,"Minimap marker color for the editor selection."),!0),l=(0,f.x1)("minimap.infoHighlight",{dark:g.pO,light:g.pO,hcDark:g.II,hcLight:g.II},(0,d.kg)(2054,"Minimap marker color for infos.")),m=(0,f.x1)("minimap.warningHighlight",{dark:g.Hn,light:g.Hn,hcDark:g.St,hcLight:g.St},(0,d.kg)(2055,"Minimap marker color for warnings.")),n=(0,f.x1)("minimap.errorHighlight",{dark:new e.Q1(new e.bU(255,18,18,.7)),light:new e.Q1(new e.bU(255,18,18,.7)),hcDark:new e.Q1(new e.bU(255,50,50,1)),hcLight:"#B5200D"},(0,d.kg)(2056,"Minimap marker color for errors.")),o=(0,f.x1)("minimap.background",null,(0,d.kg)(2057,"Minimap background color.")),p=(0,f.x1)("minimap.foregroundOpacity",e.Q1.fromHex("#000f"),(0,d.kg)(2058,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));(0,f.x1)("minimapSlider.background",(0,f.JO)(h.gn,.5),(0,d.kg)(2059,"Minimap slider background color.")),(0,f.x1)("minimapSlider.hoverBackground",(0,f.JO)(h.cI,.5),(0,d.kg)(2060,"Minimap slider background color when hovering.")),(0,f.x1)("minimapSlider.activeBackground",(0,f.JO)(h.mh,.5),(0,d.kg)(2061,"Minimap slider background color when clicked on."))},40981:(a,b,c)=>{"use strict";c.d(b,{b:()=>d});let d=(0,c(58254).u1)("textModelService")},41206:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});var d=c(61822);class e{static insert(a,b){return{range:new d.Q(a.lineNumber,a.column,a.lineNumber,a.column),text:b,forceMoveMarkers:!0}}static delete(a){return{range:a,text:null}}static replace(a,b){return{range:a,text:b}}static replaceMove(a,b){return{range:a,text:b,forceMoveMarkers:!0}}}},41577:(a,b,c)=>{"use strict";c.d(b,{i:()=>f,y:()=>g});var d=c(61822),e=c(77509);class f{constructor(a,b,c){this._range=a,this._charBeforeSelection=b,this._charAfterSelection=c}getEditOperations(a,b){b.addTrackedEditOperation(new d.Q(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),b.addTrackedEditOperation(new d.Q(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection||null)}computeCursorState(a,b){let c=b.getInverseEditOperations(),d=c[0].range,f=c[1].range;return new e.L(d.endLineNumber,d.endColumn,f.endLineNumber,f.endColumn-this._charAfterSelection.length)}}class g{constructor(a,b,c){this._position=a,this._text=b,this._charAfter=c}getEditOperations(a,b){b.addTrackedEditOperation(new d.Q(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(a,b){let c=b.getInverseEditOperations()[0].range;return new e.L(c.endLineNumber,c.startColumn,c.endLineNumber,c.endColumn-this._charAfter.length)}}},41847:()=>{},41928:()=>{},42190:(a,b,c)=>{"use strict";c.d(b,{GN:()=>e,vo:()=>d});class d{constructor(a,b){this._viewModelDecorationBrand=void 0,this.range=a,this.options=b}}function e(a,b){return!(b.options.hideInCommentTokens&&f(a,b.range,a=>1===a)||b.options.hideInStringTokens&&f(a,b.range,a=>2===a))}function f(a,b,c){for(let d=b.startLineNumber;d<=b.endLineNumber;d++){let e=a.tokenization.getLineTokens(d),f=d===b.startLineNumber,g=d===b.endLineNumber,h=f?e.findTokenIndexAtOffset(b.startColumn-1):0;for(;h<e.getCount()&&!(g&&e.getStartOffset(h)>b.endColumn-1);){if(!c(e.getStandardTokenType(h)))return!1;h++}}return!0}},42365:()=>{},42491:(a,b,c)=>{"use strict";c.d(b,{P:()=>l,k:()=>m});var d=c(88042),e=c(26529),f=c(18530),g=c(61822),h=c(25076),i=c(33836),j=c(2126),k=c(66036);class l extends h._{constructor(a,b){super(),this.textModel=a,this.languageConfigurationService=b}getLanguageConfiguration(a){return this.languageConfigurationService.getLanguageConfiguration(a)}_computeIndentLevel(a){return(0,i.G)(this.textModel.getLineContent(a+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(a,b,c){this.assertNotDisposed();let d=this.textModel.getLineCount();if(a<1||a>d)throw new k.D7("Illegal value for lineNumber");let e=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,f=!!(e&&e.offSide),g=-2,h=-1,i=-2,j=-1,l=a=>{if(-1!==g&&(-2===g||g>a-1)){g=-1,h=-1;for(let b=a-2;b>=0;b--){let a=this._computeIndentLevel(b);if(a>=0){g=b,h=a;break}}}if(-2===i){i=-1,j=-1;for(let b=a;b<d;b++){let a=this._computeIndentLevel(b);if(a>=0){i=b,j=a;break}}}},m=-2,n=-1,o=-2,p=-1,q=a=>{if(-2===m){m=-1,n=-1;for(let b=a-2;b>=0;b--){let a=this._computeIndentLevel(b);if(a>=0){m=b,n=a;break}}}if(-1!==o&&(-2===o||o<a-1)){o=-1,p=-1;for(let b=a;b<d;b++){let a=this._computeIndentLevel(b);if(a>=0){o=b,p=a;break}}}},r=0,s=!0,t=0,u=!0,v=0,w=0;for(let e=0;s||u;e++){let g=a-e,k=a+e;e>1&&(g<1||g<b)&&(s=!1),e>1&&(k>d||k>c)&&(u=!1),e>5e4&&(s=!1,u=!1);let o=-1;if(s&&g>=1){let a=this._computeIndentLevel(g-1);a>=0?(i=g-1,j=a,o=Math.ceil(a/this.textModel.getOptions().indentSize)):(l(g),o=this._getIndentLevelForWhitespaceLine(f,h,j))}let x=-1;if(u&&k<=d){let a=this._computeIndentLevel(k-1);a>=0?(m=k-1,n=a,x=Math.ceil(a/this.textModel.getOptions().indentSize)):(q(k),x=this._getIndentLevelForWhitespaceLine(f,n,p))}if(0===e){w=o;continue}if(1===e){if(k<=d&&x>=0&&w+1===x){s=!1,r=k,t=k,v=x;continue}if(g>=1&&o>=0&&o-1===w){u=!1,r=g,t=g,v=o;continue}if(r=a,t=a,0===(v=w))break}s&&(o>=v?r=g:s=!1),u&&(x>=v?t=k:u=!1)}return{startLineNumber:r,endLineNumber:t,indent:v}}getLinesBracketGuides(a,b,c,f){let h,i=[];for(let c=a;c<=b;c++)i.push([]);let k=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new g.Q(a,1,b,this.textModel.getLineMaxColumn(b))).toArray();if(c&&k.length>0){let e=(a<=c.lineNumber&&c.lineNumber<=b?k:this.textModel.bracketPairs.getBracketPairsInRange(g.Q.fromPositions(c)).toArray()).filter(a=>g.Q.strictContainsPosition(a.range,c));h=(0,d.Uk)(e,a=>!0)?.range}let l=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,n=new m;for(let c of k){if(!c.closingBracketRange)continue;let d=h&&c.range.equalsRange(h);if(!d&&!f.includeInactive)continue;let g=n.getInlineClassName(c.nestingLevel,c.nestingLevelOfEqualBracketType,l)+(f.highlightActive&&d?" "+n.activeClassName:""),k=c.openingBracketRange.getStartPosition(),m=c.closingBracketRange.getStartPosition(),o=f.horizontalGuides===j.N6.Enabled||f.horizontalGuides===j.N6.EnabledForActive&&d;if(c.range.startLineNumber===c.range.endLineNumber){o&&i[c.range.startLineNumber-a].push(new j.TH(-1,c.openingBracketRange.getEndPosition().column,g,new j.pv(!1,m.column),-1,-1));continue}let p=this.getVisibleColumnFromPosition(m),q=this.getVisibleColumnFromPosition(c.openingBracketRange.getStartPosition()),r=Math.min(q,p,c.minVisibleColumnIndentation+1),s=!1;(0,e.HG)(this.textModel.getLineContent(c.closingBracketRange.startLineNumber))<c.closingBracketRange.startColumn-1&&(s=!0);let t=Math.max(k.lineNumber,a),u=Math.min(m.lineNumber,b),v=+!!s;for(let b=t;b<u+v;b++)i[b-a].push(new j.TH(r,-1,g,null,b===k.lineNumber?k.column:-1,b===m.lineNumber?m.column:-1));o&&(k.lineNumber>=a&&q>r&&i[k.lineNumber-a].push(new j.TH(r,-1,g,new j.pv(!1,k.column),-1,-1)),m.lineNumber<=b&&p>r&&i[m.lineNumber-a].push(new j.TH(r,-1,g,new j.pv(!s,m.column),-1,-1)))}for(let a of i)a.sort((a,b)=>a.visibleColumn-b.visibleColumn);return i}getVisibleColumnFromPosition(a){return f.A.visibleColumnFromColumn(this.textModel.getLineContent(a.lineNumber),a.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(a,b){this.assertNotDisposed();let c=this.textModel.getLineCount();if(a<1||a>c)throw Error("Illegal value for startLineNumber");if(b<1||b>c)throw Error("Illegal value for endLineNumber");let d=this.textModel.getOptions(),e=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,f=!!(e&&e.offSide),g=Array(b-a+1),h=-2,i=-1,j=-2,k=-1;for(let e=a;e<=b;e++){let b=e-a,l=this._computeIndentLevel(e-1);if(l>=0){h=e-1,i=l,g[b]=Math.ceil(l/d.indentSize);continue}if(-2===h){h=-1,i=-1;for(let a=e-2;a>=0;a--){let b=this._computeIndentLevel(a);if(b>=0){h=a,i=b;break}}}if(-1!==j&&(-2===j||j<e-1)){j=-1,k=-1;for(let a=e;a<c;a++){let b=this._computeIndentLevel(a);if(b>=0){j=a,k=b;break}}}g[b]=this._getIndentLevelForWhitespaceLine(f,i,k)}return g}_getIndentLevelForWhitespaceLine(a,b,c){let d=this.textModel.getOptions();return -1===b||-1===c?0:b<c?1+Math.floor(b/d.indentSize):b===c?Math.ceil(c/d.indentSize):a?Math.ceil(c/d.indentSize):1+Math.floor(c/d.indentSize)}}class m{constructor(){this.activeClassName="indent-active"}getInlineClassName(a,b,c){return this.getInlineClassNameOfLevel(c?b:a)}getInlineClassNameOfLevel(a){return`bracket-indent-guide lvl-${a%30}`}}},42913:(a,b,c)=>{"use strict";c.d(b,{Wt:()=>function a(b,c,d=(!j&&(j=i()),j)){if(d&&c)for(let e of(d.sheet?.insertRule(`${b} {${c}}`,0),h.get(d)??[]))a(b,c,e)},li:()=>i});var d=c(76631);c(94484);var e=c(47322),f=c(75082),g=c(27612);c(93539);let h=new Map;function i(a=g.G.document.head,b,c){let j=document.createElement("style");if(j.type="text/css",j.media="screen",b?.(j),a.appendChild(j),c&&c.add((0,d.s)(()=>j.remove())),a===g.G.document.head){let a=new Set;for(let{window:b,disposables:i}of(h.set(j,a),c&&c.add((0,d.s)(()=>h.delete(j))),(0,f.sl)())){if(b===g.G)continue;let h=i.add(function(a,b,c){let g=new d.Cm,h=a.cloneNode(!0);for(let b of(c.document.head.appendChild(h),g.add((0,d.s)(()=>h.remove())),a.sheet?.cssRules??[]))h.sheet?.insertRule(b.cssText,h.sheet?.cssRules.length);return g.add(f.FK.observe(a,g,{childList:!0,subtree:e.gm,characterData:e.gm})(()=>{h.textContent=a.textContent})),b.add(h),g.add((0,d.s)(()=>b.delete(h))),g}(j,a,b));c?.add(h)}}return j}d.jG;let j=null},43765:(a,b,c)=>{"use strict";c.d(b,{Ft:()=>i,V7:()=>h,Xo:()=>j,ok:()=>e,vA:()=>g,xb:()=>f});var d=c(66036);function e(a,b){if(!a)throw Error(b?`Assertion failed (${b})`:"Assertion Failed")}function f(a,b="Unreachable"){throw Error(b)}function g(a,b="unexpected state"){if(!a)throw"string"==typeof b?new d.D7(`Assertion Failed: ${b}`):b}function h(a,b="Soft Assertion Failed"){a||(0,d.dz)(new d.D7(b))}function i(a){a()||(a(),(0,d.dz)(new d.D7("Assertion Failed")))}function j(a,b){let c=0;for(;c<a.length-1;){if(!b(a[c],a[c+1]))return!1;c++}return!0}},44052:()=>{},44232:()=>{},45186:(a,b,c)=>{"use strict";c.d(b,{k:()=>d});let d=(0,c(58254).u1)("telemetryService")},45395:(a,b,c)=>{"use strict";c.d(b,{g:()=>k});var d=c(26529),e=c(12017),f=c(48580),g=c(18530),h=c(22913),i=c(61822),j=c(6812);class k{static deleteRight(a,b,c,d){let f=[],g=3!==a;for(let a=0,h=d.length;a<h;a++){let h=d[a],i=this.getDeleteRightRange(h,c,b);if(i.isEmpty()){f[a]=null;continue}i.startLineNumber!==i.endLineNumber&&(g=!0),f[a]=new e.iu(i,"")}return[g,f]}static getDeleteRightRange(a,b,c){if(!a.isEmpty())return a;let d=a.getPosition(),e=h.I.right(c,b,d);if(c.trimWhitespaceOnDelete&&e.lineNumber!==d.lineNumber){let a=b.getLineFirstNonWhitespaceColumn(d.lineNumber)>0,c=b.getLineFirstNonWhitespaceColumn(e.lineNumber);if(a&&c>0)return new i.Q(e.lineNumber,c,d.lineNumber,d.column)}return new i.Q(e.lineNumber,e.column,d.lineNumber,d.column)}static isAutoClosingPairDelete(a,b,c,d,e,g,h){if("never"===b&&"never"===c||"never"===a)return!1;for(let i=0,j=g.length;i<j;i++){let j=g[i],k=j.getPosition();if(!j.isEmpty())return!1;let l=e.getLineContent(k.lineNumber);if(k.column<2||k.column>=l.length+1)return!1;let m=l.charAt(k.column-2),n=d.get(m);if(!n)return!1;if((0,f.vG)(m)){if("never"===c)return!1}else if("never"===b)return!1;let o=l.charAt(k.column-1),p=!1;for(let a of n)a.open===m&&a.close===o&&(p=!0);if(!p)return!1;if("auto"===a){let a=!1;for(let b=0,c=h.length;b<c;b++){let c=h[b];if(k.lineNumber===c.startLineNumber&&k.column===c.startColumn){a=!0;break}}if(!a)return!1}}return!0}static _runAutoClosingPairDelete(a,b,c){let d=[];for(let a=0,b=c.length;a<b;a++){let b=c[a].getPosition(),f=new i.Q(b.lineNumber,b.column-1,b.lineNumber,b.column+1);d[a]=new e.iu(f,"")}return[!0,d]}static deleteLeft(a,b,c,d,f){if(this.isAutoClosingPairDelete(b.autoClosingDelete,b.autoClosingBrackets,b.autoClosingQuotes,b.autoClosingPairs.autoClosingPairsOpenByEnd,c,d,f))return this._runAutoClosingPairDelete(b,c,d);let g=[],h=2!==a;for(let a=0,f=d.length;a<f;a++){let f=k.getDeleteLeftRange(d[a],c,b);if(f.isEmpty()){g[a]=null;continue}f.startLineNumber!==f.endLineNumber&&(h=!0),g[a]=new e.iu(f,"")}return[h,g]}static getDeleteLeftRange(a,b,c){if(!a.isEmpty())return a;let e=a.getPosition();if(c.useTabStops&&e.column>1){let a=b.getLineContent(e.lineNumber),f=(0,d.HG)(a),h=-1===f?a.length+1:f+1;if(e.column<=h){let a=c.visibleColumnFromColumn(b,e),d=g.A.prevIndentTabStop(a,c.indentSize),f=c.columnFromVisibleColumn(b,e.lineNumber,d);return new i.Q(e.lineNumber,f,e.lineNumber,e.column)}}return i.Q.fromPositions(k.getPositionAfterDeleteLeft(e,b),e)}static getPositionAfterDeleteLeft(a,b){if(a.column>1){let c=(0,d.Wd)(a.column-1,b.getLineContent(a.lineNumber));return a.with(void 0,c+1)}if(!(a.lineNumber>1))return a;{let c=a.lineNumber-1;return new j.y(c,b.getLineMaxColumn(c))}}static cut(a,b,c){let d=[],g=null;c.sort((a,b)=>j.y.compare(a.getStartPosition(),b.getEndPosition()));for(let f=0,h=c.length;f<h;f++){let h=c[f];if(h.isEmpty())if(a.emptySelectionClipboard){let a,c,j,k,l=h.getPosition();l.lineNumber<b.getLineCount()?(a=l.lineNumber,c=1,j=l.lineNumber+1,k=1):(l.lineNumber>1&&g?.endLineNumber!==l.lineNumber?(a=l.lineNumber-1,c=b.getLineMaxColumn(l.lineNumber-1)):(a=l.lineNumber,c=1),j=l.lineNumber,k=b.getLineMaxColumn(l.lineNumber));let m=new i.Q(a,c,j,k);g=m,m.isEmpty()?d[f]=null:d[f]=new e.iu(m,"")}else d[f]=null;else d[f]=new e.iu(h,"")}return new f.vY(0,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},45719:(a,b,c)=>{"use strict";c.d(b,{$H:()=>f,Lh:()=>g,r3:()=>e});var d=c(36036);let e=new class{clone(){return this}equals(a){return this===a}};function f(a,b){return new d.$M([new d.ou(0,"",a)],b)}function g(a,b){let c=new Uint32Array(2);return c[0]=0,c[1]=(0x2008000|a)>>>0,new d.rY(c,[],null===b?e:b)}},46547:(a,b,c)=>{"use strict";c.d(b,{Fd:()=>l,Gy:()=>i,Pz:()=>k,Yf:()=>j,lR:()=>p,zy:()=>o});var d=c(95091),e=c(76631),f=c(58254),g=c(29498),h=c(98030);let i=(0,f.u1)("themeService");function j(a){return{id:a}}function k(a){switch(a){case h.zM.DARK:return h.X2.VS_DARK;case h.zM.HIGH_CONTRAST_DARK:return h.X2.HC_BLACK;case h.zM.HIGH_CONTRAST_LIGHT:return h.X2.HC_LIGHT;default:return h.X2.VS}}let l={ThemingContribution:"base.contributions.theming"};class m extends e.jG{constructor(){super(),this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=this._register(new d.vl)}onColorThemeChange(a){return this.themingParticipants.push(a),this.onThemingParticipantAddedEmitter.fire(a),(0,e.s)(()=>{let b=this.themingParticipants.indexOf(a);this.themingParticipants.splice(b,1)})}getThemingParticipants(){return this.themingParticipants}}let n=new m;function o(a){return n.onColorThemeChange(a)}g.O.add(l.ThemingContribution,n);class p extends e.jG{constructor(a){super(),this.themeService=a,this.theme=a.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(a=>this.onThemeChange(a)))}onThemeChange(a){this.theme=a,this.updateStyles()}updateStyles(){}}},46742:()=>{},46857:(a,b,c)=>{"use strict";c.d(b,{P:()=>h,$:()=>i});var d=c(47322);let e=new WeakMap;class f{static getSameOriginWindowChain(a){let b=e.get(a);if(!b){let c;b=[],e.set(a,b);let d=a;do(c=function(a){if(!a.parent||a.parent===a)return null;try{let b=a.location,c=a.parent.location;if("null"!==b.origin&&"null"!==c.origin&&b.origin!==c.origin)return null}catch(a){return null}return a.parent}(d))?b.push({window:new WeakRef(d),iframeElement:d.frameElement||null}):b.push({window:new WeakRef(d),iframeElement:null}),d=c;while(d)}return b.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(a,b){if(!b||a===b)return{top:0,left:0};let c=0,d=0;for(let e of this.getSameOriginWindowChain(a)){let a=e.window.deref();if(c+=a?.scrollY??0,d+=a?.scrollX??0,a===b||!e.iframeElement)break;let f=e.iframeElement.getBoundingClientRect();c+=f.top,d+=f.left}return{top:c,left:d}}}var g=c(18216);class h{constructor(a,b){this.timestamp=Date.now(),this.browserEvent=b,this.leftButton=0===b.button,this.middleButton=1===b.button,this.rightButton=2===b.button,this.buttons=b.buttons,this.defaultPrevented=b.defaultPrevented,this.target=b.target,this.detail=b.detail||1,"dblclick"===b.type&&(this.detail=2),this.ctrlKey=b.ctrlKey,this.shiftKey=b.shiftKey,this.altKey=b.altKey,this.metaKey=b.metaKey,this.posx=b.pageX,this.posy=b.pageY;const c=f.getPositionOfChildWindowRelativeToAncestorWindow(a,b.view);this.posx-=c.left,this.posy-=c.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class i{constructor(a,b=0,c=0){this.browserEvent=a||null,this.target=a?a.target||a.targetNode||a.srcElement:null,this.deltaY=c,this.deltaX=b;let e=!1;if(d.H8){const a=navigator.userAgent.match(/Chrome\/(\d+)/);e=(a?parseInt(a[1]):123)<=122}if(a){const b=a.view?.devicePixelRatio||1;void 0!==a.wheelDeltaY?e?this.deltaY=a.wheelDeltaY/(120*b):this.deltaY=a.wheelDeltaY/120:void 0!==a.VERTICAL_AXIS&&a.axis===a.VERTICAL_AXIS?this.deltaY=-a.detail/3:"wheel"===a.type&&(a.deltaMode===a.DOM_DELTA_LINE?d.gm&&!g.zx?this.deltaY=-a.deltaY/3:this.deltaY=-a.deltaY:this.deltaY=-a.deltaY/40),void 0!==a.wheelDeltaX?d.nr&&g.uF?this.deltaX=-(a.wheelDeltaX/120):e?this.deltaX=a.wheelDeltaX/(120*b):this.deltaX=a.wheelDeltaX/120:void 0!==a.HORIZONTAL_AXIS&&a.axis===a.HORIZONTAL_AXIS?this.deltaX=-a.detail/3:"wheel"===a.type&&(a.deltaMode===a.DOM_DELTA_LINE?d.gm&&!g.zx?this.deltaX=-a.deltaX/3:this.deltaX=-a.deltaX:this.deltaX=-a.deltaX/40),0===this.deltaY&&0===this.deltaX&&a.wheelDelta&&(e?this.deltaY=a.wheelDelta/(120*b):this.deltaY=a.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}}},47309:(a,b,c)=>{"use strict";c.d(b,{f:()=>d});var d,e=c(85214);!function(a){function b(a){return!!a&&"object"==typeof a&&"function"==typeof a[Symbol.iterator]}a.is=b;let c=Object.freeze([]);function*d(a){yield a}a.empty=function(){return c},a.single=d,a.wrap=function(a){return b(a)?a:d(a)},a.from=function(a){return a??c},a.reverse=function*(a){for(let b=a.length-1;b>=0;b--)yield a[b]},a.isEmpty=function(a){return!a||!0===a[Symbol.iterator]().next().done},a.first=function(a){return a[Symbol.iterator]().next().value},a.some=function(a,b){let c=0;for(let d of a)if(b(d,c++))return!0;return!1},a.every=function(a,b){let c=0;for(let d of a)if(!b(d,c++))return!1;return!0},a.find=function(a,b){for(let c of a)if(b(c))return c},a.filter=function*(a,b){for(let c of a)b(c)&&(yield c)},a.map=function*(a,b){let c=0;for(let d of a)yield b(d,c++)},a.flatMap=function*(a,b){let c=0;for(let d of a)yield*b(d,c++)},a.concat=function*(...a){for(let b of a)(0,e.xZ)(b)?yield*b:yield b},a.reduce=function(a,b,c){let d=c;for(let c of a)d=b(d,c);return d},a.length=function(a){let b=0;for(let c of a)b++;return b},a.slice=function*(a,b,c=a.length){for(b<-a.length&&(b=0),b<0&&(b+=a.length),c<0?c+=a.length:c>a.length&&(c=a.length);b<c;b++)yield a[b]},a.consume=function(b,c=1/0){let d=[];if(0===c)return[d,b];let e=b[Symbol.iterator]();for(let b=0;b<c;b++){let b=e.next();if(b.done)return[d,a.empty()];d.push(b.value)}return[d,{[Symbol.iterator]:()=>e}]},a.asyncToArray=async function(a){let b=[];for await(let c of a)b.push(c);return b},a.asyncToArrayFlat=async function(a){let b=[];for await(let c of a)b=b.concat(c);return b}}(d||(d={}))},47322:(a,b,c)=>{"use strict";c.d(b,{Dy:()=>f,H8:()=>k,HT:()=>p,Tc:()=>j,c8:()=>m,gm:()=>i,m0:()=>n,nr:()=>l,pR:()=>g});var d=c(27612);class e{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new e}getZoomFactor(a){return this.mapWindowIdToZoomFactor.get(this.getWindowId(a))??1}getWindowId(a){return a.vscodeWindowId}}function f(a,b,c){"string"==typeof b&&(b=a.matchMedia(b)),b.addEventListener("change",c)}function g(a){return e.INSTANCE.getZoomFactor(a)}let h=navigator.userAgent,i=h.indexOf("Firefox")>=0,j=h.indexOf("AppleWebKit")>=0,k=h.indexOf("Chrome")>=0,l=!k&&h.indexOf("Safari")>=0,m=!k&&!l&&j;h.indexOf("Electron/");let n=h.indexOf("Android")>=0,o=!1;if("function"==typeof d.G.matchMedia){let a=d.G.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),b=d.G.matchMedia("(display-mode: fullscreen)");o=a.matches,f(d.G,a,({matches:a})=>{o&&b.matches||(o=a)})}function p(){return globalThis.MonacoEnvironment}},47339:(a,b,c)=>{"use strict";c.d(b,{e:()=>f,i:()=>g});var d=c(76631);let e={showInstantHover:()=>void 0,showDelayedHover:()=>void 0,setupDelayedHover:()=>d.jG.None,setupDelayedHoverAtMouse:()=>d.jG.None,hideHover:()=>void 0,showAndFocusLastHover:()=>void 0,setupManagedHover:()=>({dispose:()=>void 0,show:()=>void 0,hide:()=>void 0,update:()=>void 0}),showManagedHover:()=>void 0};function f(a){e=a}function g(){return e}},48409:(a,b,c)=>{"use strict";c.d(b,{R$:()=>n,_k:()=>p,m2:()=>i,pS:()=>m,pz:()=>q,sA:()=>k});var d=c(53072),e=c(26529),f=c(63060);let g=RegExp(`\\$\\(${f.L.iconNameExpression}(?:${f.L.iconModifierExpression})?\\)`,"g"),h=RegExp(`(\\\\)?${g.source}`,"g");function i(a){return a.replace(h,(a,b)=>b?a:`\\${a}`)}let j=RegExp(`\\\\${g.source}`,"g");function k(a){return a.replace(j,a=>`\\${a}`)}let l=RegExp(`(\\s)?(\\\\)?${g.source}(\\s)?`,"g");function m(a){return -1===a.indexOf("$(")?a:a.replace(l,(a,b,c,d)=>c?a:b||d||"")}function n(a){return a?a.replace(/\$\((.*?)\)/g,(a,b)=>` ${b} `).trim():""}let o=RegExp(`\\$\\(${f.L.iconNameCharacter}+\\)`,"g");function p(a){o.lastIndex=0;let b="",c=[],d=0;for(;;){let e=o.lastIndex,f=o.exec(a),g=a.substring(e,f?.index);if(g.length>0){b+=g;for(let a=0;a<g.length;a++)c.push(d)}if(!f)break;d+=f[0].length}return{text:b,iconOffsets:c}}function q(a,b,c=!1){let{text:f,iconOffsets:g}=b;if(!g||0===g.length)return(0,d.yr)(a,f,c);let h=(0,e.NB)(f," "),i=f.length-h.length,j=(0,d.yr)(a,h,c);if(j)for(let a of j){let b=g[a.start+i]+i;a.start+=b,a.end+=b}return j}},48580:(a,b,c)=>{"use strict";c.d(b,{MF:()=>o,d$:()=>n,mG:()=>r,vG:()=>t,vY:()=>s});var d=c(6812),e=c(61822),f=c(77509),g=c(99807),h=c(18530),i=c(64687),j=c(16240);let k=()=>!0,l=()=>!1,m=a=>" "===a||" "===a;class n{static shouldRecreate(a){return a.hasChanged(165)||a.hasChanged(148)||a.hasChanged(45)||a.hasChanged(85)||a.hasChanged(88)||a.hasChanged(89)||a.hasChanged(10)||a.hasChanged(11)||a.hasChanged(15)||a.hasChanged(13)||a.hasChanged(14)||a.hasChanged(20)||a.hasChanged(145)||a.hasChanged(141)||a.hasChanged(59)||a.hasChanged(104)||a.hasChanged(147)||a.hasChanged(93)}constructor(a,b,c,d){this.languageConfigurationService=d,this._cursorMoveConfigurationBrand=void 0,this._languageId=a;const e=c.options,f=e.get(165),g=e.get(59);this.readOnly=e.get(104),this.tabSize=b.tabSize,this.indentSize=b.indentSize,this.insertSpaces=b.insertSpaces,this.stickyTabStops=e.get(132),this.lineHeight=g.lineHeight,this.typicalHalfwidthCharacterWidth=g.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(f.height/this.lineHeight)-2),this.useTabStops=e.get(145),this.trimWhitespaceOnDelete=e.get(141),this.wordSeparators=e.get(148),this.emptySelectionClipboard=e.get(45),this.copyWithSyntaxHighlighting=e.get(31),this.multiCursorMergeOverlapping=e.get(85),this.multiCursorPaste=e.get(88),this.multiCursorLimit=e.get(89),this.autoClosingBrackets=e.get(10),this.autoClosingComments=e.get(11),this.autoClosingQuotes=e.get(15),this.autoClosingDelete=e.get(13),this.autoClosingOvertype=e.get(14),this.autoSurround=e.get(20),this.autoIndent=e.get(16),this.wordSegmenterLocales=e.get(147),this.overtypeOnPaste=e.get(93),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(a,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(a,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(a,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(a).getAutoClosingPairs();const h=this.languageConfigurationService.getLanguageConfiguration(a).getSurroundingPairs();if(h)for(const a of h)this.surroundingPairs[a.open]=a.close;const i=this.languageConfigurationService.getLanguageConfiguration(a).comments;this.blockCommentStartToken=i?.blockCommentStartToken??null}get electricChars(){if(!this._electricChars){this._electricChars={};let a=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(a)for(let b of a)this._electricChars[b]=!0}return this._electricChars}get inputMode(){return j.U.getInputMode()}onElectricCharacter(a,b,c){let d=(0,g.BQ)(b,c-1),e=this.languageConfigurationService.getLanguageConfiguration(d.languageId).electricCharacter;return e?e.onElectricCharacter(a,d,c-d.firstCharOffset):null}normalizeIndentation(a){return(0,i.P)(a,this.indentSize,this.insertSpaces)}_getShouldAutoClose(a,b,c){switch(b){case"beforeWhitespace":return m;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(a,c);case"always":return k;case"never":return l}}_getLanguageDefinedShouldAutoClose(a,b){let c=this.languageConfigurationService.getLanguageConfiguration(a).getAutoCloseBeforeSet(b);return a=>-1!==c.indexOf(a)}visibleColumnFromColumn(a,b){return h.A.visibleColumnFromColumn(a.getLineContent(b.lineNumber),b.column,this.tabSize)}columnFromVisibleColumn(a,b,c){let d=h.A.columnFromVisibleColumn(a.getLineContent(b),c,this.tabSize),e=a.getLineMinColumn(b);if(d<e)return e;let f=a.getLineMaxColumn(b);return d>f?f:d}}class o{static fromModelState(a){return new p(a)}static fromViewState(a){return new q(a)}static fromModelSelection(a){let b=f.L.liftSelection(a),c=new r(e.Q.fromPositions(b.getSelectionStart()),0,0,b.getPosition(),0);return o.fromModelState(c)}static fromModelSelections(a){let b=[];for(let c=0,d=a.length;c<d;c++)b[c]=this.fromModelSelection(a[c]);return b}constructor(a,b){this._cursorStateBrand=void 0,this.modelState=a,this.viewState=b}equals(a){return this.viewState.equals(a.viewState)&&this.modelState.equals(a.modelState)}}class p{constructor(a){this.modelState=a,this.viewState=null}}class q{constructor(a){this.modelState=null,this.viewState=a}}class r{constructor(a,b,c,d,e){this.selectionStart=a,this.selectionStartKind=b,this.selectionStartLeftoverVisibleColumns=c,this.position=d,this.leftoverVisibleColumns=e,this._singleCursorStateBrand=void 0,this.selection=r._computeSelection(this.selectionStart,this.position)}equals(a){return this.selectionStartLeftoverVisibleColumns===a.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===a.leftoverVisibleColumns&&this.selectionStartKind===a.selectionStartKind&&this.position.equals(a.position)&&this.selectionStart.equalsRange(a.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(a,b,c,f){return a?new r(this.selectionStart,this.selectionStartKind,this.selectionStartLeftoverVisibleColumns,new d.y(b,c),f):new r(new e.Q(b,c,b,c),0,f,new d.y(b,c),f)}static _computeSelection(a,b){return a.isEmpty()||!b.isBeforeOrEqual(a.getStartPosition())?f.L.fromPositions(a.getStartPosition(),b):f.L.fromPositions(a.getEndPosition(),b)}}class s{constructor(a,b,c){this._editOperationResultBrand=void 0,this.type=a,this.commands=b,this.shouldPushStackElementBefore=c.shouldPushStackElementBefore,this.shouldPushStackElementAfter=c.shouldPushStackElementAfter}}function t(a){return"'"===a||'"'===a||"`"===a}},48727:(a,b,c)=>{"use strict";var d=c(72816),e=c(37327),f=c(34183),g=c(11023),h=c(40563);(0,e.x1)("charts.foreground",f.CU,(0,d.kg)(1857,"The foreground color used in charts.")),(0,e.x1)("charts.lines",(0,e.JO)(f.CU,.5),(0,d.kg)(1858,"The color used for horizontal lines in charts.")),(0,e.x1)("charts.red",g.Rb,(0,d.kg)(1859,"The red color used in chart visualizations.")),(0,e.x1)("charts.blue",g.pO,(0,d.kg)(1860,"The blue color used in chart visualizations.")),(0,e.x1)("charts.yellow",g.Hn,(0,d.kg)(1861,"The yellow color used in chart visualizations.")),(0,e.x1)("charts.orange",h.Aj,(0,d.kg)(1862,"The orange color used in chart visualizations.")),(0,e.x1)("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},(0,d.kg)(1863,"The green color used in chart visualizations.")),(0,e.x1)("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,d.kg)(1864,"The purple color used in chart visualizations."))},49128:(a,b,c)=>{"use strict";c.d(b,{$:()=>s});var d=c(75082),e=c(62677),f=c(31299),g=c(34793),h=c(89191),i=c(34349),j=c(55404),k=c(95091),l=c(54469),m=c(76631),n=c(63060);c(73515);var o=c(47339),p=c(23975);j.Q1.white.toString(),j.Q1.white.toString();let q=Object.freeze({allowedTags:{override:["b","i","u","code","span"]},allowedAttributes:{override:["class"]}}),r=Object.freeze({sanitizerConfig:{allowedAttributes:{override:["class"]}}});class s extends m.jG{get onDidClick(){return this._onDidClick.event}constructor(a,b){super(),this._label="",this._onDidClick=this._register(new k.vl),this._onDidEscape=this._register(new k.vl),this.options=b,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!b.secondary),this._element.classList.toggle("small",!!b.small);const c=b.secondary?b.buttonSecondaryBackground:b.buttonBackground,f=b.secondary?b.buttonSecondaryForeground:b.buttonForeground,h=b.secondary?b.buttonSecondaryBorder:b.buttonBorder;this._element.style.color=f||"",this._element.style.backgroundColor=c||"",h&&(this._element.style.border=`1px solid ${h}`),b.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),"string"==typeof b.title&&this.setTitle(b.title),"string"==typeof b.ariaLabel&&this._element.setAttribute("aria-label",b.ariaLabel),a.appendChild(this._element),this.enabled=!b.disabled,this._register(g.q.addTarget(this._element)),[d.Bx.CLICK,g.B.Tap].forEach(a=>{this._register((0,d.ko)(this._element,a,a=>{this.enabled?this._onDidClick.fire(a):d.fs.stop(a)}))}),this._register((0,d.ko)(this._element,d.Bx.KEY_DOWN,a=>{let b=new e.Z(a),c=!1;this.enabled&&(b.equals(3)||b.equals(10))?(this._onDidClick.fire(a),c=!0):b.equals(9)&&(this._onDidEscape.fire(a),this._element.blur(),c=!0),c&&d.fs.stop(b,!0)})),this._register((0,d.ko)(this._element,d.Bx.MOUSE_OVER,a=>{this._element.classList.contains("disabled")||this.updateStyles(!0)})),this._register((0,d.ko)(this._element,d.Bx.MOUSE_OUT,a=>{this.updateStyles(!1)})),this.focusTracker=this._register((0,d.w5)(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateStyles(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateStyles(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(a){let b=[];for(let c of(0,i.n)(a))if("string"==typeof c){if(""===(c=c.trim()))continue;let a=document.createElement("span");a.textContent=c,b.push(a)}else b.push(c);return b}updateStyles(a){let b,c,d;this.options.secondary?(b=a?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground,c=this.options.buttonSecondaryForeground,d=this.options.buttonSecondaryBorder):(b=a?this.options.buttonHoverBackground:this.options.buttonBackground,c=this.options.buttonForeground,d=this.options.buttonBorder),this._element.style.backgroundColor=b||"",this._element.style.color=c||"",this._element.style.border=d?`1px solid ${d}`:""}get element(){return this._element}set label(a){if(this._label===a||(0,l.VS)(this._label)&&(0,l.VS)(a)&&(0,l.nK)(this._label,a))return;this._element.classList.add("monaco-text-button");let b=this.options.supportShortLabel?this._labelElement:this._element;if((0,l.VS)(a)){let c=(0,f.Gc)(a,r,document.createElement("span"));c.dispose();let e=c.element.querySelector("p")?.innerHTML;e?(0,p.D$)(b,e,q):(0,d.Ln)(b)}else this.options.supportIcons?(0,d.Ln)(b,...this.getContentElements(a)):b.textContent=a;let c="";"string"==typeof this.options.title?c=this.options.title:this.options.title&&(c=(0,f.Mh)(a)),this.setTitle(c),this._setAriaLabel(),this._label=a}get label(){return this._label}_setAriaLabel(){"string"==typeof this.options.ariaLabel?this._element.setAttribute("aria-label",this.options.ariaLabel):"string"==typeof this.options.title&&this._element.setAttribute("aria-label",this.options.title)}set icon(a){this._setAriaLabel();let b=Array.from(this._element.classList).filter(a=>a.startsWith("codicon-"));this._element.classList.remove(...b),this._element.classList.add(...n.L.asClassNameArray(a))}set enabled(a){a?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}set secondary(a){this._element.classList.toggle("secondary",a),this.options.secondary=a,this.updateStyles(!1)}setTitle(a){this._hover||""===a?this._hover&&this._hover.update(a):this._hover=this._register((0,o.i)().setupManagedHover(this.options.hoverDelegate??(0,h.nZ)("element"),this._element,a))}}},49540:()=>{},49679:(a,b,c)=>{"use strict";c.d(b,{_:()=>d});let d={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},49852:()=>{},50157:()=>{},50179:(a,b,c)=>{"use strict";c.d(b,{J:()=>f,U:()=>e});var d=c(58254);let e=(0,d.u1)("textResourceConfigurationService"),f=(0,d.u1)("textResourcePropertiesService")},50411:(a,b,c)=>{"use strict";let d,e,f;c.d(b,{Su:()=>l,b7:()=>k,fe:()=>m});var g=c(26529),h=c(18216),i=c(15053);function j(){return d||(d=new TextDecoder("UTF-16LE")),d}function k(){return f||(f=(0,h.cm)()?j():(e||(e=new TextDecoder("UTF-16BE")),e)),f}function l(a,b,c){let d=new Uint16Array(a.buffer,b,c);return c>0&&(65279===d[0]||65534===d[0])?function(a,b,c){let d=[],e=0;for(let f=0;f<c;f++){let c=(0,i.$l)(a,b);b+=2,d[e++]=String.fromCharCode(c)}return d.join("")}(a,b,c):j().decode(d)}class m{constructor(a){this._capacity=0|a,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";let a=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return k().decode(a)}_flushBuffer(){let a=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[a]:this._completedStrings[this._completedStrings.length]=a}appendCharCode(a){let b=this._capacity-this._bufferLength;b<=1&&(0===b||(0,g.pc)(a))&&this._flushBuffer(),this._buffer[this._bufferLength++]=a}appendASCIICharCode(a){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=a}appendString(a){let b=a.length;if(this._bufferLength+b>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=a;return}for(let c=0;c<b;c++)this._buffer[this._bufferLength++]=a.charCodeAt(c)}}},50498:(a,b,c)=>{"use strict";c.d(b,{B6:()=>e,Fd:()=>s,P8:()=>p,iZ:()=>t,n4:()=>o,o1:()=>u,pD:()=>q,uJ:()=>r});var d,e,f=c(6015),g=c(77497),h=c(30996),i=c(18216),j=c(26529),k=c(54957);function l(a){return(0,k.I)(a,!0)}class m{constructor(a){this._ignorePathCasing=a}compare(a,b,c=!1){return a===b?0:(0,j.UD)(this.getComparisonKey(a,c),this.getComparisonKey(b,c))}isEqual(a,b,c=!1){return a===b||!!a&&!!b&&this.getComparisonKey(a,c)===this.getComparisonKey(b,c)}getComparisonKey(a,b=!1){return a.with({path:this._ignorePathCasing(a)?a.path.toLowerCase():void 0,fragment:b?null:void 0}).toString()}isEqualOrParent(a,b,c=!1){if(a.scheme===b.scheme){if(a.scheme===g.ny.file)return(0,f._1)(l(a),l(b),this._ignorePathCasing(a))&&a.query===b.query&&(c||a.fragment===b.fragment);if(v(a.authority,b.authority))return(0,f._1)(a.path,b.path,this._ignorePathCasing(a),!0)&&a.query===b.query&&(c||a.fragment===b.fragment)}return!1}joinPath(a,...b){return k.r.joinPath(a,...b)}basenameOrAuthority(a){return p(a)||a.authority}basename(a,b){return h.SA.basename(a.path,b)}extname(a){return h.SA.extname(a.path)}dirname(a){let b;return 0===a.path.length?a:(a.scheme===g.ny.file?b=k.r.file((0,h.pD)(l(a))).path:(b=h.SA.dirname(a.path),a.authority&&b.length&&47!==b.charCodeAt(0)&&(console.error(`dirname("${a.toString})) resulted in a relative path`),b="/")),a.with({path:b}))}normalizePath(a){let b;return a.path.length?(b=a.scheme===g.ny.file?k.r.file((0,h.S8)(l(a))).path:h.SA.normalize(a.path),a.with({path:b})):a}relativePath(a,b){if(a.scheme!==b.scheme||!v(a.authority,b.authority))return;if(a.scheme===g.ny.file){let c=(0,h.V8)(l(a),l(b));return i.uF?(0,f.TH)(c):c}let c=a.path||"/",d=b.path||"/";if(this._ignorePathCasing(a)){let a=0;for(let b=Math.min(c.length,d.length);a<b&&(c.charCodeAt(a)===d.charCodeAt(a)||c.charAt(a).toLowerCase()===d.charAt(a).toLowerCase());a++);c=d.substr(0,a)+c.substr(a)}return h.SA.relative(c,d)}resolvePath(a,b){if(a.scheme===g.ny.file){let c=k.r.file((0,h.hd)(l(a),b));return a.with({authority:c.authority,path:c.path})}return b=(0,f.kb)(b),a.with({path:h.SA.resolve(a.path,b)})}isAbsolutePath(a){return!!a.path&&"/"===a.path[0]}isEqualAuthority(a,b){return a===b||void 0!==a&&void 0!==b&&(0,j.Q_)(a,b)}hasTrailingPathSeparator(a,b=h.Vn){if(a.scheme===g.ny.file){let c=l(a);return c.length>(0,f.Zn)(c).length&&c[c.length-1]===b}{let b=a.path;return b.length>1&&47===b.charCodeAt(b.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(a.fsPath)}}removeTrailingPathSeparator(a,b=h.Vn){return w(a,b)?a.with({path:a.path.substr(0,a.path.length-1)}):a}addTrailingPathSeparator(a,b=h.Vn){let c=!1;if(a.scheme===g.ny.file){let d=l(a);c=void 0!==d&&d.length===(0,f.Zn)(d).length&&d[d.length-1]===b}else{b="/";let d=a.path;c=1===d.length&&47===d.charCodeAt(d.length-1)}return c||w(a,b)?a:a.with({path:a.path+"/"})}}let n=new m(()=>!1),o=n.isEqual.bind(n);n.isEqualOrParent.bind(n),n.getComparisonKey.bind(n),n.basenameOrAuthority.bind(n);let p=n.basename.bind(n);n.extname.bind(n);let q=n.dirname.bind(n),r=n.joinPath.bind(n),s=n.normalizePath.bind(n),t=n.relativePath.bind(n),u=n.resolvePath.bind(n);n.isAbsolutePath.bind(n);let v=n.isEqualAuthority.bind(n),w=n.hasTrailingPathSeparator.bind(n);n.removeTrailingPathSeparator.bind(n),n.addTrailingPathSeparator.bind(n),(d=e||(e={})).META_DATA_LABEL="label",d.META_DATA_DESCRIPTION="description",d.META_DATA_SIZE="size",d.META_DATA_MIME="mime",d.parseMetaData=function(a){let b=new Map;a.path.substring(a.path.indexOf(";")+1,a.path.lastIndexOf(";")).split(";").forEach(a=>{let[c,d]=a.split(":");c&&d&&b.set(c,d)});let c=a.path.substring(0,a.path.indexOf(";"));return c&&b.set(d.META_DATA_MIME,c),b}},50527:(a,b,c)=>{"use strict";c.d(b,{_q:()=>f,ew:()=>d,xC:()=>e});class d{constructor(a,b){this.width=a,this.height=b,this.array=[],this.array=Array(a*b)}get(a,b){return this.array[a+b*this.width]}set(a,b,c){this.array[a+b*this.width]=c}}function e(a){return 32===a||9===a}class f{static{this.chrKeys=new Map}static getKey(a){let b=this.chrKeys.get(a);return void 0===b&&(b=this.chrKeys.size,this.chrKeys.set(a,b)),b}constructor(a,b,c){this.range=a,this.lines=b,this.source=c,this.histogram=[];let d=0;for(let c=a.startLineNumber-1;c<a.endLineNumberExclusive-1;c++){const a=b[c];for(let b=0;b<a.length;b++){d++;const c=a[b],e=f.getKey(c);this.histogram[e]=(this.histogram[e]||0)+1}d++;const e=f.getKey("\n");this.histogram[e]=(this.histogram[e]||0)+1}this.totalCount=d}computeSimilarity(a){let b=0,c=Math.max(this.histogram.length,a.histogram.length);for(let d=0;d<c;d++)b+=Math.abs((this.histogram[d]??0)-(a.histogram[d]??0));return 1-b/(this.totalCount+a.totalCount)}}},50661:(a,b,c)=>{"use strict";c.d(b,{t:()=>d});let d=(0,c(58254).u1)("treeSitterLibraryService")},50702:(a,b,c)=>{"use strict";c.d(b,{CG:()=>e,gO:()=>g});var d=c(18216);function e(a,b){var c,e;if(d.HZ)return!1;let g=(c=a,(e=b)||(e=f(c)),"native"===e),h=a.getValue("window");return h?.menuStyle==="native"?!!d.zx||!!g:h?.menuStyle!=="custom"&&g}function f(a){if(d.HZ)return"custom";let b=a.getValue("window");if(b){if(d.zx&&!0===b.nativeTabs||d.zx&&!1===b.nativeFullScreen)return"native";let a=b.titleBarStyle;if("native"===a||"custom"===a)return a}return"custom"}function g(a){if(d.HZ||d.zx||"native"===f(a))return"native";let b=a.getValue("window"),c=b?.controlsStyle;return"custom"===c||"hidden"===c?c:"native"}},50924:()=>{},51027:(a,b,c)=>{"use strict";c.d(b,{BG:()=>f,IO:()=>h,Y:()=>g,eh:()=>e,pj:()=>j,qN:()=>i});class d{constructor(a,b){this._restrictedRenderingContextBrand=void 0,this._viewLayout=a,this.viewportData=b,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const c=this._viewLayout.getCurrentViewport();this.scrollTop=c.top,this.scrollLeft=c.left,this.viewportWidth=c.width,this.viewportHeight=c.height}getScrolledTopFromAbsoluteTop(a){return a-this.scrollTop}getVerticalOffsetForLineNumber(a,b){return this._viewLayout.getVerticalOffsetForLineNumber(a,b)}getVerticalOffsetAfterLineNumber(a,b){return this._viewLayout.getVerticalOffsetAfterLineNumber(a,b)}getLineHeightForLineNumber(a){return this._viewLayout.getLineHeightForLineNumber(a)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class e extends d{constructor(a,b,c,d){super(a,b),this._renderingContextBrand=void 0,this._viewLines=c,this._viewLinesGpu=d}linesVisibleRangesForRange(a,b){let c=this._viewLines.linesVisibleRangesForRange(a,b);if(!this._viewLinesGpu)return c;let d=this._viewLinesGpu.linesVisibleRangesForRange(a,b);return c?d?c.concat(d).sort((a,b)=>a.lineNumber-b.lineNumber):c:d}visibleRangeForPosition(a){return this._viewLines.visibleRangeForPosition(a)??this._viewLinesGpu?.visibleRangeForPosition(a)??null}}class f{constructor(a,b,c,d){this.outsideRenderedLine=a,this.lineNumber=b,this.ranges=c,this.continuesOnNextLine=d}}class g{static from(a){let b=Array(a.length);for(let c=0,d=a.length;c<d;c++){let d=a[c];b[c]=new g(d.left,d.width)}return b}constructor(a,b){this._horizontalRangeBrand=void 0,this.left=Math.round(a),this.width=Math.round(b)}toString(){return`[${this.left},${this.width}]`}}class h{constructor(a,b){this._floatHorizontalRangeBrand=void 0,this.left=a,this.width=b}toString(){return`[${this.left},${this.width}]`}static compare(a,b){return a.left-b.left}}class i{constructor(a,b){this.outsideRenderedLine=a,this.originalLeft=b,this.left=Math.round(this.originalLeft)}}class j{constructor(a,b){this.outsideRenderedLine=a,this.ranges=b}}},51262:(a,b,c)=>{"use strict";c.d(b,{TN:()=>j,iM:()=>l});var d,e=c(31299),f=c(66036),g=c(55241),h=c(58254),i=c(21398);let j=(0,h.u1)("markdownRendererService"),k=class{constructor(a){this._openerService=a}render(a,b,c){let d={...b};d.actionHandler||(d.actionHandler=(a,b)=>l(this._openerService,a,b.isTrusted)),d.codeBlockRenderer||(d.codeBlockRenderer=(a,b)=>this._defaultCodeBlockRenderer?.renderCodeBlock(a,b,d??{})??Promise.resolve(document.createElement("span")));let f=(0,e.Gc)(a,d,c);return f.element.classList.add("rendered-markdown"),f}setDefaultCodeBlockRenderer(a){this._defaultCodeBlockRenderer=a}};async function l(a,b,c,d){try{var e;return await a.open(b,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:(e=c,!0===e||!!(e&&Array.isArray(e.enabledCommands))&&e.enabledCommands),skipValidation:d})}catch(a){return(0,f.dz)(a),!1}}k=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([(d=i.Cr,function(a,b){d(a,b,0)})],k),(0,g.v)(j,k,1)},52132:(a,b,c)=>{"use strict";function d(a,b){return a}c.d(b,{b:()=>d}),c(94484),c(6963)},52491:(a,b,c)=>{"use strict";c.d(b,{F:()=>g});var d=c(95091),e=c(76631),f=c(29498);let g={JSONContribution:"base.contributions.json"};class h extends e.jG{constructor(){super(...arguments),this.schemasById={},this._onDidChangeSchema=this._register(new d.vl)}registerSchema(a,b,c){let d=a.length>0&&"#"===a.charAt(a.length-1)?a.substring(0,a.length-1):a;this.schemasById[d]=b,this._onDidChangeSchema.fire(a),c&&c.add((0,e.s)(()=>{delete this.schemasById[d],this._onDidChangeSchema.fire(a)}))}notifySchemaChanged(a){this._onDidChangeSchema.fire(a)}}let i=new h;f.O.add(g.JSONContribution,i)},52559:(a,b,c)=>{"use strict";c.d(b,{RK:()=>k,tQ:()=>l});var d=c(70687),e=c(76631),f=c(54957),g=c(6812),h=c(61822),i=c(57615),j=c(36176);class k extends e.jG{constructor(a,b,c=!1){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=a,this._modelService=b,!c){const a=new d.vb;a.cancelAndSet(()=>this._checkStopModelSync(),Math.round(3e4)),this._register(a)}}dispose(){for(let a in this._syncedModels)(0,e.AS)(this._syncedModels[a]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(a,b=!1){for(let c of a){let a=c.toString();this._syncedModels[a]||this._beginModelSync(c,b),this._syncedModels[a]&&(this._syncedModelsLastUsedTime[a]=new Date().getTime())}}_checkStopModelSync(){let a=new Date().getTime(),b=[];for(let c in this._syncedModelsLastUsedTime)a-this._syncedModelsLastUsedTime[c]>6e4&&b.push(c);for(let a of b)this._stopModelSync(a)}_beginModelSync(a,b){let c=this._modelService.getModel(a);if(!c||!b&&c.isTooLargeForSyncing())return;let d=a.toString();this._proxy.$acceptNewModel({url:c.uri.toString(),lines:c.getLinesContent(),EOL:c.getEOL(),versionId:c.getVersionId()});let f=new e.Cm;f.add(c.onDidChangeContent(a=>{this._proxy.$acceptModelChanged(d.toString(),a)})),f.add(c.onWillDispose(()=>{this._stopModelSync(d)})),f.add((0,e.s)(()=>{this._proxy.$acceptRemovedModel(d)})),this._syncedModels[d]=f}_stopModelSync(a){let b=this._syncedModels[a];delete this._syncedModels[a],delete this._syncedModelsLastUsedTime[a],(0,e.AS)(b)}}class l{constructor(){this._models=Object.create(null)}getModel(a){return this._models[a]}getModels(){let a=[];return Object.keys(this._models).forEach(b=>a.push(this._models[b])),a}$acceptNewModel(a){this._models[a.url]=new m(f.r.parse(a.url),a.lines,a.EOL,a.versionId)}$acceptModelChanged(a,b){this._models[a]&&this._models[a].onEvents(b)}$acceptRemovedModel(a){this._models[a]&&delete this._models[a]}}class m extends j.Y{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(a){let b=[];for(let c=0;c<this._lines.length;c++){let d=this._lines[c],e=this.offsetAt(new g.y(c+1,1));for(let c of d.matchAll(a))(c.index||0===c.index)&&(c.index=c.index+e),b.push(c)}return b}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(a){return this._lines[a-1]}getWordAtPosition(a,b){let c=(0,i.Th)(a.column,(0,i.Io)(b),this._lines[a.lineNumber-1],0);return c?new h.Q(a.lineNumber,c.startColumn,a.lineNumber,c.endColumn):null}words(a){let b=this._lines,c=this._wordenize.bind(this),d=0,e="",f=0,g=[];return{*[Symbol.iterator](){for(;;)if(f<g.length){let a=e.substring(g[f].start,g[f].end);f+=1,yield a}else if(d<b.length)g=c(e=b[d],a),f=0,d+=1;else break}}}getLineWords(a,b){let c=this._lines[a-1],d=this._wordenize(c,b),e=[];for(let a of d)e.push({word:c.substring(a.start,a.end),startColumn:a.start+1,endColumn:a.end+1});return e}_wordenize(a,b){let c,d=[];for(b.lastIndex=0;(c=b.exec(a))&&0!==c[0].length;)d.push({start:c.index,end:c.index+c[0].length});return d}getValueInRange(a){if((a=this._validateRange(a)).startLineNumber===a.endLineNumber)return this._lines[a.startLineNumber-1].substring(a.startColumn-1,a.endColumn-1);let b=this._eol,c=a.startLineNumber-1,d=a.endLineNumber-1,e=[];e.push(this._lines[c].substring(a.startColumn-1));for(let a=c+1;a<d;a++)e.push(this._lines[a]);return e.push(this._lines[d].substring(0,a.endColumn-1)),e.join(b)}offsetAt(a){return a=this._validatePosition(a),this._ensureLineStarts(),this._lineStarts.getPrefixSum(a.lineNumber-2)+(a.column-1)}positionAt(a){a=Math.max(0,a=Math.floor(a)),this._ensureLineStarts();let b=this._lineStarts.getIndexOf(a),c=this._lines[b.index].length;return{lineNumber:1+b.index,column:1+Math.min(b.remainder,c)}}_validateRange(a){let b=this._validatePosition({lineNumber:a.startLineNumber,column:a.startColumn}),c=this._validatePosition({lineNumber:a.endLineNumber,column:a.endColumn});return b.lineNumber!==a.startLineNumber||b.column!==a.startColumn||c.lineNumber!==a.endLineNumber||c.column!==a.endColumn?{startLineNumber:b.lineNumber,startColumn:b.column,endLineNumber:c.lineNumber,endColumn:c.column}:a}_validatePosition(a){if(!g.y.isIPosition(a))throw Error("bad position");let{lineNumber:b,column:c}=a,d=!1;if(b<1)b=1,c=1,d=!0;else if(b>this._lines.length)b=this._lines.length,c=this._lines[b-1].length+1,d=!0;else{let a=this._lines[b-1].length+1;c<1?(c=1,d=!0):c>a&&(c=a,d=!0)}return d?{lineNumber:b,column:c}:a}}},53072:(a,b,c)=>{"use strict";c.d(b,{ne:()=>e,dt:()=>H,yr:()=>v,O:()=>w,WP:()=>i});var d,e,f=c(17577);new Uint32Array(10),new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),new f.qK(1e4),new f.qK(1e4),new f.qK(1e4);var g=c(26529);function h(...a){return function(b,c){for(let d=0,e=a.length;d<e;d++){let e=a[d](b,c);if(e)return e}return null}}j.bind(void 0,!1);let i=j.bind(void 0,!0);function j(a,b,c){return c&&!(c.length<b.length)&&(a?(0,g.ns)(c,b):0===c.indexOf(b))?b.length>0?[{start:0,end:b.length}]:[]:null}function k(a){return 97<=a&&a<=122}function l(a){return 65<=a&&a<=90}function m(a){return 48<=a&&a<=57}let n=new Set;function o(a){return k(a)||l(a)||m(a)}function p(a,b){return 0===b.length?b=[a]:a.end===b[0].start?b[0].start=a.start:b.unshift(a),b}function q(a,b){for(let c=b;c<a.length;c++){let b=a.charCodeAt(c);if(l(b)||m(b)||c>0&&!o(a.charCodeAt(c-1)))return c}return a.length}function r(a,b){if(!b||0===(b=b.trim()).length||!function(a){let b=0,c=0,d=0,e=0;for(let g=0;g<a.length;g++){var f;l(d=a.charCodeAt(g))&&b++,k(d)&&c++,(32===(f=d)||9===f||10===f||13===f)&&e++}return(0===b||0===c)&&0===e?a.length<=30:b<=5}(a))return null;b.length>60&&(b=b.substring(0,60));let c=function(a){let b=0,c=0,d=0,e=0,f=0;for(let g=0;g<a.length;g++)l(f=a.charCodeAt(g))&&b++,k(f)&&c++,o(f)&&d++,m(f)&&e++;let g=b/a.length,h=c/a.length;return{upperPercent:g,lowerPercent:h,alphaPercent:d/a.length,numericPercent:e/a.length}}(b);if(!function(a){let{upperPercent:b,lowerPercent:c,alphaPercent:d,numericPercent:e}=a;return c>.2&&b<.8&&d>.6&&e<.2}(c)){if(!function(a){let{upperPercent:b,lowerPercent:c}=a;return 0===c&&b>.6}(c))return null;b=b.toLowerCase()}let d=null,e=0;for(a=a.toLowerCase();e<b.length&&null===(d=function a(b,c,d,e){if(d===b.length)return[];{if(e===c.length||b[d]!==c[e].toLowerCase())return null;let f=null,g=e+1;for(f=a(b,c,d+1,e+1);!f&&(g=q(c,g))<c.length;)f=a(b,c,d+1,g),g++;return null===f?null:p({start:e,end:e+1},f)}}(a,b,0,e));)e=q(b,e+1);return d}"()[]{}<>`'\"-/;:,.?!".split("").forEach(a=>n.add(a.charCodeAt(0)));let s=h(i,r,function(a,b){if(a.length>b.length)return null;let c=b.toLowerCase().indexOf(a.toLowerCase());return -1===c?null:[{start:c,end:c+a.length}]}),t=h(i,r,function(a,b){return a.length>b.length?null:function a(b,c,d,e){if(d===b.length)return[];if(e===c.length)return null;if(b[d]===c[e]){let f=null;return(f=a(b,c,d+1,e+1))?p({start:e,end:e+1},f):null}return a(b,c,d,e+1)}(a.toLowerCase(),b.toLowerCase(),0,0)}),u=new f.qK(1e4);function v(a,b,c=!1){if("string"!=typeof a||"string"!=typeof b)return null;let d=u.get(a);d||(d=RegExp((0,g.Bm)(a),"i"),u.set(a,d));let e=d.exec(b);return e?[{start:e.index,end:e.index+e[0].length}]:c?t(a,b):s(a,b)}function w(a,b){let c=H(a,a.toLowerCase(),0,b,b.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return c?function(a){if(void 0===a)return[];let b=[],c=a[1];for(let d=a.length-1;d>1;d--){let e=a[d]+c,f=b[b.length-1];f&&f.end===e?f.end=e+1:b.push({start:e,end:e+1})}return b}(c):null}function x(){let a=[],b=[];for(let a=0;a<=128;a++)b[a]=0;for(let c=0;c<=128;c++)a.push(b.slice(0));return a}function y(a){let b=[];for(let c=0;c<=a;c++)b[c]=0;return b}let z=y(256),A=y(256),B=x(),C=x(),D=x();function E(a,b){if(b<0||b>=a.length)return!1;let c=a.codePointAt(b);switch(c){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:if((0,g.Ss)(c))return!0;return!1}}function F(a,b){if(b<0||b>=a.length)return!1;switch(a.charCodeAt(b)){case 32:case 9:return!0;default:return!1}}(d=e||(e={})).Default=[-100,0],d.isDefault=function(a){return!a||2===a.length&&-100===a[0]&&0===a[1]};class G{static{this.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}}constructor(a,b){this.firstMatchCanBeWeak=a,this.boostFullMatch=b}}function H(a,b,c,d,e,f,g=G.default){let h=a.length>128?128:a.length,i=d.length>128?128:d.length;if(c>=h||f>=i||h-c>i-f||!function(a,b,c,d,e,f,g=!1){for(;b<c&&e<f;)a[b]===d[e]&&(g&&(z[b]=e),b+=1),e+=1;return b===c}(b,c,h,e,f,i,!0))return;var j,k=h,l=i,m=c,n=f,o=b,p=e;let q=k-1,r=l-1;for(;q>=m&&r>=n;)o[q]===p[r]&&(A[q]=r,q--),r--;let s=1,t=1,u=c,v=f,w=[!1];for(s=1,u=c;u<h;s++,u++){let g=z[u],j=A[u],k=u+1<h?A[u+1]:i;for(t=g-f+1,v=g;v<k;t++,v++){let h=Number.MIN_SAFE_INTEGER,k=!1;v<=j&&(h=function(a,b,c,d,e,f,g,h,i,j,k){var l;if(b[c]!==f[g])return Number.MIN_SAFE_INTEGER;let m=1,n=!1;return g===c-d?m=a[c]===e[g]?7:5:e[g]===f[g]||0!==g&&e[l=g-1]!==f[l]?E(f,g)&&(0===g||!E(f,g-1))?m=5:(E(f,g-1)||F(f,g-1))&&(m=5,n=!0):(m=a[c]===e[g]?7:5,n=!0),m>1&&c===d&&(k[0]=!0),n||(n=e[g]!==f[g]||E(f,g-1)||F(f,g-1)),c===d?g>i&&(m-=n?3:5):j?m+=2*!!n:m+=+!n,g+1===h&&(m-=n?3:5),m}(a,b,u,c,d,e,v,i,f,0===B[s-1][t-1],w));let l=0;h!==Number.MIN_SAFE_INTEGER&&(k=!0,l=h+C[s-1][t-1]);let m=v>g,n=m?C[s][t-1]+(B[s][t-1]>0?-5:0):0,o=v>g+1&&B[s][t-1]>0,p=o?C[s][t-2]+(B[s][t-2]>0?-5:0):0;if(o&&(!m||p>=n)&&(!k||p>=l))C[s][t]=p,D[s][t]=3,B[s][t]=0;else if(m&&(!k||n>=l))C[s][t]=n,D[s][t]=2,B[s][t]=0;else if(k)C[s][t]=l,D[s][t]=1,B[s][t]=B[s-1][t-1]+1;else throw Error("not possible")}}if(!w[0]&&!g.firstMatchCanBeWeak)return;s--,t--;let x=[C[s][t],f],y=0,I=0;for(;s>=1;){let a=t;do{let b=D[s][a];if(3===b)a-=2;else if(2===b)a-=1;else break}while(a>=1);y>1&&b[c+s-1]===e[f+t-1]&&d[j=a+f-1]===e[j]&&y+1>B[s][a]&&(a=t),a===t?y++:y=1,I||(I=a),s--,t=a-1,x.push(t)}i-f===h&&g.boostFullMatch&&(x[0]+=2);let J=I-h;return x[0]-=J,x}},53772:()=>{},54265:(a,b,c)=>{"use strict";let d;c.d(b,{XL:()=>l,YY:()=>j,PO:()=>k,Rn:()=>i});var e=c(66036);function f(a){let b=Error("BugIndicatingErrorRecovery: "+a);(0,e.dz)(b),console.error("recovered from an error that indicates a bug",b)}c(78014),c(95091),c(76631);var g=c(55900),h=c(61811);function i(a,b){let c=new l(a,b);try{a(c)}finally{c.finish()}}function j(a){if(d)a(d);else{let b=new l(a,void 0);d=b;try{a(b)}finally{b.finish(),d=void 0}}}function k(a,b,c){a?b(a):i(b,c)}class l{constructor(a,b){this._fn=a,this._getDebugName=b,this._updatingObservers=[],(0,h.t)()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():(0,g.qQ)(this._fn)}updateObserver(a,b){if(!this._updatingObservers){f("Transaction already finished!"),i(c=>{c.updateObserver(a,b)});return}this._updatingObservers.push({observer:a,observable:b}),a.beginUpdate(b)}finish(){let a=this._updatingObservers;if(!a)return void f("transaction.finish() has already been called!");for(let b=0;b<a.length;b++){let{observer:c,observable:d}=a[b];c.endUpdate(d)}this._updatingObservers=null,(0,h.t)()?.handleEndTransaction(this)}debugGetUpdatingObservers(){return this._updatingObservers}}},54436:()=>{},54469:(a,b,c)=>{"use strict";c.d(b,{Bc:()=>i,VS:()=>j,_W:()=>m,nI:()=>n,nK:()=>k,oO:()=>l});var d=c(66036),e=c(48409);c(77497);var f=c(50498),g=c(26529),h=c(54957);class i{constructor(a="",b=!1){if(this.value=a,"string"!=typeof this.value)throw(0,d.Qg)("value");"boolean"==typeof b?(this.isTrusted=b,this.supportThemeIcons=!1,this.supportHtml=!1,this.supportAlertSyntax=!1):(this.isTrusted=b.isTrusted??void 0,this.supportThemeIcons=b.supportThemeIcons??!1,this.supportHtml=b.supportHtml??!1,this.supportAlertSyntax=b.supportAlertSyntax??!1)}appendText(a,b=0){return this.value+=(this.supportThemeIcons?(0,e.m2)(a):a).replace(/[\\`*_{}[\]()#+!~]/g,"\\$&").replace(/^([ \t]*)-/gm,"$1\\-").replace(/([ \t]+)/g,(a,b)=>"&nbsp;".repeat(b.length)).replace(/\>/gm,"\\>").replace(/\n/g,1===b?"\\\n":"\n\n"),this}appendMarkdown(a){return this.value+=a,this}appendCodeblock(a,b){var c,d;let e,f;return this.value+=`
53
+ `},38238:()=>{},38750:(a,b,c)=>{"use strict";c.d(b,{yE:()=>g});var d=c(95091),e=c(76631);class f{constructor(a,b,c,d,e,f,g){this._forceIntegerValues=a,this._scrollStateBrand=void 0,this._forceIntegerValues&&(b|=0,c|=0,d|=0,e|=0,f|=0,g|=0),this.rawScrollLeft=d,this.rawScrollTop=g,b<0&&(b=0),d+b>c&&(d=c-b),d<0&&(d=0),e<0&&(e=0),g+e>f&&(g=f-e),g<0&&(g=0),this.width=b,this.scrollWidth=c,this.scrollLeft=d,this.height=e,this.scrollHeight=f,this.scrollTop=g}equals(a){return this.rawScrollLeft===a.rawScrollLeft&&this.rawScrollTop===a.rawScrollTop&&this.width===a.width&&this.scrollWidth===a.scrollWidth&&this.scrollLeft===a.scrollLeft&&this.height===a.height&&this.scrollHeight===a.scrollHeight&&this.scrollTop===a.scrollTop}withScrollDimensions(a,b){return new f(this._forceIntegerValues,void 0!==a.width?a.width:this.width,void 0!==a.scrollWidth?a.scrollWidth:this.scrollWidth,b?this.rawScrollLeft:this.scrollLeft,void 0!==a.height?a.height:this.height,void 0!==a.scrollHeight?a.scrollHeight:this.scrollHeight,b?this.rawScrollTop:this.scrollTop)}withScrollPosition(a){return new f(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==a.scrollLeft?a.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==a.scrollTop?a.scrollTop:this.rawScrollTop)}createScrollEvent(a,b){let c=this.width!==a.width,d=this.scrollWidth!==a.scrollWidth,e=this.scrollLeft!==a.scrollLeft,f=this.height!==a.height,g=this.scrollHeight!==a.scrollHeight,h=this.scrollTop!==a.scrollTop;return{inSmoothScrolling:b,oldWidth:a.width,oldScrollWidth:a.scrollWidth,oldScrollLeft:a.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:a.height,oldScrollHeight:a.scrollHeight,oldScrollTop:a.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:c,scrollWidthChanged:d,scrollLeftChanged:e,heightChanged:f,scrollHeightChanged:g,scrollTopChanged:h}}}class g extends e.jG{constructor(a){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new d.vl),this.onScroll=this._onScroll.event,this._smoothScrollDuration=a.smoothScrollDuration,this._scheduleAtNextAnimationFrame=a.scheduleAtNextAnimationFrame,this._state=new f(a.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(a){this._smoothScrollDuration=a}validateScrollPosition(a){return this._state.withScrollPosition(a)}getScrollDimensions(){return this._state}setScrollDimensions(a,b){let c=this._state.withScrollDimensions(a,b);this._setState(c,!!this._smoothScrolling),this._smoothScrolling?.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(a){let b=this._state.withScrollPosition(a);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(b,!1)}setScrollPositionSmooth(a,b){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(a);if(this._smoothScrolling){let c;a={scrollLeft:void 0===a.scrollLeft?this._smoothScrolling.to.scrollLeft:a.scrollLeft,scrollTop:void 0===a.scrollTop?this._smoothScrolling.to.scrollTop:a.scrollTop};let d=this._state.withScrollPosition(a);if(this._smoothScrolling.to.scrollLeft===d.scrollLeft&&this._smoothScrolling.to.scrollTop===d.scrollTop)return;c=b?new j(this._smoothScrolling.from,d,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,d,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=c}else{let b=this._state.withScrollPosition(a);this._smoothScrolling=j.start(this._state,b,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let a=this._smoothScrolling.tick(),b=this._state.withScrollPosition(a);if(this._setState(b,!0),this._smoothScrolling){if(a.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(a,b){let c=this._state;c.equals(a)||(this._state=a,this._onScroll.fire(this._state.createScrollEvent(c,b)))}}class h{constructor(a,b,c){this.scrollLeft=a,this.scrollTop=b,this.isDone=c}}function i(a,b){let c=b-a;return function(b){return a+c*(1-Math.pow(1-b,3))}}class j{constructor(a,b,c,d){this.from=a,this.to=b,this.duration=d,this.startTime=c,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(a,b,c){if(Math.abs(a-b)>2.5*c){var d,e;let f,g;return a<b?(f=a+.75*c,g=b-.75*c):(f=a-.75*c,g=b+.75*c),d=i(a,f),e=i(g,b),function(a){return a<.33?d(a/.33):e((a-.33)/(1-.33))}}return i(a,b)}dispose(){null!==this.animationFrameDisposable&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(a){this.to=a.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(a){let b=(a-this.startTime)/this.duration;return b<1?new h(this.scrollLeft(b),this.scrollTop(b),!1):new h(this.to.scrollLeft,this.to.scrollTop,!0)}combine(a,b,c){return j.start(a,b,c)}static start(a,b,c){return c+=10,new j(a,b,Date.now()-10,c)}}},39014:(a,b,c)=>{"use strict";c.d(b,{Al:()=>q,EL:()=>i,HJ:()=>j,NB:()=>l,c7:()=>p,er:()=>k,iw:()=>m,nH:()=>o});var d=c(72816),e=c(55404),f=c(37327),g=c(11023),h=c(91018);let i=(0,f.x1)("quickInput.background",g.Cg,(0,d.kg)(2078,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),j=(0,f.x1)("quickInput.foreground",g.Fi,(0,d.kg)(2079,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),k=(0,f.x1)("quickInputTitle.background",{dark:new e.Q1(new e.bU(255,255,255,.105)),light:new e.Q1(new e.bU(0,0,0,.06)),hcDark:"#000000",hcLight:e.Q1.white},(0,d.kg)(2080,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),l=(0,f.x1)("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:e.Q1.white,hcLight:"#0F4A85"},(0,d.kg)(2081,"Quick picker color for grouping labels.")),m=(0,f.x1)("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:e.Q1.white,hcLight:"#0F4A85"},(0,d.kg)(2082,"Quick picker color for grouping borders.")),n=(0,f.x1)("quickInput.list.focusBackground",null,"",void 0,(0,d.kg)(2083,"Please use quickInputList.focusBackground instead")),o=(0,f.x1)("quickInputList.focusForeground",h.GV,(0,d.kg)(2084,"Quick picker foreground color for the focused item.")),p=(0,f.x1)("quickInputList.focusIconForeground",h.fE,(0,d.kg)(2085,"Quick picker icon foreground color for the focused item.")),q=(0,f.x1)("quickInputList.focusBackground",{dark:(0,f.yL)(n,h.Rj),light:(0,f.yL)(n,h.Rj),hcDark:null,hcLight:null},(0,d.kg)(2086,"Quick picker background color for the focused item."));(0,f.x1)("quickInputList.focusHighlightForeground",h.eM,(0,d.kg)(2087,"Quick picker foreground color of the match highlights on the focused item."))},39194:(a,b,c)=>{"use strict";c.d(b,{AI:()=>f,Kz:()=>h,Ot:()=>g});var d=c(12780),e=c(58254),f=d.A;let g=(0,e.u1)("notificationService");class h{}},39366:()=>{},39383:(a,b,c)=>{"use strict";c.d(b,{h:()=>g});var d=c(97195),e=c(16202),f=c(72333);function g(a,b,c,g){b.tokenization.forceTokenization(c.startLineNumber);let h=b.getLanguageIdAtPosition(c.startLineNumber,c.startColumn),i=g.getLanguageConfiguration(h);if(!i)return null;let j=new f.V(b,g).getProcessedTokenContextAroundRange(c),k=j.previousLineProcessedTokens.getLineContent(),l=j.beforeRangeProcessedTokens.getLineContent(),m=j.afterRangeProcessedTokens.getLineContent(),n=i.onEnter(a,k,l,m);if(!n)return null;let o=n.indentAction,p=n.appendText,q=n.removeText||0;p?o===d.l.Indent&&(p=" "+p):p=o===d.l.Indent||o===d.l.IndentOutdent?" ":"";let r=(0,e.Cw)(b,c.startLineNumber,c.startColumn);return q&&(r=r.substring(0,r.length-q)),{indentAction:o,appendText:p,removeText:q,indentation:r}}},39482:(a,b,c)=>{"use strict";c.d(b,{L:()=>e,h:()=>f});var d=c(66036);class e{static fromTo(a,b){return new e(a,b)}static addRange(a,b){let c=0;for(;c<b.length&&b[c].endExclusive<a.start;)c++;let d=c;for(;d<b.length&&b[d].start<=a.endExclusive;)d++;if(c===d)b.splice(c,0,a);else{let f=Math.min(a.start,b[c].start),g=Math.max(a.endExclusive,b[d-1].endExclusive);b.splice(c,d-c,new e(f,g))}}static tryCreate(a,b){if(!(a>b))return new e(a,b)}static ofLength(a){return new e(0,a)}static ofStartAndLength(a,b){return new e(a,a+b)}static emptyAt(a){return new e(a,a)}constructor(a,b){if(this.start=a,this.endExclusive=b,a>b)throw new d.D7(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(a){return new e(this.start+a,this.endExclusive+a)}deltaStart(a){return new e(this.start+a,this.endExclusive)}deltaEnd(a){return new e(this.start,this.endExclusive+a)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(a){return this.start===a.start&&this.endExclusive===a.endExclusive}containsRange(a){return this.start<=a.start&&a.endExclusive<=this.endExclusive}contains(a){return this.start<=a&&a<this.endExclusive}join(a){return new e(Math.min(this.start,a.start),Math.max(this.endExclusive,a.endExclusive))}intersect(a){let b=Math.max(this.start,a.start),c=Math.min(this.endExclusive,a.endExclusive);if(b<=c)return new e(b,c)}intersectionLength(a){let b=Math.max(this.start,a.start);return Math.max(0,Math.min(this.endExclusive,a.endExclusive)-b)}intersects(a){return Math.max(this.start,a.start)<Math.min(this.endExclusive,a.endExclusive)}intersectsOrTouches(a){return Math.max(this.start,a.start)<=Math.min(this.endExclusive,a.endExclusive)}isBefore(a){return this.endExclusive<=a.start}isAfter(a){return this.start>=a.endExclusive}slice(a){return a.slice(this.start,this.endExclusive)}substring(a){return a.substring(this.start,this.endExclusive)}clip(a){if(this.isEmpty)throw new d.D7(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,a))}clipCyclic(a){if(this.isEmpty)throw new d.D7(`Invalid clipping range: ${this.toString()}`);return a<this.start?this.endExclusive-(this.start-a)%this.length:a>=this.endExclusive?this.start+(a-this.start)%this.length:a}forEach(a){for(let b=this.start;b<this.endExclusive;b++)a(b)}joinRightTouching(a){if(this.endExclusive!==a.start)throw new d.D7(`Invalid join: ${this.toString()} and ${a.toString()}`);return new e(this.start,a.endExclusive)}withMargin(a,b){return void 0===b&&(b=a),new e(this.start-a,this.endExclusive+b)}}class f{constructor(){this._sortedRanges=[]}addRange(a){let b=0;for(;b<this._sortedRanges.length&&this._sortedRanges[b].endExclusive<a.start;)b++;let c=b;for(;c<this._sortedRanges.length&&this._sortedRanges[c].start<=a.endExclusive;)c++;if(b===c)this._sortedRanges.splice(b,0,a);else{let d=Math.min(a.start,this._sortedRanges[b].start),f=Math.max(a.endExclusive,this._sortedRanges[c-1].endExclusive);this._sortedRanges.splice(b,c-b,new e(d,f))}}toString(){return this._sortedRanges.map(a=>a.toString()).join(", ")}intersectsStrict(a){let b=0;for(;b<this._sortedRanges.length&&this._sortedRanges[b].endExclusive<=a.start;)b++;return b<this._sortedRanges.length&&this._sortedRanges[b].start<a.endExclusive}intersectWithRange(a){let b=new f;for(let c of this._sortedRanges){let d=c.intersect(a);d&&b.addRange(d)}return b}intersectWithRangeLength(a){return this.intersectWithRange(a).length}get length(){return this._sortedRanges.reduce((a,b)=>a+b.length,0)}}},39870:(a,b,c)=>{"use strict";c.d(b,{e:()=>f}),c(47322);var d=c(27612),e=c(18216);let f={clipboard:{writeText:e.ib||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:e.ib||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},pointerEvents:d.G.PointerEvent&&("ontouchstart"in d.G||navigator.maxTouchPoints>0)}},39924:(a,b,c)=>{"use strict";c.d(b,{A3:()=>F,AQ:()=>T,Am:()=>D,As:()=>H,BD:()=>ad,Bo:()=>ab,CM:()=>B,D0:()=>m,H0:()=>C,I2:()=>aa,IW:()=>ae,If:()=>ac,JB:()=>J,L0:()=>r,Mf:()=>l,P1:()=>aj,Pe:()=>ah,Qt:()=>t,WD:()=>ai,WS:()=>ag,WY:()=>ak,Xr:()=>N,aZ:()=>S,bB:()=>af,hz:()=>y,ik:()=>K,je:()=>p,kG:()=>j,kM:()=>n,l5:()=>X,lQ:()=>V,n4:()=>_,ob:()=>x,ow:()=>z,s7:()=>$,sC:()=>o,sH:()=>Y,sN:()=>U,ss:()=>W,tK:()=>E,tp:()=>G,vP:()=>A,vV:()=>w,vp:()=>Q,w4:()=>s,wZ:()=>L,we:()=>q,x9:()=>M,xU:()=>k,yI:()=>R,yw:()=>O,zp:()=>Z});var d=c(72816),e=c(55404),f=c(37327),g=c(34183);c(48727);var h=c(11023);c(18896),c(91018),c(62957),c(40563),c(58330),c(39014),c(26858);var i=c(46547);let j=(0,f.x1)("editor.lineHighlightBackground",null,(0,d.kg)(641,"Background color for the highlight of line at the cursor position.")),k=(0,f.x1)("editor.inactiveLineHighlightBackground",j,(0,d.kg)(642,"Background color for the highlight of line at the cursor position when the editor is not focused.")),l=(0,f.x1)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:g.b1},(0,d.kg)(643,"Background color for the border around the line at the cursor position."));(0,f.x1)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},(0,d.kg)(644,"Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),(0,f.x1)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:g.bu,hcLight:g.bu},(0,d.kg)(645,"Background color of the border around highlighted ranges.")),(0,f.x1)("editor.symbolHighlightBackground",{dark:h.Ub,light:h.Ub,hcDark:null,hcLight:null},(0,d.kg)(646,"Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),(0,f.x1)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:g.bu,hcLight:g.bu},(0,d.kg)(647,"Background color of the border around highlighted symbols."));let m=(0,f.x1)("editorCursor.foreground",{dark:"#AEAFAD",light:e.Q1.black,hcDark:e.Q1.white,hcLight:"#0F4A85"},(0,d.kg)(648,"Color of the editor cursor.")),n=(0,f.x1)("editorCursor.background",null,(0,d.kg)(649,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),o=(0,f.x1)("editorMultiCursor.primary.foreground",m,(0,d.kg)(650,"Color of the primary editor cursor when multiple cursors are present.")),p=(0,f.x1)("editorMultiCursor.primary.background",n,(0,d.kg)(651,"The background color of the primary editor cursor when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),q=(0,f.x1)("editorMultiCursor.secondary.foreground",m,(0,d.kg)(652,"Color of secondary editor cursors when multiple cursors are present.")),r=(0,f.x1)("editorMultiCursor.secondary.background",n,(0,d.kg)(653,"The background color of secondary editor cursors when multiple cursors are present. Allows customizing the color of a character overlapped by a block cursor.")),s=(0,f.x1)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},(0,d.kg)(654,"Color of whitespace characters in the editor.")),t=(0,f.x1)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:e.Q1.white,hcLight:"#292929"},(0,d.kg)(655,"Color of editor line numbers.")),u=(0,f.x1)("editorIndentGuide.background",s,(0,d.kg)(656,"Color of the editor indentation guides."),!1,(0,d.kg)(657,"'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.")),v=(0,f.x1)("editorIndentGuide.activeBackground",s,(0,d.kg)(658,"Color of the active editor indentation guides."),!1,(0,d.kg)(659,"'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.")),w=(0,f.x1)("editorIndentGuide.background1",u,(0,d.kg)(660,"Color of the editor indentation guides (1).")),x=(0,f.x1)("editorIndentGuide.background2","#00000000",(0,d.kg)(661,"Color of the editor indentation guides (2).")),y=(0,f.x1)("editorIndentGuide.background3","#00000000",(0,d.kg)(662,"Color of the editor indentation guides (3).")),z=(0,f.x1)("editorIndentGuide.background4","#00000000",(0,d.kg)(663,"Color of the editor indentation guides (4).")),A=(0,f.x1)("editorIndentGuide.background5","#00000000",(0,d.kg)(664,"Color of the editor indentation guides (5).")),B=(0,f.x1)("editorIndentGuide.background6","#00000000",(0,d.kg)(665,"Color of the editor indentation guides (6).")),C=(0,f.x1)("editorIndentGuide.activeBackground1",v,(0,d.kg)(666,"Color of the active editor indentation guides (1).")),D=(0,f.x1)("editorIndentGuide.activeBackground2","#00000000",(0,d.kg)(667,"Color of the active editor indentation guides (2).")),E=(0,f.x1)("editorIndentGuide.activeBackground3","#00000000",(0,d.kg)(668,"Color of the active editor indentation guides (3).")),F=(0,f.x1)("editorIndentGuide.activeBackground4","#00000000",(0,d.kg)(669,"Color of the active editor indentation guides (4).")),G=(0,f.x1)("editorIndentGuide.activeBackground5","#00000000",(0,d.kg)(670,"Color of the active editor indentation guides (5).")),H=(0,f.x1)("editorIndentGuide.activeBackground6","#00000000",(0,d.kg)(671,"Color of the active editor indentation guides (6).")),I=(0,f.x1)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:g.bu,hcLight:g.bu},(0,d.kg)(672,"Color of editor active line number"),!1,(0,d.kg)(673,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead."));(0,f.x1)("editorLineNumber.activeForeground",I,(0,d.kg)(674,"Color of editor active line number"));let J=(0,f.x1)("editorLineNumber.dimmedForeground",null,(0,d.kg)(675,"Color of the final editor line when editor.renderFinalNewline is set to dimmed.")),K=(0,f.x1)("editorRuler.foreground",{dark:"#5A5A5A",light:e.Q1.lightgrey,hcDark:e.Q1.white,hcLight:"#292929"},(0,d.kg)(676,"Color of the editor rulers."));(0,f.x1)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},(0,d.kg)(677,"Foreground color of editor CodeLens")),(0,f.x1)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},(0,d.kg)(678,"Background color behind matching brackets")),(0,f.x1)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:g.b1,hcLight:g.b1},(0,d.kg)(679,"Color for matching brackets boxes"));let L=(0,f.x1)("editorBracketMatch.foreground",null,(0,d.kg)(680,"Foreground color for matching brackets")),M=(0,f.x1)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},(0,d.kg)(681,"Color of the overview ruler border.")),N=(0,f.x1)("editorOverviewRuler.background",null,(0,d.kg)(682,"Background color of the editor overview ruler."));(0,f.x1)("editorGutter.background",h.Yt,(0,d.kg)(683,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),(0,f.x1)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:e.Q1.fromHex("#fff").transparent(.8),hcLight:g.b1},(0,d.kg)(684,"Border color of unnecessary (unused) source code in the editor."));let O=(0,f.x1)("editorUnnecessaryCode.opacity",{dark:e.Q1.fromHex("#000a"),light:e.Q1.fromHex("#0007"),hcDark:null,hcLight:null},(0,d.kg)(685,"Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out."));(0,f.x1)("editorGhostText.border",{dark:null,light:null,hcDark:e.Q1.fromHex("#fff").transparent(.8),hcLight:e.Q1.fromHex("#292929").transparent(.8)},(0,d.kg)(686,"Border color of ghost text in the editor.")),(0,f.x1)("editorGhostText.foreground",{dark:e.Q1.fromHex("#ffffff56"),light:e.Q1.fromHex("#0007"),hcDark:null,hcLight:null},(0,d.kg)(687,"Foreground color of the ghost text in the editor.")),(0,f.x1)("editorGhostText.background",null,(0,d.kg)(688,"Background color of the ghost text in the editor."));let P=new e.Q1(new e.bU(0,122,204,.6)),Q=(0,f.x1)("editorOverviewRuler.rangeHighlightForeground",P,(0,d.kg)(689,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),R=(0,f.x1)("editorOverviewRuler.errorForeground",{dark:new e.Q1(new e.bU(255,18,18,.7)),light:new e.Q1(new e.bU(255,18,18,.7)),hcDark:new e.Q1(new e.bU(255,50,50,1)),hcLight:"#B5200D"},(0,d.kg)(690,"Overview ruler marker color for errors.")),S=(0,f.x1)("editorOverviewRuler.warningForeground",{dark:h.Hn,light:h.Hn,hcDark:h.St,hcLight:h.St},(0,d.kg)(691,"Overview ruler marker color for warnings.")),T=(0,f.x1)("editorOverviewRuler.infoForeground",{dark:h.pO,light:h.pO,hcDark:h.II,hcLight:h.II},(0,d.kg)(692,"Overview ruler marker color for infos.")),U=(0,f.x1)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},(0,d.kg)(693,"Foreground color of brackets (1). Requires enabling bracket pair colorization.")),V=(0,f.x1)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},(0,d.kg)(694,"Foreground color of brackets (2). Requires enabling bracket pair colorization.")),W=(0,f.x1)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},(0,d.kg)(695,"Foreground color of brackets (3). Requires enabling bracket pair colorization.")),X=(0,f.x1)("editorBracketHighlight.foreground4","#00000000",(0,d.kg)(696,"Foreground color of brackets (4). Requires enabling bracket pair colorization.")),Y=(0,f.x1)("editorBracketHighlight.foreground5","#00000000",(0,d.kg)(697,"Foreground color of brackets (5). Requires enabling bracket pair colorization.")),Z=(0,f.x1)("editorBracketHighlight.foreground6","#00000000",(0,d.kg)(698,"Foreground color of brackets (6). Requires enabling bracket pair colorization.")),$=(0,f.x1)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new e.Q1(new e.bU(255,18,18,.8)),light:new e.Q1(new e.bU(255,18,18,.8)),hcDark:new e.Q1(new e.bU(255,50,50,1)),hcLight:"#B5200D"},(0,d.kg)(699,"Foreground color of unexpected brackets.")),_=(0,f.x1)("editorBracketPairGuide.background1","#00000000",(0,d.kg)(700,"Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),aa=(0,f.x1)("editorBracketPairGuide.background2","#00000000",(0,d.kg)(701,"Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),ab=(0,f.x1)("editorBracketPairGuide.background3","#00000000",(0,d.kg)(702,"Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),ac=(0,f.x1)("editorBracketPairGuide.background4","#00000000",(0,d.kg)(703,"Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),ad=(0,f.x1)("editorBracketPairGuide.background5","#00000000",(0,d.kg)(704,"Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),ae=(0,f.x1)("editorBracketPairGuide.background6","#00000000",(0,d.kg)(705,"Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),af=(0,f.x1)("editorBracketPairGuide.activeBackground1","#00000000",(0,d.kg)(706,"Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),ag=(0,f.x1)("editorBracketPairGuide.activeBackground2","#00000000",(0,d.kg)(707,"Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),ah=(0,f.x1)("editorBracketPairGuide.activeBackground3","#00000000",(0,d.kg)(708,"Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),ai=(0,f.x1)("editorBracketPairGuide.activeBackground4","#00000000",(0,d.kg)(709,"Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),aj=(0,f.x1)("editorBracketPairGuide.activeBackground5","#00000000",(0,d.kg)(710,"Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),ak=(0,f.x1)("editorBracketPairGuide.activeBackground6","#00000000",(0,d.kg)(711,"Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));(0,f.x1)("editorUnicodeHighlight.border",h.Hn,(0,d.kg)(712,"Border color used to highlight unicode characters.")),(0,f.x1)("editorUnicodeHighlight.background",h.wh,(0,d.kg)(713,"Background color used to highlight unicode characters.")),(0,i.zy)((a,b)=>{let c=a.getColor(h.Yt),d=a.getColor(j),e=d&&!d.isTransparent()?d:c;e&&b.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${e}; }`)})},40002:(a,b,c)=>{"use strict";c.d(b,{I:()=>e});var d=c(66560);class e extends d.LN{constructor(a){super(),this._getContext=a}runAction(a,b){let c=this._getContext();return super.runAction(a,c)}}},40427:(a,b,c)=>{"use strict";c.d(b,{e2:()=>i,sN:()=>g,tW:()=>f,v7:()=>l});var d=c(15053),e=c(26529);function f(a){return g(a,0)}function g(a,b){switch(typeof a){case"object":var c,d,e,f;if(null===a)return h(349,b);if(Array.isArray(a)){return c=a,d=h(104579,d=b),c.reduce((a,b)=>g(b,a),d)}return e=a,f=h(181387,f=b),Object.keys(e).sort().reduce((a,b)=>(a=i(b,a),g(e[b],a)),f);case"string":return i(a,b);case"boolean":return h(a?433:863,b);case"number":return h(a,b);case"undefined":return h(937,b);default:return h(617,b)}}function h(a,b){return(b<<5)-b+a|0}function i(a,b){b=h(149417,b);for(let c=0,d=a.length;c<d;c++)b=h(a.charCodeAt(c),b);return b}function j(a,b,c=32){let d=c-b;return(a<<b|(~((1<<d)-1)&a)>>>d)>>>0}function k(a,b=32){return a instanceof ArrayBuffer?(0,d.mU)(d.MB.wrap(new Uint8Array(a))):(a>>>0).toString(16).padStart(b/4,"0")}class l{static{this._bigBlock32=new DataView(new ArrayBuffer(320))}constructor(){this._h0=0x67452301,this._h1=0xefcdab89,this._h2=0x98badcfe,this._h3=0x10325476,this._h4=0xc3d2e1f0,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(a){let b,c,d=a.length;if(0===d)return;let f=this._buff,g=this._buffLen,h=this._leftoverHighSurrogate;for(0!==h?(b=h,c=-1,h=0):(b=a.charCodeAt(0),c=0);;){let i=b;if((0,e.pc)(b))if(c+1<d){let d=a.charCodeAt(c+1);(0,e.LJ)(d)?(c++,i=(0,e.z_)(b,d)):i=65533}else{h=b;break}else(0,e.LJ)(b)&&(i=65533);if(g=this._push(f,g,i),++c<d)b=a.charCodeAt(c);else break}this._buffLen=g,this._leftoverHighSurrogate=h}_push(a,b,c){return c<128?a[b++]=c:(c<2048?a[b++]=192|(1984&c)>>>6:(c<65536?a[b++]=224|(61440&c)>>>12:(a[b++]=240|(1835008&c)>>>18,a[b++]=128|(258048&c)>>>12),a[b++]=128|(4032&c)>>>6),a[b++]=128|(63&c)>>>0),b>=64&&(this._step(),b-=64,this._totalLen+=64,a[0]=a[64],a[1]=a[65],a[2]=a[66]),b}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),k(this._h0)+k(this._h1)+k(this._h2)+k(this._h3)+k(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,this._buff.subarray(this._buffLen).fill(0),this._buffLen>56&&(this._step(),this._buff.fill(0));let a=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(a/0x100000000),!1),this._buffDV.setUint32(60,a%0x100000000,!1),this._step()}_step(){let a,b,c,d=l._bigBlock32,e=this._buffDV;for(let a=0;a<64;a+=4)d.setUint32(a,e.getUint32(a,!1),!1);for(let a=64;a<320;a+=4)d.setUint32(a,j(d.getUint32(a-12,!1)^d.getUint32(a-32,!1)^d.getUint32(a-56,!1)^d.getUint32(a-64,!1),1),!1);let f=this._h0,g=this._h1,h=this._h2,i=this._h3,k=this._h4;for(let e=0;e<80;e++)e<20?(a=g&h|~g&i,b=0x5a827999):e<40?(a=g^h^i,b=0x6ed9eba1):e<60?(a=g&h|g&i|h&i,b=0x8f1bbcdc):(a=g^h^i,b=0xca62c1d6),c=j(f,5)+a+k+b+d.getUint32(4*e,!1)|0,k=i,i=h,h=j(g,30),g=f,f=c;this._h0=this._h0+f|0,this._h1=this._h1+g|0,this._h2=this._h2+h|0,this._h3=this._h3+i|0,this._h4=this._h4+k|0}}},40563:(a,b,c)=>{"use strict";c.d(b,{Aj:()=>i,IL:()=>o,K1:()=>p,Ko:()=>l,Xp:()=>j,uM:()=>m,yL:()=>n,yr:()=>k});var d=c(72816),e=c(55404),f=c(37327),g=c(11023),h=c(58330);let i=(0,f.x1)("minimap.findMatchHighlight",g.Ub,(0,d.kg)(2051,"Minimap marker color for find matches."),!0),j=(0,f.x1)("minimap.selectionOccurrenceHighlight",g.Qw,(0,d.kg)(2052,"Minimap marker color for repeating editor selections."),!0),k=(0,f.x1)("minimap.selectionHighlight",g.se,(0,d.kg)(2053,"Minimap marker color for the editor selection."),!0),l=(0,f.x1)("minimap.infoHighlight",{dark:g.pO,light:g.pO,hcDark:g.II,hcLight:g.II},(0,d.kg)(2054,"Minimap marker color for infos.")),m=(0,f.x1)("minimap.warningHighlight",{dark:g.Hn,light:g.Hn,hcDark:g.St,hcLight:g.St},(0,d.kg)(2055,"Minimap marker color for warnings.")),n=(0,f.x1)("minimap.errorHighlight",{dark:new e.Q1(new e.bU(255,18,18,.7)),light:new e.Q1(new e.bU(255,18,18,.7)),hcDark:new e.Q1(new e.bU(255,50,50,1)),hcLight:"#B5200D"},(0,d.kg)(2056,"Minimap marker color for errors.")),o=(0,f.x1)("minimap.background",null,(0,d.kg)(2057,"Minimap background color.")),p=(0,f.x1)("minimap.foregroundOpacity",e.Q1.fromHex("#000f"),(0,d.kg)(2058,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.'));(0,f.x1)("minimapSlider.background",(0,f.JO)(h.gn,.5),(0,d.kg)(2059,"Minimap slider background color.")),(0,f.x1)("minimapSlider.hoverBackground",(0,f.JO)(h.cI,.5),(0,d.kg)(2060,"Minimap slider background color when hovering.")),(0,f.x1)("minimapSlider.activeBackground",(0,f.JO)(h.mh,.5),(0,d.kg)(2061,"Minimap slider background color when clicked on."))},40981:(a,b,c)=>{"use strict";c.d(b,{b:()=>d});let d=(0,c(58254).u1)("textModelService")},41206:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});var d=c(61822);class e{static insert(a,b){return{range:new d.Q(a.lineNumber,a.column,a.lineNumber,a.column),text:b,forceMoveMarkers:!0}}static delete(a){return{range:a,text:null}}static replace(a,b){return{range:a,text:b}}static replaceMove(a,b){return{range:a,text:b,forceMoveMarkers:!0}}}},41577:(a,b,c)=>{"use strict";c.d(b,{i:()=>f,y:()=>g});var d=c(61822),e=c(77509);class f{constructor(a,b,c){this._range=a,this._charBeforeSelection=b,this._charAfterSelection=c}getEditOperations(a,b){b.addTrackedEditOperation(new d.Q(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),b.addTrackedEditOperation(new d.Q(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection||null)}computeCursorState(a,b){let c=b.getInverseEditOperations(),d=c[0].range,f=c[1].range;return new e.L(d.endLineNumber,d.endColumn,f.endLineNumber,f.endColumn-this._charAfterSelection.length)}}class g{constructor(a,b,c){this._position=a,this._text=b,this._charAfter=c}getEditOperations(a,b){b.addTrackedEditOperation(new d.Q(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column),this._text+this._charAfter)}computeCursorState(a,b){let c=b.getInverseEditOperations()[0].range;return new e.L(c.endLineNumber,c.startColumn,c.endLineNumber,c.endColumn-this._charAfter.length)}}},41847:()=>{},41928:()=>{},42190:(a,b,c)=>{"use strict";c.d(b,{GN:()=>e,vo:()=>d});class d{constructor(a,b){this._viewModelDecorationBrand=void 0,this.range=a,this.options=b}}function e(a,b){return!(b.options.hideInCommentTokens&&f(a,b.range,a=>1===a)||b.options.hideInStringTokens&&f(a,b.range,a=>2===a))}function f(a,b,c){for(let d=b.startLineNumber;d<=b.endLineNumber;d++){let e=a.tokenization.getLineTokens(d),f=d===b.startLineNumber,g=d===b.endLineNumber,h=f?e.findTokenIndexAtOffset(b.startColumn-1):0;for(;h<e.getCount()&&!(g&&e.getStartOffset(h)>b.endColumn-1);){if(!c(e.getStandardTokenType(h)))return!1;h++}}return!0}},42365:()=>{},42491:(a,b,c)=>{"use strict";c.d(b,{P:()=>l,k:()=>m});var d=c(88042),e=c(26529),f=c(18530),g=c(61822),h=c(25076),i=c(33836),j=c(2126),k=c(66036);class l extends h._{constructor(a,b){super(),this.textModel=a,this.languageConfigurationService=b}getLanguageConfiguration(a){return this.languageConfigurationService.getLanguageConfiguration(a)}_computeIndentLevel(a){return(0,i.G)(this.textModel.getLineContent(a+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(a,b,c){this.assertNotDisposed();let d=this.textModel.getLineCount();if(a<1||a>d)throw new k.D7("Illegal value for lineNumber");let e=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,f=!!(e&&e.offSide),g=-2,h=-1,i=-2,j=-1,l=a=>{if(-1!==g&&(-2===g||g>a-1)){g=-1,h=-1;for(let b=a-2;b>=0;b--){let a=this._computeIndentLevel(b);if(a>=0){g=b,h=a;break}}}if(-2===i){i=-1,j=-1;for(let b=a;b<d;b++){let a=this._computeIndentLevel(b);if(a>=0){i=b,j=a;break}}}},m=-2,n=-1,o=-2,p=-1,q=a=>{if(-2===m){m=-1,n=-1;for(let b=a-2;b>=0;b--){let a=this._computeIndentLevel(b);if(a>=0){m=b,n=a;break}}}if(-1!==o&&(-2===o||o<a-1)){o=-1,p=-1;for(let b=a;b<d;b++){let a=this._computeIndentLevel(b);if(a>=0){o=b,p=a;break}}}},r=0,s=!0,t=0,u=!0,v=0,w=0;for(let e=0;s||u;e++){let g=a-e,k=a+e;e>1&&(g<1||g<b)&&(s=!1),e>1&&(k>d||k>c)&&(u=!1),e>5e4&&(s=!1,u=!1);let o=-1;if(s&&g>=1){let a=this._computeIndentLevel(g-1);a>=0?(i=g-1,j=a,o=Math.ceil(a/this.textModel.getOptions().indentSize)):(l(g),o=this._getIndentLevelForWhitespaceLine(f,h,j))}let x=-1;if(u&&k<=d){let a=this._computeIndentLevel(k-1);a>=0?(m=k-1,n=a,x=Math.ceil(a/this.textModel.getOptions().indentSize)):(q(k),x=this._getIndentLevelForWhitespaceLine(f,n,p))}if(0===e){w=o;continue}if(1===e){if(k<=d&&x>=0&&w+1===x){s=!1,r=k,t=k,v=x;continue}if(g>=1&&o>=0&&o-1===w){u=!1,r=g,t=g,v=o;continue}if(r=a,t=a,0===(v=w))break}s&&(o>=v?r=g:s=!1),u&&(x>=v?t=k:u=!1)}return{startLineNumber:r,endLineNumber:t,indent:v}}getLinesBracketGuides(a,b,c,f){let h,i=[];for(let c=a;c<=b;c++)i.push([]);let k=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new g.Q(a,1,b,this.textModel.getLineMaxColumn(b))).toArray();if(c&&k.length>0){let e=(a<=c.lineNumber&&c.lineNumber<=b?k:this.textModel.bracketPairs.getBracketPairsInRange(g.Q.fromPositions(c)).toArray()).filter(a=>g.Q.strictContainsPosition(a.range,c));h=(0,d.Uk)(e,a=>!0)?.range}let l=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,n=new m;for(let c of k){if(!c.closingBracketRange)continue;let d=h&&c.range.equalsRange(h);if(!d&&!f.includeInactive)continue;let g=n.getInlineClassName(c.nestingLevel,c.nestingLevelOfEqualBracketType,l)+(f.highlightActive&&d?" "+n.activeClassName:""),k=c.openingBracketRange.getStartPosition(),m=c.closingBracketRange.getStartPosition(),o=f.horizontalGuides===j.N6.Enabled||f.horizontalGuides===j.N6.EnabledForActive&&d;if(c.range.startLineNumber===c.range.endLineNumber){o&&i[c.range.startLineNumber-a].push(new j.TH(-1,c.openingBracketRange.getEndPosition().column,g,new j.pv(!1,m.column),-1,-1));continue}let p=this.getVisibleColumnFromPosition(m),q=this.getVisibleColumnFromPosition(c.openingBracketRange.getStartPosition()),r=Math.min(q,p,c.minVisibleColumnIndentation+1),s=!1;(0,e.HG)(this.textModel.getLineContent(c.closingBracketRange.startLineNumber))<c.closingBracketRange.startColumn-1&&(s=!0);let t=Math.max(k.lineNumber,a),u=Math.min(m.lineNumber,b),v=+!!s;for(let b=t;b<u+v;b++)i[b-a].push(new j.TH(r,-1,g,null,b===k.lineNumber?k.column:-1,b===m.lineNumber?m.column:-1));o&&(k.lineNumber>=a&&q>r&&i[k.lineNumber-a].push(new j.TH(r,-1,g,new j.pv(!1,k.column),-1,-1)),m.lineNumber<=b&&p>r&&i[m.lineNumber-a].push(new j.TH(r,-1,g,new j.pv(!s,m.column),-1,-1)))}for(let a of i)a.sort((a,b)=>a.visibleColumn-b.visibleColumn);return i}getVisibleColumnFromPosition(a){return f.A.visibleColumnFromColumn(this.textModel.getLineContent(a.lineNumber),a.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(a,b){this.assertNotDisposed();let c=this.textModel.getLineCount();if(a<1||a>c)throw Error("Illegal value for startLineNumber");if(b<1||b>c)throw Error("Illegal value for endLineNumber");let d=this.textModel.getOptions(),e=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,f=!!(e&&e.offSide),g=Array(b-a+1),h=-2,i=-1,j=-2,k=-1;for(let e=a;e<=b;e++){let b=e-a,l=this._computeIndentLevel(e-1);if(l>=0){h=e-1,i=l,g[b]=Math.ceil(l/d.indentSize);continue}if(-2===h){h=-1,i=-1;for(let a=e-2;a>=0;a--){let b=this._computeIndentLevel(a);if(b>=0){h=a,i=b;break}}}if(-1!==j&&(-2===j||j<e-1)){j=-1,k=-1;for(let a=e;a<c;a++){let b=this._computeIndentLevel(a);if(b>=0){j=a,k=b;break}}}g[b]=this._getIndentLevelForWhitespaceLine(f,i,k)}return g}_getIndentLevelForWhitespaceLine(a,b,c){let d=this.textModel.getOptions();return -1===b||-1===c?0:b<c?1+Math.floor(b/d.indentSize):b===c?Math.ceil(c/d.indentSize):a?Math.ceil(c/d.indentSize):1+Math.floor(c/d.indentSize)}}class m{constructor(){this.activeClassName="indent-active"}getInlineClassName(a,b,c){return this.getInlineClassNameOfLevel(c?b:a)}getInlineClassNameOfLevel(a){return`bracket-indent-guide lvl-${a%30}`}}},42913:(a,b,c)=>{"use strict";c.d(b,{Wt:()=>function a(b,c,d=(!j&&(j=i()),j)){if(d&&c)for(let e of(d.sheet?.insertRule(`${b} {${c}}`,0),h.get(d)??[]))a(b,c,e)},li:()=>i});var d=c(76631);c(94484);var e=c(47322),f=c(75082),g=c(27612);c(93539);let h=new Map;function i(a=g.G.document.head,b,c){let j=document.createElement("style");if(j.type="text/css",j.media="screen",b?.(j),a.appendChild(j),c&&c.add((0,d.s)(()=>j.remove())),a===g.G.document.head){let a=new Set;for(let{window:b,disposables:i}of(h.set(j,a),c&&c.add((0,d.s)(()=>h.delete(j))),(0,f.sl)())){if(b===g.G)continue;let h=i.add(function(a,b,c){let g=new d.Cm,h=a.cloneNode(!0);for(let b of(c.document.head.appendChild(h),g.add((0,d.s)(()=>h.remove())),a.sheet?.cssRules??[]))h.sheet?.insertRule(b.cssText,h.sheet?.cssRules.length);return g.add(f.FK.observe(a,g,{childList:!0,subtree:e.gm,characterData:e.gm})(()=>{h.textContent=a.textContent})),b.add(h),g.add((0,d.s)(()=>b.delete(h))),g}(j,a,b));c?.add(h)}}return j}d.jG;let j=null},43765:(a,b,c)=>{"use strict";c.d(b,{Ft:()=>i,V7:()=>h,Xo:()=>j,ok:()=>e,vA:()=>g,xb:()=>f});var d=c(66036);function e(a,b){if(!a)throw Error(b?`Assertion failed (${b})`:"Assertion Failed")}function f(a,b="Unreachable"){throw Error(b)}function g(a,b="unexpected state"){if(!a)throw"string"==typeof b?new d.D7(`Assertion Failed: ${b}`):b}function h(a,b="Soft Assertion Failed"){a||(0,d.dz)(new d.D7(b))}function i(a){a()||(a(),(0,d.dz)(new d.D7("Assertion Failed")))}function j(a,b){let c=0;for(;c<a.length-1;){if(!b(a[c],a[c+1]))return!1;c++}return!0}},44052:()=>{},44232:()=>{},45186:(a,b,c)=>{"use strict";c.d(b,{k:()=>d});let d=(0,c(58254).u1)("telemetryService")},45395:(a,b,c)=>{"use strict";c.d(b,{g:()=>k});var d=c(26529),e=c(12017),f=c(48580),g=c(18530),h=c(22913),i=c(61822),j=c(6812);class k{static deleteRight(a,b,c,d){let f=[],g=3!==a;for(let a=0,h=d.length;a<h;a++){let h=d[a],i=this.getDeleteRightRange(h,c,b);if(i.isEmpty()){f[a]=null;continue}i.startLineNumber!==i.endLineNumber&&(g=!0),f[a]=new e.iu(i,"")}return[g,f]}static getDeleteRightRange(a,b,c){if(!a.isEmpty())return a;let d=a.getPosition(),e=h.I.right(c,b,d);if(c.trimWhitespaceOnDelete&&e.lineNumber!==d.lineNumber){let a=b.getLineFirstNonWhitespaceColumn(d.lineNumber)>0,c=b.getLineFirstNonWhitespaceColumn(e.lineNumber);if(a&&c>0)return new i.Q(e.lineNumber,c,d.lineNumber,d.column)}return new i.Q(e.lineNumber,e.column,d.lineNumber,d.column)}static isAutoClosingPairDelete(a,b,c,d,e,g,h){if("never"===b&&"never"===c||"never"===a)return!1;for(let i=0,j=g.length;i<j;i++){let j=g[i],k=j.getPosition();if(!j.isEmpty())return!1;let l=e.getLineContent(k.lineNumber);if(k.column<2||k.column>=l.length+1)return!1;let m=l.charAt(k.column-2),n=d.get(m);if(!n)return!1;if((0,f.vG)(m)){if("never"===c)return!1}else if("never"===b)return!1;let o=l.charAt(k.column-1),p=!1;for(let a of n)a.open===m&&a.close===o&&(p=!0);if(!p)return!1;if("auto"===a){let a=!1;for(let b=0,c=h.length;b<c;b++){let c=h[b];if(k.lineNumber===c.startLineNumber&&k.column===c.startColumn){a=!0;break}}if(!a)return!1}}return!0}static _runAutoClosingPairDelete(a,b,c){let d=[];for(let a=0,b=c.length;a<b;a++){let b=c[a].getPosition(),f=new i.Q(b.lineNumber,b.column-1,b.lineNumber,b.column+1);d[a]=new e.iu(f,"")}return[!0,d]}static deleteLeft(a,b,c,d,f){if(this.isAutoClosingPairDelete(b.autoClosingDelete,b.autoClosingBrackets,b.autoClosingQuotes,b.autoClosingPairs.autoClosingPairsOpenByEnd,c,d,f))return this._runAutoClosingPairDelete(b,c,d);let g=[],h=2!==a;for(let a=0,f=d.length;a<f;a++){let f=k.getDeleteLeftRange(d[a],c,b);if(f.isEmpty()){g[a]=null;continue}f.startLineNumber!==f.endLineNumber&&(h=!0),g[a]=new e.iu(f,"")}return[h,g]}static getDeleteLeftRange(a,b,c){if(!a.isEmpty())return a;let e=a.getPosition();if(c.useTabStops&&e.column>1){let a=b.getLineContent(e.lineNumber),f=(0,d.HG)(a),h=-1===f?a.length+1:f+1;if(e.column<=h){let a=c.visibleColumnFromColumn(b,e),d=g.A.prevIndentTabStop(a,c.indentSize),f=c.columnFromVisibleColumn(b,e.lineNumber,d);return new i.Q(e.lineNumber,f,e.lineNumber,e.column)}}return i.Q.fromPositions(k.getPositionAfterDeleteLeft(e,b),e)}static getPositionAfterDeleteLeft(a,b){if(a.column>1){let c=(0,d.Wd)(a.column-1,b.getLineContent(a.lineNumber));return a.with(void 0,c+1)}if(!(a.lineNumber>1))return a;{let c=a.lineNumber-1;return new j.y(c,b.getLineMaxColumn(c))}}static cut(a,b,c){let d=[],g=null;c.sort((a,b)=>j.y.compare(a.getStartPosition(),b.getEndPosition()));for(let f=0,h=c.length;f<h;f++){let h=c[f];if(h.isEmpty())if(a.emptySelectionClipboard){let a,c,j,k,l=h.getPosition();l.lineNumber<b.getLineCount()?(a=l.lineNumber,c=1,j=l.lineNumber+1,k=1):(l.lineNumber>1&&g?.endLineNumber!==l.lineNumber?(a=l.lineNumber-1,c=b.getLineMaxColumn(l.lineNumber-1)):(a=l.lineNumber,c=1),j=l.lineNumber,k=b.getLineMaxColumn(l.lineNumber));let m=new i.Q(a,c,j,k);g=m,m.isEmpty()?d[f]=null:d[f]=new e.iu(m,"")}else d[f]=null;else d[f]=new e.iu(h,"")}return new f.vY(0,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},45719:(a,b,c)=>{"use strict";c.d(b,{$H:()=>f,Lh:()=>g,r3:()=>e});var d=c(36036);let e=new class{clone(){return this}equals(a){return this===a}};function f(a,b){return new d.$M([new d.ou(0,"",a)],b)}function g(a,b){let c=new Uint32Array(2);return c[0]=0,c[1]=(0x2008000|a)>>>0,new d.rY(c,[],null===b?e:b)}},46547:(a,b,c)=>{"use strict";c.d(b,{Fd:()=>l,Gy:()=>i,Pz:()=>k,Yf:()=>j,lR:()=>p,zy:()=>o});var d=c(95091),e=c(76631),f=c(58254),g=c(29498),h=c(98030);let i=(0,f.u1)("themeService");function j(a){return{id:a}}function k(a){switch(a){case h.zM.DARK:return h.X2.VS_DARK;case h.zM.HIGH_CONTRAST_DARK:return h.X2.HC_BLACK;case h.zM.HIGH_CONTRAST_LIGHT:return h.X2.HC_LIGHT;default:return h.X2.VS}}let l={ThemingContribution:"base.contributions.theming"};class m extends e.jG{constructor(){super(),this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=this._register(new d.vl)}onColorThemeChange(a){return this.themingParticipants.push(a),this.onThemingParticipantAddedEmitter.fire(a),(0,e.s)(()=>{let b=this.themingParticipants.indexOf(a);this.themingParticipants.splice(b,1)})}getThemingParticipants(){return this.themingParticipants}}let n=new m;function o(a){return n.onColorThemeChange(a)}g.O.add(l.ThemingContribution,n);class p extends e.jG{constructor(a){super(),this.themeService=a,this.theme=a.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(a=>this.onThemeChange(a)))}onThemeChange(a){this.theme=a,this.updateStyles()}updateStyles(){}}},46742:()=>{},46857:(a,b,c)=>{"use strict";c.d(b,{P:()=>h,$:()=>i});var d=c(47322);let e=new WeakMap;class f{static getSameOriginWindowChain(a){let b=e.get(a);if(!b){let c;b=[],e.set(a,b);let d=a;do(c=function(a){if(!a.parent||a.parent===a)return null;try{let b=a.location,c=a.parent.location;if("null"!==b.origin&&"null"!==c.origin&&b.origin!==c.origin)return null}catch(a){return null}return a.parent}(d))?b.push({window:new WeakRef(d),iframeElement:d.frameElement||null}):b.push({window:new WeakRef(d),iframeElement:null}),d=c;while(d)}return b.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(a,b){if(!b||a===b)return{top:0,left:0};let c=0,d=0;for(let e of this.getSameOriginWindowChain(a)){let a=e.window.deref();if(c+=a?.scrollY??0,d+=a?.scrollX??0,a===b||!e.iframeElement)break;let f=e.iframeElement.getBoundingClientRect();c+=f.top,d+=f.left}return{top:c,left:d}}}var g=c(18216);class h{constructor(a,b){this.timestamp=Date.now(),this.browserEvent=b,this.leftButton=0===b.button,this.middleButton=1===b.button,this.rightButton=2===b.button,this.buttons=b.buttons,this.defaultPrevented=b.defaultPrevented,this.target=b.target,this.detail=b.detail||1,"dblclick"===b.type&&(this.detail=2),this.ctrlKey=b.ctrlKey,this.shiftKey=b.shiftKey,this.altKey=b.altKey,this.metaKey=b.metaKey,this.posx=b.pageX,this.posy=b.pageY;const c=f.getPositionOfChildWindowRelativeToAncestorWindow(a,b.view);this.posx-=c.left,this.posy-=c.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class i{constructor(a,b=0,c=0){this.browserEvent=a||null,this.target=a?a.target||a.targetNode||a.srcElement:null,this.deltaY=c,this.deltaX=b;let e=!1;if(d.H8){const a=navigator.userAgent.match(/Chrome\/(\d+)/);e=(a?parseInt(a[1]):123)<=122}if(a){const b=a.view?.devicePixelRatio||1;void 0!==a.wheelDeltaY?e?this.deltaY=a.wheelDeltaY/(120*b):this.deltaY=a.wheelDeltaY/120:void 0!==a.VERTICAL_AXIS&&a.axis===a.VERTICAL_AXIS?this.deltaY=-a.detail/3:"wheel"===a.type&&(a.deltaMode===a.DOM_DELTA_LINE?d.gm&&!g.zx?this.deltaY=-a.deltaY/3:this.deltaY=-a.deltaY:this.deltaY=-a.deltaY/40),void 0!==a.wheelDeltaX?d.nr&&g.uF?this.deltaX=-(a.wheelDeltaX/120):e?this.deltaX=a.wheelDeltaX/(120*b):this.deltaX=a.wheelDeltaX/120:void 0!==a.HORIZONTAL_AXIS&&a.axis===a.HORIZONTAL_AXIS?this.deltaX=-a.detail/3:"wheel"===a.type&&(a.deltaMode===a.DOM_DELTA_LINE?d.gm&&!g.zx?this.deltaX=-a.deltaX/3:this.deltaX=-a.deltaX:this.deltaX=-a.deltaX/40),0===this.deltaY&&0===this.deltaX&&a.wheelDelta&&(e?this.deltaY=a.wheelDelta/(120*b):this.deltaY=a.wheelDelta/120)}}preventDefault(){this.browserEvent?.preventDefault()}stopPropagation(){this.browserEvent?.stopPropagation()}}},47309:(a,b,c)=>{"use strict";c.d(b,{f:()=>d});var d,e=c(85214);!function(a){function b(a){return!!a&&"object"==typeof a&&"function"==typeof a[Symbol.iterator]}a.is=b;let c=Object.freeze([]);function*d(a){yield a}a.empty=function(){return c},a.single=d,a.wrap=function(a){return b(a)?a:d(a)},a.from=function(a){return a??c},a.reverse=function*(a){for(let b=a.length-1;b>=0;b--)yield a[b]},a.isEmpty=function(a){return!a||!0===a[Symbol.iterator]().next().done},a.first=function(a){return a[Symbol.iterator]().next().value},a.some=function(a,b){let c=0;for(let d of a)if(b(d,c++))return!0;return!1},a.every=function(a,b){let c=0;for(let d of a)if(!b(d,c++))return!1;return!0},a.find=function(a,b){for(let c of a)if(b(c))return c},a.filter=function*(a,b){for(let c of a)b(c)&&(yield c)},a.map=function*(a,b){let c=0;for(let d of a)yield b(d,c++)},a.flatMap=function*(a,b){let c=0;for(let d of a)yield*b(d,c++)},a.concat=function*(...a){for(let b of a)(0,e.xZ)(b)?yield*b:yield b},a.reduce=function(a,b,c){let d=c;for(let c of a)d=b(d,c);return d},a.length=function(a){let b=0;for(let c of a)b++;return b},a.slice=function*(a,b,c=a.length){for(b<-a.length&&(b=0),b<0&&(b+=a.length),c<0?c+=a.length:c>a.length&&(c=a.length);b<c;b++)yield a[b]},a.consume=function(b,c=1/0){let d=[];if(0===c)return[d,b];let e=b[Symbol.iterator]();for(let b=0;b<c;b++){let b=e.next();if(b.done)return[d,a.empty()];d.push(b.value)}return[d,{[Symbol.iterator]:()=>e}]},a.asyncToArray=async function(a){let b=[];for await(let c of a)b.push(c);return b},a.asyncToArrayFlat=async function(a){let b=[];for await(let c of a)b=b.concat(c);return b}}(d||(d={}))},47322:(a,b,c)=>{"use strict";c.d(b,{Dy:()=>f,H8:()=>k,HT:()=>p,Tc:()=>j,c8:()=>m,gm:()=>i,m0:()=>n,nr:()=>l,pR:()=>g});var d=c(27612);class e{constructor(){this.mapWindowIdToZoomFactor=new Map}static{this.INSTANCE=new e}getZoomFactor(a){return this.mapWindowIdToZoomFactor.get(this.getWindowId(a))??1}getWindowId(a){return a.vscodeWindowId}}function f(a,b,c){"string"==typeof b&&(b=a.matchMedia(b)),b.addEventListener("change",c)}function g(a){return e.INSTANCE.getZoomFactor(a)}let h=navigator.userAgent,i=h.indexOf("Firefox")>=0,j=h.indexOf("AppleWebKit")>=0,k=h.indexOf("Chrome")>=0,l=!k&&h.indexOf("Safari")>=0,m=!k&&!l&&j;h.indexOf("Electron/");let n=h.indexOf("Android")>=0,o=!1;if("function"==typeof d.G.matchMedia){let a=d.G.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),b=d.G.matchMedia("(display-mode: fullscreen)");o=a.matches,f(d.G,a,({matches:a})=>{o&&b.matches||(o=a)})}function p(){return globalThis.MonacoEnvironment}},47339:(a,b,c)=>{"use strict";c.d(b,{e:()=>f,i:()=>g});var d=c(76631);let e={showInstantHover:()=>void 0,showDelayedHover:()=>void 0,setupDelayedHover:()=>d.jG.None,setupDelayedHoverAtMouse:()=>d.jG.None,hideHover:()=>void 0,showAndFocusLastHover:()=>void 0,setupManagedHover:()=>({dispose:()=>void 0,show:()=>void 0,hide:()=>void 0,update:()=>void 0}),showManagedHover:()=>void 0};function f(a){e=a}function g(){return e}},48409:(a,b,c)=>{"use strict";c.d(b,{R$:()=>n,_k:()=>p,m2:()=>i,pS:()=>m,pz:()=>q,sA:()=>k});var d=c(53072),e=c(26529),f=c(63060);let g=RegExp(`\\$\\(${f.L.iconNameExpression}(?:${f.L.iconModifierExpression})?\\)`,"g"),h=RegExp(`(\\\\)?${g.source}`,"g");function i(a){return a.replace(h,(a,b)=>b?a:`\\${a}`)}let j=RegExp(`\\\\${g.source}`,"g");function k(a){return a.replace(j,a=>`\\${a}`)}let l=RegExp(`(\\s)?(\\\\)?${g.source}(\\s)?`,"g");function m(a){return -1===a.indexOf("$(")?a:a.replace(l,(a,b,c,d)=>c?a:b||d||"")}function n(a){return a?a.replace(/\$\((.*?)\)/g,(a,b)=>` ${b} `).trim():""}let o=RegExp(`\\$\\(${f.L.iconNameCharacter}+\\)`,"g");function p(a){o.lastIndex=0;let b="",c=[],d=0;for(;;){let e=o.lastIndex,f=o.exec(a),g=a.substring(e,f?.index);if(g.length>0){b+=g;for(let a=0;a<g.length;a++)c.push(d)}if(!f)break;d+=f[0].length}return{text:b,iconOffsets:c}}function q(a,b,c=!1){let{text:f,iconOffsets:g}=b;if(!g||0===g.length)return(0,d.yr)(a,f,c);let h=(0,e.NB)(f," "),i=f.length-h.length,j=(0,d.yr)(a,h,c);if(j)for(let a of j){let b=g[a.start+i]+i;a.start+=b,a.end+=b}return j}},48580:(a,b,c)=>{"use strict";c.d(b,{MF:()=>o,d$:()=>n,mG:()=>r,vG:()=>t,vY:()=>s});var d=c(6812),e=c(61822),f=c(77509),g=c(99807),h=c(18530),i=c(64687),j=c(16240);let k=()=>!0,l=()=>!1,m=a=>" "===a||" "===a;class n{static shouldRecreate(a){return a.hasChanged(165)||a.hasChanged(148)||a.hasChanged(45)||a.hasChanged(85)||a.hasChanged(88)||a.hasChanged(89)||a.hasChanged(10)||a.hasChanged(11)||a.hasChanged(15)||a.hasChanged(13)||a.hasChanged(14)||a.hasChanged(20)||a.hasChanged(145)||a.hasChanged(141)||a.hasChanged(59)||a.hasChanged(104)||a.hasChanged(147)||a.hasChanged(93)}constructor(a,b,c,d){this.languageConfigurationService=d,this._cursorMoveConfigurationBrand=void 0,this._languageId=a;const e=c.options,f=e.get(165),g=e.get(59);this.readOnly=e.get(104),this.tabSize=b.tabSize,this.indentSize=b.indentSize,this.insertSpaces=b.insertSpaces,this.stickyTabStops=e.get(132),this.lineHeight=g.lineHeight,this.typicalHalfwidthCharacterWidth=g.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(f.height/this.lineHeight)-2),this.useTabStops=e.get(145),this.trimWhitespaceOnDelete=e.get(141),this.wordSeparators=e.get(148),this.emptySelectionClipboard=e.get(45),this.copyWithSyntaxHighlighting=e.get(31),this.multiCursorMergeOverlapping=e.get(85),this.multiCursorPaste=e.get(88),this.multiCursorLimit=e.get(89),this.autoClosingBrackets=e.get(10),this.autoClosingComments=e.get(11),this.autoClosingQuotes=e.get(15),this.autoClosingDelete=e.get(13),this.autoClosingOvertype=e.get(14),this.autoSurround=e.get(20),this.autoIndent=e.get(16),this.wordSegmenterLocales=e.get(147),this.overtypeOnPaste=e.get(93),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(a,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(a,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(a,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(a).getAutoClosingPairs();const h=this.languageConfigurationService.getLanguageConfiguration(a).getSurroundingPairs();if(h)for(const a of h)this.surroundingPairs[a.open]=a.close;const i=this.languageConfigurationService.getLanguageConfiguration(a).comments;this.blockCommentStartToken=i?.blockCommentStartToken??null}get electricChars(){if(!this._electricChars){this._electricChars={};let a=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter?.getElectricCharacters();if(a)for(let b of a)this._electricChars[b]=!0}return this._electricChars}get inputMode(){return j.U.getInputMode()}onElectricCharacter(a,b,c){let d=(0,g.BQ)(b,c-1),e=this.languageConfigurationService.getLanguageConfiguration(d.languageId).electricCharacter;return e?e.onElectricCharacter(a,d,c-d.firstCharOffset):null}normalizeIndentation(a){return(0,i.P)(a,this.indentSize,this.insertSpaces)}_getShouldAutoClose(a,b,c){switch(b){case"beforeWhitespace":return m;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(a,c);case"always":return k;case"never":return l}}_getLanguageDefinedShouldAutoClose(a,b){let c=this.languageConfigurationService.getLanguageConfiguration(a).getAutoCloseBeforeSet(b);return a=>-1!==c.indexOf(a)}visibleColumnFromColumn(a,b){return h.A.visibleColumnFromColumn(a.getLineContent(b.lineNumber),b.column,this.tabSize)}columnFromVisibleColumn(a,b,c){let d=h.A.columnFromVisibleColumn(a.getLineContent(b),c,this.tabSize),e=a.getLineMinColumn(b);if(d<e)return e;let f=a.getLineMaxColumn(b);return d>f?f:d}}class o{static fromModelState(a){return new p(a)}static fromViewState(a){return new q(a)}static fromModelSelection(a){let b=f.L.liftSelection(a),c=new r(e.Q.fromPositions(b.getSelectionStart()),0,0,b.getPosition(),0);return o.fromModelState(c)}static fromModelSelections(a){let b=[];for(let c=0,d=a.length;c<d;c++)b[c]=this.fromModelSelection(a[c]);return b}constructor(a,b){this._cursorStateBrand=void 0,this.modelState=a,this.viewState=b}equals(a){return this.viewState.equals(a.viewState)&&this.modelState.equals(a.modelState)}}class p{constructor(a){this.modelState=a,this.viewState=null}}class q{constructor(a){this.modelState=null,this.viewState=a}}class r{constructor(a,b,c,d,e){this.selectionStart=a,this.selectionStartKind=b,this.selectionStartLeftoverVisibleColumns=c,this.position=d,this.leftoverVisibleColumns=e,this._singleCursorStateBrand=void 0,this.selection=r._computeSelection(this.selectionStart,this.position)}equals(a){return this.selectionStartLeftoverVisibleColumns===a.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===a.leftoverVisibleColumns&&this.selectionStartKind===a.selectionStartKind&&this.position.equals(a.position)&&this.selectionStart.equalsRange(a.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(a,b,c,f){return a?new r(this.selectionStart,this.selectionStartKind,this.selectionStartLeftoverVisibleColumns,new d.y(b,c),f):new r(new e.Q(b,c,b,c),0,f,new d.y(b,c),f)}static _computeSelection(a,b){return a.isEmpty()||!b.isBeforeOrEqual(a.getStartPosition())?f.L.fromPositions(a.getStartPosition(),b):f.L.fromPositions(a.getEndPosition(),b)}}class s{constructor(a,b,c){this._editOperationResultBrand=void 0,this.type=a,this.commands=b,this.shouldPushStackElementBefore=c.shouldPushStackElementBefore,this.shouldPushStackElementAfter=c.shouldPushStackElementAfter}}function t(a){return"'"===a||'"'===a||"`"===a}},48727:(a,b,c)=>{"use strict";var d=c(72816),e=c(37327),f=c(34183),g=c(11023),h=c(40563);(0,e.x1)("charts.foreground",f.CU,(0,d.kg)(1857,"The foreground color used in charts.")),(0,e.x1)("charts.lines",(0,e.JO)(f.CU,.5),(0,d.kg)(1858,"The color used for horizontal lines in charts.")),(0,e.x1)("charts.red",g.Rb,(0,d.kg)(1859,"The red color used in chart visualizations.")),(0,e.x1)("charts.blue",g.pO,(0,d.kg)(1860,"The blue color used in chart visualizations.")),(0,e.x1)("charts.yellow",g.Hn,(0,d.kg)(1861,"The yellow color used in chart visualizations.")),(0,e.x1)("charts.orange",h.Aj,(0,d.kg)(1862,"The orange color used in chart visualizations.")),(0,e.x1)("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},(0,d.kg)(1863,"The green color used in chart visualizations.")),(0,e.x1)("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,d.kg)(1864,"The purple color used in chart visualizations."))},49128:(a,b,c)=>{"use strict";c.d(b,{$:()=>s});var d=c(75082),e=c(62677),f=c(31299),g=c(34793),h=c(89191),i=c(34349),j=c(55404),k=c(95091),l=c(54469),m=c(76631),n=c(63060);c(73515);var o=c(47339),p=c(23975);j.Q1.white.toString(),j.Q1.white.toString();let q=Object.freeze({allowedTags:{override:["b","i","u","code","span"]},allowedAttributes:{override:["class"]}}),r=Object.freeze({sanitizerConfig:{allowedAttributes:{override:["class"]}}});class s extends m.jG{get onDidClick(){return this._onDidClick.event}constructor(a,b){super(),this._label="",this._onDidClick=this._register(new k.vl),this._onDidEscape=this._register(new k.vl),this.options=b,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!b.secondary),this._element.classList.toggle("small",!!b.small);const c=b.secondary?b.buttonSecondaryBackground:b.buttonBackground,f=b.secondary?b.buttonSecondaryForeground:b.buttonForeground,h=b.secondary?b.buttonSecondaryBorder:b.buttonBorder;this._element.style.color=f||"",this._element.style.backgroundColor=c||"",h&&(this._element.style.border=`1px solid ${h}`),b.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),"string"==typeof b.title&&this.setTitle(b.title),"string"==typeof b.ariaLabel&&this._element.setAttribute("aria-label",b.ariaLabel),a.appendChild(this._element),this.enabled=!b.disabled,this._register(g.q.addTarget(this._element)),[d.Bx.CLICK,g.B.Tap].forEach(a=>{this._register((0,d.ko)(this._element,a,a=>{this.enabled?this._onDidClick.fire(a):d.fs.stop(a)}))}),this._register((0,d.ko)(this._element,d.Bx.KEY_DOWN,a=>{let b=new e.Z(a),c=!1;this.enabled&&(b.equals(3)||b.equals(10))?(this._onDidClick.fire(a),c=!0):b.equals(9)&&(this._onDidEscape.fire(a),this._element.blur(),c=!0),c&&d.fs.stop(b,!0)})),this._register((0,d.ko)(this._element,d.Bx.MOUSE_OVER,a=>{this._element.classList.contains("disabled")||this.updateStyles(!0)})),this._register((0,d.ko)(this._element,d.Bx.MOUSE_OUT,a=>{this.updateStyles(!1)})),this.focusTracker=this._register((0,d.w5)(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateStyles(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateStyles(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(a){let b=[];for(let c of(0,i.n)(a))if("string"==typeof c){if(""===(c=c.trim()))continue;let a=document.createElement("span");a.textContent=c,b.push(a)}else b.push(c);return b}updateStyles(a){let b,c,d;this.options.secondary?(b=a?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground,c=this.options.buttonSecondaryForeground,d=this.options.buttonSecondaryBorder):(b=a?this.options.buttonHoverBackground:this.options.buttonBackground,c=this.options.buttonForeground,d=this.options.buttonBorder),this._element.style.backgroundColor=b||"",this._element.style.color=c||"",this._element.style.border=d?`1px solid ${d}`:""}get element(){return this._element}set label(a){if(this._label===a||(0,l.VS)(this._label)&&(0,l.VS)(a)&&(0,l.nK)(this._label,a))return;this._element.classList.add("monaco-text-button");let b=this.options.supportShortLabel?this._labelElement:this._element;if((0,l.VS)(a)){let c=(0,f.Gc)(a,r,document.createElement("span"));c.dispose();let e=c.element.querySelector("p")?.innerHTML;e?(0,p.D$)(b,e,q):(0,d.Ln)(b)}else this.options.supportIcons?(0,d.Ln)(b,...this.getContentElements(a)):b.textContent=a;let c="";"string"==typeof this.options.title?c=this.options.title:this.options.title&&(c=(0,f.Mh)(a)),this.setTitle(c),this._setAriaLabel(),this._label=a}get label(){return this._label}_setAriaLabel(){"string"==typeof this.options.ariaLabel?this._element.setAttribute("aria-label",this.options.ariaLabel):"string"==typeof this.options.title&&this._element.setAttribute("aria-label",this.options.title)}set icon(a){this._setAriaLabel();let b=Array.from(this._element.classList).filter(a=>a.startsWith("codicon-"));this._element.classList.remove(...b),this._element.classList.add(...n.L.asClassNameArray(a))}set enabled(a){a?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}set secondary(a){this._element.classList.toggle("secondary",a),this.options.secondary=a,this.updateStyles(!1)}setTitle(a){this._hover||""===a?this._hover&&this._hover.update(a):this._hover=this._register((0,o.i)().setupManagedHover(this.options.hoverDelegate??(0,h.nZ)("element"),this._element,a))}}},49540:()=>{},49679:(a,b,c)=>{"use strict";c.d(b,{_:()=>d});let d={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},49852:()=>{},50157:()=>{},50179:(a,b,c)=>{"use strict";c.d(b,{J:()=>f,U:()=>e});var d=c(58254);let e=(0,d.u1)("textResourceConfigurationService"),f=(0,d.u1)("textResourcePropertiesService")},50411:(a,b,c)=>{"use strict";let d,e,f;c.d(b,{Su:()=>l,b7:()=>k,fe:()=>m});var g=c(26529),h=c(18216),i=c(15053);function j(){return d||(d=new TextDecoder("UTF-16LE")),d}function k(){return f||(f=(0,h.cm)()?j():(e||(e=new TextDecoder("UTF-16BE")),e)),f}function l(a,b,c){let d=new Uint16Array(a.buffer,b,c);return c>0&&(65279===d[0]||65534===d[0])?function(a,b,c){let d=[],e=0;for(let f=0;f<c;f++){let c=(0,i.$l)(a,b);b+=2,d[e++]=String.fromCharCode(c)}return d.join("")}(a,b,c):j().decode(d)}class m{constructor(a){this._capacity=0|a,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";let a=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return k().decode(a)}_flushBuffer(){let a=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[a]:this._completedStrings[this._completedStrings.length]=a}appendCharCode(a){let b=this._capacity-this._bufferLength;b<=1&&(0===b||(0,g.pc)(a))&&this._flushBuffer(),this._buffer[this._bufferLength++]=a}appendASCIICharCode(a){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=a}appendString(a){let b=a.length;if(this._bufferLength+b>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=a;return}for(let c=0;c<b;c++)this._buffer[this._bufferLength++]=a.charCodeAt(c)}}},50498:(a,b,c)=>{"use strict";c.d(b,{B6:()=>e,Fd:()=>s,P8:()=>p,iZ:()=>t,n4:()=>o,o1:()=>u,pD:()=>q,uJ:()=>r});var d,e,f=c(6015),g=c(77497),h=c(30996),i=c(18216),j=c(26529),k=c(54957);function l(a){return(0,k.I)(a,!0)}class m{constructor(a){this._ignorePathCasing=a}compare(a,b,c=!1){return a===b?0:(0,j.UD)(this.getComparisonKey(a,c),this.getComparisonKey(b,c))}isEqual(a,b,c=!1){return a===b||!!a&&!!b&&this.getComparisonKey(a,c)===this.getComparisonKey(b,c)}getComparisonKey(a,b=!1){return a.with({path:this._ignorePathCasing(a)?a.path.toLowerCase():void 0,fragment:b?null:void 0}).toString()}isEqualOrParent(a,b,c=!1){if(a.scheme===b.scheme){if(a.scheme===g.ny.file)return(0,f._1)(l(a),l(b),this._ignorePathCasing(a))&&a.query===b.query&&(c||a.fragment===b.fragment);if(v(a.authority,b.authority))return(0,f._1)(a.path,b.path,this._ignorePathCasing(a),!0)&&a.query===b.query&&(c||a.fragment===b.fragment)}return!1}joinPath(a,...b){return k.r.joinPath(a,...b)}basenameOrAuthority(a){return p(a)||a.authority}basename(a,b){return h.SA.basename(a.path,b)}extname(a){return h.SA.extname(a.path)}dirname(a){let b;return 0===a.path.length?a:(a.scheme===g.ny.file?b=k.r.file((0,h.pD)(l(a))).path:(b=h.SA.dirname(a.path),a.authority&&b.length&&47!==b.charCodeAt(0)&&(console.error(`dirname("${a.toString})) resulted in a relative path`),b="/")),a.with({path:b}))}normalizePath(a){let b;return a.path.length?(b=a.scheme===g.ny.file?k.r.file((0,h.S8)(l(a))).path:h.SA.normalize(a.path),a.with({path:b})):a}relativePath(a,b){if(a.scheme!==b.scheme||!v(a.authority,b.authority))return;if(a.scheme===g.ny.file){let c=(0,h.V8)(l(a),l(b));return i.uF?(0,f.TH)(c):c}let c=a.path||"/",d=b.path||"/";if(this._ignorePathCasing(a)){let a=0;for(let b=Math.min(c.length,d.length);a<b&&(c.charCodeAt(a)===d.charCodeAt(a)||c.charAt(a).toLowerCase()===d.charAt(a).toLowerCase());a++);c=d.substr(0,a)+c.substr(a)}return h.SA.relative(c,d)}resolvePath(a,b){if(a.scheme===g.ny.file){let c=k.r.file((0,h.hd)(l(a),b));return a.with({authority:c.authority,path:c.path})}return b=(0,f.kb)(b),a.with({path:h.SA.resolve(a.path,b)})}isAbsolutePath(a){return!!a.path&&"/"===a.path[0]}isEqualAuthority(a,b){return a===b||void 0!==a&&void 0!==b&&(0,j.Q_)(a,b)}hasTrailingPathSeparator(a,b=h.Vn){if(a.scheme===g.ny.file){let c=l(a);return c.length>(0,f.Zn)(c).length&&c[c.length-1]===b}{let b=a.path;return b.length>1&&47===b.charCodeAt(b.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(a.fsPath)}}removeTrailingPathSeparator(a,b=h.Vn){return w(a,b)?a.with({path:a.path.substr(0,a.path.length-1)}):a}addTrailingPathSeparator(a,b=h.Vn){let c=!1;if(a.scheme===g.ny.file){let d=l(a);c=void 0!==d&&d.length===(0,f.Zn)(d).length&&d[d.length-1]===b}else{b="/";let d=a.path;c=1===d.length&&47===d.charCodeAt(d.length-1)}return c||w(a,b)?a:a.with({path:a.path+"/"})}}let n=new m(()=>!1),o=n.isEqual.bind(n);n.isEqualOrParent.bind(n),n.getComparisonKey.bind(n),n.basenameOrAuthority.bind(n);let p=n.basename.bind(n);n.extname.bind(n);let q=n.dirname.bind(n),r=n.joinPath.bind(n),s=n.normalizePath.bind(n),t=n.relativePath.bind(n),u=n.resolvePath.bind(n);n.isAbsolutePath.bind(n);let v=n.isEqualAuthority.bind(n),w=n.hasTrailingPathSeparator.bind(n);n.removeTrailingPathSeparator.bind(n),n.addTrailingPathSeparator.bind(n),(d=e||(e={})).META_DATA_LABEL="label",d.META_DATA_DESCRIPTION="description",d.META_DATA_SIZE="size",d.META_DATA_MIME="mime",d.parseMetaData=function(a){let b=new Map;a.path.substring(a.path.indexOf(";")+1,a.path.lastIndexOf(";")).split(";").forEach(a=>{let[c,d]=a.split(":");c&&d&&b.set(c,d)});let c=a.path.substring(0,a.path.indexOf(";"));return c&&b.set(d.META_DATA_MIME,c),b}},50527:(a,b,c)=>{"use strict";c.d(b,{_q:()=>f,ew:()=>d,xC:()=>e});class d{constructor(a,b){this.width=a,this.height=b,this.array=[],this.array=Array(a*b)}get(a,b){return this.array[a+b*this.width]}set(a,b,c){this.array[a+b*this.width]=c}}function e(a){return 32===a||9===a}class f{static{this.chrKeys=new Map}static getKey(a){let b=this.chrKeys.get(a);return void 0===b&&(b=this.chrKeys.size,this.chrKeys.set(a,b)),b}constructor(a,b,c){this.range=a,this.lines=b,this.source=c,this.histogram=[];let d=0;for(let c=a.startLineNumber-1;c<a.endLineNumberExclusive-1;c++){const a=b[c];for(let b=0;b<a.length;b++){d++;const c=a[b],e=f.getKey(c);this.histogram[e]=(this.histogram[e]||0)+1}d++;const e=f.getKey("\n");this.histogram[e]=(this.histogram[e]||0)+1}this.totalCount=d}computeSimilarity(a){let b=0,c=Math.max(this.histogram.length,a.histogram.length);for(let d=0;d<c;d++)b+=Math.abs((this.histogram[d]??0)-(a.histogram[d]??0));return 1-b/(this.totalCount+a.totalCount)}}},50661:(a,b,c)=>{"use strict";c.d(b,{t:()=>d});let d=(0,c(58254).u1)("treeSitterLibraryService")},50702:(a,b,c)=>{"use strict";c.d(b,{CG:()=>e,gO:()=>g});var d=c(18216);function e(a,b){var c,e;if(d.HZ)return!1;let g=(c=a,(e=b)||(e=f(c)),"native"===e),h=a.getValue("window");return h?.menuStyle==="native"?!!d.zx||!!g:h?.menuStyle!=="custom"&&g}function f(a){if(d.HZ)return"custom";let b=a.getValue("window");if(b){if(d.zx&&!0===b.nativeTabs||d.zx&&!1===b.nativeFullScreen)return"native";let a=b.titleBarStyle;if("native"===a||"custom"===a)return a}return"custom"}function g(a){if(d.HZ||d.zx||"native"===f(a))return"native";let b=a.getValue("window"),c=b?.controlsStyle;return"custom"===c||"hidden"===c?c:"native"}},50924:()=>{},51027:(a,b,c)=>{"use strict";c.d(b,{BG:()=>f,IO:()=>h,Y:()=>g,eh:()=>e,pj:()=>j,qN:()=>i});class d{constructor(a,b){this._restrictedRenderingContextBrand=void 0,this._viewLayout=a,this.viewportData=b,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const c=this._viewLayout.getCurrentViewport();this.scrollTop=c.top,this.scrollLeft=c.left,this.viewportWidth=c.width,this.viewportHeight=c.height}getScrolledTopFromAbsoluteTop(a){return a-this.scrollTop}getVerticalOffsetForLineNumber(a,b){return this._viewLayout.getVerticalOffsetForLineNumber(a,b)}getVerticalOffsetAfterLineNumber(a,b){return this._viewLayout.getVerticalOffsetAfterLineNumber(a,b)}getLineHeightForLineNumber(a){return this._viewLayout.getLineHeightForLineNumber(a)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class e extends d{constructor(a,b,c,d){super(a,b),this._renderingContextBrand=void 0,this._viewLines=c,this._viewLinesGpu=d}linesVisibleRangesForRange(a,b){let c=this._viewLines.linesVisibleRangesForRange(a,b);if(!this._viewLinesGpu)return c;let d=this._viewLinesGpu.linesVisibleRangesForRange(a,b);return c?d?c.concat(d).sort((a,b)=>a.lineNumber-b.lineNumber):c:d}visibleRangeForPosition(a){return this._viewLines.visibleRangeForPosition(a)??this._viewLinesGpu?.visibleRangeForPosition(a)??null}}class f{constructor(a,b,c,d){this.outsideRenderedLine=a,this.lineNumber=b,this.ranges=c,this.continuesOnNextLine=d}}class g{static from(a){let b=Array(a.length);for(let c=0,d=a.length;c<d;c++){let d=a[c];b[c]=new g(d.left,d.width)}return b}constructor(a,b){this._horizontalRangeBrand=void 0,this.left=Math.round(a),this.width=Math.round(b)}toString(){return`[${this.left},${this.width}]`}}class h{constructor(a,b){this._floatHorizontalRangeBrand=void 0,this.left=a,this.width=b}toString(){return`[${this.left},${this.width}]`}static compare(a,b){return a.left-b.left}}class i{constructor(a,b){this.outsideRenderedLine=a,this.originalLeft=b,this.left=Math.round(this.originalLeft)}}class j{constructor(a,b){this.outsideRenderedLine=a,this.ranges=b}}},51262:(a,b,c)=>{"use strict";c.d(b,{TN:()=>j,iM:()=>l});var d,e=c(31299),f=c(66036),g=c(55241),h=c(58254),i=c(21398);let j=(0,h.u1)("markdownRendererService"),k=class{constructor(a){this._openerService=a}render(a,b,c){let d={...b};d.actionHandler||(d.actionHandler=(a,b)=>l(this._openerService,a,b.isTrusted)),d.codeBlockRenderer||(d.codeBlockRenderer=(a,b)=>this._defaultCodeBlockRenderer?.renderCodeBlock(a,b,d??{})??Promise.resolve(document.createElement("span")));let f=(0,e.Gc)(a,d,c);return f.element.classList.add("rendered-markdown"),f}setDefaultCodeBlockRenderer(a){this._defaultCodeBlockRenderer=a}};async function l(a,b,c,d){try{var e;return await a.open(b,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:(e=c,!0===e||!!(e&&Array.isArray(e.enabledCommands))&&e.enabledCommands),skipValidation:d})}catch(a){return(0,f.dz)(a),!1}}k=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([(d=i.Cr,function(a,b){d(a,b,0)})],k),(0,g.v)(j,k,1)},52132:(a,b,c)=>{"use strict";function d(a,b){return a}c.d(b,{b:()=>d}),c(94484),c(6963)},52491:(a,b,c)=>{"use strict";c.d(b,{F:()=>g});var d=c(95091),e=c(76631),f=c(29498);let g={JSONContribution:"base.contributions.json"};class h extends e.jG{constructor(){super(...arguments),this.schemasById={},this._onDidChangeSchema=this._register(new d.vl)}registerSchema(a,b,c){let d=a.length>0&&"#"===a.charAt(a.length-1)?a.substring(0,a.length-1):a;this.schemasById[d]=b,this._onDidChangeSchema.fire(a),c&&c.add((0,e.s)(()=>{delete this.schemasById[d],this._onDidChangeSchema.fire(a)}))}notifySchemaChanged(a){this._onDidChangeSchema.fire(a)}}let i=new h;f.O.add(g.JSONContribution,i)},52559:(a,b,c)=>{"use strict";c.d(b,{RK:()=>k,tQ:()=>l});var d=c(70687),e=c(76631),f=c(54957),g=c(6812),h=c(61822),i=c(57615),j=c(36176);class k extends e.jG{constructor(a,b,c=!1){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=a,this._modelService=b,!c){const a=new d.vb;a.cancelAndSet(()=>this._checkStopModelSync(),Math.round(3e4)),this._register(a)}}dispose(){for(let a in this._syncedModels)(0,e.AS)(this._syncedModels[a]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(a,b=!1){for(let c of a){let a=c.toString();this._syncedModels[a]||this._beginModelSync(c,b),this._syncedModels[a]&&(this._syncedModelsLastUsedTime[a]=new Date().getTime())}}_checkStopModelSync(){let a=new Date().getTime(),b=[];for(let c in this._syncedModelsLastUsedTime)a-this._syncedModelsLastUsedTime[c]>6e4&&b.push(c);for(let a of b)this._stopModelSync(a)}_beginModelSync(a,b){let c=this._modelService.getModel(a);if(!c||!b&&c.isTooLargeForSyncing())return;let d=a.toString();this._proxy.$acceptNewModel({url:c.uri.toString(),lines:c.getLinesContent(),EOL:c.getEOL(),versionId:c.getVersionId()});let f=new e.Cm;f.add(c.onDidChangeContent(a=>{this._proxy.$acceptModelChanged(d.toString(),a)})),f.add(c.onWillDispose(()=>{this._stopModelSync(d)})),f.add((0,e.s)(()=>{this._proxy.$acceptRemovedModel(d)})),this._syncedModels[d]=f}_stopModelSync(a){let b=this._syncedModels[a];delete this._syncedModels[a],delete this._syncedModelsLastUsedTime[a],(0,e.AS)(b)}}class l{constructor(){this._models=Object.create(null)}getModel(a){return this._models[a]}getModels(){let a=[];return Object.keys(this._models).forEach(b=>a.push(this._models[b])),a}$acceptNewModel(a){this._models[a.url]=new m(f.r.parse(a.url),a.lines,a.EOL,a.versionId)}$acceptModelChanged(a,b){this._models[a]&&this._models[a].onEvents(b)}$acceptRemovedModel(a){this._models[a]&&delete this._models[a]}}class m extends j.Y{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(a){let b=[];for(let c=0;c<this._lines.length;c++){let d=this._lines[c],e=this.offsetAt(new g.y(c+1,1));for(let c of d.matchAll(a))(c.index||0===c.index)&&(c.index=c.index+e),b.push(c)}return b}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(a){return this._lines[a-1]}getWordAtPosition(a,b){let c=(0,i.Th)(a.column,(0,i.Io)(b),this._lines[a.lineNumber-1],0);return c?new h.Q(a.lineNumber,c.startColumn,a.lineNumber,c.endColumn):null}words(a){let b=this._lines,c=this._wordenize.bind(this),d=0,e="",f=0,g=[];return{*[Symbol.iterator](){for(;;)if(f<g.length){let a=e.substring(g[f].start,g[f].end);f+=1,yield a}else if(d<b.length)g=c(e=b[d],a),f=0,d+=1;else break}}}getLineWords(a,b){let c=this._lines[a-1],d=this._wordenize(c,b),e=[];for(let a of d)e.push({word:c.substring(a.start,a.end),startColumn:a.start+1,endColumn:a.end+1});return e}_wordenize(a,b){let c,d=[];for(b.lastIndex=0;(c=b.exec(a))&&0!==c[0].length;)d.push({start:c.index,end:c.index+c[0].length});return d}getValueInRange(a){if((a=this._validateRange(a)).startLineNumber===a.endLineNumber)return this._lines[a.startLineNumber-1].substring(a.startColumn-1,a.endColumn-1);let b=this._eol,c=a.startLineNumber-1,d=a.endLineNumber-1,e=[];e.push(this._lines[c].substring(a.startColumn-1));for(let a=c+1;a<d;a++)e.push(this._lines[a]);return e.push(this._lines[d].substring(0,a.endColumn-1)),e.join(b)}offsetAt(a){return a=this._validatePosition(a),this._ensureLineStarts(),this._lineStarts.getPrefixSum(a.lineNumber-2)+(a.column-1)}positionAt(a){a=Math.max(0,a=Math.floor(a)),this._ensureLineStarts();let b=this._lineStarts.getIndexOf(a),c=this._lines[b.index].length;return{lineNumber:1+b.index,column:1+Math.min(b.remainder,c)}}_validateRange(a){let b=this._validatePosition({lineNumber:a.startLineNumber,column:a.startColumn}),c=this._validatePosition({lineNumber:a.endLineNumber,column:a.endColumn});return b.lineNumber!==a.startLineNumber||b.column!==a.startColumn||c.lineNumber!==a.endLineNumber||c.column!==a.endColumn?{startLineNumber:b.lineNumber,startColumn:b.column,endLineNumber:c.lineNumber,endColumn:c.column}:a}_validatePosition(a){if(!g.y.isIPosition(a))throw Error("bad position");let{lineNumber:b,column:c}=a,d=!1;if(b<1)b=1,c=1,d=!0;else if(b>this._lines.length)b=this._lines.length,c=this._lines[b-1].length+1,d=!0;else{let a=this._lines[b-1].length+1;c<1?(c=1,d=!0):c>a&&(c=a,d=!0)}return d?{lineNumber:b,column:c}:a}}},53072:(a,b,c)=>{"use strict";c.d(b,{ne:()=>e,dt:()=>H,yr:()=>v,O:()=>w,WP:()=>i});var d,e,f=c(17577);new Uint32Array(10),new Uint8Array([114,82,115,101,69,102,97,113,81,116,84,100,119,87,99,122,120,118,103]),new Uint16Array([107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),new Uint16Array([114,82,29810,115,30579,26483,101,102,29286,24934,29030,29798,30822,30310,26470,97,113,29809,116,84,100,119,99,122,120,118,103]),new Uint16Array([114,82,29810,115,30579,26483,101,69,102,29286,24934,29030,29798,30822,30310,26470,97,113,81,29809,116,84,100,119,87,99,122,120,118,103,107,111,105,79,106,112,117,80,104,27496,28520,27752,121,110,27246,28782,27758,98,109,27757,108]),new f.qK(1e4),new f.qK(1e4),new f.qK(1e4);var g=c(26529);function h(...a){return function(b,c){for(let d=0,e=a.length;d<e;d++){let e=a[d](b,c);if(e)return e}return null}}j.bind(void 0,!1);let i=j.bind(void 0,!0);function j(a,b,c){return c&&!(c.length<b.length)&&(a?(0,g.ns)(c,b):0===c.indexOf(b))?b.length>0?[{start:0,end:b.length}]:[]:null}function k(a){return 97<=a&&a<=122}function l(a){return 65<=a&&a<=90}function m(a){return 48<=a&&a<=57}let n=new Set;function o(a){return k(a)||l(a)||m(a)}function p(a,b){return 0===b.length?b=[a]:a.end===b[0].start?b[0].start=a.start:b.unshift(a),b}function q(a,b){for(let c=b;c<a.length;c++){let b=a.charCodeAt(c);if(l(b)||m(b)||c>0&&!o(a.charCodeAt(c-1)))return c}return a.length}function r(a,b){if(!b||0===(b=b.trim()).length||!function(a){let b=0,c=0,d=0,e=0;for(let g=0;g<a.length;g++){var f;l(d=a.charCodeAt(g))&&b++,k(d)&&c++,(32===(f=d)||9===f||10===f||13===f)&&e++}return(0===b||0===c)&&0===e?a.length<=30:b<=5}(a))return null;b.length>60&&(b=b.substring(0,60));let c=function(a){let b=0,c=0,d=0,e=0,f=0;for(let g=0;g<a.length;g++)l(f=a.charCodeAt(g))&&b++,k(f)&&c++,o(f)&&d++,m(f)&&e++;let g=b/a.length,h=c/a.length;return{upperPercent:g,lowerPercent:h,alphaPercent:d/a.length,numericPercent:e/a.length}}(b);if(!function(a){let{upperPercent:b,lowerPercent:c,alphaPercent:d,numericPercent:e}=a;return c>.2&&b<.8&&d>.6&&e<.2}(c)){if(!function(a){let{upperPercent:b,lowerPercent:c}=a;return 0===c&&b>.6}(c))return null;b=b.toLowerCase()}let d=null,e=0;for(a=a.toLowerCase();e<b.length&&null===(d=function a(b,c,d,e){if(d===b.length)return[];{if(e===c.length||b[d]!==c[e].toLowerCase())return null;let f=null,g=e+1;for(f=a(b,c,d+1,e+1);!f&&(g=q(c,g))<c.length;)f=a(b,c,d+1,g),g++;return null===f?null:p({start:e,end:e+1},f)}}(a,b,0,e));)e=q(b,e+1);return d}"()[]{}<>`'\"-/;:,.?!".split("").forEach(a=>n.add(a.charCodeAt(0)));let s=h(i,r,function(a,b){if(a.length>b.length)return null;let c=b.toLowerCase().indexOf(a.toLowerCase());return -1===c?null:[{start:c,end:c+a.length}]}),t=h(i,r,function(a,b){return a.length>b.length?null:function a(b,c,d,e){if(d===b.length)return[];if(e===c.length)return null;if(b[d]===c[e]){let f=null;return(f=a(b,c,d+1,e+1))?p({start:e,end:e+1},f):null}return a(b,c,d,e+1)}(a.toLowerCase(),b.toLowerCase(),0,0)}),u=new f.qK(1e4);function v(a,b,c=!1){if("string"!=typeof a||"string"!=typeof b)return null;let d=u.get(a);d||(d=RegExp((0,g.Bm)(a),"i"),u.set(a,d));let e=d.exec(b);return e?[{start:e.index,end:e.index+e[0].length}]:c?t(a,b):s(a,b)}function w(a,b){let c=H(a,a.toLowerCase(),0,b,b.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return c?function(a){if(void 0===a)return[];let b=[],c=a[1];for(let d=a.length-1;d>1;d--){let e=a[d]+c,f=b[b.length-1];f&&f.end===e?f.end=e+1:b.push({start:e,end:e+1})}return b}(c):null}function x(){let a=[],b=[];for(let a=0;a<=128;a++)b[a]=0;for(let c=0;c<=128;c++)a.push(b.slice(0));return a}function y(a){let b=[];for(let c=0;c<=a;c++)b[c]=0;return b}let z=y(256),A=y(256),B=x(),C=x(),D=x();function E(a,b){if(b<0||b>=a.length)return!1;let c=a.codePointAt(b);switch(c){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:if((0,g.Ss)(c))return!0;return!1}}function F(a,b){if(b<0||b>=a.length)return!1;switch(a.charCodeAt(b)){case 32:case 9:return!0;default:return!1}}(d=e||(e={})).Default=[-100,0],d.isDefault=function(a){return!a||2===a.length&&-100===a[0]&&0===a[1]};class G{static{this.default={boostFullMatch:!0,firstMatchCanBeWeak:!1}}constructor(a,b){this.firstMatchCanBeWeak=a,this.boostFullMatch=b}}function H(a,b,c,d,e,f,g=G.default){let h=a.length>128?128:a.length,i=d.length>128?128:d.length;if(c>=h||f>=i||h-c>i-f||!function(a,b,c,d,e,f,g=!1){for(;b<c&&e<f;)a[b]===d[e]&&(g&&(z[b]=e),b+=1),e+=1;return b===c}(b,c,h,e,f,i,!0))return;var j,k=h,l=i,m=c,n=f,o=b,p=e;let q=k-1,r=l-1;for(;q>=m&&r>=n;)o[q]===p[r]&&(A[q]=r,q--),r--;let s=1,t=1,u=c,v=f,w=[!1];for(s=1,u=c;u<h;s++,u++){let g=z[u],j=A[u],k=u+1<h?A[u+1]:i;for(t=g-f+1,v=g;v<k;t++,v++){let h=Number.MIN_SAFE_INTEGER,k=!1;v<=j&&(h=function(a,b,c,d,e,f,g,h,i,j,k){var l;if(b[c]!==f[g])return Number.MIN_SAFE_INTEGER;let m=1,n=!1;return g===c-d?m=a[c]===e[g]?7:5:e[g]===f[g]||0!==g&&e[l=g-1]!==f[l]?E(f,g)&&(0===g||!E(f,g-1))?m=5:(E(f,g-1)||F(f,g-1))&&(m=5,n=!0):(m=a[c]===e[g]?7:5,n=!0),m>1&&c===d&&(k[0]=!0),n||(n=e[g]!==f[g]||E(f,g-1)||F(f,g-1)),c===d?g>i&&(m-=n?3:5):j?m+=2*!!n:m+=+!n,g+1===h&&(m-=n?3:5),m}(a,b,u,c,d,e,v,i,f,0===B[s-1][t-1],w));let l=0;h!==Number.MIN_SAFE_INTEGER&&(k=!0,l=h+C[s-1][t-1]);let m=v>g,n=m?C[s][t-1]+(B[s][t-1]>0?-5:0):0,o=v>g+1&&B[s][t-1]>0,p=o?C[s][t-2]+(B[s][t-2]>0?-5:0):0;if(o&&(!m||p>=n)&&(!k||p>=l))C[s][t]=p,D[s][t]=3,B[s][t]=0;else if(m&&(!k||n>=l))C[s][t]=n,D[s][t]=2,B[s][t]=0;else if(k)C[s][t]=l,D[s][t]=1,B[s][t]=B[s-1][t-1]+1;else throw Error("not possible")}}if(!w[0]&&!g.firstMatchCanBeWeak)return;s--,t--;let x=[C[s][t],f],y=0,I=0;for(;s>=1;){let a=t;do{let b=D[s][a];if(3===b)a-=2;else if(2===b)a-=1;else break}while(a>=1);y>1&&b[c+s-1]===e[f+t-1]&&d[j=a+f-1]===e[j]&&y+1>B[s][a]&&(a=t),a===t?y++:y=1,I||(I=a),s--,t=a-1,x.push(t)}i-f===h&&g.boostFullMatch&&(x[0]+=2);let J=I-h;return x[0]-=J,x}},53772:()=>{},54265:(a,b,c)=>{"use strict";let d;c.d(b,{XL:()=>l,YY:()=>j,PO:()=>k,Rn:()=>i});var e=c(66036);function f(a){let b=Error("BugIndicatingErrorRecovery: "+a);(0,e.dz)(b),console.error("recovered from an error that indicates a bug",b)}c(78014),c(95091),c(76631);var g=c(55900),h=c(61811);function i(a,b){let c=new l(a,b);try{a(c)}finally{c.finish()}}function j(a){if(d)a(d);else{let b=new l(a,void 0);d=b;try{a(b)}finally{b.finish(),d=void 0}}}function k(a,b,c){a?b(a):i(b,c)}class l{constructor(a,b){this._fn=a,this._getDebugName=b,this._updatingObservers=[],(0,h.t)()?.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():(0,g.qQ)(this._fn)}updateObserver(a,b){if(!this._updatingObservers){f("Transaction already finished!"),i(c=>{c.updateObserver(a,b)});return}this._updatingObservers.push({observer:a,observable:b}),a.beginUpdate(b)}finish(){let a=this._updatingObservers;if(!a)return void f("transaction.finish() has already been called!");for(let b=0;b<a.length;b++){let{observer:c,observable:d}=a[b];c.endUpdate(d)}this._updatingObservers=null,(0,h.t)()?.handleEndTransaction(this)}debugGetUpdatingObservers(){return this._updatingObservers}}},54424:()=>{},54436:()=>{},54469:(a,b,c)=>{"use strict";c.d(b,{Bc:()=>i,VS:()=>j,_W:()=>m,nI:()=>n,nK:()=>k,oO:()=>l});var d=c(66036),e=c(48409);c(77497);var f=c(50498),g=c(26529),h=c(54957);class i{constructor(a="",b=!1){if(this.value=a,"string"!=typeof this.value)throw(0,d.Qg)("value");"boolean"==typeof b?(this.isTrusted=b,this.supportThemeIcons=!1,this.supportHtml=!1,this.supportAlertSyntax=!1):(this.isTrusted=b.isTrusted??void 0,this.supportThemeIcons=b.supportThemeIcons??!1,this.supportHtml=b.supportHtml??!1,this.supportAlertSyntax=b.supportAlertSyntax??!1)}appendText(a,b=0){return this.value+=(this.supportThemeIcons?(0,e.m2)(a):a).replace(/[\\`*_{}[\]()#+!~]/g,"\\$&").replace(/^([ \t]*)-/gm,"$1\\-").replace(/([ \t]+)/g,(a,b)=>"&nbsp;".repeat(b.length)).replace(/\>/gm,"\\>").replace(/\n/g,1===b?"\\\n":"\n\n"),this}appendMarkdown(a){return this.value+=a,this}appendCodeblock(a,b){var c,d;let e,f;return this.value+=`
54
54
  ${c=b,d=a,f=(e=c.match(/^`+/gm)?.reduce((a,b)=>a.length>b.length?a:b).length??0)>=3?e+1:3,[`${"`".repeat(f)}${d}`,c,`${"`".repeat(f)}`].join("\n")}
55
55
  `,this}appendLink(a,b,c){return this.value+="[",this.value+=this._escape(b,"]"),this.value+="](",this.value+=this._escape(String(a),")"),c&&(this.value+=` "${this._escape(this._escape(c,'"'),")")}"`),this.value+=")",this}_escape(a,b){let c=RegExp((0,g.bm)(b),"g");return a.replace(c,(b,c)=>"\\"!==a.charAt(c-1)?`\\${b}`:b)}}function j(a){return a instanceof i||!!a&&"object"==typeof a&&"string"==typeof a.value&&("boolean"==typeof a.isTrusted||"object"==typeof a.isTrusted||void 0===a.isTrusted)&&("boolean"==typeof a.supportThemeIcons||void 0===a.supportThemeIcons)&&("boolean"==typeof a.supportAlertSyntax||void 0===a.supportAlertSyntax)}function k(a,b){return a===b||!!a&&!!b&&a.value===b.value&&a.isTrusted===b.isTrusted&&a.supportThemeIcons===b.supportThemeIcons&&a.supportHtml===b.supportHtml&&a.supportAlertSyntax===b.supportAlertSyntax&&(a.baseUri===b.baseUri||!!a.baseUri&&!!b.baseUri&&(0,f.n4)(h.r.from(a.baseUri),h.r.from(b.baseUri)))}function l(a){return a.replace(/"/g,"&quot;")}function m(a){return a?a.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1"):a}function n(a){let b=[],c=a.split("|").map(a=>a.trim());a=c[0];let d=c[1];if(d){let a=/height=(\d+)/.exec(d),c=/width=(\d+)/.exec(d),e=a?a[1]:"",f=c?c[1]:"",g=isFinite(parseInt(f)),h=isFinite(parseInt(e));g&&b.push(`width="${f}"`),h&&b.push(`height="${e}"`)}return{href:a,dimensions:b}}},54588:(a,b,c)=>{"use strict";c.d(b,{Om:()=>s,Sc:()=>q,kk:()=>r,lM:()=>o});var d=c(33040),e=c(95091),f=c(54469),g=c(48409),h=c(63060),i=c(75082),j=c(70288),k=c(47339),l=c(8933);c(4655);let m={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class n extends j.EH{constructor(a,b,c){super(a,b,c);const d=this.options.keybinding?`${this._action.label} (${this.options.keybinding})`:this._action.label;this.toggle=this._register(new o({actionClassName:this._action.class,isChecked:!!this._action.checked,title:d,notFocusable:!0,inputActiveOptionBackground:c.toggleStyles?.inputActiveOptionBackground,inputActiveOptionBorder:c.toggleStyles?.inputActiveOptionBorder,inputActiveOptionForeground:c.toggleStyles?.inputActiveOptionForeground})),this._register(this.toggle.onChange(()=>{this._action.checked=!!this.toggle&&this.toggle.checked}))}render(a){this.element=a,this.element.appendChild(this.toggle.domNode),this.updateChecked(),this.updateEnabled()}updateEnabled(){this.toggle&&(this.isEnabled()?(this.toggle.enable(),this.element?.classList.remove("disabled")):(this.toggle.disable(),this.element?.classList.add("disabled")))}updateChecked(){this.toggle.checked=!!this._action.checked}updateLabel(){let a=this.options.keybinding?`${this._action.label} (${this.options.keybinding})`:this._action.label;this.toggle.setTitle(a)}focus(){this.toggle.domNode.tabIndex=0,this.toggle.focus()}blur(){this.toggle.domNode.tabIndex=-1,this.toggle.domNode.blur()}setFocusable(a){this.toggle.domNode.tabIndex=a?0:-1}}class o extends l.x{get onChange(){return this._onChange.event}get onKeyDown(){return this._onKeyDown.event}constructor(a){super(),this._onChange=this._register(new e.vl),this._onKeyDown=this._register(new e.vl),this._opts=a,this._title=this._opts.title,this._checked=this._opts.isChecked;const b=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,b.push(...h.L.asClassNameArray(this._icon))),this._opts.actionClassName&&b.push(...this._opts.actionClassName.split(" ")),this._checked&&b.push("checked"),this.domNode=document.createElement("div"),this._register((0,k.i)().setupDelayedHover(this.domNode,()=>({content:(0,f.VS)(this._title)||(0,i.sb)(this._title)?this._title:(0,g.pS)(this._title),style:1}),this._opts.hoverLifecycleOptions)),this.domNode.classList.add(...b),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.setTitle(this._opts.title),this.applyStyles(),this.onclick(this.domNode,a=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),a.preventDefault(),a.stopPropagation())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,a=>{if(this.enabled){if(10===a.keyCode||3===a.keyCode){this.checked=!this._checked,this._onChange.fire(!0),a.preventDefault(),a.stopPropagation();return}this._onKeyDown.fire(a)}})}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(a){this._checked=a,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}setIcon(a){this._icon&&this.domNode.classList.remove(...h.L.asClassNameArray(this._icon)),this._icon=a,this._icon&&this.domNode.classList.add(...h.L.asClassNameArray(this._icon))}width(){return 22}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1)),this.domNode.classList.remove("disabled"),this._opts.notFocusable||(this.domNode.tabIndex=0)}disable(){this.domNode.setAttribute("aria-disabled",String(!0)),this.domNode.classList.add("disabled"),this._opts.notFocusable||(this.domNode.tabIndex=-1)}setTitle(a){this._title=a;let b="string"==typeof a?a:(0,f.VS)(a)?a.value:a.textContent;this.domNode.setAttribute("aria-label",(0,g.R$)(b))}}class p extends l.x{static{this.CLASS_NAME="monaco-checkbox"}constructor(a,b,c){super(),this.checkbox=a,this.domNode=b,this.styles=c,this._onChange=this._register(new e.vl),this.onChange=this._onChange.event,this.applyStyles()}get enabled(){return this.checkbox.enabled}enable(){this.checkbox.enable(),this.applyStyles(!0)}disable(){this.checkbox.disable(),this.applyStyles(!1)}setTitle(a){this.checkbox.setTitle(a)}applyStyles(a=this.enabled){this.domNode.style.color=(a?this.styles.checkboxForeground:this.styles.checkboxDisabledForeground)||"",this.domNode.style.backgroundColor=(a?this.styles.checkboxBackground:this.styles.checkboxDisabledBackground)||"",this.domNode.style.borderColor=(a?this.styles.checkboxBorder:this.styles.checkboxDisabledBackground)||"";let b=this.styles.size||18;this.domNode.style.width=this.domNode.style.height=this.domNode.style.fontSize=`${b}px`,this.domNode.style.fontSize=`${b-2}px`}}class q extends p{constructor(a,b,c){const e=new o({title:a,isChecked:b,icon:d.W.check,actionClassName:p.CLASS_NAME,hoverLifecycleOptions:c.hoverLifecycleOptions,...m});super(e,e.domNode,c),this._register(e),this._register(this.checkbox.onChange(a=>{this.applyStyles(),this._onChange.fire(a)}))}get checked(){return this.checkbox.checked}set checked(a){this.checkbox.checked=a,this.applyStyles()}applyStyles(a){this.checkbox.checked?this.checkbox.setIcon(d.W.check):this.checkbox.setIcon(void 0),super.applyStyles(a)}}class r extends p{constructor(a,b,c){let e;switch(b){case!0:e=d.W.check;break;case"mixed":e=d.W.dash;break;case!1:e=void 0}const f=new o({title:a,isChecked:!0===b,icon:e,actionClassName:q.CLASS_NAME,hoverLifecycleOptions:c.hoverLifecycleOptions,...m});super(f,f.domNode,c),this._state=b,this._register(f),this._register(this.checkbox.onChange(a=>{this._state=this.checkbox.checked,this.applyStyles(),this._onChange.fire(a)}))}get checked(){return this._state}set checked(a){this._state!==a&&(this._state=a,this.checkbox.checked=!0===a,this.applyStyles())}applyStyles(a){switch(this._state){case!0:this.checkbox.setIcon(d.W.check);break;case"mixed":this.checkbox.setIcon(d.W.dash);break;case!1:this.checkbox.setIcon(void 0)}super.applyStyles(a)}}function s(a){return(b,c)=>{if(void 0!==b.checked)return new n(null,b,{...c,toggleStyles:a})}}},54957:(a,b,c)=>{"use strict";c.d(b,{I:()=>p,r:()=>j});var d=c(30996),e=c(18216);let f=/^\w[\w\d+.-]*$/,g=/^\//,h=/^\/\//,i=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class j{static isUri(a){return a instanceof j||!!a&&"object"==typeof a&&"string"==typeof a.authority&&"string"==typeof a.fragment&&"string"==typeof a.path&&"string"==typeof a.query&&"string"==typeof a.scheme&&"string"==typeof a.fsPath&&"function"==typeof a.with&&"function"==typeof a.toString}constructor(a,b,c,d,e,i=!1){"object"==typeof a?(this.scheme=a.scheme||"",this.authority=a.authority||"",this.path=a.path||"",this.query=a.query||"",this.fragment=a.fragment||""):(this.scheme=function(a,b){return a||b?a:"file"}(a,i),this.authority=b||"",this.path=function(a,b){switch(a){case"https":case"http":case"file":b?"/"!==b[0]&&(b="/"+b):b="/"}return b}(this.scheme,c||""),this.query=d||"",this.fragment=e||"",function(a,b){if(!a.scheme&&b)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${a.authority}", path: "${a.path}", query: "${a.query}", fragment: "${a.fragment}"}`);if(a.scheme&&!f.test(a.scheme)){let b=[...a.scheme.matchAll(/[^\w\d+.-]/gu)],c=b.length>0?` Found '${b[0][0]}' at index ${b[0].index} (${b.length} total)`:"";throw Error(`[UriError]: Scheme contains illegal characters.${c} (len:${a.scheme.length})`)}if(a.path){if(a.authority){if(!g.test(a.path))throw Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(h.test(a.path))throw Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,i))}get fsPath(){return p(this,!1)}with(a){if(!a)return this;let{scheme:b,authority:c,path:d,query:e,fragment:f}=a;return(void 0===b?b=this.scheme:null===b&&(b=""),void 0===c?c=this.authority:null===c&&(c=""),void 0===d?d=this.path:null===d&&(d=""),void 0===e?e=this.query:null===e&&(e=""),void 0===f?f=this.fragment:null===f&&(f=""),b===this.scheme&&c===this.authority&&d===this.path&&e===this.query&&f===this.fragment)?this:new l(b,c,d,e,f)}static parse(a,b=!1){let c=i.exec(a);return c?new l(c[2]||"",s(c[4]||""),s(c[5]||""),s(c[7]||""),s(c[9]||""),b):new l("","","","","")}static file(a){let b="";if(e.uF&&(a=a.replace(/\\/g,"/")),"/"===a[0]&&"/"===a[1]){let c=a.indexOf("/",2);-1===c?(b=a.substring(2),a="/"):(b=a.substring(2,c),a=a.substring(c)||"/")}return new l("file",b,a,"","")}static from(a,b){return new l(a.scheme,a.authority,a.path,a.query,a.fragment,b)}static joinPath(a,...b){let c;if(!a.path)throw Error(`[UriError]: cannot call joinPath on URI without path: ${a.toString()}`);return c=e.uF&&"file"===a.scheme?j.file(d.IN.join(p(a,!0),...b)).path:d.SA.join(a.path,...b),a.with({path:c})}toString(a=!1){return q(this,a)}toJSON(){return this}static revive(a){if(!a)return a;{if(a instanceof j)return a;let b=new l(a);return b._formatted=a.external??null,b._fsPath=a._sep===k?a.fsPath??null:null,b}}}let k=e.uF?1:void 0;class l extends j{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=p(this,!1)),this._fsPath}toString(a=!1){return a?q(this,!0):(this._formatted||(this._formatted=q(this,!1)),this._formatted)}toJSON(){let a={$mid:1};return this._fsPath&&(a.fsPath=this._fsPath,a._sep=k),this._formatted&&(a.external=this._formatted),this.path&&(a.path=this.path),this.scheme&&(a.scheme=this.scheme),this.authority&&(a.authority=this.authority),this.query&&(a.query=this.query),this.fragment&&(a.fragment=this.fragment),a}}let m={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function n(a,b,c){let d,e=-1;for(let f=0;f<a.length;f++){let g=a.charCodeAt(f);if(g>=97&&g<=122||g>=65&&g<=90||g>=48&&g<=57||45===g||46===g||95===g||126===g||b&&47===g||c&&91===g||c&&93===g||c&&58===g)-1!==e&&(d+=encodeURIComponent(a.substring(e,f)),e=-1),void 0!==d&&(d+=a.charAt(f));else{void 0===d&&(d=a.substr(0,f));let b=m[g];void 0!==b?(-1!==e&&(d+=encodeURIComponent(a.substring(e,f)),e=-1),d+=b):-1===e&&(e=f)}}return -1!==e&&(d+=encodeURIComponent(a.substring(e))),void 0!==d?d:a}function o(a){let b;for(let c=0;c<a.length;c++){let d=a.charCodeAt(c);35===d||63===d?(void 0===b&&(b=a.substr(0,c)),b+=m[d]):void 0!==b&&(b+=a[c])}return void 0!==b?b:a}function p(a,b){let c;return c=a.authority&&a.path.length>1&&"file"===a.scheme?`//${a.authority}${a.path}`:47===a.path.charCodeAt(0)&&(a.path.charCodeAt(1)>=65&&90>=a.path.charCodeAt(1)||a.path.charCodeAt(1)>=97&&122>=a.path.charCodeAt(1))&&58===a.path.charCodeAt(2)?b?a.path.substr(1):a.path[1].toLowerCase()+a.path.substr(2):a.path,e.uF&&(c=c.replace(/\//g,"\\")),c}function q(a,b){let c=b?o:n,d="",{scheme:e,authority:f,path:g,query:h,fragment:i}=a;if(e&&(d+=e,d+=":"),(f||"file"===e)&&(d+="/",d+="/"),f){let a=f.indexOf("@");if(-1!==a){let b=f.substr(0,a);f=f.substr(a+1),-1===(a=b.lastIndexOf(":"))?d+=c(b,!1,!1):(d+=c(b.substr(0,a),!1,!1),d+=":",d+=c(b.substr(a+1),!1,!0)),d+="@"}-1===(a=(f=f.toLowerCase()).lastIndexOf(":"))?d+=c(f,!1,!0):(d+=c(f.substr(0,a),!1,!0),d+=f.substr(a))}if(g){if(g.length>=3&&47===g.charCodeAt(0)&&58===g.charCodeAt(2)){let a=g.charCodeAt(1);a>=65&&a<=90&&(g=`/${String.fromCharCode(a+32)}:${g.substr(3)}`)}else if(g.length>=2&&58===g.charCodeAt(1)){let a=g.charCodeAt(0);a>=65&&a<=90&&(g=`${String.fromCharCode(a+32)}:${g.substr(2)}`)}d+=c(g,!0,!1)}return h&&(d+="?",d+=c(h,!1,!1)),i&&(d+="#",d+=b?i:n(i,!1,!1)),d}let r=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function s(a){return a.match(r)?a.replace(r,a=>(function a(b){try{return decodeURIComponent(b)}catch{if(b.length>3)return b.substr(0,3)+a(b.substr(3));return b}})(a)):a}},55184:()=>{},55241:(a,b,c)=>{"use strict";c.d(b,{N:()=>g,v:()=>f});var d=c(64901);let e=[];function f(a,b,c){b instanceof d.d||(b=new d.d(b,[],!!c)),e.push([a,b])}function g(){return e}},55385:(a,b,c)=>{"use strict";c.d(b,{Jn:()=>j,YJ:()=>h,_8:()=>g,jU:()=>k,qC:()=>i});var d=c(18216),e=c(91902);let f=d.zx?1.5:1.35;class g{static _create(a,b,c,d,h,k,l,m,n){0===k?k=f*c:k<8&&(k*=c),(k=Math.round(k))<8&&(k=8);let o=1+(n?0:.1*e.D.getZoomLevel());if(c*=o,k*=o,h===j)if("normal"===b||"bold"===b)h=i;else{let a=parseInt(b,10);h=`'wght' ${a}`,b="normal"}return new g({pixelRatio:m,fontFamily:a,fontWeight:b,fontSize:c,fontFeatureSettings:d,fontVariationSettings:h,lineHeight:k,letterSpacing:l})}constructor(a){this._bareFontInfoBrand=void 0,this.pixelRatio=a.pixelRatio,this.fontFamily=String(a.fontFamily),this.fontWeight=String(a.fontWeight),this.fontSize=a.fontSize,this.fontFeatureSettings=a.fontFeatureSettings,this.fontVariationSettings=a.fontVariationSettings,this.lineHeight=0|a.lineHeight,this.letterSpacing=a.letterSpacing}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.fontVariationSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(){let a=k.fontFamily,b=g._wrapInQuotes(this.fontFamily);return this.fontFamily!==a?`${b}, ${a}`:b}static _wrapInQuotes(a){return/[,"']/.test(a)?a:/[+ ]/.test(a)?`"${a}"`:a}}class h extends g{constructor(a,b){super(a),this._editorStylingBrand=void 0,this.version=2,this.isTrusted=b,this.isMonospace=a.isMonospace,this.typicalHalfwidthCharacterWidth=a.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=a.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=a.canUseHalfwidthRightwardsArrow,this.spaceWidth=a.spaceWidth,this.middotWidth=a.middotWidth,this.wsmiddotWidth=a.wsmiddotWidth,this.maxDigitWidth=a.maxDigitWidth}equals(a){return this.fontFamily===a.fontFamily&&this.fontWeight===a.fontWeight&&this.fontSize===a.fontSize&&this.fontFeatureSettings===a.fontFeatureSettings&&this.fontVariationSettings===a.fontVariationSettings&&this.lineHeight===a.lineHeight&&this.letterSpacing===a.letterSpacing&&this.typicalHalfwidthCharacterWidth===a.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===a.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===a.canUseHalfwidthRightwardsArrow&&this.spaceWidth===a.spaceWidth&&this.middotWidth===a.middotWidth&&this.wsmiddotWidth===a.wsmiddotWidth&&this.maxDigitWidth===a.maxDigitWidth}}let i="normal",j="translate",k={fontFamily:d.zx?"Menlo, Monaco, 'Courier New', monospace":d.uF?"Consolas, 'Courier New', monospace":"'Droid Sans Mono', monospace",fontWeight:"normal",fontSize:d.zx?12:14,lineHeight:0,letterSpacing:0}},55404:(a,b,c)=>{"use strict";var d,e;function f(a,b){let c=Math.pow(10,b);return Math.round(a*c)/c}c.d(b,{Q1:()=>j,bU:()=>g,hB:()=>h});class g{constructor(a,b,c,d=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,a)),this.g=0|Math.min(255,Math.max(0,b)),this.b=0|Math.min(255,Math.max(0,c)),this.a=f(Math.max(Math.min(1,d),0),3)}static equals(a,b){return a.r===b.r&&a.g===b.g&&a.b===b.b&&a.a===b.a}}class h{constructor(a,b,c,d){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,a),0),this.s=f(Math.max(Math.min(1,b),0),3),this.l=f(Math.max(Math.min(1,c),0),3),this.a=f(Math.max(Math.min(1,d),0),3)}static equals(a,b){return a.h===b.h&&a.s===b.s&&a.l===b.l&&a.a===b.a}static fromRGBA(a){let b=a.r/255,c=a.g/255,d=a.b/255,e=a.a,f=Math.max(b,c,d),g=Math.min(b,c,d),i=0,j=0,k=(g+f)/2,l=f-g;if(l>0){switch(j=Math.min(k<=.5?l/(2*k):l/(2-2*k),1),f){case b:i=(c-d)/l+6*(c<d);break;case c:i=(d-b)/l+2;break;case d:i=(b-c)/l+4}i*=60,i=Math.round(i)}return new h(i,j,k,e)}static _hue2rgb(a,b,c){return(c<0&&(c+=1),c>1&&(c-=1),c<1/6)?a+(b-a)*6*c:c<.5?b:c<2/3?a+(b-a)*(2/3-c)*6:a}static toRGBA(a){let b,c,d,e=a.h/360,{s:f,l:i,a:j}=a;if(0===f)b=c=d=i;else{let a=i<.5?i*(1+f):i+f-i*f,g=2*i-a;b=h._hue2rgb(g,a,e+1/3),c=h._hue2rgb(g,a,e),d=h._hue2rgb(g,a,e-1/3)}return new g(Math.round(255*b),Math.round(255*c),Math.round(255*d),j)}}class i{constructor(a,b,c,d){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,a),0),this.s=f(Math.max(Math.min(1,b),0),3),this.v=f(Math.max(Math.min(1,c),0),3),this.a=f(Math.max(Math.min(1,d),0),3)}static equals(a,b){return a.h===b.h&&a.s===b.s&&a.v===b.v&&a.a===b.a}static fromRGBA(a){let b=a.r/255,c=a.g/255,d=a.b/255,e=Math.max(b,c,d),f=e-Math.min(b,c,d);return new i(Math.round(60*(0===f?0:e===b?((c-d)/f%6+6)%6:e===c?(d-b)/f+2:(b-c)/f+4)),0===e?0:f/e,e,a.a)}static toRGBA(a){let{h:b,s:c,v:d,a:e}=a,f=d*c,h=f*(1-Math.abs(b/60%2-1)),i=d-f,[j,k,l]=[0,0,0];return b<60?(j=f,k=h):b<120?(j=h,k=f):b<180?(k=f,l=h):b<240?(k=h,l=f):b<300?(j=h,l=f):b<=360&&(j=f,l=h),new g(j=Math.round((j+i)*255),k=Math.round((k+i)*255),l=Math.round((l+i)*255),e)}}class j{static fromHex(a){return j.Format.CSS.parseHex(a)||j.red}static equals(a,b){return!a&&!b||!!a&&!!b&&a.equals(b)}get hsla(){return this._hsla?this._hsla:h.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:i.fromRGBA(this.rgba)}constructor(a){if(a)if(a instanceof g)this.rgba=a;else if(a instanceof h)this._hsla=a,this.rgba=h.toRGBA(a);else if(a instanceof i)this._hsva=a,this.rgba=i.toRGBA(a);else throw Error("Invalid color ctor argument");else throw Error("Color needs a value")}equals(a){return!!a&&g.equals(this.rgba,a.rgba)&&h.equals(this.hsla,a.hsla)&&i.equals(this.hsva,a.hsva)}getRelativeLuminance(){return f(.2126*j._relativeLuminanceForComponent(this.rgba.r)+.7152*j._relativeLuminanceForComponent(this.rgba.g)+.0722*j._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(a){let b=a/255;return b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(a){return this.getRelativeLuminance()>a.getRelativeLuminance()}isDarkerThan(a){return this.getRelativeLuminance()<a.getRelativeLuminance()}lighten(a){return new j(new h(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*a,this.hsla.a))}darken(a){return new j(new h(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*a,this.hsla.a))}transparent(a){let{r:b,g:c,b:d,a:e}=this.rgba;return new j(new g(b,c,d,e*a))}isTransparent(){return 0===this.rgba.a}isOpaque(){return 1===this.rgba.a}opposite(){return new j(new g(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}mix(a,b=.5){let c=Math.min(Math.max(b,0),1),d=this.rgba,e=a.rgba,f=d.r+(e.r-d.r)*c,h=d.g+(e.g-d.g)*c,i=d.b+(e.b-d.b)*c,k=d.a+(e.a-d.a)*c;return new j(new g(f,h,i,k))}makeOpaque(a){if(this.isOpaque()||1!==a.rgba.a)return this;let{r:b,g:c,b:d,a:e}=this.rgba;return new j(new g(a.rgba.r-e*(a.rgba.r-b),a.rgba.g-e*(a.rgba.g-c),a.rgba.b-e*(a.rgba.b-d),1))}toString(){return this._toString||(this._toString=j.Format.CSS.format(this)),this._toString}toNumber32Bit(){return this._toNumber32Bit||(this._toNumber32Bit=(this.rgba.r<<24|this.rgba.g<<16|this.rgba.b<<8|(255*this.rgba.a|0))>>>0),this._toNumber32Bit}static getLighterColor(a,b,c){if(a.isLighterThan(b))return a;c=c||.5;let d=a.getRelativeLuminance(),e=b.getRelativeLuminance();return c=c*(e-d)/e,a.lighten(c)}static getDarkerColor(a,b,c){if(a.isDarkerThan(b))return a;c=c||.5;let d=a.getRelativeLuminance(),e=b.getRelativeLuminance();return c=c*(d-e)/d,a.darken(c)}static{this.white=new j(new g(255,255,255,1))}static{this.black=new j(new g(0,0,0,1))}static{this.red=new j(new g(255,0,0,1))}static{this.blue=new j(new g(0,0,255,1))}static{this.green=new j(new g(0,255,0,1))}static{this.cyan=new j(new g(0,255,255,1))}static{this.lightgrey=new j(new g(211,211,211,1))}static{this.transparent=new j(new g(0,0,0,0))}}!function(a){function b(a){let b=a.toString(16);return 2!==b.length?"0"+b:b}function c(a){let b=a.length;if(0===b||35!==a.charCodeAt(0))return null;if(7===b){let b=16*e(a.charCodeAt(1))+e(a.charCodeAt(2)),c=16*e(a.charCodeAt(3))+e(a.charCodeAt(4));return new d(new g(b,c,16*e(a.charCodeAt(5))+e(a.charCodeAt(6)),1))}if(9===b){let b=16*e(a.charCodeAt(1))+e(a.charCodeAt(2)),c=16*e(a.charCodeAt(3))+e(a.charCodeAt(4)),f=16*e(a.charCodeAt(5))+e(a.charCodeAt(6));return new d(new g(b,c,f,(16*e(a.charCodeAt(7))+e(a.charCodeAt(8)))/255))}if(4===b){let b=e(a.charCodeAt(1)),c=e(a.charCodeAt(2)),f=e(a.charCodeAt(3));return new d(new g(16*b+b,16*c+c,16*f+f))}if(5===b){let b=e(a.charCodeAt(1)),c=e(a.charCodeAt(2)),f=e(a.charCodeAt(3)),h=e(a.charCodeAt(4));return new d(new g(16*b+b,16*c+c,16*f+f,(16*h+h)/255))}return null}function e(a){switch(a){case 48:break;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:case 65:return 10;case 98:case 66:return 11;case 99:case 67:return 12;case 100:case 68:return 13;case 101:case 69:return 14;case 102:case 70:return 15}return 0}a.formatRGB=function(a){return 1===a.rgba.a?`rgb(${a.rgba.r}, ${a.rgba.g}, ${a.rgba.b})`:d.Format.CSS.formatRGBA(a)},a.formatRGBA=function(a){return`rgba(${a.rgba.r}, ${a.rgba.g}, ${a.rgba.b}, ${+a.rgba.a.toFixed(2)})`},a.formatHSL=function(a){return 1===a.hsla.a?`hsl(${a.hsla.h}, ${Math.round(100*a.hsla.s)}%, ${Math.round(100*a.hsla.l)}%)`:d.Format.CSS.formatHSLA(a)},a.formatHSLA=function(a){return`hsla(${a.hsla.h}, ${Math.round(100*a.hsla.s)}%, ${Math.round(100*a.hsla.l)}%, ${a.hsla.a.toFixed(2)})`},a.formatHex=function(a){return`#${b(a.rgba.r)}${b(a.rgba.g)}${b(a.rgba.b)}`},a.formatHexA=function(a,c=!1){return c&&1===a.rgba.a?d.Format.CSS.formatHex(a):`#${b(a.rgba.r)}${b(a.rgba.g)}${b(a.rgba.b)}${b(Math.round(255*a.rgba.a))}`},a.format=function(a){return a.isOpaque()?d.Format.CSS.formatHex(a):d.Format.CSS.formatRGBA(a)},a.parse=function(a){if("transparent"===a)return d.transparent;if(a.startsWith("#"))return c(a);if(a.startsWith("rgba(")){let b=a.match(/rgba\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+), *(?<a>(?:\+|-)?\d+(\.\d+)?)\)/);if(!b)throw Error("Invalid color format "+a);let c=parseInt(b.groups?.r??"0"),e=parseInt(b.groups?.g??"0"),f=parseInt(b.groups?.b??"0");return new d(new g(c,e,f,parseFloat(b.groups?.a??"0")))}if(a.startsWith("rgb(")){let b=a.match(/rgb\((?<r>(?:\+|-)?\d+), *(?<g>(?:\+|-)?\d+), *(?<b>(?:\+|-)?\d+)\)/);if(!b)throw Error("Invalid color format "+a);let c=parseInt(b.groups?.r??"0"),e=parseInt(b.groups?.g??"0");return new d(new g(c,e,parseInt(b.groups?.b??"0")))}var b=a;switch(b){case"aliceblue":return new d(new g(240,248,255,1));case"antiquewhite":return new d(new g(250,235,215,1));case"aqua":case"cyan":return new d(new g(0,255,255,1));case"aquamarine":return new d(new g(127,255,212,1));case"azure":return new d(new g(240,255,255,1));case"beige":return new d(new g(245,245,220,1));case"bisque":return new d(new g(255,228,196,1));case"black":return new d(new g(0,0,0,1));case"blanchedalmond":return new d(new g(255,235,205,1));case"blue":return new d(new g(0,0,255,1));case"blueviolet":return new d(new g(138,43,226,1));case"brown":return new d(new g(165,42,42,1));case"burlywood":return new d(new g(222,184,135,1));case"cadetblue":return new d(new g(95,158,160,1));case"chartreuse":return new d(new g(127,255,0,1));case"chocolate":return new d(new g(210,105,30,1));case"coral":return new d(new g(255,127,80,1));case"cornflowerblue":return new d(new g(100,149,237,1));case"cornsilk":return new d(new g(255,248,220,1));case"crimson":return new d(new g(220,20,60,1));case"darkblue":return new d(new g(0,0,139,1));case"darkcyan":return new d(new g(0,139,139,1));case"darkgoldenrod":return new d(new g(184,134,11,1));case"darkgray":case"darkgrey":return new d(new g(169,169,169,1));case"darkgreen":return new d(new g(0,100,0,1));case"darkkhaki":return new d(new g(189,183,107,1));case"darkmagenta":return new d(new g(139,0,139,1));case"darkolivegreen":return new d(new g(85,107,47,1));case"darkorange":return new d(new g(255,140,0,1));case"darkorchid":return new d(new g(153,50,204,1));case"darkred":return new d(new g(139,0,0,1));case"darksalmon":return new d(new g(233,150,122,1));case"darkseagreen":return new d(new g(143,188,143,1));case"darkslateblue":return new d(new g(72,61,139,1));case"darkslategray":case"darkslategrey":return new d(new g(47,79,79,1));case"darkturquoise":return new d(new g(0,206,209,1));case"darkviolet":return new d(new g(148,0,211,1));case"deeppink":return new d(new g(255,20,147,1));case"deepskyblue":return new d(new g(0,191,255,1));case"dimgray":case"dimgrey":return new d(new g(105,105,105,1));case"dodgerblue":return new d(new g(30,144,255,1));case"firebrick":return new d(new g(178,34,34,1));case"floralwhite":return new d(new g(255,250,240,1));case"forestgreen":return new d(new g(34,139,34,1));case"fuchsia":case"magenta":return new d(new g(255,0,255,1));case"gainsboro":return new d(new g(220,220,220,1));case"ghostwhite":return new d(new g(248,248,255,1));case"gold":return new d(new g(255,215,0,1));case"goldenrod":return new d(new g(218,165,32,1));case"gray":case"grey":return new d(new g(128,128,128,1));case"green":return new d(new g(0,128,0,1));case"greenyellow":return new d(new g(173,255,47,1));case"honeydew":return new d(new g(240,255,240,1));case"hotpink":return new d(new g(255,105,180,1));case"indianred":return new d(new g(205,92,92,1));case"indigo":return new d(new g(75,0,130,1));case"ivory":return new d(new g(255,255,240,1));case"khaki":return new d(new g(240,230,140,1));case"lavender":return new d(new g(230,230,250,1));case"lavenderblush":return new d(new g(255,240,245,1));case"lawngreen":return new d(new g(124,252,0,1));case"lemonchiffon":return new d(new g(255,250,205,1));case"lightblue":return new d(new g(173,216,230,1));case"lightcoral":return new d(new g(240,128,128,1));case"lightcyan":return new d(new g(224,255,255,1));case"lightgoldenrodyellow":return new d(new g(250,250,210,1));case"lightgray":case"lightgrey":return new d(new g(211,211,211,1));case"lightgreen":return new d(new g(144,238,144,1));case"lightpink":return new d(new g(255,182,193,1));case"lightsalmon":return new d(new g(255,160,122,1));case"lightseagreen":return new d(new g(32,178,170,1));case"lightskyblue":return new d(new g(135,206,250,1));case"lightslategray":case"lightslategrey":return new d(new g(119,136,153,1));case"lightsteelblue":return new d(new g(176,196,222,1));case"lightyellow":return new d(new g(255,255,224,1));case"lime":return new d(new g(0,255,0,1));case"limegreen":return new d(new g(50,205,50,1));case"linen":return new d(new g(250,240,230,1));case"maroon":return new d(new g(128,0,0,1));case"mediumaquamarine":return new d(new g(102,205,170,1));case"mediumblue":return new d(new g(0,0,205,1));case"mediumorchid":return new d(new g(186,85,211,1));case"mediumpurple":return new d(new g(147,112,219,1));case"mediumseagreen":return new d(new g(60,179,113,1));case"mediumslateblue":return new d(new g(123,104,238,1));case"mediumspringgreen":return new d(new g(0,250,154,1));case"mediumturquoise":return new d(new g(72,209,204,1));case"mediumvioletred":return new d(new g(199,21,133,1));case"midnightblue":return new d(new g(25,25,112,1));case"mintcream":return new d(new g(245,255,250,1));case"mistyrose":return new d(new g(255,228,225,1));case"moccasin":return new d(new g(255,228,181,1));case"navajowhite":return new d(new g(255,222,173,1));case"navy":return new d(new g(0,0,128,1));case"oldlace":return new d(new g(253,245,230,1));case"olive":return new d(new g(128,128,0,1));case"olivedrab":return new d(new g(107,142,35,1));case"orange":return new d(new g(255,165,0,1));case"orangered":return new d(new g(255,69,0,1));case"orchid":return new d(new g(218,112,214,1));case"palegoldenrod":return new d(new g(238,232,170,1));case"palegreen":return new d(new g(152,251,152,1));case"paleturquoise":return new d(new g(175,238,238,1));case"palevioletred":return new d(new g(219,112,147,1));case"papayawhip":return new d(new g(255,239,213,1));case"peachpuff":return new d(new g(255,218,185,1));case"peru":return new d(new g(205,133,63,1));case"pink":return new d(new g(255,192,203,1));case"plum":return new d(new g(221,160,221,1));case"powderblue":return new d(new g(176,224,230,1));case"purple":return new d(new g(128,0,128,1));case"rebeccapurple":return new d(new g(102,51,153,1));case"red":return new d(new g(255,0,0,1));case"rosybrown":return new d(new g(188,143,143,1));case"royalblue":return new d(new g(65,105,225,1));case"saddlebrown":return new d(new g(139,69,19,1));case"salmon":return new d(new g(250,128,114,1));case"sandybrown":return new d(new g(244,164,96,1));case"seagreen":return new d(new g(46,139,87,1));case"seashell":return new d(new g(255,245,238,1));case"sienna":return new d(new g(160,82,45,1));case"silver":return new d(new g(192,192,192,1));case"skyblue":return new d(new g(135,206,235,1));case"slateblue":return new d(new g(106,90,205,1));case"slategray":case"slategrey":return new d(new g(112,128,144,1));case"snow":return new d(new g(255,250,250,1));case"springgreen":return new d(new g(0,255,127,1));case"steelblue":return new d(new g(70,130,180,1));case"tan":return new d(new g(210,180,140,1));case"teal":return new d(new g(0,128,128,1));case"thistle":return new d(new g(216,191,216,1));case"tomato":return new d(new g(255,99,71,1));case"turquoise":return new d(new g(64,224,208,1));case"violet":return new d(new g(238,130,238,1));case"wheat":return new d(new g(245,222,179,1));case"white":return new d(new g(255,255,255,1));case"whitesmoke":return new d(new g(245,245,245,1));case"yellow":return new d(new g(255,255,0,1));case"yellowgreen":return new d(new g(154,205,50,1));default:return null}},a.parseHex=c}((e=(d=j||(j={})).Format||(d.Format={})).CSS||(e.CSS={}))},55900:(a,b,c)=>{"use strict";c.d(b,{nA:()=>d,qQ:()=>j,uB:()=>i});class d{constructor(a,b,c){this.owner=a,this.debugNameSource=b,this.referenceFn=c}getDebugName(a){return function(a,b){let c=f.get(a);if(c)return c;let d=function(a,b){let c,d=f.get(a);if(d)return d;let e=b.owner?function(a){let b=h.get(a);if(b)return b;let c=i(a)??"Object",d=g.get(c)??0;d++,g.set(c,d);let e=1===d?c:`${c}#${d}`;return h.set(a,e),e}(b.owner)+".":"",k=b.debugNameSource;if(void 0!==k){if("function"!=typeof k)return e+k;else if(void 0!==(c=k()))return e+c}let l=b.referenceFn;if(void 0!==l&&void 0!==(c=j(l)))return e+c;if(void 0!==b.owner){let c=function(a,b){for(let c in a)if(a[c]===b)return c}(b.owner,a);if(void 0!==c)return e+c}}(a,b);if(d){let b=e.get(d)??0;b++,e.set(d,b);let c=1===b?d:`${d}#${b}`;return f.set(a,c),c}}(a,this)}}let e=new Map,f=new WeakMap,g=new Map,h=new WeakMap;function i(a){let b=a.constructor;if(b){if("Object"===b.name)return;return b.name}}function j(a){let b=a.toString(),c=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(b),d=c?c[1]:void 0;return d?.trim()}},56158:(a,b,c)=>{"use strict";c.d(b,{H5:()=>h,Vn:()=>i,kI:()=>g});var d=c(61822),e=c(6812),f=c(42190);class g{constructor(a,b,c){this.range=a,this.inlineClassName=b,this.type=c}}class h{constructor(a,b,c){this.context=a,this.model=b,this.coordinatesConverter=c,this._decorationsCache=Object.create(null)}getInlineDecorations(a){let b=new d.Q(a,1,a,this.model.getLineMaxColumn(a)),c=this.coordinatesConverter.convertModelRangeToViewRange(b);return this.getDecorations(c,!1,!1).inlineDecorations}getDecorations(a,b,c){let e=this.context.getModelDecorations(a,b,c),h=a.startLineNumber,i=a.endLineNumber,j=[],k=0,l=[],m=[];for(let a=h;a<=i;a++)l[a-h]=[],m[a-h]=!1;for(let a=0,b=e.length;a<b;a++){let b=e[a],c=b.options;if(!(0,f.GN)(this.model,b))continue;let n=this._getOrCreateViewModelDecoration(b),o=n.range;if(j[k++]=n,c.inlineClassName){let a=new g(o,c.inlineClassName,3*!!c.inlineClassNameAffectsLetterSpacing),b=Math.max(h,o.startLineNumber),d=Math.min(i,o.endLineNumber);for(let e=b;e<=d;e++)l[e-h].push(a),c.affectsFont&&(m[e-h]=!0)}if(c.beforeContentClassName&&h<=o.startLineNumber&&o.startLineNumber<=i){let a=new g(new d.Q(o.startLineNumber,o.startColumn,o.startLineNumber,o.startColumn),c.beforeContentClassName,1);l[o.startLineNumber-h].push(a),c.affectsFont&&(m[o.startLineNumber-h]=!0)}if(c.afterContentClassName&&h<=o.endLineNumber&&o.endLineNumber<=i){let a=new g(new d.Q(o.endLineNumber,o.endColumn,o.endLineNumber,o.endColumn),c.afterContentClassName,2);l[o.endLineNumber-h].push(a),c.affectsFont&&(m[o.endLineNumber-h]=!0)}}return{decorations:j,inlineDecorations:l,hasVariableFonts:m}}reset(){this._decorationsCache=Object.create(null)}onModelDecorationsChanged(){this.reset()}onLineMappingChanged(){this.reset()}_getOrCreateViewModelDecoration(a){let b=a.id,c=this._decorationsCache[b];if(!c){let g,h=a.range,i=a.options;if(i.isWholeLine){let a=this.coordinatesConverter.convertModelPositionToViewPosition(new e.y(h.startLineNumber,1),0,!1,!0),b=this.coordinatesConverter.convertModelPositionToViewPosition(new e.y(h.endLineNumber,this.model.getLineMaxColumn(h.endLineNumber)),1);g=new d.Q(a.lineNumber,a.column,b.lineNumber,b.column)}else g=this.coordinatesConverter.convertModelRangeToViewRange(h,1);c=new f.vo(g,i),this._decorationsCache[b]=c}return c}}class i{constructor(a){this.context=a}getInlineDecorations(a){let b=this.context.getInjectionOffsets(a);if(!b)return[];let c=[],e=0,f=0,h=this.context.getInjectionOptions(a),i=this.context.getBreakOffsets(a);for(let j=0;j<i.length;j++){let k=[];c[j]=k;let l=j>0?i[j-1]:0,m=i[j];for(;f<b.length;){let c=h[f].content.length,i=b[f]+e,n=i+c;if(i>m)break;if(l<n){let b=h[f];if(b.inlineClassName){let c=this.context.getWrappedTextIndentLength(a),e=j>0?c:0,f=e+Math.max(i-l,0),h=e+Math.min(n-l,m-l);if(f!==h){let c=this.context.getBaseViewLineNumber(a)+j,e=new d.Q(c,f+1,c,h+1),i=3*!!b.inlineClassNameAffectsLetterSpacing;k.push(new g(e,b.inlineClassName,i))}}}if(n<=m)e+=c,f++;else break}}return c}}},57615:(a,b,c)=>{"use strict";c.d(b,{Io:()=>h,J3:()=>f,Ld:()=>g,Th:()=>function a(b,c,e,f,g){if(c=h(c),g||(g=d.f.first(i)),e.length>g.maxLen){let d=b-g.maxLen/2;return d<0?d=0:f+=d,e=e.substring(d,b+g.maxLen/2),a(b,c,e,f,g)}let j=Date.now(),k=b-1-f,l=-1,m=null;for(let a=1;!(Date.now()-j>=g.timeBudget);a++){let b=k-g.windowSize*a;c.lastIndex=Math.max(0,b);let d=function(a,b,c,d){let e;for(;e=a.exec(b);){let b=e.index||0;if(b<=c&&a.lastIndex>=c)return e;if(d>0&&b>d)break}return null}(c,e,k,l);if(!d&&m||(m=d,b<=0))break;l=b}if(m){let a={word:m[0],startColumn:f+1+m.index,endColumn:f+1+m.index+m[0].length};return c.lastIndex=0,a}return null}});var d=c(47309),e=c(14322);let f="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",g=function(a=""){let b="(-?\\d*\\.\\d\\w*)|([^";for(let c of f)a.indexOf(c)>=0||(b+="\\"+c);return RegExp(b+="\\s]+)","g")}();function h(a){let b=g;if(a&&a instanceof RegExp)if(a.global)b=a;else{let c="g";a.ignoreCase&&(c+="i"),a.multiline&&(c+="m"),a.unicode&&(c+="u"),b=new RegExp(a.source,c)}return b.lastIndex=0,b}let i=new e.w;i.unshift({maxLen:1e3,windowSize:15,timeBudget:150})},57616:(a,b,c)=>{"use strict";c.d(b,{t:()=>d});let d={RESOURCES:"ResourceURLs",TEXT:c(57667).K.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}},57667:(a,b,c)=>{"use strict";c.d(b,{K:()=>d});let d=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list",html:"text/html"})},57687:(a,b,c)=>{"use strict";c.d(b,{TN:()=>i,fO:()=>j});var d=c(58254),e=c(76631),f=c(7092),g=c(75082),h=function(a,b){return function(c,d){b(c,d,a)}};let i=(0,d.u1)("hoverService"),j=class extends e.jG{get delay(){return this.isInstantlyHovering()?0:this.hoverOptions?.dynamicDelay?a=>this.hoverOptions?.dynamicDelay?.(a)??this._delay:this._delay}constructor(a,b,c={},d,f){super(),this.placement=a,this.hoverOptions=b,this.overrideOptions=c,this.configurationService=d,this.hoverService=f,this.lastHoverHideTime=0,this.timeLimit=200,this.hoverDisposables=this._register(new e.Cm),this._delay=this.configurationService.getValue("workbench.hover.delay"),this._register(this.configurationService.onDidChangeConfiguration(a=>{a.affectsConfiguration("workbench.hover.delay")&&(this._delay=this.configurationService.getValue("workbench.hover.delay"))}))}showHover(a,b){let c="function"==typeof this.overrideOptions?this.overrideOptions(a,b):this.overrideOptions;for(let b of(this.hoverDisposables.clear(),(0,g.sb)(a.target)?[a.target]:a.target.targetElements))this.hoverDisposables.add((0,g.un)(b,"keydown",a=>{a.equals(9)&&this.hoverService.hideHover()}));let d=(0,g.sb)(a.content)?void 0:"string"==typeof a.content?a.content.toString():a.content.value;return this.hoverService.showInstantHover({...a,...c,persistence:{hideOnKeyDown:!0,...c.persistence},id:d,appearance:{...a.appearance,compact:!0,skipFadeInAnimation:this.isInstantlyHovering(),...c.appearance}},b)}isInstantlyHovering(){return!!this.hoverOptions?.instantHover&&Date.now()-this.lastHoverHideTime<this.timeLimit}onDidHideHover(){this.hoverDisposables.clear(),this.hoverOptions?.instantHover&&(this.lastHoverHideTime=Date.now())}};j=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([h(3,f.pG),h(4,i)],j)},57758:(a,b,c)=>{"use strict";c.d(b,{q:()=>e});class d{constructor(){this._nativeEditContextMapping=new Map}register(a,b){return this._nativeEditContextMapping.set(a,b),{dispose:()=>{this._nativeEditContextMapping.delete(a)}}}get(a){return this._nativeEditContextMapping.get(a)}}let e=new d},57773:(a,b,c)=>{"use strict";function d(a){return a}c.d(b,{VV:()=>f,o5:()=>e});class e{constructor(a,b){this.lastCache=void 0,this.lastArgKey=void 0,"function"==typeof a?(this._fn=a,this._computeKey=d):(this._fn=b,this._computeKey=a.getCacheKey)}get(a){let b=this._computeKey(a);return this.lastArgKey!==b&&(this.lastArgKey=b,this.lastCache=this._fn(a)),this.lastCache}}class f{get cachedValues(){return this._map}constructor(a,b){this._map=new Map,this._map2=new Map,"function"==typeof a?(this._fn=a,this._computeKey=d):(this._fn=b,this._computeKey=a.getCacheKey)}get(a){let b=this._computeKey(a);if(this._map2.has(b))return this._map2.get(b);let c=this._fn(a);return this._map.set(a,c),this._map2.set(b,c),c}}},58254:(a,b,c)=>{"use strict";var d,e;c.d(b,{_$:()=>d,_Y:()=>f,u1:()=>g}),(e=d||(d={})).serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(a){return a[e.DI_DEPENDENCIES]||[]};let f=g("instantiationService");function g(a){if(d.serviceIds.has(a))return d.serviceIds.get(a);let b=function(a,c,e){if(3!=arguments.length)throw Error("@IServiceName-decorator can only be used to decorate a parameter");a[d.DI_TARGET]===a?a[d.DI_DEPENDENCIES].push({id:b,index:e}):(a[d.DI_DEPENDENCIES]=[{id:b,index:e}],a[d.DI_TARGET]=a)};return b.toString=()=>a,d.serviceIds.set(a,b),b}},58330:(a,b,c)=>{"use strict";c.d(b,{BT:()=>n,WM:()=>h,bX:()=>j,cI:()=>l,gn:()=>k,mh:()=>m,zR:()=>i});var d=c(72816),e=c(55404),f=c(37327),g=c(34183);(0,f.x1)("sash.hoverBorder",g.tA,(0,d.kg)(2062,"Border color of active sashes."));let h=(0,f.x1)("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:e.Q1.black,hcLight:"#0F4A85"},(0,d.kg)(2063,"Badge background color. Badges are small information labels, e.g. for search results count.")),i=(0,f.x1)("badge.foreground",{dark:e.Q1.white,light:"#333",hcDark:e.Q1.white,hcLight:e.Q1.white},(0,d.kg)(2064,"Badge foreground color. Badges are small information labels, e.g. for search results count."));(0,f.x1)("activityWarningBadge.foreground",{dark:e.Q1.white,light:e.Q1.white,hcDark:e.Q1.white,hcLight:e.Q1.white},(0,d.kg)(2065,"Foreground color of the warning activity badge")),(0,f.x1)("activityWarningBadge.background",{dark:"#B27C00",light:"#B27C00",hcDark:null,hcLight:"#B27C00"},(0,d.kg)(2066,"Background color of the warning activity badge")),(0,f.x1)("activityErrorBadge.foreground",{dark:e.Q1.black.lighten(.2),light:e.Q1.white,hcDark:null,hcLight:e.Q1.black.lighten(.2)},(0,d.kg)(2067,"Foreground color of the error activity badge")),(0,f.x1)("activityErrorBadge.background",{dark:"#F14C4C",light:"#E51400",hcDark:null,hcLight:"#F14C4C"},(0,d.kg)(2068,"Background color of the error activity badge"));let j=(0,f.x1)("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},(0,d.kg)(2069,"Scrollbar shadow to indicate that the view is scrolled.")),k=(0,f.x1)("scrollbarSlider.background",{dark:e.Q1.fromHex("#797979").transparent(.4),light:e.Q1.fromHex("#646464").transparent(.4),hcDark:(0,f.JO)(g.b1,.6),hcLight:(0,f.JO)(g.b1,.4)},(0,d.kg)(2070,"Scrollbar slider background color.")),l=(0,f.x1)("scrollbarSlider.hoverBackground",{dark:e.Q1.fromHex("#646464").transparent(.7),light:e.Q1.fromHex("#646464").transparent(.7),hcDark:(0,f.JO)(g.b1,.8),hcLight:(0,f.JO)(g.b1,.8)},(0,d.kg)(2071,"Scrollbar slider background color when hovering.")),m=(0,f.x1)("scrollbarSlider.activeBackground",{dark:e.Q1.fromHex("#BFBFBF").transparent(.4),light:e.Q1.fromHex("#000000").transparent(.6),hcDark:g.b1,hcLight:g.b1},(0,d.kg)(2072,"Scrollbar slider background color when clicked on."));(0,f.x1)("scrollbar.background",null,(0,d.kg)(2073,"Scrollbar track background color."));let n=(0,f.x1)("progressBar.background",{dark:e.Q1.fromHex("#0E70C0"),light:e.Q1.fromHex("#0E70C0"),hcDark:g.b1,hcLight:g.b1},(0,d.kg)(2074,"Background color of the progress bar that can show for long running operations."));(0,f.x1)("chart.line",{dark:"#236B8E",light:"#236B8E",hcDark:"#236B8E",hcLight:"#236B8E"},(0,d.kg)(2075,"Line color for the chart.")),(0,f.x1)("chart.axis",{dark:e.Q1.fromHex("#BFBFBF").transparent(.4),light:e.Q1.fromHex("#000000").transparent(.6),hcDark:g.b1,hcLight:g.b1},(0,d.kg)(2076,"Axis color for the chart.")),(0,f.x1)("chart.guide",{dark:e.Q1.fromHex("#BFBFBF").transparent(.2),light:e.Q1.fromHex("#000000").transparent(.2),hcDark:g.b1,hcLight:g.b1},(0,d.kg)(2077,"Guide line for the chart."))},58697:(a,b,c)=>{"use strict";c.d(b,{h:()=>d});let d=(0,c(58254).u1)("clipboardService")},58780:(a,b,c)=>{"use strict";c.d(b,{aG:()=>k,uO:()=>j});var d=c(88042),e=c(39482),f=c(6812),g=c(61822);class h{getOffsetRange(a){return new e.L(this.getOffset(a.getStartPosition()),this.getOffset(a.getEndPosition()))}getRange(a){return g.Q.fromPositions(this.getPosition(a.start),this.getPosition(a.endExclusive))}getStringReplacement(a){return new i.deps.StringReplacement(this.getOffsetRange(a.range),a.text)}getTextReplacement(a){return new i.deps.TextReplacement(this.getRange(a.replaceRange),a.newText)}getTextEdit(a){let b=a.replacements.map(a=>this.getTextReplacement(a));return new i.deps.TextEdit(b)}}class i{static{this._deps=void 0}static get deps(){if(!this._deps)throw Error("Dependencies not set. Call _setDependencies first.");return this._deps}}function j(a){i._deps=a}class k extends h{constructor(a){super(),this.text=a}get lineStartOffsetByLineIdx(){return this._lineStartOffsetByLineIdx||this._computeLineOffsets(),this._lineStartOffsetByLineIdx}get lineEndOffsetByLineIdx(){return this._lineEndOffsetByLineIdx||this._computeLineOffsets(),this._lineEndOffsetByLineIdx}_computeLineOffsets(){this._lineStartOffsetByLineIdx=[],this._lineEndOffsetByLineIdx=[],this._lineStartOffsetByLineIdx.push(0);for(let a=0;a<this.text.length;a++)"\n"===this.text.charAt(a)&&(this._lineStartOffsetByLineIdx.push(a+1),a>0&&"\r"===this.text.charAt(a-1)?this._lineEndOffsetByLineIdx.push(a-1):this._lineEndOffsetByLineIdx.push(a));this._lineEndOffsetByLineIdx.push(this.text.length)}getOffset(a){let b=this._validatePosition(a);return this.lineStartOffsetByLineIdx[b.lineNumber-1]+b.column-1}_validatePosition(a){if(a.lineNumber<1)return new f.y(1,1);let b=this.textLength.lineCount+1;if(a.lineNumber>b){let a=this.getLineLength(b);return new f.y(b,a+1)}if(a.column<1)return new f.y(a.lineNumber,1);let c=this.getLineLength(a.lineNumber);return a.column-1>c?new f.y(a.lineNumber,c+1):a}getPosition(a){let b=(0,d.iM)(this.lineStartOffsetByLineIdx,b=>b<=a),c=a-this.lineStartOffsetByLineIdx[b]+1;return new f.y(b+1,c)}get textLength(){let a=this.lineStartOffsetByLineIdx.length-1;return new i.deps.TextLength(a,this.text.length-this.lineStartOffsetByLineIdx[a])}getLineLength(a){return this.lineEndOffsetByLineIdx[a-1]-this.lineStartOffsetByLineIdx[a-1]}}},58841:()=>{},59018:(a,b,c)=>{"use strict";c.d(b,{m:()=>v});var d,e,f=c(75082),g=c(42913),h=c(73298),i=c(34793),j=c(70687),k=c(90605),l=c(95091),m=c(76631),n=c(18216);c(26045);var o=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g};(d=e||(e={})).North="north",d.South="south",d.East="east",d.West="west";let p=new l.vl,q=new l.vl;class r{constructor(a){this.el=a,this.disposables=new m.Cm}get onPointerMove(){return this.disposables.add(new h.f((0,f.zk)(this.el),"mousemove")).event}get onPointerUp(){return this.disposables.add(new h.f((0,f.zk)(this.el),"mouseup")).event}dispose(){this.disposables.dispose()}}o([k.B],r.prototype,"onPointerMove",null),o([k.B],r.prototype,"onPointerUp",null);class s{get onPointerMove(){return this.disposables.add(new h.f(this.el,i.B.Change)).event}get onPointerUp(){return this.disposables.add(new h.f(this.el,i.B.End)).event}constructor(a){this.el=a,this.disposables=new m.Cm}dispose(){this.disposables.dispose()}}o([k.B],s.prototype,"onPointerMove",null),o([k.B],s.prototype,"onPointerUp",null);class t{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(a){this.factory=a}dispose(){}}o([k.B],t.prototype,"onPointerMove",null),o([k.B],t.prototype,"onPointerUp",null);let u="pointer-events-disabled";class v extends m.jG{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(a){this._state!==a&&(this.el.classList.toggle("disabled",0===a),this.el.classList.toggle("minimum",1===a),this.el.classList.toggle("maximum",2===a),this._state=a,this.onDidEnablementChange.fire(a))}get onDidStart(){return this._onDidStart.event}get onDidChange(){return this._onDidChange.event}get onDidReset(){return this._onDidReset.event}get onDidEnd(){return this._onDidEnd.event}set orthogonalStartSash(a){if(this._orthogonalStartSash!==a){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),a){let b=b=>{this.orthogonalStartDragHandleDisposables.clear(),0!==b&&(this._orthogonalStartDragHandle=(0,f.BC)(this.el,(0,f.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,m.s)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add((0,f.ko)(this._orthogonalStartDragHandle,"mouseenter",()=>v.onMouseEnter(a))),this.orthogonalStartDragHandleDisposables.add((0,f.ko)(this._orthogonalStartDragHandle,"mouseleave",()=>v.onMouseLeave(a))))};this.orthogonalStartSashDisposables.add(a.onDidEnablementChange.event(b,this)),b(a.state)}this._orthogonalStartSash=a}}set orthogonalEndSash(a){if(this._orthogonalEndSash!==a){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),a){let b=b=>{this.orthogonalEndDragHandleDisposables.clear(),0!==b&&(this._orthogonalEndDragHandle=(0,f.BC)(this.el,(0,f.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,m.s)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add((0,f.ko)(this._orthogonalEndDragHandle,"mouseenter",()=>v.onMouseEnter(a))),this.orthogonalEndDragHandleDisposables.add((0,f.ko)(this._orthogonalEndDragHandle,"mouseleave",()=>v.onMouseLeave(a))))};this.orthogonalEndSashDisposables.add(a.onDidEnablementChange.event(b,this)),b(a.state)}this._orthogonalEndSash=a}}constructor(a,b,c){let d;super(),this.hoverDelay=300,this.hoverDelayer=this._register(new j.ve(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new l.vl),this._onDidStart=this._register(new l.vl),this._onDidChange=this._register(new l.vl),this._onDidReset=this._register(new l.vl),this._onDidEnd=this._register(new l.vl),this.orthogonalStartSashDisposables=this._register(new m.Cm),this.orthogonalStartDragHandleDisposables=this._register(new m.Cm),this.orthogonalEndSashDisposables=this._register(new m.Cm),this.orthogonalEndDragHandleDisposables=this._register(new m.Cm),this.linkedSash=void 0,this.el=(0,f.BC)(a,(0,f.$)(".monaco-sash")),c.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${c.orthogonalEdge}`),n.zx&&this.el.classList.add("mac"),this._register((0,f.ko)(this.el,"mousedown",b=>this.onPointerStart(b,new r(a)))),this._register((0,f.ko)(this.el,"dblclick",a=>this.onPointerDoublePress(a))),this._register((0,f.ko)(this.el,"mouseenter",()=>v.onMouseEnter(this))),this._register((0,f.ko)(this.el,"mouseleave",()=>v.onMouseLeave(this))),this._register(i.q.addTarget(this.el)),this._register((0,f.ko)(this.el,i.B.Start,a=>this.onPointerStart(a,new s(this.el)))),this._register((0,f.ko)(this.el,i.B.Tap,a=>{if(d){clearTimeout(d),d=void 0,this.onPointerDoublePress(a);return}clearTimeout(d),d=setTimeout(()=>d=void 0,250)})),"number"==typeof c.size?(this.size=c.size,0===c.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(p.event(a=>{this.size=a,this.layout()}))),this._register(q.event(a=>this.hoverDelay=a)),this.layoutProvider=b,this.orthogonalStartSash=c.orthogonalStartSash,this.orthogonalEndSash=c.orthogonalEndSash,this.orientation=c.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}onPointerStart(a,b){f.fs.stop(a);let c=!1;if(!a.__orthogonalSashEvent){let d=this.getOrthogonalSash(a);d&&(c=!0,a.__orthogonalSashEvent=!0,d.onPointerStart(a,new t(b)))}if(this.linkedSash&&!a.__linkedSashEvent&&(a.__linkedSashEvent=!0,this.linkedSash.onPointerStart(a,new t(b))),!this.state)return;let d=this.el.ownerDocument.getElementsByTagName("iframe");for(let a of d)a.classList.add(u);let e=a.pageX,h=a.pageY,i=a.altKey;this.el.classList.add("active"),this._onDidStart.fire({startX:e,currentX:e,startY:h,currentY:h,altKey:i});let j=(0,g.li)(this.el),k=()=>{let a="";a=c?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":n.zx?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":n.zx?"col-resize":"ew-resize",j.textContent=`* { cursor: ${a} !important; }`},l=new m.Cm;k(),c||this.onDidEnablementChange.event(k,null,l);let o=a=>{f.fs.stop(a,!1);let b={startX:e,currentX:a.pageX,startY:h,currentY:a.pageY,altKey:i};this._onDidChange.fire(b)},p=a=>{for(let b of(f.fs.stop(a,!1),j.remove(),this.el.classList.remove("active"),this._onDidEnd.fire(),l.dispose(),d))b.classList.remove(u)};b.onPointerMove(o,null,l),b.onPointerUp(p,null,l),l.add(b)}onPointerDoublePress(a){let b=this.getOrthogonalSash(a);b&&b._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(a,b=!1){a.el.classList.contains("active")?(a.hoverDelayer.cancel(),a.el.classList.add("hover")):a.hoverDelayer.trigger(()=>a.el.classList.add("hover"),a.hoverDelay).then(void 0,()=>{}),!b&&a.linkedSash&&v.onMouseEnter(a.linkedSash,!0)}static onMouseLeave(a,b=!1){a.hoverDelayer.cancel(),a.el.classList.remove("hover"),!b&&a.linkedSash&&v.onMouseLeave(a.linkedSash,!0)}clearSashHoverState(){v.onMouseLeave(this)}layout(){if(0===this.orientation){let a=this.layoutProvider;this.el.style.left=a.getVerticalSashLeft(this)-this.size/2+"px",a.getVerticalSashTop&&(this.el.style.top=a.getVerticalSashTop(this)+"px"),a.getVerticalSashHeight&&(this.el.style.height=a.getVerticalSashHeight(this)+"px")}else{let a=this.layoutProvider;this.el.style.top=a.getHorizontalSashTop(this)-this.size/2+"px",a.getHorizontalSashLeft&&(this.el.style.left=a.getHorizontalSashLeft(this)+"px"),a.getHorizontalSashWidth&&(this.el.style.width=a.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(a){let b=a.initialTarget??a.target;if(b&&(0,f.sb)(b)&&b.classList.contains("orthogonal-drag-handle"))return b.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}},59502:(a,b,c)=>{"use strict";c.d(b,{k:()=>d});let d=(0,c(58254).u1)("environmentService")},59708:()=>{},59825:(a,b,c)=>{"use strict";c.d(b,{Z:()=>l});var d=c(55900),e=c(78014);c(95091),c(76631);var f=c(87175),g=c(54265),h=c(61811),i=c(87873);class j extends i.ZK{get debugName(){return this._debugNameData.getDebugName(this)??"LazyObservableValue"}constructor(a,b,c,d){super(d),this._debugNameData=a,this._equalityComparator=c,this._isUpToDate=!0,this._deltas=[],this._updateCounter=0,this._value=b}get(){return this._update(),this._value}_update(){if(!this._isUpToDate)if(this._isUpToDate=!0,this._deltas.length>0){for(let a of this._deltas)for(let b of((0,h.t)()?.handleObservableUpdated(this,{change:a,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0}),this._observers))b.handleChange(this,a);this._deltas.length=0}else for(let a of((0,h.t)()?.handleObservableUpdated(this,{change:void 0,didChange:!0,oldValue:"(unknown)",newValue:this._value,hadValue:!0}),this._observers))a.handleChange(this,void 0)}_beginUpdate(){if(this._updateCounter++,1===this._updateCounter)for(let a of this._observers)a.beginUpdate(this)}_endUpdate(){if(this._updateCounter--,0===this._updateCounter)for(let a of(this._update(),[...this._observers]))a.endUpdate(this)}addObserver(a){let b=!this._observers.has(a)&&this._updateCounter>0;super.addObserver(a),b&&a.beginUpdate(this)}removeObserver(a){let b=this._observers.has(a)&&this._updateCounter>0;super.removeObserver(a),b&&a.endUpdate(this)}set(a,b,c){let d;if(!(void 0===c&&this._equalityComparator(this._value,a))){b||(b=d=new g.XL(()=>{},()=>`Setting ${this.debugName}`));try{if(this._isUpToDate=!1,this._setValue(a),void 0!==c&&this._deltas.push(c),b.updateObserver({beginUpdate:()=>this._beginUpdate(),endUpdate:()=>this._endUpdate(),handleChange:(a,b)=>{},handlePossibleChange:a=>{}},this),this._updateCounter>1)for(let a of this._observers)a.handlePossibleChange(this)}finally{d&&d.finish()}}}toString(){return`${this.debugName}: ${this._value}`}_setValue(a){this._value=a}}var k=c(74864);function l(a,b,c=k.j.ofCaller()){return a.lazy?new j(new d.nA(a.owner,a.debugName,void 0),b,a.equalsFn??e.nx,c):new f.Lj(new d.nA(a.owner,a.debugName,void 0),b,a.equalsFn??e.nx,c)}},59849:()=>{},59989:(a,b,c)=>{"use strict";let d,e,f;c.r(b),c.d(b,{CancellationTokenSource:()=>kP,Emitter:()=>kQ,KeyCode:()=>kR,KeyMod:()=>kS,MarkerSeverity:()=>kX,MarkerTag:()=>kY,Position:()=>kT,Range:()=>kU,Selection:()=>kV,SelectionDirection:()=>kW,Token:()=>k$,Uri:()=>kZ,editor:()=>k_,languages:()=>k0});var g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y=c(21495),Z=c(91328),$=c(27612),_=c(76631),aa=c(26529),ab=c(54957);c(6205);var ac=c(69907),ad=c(33402),ae=c(13352),af=c(74893);class ag extends af.Z{constructor(a,b,c){super(c.worker,c.keepIdleModels||!1,a,b),this._foreignModuleHost=c.host||null,this._foreignProxy=this._getProxy().then(a=>new Proxy({},{get(b,c,d){if("then"!==c){if("string"!=typeof c)throw Error("Not supported");return(...b)=>a.$fmr(c,b)}}}))}fhr(a,b){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[a])return Promise.reject(Error("Missing method "+a+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[a].apply(this._foreignModuleHost,b))}catch(a){return Promise.reject(a)}}getProxy(){return this._foreignProxy}withSyncedResources(a){return this.workerWithSyncedResources(a).then(a=>this.getProxy())}}var ah=c(91902),ai=c(55385),aj=c(49679),ak=c(36036),al=c(81325),am=c(86444),an=c(45719),ao=c(94630),ap=c(99817),aq=c(33896),ar=c(80544),as=c(91324),at=c(32920),au=c(90637);function av(a){return"string"==typeof a}function aw(a,b){return a.ignoreCase&&b?b.toLowerCase():b}function ax(a){return a.replace(/[&<>'"_]/g,"-")}function ay(a,b){return Error(`${a.languageId}: ${b}`)}function az(a,b,c,d,e){let f=null;return b.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,function(b,g,h,i,j,k,l,m,n){return h?"$":i?aw(a,c):j&&j<d.length?aw(a,d[j]):l&&a&&"string"==typeof a[l]?a[l]:(null===f&&(f=e.split(".")).unshift(e),k&&k<f.length)?aw(a,f[k]):""})}function aA(a,b){let c=b;for(;c&&c.length>0;){let b=a.tokenizer[c];if(b)return b;let d=c.lastIndexOf(".");c=d<0?null:c.substr(0,d)}return null}var aB=c(7092);class aC{static{this._INSTANCE=new aC(5)}static create(a,b){return this._INSTANCE.create(a,b)}constructor(a){this._maxCacheDepth=a,this._entries=Object.create(null)}create(a,b){if(null!==a&&a.depth>=this._maxCacheDepth)return new aD(a,b);let c=aD.getStackElementId(a);c.length>0&&(c+="|"),c+=b;let d=this._entries[c];return d||(d=new aD(a,b),this._entries[c]=d),d}}class aD{constructor(a,b){this.parent=a,this.state=b,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(a){let b="";for(;null!==a;)b.length>0&&(b+="|"),b+=a.state,a=a.parent;return b}static _equals(a,b){for(;null!==a&&null!==b;){if(a===b)return!0;if(a.state!==b.state)return!1;a=a.parent,b=b.parent}return null===a&&null===b}equals(a){return aD._equals(this,a)}push(a){return aC.create(this,a)}pop(){return this.parent}popall(){let a=this;for(;a.parent;)a=a.parent;return a}switchTo(a){return aC.create(this.parent,a)}}class aE{constructor(a,b){this.languageId=a,this.state=b}equals(a){return this.languageId===a.languageId&&this.state.equals(a.state)}clone(){return this.state.clone()===this.state?this:new aE(this.languageId,this.state)}}class aF{static{this._INSTANCE=new aF(5)}static create(a,b){return this._INSTANCE.create(a,b)}constructor(a){this._maxCacheDepth=a,this._entries=Object.create(null)}create(a,b){if(null!==b||null!==a&&a.depth>=this._maxCacheDepth)return new aG(a,b);let c=aD.getStackElementId(a),d=this._entries[c];return d||(d=new aG(a,null),this._entries[c]=d),d}}class aG{constructor(a,b){this.stack=a,this.embeddedLanguageData=b}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:aF.create(this.stack,this.embeddedLanguageData)}equals(a){return a instanceof aG&&!!this.stack.equals(a.stack)&&(null===this.embeddedLanguageData&&null===a.embeddedLanguageData||null!==this.embeddedLanguageData&&null!==a.embeddedLanguageData&&this.embeddedLanguageData.equals(a.embeddedLanguageData))}}class aH{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(a){this._languageId=a}emit(a,b){(this._lastTokenType!==b||this._lastTokenLanguage!==this._languageId)&&(this._lastTokenType=b,this._lastTokenLanguage=this._languageId,this._tokens.push(new ak.ou(a,b,this._languageId)))}nestedLanguageTokenize(a,b,c,d){let e=c.languageId,f=c.state,g=ak.dG.get(e);if(!g)return this.enterLanguage(e),this.emit(d,""),f;let h=g.tokenize(a,b,f);if(0!==d)for(let a of h.tokens)this._tokens.push(new ak.ou(a.offset+d,a.type,a.language));else this._tokens=this._tokens.concat(h.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,h.endState}finalize(a){return new ak.$M(this._tokens,a)}}class aI{constructor(a,b){this._languageService=a,this._theme=b,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(a){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(a)}emit(a,b){let c=1024|this._theme.match(this._currentLanguageId,b);this._lastTokenMetadata!==c&&(this._lastTokenMetadata=c,this._tokens.push(a),this._tokens.push(c))}static _merge(a,b,c){let d=null!==a?a.length:0,e=b.length,f=null!==c?c.length:0;if(0===d&&0===e&&0===f)return new Uint32Array(0);if(0===d&&0===e)return c;if(0===e&&0===f)return a;let g=new Uint32Array(d+e+f);null!==a&&g.set(a);for(let a=0;a<e;a++)g[d+a]=b[a];return null!==c&&g.set(c,d+e),g}nestedLanguageTokenize(a,b,c,d){let e=c.languageId,f=c.state,g=ak.dG.get(e);if(!g)return this.enterLanguage(e),this.emit(d,""),f;let h=g.tokenizeEncoded(a,b,f);if(0!==d)for(let a=0,b=h.tokens.length;a<b;a+=2)h.tokens[a]+=d;return this._prependTokens=aI._merge(this._prependTokens,this._tokens,h.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,h.endState}finalize(a){return new ak.rY(aI._merge(this._prependTokens,this._tokens,null),[],a)}}let aJ=A=class extends _.jG{constructor(a,b,c,d,e){super(),this._configurationService=e,this._languageService=a,this._standaloneThemeService=b,this._languageId=c,this._lexer=d,this._embeddedLanguages=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let f=!1;this._register(ak.dG.onDidChange(a=>{if(f)return;let b=!1;for(let c=0,d=a.changedLanguages.length;c<d;c++){let d=a.changedLanguages[c];if(this._embeddedLanguages[d]){b=!0;break}}b&&(f=!0,ak.dG.handleChange([this._languageId]),f=!1)})),this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}),this._register(this._configurationService.onDidChangeConfiguration(a=>{a.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){let a=[];for(let b in this._embeddedLanguages){let c=ak.dG.get(b);if(c){if(c instanceof A){let b=c.getLoadStatus();!1===b.loaded&&a.push(b.promise)}continue}ak.dG.isResolved(b)||a.push(ak.dG.getOrCreate(b))}return 0===a.length?{loaded:!0}:{loaded:!1,promise:Promise.all(a).then(a=>void 0)}}getInitialState(){let a=aC.create(null,this._lexer.start);return aF.create(a,null)}tokenize(a,b,c){if(a.length>=this._maxTokenizationLineLength)return(0,an.$H)(this._languageId,c);let d=new aH,e=this._tokenize(a,b,c,d);return d.finalize(e)}tokenizeEncoded(a,b,c){if(a.length>=this._maxTokenizationLineLength)return(0,an.Lh)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),c);let d=new aI(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),e=this._tokenize(a,b,c,d);return d.finalize(e)}_tokenize(a,b,c,d){return c.embeddedLanguageData?this._nestedTokenize(a,b,c,0,d):this._myTokenize(a,b,c,0,d)}_findLeavingNestedLanguageOffset(a,b){let c=this._lexer.tokenizer[b.stack.state];if(!c&&!(c=aA(this._lexer,b.stack.state)))throw ay(this._lexer,"tokenizer state is not defined: "+b.stack.state);let d=-1,e=!1;for(let f of c){if(av(f.action)||!("@pop"===f.action.nextEmbedded||f.action.hasEmbeddedEndInCases))continue;e=!0;let c=f.resolveRegex(b.stack.state),g=c.source;if("^(?:"===g.substr(0,4)&&")"===g.substr(g.length-1,1)){let a=(c.ignoreCase?"i":"")+(c.unicode?"u":"");c=new RegExp(g.substr(4,g.length-5),a)}let h=a.search(c);-1!==h&&(0===h||!f.matchOnlyAtLineStart)&&(-1===d||h<d)&&(d=h)}if(!e)throw ay(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+b.stack.state);return d}_nestedTokenize(a,b,c,d,e){let f=this._findLeavingNestedLanguageOffset(a,c);if(-1===f){let f=e.nestedLanguageTokenize(a,b,c.embeddedLanguageData,d);return aF.create(c.stack,new aE(c.embeddedLanguageData.languageId,f))}let g=a.substring(0,f);g.length>0&&e.nestedLanguageTokenize(g,!1,c.embeddedLanguageData,d);let h=a.substring(f);return this._myTokenize(h,b,c,d+f,e)}_safeRuleName(a){return a?a.name:"(unknown)"}_myTokenize(a,b,c,d,e){e.enterLanguage(this._languageId);let f=a.length,g=b&&this._lexer.includeLF?a+"\n":a,h=g.length,i=c.embeddedLanguageData,j=c.stack,k=0,l=null,m=!0;for(;m||k<h;){let c=k,p=j.depth,q=l?l.groups.length:0,r=j.state,s=null,t=null,u=null,v=null,w=null;if(l){s=l.matches;let a=l.groups.shift();t=a.matched,u=a.action,v=l.rule,0===l.groups.length&&(l=null)}else{if(!m&&k>=h)break;m=!1;let a=this._lexer.tokenizer[r];if(!a&&!(a=aA(this._lexer,r)))throw ay(this._lexer,"tokenizer state is not defined: "+r);let b=g.substr(k);for(let c of a)if((0===k||!c.matchOnlyAtLineStart)&&(s=b.match(c.resolveRegex(r)))){t=s[0],u=c.action;break}}if(s||(s=[""],t=""),u||(k<h&&(t=(s=[g.charAt(k)])[0]),u=this._lexer.defaultToken),null===t)break;for(k+=t.length;!Array.isArray(u)&&!av(u)&&u.test;)u=u.test(t,s,r,k===h);let x=null;if("string"==typeof u||Array.isArray(u))x=u;else if(u.group)x=u.group;else if(null!==u.token&&void 0!==u.token){var n,o;if(x=u.tokenSubst?az(this._lexer,u.token,t,s,r):u.token,u.nextEmbedded)if("@pop"===u.nextEmbedded){if(!i)throw ay(this._lexer,"cannot pop embedded language if not inside one");i=null}else if(i)throw ay(this._lexer,"cannot enter embedded language from within an embedded language");else w=az(this._lexer,u.nextEmbedded,t,s,r);if(u.goBack&&(k=Math.max(0,k-u.goBack)),u.switchTo&&"string"==typeof u.switchTo){let a=az(this._lexer,u.switchTo,t,s,r);if("@"===a[0]&&(a=a.substr(1)),aA(this._lexer,a))j=j.switchTo(a);else throw ay(this._lexer,"trying to switch to a state '"+a+"' that is undefined in rule: "+this._safeRuleName(v))}else if(u.transform&&"function"==typeof u.transform)throw ay(this._lexer,"action.transform not supported");else if(u.next)if("@push"===u.next)if(j.depth>=this._lexer.maxStack)throw ay(this._lexer,"maximum tokenizer stack size reached: ["+j.state+","+j.parent.state+",...]");else j=j.push(r);else if("@pop"===u.next)if(j.depth<=1)throw ay(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(v));else j=j.pop();else if("@popall"===u.next)j=j.popall();else{let a=az(this._lexer,u.next,t,s,r);if("@"===a[0]&&(a=a.substr(1)),aA(this._lexer,a))j=j.push(a);else throw ay(this._lexer,"trying to set a next state '"+a+"' that is undefined in rule: "+this._safeRuleName(v))}u.log&&"string"==typeof u.log&&(n=this._lexer,o=this._lexer.languageId+": "+az(this._lexer,u.log,t,s,r),console.log(`${n.languageId}: ${o}`))}if(null===x)throw ay(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(v));let y=c=>{let f=this._languageService.getLanguageIdByLanguageName(c)||this._languageService.getLanguageIdByMimeType(c)||c,g=this._getNestedEmbeddedLanguageData(f);if(!(k<h))return aF.create(j,g);{let c=a.substr(k);return this._nestedTokenize(c,b,aF.create(j,g),d+k,e)}};if(Array.isArray(x)){if(l&&l.groups.length>0)throw ay(this._lexer,"groups cannot be nested: "+this._safeRuleName(v));if(s.length!==x.length+1)throw ay(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(v));let a=0;for(let b=1;b<s.length;b++)a+=s[b].length;if(a!==t.length)throw ay(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(v));l={rule:v,matches:s,groups:[]};for(let a=0;a<x.length;a++)l.groups[a]={action:x[a],matched:s[a+1]};k-=t.length;continue}{if("@rematch"===x&&(k-=t.length,t="",s=null,x="",null!==w))return y(w);if(0===t.length)if(0===h||p!==j.depth||r!==j.state||(l?l.groups.length:0)!==q)continue;else throw ay(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(v));let a=null;if(av(x)&&0===x.indexOf("@brackets")){let b=x.substr(9),c=function(a,b){if(!b)return null;for(let c of(b=aw(a,b),a.brackets))if(c.open===b)return{token:c.token,bracketType:1};else if(c.close===b)return{token:c.token,bracketType:-1};return null}(this._lexer,t);if(!c)throw ay(this._lexer,"@brackets token returned but no bracket defined as: "+t);a=ax(c.token+b)}else a=ax(""===x?"":x+this._lexer.tokenPostfix);c<f&&e.emit(c+d,a)}if(null!==w)return y(w)}return aF.create(j,i)}_getNestedEmbeddedLanguageData(a){if(!this._languageService.isRegisteredLanguageId(a))return new aE(a,an.r3);a!==this._languageId&&(this._languageService.requestBasicLanguageFeatures(a),ak.dG.getOrCreate(a),this._embeddedLanguages[a]=!0);let b=ak.dG.get(a);return b?new aE(a,b.getInitialState()):new aE(a,an.r3)}};aJ=A=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([(g=aB.pG,function(a,b){g(a,b,4)})],aJ);let aK=(0,ar.H)("standaloneColorizer",{createHTML:a=>a});class aL{static colorizeElement(a,b,c,d){let e=(d=d||{}).theme||"vs",f=d.mimeType||c.getAttribute("lang")||c.getAttribute("data-lang");if(!f)return console.error("Mode not detected"),Promise.resolve();let g=b.getLanguageIdByMimeType(f)||f;a.setTheme(e);let h=c.firstChild?c.firstChild.nodeValue:"";return c.className+=" "+e,this.colorize(b,h||"",g,d).then(a=>{c.innerHTML=aK?.createHTML(a)??a},a=>console.error(a))}static async colorize(a,b,c,d){var e,f,g,h;let i=a.languageIdCodec,j=4;d&&"number"==typeof d.tabSize&&(j=d.tabSize),(0,aa.LU)(b)&&(b=b.substr(1));let k=(0,aa.uz)(b);if(!a.isRegisteredLanguageId(c))return aM(k,j,i);let l=await ak.dG.getOrCreate(c);return l?(e=k,f=j,g=l,h=i,new Promise((a,b)=>{let c=()=>{let d=function(a,b,c,d){let e=[],f=c.getInitialState();for(let g=0,h=a.length;g<h;g++){let h=a[g],i=c.tokenizeEncoded(h,!0,f);as.f7.convertToEndOffset(i.tokens,h.length);let j=new as.f7(i.tokens,h,d),k=au.qL.isBasicASCII(h,!0),l=au.qL.containsRTL(h,k,!0),m=(0,at.Md)(new at.zL(!1,!0,h,!1,k,l,0,j.inflate(),[],b,0,0,0,0,-1,"none",!1,!1,null,null,0));(e=e.concat(m.html)).push("<br/>"),f=i.endState}return e.join("")}(e,f,g,h);if(g instanceof aJ){let a=g.getLoadStatus();if(!1===a.loaded)return void a.promise.then(c,b)}a(d)};c()})):aM(k,j,i)}static colorizeLine(a,b,c,d,e=4){let f=au.qL.isBasicASCII(a,b),g=au.qL.containsRTL(a,f,c);return(0,at.Md)(new at.zL(!1,!0,a,!1,f,g,0,d,[],e,0,0,0,0,-1,"none",!1,!1,null,null,0)).html}static colorizeModelLine(a,b,c=4){let d=a.getLineContent(b);a.tokenization.forceTokenization(b);let e=a.tokenization.getLineTokens(b).inflate();return this.colorizeLine(d,a.mightContainNonBasicASCII(),a.mightContainRTL(),e,c)}}function aM(a,b,c){let d=[],e=new Uint32Array(2);e[0]=0,e[1]=0x2008000;for(let f=0,g=a.length;f<g;f++){let g=a[f];e[0]=g.length;let h=new as.f7(e,g,c),i=au.qL.isBasicASCII(g,!0),j=au.qL.containsRTL(g,i,!0),k=(0,at.Md)(new at.zL(!1,!0,g,!1,i,j,0,h,[],b,0,0,0,0,-1,"none",!1,!1,null,null,0));(d=d.concat(k.html)).push("<br/>")}return d.join("")}var aN=c(67330),aO=c(93231),aP=c(24772),aQ=c(55241),aR=c(46547),aS=c(37327),aT=c(34183);c(48727);var aU=c(11023);c(18896),c(91018),c(62957);var aV=c(40563);c(58330);var aW=c(39014);c(26858);var aX=c(57687),aY=c(72663),aZ=c(58254);c(82052);var a$=c(95091),a_=c(75082),a0=c(16794),a1=c(62677),a2=c(72542);c(67421);var a3=c(72816);let a4=a_.$;class a5 extends _.jG{constructor(a){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.classList.toggle("fade-in",!!a),this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new a2.MU(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class a6 extends _.jG{static render(a,b,c){return new a6(a,b,c)}constructor(a,b,c){super(),this.actionLabel=b.label,this.actionKeybindingLabel=c,this.actionContainer=(0,a_.BC)(a,a4("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=(0,a_.BC)(this.actionContainer,a4("a.action")),this.action.setAttribute("role","button"),b.iconClass&&(0,a_.BC)(this.action,a4("span.icon")).classList.add(...b.iconClass.split(" ")),this.actionRenderedLabel=c?`${b.label} (${c})`:b.label,(0,a_.BC)(this.action,a4("span")).textContent=this.actionRenderedLabel,this._store.add(new a7(this.actionContainer,b.run)),this._store.add(new a8(this.actionContainer,b.run,[3,10])),this.setEnabled(!0)}setEnabled(a){a?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}class a7 extends _.jG{constructor(a,b){super(),this._register((0,a_.ko)(a,a_.Bx.CLICK,c=>{c.stopPropagation(),c.preventDefault(),b(a)}))}}class a8 extends _.jG{constructor(a,b,c){super(),this._register((0,a_.ko)(a,a_.Bx.KEY_DOWN,d=>{let e=new a1.Z(d);c.some(a=>e.equals(a))&&(d.stopPropagation(),d.preventDefault(),b(a))}))}}var a9=c(8933),ba=c(51262),bb=c(54469),bc=c(18216),bd=c(29980),be=c(70687),bf=c(85214),bg=function(a,b){return function(c,d){b(c,d,a)}};let bh=a_.$,bi=class extends a9.x{get _targetWindow(){return(0,a_.zk)(this._target.targetElements[0])}get _targetDocumentElement(){return(0,a_.zk)(this._target.targetElements[0]).document.documentElement}get isDisposed(){return this._isDisposed}get isMouseIn(){return this._lockMouseTracker.isMouseIn}get domNode(){return this._hover.containerDomNode}get onDispose(){return this._onDispose.event}get onRequestLayout(){return this._onRequestLayout.event}get anchor(){return+(2!==this._hoverPosition)}get x(){return this._x}get y(){return this._y}get isLocked(){return this._isLocked}set isLocked(a){this._isLocked!==a&&(this._isLocked=a,this._hoverContainer.classList.toggle("locked",this._isLocked))}addMouseTrackingElement(a){return this._lockMouseTracker.addElement(a)}constructor(a,b,c,d,e){let f;if(super(),this._keybindingService=b,this._configurationService=c,this._markdownRenderer=d,this._accessibilityService=e,this._messageListeners=new _.Cm,this._isDisposed=!1,this._forcePosition=!1,this._x=0,this._y=0,this._isLocked=!1,this._enableFocusTraps=!1,this._addedFocusTrap=!1,this._maxHeightRatioRelativeToWindow=.5,this._onDispose=this._register(new a$.vl),this._onRequestLayout=this._register(new a$.vl),this._linkHandler=a.linkHandler,this._target="targetElements"in a.target?a.target:new bk(a.target),a.style)switch(a.style){case 1:a.appearance??={},a.appearance.compact??=!0,a.appearance.showPointer??=!0;break;case 2:a.appearance??={},a.appearance.compact??=!0}this._hoverPointer=a.appearance?.showPointer?bh("div.workbench-hover-pointer"):void 0,this._hover=this._register(new a5(!a.appearance?.skipFadeInAnimation)),this._hover.containerDomNode.classList.add("workbench-hover"),a.appearance?.compact&&this._hover.containerDomNode.classList.add("workbench-hover","compact"),this._hoverPointer&&this._hover.containerDomNode.classList.add("with-pointer"),a.additionalClasses&&this._hover.containerDomNode.classList.add(...a.additionalClasses),a.position?.forcePosition&&(this._forcePosition=!0),a.trapFocus&&(this._enableFocusTraps=!0);const g=a.appearance?.maxHeightRatio;void 0!==g&&g>0&&g<=1&&(this._maxHeightRatioRelativeToWindow=g),this._hoverPosition=a.position?.hoverPosition===void 0?3:(0,bf.Et)(a.position.hoverPosition)?a.position.hoverPosition:2,this.onmousedown(this._hover.containerDomNode,a=>a.stopPropagation()),this.onkeydown(this._hover.containerDomNode,a=>{a.equals(9)&&this.dispose()}),this._register((0,a_.ko)(this._targetWindow,"blur",()=>this.dispose()));const h=bh("div.hover-row.markdown-hover"),i=bh("div.hover-contents");if("string"==typeof a.content)i.textContent=a.content,i.style.whiteSpace="pre-wrap";else if((0,a_.sb)(a.content)){i.appendChild(a.content),i.classList.add("html-hover-contents");const b=new ResizeObserver(()=>{this.layout(),this._onRequestLayout.fire()});b.observe(i),this._register((0,_.s)(()=>b.disconnect()))}else{const b=a.content,{element:c}=this._register(this._markdownRenderer.render(b,{actionHandler:this._linkHandler,asyncRenderCallback:()=>{i.classList.add("code-hover-contents"),this.layout(),this._onRequestLayout.fire()}}));i.appendChild(c)}if(h.appendChild(i),this._hover.contentsDomNode.appendChild(h),a.actions&&a.actions.length>0){const b=bh("div.hover-row.status-bar"),c=bh("div.actions");a.actions.forEach(a=>{let b=this._keybindingService.lookupKeybinding(a.commandId),d=b?b.getLabel():null;this._register(a6.render(c,{label:a.label,commandId:a.commandId,run:b=>{a.run(b),this.dispose()},iconClass:a.iconClass},d))}),b.appendChild(c),this._hover.containerDomNode.appendChild(b)}if(this._hoverContainer=bh("div.workbench-hover-container"),this._hoverPointer&&this._hoverContainer.appendChild(this._hoverPointer),this._hoverContainer.appendChild(this._hover.containerDomNode),f=(!a.actions||!(a.actions.length>0))&&(a.persistence?.hideOnHover===void 0?"string"==typeof a.content||(0,bb.VS)(a.content)&&!a.content.value.includes("](")&&!a.content.value.includes("</a>"):a.persistence.hideOnHover),a.appearance?.showHoverHint){const a=bh("div.hover-row.status-bar"),b=bh("div.info");b.textContent=(0,a3.kg)(1761,"Hold {0} key to mouse over",bc.zx?"Option":"Alt"),a.appendChild(b),this._hover.containerDomNode.appendChild(a)}const j=[...this._target.targetElements];f||j.push(this._hoverContainer);const k=this._mouseTracker=this._register(new bj(j));if(this._register(k.onMouseOut(()=>{this._isLocked||this.dispose()})),f){const a=[...this._target.targetElements,this._hoverContainer];this._lockMouseTracker=this._register(new bj(a)),this._register(this._lockMouseTracker.onMouseOut(()=>{this._isLocked||this.dispose()}))}else this._lockMouseTracker=k}addFocusTrap(){if(!this._enableFocusTraps||this._addedFocusTrap)return;this._addedFocusTrap=!0;let a=this._hover.containerDomNode,b=this.findLastFocusableChild(this._hover.containerDomNode);if(b){let c=(0,a_.Hs)(this._hoverContainer,bh("div")),d=(0,a_.BC)(this._hoverContainer,bh("div"));c.tabIndex=0,d.tabIndex=0,this._register((0,a_.ko)(d,"focus",b=>{a.focus(),b.preventDefault()})),this._register((0,a_.ko)(c,"focus",a=>{b.focus(),a.preventDefault()}))}}findLastFocusableChild(a){if(a.hasChildNodes())for(let b=0;b<a.childNodes.length;b++){let c=a.childNodes.item(a.childNodes.length-b-1);if(c.nodeType===c.ELEMENT_NODE&&"number"==typeof c.tabIndex&&c.tabIndex>=0)return c;let d=this.findLastFocusableChild(c);if(d)return d}}render(a){var b,c;a.appendChild(this._hoverContainer);let d=this._hoverContainer.contains(this._hoverContainer.ownerDocument.activeElement)&&(b=!0===this._configurationService.getValue("accessibility.verbosity.hover")&&this._accessibilityService.isScreenReaderOptimized(),c=this._keybindingService.lookupKeybinding("editor.action.accessibleView")?.getAriaLabel(),b&&c?(0,a3.kg)(7,"Inspect this in the accessible view with {0}.",c):b?(0,a3.kg)(8,"Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."):"");d&&(0,aN.h5)(d),this.layout(),this.addFocusTrap()}layout(){this._mouseTracker?.suppressPendingMouseOut(),this._lockMouseTracker!==this._mouseTracker&&this._lockMouseTracker?.suppressPendingMouseOut(),this._hover.containerDomNode.classList.remove("right-aligned"),this._hover.contentsDomNode.style.maxHeight="";let{top:a,right:b,bottom:c,left:d}=this._target.targetElements.map(a=>{let b,c;return b=(0,a_.mU)(a),{top:(c=a.getBoundingClientRect()).top*b,bottom:c.bottom*b,right:c.right*b,left:c.left*b}})[0],e=b-d,f=c-a,g={top:a,right:b,bottom:c,left:d,width:e,height:f,center:{x:d+e/2,y:a+f/2}};if(this.adjustHorizontalHoverPosition(g),this.adjustVerticalHoverPosition(g),this.adjustHoverMaxHeight(g),this._hoverContainer.style.padding="",this._hoverContainer.style.margin="",this._hoverPointer){switch(this._hoverPosition){case 1:g.left+=3,g.right+=3,this._hoverContainer.style.paddingLeft="3px",this._hoverContainer.style.marginLeft="-3px";break;case 0:g.left-=3,g.right-=3,this._hoverContainer.style.paddingRight="3px",this._hoverContainer.style.marginRight="-3px";break;case 2:g.top+=3,g.bottom+=3,this._hoverContainer.style.paddingTop="3px",this._hoverContainer.style.marginTop="-3px";break;case 3:g.top-=3,g.bottom-=3,this._hoverContainer.style.paddingBottom="3px",this._hoverContainer.style.marginBottom="-3px"}g.center.x=g.left+e/2,g.center.y=g.top+f/2}this.computeXCordinate(g),this.computeYCordinate(g),this._hoverPointer&&(this._hoverPointer.classList.remove("top"),this._hoverPointer.classList.remove("left"),this._hoverPointer.classList.remove("right"),this._hoverPointer.classList.remove("bottom"),this.setHoverPointerPosition(g)),this._hover.onContentsChanged()}computeXCordinate(a){let b=this._hover.containerDomNode.clientWidth+2;void 0!==this._target.x?this._x=this._target.x:1===this._hoverPosition?this._x=a.right:0===this._hoverPosition?this._x=a.left-b:(this._hoverPointer?this._x=a.center.x-this._hover.containerDomNode.clientWidth/2:this._x=a.left,this._x+b>=this._targetDocumentElement.clientWidth&&(this._hover.containerDomNode.classList.add("right-aligned"),this._x=Math.max(this._targetDocumentElement.clientWidth-b-2,this._targetDocumentElement.clientLeft))),this._x<this._targetDocumentElement.clientLeft&&(this._x=a.left+2)}computeYCordinate(a){void 0!==this._target.y?this._y=this._target.y:3===this._hoverPosition?this._y=a.top:2===this._hoverPosition?this._y=a.bottom-2:this._hoverPointer?this._y=a.center.y+this._hover.containerDomNode.clientHeight/2:this._y=a.bottom,this._y>this._targetWindow.innerHeight&&(this._y=a.bottom)}adjustHorizontalHoverPosition(a){if(void 0!==this._target.x)return;let b=3*!!this._hoverPointer;if(this._forcePosition){let c=b+2;1===this._hoverPosition?this._hover.containerDomNode.style.maxWidth=`${this._targetDocumentElement.clientWidth-a.right-c}px`:0===this._hoverPosition&&(this._hover.containerDomNode.style.maxWidth=`${a.left-c}px`);return}1===this._hoverPosition?this._targetDocumentElement.clientWidth-a.right<this._hover.containerDomNode.clientWidth+b&&(a.left>=this._hover.containerDomNode.clientWidth+b?this._hoverPosition=0:this._hoverPosition=2):0===this._hoverPosition&&(a.left<this._hover.containerDomNode.clientWidth+b&&(this._targetDocumentElement.clientWidth-a.right>=this._hover.containerDomNode.clientWidth+b?this._hoverPosition=1:this._hoverPosition=2),a.left-this._hover.containerDomNode.clientWidth-b<=this._targetDocumentElement.clientLeft&&(this._hoverPosition=1))}adjustVerticalHoverPosition(a){if(void 0!==this._target.y||this._forcePosition)return;let b=3*!!this._hoverPointer;3===this._hoverPosition?a.top-this._hover.containerDomNode.clientHeight-b<0&&(this._hoverPosition=2):2===this._hoverPosition&&a.bottom+this._hover.containerDomNode.offsetHeight+b>this._targetWindow.innerHeight&&(this._hoverPosition=3)}adjustHoverMaxHeight(a){let b=this._targetWindow.innerHeight*this._maxHeightRatioRelativeToWindow;if(this._forcePosition){let c=3*!!this._hoverPointer+2;3===this._hoverPosition?b=Math.min(b,a.top-c):2===this._hoverPosition&&(b=Math.min(b,this._targetWindow.innerHeight-a.bottom-c))}if(this._hover.containerDomNode.style.maxHeight=`${b}px`,this._hover.contentsDomNode.clientHeight<this._hover.contentsDomNode.scrollHeight){let a=`${this._hover.scrollbar.options.verticalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingRight!==a&&(this._hover.contentsDomNode.style.paddingRight=a)}}setHoverPointerPosition(a){if(this._hoverPointer)switch(this._hoverPosition){case 0:case 1:{this._hoverPointer.classList.add(0===this._hoverPosition?"right":"left");let b=this._hover.containerDomNode.clientHeight;b>a.height?this._hoverPointer.style.top=`${a.center.y-(this._y-b)-3}px`:this._hoverPointer.style.top=`${Math.round(b/2)-3}px`;break}case 3:case 2:{this._hoverPointer.classList.add(3===this._hoverPosition?"bottom":"top");let b=Math.round(this._hover.containerDomNode.clientWidth/2)-3,c=this._x+b;(c<a.left||c>a.right)&&(b=a.center.x-this._x-3),this._hoverPointer.style.left=`${b}px`}}}focus(){this._hover.containerDomNode.focus()}dispose(){this._isDisposed||(this._onDispose.fire(),this._target.dispose?.(),this._hoverContainer.remove(),this._messageListeners.dispose(),super.dispose()),this._isDisposed=!0}};bi=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([bg(1,a0.b),bg(2,aB.pG),bg(3,ba.TN),bg(4,bd.j)],bi);class bj extends a9.x{get onMouseOut(){return this._onMouseOut.event}get isMouseIn(){return this._isMouseIn}constructor(a,b=200){for(const c of(super(),this._elements=a,this._eventDebounceDelay=b,this._isMouseIn=!0,this._suppressNextMouseOut=!1,this._mouseTimer=this._register(new _.HE),this._onMouseOut=this._register(new a$.vl),this._elements))this.onmouseover(c,()=>this._onTargetMouseOver()),this.onmouseleave(c,()=>this._onTargetMouseLeave())}_onTargetMouseOver(){this._isMouseIn=!0,this._suppressNextMouseOut=!1,this._mouseTimer.clear()}_onTargetMouseLeave(){this._isMouseIn=!1,this._mouseTimer.value=new be.pc(()=>this._fireIfMouseOutside(),this._eventDebounceDelay)}_fireIfMouseOutside(){this._isMouseIn||this._suppressNextMouseOut||this._onMouseOut.fire()}suppressPendingMouseOut(){this._isMouseIn||(this._suppressNextMouseOut=!0)}addElement(a){if(this._elements.includes(a))return _.jG.None;this._elements.push(a);let b=new _.Cm;return b.add((0,a_.ko)(a,a_.Bx.MOUSE_OVER,()=>this._onTargetMouseOver())),b.add((0,a_.ko)(a,a_.Bx.MOUSE_LEAVE,()=>this._onTargetMouseLeave())),b.add((0,_.s)(()=>{let b=this._elements.indexOf(a);b>=0&&this._elements.splice(b,1)})),b}}class bk{constructor(a){this._element=a,this.targetElements=[this._element]}dispose(){}}var bl=c(37814),bm=c(5424);function bn(a){return"object"==typeof a&&"markdown"in a&&"markdownNotSupportedFallback"in a}var bo=c(92640);class bp{constructor(a,b,c){this.hoverDelegate=a,this.target=b,this.fadeInAnimation=c}async update(a,b,c){let d;if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),!this.isDisposed){if((0,bf.Kg)(a)||(0,a_.sb)(a)||void 0===a)d=a;else{let e;this._cancellationTokenSource=new bo.Qi;let f=this._cancellationTokenSource.token;if((e=bn(a)?(0,bf.Tn)(a.markdown)?a.markdown(f).then(b=>b??a.markdownNotSupportedFallback):a.markdown??a.markdownNotSupportedFallback:a.element(f))instanceof Promise?(this._hoverWidget||this.show((0,a3.kg)(1762,"Loading..."),b,c),d=await e):d=e,this.isDisposed||f.isCancellationRequested)return}this.show(d,b,c)}}show(a,b,c){let d=this._hoverWidget;if(this.hasContent(a)){let e={content:a,target:this.target,actions:c?.actions,linkHandler:c?.linkHandler,trapFocus:c?.trapFocus,appearance:{showPointer:"element"===this.hoverDelegate.placement,skipFadeInAnimation:!this.fadeInAnimation||!!d,showHoverHint:c?.appearance?.showHoverHint},position:{hoverPosition:2}};this._hoverWidget=this.hoverDelegate.showHover(e,b)}d?.dispose()}hasContent(a){return!!a&&(!(0,bb.VS)(a)||!!a.value)}get isDisposed(){return this._hoverWidget?.isDisposed}dispose(){this._hoverWidget?.dispose(),this._cancellationTokenSource?.dispose(!0),this._cancellationTokenSource=void 0}}var bq=c(5436),br=c(99998),bs=c(48409),bt=function(a,b){return function(c,d){b(c,d,a)}};let bu=class extends _.jG{get _currentHover(){return this._hoverStack.at(-1)?.hover}get _currentHoverOptions(){return this._hoverStack.at(-1)?.options}_getContainingHoverIndex(a){let b=(0,a_.sb)(a)?[a]:a.targetElements;for(let a=this._hoverStack.length-1;a>=0;a--)for(let c of b)if((0,a_.QX)(c,this._hoverStack[a].hover.domNode))return a;return -1}constructor(a,b,c,d,e,f){super(),this._instantiationService=a,this._configurationService=b,this._keybindingService=d,this._layoutService=e,this._accessibilityService=f,this._hoverStack=[],this._currentDelayedHoverWasShown=!1,this._delayedHovers=new Map,this._managedHovers=new Map,this._register(c.onDidShowContextMenu(()=>this.hideHover())),this._register(br.f.registerCommandAndKeybindingRule({id:"workbench.action.showHover",weight:0,primary:(0,bq.m5)(2089,2087),handler:()=>{this._showAndFocusHoverForActiveElement()}}))}showInstantHover(a,b,c,d){let e=this._createHover(a,c);if(e)return this._showHover(e,a,b),e.hover}showDelayedHover(a,b){if(void 0===a.id&&(a.id=bw(a.content)),!this._currentDelayedHover||this._currentDelayedHoverWasShown){if(this._currentHover?.isLocked&&0>this._getContainingHoverIndex(a.target))return;if(bv(this._currentHoverOptions)===bv(a))return this._currentHover;if(this._currentHover&&!this._currentHover.isDisposed&&void 0!==this._currentDelayedHoverGroupId&&this._currentDelayedHoverGroupId===b?.groupId)return this.showInstantHover({...a,appearance:{...a.appearance,skipFadeInAnimation:!0}})}else if(this._currentDelayedHover&&bv(this._currentHoverOptions)===bv(a))return this._currentDelayedHover;let c=this._createHover(a,void 0);if(!c){this._currentDelayedHover=void 0,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=void 0;return}this._currentDelayedHover=c.hover,this._currentDelayedHoverWasShown=!1,this._currentDelayedHoverGroupId=b?.groupId;let d=b?.reducedDelay?this._configurationService.getValue("workbench.hover.reducedDelay"):this._configurationService.getValue("workbench.hover.delay");return(0,be.wR)(d).then(()=>{c.hover&&!c.hover.isDisposed&&(this._currentDelayedHoverWasShown=!0,this._showHover(c,a))}),c.hover}setupDelayedHover(a,b,c){return this._setupDelayedHover(a,c=>{let d={..."function"==typeof b?b():b,target:a};return 2===d.style&&c&&(d.target=bA(a,c)),d},c)}setupDelayedHoverAtMouse(a,b,c){return this._setupDelayedHover(a,c=>({..."function"==typeof b?b():b,target:c?bA(a,c):a}),c)}_setupDelayedHover(a,b,c){let d=new _.Cm;return d.add((0,a_.ko)(a,a_.Bx.MOUSE_OVER,a=>{this.showDelayedHover(b(a),{groupId:c?.groupId,reducedDelay:c?.reducedDelay})})),c?.setupKeyboardEvents&&d.add((0,a_.ko)(a,a_.Bx.KEY_DOWN,a=>{let c=new a1.Z(a);(c.equals(10)||c.equals(3))&&this.showInstantHover(b(),!0)})),this._delayedHovers.set(a,{show:a=>{this.showInstantHover(b(),a)}}),d.add((0,_.s)(()=>this._delayedHovers.delete(a))),d}_createHover(a,b){let c;if(this._currentDelayedHover?.dispose(),this._currentDelayedHover=void 0,""===a.content)return;if(void 0===a.id&&(a.id=bw(a.content)),this._getContainingHoverIndex(a.target)>=0){if(this._hoverStack.length>=3)return}else if(this._currentHover?.isLocked||bv(this._currentHoverOptions)===bv(a))return;this._lastHoverOptions=a;let d=a.trapFocus||this._accessibilityService.isScreenReaderOptimized(),e=(0,a_.bq)();!b&&d&&e&&!e.classList.contains("monaco-hover")&&(c=e);let f=new _.Cm,g=this._instantiationService.createInstance(bi,a);if(a.persistence?.sticky&&(g.isLocked=!0),a.position?.hoverPosition&&!(0,bf.Et)(a.position.hoverPosition)&&(a.target={targetElements:(0,a_.sb)(a.target)?[a.target]:a.target.targetElements,x:a.position.hoverPosition.x+10}),g.onDispose(()=>{let a=this._hoverStack.findIndex(a=>a.hover===g);if(a>=0){let b=this._hoverStack[a];for((0,a_.nR)(g.domNode)&&b.lastFocusedElementBeforeOpen&&b.lastFocusedElementBeforeOpen.focus();this._hoverStack.length>a+1;){let a=this._hoverStack.pop();a.contextView.dispose(),a.hover.dispose()}this._hoverStack.splice(a,1),b.contextView.dispose()}f.dispose()},void 0,f),!a.container){let b=(0,a_.sb)(a.target)?a.target:a.target.targetElements[0];a.container=this._layoutService.getContainer((0,a_.zk)(b))}if(f.add((0,a_.ko)((0,a_.zk)(a.container).document,a_.Bx.MOUSE_DOWN,a=>{(0,a_.QX)(a.target,g.domNode)||this._hideHoverAndDescendants(g)})),!a.persistence?.sticky){if("targetElements"in a.target)for(let b of a.target.targetElements)f.add((0,a_.ko)(b,a_.Bx.CLICK,()=>this._hideHoverAndDescendants(g)));else f.add((0,a_.ko)(a.target,a_.Bx.CLICK,()=>this._hideHoverAndDescendants(g)));let b=(0,a_.bq)();if(b){let c=(0,a_.zk)(b).document;f.add((0,a_.ko)(b,a_.Bx.KEY_DOWN,b=>this._keyDown(b,g,!!a.persistence?.hideOnKeyDown))),f.add((0,a_.ko)(c,a_.Bx.KEY_DOWN,b=>this._keyDown(b,g,!!a.persistence?.hideOnKeyDown))),f.add((0,a_.ko)(b,a_.Bx.KEY_UP,a=>this._keyUp(a,g))),f.add((0,a_.ko)(c,a_.Bx.KEY_UP,a=>this._keyUp(a,g)))}}if("IntersectionObserver"in $.G){let b=new IntersectionObserver(a=>this._intersectionChange(a,g),{threshold:0}),c="targetElements"in a.target?a.target.targetElements[0]:a.target;b.observe(c),f.add((0,_.s)(()=>b.disconnect()))}return{hover:g,lastFocusedElementBeforeOpen:c,store:f}}_showHover(a,b,c){let{hover:d,lastFocusedElementBeforeOpen:e,store:f}=a,g=this._getContainingHoverIndex(b.target),h=g>=0;if(h){for(let a=this._hoverStack.length-1;a>g;a--)this._hoverStack[a].hover.dispose();this._hoverStack.length=g+1}else this._hideAllHovers();if(h)for(let a=0;a<=g;a++)f.add(this._hoverStack[a].hover.addMouseTrackingElement(d.domNode));let i=b.container??this._layoutService.getContainer((0,a_.zk)((0,a_.sb)(b.target)?b.target:b.target.targetElements[0])),j=new bl.vx(i,1);this._hoverStack.push({hover:d,options:b,contextView:j,lastFocusedElementBeforeOpen:e});let k=new by(d,c,this._hoverStack.length);if(j.show(k),f.add(d.onRequestLayout(()=>j.layout())),c||b.persistence?.sticky){let a=(0,a_.zk)(i);f.add((0,a_.ko)(a,a_.Bx.RESIZE,()=>j.layout()))}if(b.onDidHide){let a=b.onDidHide;f.add((0,_.s)(()=>a()))}b.onDidShow?.()}_hideHoverAndDescendants(a){let b=this._hoverStack.findIndex(b=>b.hover===a);if(!(b<0)){for(let a=this._hoverStack.length-1;a>=b;a--)this._hoverStack[a].hover.dispose();this._hoverStack.length=b}}_hideAllHovers(){for(let a=this._hoverStack.length-1;a>=0;a--)this._hoverStack[a].hover.dispose();this._hoverStack.length=0}hideHover(a){0===this._hoverStack.length||!a&&this._currentHover?.isLocked||this.doHideHover()}doHideHover(){let a=this._hoverStack.length;this._hoverStack[a-1]?.hover.dispose(),this._hoverStack.length=a-1}_intersectionChange(a,b){a[a.length-1].isIntersecting||b.dispose()}showAndFocusLastHover(){this._lastHoverOptions&&this.showInstantHover(this._lastHoverOptions,!0,!0)}_showAndFocusHoverForActiveElement(){let a=(0,a_.bq)();for(;a;){let b=this._delayedHovers.get(a)??this._managedHovers.get(a);if(b)return void b.show(!0);a=a.parentElement}}_keyDown(a,b,c){if("Alt"===a.key){for(let a of this._hoverStack)a.hover.isLocked=!0;return}let d=new a1.Z(a);if(!this._keybindingService.resolveKeyboardEvent(d).getSingleModifierDispatchChords().some(a=>!!a)&&0===this._keybindingService.softDispatch(d,d.target).kind&&c&&(!this._currentHoverOptions?.trapFocus||"Tab"!==a.key)){let a=this._hoverStack.find(a=>a.hover===b);this._hideHoverAndDescendants(b),a?.lastFocusedElementBeforeOpen?.focus()}}_keyUp(a,b){if("Alt"===a.key){for(let a of this._hoverStack)a.options.persistence?.sticky||(a.hover.isLocked=!1);if(!this._hoverStack.some(a=>a.hover.isMouseIn)){let a=this._hoverStack[this._hoverStack.length-1];this._hideAllHovers(),a?.lastFocusedElementBeforeOpen?.focus()}}}setupManagedHover(a,b,c,d){let e,f;if(a.showNativeHover){var g=b,h=c;function i(a){a?g.setAttribute("title",a):g.removeAttribute("title")}return i(bx(h)),{update:a=>i(bx(a)),show:()=>{},hide:()=>{},dispose:()=>i(void 0)}}b.setAttribute("custom-hover","true"),""!==b.title&&(console.warn("HTML element already has a title attribute, which will conflict with the custom hover. Please remove the title attribute."),b.title="");let j=(b,c)=>{let d=void 0!==f;b&&(f?.dispose(),f=void 0),c&&(e?.dispose(),e=void 0),d&&(a.onDidHideHover?.(),f=void 0)},k=(e,g,h,i)=>new be.pc(async()=>{(!f||f.isDisposed)&&(f=new bp(a,h||b,e>0),await f.update("function"==typeof c?c():c,g,{...d,trapFocus:i}))},e),l=new _.Cm,m=!1;l.add((0,a_.ko)(b,a_.Bx.MOUSE_DOWN,()=>{m=!0,j(!0,!0)},!0)),l.add((0,a_.ko)(b,a_.Bx.MOUSE_UP,()=>{m=!1},!0)),l.add((0,a_.ko)(b,a_.Bx.MOUSE_LEAVE,a=>{m=!1,j(!1,a.fromElement===b)},!0)),l.add((0,a_.ko)(b,a_.Bx.MOUSE_OVER,d=>{if(e)return;let f=new _.Cm,g={targetElements:[b],dispose:()=>{}};(void 0===a.placement||"mouse"===a.placement)&&f.add((0,a_.ko)(b,a_.Bx.MOUSE_MOVE,a=>{g.x=a.x+10,bz(a,b)||j(!0,!0)},!0)),e=f,bz(d,b)&&f.add(k("function"==typeof a.delay?a.delay(c):a.delay,!1,g))},!0)),(0,a_.yD)(b)||l.add((0,a_.ko)(b,a_.Bx.FOCUS,d=>{if(m||e||(f?.isDisposed&&(f=void 0),(0,a_.sb)(d.relatedTarget)&&d.relatedTarget.closest(".monaco-hover")||!d.relatedTarget||!bz(d,b)))return;let g=new _.Cm;g.add((0,a_.ko)(b,a_.Bx.BLUR,()=>j(!0,!0),!0)),g.add(k("function"==typeof a.delay?a.delay(c):a.delay,!1,{targetElements:[b],dispose:()=>{}})),e=g},!0));let n={show:a=>{j(!1,!0),k(0,a,void 0,a)},hide:()=>{j(!0,!0)},update:async(a,b)=>{c=a,await f?.update(c,void 0,b)},dispose:()=>{this._managedHovers.delete(b),l.dispose(),j(!0,!0)}};return this._managedHovers.set(b,n),n}showManagedHover(a){let b=this._managedHovers.get(a);b&&b.show(!0)}dispose(){this._managedHovers.forEach(a=>a.dispose()),super.dispose()}};function bv(a){if(void 0!==a)return a?.id??a}function bw(a){if(!(0,a_.sb)(a))return"string"==typeof a?a.toString():a.value}function bx(a){let b="function"==typeof a?a():a;return(0,bf.Kg)(b)?(0,bs.pS)(b):bn(b)?b.markdownNotSupportedFallback:void 0}bu=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([bt(0,aZ._Y),bt(1,aB.pG),bt(2,aY.Z),bt(3,a0.b),bt(4,bm.x),bt(5,bd.j)],bu);class by{get anchorPosition(){return this._hover.anchor}constructor(a,b=!1,c=1){this._hover=a,this._focus=b,this.layer=c}render(a){return this._hover.render(a),this._focus&&this._hover.focus(),this._hover}getAnchor(){return{x:this._hover.x,y:this._hover.y}}layout(){this._hover.layout()}}function bz(a,b){return(0,a_.sb)(a.target)&&function(a,b){for(b=b??(0,a_.zk)(a).document.body;!a.hasAttribute("custom-hover")&&a!==b;)a=a.parentElement;return a}(a.target,b)===b}function bA(a,b){return{targetElements:[a],x:b.x+10}}(0,aQ.v)(aX.TN,bu,1),(0,aR.zy)((a,b)=>{let c=a.getColor(aU.oZ);c&&(b.addRule(`.monaco-hover.workbench-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${c.transparent(.5)}; }`),b.addRule(`.monaco-hover.workbench-hover hr { border-top: 1px solid ${c.transparent(.5)}; }`))});var bB=c(66036),bC=c(77497),bD=c(12780);let bE=(0,aZ.u1)("dialogService");var bF=c(39194),bG=c(35590),bH=function(a,b){return function(c,d){b(c,d,a)}};function bI(a){return a.scheme===bC.ny.file?a.fsPath:a.path}let bJ=0;class bK{constructor(a,b,c,d,e,f,g){this.id=++bJ,this.type=0,this.actual=a,this.label=a.label,this.confirmBeforeUndo=a.confirmBeforeUndo||!1,this.resourceLabel=b,this.strResource=c,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=d,this.groupOrder=e,this.sourceId=f,this.sourceOrder=g,this.isValid=!0}setValid(a){this.isValid=a}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class bL{constructor(a,b){this.resourceLabel=a,this.reason=b}}class bM{constructor(){this.elements=new Map}createMessage(){let a=[],b=[];for(let[,c]of this.elements)(0===c.reason?a:b).push(c.resourceLabel);let c=[];return a.length>0&&c.push((0,a3.kg)(2099,"The following files have been closed and modified on disk: {0}.",a.join(", "))),b.length>0&&c.push((0,a3.kg)(2100,"The following files have been modified in an incompatible way: {0}.",b.join(", "))),c.join("\n")}get size(){return this.elements.size}has(a){return this.elements.has(a)}set(a,b){this.elements.set(a,b)}delete(a){return this.elements.delete(a)}}class bN{constructor(a,b,c,d,e,f,g){this.id=++bJ,this.type=1,this.actual=a,this.label=a.label,this.confirmBeforeUndo=a.confirmBeforeUndo||!1,this.resourceLabels=b,this.strResources=c,this.groupId=d,this.groupOrder=e,this.sourceId=f,this.sourceOrder=g,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(a,b,c){this.removedResources||(this.removedResources=new bM),this.removedResources.has(b)||this.removedResources.set(b,new bL(a,c))}setValid(a,b,c){c?this.invalidatedResources&&(this.invalidatedResources.delete(b),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new bM),this.invalidatedResources.has(b)||this.invalidatedResources.set(b,new bL(a,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class bO{constructor(a,b){this.resourceLabel=a,this.strResource=b,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(let a of this._past)1===a.type&&a.removeResource(this.resourceLabel,this.strResource,0);for(let a of this._future)1===a.type&&a.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let a=[];a.push(`* ${this.strResource}:`);for(let b=0;b<this._past.length;b++)a.push(` * [UNDO] ${this._past[b]}`);for(let b=this._future.length-1;b>=0;b--)a.push(` * [REDO] ${this._future[b]}`);return a.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(a,b){1===a.type?a.setValid(this.resourceLabel,this.strResource,b):a.setValid(b)}setElementsValidFlag(a,b){for(let c of this._past)b(c.actual)&&this._setElementValidFlag(c,a);for(let c of this._future)b(c.actual)&&this._setElementValidFlag(c,a)}pushElement(a){for(let a of this._future)1===a.type&&a.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(a),this.versionId++}createSnapshot(a){let b=[];for(let a=0,c=this._past.length;a<c;a++)b.push(this._past[a].id);for(let a=this._future.length-1;a>=0;a--)b.push(this._future[a].id);return new bG.To(a,b)}restoreSnapshot(a){let b=a.elements.length,c=!0,d=0,e=-1;for(let f=0,g=this._past.length;f<g;f++,d++){let g=this._past[f];c&&(d>=b||g.id!==a.elements[d])&&(c=!1,e=f),c||1!==g.type||g.removeResource(this.resourceLabel,this.strResource,0)}let f=-1;for(let e=this._future.length-1;e>=0;e--,d++){let g=this._future[e];c&&(d>=b||g.id!==a.elements[d])&&(c=!1,f=e),c||1!==g.type||g.removeResource(this.resourceLabel,this.strResource,0)}-1!==e&&(this._past=this._past.slice(0,e)),-1!==f&&(this._future=this._future.slice(f+1)),this.versionId++}getElements(){let a=[],b=[];for(let b of this._past)a.push(b.actual);for(let a of this._future)b.push(a.actual);return{past:a,future:b}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(a,b){for(let c=this._past.length-1;c>=0;c--)if(this._past[c]===a){b.has(this.strResource)?this._past[c]=b.get(this.strResource):this._past.splice(c,1);break}this.versionId++}splitFutureWorkspaceElement(a,b){for(let c=this._future.length-1;c>=0;c--)if(this._future[c]===a){b.has(this.strResource)?this._future[c]=b.get(this.strResource):this._future.splice(c,1);break}this.versionId++}moveBackward(a){this._past.pop(),this._future.push(a),this.versionId++}moveForward(a){this._future.pop(),this._past.push(a),this.versionId++}}class bP{constructor(a){this.editStacks=a,this._versionIds=[];for(let a=0,b=this.editStacks.length;a<b;a++)this._versionIds[a]=this.editStacks[a].versionId}isValid(){for(let a=0,b=this.editStacks.length;a<b;a++)if(this._versionIds[a]!==this.editStacks[a].versionId)return!1;return!0}}let bQ=new bO("","");bQ.locked=!0;let bR=class{constructor(a,b){this._dialogService=a,this._notificationService=b,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(a){for(let b of this._uriComparisonKeyComputers)if(b[0]===a.scheme)return b[1].getComparisonKey(a);return a.toString()}_print(a){console.log("------------------------------------"),console.log(`AFTER ${a}: `);let b=[];for(let a of this._editStacks)b.push(a[1].toString());console.log(b.join("\n"))}pushElement(a,b=bG.I_.None,c=bG.Ym.None){if(0===a.type){let d=bI(a.resource),e=this.getUriComparisonKey(a.resource);this._pushElement(new bK(a,d,e,b.id,b.nextOrder(),c.id,c.nextOrder()))}else{let d=new Set,e=[],f=[];for(let b of a.resources){let a=bI(b),c=this.getUriComparisonKey(b);d.has(c)||(d.add(c),e.push(a),f.push(c))}1===e.length?this._pushElement(new bK(a,e[0],f[0],b.id,b.nextOrder(),c.id,c.nextOrder())):this._pushElement(new bN(a,e,f,b.id,b.nextOrder(),c.id,c.nextOrder()))}}_pushElement(a){for(let b=0,c=a.strResources.length;b<c;b++){let c,d=a.resourceLabels[b],e=a.strResources[b];this._editStacks.has(e)?c=this._editStacks.get(e):(c=new bO(d,e),this._editStacks.set(e,c)),c.pushElement(a)}}getLastElement(a){let b=this.getUriComparisonKey(a);if(this._editStacks.has(b)){let a=this._editStacks.get(b);if(a.hasFutureElements())return null;let c=a.getClosestPastElement();return c?c.actual:null}return null}_splitPastWorkspaceElement(a,b){let c=a.actual.split(),d=new Map;for(let a of c){let b=bI(a.resource),c=this.getUriComparisonKey(a.resource),e=new bK(a,b,c,0,0,0,0);d.set(e.strResource,e)}for(let c of a.strResources)b&&b.has(c)||this._editStacks.get(c).splitPastWorkspaceElement(a,d)}_splitFutureWorkspaceElement(a,b){let c=a.actual.split(),d=new Map;for(let a of c){let b=bI(a.resource),c=this.getUriComparisonKey(a.resource),e=new bK(a,b,c,0,0,0,0);d.set(e.strResource,e)}for(let c of a.strResources)b&&b.has(c)||this._editStacks.get(c).splitFutureWorkspaceElement(a,d)}removeElements(a){let b="string"==typeof a?a:this.getUriComparisonKey(a);this._editStacks.has(b)&&(this._editStacks.get(b).dispose(),this._editStacks.delete(b))}setElementsValidFlag(a,b,c){let d=this.getUriComparisonKey(a);this._editStacks.has(d)&&this._editStacks.get(d).setElementsValidFlag(b,c)}createSnapshot(a){let b=this.getUriComparisonKey(a);return this._editStacks.has(b)?this._editStacks.get(b).createSnapshot(a):new bG.To(a,[])}restoreSnapshot(a){let b=this.getUriComparisonKey(a.resource);if(this._editStacks.has(b)){let c=this._editStacks.get(b);c.restoreSnapshot(a),c.hasPastElements()||c.hasFutureElements()||(c.dispose(),this._editStacks.delete(b))}}getElements(a){let b=this.getUriComparisonKey(a);return this._editStacks.has(b)?this._editStacks.get(b).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(a){if(!a)return[null,null];let b=null,c=null;for(let[d,e]of this._editStacks){let f=e.getClosestPastElement();f&&f.sourceId===a&&(!b||f.sourceOrder>b.sourceOrder)&&(b=f,c=d)}return[b,c]}canUndo(a){if(a instanceof bG.Ym){let[,b]=this._findClosestUndoElementWithSource(a.id);return!!b}let b=this.getUriComparisonKey(a);return!!this._editStacks.has(b)&&this._editStacks.get(b).hasPastElements()}_onError(a,b){for(let c of((0,bB.dz)(a),b.strResources))this.removeElements(c);this._notificationService.error(a)}_acquireLocks(a){for(let b of a.editStacks)if(b.locked)throw Error("Cannot acquire edit stack lock");for(let b of a.editStacks)b.locked=!0;return()=>{for(let b of a.editStacks)b.locked=!1}}_safeInvokeWithLocks(a,b,c,d,e){let f,g=this._acquireLocks(c);try{f=b()}catch(b){return g(),d.dispose(),this._onError(b,a)}return f?f.then(()=>(g(),d.dispose(),e()),b=>(g(),d.dispose(),this._onError(b,a))):(g(),d.dispose(),e())}async _invokeWorkspacePrepare(a){if(void 0===a.actual.prepareUndoRedo)return _.jG.None;let b=a.actual.prepareUndoRedo();return void 0===b?_.jG.None:b}_invokeResourcePrepare(a,b){if(1!==a.actual.type||void 0===a.actual.prepareUndoRedo)return b(_.jG.None);let c=a.actual.prepareUndoRedo();return c?(0,_.Xm)(c)?b(c):c.then(a=>b(a)):b(_.jG.None)}_getAffectedEditStacks(a){let b=[];for(let c of a.strResources)b.push(this._editStacks.get(c)||bQ);return new bP(b)}_tryToSplitAndUndo(a,b,c,d){if(b.canSplit())return this._splitPastWorkspaceElement(b,c),this._notificationService.warn(d),new bS(this._undo(a,0,!0));for(let a of b.strResources)this.removeElements(a);return this._notificationService.warn(d),new bS}_checkWorkspaceUndo(a,b,c,d){if(b.removedResources)return this._tryToSplitAndUndo(a,b,b.removedResources,(0,a3.kg)(2101,"Could not undo '{0}' across all files. {1}",b.label,b.removedResources.createMessage()));if(d&&b.invalidatedResources)return this._tryToSplitAndUndo(a,b,b.invalidatedResources,(0,a3.kg)(2102,"Could not undo '{0}' across all files. {1}",b.label,b.invalidatedResources.createMessage()));let e=[];for(let a of c.editStacks)a.getClosestPastElement()!==b&&e.push(a.resourceLabel);if(e.length>0)return this._tryToSplitAndUndo(a,b,null,(0,a3.kg)(2103,"Could not undo '{0}' across all files because changes were made to {1}",b.label,e.join(", ")));let f=[];for(let a of c.editStacks)a.locked&&f.push(a.resourceLabel);return f.length>0?this._tryToSplitAndUndo(a,b,null,(0,a3.kg)(2104,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",b.label,f.join(", "))):c.isValid()?null:this._tryToSplitAndUndo(a,b,null,(0,a3.kg)(2105,"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",b.label))}_workspaceUndo(a,b,c){let d=this._getAffectedEditStacks(b),e=this._checkWorkspaceUndo(a,b,d,!1);return e?e.returnValue:this._confirmAndExecuteWorkspaceUndo(a,b,d,c)}_isPartOfUndoGroup(a){if(!a.groupId)return!1;for(let[,b]of this._editStacks){let c=b.getClosestPastElement();if(c){if(c===a){let c=b.getSecondClosestPastElement();if(c&&c.groupId===a.groupId)return!0}if(c.groupId===a.groupId)return!0}}return!1}async _confirmAndExecuteWorkspaceUndo(a,b,c,d){let e;if(b.canSplit()&&!this._isPartOfUndoGroup(b)){var f;let e;(f=e||(e={}))[f.All=0]="All",f[f.This=1]="This",f[f.Cancel=2]="Cancel";let{result:g}=await this._dialogService.prompt({type:bD.A.Info,message:(0,a3.kg)(2106,"Would you like to undo '{0}' across all files?",b.label),buttons:[{label:(0,a3.kg)(2107,"&&Undo in {0} Files",c.editStacks.length),run:()=>e.All},{label:(0,a3.kg)(2108,"Undo this &&File"),run:()=>e.This}],cancelButton:{run:()=>e.Cancel}});if(g===e.Cancel)return;if(g===e.This)return this._splitPastWorkspaceElement(b,null),this._undo(a,0,!0);let h=this._checkWorkspaceUndo(a,b,c,!1);if(h)return h.returnValue;d=!0}try{e=await this._invokeWorkspacePrepare(b)}catch(a){return this._onError(a,b)}let g=this._checkWorkspaceUndo(a,b,c,!0);if(g)return e.dispose(),g.returnValue;for(let a of c.editStacks)a.moveBackward(b);return this._safeInvokeWithLocks(b,()=>b.actual.undo(),c,e,()=>this._continueUndoInGroup(b.groupId,d))}_resourceUndo(a,b,c){if(!b.isValid)return void a.flushAllElements();if(a.locked){let a=(0,a3.kg)(2109,"Could not undo '{0}' because there is already an undo or redo operation running.",b.label);this._notificationService.warn(a);return}return this._invokeResourcePrepare(b,d=>(a.moveBackward(b),this._safeInvokeWithLocks(b,()=>b.actual.undo(),new bP([a]),d,()=>this._continueUndoInGroup(b.groupId,c))))}_findClosestUndoElementInGroup(a){if(!a)return[null,null];let b=null,c=null;for(let[d,e]of this._editStacks){let f=e.getClosestPastElement();f&&f.groupId===a&&(!b||f.groupOrder>b.groupOrder)&&(b=f,c=d)}return[b,c]}_continueUndoInGroup(a,b){if(!a)return;let[,c]=this._findClosestUndoElementInGroup(a);if(c)return this._undo(c,0,b)}undo(a){if(a instanceof bG.Ym){let[,b]=this._findClosestUndoElementWithSource(a.id);return b?this._undo(b,a.id,!1):void 0}return"string"==typeof a?this._undo(a,0,!1):this._undo(this.getUriComparisonKey(a),0,!1)}_undo(a,b=0,c){if(!this._editStacks.has(a))return;let d=this._editStacks.get(a),e=d.getClosestPastElement();if(e){if(e.groupId){let[a,d]=this._findClosestUndoElementInGroup(e.groupId);if(e!==a&&d)return this._undo(d,b,c)}return(e.sourceId!==b||e.confirmBeforeUndo)&&!c?this._confirmAndContinueUndo(a,b,e):1===e.type?this._workspaceUndo(a,e,c):this._resourceUndo(d,e,c)}}async _confirmAndContinueUndo(a,b,c){if((await this._dialogService.confirm({message:(0,a3.kg)(2110,"Would you like to undo '{0}'?",c.label),primaryButton:(0,a3.kg)(2111,"&&Yes"),cancelButton:(0,a3.kg)(2112,"No")})).confirmed)return this._undo(a,b,!0)}_findClosestRedoElementWithSource(a){if(!a)return[null,null];let b=null,c=null;for(let[d,e]of this._editStacks){let f=e.getClosestFutureElement();f&&f.sourceId===a&&(!b||f.sourceOrder<b.sourceOrder)&&(b=f,c=d)}return[b,c]}canRedo(a){if(a instanceof bG.Ym){let[,b]=this._findClosestRedoElementWithSource(a.id);return!!b}let b=this.getUriComparisonKey(a);return!!this._editStacks.has(b)&&this._editStacks.get(b).hasFutureElements()}_tryToSplitAndRedo(a,b,c,d){if(b.canSplit())return this._splitFutureWorkspaceElement(b,c),this._notificationService.warn(d),new bS(this._redo(a));for(let a of b.strResources)this.removeElements(a);return this._notificationService.warn(d),new bS}_checkWorkspaceRedo(a,b,c,d){if(b.removedResources)return this._tryToSplitAndRedo(a,b,b.removedResources,(0,a3.kg)(2113,"Could not redo '{0}' across all files. {1}",b.label,b.removedResources.createMessage()));if(d&&b.invalidatedResources)return this._tryToSplitAndRedo(a,b,b.invalidatedResources,(0,a3.kg)(2114,"Could not redo '{0}' across all files. {1}",b.label,b.invalidatedResources.createMessage()));let e=[];for(let a of c.editStacks)a.getClosestFutureElement()!==b&&e.push(a.resourceLabel);if(e.length>0)return this._tryToSplitAndRedo(a,b,null,(0,a3.kg)(2115,"Could not redo '{0}' across all files because changes were made to {1}",b.label,e.join(", ")));let f=[];for(let a of c.editStacks)a.locked&&f.push(a.resourceLabel);return f.length>0?this._tryToSplitAndRedo(a,b,null,(0,a3.kg)(2116,"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",b.label,f.join(", "))):c.isValid()?null:this._tryToSplitAndRedo(a,b,null,(0,a3.kg)(2117,"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",b.label))}_workspaceRedo(a,b){let c=this._getAffectedEditStacks(b),d=this._checkWorkspaceRedo(a,b,c,!1);return d?d.returnValue:this._executeWorkspaceRedo(a,b,c)}async _executeWorkspaceRedo(a,b,c){let d;try{d=await this._invokeWorkspacePrepare(b)}catch(a){return this._onError(a,b)}let e=this._checkWorkspaceRedo(a,b,c,!0);if(e)return d.dispose(),e.returnValue;for(let a of c.editStacks)a.moveForward(b);return this._safeInvokeWithLocks(b,()=>b.actual.redo(),c,d,()=>this._continueRedoInGroup(b.groupId))}_resourceRedo(a,b){if(!b.isValid)return void a.flushAllElements();if(a.locked){let a=(0,a3.kg)(2118,"Could not redo '{0}' because there is already an undo or redo operation running.",b.label);this._notificationService.warn(a);return}return this._invokeResourcePrepare(b,c=>(a.moveForward(b),this._safeInvokeWithLocks(b,()=>b.actual.redo(),new bP([a]),c,()=>this._continueRedoInGroup(b.groupId))))}_findClosestRedoElementInGroup(a){if(!a)return[null,null];let b=null,c=null;for(let[d,e]of this._editStacks){let f=e.getClosestFutureElement();f&&f.groupId===a&&(!b||f.groupOrder<b.groupOrder)&&(b=f,c=d)}return[b,c]}_continueRedoInGroup(a){if(!a)return;let[,b]=this._findClosestRedoElementInGroup(a);if(b)return this._redo(b)}redo(a){if(a instanceof bG.Ym){let[,b]=this._findClosestRedoElementWithSource(a.id);return b?this._redo(b):void 0}return"string"==typeof a?this._redo(a):this._redo(this.getUriComparisonKey(a))}_redo(a){if(!this._editStacks.has(a))return;let b=this._editStacks.get(a),c=b.getClosestFutureElement();if(c){if(c.groupId){let[a,b]=this._findClosestRedoElementInGroup(c.groupId);if(c!==a&&b)return this._redo(b)}return 1===c.type?this._workspaceRedo(a,c):this._resourceRedo(b,c)}}};bR=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([bH(0,bE),bH(1,bF.Ot)],bR);class bS{constructor(a){this.returnValue=a}}(0,aQ.v)(bG.$D,bR,1);var bT=c(95606),bU=c(99187),bV=c(89006),bW=c(91088),bX=c(45186),bY=function(a,b){return function(c,d){b(c,d,a)}};let bZ=(0,aZ.u1)("IInlineCompletionsService"),b$=new bU.N1("inlineCompletions.snoozed",!1,(0,a3.kg)(83,"Whether inline completions are currently snoozed")),b_=class extends _.jG{get snoozeTimeLeft(){return void 0===this._snoozeTimeEnd?0:Math.max(0,this._snoozeTimeEnd-Date.now())}constructor(a,b){super(),this._contextKeyService=a,this._telemetryService=b,this._onDidChangeIsSnoozing=this._register(new a$.vl),this.onDidChangeIsSnoozing=this._onDidChangeIsSnoozing.event,this._snoozeTimeEnd=void 0,this._recentCompletionIds=[],this._timer=this._register(new be.pc);const c=b$.bindTo(this._contextKeyService);this._register(this.onDidChangeIsSnoozing(()=>c.set(this.isSnoozing())))}setSnoozeDuration(a){if(a<0)throw new bB.D7(`Invalid snooze duration: ${a}. Duration must be non-negative.`);if(0===a)return void this.cancelSnooze();let b=this.isSnoozing(),c=this.snoozeTimeLeft;this._snoozeTimeEnd=Date.now()+a,b||this._onDidChangeIsSnoozing.fire(!0),this._timer.cancelAndSet(()=>{if(this.isSnoozing())throw new bB.D7("Snooze timer did not fire as expected");this._onDidChangeIsSnoozing.fire(!1)},this.snoozeTimeLeft+1),this._reportSnooze(a-c,a)}isSnoozing(){return this.snoozeTimeLeft>0}cancelSnooze(){this.isSnoozing()&&(this._reportSnooze(-this.snoozeTimeLeft,0),this._snoozeTimeEnd=void 0,this._timer.cancel(),this._onDidChangeIsSnoozing.fire(!1))}reportNewCompletion(a){this._lastCompletionId=a,this._recentCompletionIds.unshift(a),this._recentCompletionIds.length>5&&this._recentCompletionIds.pop()}_reportSnooze(a,b){let c=Math.round(a/1e3),d=Math.round(b/1e3);this._telemetryService.publicLog2("inlineCompletions.snooze",{deltaSeconds:c,totalSeconds:d,lastCompletionId:this._lastCompletionId,recentCompletionIds:this._recentCompletionIds})}};b_=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([bY(0,bU.fN),bY(1,bX.k)],b_),(0,aQ.v)(bZ,b_,1);let b0="inlineCompletions.lastSnoozeDuration";class b1 extends bT.L{static{this.ID="editor.action.inlineSuggest.snooze"}constructor(){super({id:b1.ID,title:(0,a3.aS)(97,"Snooze Inline Suggestions"),precondition:bU.M$.true(),f1:!0})}async run(a,...b){let c,d=a.get(bV.GK),e=a.get(bZ),f=a.get(bW.CS);b.length>0&&"number"==typeof b[0]&&(c=6e4*b[0]),c||(c=await this.getDurationFromUser(d,f)),c&&e.setSnoozeDuration(c)}async getDurationFromUser(a,b){let c=b.getNumber(b0,0,3e5),d=[{label:(0,a3.kg)(84,"1 minute"),id:"1",value:6e4},{label:(0,a3.kg)(85,"5 minutes"),id:"5",value:3e5},{label:(0,a3.kg)(86,"10 minutes"),id:"10",value:6e5},{label:(0,a3.kg)(87,"15 minutes"),id:"15",value:9e5},{label:(0,a3.kg)(88,"30 minutes"),id:"30",value:18e5},{label:(0,a3.kg)(89,"60 minutes"),id:"60",value:36e5}],e=d;if(c>0&&!d.some(a=>a.value===c)){let a={label:(0,a3.kg)(90,"{0} minutes (Last used)",c/6e4),id:"last-custom",value:c,description:(0,a3.kg)(91,"Last used custom duration")},b=d.findIndex(a=>a.value>c);e=-1===b?[...d,a]:[...d.slice(0,b),a,...d.slice(b)]}e.push({label:(0,a3.kg)(92,"Custom..."),id:"custom",value:-1});let f=await a.pick(e,{placeHolder:(0,a3.kg)(93,"Select snooze duration for Inline Suggestions"),activeItem:e.find(a=>a.value===c)});if(f)return"custom"===f.id?this.getCustomDurationFromUser(a,b):(b.store(b0,f.value,0,0),f.value)}async getCustomDurationFromUser(a,b){let c=await a.input({placeHolder:(0,a3.kg)(94,"Duration in minutes (e.g. 90)"),prompt:(0,a3.kg)(95,"Enter snooze duration in minutes"),validateInput:async a=>{let b=Number(a);if(isNaN(b)||b<=0||!Number.isFinite(b))return(0,a3.kg)(96,"Please enter a positive number")}});if(c){let a=6e4*Number(c);return b.store(b0,a,0,0),a}}}class b2 extends bT.L{static{this.ID="editor.action.inlineSuggest.cancelSnooze"}constructor(){super({id:b2.ID,title:(0,a3.aS)(98,"Cancel Snooze Inline Suggestions"),precondition:b$,f1:!0})}async run(a){a.get(bZ).cancelSnooze()}}c(10619);var b3=c(6015),b4=c(17577),b5=c(30996);let b6="[/\\\\]",b7="[^/\\\\]",b8=/\//g;function b9(a,b){switch(a){case 0:return"";case 1:return`${b7}*?`;default:return`(?:${b6}|${b7}+${b6}${b?`|${b6}${b7}+`:""})*?`}}function ca(a,b){if(!a)return[];let c=[],d=!1,e=!1,f="";for(let g of a){switch(g){case b:if(!d&&!e){c.push(f),f="";continue}break;case"{":d=!0;break;case"}":d=!1;break;case"[":e=!0;break;case"]":e=!1}f+=g}return f&&c.push(f),c}let cb=/^\*\*\/\*\.[\w\.-]+$/,cc=/^\*\*\/([\w\.-]+)\/?$/,cd=/^{\*\*\/\*?[\w\.-]+\/?(,\*\*\/\*?[\w\.-]+\/?)*}$/,ce=/^{\*\*\/\*?[\w\.-]+(\/(\*\*)?)?(,\*\*\/\*?[\w\.-]+(\/(\*\*)?)?)*}$/,cf=/^\*\*((\/[\w\.-]+)+)\/?$/,cg=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,ch=new b4.qK(1e4),ci=function(){return!1},cj=function(){return null};function ck(a,b){var c,d,e,f,g,h;let i,j,k,l,m,n;if(!a)return cj;i=(i="string"!=typeof a?a.pattern:a).trim();let o=b.ignoreCase??!1,p={...b,equals:o?aa.Q_:(a,b)=>a===b,endsWith:o?aa.Dp:(a,b)=>a.endsWith(b),isEqualOrParent:(a,c)=>(0,b3._1)(a,c,b.ignoreCase??!bc.j9)},q=`${o?i.toLowerCase():i}_${!!b.trimForExclusions}_${o}`,r=ch.get(q);return r||(r=cb.test(i)?(c=i.substring(4),d=i,e=p,function(a,b){return"string"==typeof a&&e.endsWith(a,c)?d:null}):(j=cc.exec(cm(i,p)))?(f=j[1],g=i,h=p,k=`/${f}`,l=`\\${f}`,(m=function(a,b){return"string"!=typeof a?null:b?h.equals(b,f)?g:null:h.equals(a,f)||h.endsWith(a,k)||h.endsWith(a,l)?g:null}).basenames=n=[f],m.patterns=[g],m.allBasenames=n,m):(b.trimForExclusions?ce:cd).test(i)?function(a,b){let c=cp(a.slice(1,-1).split(",").map(a=>ck(a,b)).filter(a=>a!==cj),a),d=c.length;if(!d)return cj;if(1===d)return c[0];let e=function(b,d){for(let e=0,f=c.length;e<f;e++)if(c[e](b,d))return a;return null},f=c.find(a=>!!a.allBasenames);f&&(e.allBasenames=f.allBasenames);let g=c.reduce((a,b)=>b.allPaths?a.concat(b.allPaths):a,[]);return g.length&&(e.allPaths=g),e}(i,p):(j=cf.exec(cm(i,p)))?cn(j[1].substring(1),i,!0,p):(j=cg.exec(cm(i,p)))?cn(j[1],i,!1,p):function(a,b){try{let c=RegExp(`^${function a(b){if(!b)return"";let c="",d=ca(b,"/");if(d.every(a=>"**"===a))c=".*";else{let b=!1;d.forEach((e,f)=>{if("**"===e){if(b)return;c+=b9(2,f===d.length-1)}else{let b=!1,g="",h=!1,i="";for(let d of e){if("}"!==d&&b){g+=d;continue}if(h&&("]"!==d||!i)){let a;a="-"===d?d:"^"!==d&&"!"!==d||i?"/"===d?"":(0,aa.bm)(d):"^",i+=a;continue}switch(d){case"{":b=!0;continue;case"[":h=!0;continue;case"}":{let d=ca(g,","),e=`(?:${d.map(b=>a(b)).join("|")})`;c+=e,b=!1,g="";break}case"]":c+="["+i+"]",h=!1,i="";break;case"?":c+=b7;continue;case"*":c+=b9(1);continue;default:c+=(0,aa.bm)(d)}}f<d.length-1&&("**"!==d[f+1]||f+2<d.length)&&(c+=b6)}b="**"===e})}return c}(a)}$`,b.ignoreCase?"i":void 0);return function(b){return c.lastIndex=0,"string"==typeof b&&c.test(b)?a:null}}catch{return cj}}(i,p),ch.set(q,r)),cl(r,a,p)}function cl(a,b,c){if("string"==typeof b)return a;let d=function(d,e){return c.isEqualOrParent(d,b.base)?a((0,aa.NB)(d.substring(b.base.length),b5.Vn),e):null};return d.allBasenames=a.allBasenames,d.allPaths=a.allPaths,d.basenames=a.basenames,d.patterns=a.patterns,d}function cm(a,b){return b.trimForExclusions&&a.endsWith("/**")?a.substring(0,a.length-2):a}function cn(a,b,c,d){let e,f=b5.Vn===b5.SA.sep,g=f?a:a.replace(b8,b5.Vn),h=b5.Vn+g,i=b5.SA.sep+a;return(e=c?function(c,e){return"string"==typeof c&&(d.equals(c,g)||d.endsWith(c,h)||!f&&(d.equals(c,a)||d.endsWith(c,i)))?b:null}:function(c,e){return"string"==typeof c&&(d.equals(c,g)||!f&&d.equals(c,a))?b:null}).allPaths=[(c?"*/":"./")+a],e}function co(a,b={}){var c;if(!a)return ci;if("string"==typeof a||(c=a)&&"string"==typeof c.base&&"string"==typeof c.pattern){let c=ck(a,b);if(c===cj)return ci;let d=function(a,b){return!!c(a,b)};return c.allBasenames&&(d.allBasenames=c.allBasenames),c.allPaths&&(d.allPaths=c.allPaths),d}return function(a,b){let c=cp(Object.getOwnPropertyNames(a).map(c=>(function(a,b,c){if(!1===b)return cj;let d=ck(a,c);if(d===cj)return cj;if("boolean"==typeof b)return d;if(b){let c=b.when;if("string"==typeof c){let b=(b,e,f,g)=>{if(!g||!d(b,e))return null;let h=g(c.replace("$(basename)",()=>f));return(0,be.Qg)(h)?h.then(b=>b?a:null):h?a:null};return b.requiresSiblings=!0,b}}return d})(c,a[c],b)).filter(a=>a!==cj)),d=c.length;if(!d)return cj;if(!c.some(a=>!!a.requiresSiblings)){if(1===d)return c[0];let a=function(a,b){let d;for(let e=0,f=c.length;e<f;e++){let f=c[e](a,b);if("string"==typeof f)return f;(0,be.Qg)(f)&&(d||(d=[]),d.push(f))}return d?(async()=>{for(let a of d){let b=await a;if("string"==typeof b)return b}return null})():null},b=c.find(a=>!!a.allBasenames);b&&(a.allBasenames=b.allBasenames);let e=c.reduce((a,b)=>b.allPaths?a.concat(b.allPaths):a,[]);return e.length&&(a.allPaths=e),a}let e=function(a,b,d){let e,f;for(let g=0,h=c.length;g<h;g++){let h=c[g];h.requiresSiblings&&d&&(b||(b=(0,b5.P8)(a)),e||(e=b.substring(0,b.length-(0,b5.LC)(a).length)));let i=h(a,b,e,d);if("string"==typeof i)return i;(0,be.Qg)(i)&&(f||(f=[]),f.push(i))}return f?(async()=>{for(let a of f){let b=await a;if("string"==typeof b)return b}return null})():null},f=c.find(a=>!!a.allBasenames);f&&(e.allBasenames=f.allBasenames);let g=c.reduce((a,b)=>b.allPaths?a.concat(b.allPaths):a,[]);return g.length&&(e.allPaths=g),e}(a,b)}function cp(a,b){let c,d=a.filter(a=>!!a.basenames);if(d.length<2)return a;let e=d.reduce((a,b)=>{let c=b.basenames;return c?a.concat(c):a},[]);if(b){c=[];for(let a=0,d=e.length;a<d;a++)c.push(b)}else c=d.reduce((a,b)=>{let c=b.patterns;return c?a.concat(c):a},[]);let f=function(a,b){if("string"!=typeof a)return null;if(!b){let c;for(c=a.length;c>0;c--){let b=a.charCodeAt(c-1);if(47===b||92===b)break}b=a.substring(c)}let d=e.indexOf(b);return -1!==d?c[d]:null};f.basenames=e,f.patterns=c,f.allBasenames=e;let g=a.filter(a=>!a.basenames);return g.push(f),g}class cq{constructor(a,b,c,d,e){this.uri=a,this.languageId=b,this.notebookUri=c,this.notebookType=d,this.recursive=e}equals(a){return this.notebookType===a.notebookType&&this.languageId===a.languageId&&this.uri.toString()===a.uri.toString()&&this.notebookUri?.toString()===a.notebookUri?.toString()&&this.recursive===a.recursive}}class cr{get onDidChange(){return this._onDidChange.event}constructor(a){this._notebookInfoResolver=a,this._clock=0,this._entries=[],this._onDidChange=new a$.vl}register(a,b){let c={selector:a,provider:b,_score:-1,_time:this._clock++};return this._entries.push(c),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,_.s)(()=>{if(c){let a=this._entries.indexOf(c);a>=0&&(this._entries.splice(a,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),c=void 0)}})}has(a){return this.all(a).length>0}all(a){if(!a)return[];this._updateScores(a,!1);let b=[];for(let a of this._entries)a._score>0&&b.push(a.provider);return b}allNoModel(){return this._entries.map(a=>a.provider)}ordered(a,b=!1){let c=[];return this._orderedForEach(a,b,a=>c.push(a.provider)),c}orderedGroups(a){let b,c,d=[];return this._orderedForEach(a,!1,a=>{b&&c===a._score?b.push(a.provider):(c=a._score,b=[a.provider],d.push(b))}),d}_orderedForEach(a,b,c){for(let d of(this._updateScores(a,b),this._entries))d._score>0&&c(d)}_updateScores(a,b){let c=this._notebookInfoResolver?.(a.uri),d=c?new cq(a.uri,a.getLanguageId(),c.uri,c.type,b):new cq(a.uri,a.getLanguageId(),void 0,void 0,b);if(!this._lastCandidate?.equals(d)){for(let c of(this._lastCandidate=d,this._entries))if(c._score=function a(b,c,d,e,f,g){if(Array.isArray(b)){let h=0;for(let i of b){let b=a(i,c,d,e,f,g);if(10===b)return b;b>h&&(h=b)}return h}if("string"==typeof b)return e?"*"===b?5:10*(b===d):0;if(!b)return 0;{let{language:a,pattern:i,scheme:j,hasAccessToAllModels:k,notebookType:l}=b;if(!e&&!k)return 0;l&&f&&(c=f);let m=0;if(j)if(j===c.scheme)m=10;else{if("*"!==j)return 0;m=5}if(a)if(a===d)m=10;else{if("*"!==a)return 0;m=Math.max(m,5)}if(l)if(l===g)m=10;else{if("*"!==l||void 0===g)return 0;m=Math.max(m,5)}if(i){var h;let a;if(!((a="string"==typeof i?i:{...i,base:(0,b5.S8)(i.base)})===c.fsPath||(h=c.fsPath,a&&"string"==typeof h&&co(a,void 0)(h))))return 0;m=10}return m}}(c.selector,d.uri,d.languageId,(0,ao.vd)(a),d.notebookUri,d.notebookType),function a(b){return"string"!=typeof b&&(Array.isArray(b)?b.every(a):!!b.exclusive)}(c.selector)&&c._score>0)if(b)c._score=0;else{for(let a of this._entries)a._score=0;c._score=1e3;break}this._entries.sort(cr._compareByScoreAndTime)}}static _compareByScoreAndTime(a,b){return a._score<b._score?1:a._score>b._score?-1:cs(a.selector)&&!cs(b.selector)?1:!cs(a.selector)&&cs(b.selector)?-1:a._time<b._time?1:a._time>b._time?-1:0}}function cs(a){return"string"!=typeof a&&(Array.isArray(a)?a.some(cs):!!a.isBuiltin)}var ct=c(99851);class cu{constructor(){this.referenceProvider=new cr(this._score.bind(this)),this.renameProvider=new cr(this._score.bind(this)),this.newSymbolNamesProvider=new cr(this._score.bind(this)),this.codeActionProvider=new cr(this._score.bind(this)),this.definitionProvider=new cr(this._score.bind(this)),this.typeDefinitionProvider=new cr(this._score.bind(this)),this.declarationProvider=new cr(this._score.bind(this)),this.implementationProvider=new cr(this._score.bind(this)),this.documentSymbolProvider=new cr(this._score.bind(this)),this.inlayHintsProvider=new cr(this._score.bind(this)),this.colorProvider=new cr(this._score.bind(this)),this.codeLensProvider=new cr(this._score.bind(this)),this.documentFormattingEditProvider=new cr(this._score.bind(this)),this.documentRangeFormattingEditProvider=new cr(this._score.bind(this)),this.onTypeFormattingEditProvider=new cr(this._score.bind(this)),this.signatureHelpProvider=new cr(this._score.bind(this)),this.hoverProvider=new cr(this._score.bind(this)),this.documentHighlightProvider=new cr(this._score.bind(this)),this.multiDocumentHighlightProvider=new cr(this._score.bind(this)),this.selectionRangeProvider=new cr(this._score.bind(this)),this.foldingRangeProvider=new cr(this._score.bind(this)),this.linkProvider=new cr(this._score.bind(this)),this.inlineCompletionsProvider=new cr(this._score.bind(this)),this.completionProvider=new cr(this._score.bind(this)),this.linkedEditingRangeProvider=new cr(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new cr(this._score.bind(this)),this.documentSemanticTokensProvider=new cr(this._score.bind(this)),this.documentDropEditProvider=new cr(this._score.bind(this)),this.documentPasteEditProvider=new cr(this._score.bind(this))}_score(a){return this._notebookTypeResolver?.(a)}}(0,aQ.v)(ct.u,cu,1);var cv=c(37788),cw=c(61822);class cx{constructor(a=5){this.timesPerSecond=a,this._lastRun=0,this._minimumTimeBetweenRuns=1e3/a}runIfNotLimited(a){let b=Date.now();b-this._lastRun>=this._minimumTimeBetweenRuns&&(this._lastRun=b,a())}}class cy{constructor(a){this._tokens=a,this._tokenCount=a.length/4}toString(a){let b=[];for(let c=0;c<this._tokenCount;c++)b.push(`(${this._getDeltaLine(c)+a},${this._getStartCharacter(c)}-${this._getEndCharacter(c)})`);return`[${b.join(",")}]`}getMaxDeltaLine(){let a=this._getTokenCount();return 0===a?-1:this._getDeltaLine(a-1)}getRange(){let a=this._getTokenCount();if(0===a)return null;let b=this._getStartCharacter(0),c=this._getDeltaLine(a-1),d=this._getEndCharacter(a-1);return new cw.Q(0,b+1,c,d+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(a){return this._tokens[4*a]}_getStartCharacter(a){return this._tokens[4*a+1]}_getEndCharacter(a){return this._tokens[4*a+2]}isEmpty(){return 0===this._getTokenCount()}getLineTokens(a){let b=0,c=this._getTokenCount()-1;for(;b<c;){let d=b+Math.floor((c-b)/2),e=this._getDeltaLine(d);if(e<a)b=d+1;else if(e>a)c=d-1;else{let e=d;for(;e>b&&this._getDeltaLine(e-1)===a;)e--;let f=d;for(;f<c&&this._getDeltaLine(f+1)===a;)f++;return new cz(this._tokens.subarray(4*e,4*f+4))}}return this._getDeltaLine(b)===a?new cz(this._tokens.subarray(4*b,4*b+4)):null}clear(){this._tokenCount=0}removeTokens(a,b,c,d){let e=this._tokens,f=this._tokenCount,g=0,h=!1,i=0;for(let j=0;j<f;j++){let f=4*j,k=e[f],l=e[f+1],m=e[f+2],n=e[f+3];if((k>a||k===a&&m>=b)&&(k<c||k===c&&l<=d))h=!0;else{if(0===g&&(i=k),h){let a=4*g;e[a]=k-i,e[a+1]=l,e[a+2]=m,e[a+3]=n}else 0!==i&&(e[f]=k-i);g++}}return this._tokenCount=g,i}split(a,b,c,d){let e=this._tokens,f=this._tokenCount,g=[],h=[],i=g,j=0,k=0;for(let g=0;g<f;g++){let f=4*g,l=e[f],m=e[f+1],n=e[f+2],o=e[f+3];if(l>a||l===a&&n>=b)if(l<c||l===c&&m<=d)continue;else i!==h&&(i=h,j=0,k=l);i[j++]=l-k,i[j++]=m,i[j++]=n,i[j++]=o}return[new cy(new Uint32Array(g)),new cy(new Uint32Array(h)),k]}acceptDeleteRange(a,b,c,d,e){let f=this._tokens,g=this._tokenCount,h=d-b,i=0,j=!1;for(let k=0;k<g;k++){let l=4*k,m=f[l],n=f[l+1],o=f[l+2],p=f[l+3];if(m<b||m===b&&o<=c){i++;continue}if(m===b&&n<c)m===d&&o>e?o-=e-c:o=c;else if(m===b&&n===c)if(m===d&&o>e)o-=e-c;else{j=!0;continue}else if(m<d||m===d&&n<e)if(m===d&&o>e)m=b,o=(n=c)+(o-e);else{j=!0;continue}else if(m>d){if(0===h&&!j){i=g;break}m-=h}else if(m===d&&n>=e)a&&0===m&&(n+=a,o+=a),m-=h,n-=e-c,o-=e-c;else throw Error("Not possible!");let q=4*i;f[q]=m,f[q+1]=n,f[q+2]=o,f[q+3]=p,i++}this._tokenCount=i}acceptInsertText(a,b,c,d,e,f){let g=0===c&&1===d&&(f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122),h=this._tokens,i=this._tokenCount;for(let f=0;f<i;f++){let i=4*f,j=h[i],k=h[i+1],l=h[i+2];if(!(j<a)&&(j!==a||!(l<b))){if(j===a&&l===b)if(!g)continue;else l+=1;else if(j===a&&k<b&&b<l)0===c?l+=d:l=b;else{if(j===a&&k===b&&g)continue;if(j===a)if(j+=c,0===c)k+=d,l+=d;else{let a=l-k;l=(k=e+(k-b))+a}else j+=c}h[i]=j,h[i+1]=k,h[i+2]=l}}}static{this._rateLimiter=new cx(10/60)}reportIfInvalid(a,b){for(let c=0;c<this._tokenCount;c++){let d=this._getDeltaLine(c)+b;d<1?cy._rateLimiter.runIfNotLimited(()=>{console.error("Invalid Semantic Tokens Data From Extension: lineNumber < 1")}):d>a.getLineCount()?cy._rateLimiter.runIfNotLimited(()=>{console.error("Invalid Semantic Tokens Data From Extension: lineNumber > model.getLineCount()")}):this._getEndCharacter(c)>a.getLineLength(d)&&cy._rateLimiter.runIfNotLimited(()=>{console.error("Invalid Semantic Tokens Data From Extension: end character > model.getLineLength(lineNumber)")})}}}class cz{constructor(a){this._tokens=a}getCount(){return this._tokens.length/4}getStartCharacter(a){return this._tokens[4*a+1]}getEndCharacter(a){return this._tokens[4*a+2]}getMetadata(a){return this._tokens[4*a+3]}}var cA=function(a,b){return function(c,d){b(c,d,a)}};let cB=class{constructor(a,b,c,d){this._legend=a,this._themeService=b,this._languageService=c,this._logService=d,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new cD}getMetadata(a,b,c){let d,e=this._languageService.languageIdCodec.encodeLanguageId(c),f=this._hashTable.get(a,b,e);if(f)d=f.metadata;else{let f=this._legend.tokenTypes[a],g=[];if(f){let a=b;for(let b=0;a>0&&b<this._legend.tokenModifiers.length;b++)1&a&&g.push(this._legend.tokenModifiers[b]),a>>=1;let e=this._themeService.getColorTheme().getTokenStyleMetadata(f,g,c);void 0===e?d=0x7fffffff:(d=0,void 0!==e.italic&&(d|=1|!!e.italic<<11),void 0!==e.bold&&(d|=2|2*!!e.bold<<11),void 0!==e.underline&&(d|=4|4*!!e.underline<<11),void 0!==e.strikethrough&&(d|=8|8*!!e.strikethrough<<11),e.foreground&&(d|=16|e.foreground<<15),0===d&&(d=0x7fffffff))}else d=0x7fffffff,f="not-in-legend";this._hashTable.add(a,b,e,d)}return d}warnOverlappingSemanticTokens(a,b){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,this._logService.warn(`Overlapping semantic tokens detected at lineNumber ${a}, column ${b}`))}warnInvalidLengthSemanticTokens(a,b){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,this._logService.warn(`Semantic token with invalid length detected at lineNumber ${a}, column ${b}`))}warnInvalidEditStart(a,b,c,d,e){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,this._logService.warn(`Invalid semantic tokens edit detected (previousResultId: ${a}, resultId: ${b}) at edit #${c}: The provided start offset ${d} is outside the previous data (length ${e}).`))}};cB=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([cA(1,aR.Gy),cA(2,al.L),cA(3,cv.rr)],cB);class cC{constructor(a,b,c,d){this.tokenTypeIndex=a,this.tokenModifierSet=b,this.languageId=c,this.metadata=d,this.next=null}}class cD{static{this._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]}constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=cD._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<cD._SIZES.length?2/3*this._currentLength:0),this._elements=[],cD._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(a,b){for(let c=0;c<b;c++)a[c]=null}_hash2(a,b){return(a<<5)-a+b|0}_hashFunc(a,b,c){return this._hash2(this._hash2(a,b),c)%this._currentLength}get(a,b,c){let d=this._hashFunc(a,b,c),e=this._elements[d];for(;e;){if(e.tokenTypeIndex===a&&e.tokenModifierSet===b&&e.languageId===c)return e;e=e.next}return null}add(a,b,c,d){if(this._elementsCount++,0!==this._growCount&&this._elementsCount>=this._growCount){let a=this._elements;for(let b of(this._currentLengthIndex++,this._currentLength=cD._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<cD._SIZES.length?2/3*this._currentLength:0),this._elements=[],cD._nullOutEntries(this._elements,this._currentLength),a)){let a=b;for(;a;){let b=a.next;a.next=null,this._add(a),a=b}}}this._add(new cC(a,b,c,d))}_add(a){let b=this._hashFunc(a.tokenTypeIndex,a.tokenModifierSet,a.languageId);a.next=this._elements[b],this._elements[b]=a}}let cE=(0,aZ.u1)("semanticTokensStylingService");var cF=function(a,b){return function(c,d){b(c,d,a)}};let cG=class extends _.jG{constructor(a,b,c){super(),this._themeService=a,this._logService=b,this._languageService=c,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}getStyling(a){return this._caches.has(a)||this._caches.set(a,new cB(a.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(a)}};cG=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([cF(0,aR.Gy),cF(1,cv.rr),cF(2,al.L)],cG),(0,aQ.v)(cE,cG,1);var cH=c(14322);let cI=class extends _.jG{constructor(a){super(),this._themeService=a,this._onWillCreateCodeEditor=this._register(new a$.vl),this._onCodeEditorAdd=this._register(new a$.vl),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new a$.vl),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new a$.vl),this._onDiffEditorAdd=this._register(new a$.vl),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new a$.vl),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new cH.w,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(a){this._codeEditors[a.getId()]=a,this._onCodeEditorAdd.fire(a)}removeCodeEditor(a){(delete this._codeEditors[a.getId()])&&this._onCodeEditorRemove.fire(a)}listCodeEditors(){return Object.keys(this._codeEditors).map(a=>this._codeEditors[a])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(a){this._diffEditors[a.getId()]=a,this._onDiffEditorAdd.fire(a)}removeDiffEditor(a){(delete this._diffEditors[a.getId()])&&this._onDiffEditorRemove.fire(a)}listDiffEditors(){return Object.keys(this._diffEditors).map(a=>this._diffEditors[a])}getFocusedCodeEditor(){let a=null;for(let b of this.listCodeEditors()){if(b.hasTextFocus())return b;b.hasWidgetFocus()&&(a=b)}return a}removeDecorationType(a){let b=this._decorationOptionProviders.get(a);b&&(b.refCount--,b.refCount<=0&&(this._decorationOptionProviders.delete(a),b.dispose(),this.listCodeEditors().forEach(b=>b.removeDecorationsByType(a))))}setModelProperty(a,b,c){let d,e=a.toString();this._modelProperties.has(e)?d=this._modelProperties.get(e):(d=new Map,this._modelProperties.set(e,d)),d.set(b,c)}getModelProperty(a,b){let c=a.toString();if(this._modelProperties.has(c))return this._modelProperties.get(c).get(b)}async openCodeEditor(a,b,c){for(let d of this._codeEditorOpenHandlers){let e=await d(a,b,c);if(null!==e)return e}return null}registerCodeEditorOpenHandler(a){let b=this._codeEditorOpenHandlers.unshift(a);return(0,_.s)(b)}};cI=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([(h=aR.Gy,function(a,b){h(a,b,0)})],cI);var cJ=function(a,b){return function(c,d){b(c,d,a)}};let cK=class extends cI{constructor(a,b){super(b),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=a.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler(async(a,b,c)=>b?this.doOpenEditor(b,a):null))}_checkContextKey(){let a=!1;for(let b of this.listCodeEditors())if(!b.isSimpleWidget){a=!0;break}this._editorIsOpen.set(a)}setActiveCodeEditor(a){this._activeCodeEditor=a}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(a,b){if(!this.findModel(a,b.resource)){if(b.resource){let c=b.resource.scheme;if(c===bC.ny.http||c===bC.ny.https)return(0,a_.jh)(b.resource.toString()),a}return null}let c=b.options?b.options.selection:null;if(c)if("number"==typeof c.endLineNumber&&"number"==typeof c.endColumn)a.setSelection(c),a.revealRangeInCenter(c,1);else{let b={lineNumber:c.startLineNumber,column:c.startColumn};a.setPosition(b),a.revealPositionInCenter(b,1)}return a}findModel(a,b){let c=a.getModel();return c&&c.uri.toString()!==b.toString()?null:c}};cK=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([cJ(0,bU.fN),cJ(1,aR.Gy)],cK),(0,aQ.v)(ae.T,cK,0);var cL=c(81309),cM=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g},cN=function(a,b){return function(c,d){b(c,d,a)}};let cO=class{get mainContainer(){return this._codeEditorService.listCodeEditors().at(0)?.getContainerDomNode()??$.G.document.body}get activeContainer(){let a=this._codeEditorService.getFocusedCodeEditor()??this._codeEditorService.getActiveCodeEditor();return a?.getContainerDomNode()??this.mainContainer}get mainContainerDimension(){return(0,a_.tG)(this.mainContainer)}get activeContainerDimension(){return(0,a_.tG)(this.activeContainer)}get containers(){return(0,cL.Yc)(this._codeEditorService.listCodeEditors().map(a=>a.getContainerDomNode()))}getContainer(){return this.activeContainer}whenContainerStylesLoaded(){}focus(){this._codeEditorService.getFocusedCodeEditor()?.focus()}constructor(a){this._codeEditorService=a,this.onDidLayoutMainContainer=a$.Jh.None,this.onDidLayoutActiveContainer=a$.Jh.None,this.onDidLayoutContainer=a$.Jh.None,this.onDidChangeActiveContainer=a$.Jh.None,this.onDidAddContainer=a$.Jh.None,this.mainContainerOffset={top:0,quickPickTop:0},this.activeContainerOffset={top:0,quickPickTop:0}}};cO=cM([cN(0,ae.T)],cO);let cP=class extends cO{get mainContainer(){return this._container}constructor(a,b){super(b),this._container=a}};cP=cM([cN(1,ae.T)],cP),(0,aQ.v)(bm.x,cO,1);var cQ=c(80046),cR=c(50498),cS=function(a,b){return function(c,d){b(c,d,a)}};let cT=class extends _.jG{constructor(a,b,c){super(),this._contextKeyService=a,this._layoutService=b,this._configurationService=c,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=this._register(new a$.vl),this._onDidChangeReducedMotion=this._register(new a$.vl),this._onDidChangeReducedTransparency=this._register(new a$.vl),this._onDidChangeLinkUnderline=this._register(new a$.vl),this._accessibilityModeEnabledContext=bd.f.bindTo(this._contextKeyService);const d=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(a=>{a.affectsConfiguration("editor.accessibilitySupport")&&(d(),this._onDidChangeScreenReaderOptimized.fire()),a.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire()),a.affectsConfiguration("workbench.reduceTransparency")&&(this._configTransparencyReduced=this._configurationService.getValue("workbench.reduceTransparency"),this._onDidChangeReducedTransparency.fire())})),d(),this._register(this.onDidChangeScreenReaderOptimized(()=>d()));const e=$.G.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=e.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion");const f=$.G.matchMedia("(prefers-reduced-transparency: reduce)");this._systemTransparencyReduced=f.matches,this._configTransparencyReduced=this._configurationService.getValue("workbench.reduceTransparency"),this._linkUnderlinesEnabled=this._configurationService.getValue("accessibility.underlineLinks"),this.initReducedMotionListeners(e),this.initReducedTransparencyListeners(f),this.initLinkUnderlineListeners()}initReducedMotionListeners(a){this._register((0,a_.ko)(a,"change",()=>{this._systemMotionReduced=a.matches,"auto"===this._configMotionReduced&&this._onDidChangeReducedMotion.fire()}));let b=()=>{let a=this.isMotionReduced();this._layoutService.mainContainer.classList.toggle("monaco-reduce-motion",a),this._layoutService.mainContainer.classList.toggle("monaco-enable-motion",!a)};b(),this._register(this.onDidChangeReducedMotion(()=>b()))}initReducedTransparencyListeners(a){this._register((0,a_.ko)(a,"change",()=>{this._systemTransparencyReduced=a.matches,"auto"===this._configTransparencyReduced&&this._onDidChangeReducedTransparency.fire()}));let b=()=>{let a=this.isTransparencyReduced();this._layoutService.mainContainer.classList.toggle("monaco-reduce-transparency",a)};b(),this._register(this.onDidChangeReducedTransparency(()=>b()))}initLinkUnderlineListeners(){this._register(this._configurationService.onDidChangeConfiguration(a=>{if(a.affectsConfiguration("accessibility.underlineLinks")){let a=this._configurationService.getValue("accessibility.underlineLinks");this._linkUnderlinesEnabled=a,this._onDidChangeLinkUnderline.fire()}}));let a=()=>{let a=this._linkUnderlinesEnabled;this._layoutService.mainContainer.classList.toggle("underline-links",a)};a(),this._register(this.onDidChangeLinkUnderlines(()=>a()))}onDidChangeLinkUnderlines(a){return this._onDidChangeLinkUnderline.event(a)}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){let a=this.getAccessibilitySupportConfigurationValue();return"on"===a||"auto"===a&&2===this._accessibilitySupport}getAccessibilitySupportConfigurationValue(){let a=this._configurationService.inspect("editor.accessibilitySupport");return a.policyValue??a.memoryValue??a.workspaceFolderValue??a.workspaceValue??a.userValue??a.applicationValue??a.defaultValue??"auto"}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){let a=this._configMotionReduced;return"on"===a||"auto"===a&&this._systemMotionReduced}get onDidChangeReducedTransparency(){return this._onDidChangeReducedTransparency.event}isTransparencyReduced(){let a=this._configTransparencyReduced;return"on"===a||"auto"===a&&this._systemTransparencyReduced}getAccessibilitySupport(){return this._accessibilitySupport}};cT=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([cS(0,bU.fN),cS(1,bm.x),cS(2,aB.pG)],cT);var cU=c(14900),cV=c(22583),cW=c(47322),cX=c(40427),cY=function(a,b){return function(c,d){b(c,d,a)}};let cZ="application/vnd.code.resources",c$=class extends _.jG{static{B=this}constructor(a,b){super(),this.layoutService=a,this.logService=b,this.mapTextToType=new Map,this.findText="",this.resources=[],this.resourcesStateHash=void 0,(cW.nr||cW.c8)&&this.installWebKitWriteTextWorkaround(),this._register(a$.Jh.runAndSubscribe(a_.Iv,({window:a,disposables:b})=>{b.add((0,a_.ko)(a.document,"copy",()=>this.clearResourcesState()))},{window:$.G,disposables:this._store}))}triggerPaste(){this.logService.trace("BrowserClipboardService#triggerPaste")}installWebKitWriteTextWorkaround(){let a=()=>{let a=new be.Zv;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=a,(0,a_.fz)().navigator.clipboard.write([new ClipboardItem({"text/plain":a.p})]).catch(async b=>{b instanceof Error&&"NotAllowedError"===b.name&&a.isRejected||this.logService.error(b)})};this._register(a$.Jh.runAndSubscribe(this.layoutService.onDidAddContainer,({container:b,disposables:c})=>{c.add((0,a_.ko)(b,"click",a)),c.add((0,a_.ko)(b,"keydown",a))},{container:this.layoutService.mainContainer,disposables:this._store}))}async writeText(a,b){if(this.logService.trace("BrowserClipboardService#writeText called with type:",b," text.length:",a.length),this.clearResourcesState(),b){this.mapTextToType.set(b,a),this.logService.trace("BrowserClipboardService#writeText");return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(a);try{return this.logService.trace("before navigator.clipboard.writeText"),await (0,a_.fz)().navigator.clipboard.writeText(a)}catch(a){console.error(a)}this.fallbackWriteText(a)}fallbackWriteText(a){this.logService.trace("BrowserClipboardService#fallbackWriteText");let b=(0,a_.a)(),c=b.activeElement,d=b.body.appendChild((0,a_.$)("textarea",{"aria-hidden":!0}));d.style.height="1px",d.style.width="1px",d.style.position="absolute",d.value=a,d.focus(),d.select(),b.execCommand("copy"),(0,a_.sb)(c)&&c.focus(),d.remove()}async readText(a){if(this.logService.trace("BrowserClipboardService#readText called with type:",a),a){let b=this.mapTextToType.get(a)||"";return this.logService.trace("BrowserClipboardService#readText text.length:",b.length),b}try{let a=await (0,a_.fz)().navigator.clipboard.readText();return this.logService.trace("BrowserClipboardService#readText text.length:",a.length),a}catch(a){console.error(a)}return""}async readFindText(){return this.findText}async writeFindText(a){this.findText=a}static{this.MAX_RESOURCE_STATE_SOURCE_LENGTH=1e3}async readResources(){try{for(let a of(await (0,a_.fz)().navigator.clipboard.read()))if(a.types.includes(`web ${cZ}`)){let b=await a.getType(`web ${cZ}`);return JSON.parse(await b.text()).map(a=>ab.r.from(a))}}catch(a){}let a=await this.computeResourcesStateHash();return this.resourcesStateHash!==a&&this.clearResourcesState(),this.resources}async computeResourcesStateHash(){if(0===this.resources.length)return;let a=await this.readText();return(0,cX.tW)(a.substring(0,B.MAX_RESOURCE_STATE_SOURCE_LENGTH))}clearInternalState(){this.clearResourcesState()}clearResourcesState(){this.resources=[],this.resourcesStateHash=void 0}};c$=B=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([cY(0,bm.x),cY(1,cv.rr)],c$);var c_=c(58697),c0=c(80926),c1=c(29943),c2=c(97547),c3=c(29498);function c4(a){return Object.isFrozen(a)?a:(0,c1.ol)(a)}class c5{static createEmptyModel(a){return new c5({},[],[],void 0,a)}constructor(a,b,c,d,e){this._contents=a,this._keys=b,this._overrides=c,this._raw=d,this.logService=e,this.overrideConfigurations=new Map}get rawConfiguration(){if(!this._rawConfiguration)if(this._raw){let a=(Array.isArray(this._raw)?this._raw:[this._raw]).map(a=>{if(a instanceof c5)return a;let b=new c6("",this.logService);return b.parseRaw(a),b.configurationModel});this._rawConfiguration=a.reduce((a,b)=>b===a?b:a.merge(b),a[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}get raw(){if(this._raw&&!(Array.isArray(this._raw)&&this._raw.every(a=>a instanceof c5)))return this._raw}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(a){return a?(0,aB.gD)(this.contents,a):this.contents}inspect(a,b){let c=this;return{get value(){return c4(c.rawConfiguration.getValue(a))},get override(){return b?c4(c.rawConfiguration.getOverrideValue(a,b)):void 0},get merged(){return c4(b?c.rawConfiguration.override(b).getValue(a):c.rawConfiguration.getValue(a))},get overrides(){let b=[];for(let{contents:d,identifiers:e,keys:f}of c.rawConfiguration.overrides){let g=new c5(d,f,[],void 0,c.logService).getValue(a);void 0!==g&&b.push({identifiers:e,value:g})}return b.length?c4(b):void 0}}}getOverrideValue(a,b){let c=this.getContentsForOverrideIdentifer(b);return c?a?(0,aB.gD)(c,a):c:void 0}override(a){let b=this.overrideConfigurations.get(a);return b||(b=this.createOverrideConfigurationModel(a),this.overrideConfigurations.set(a,b)),b}merge(...a){let b=(0,c1.Go)(this.contents),c=(0,c1.Go)(this.overrides),d=[...this.keys],e=this._raw?Array.isArray(this._raw)?[...this._raw]:[this._raw]:[this];for(let f of a)if(e.push(...f._raw?Array.isArray(f._raw)?f._raw:[f._raw]:[f]),!f.isEmpty()){for(let a of(this.mergeContents(b,f.contents),f.overrides)){let[b]=c.filter(b=>(0,cL.aI)(b.identifiers,a.identifiers));b?(this.mergeContents(b.contents,a.contents),b.keys.push(...a.keys),b.keys=(0,cL.dM)(b.keys)):c.push((0,c1.Go)(a))}for(let a of f.keys)-1===d.indexOf(a)&&d.push(a)}return new c5(b,d,c,!e.length||e.every(a=>a instanceof c5)?void 0:e,this.logService)}createOverrideConfigurationModel(a){let b=this.getContentsForOverrideIdentifer(a);if(!b||"object"!=typeof b||!Object.keys(b).length)return this;let c={};for(let a of(0,cL.dM)([...Object.keys(this.contents),...Object.keys(b)])){let d=this.contents[a],e=b[a];e&&("object"==typeof d&&"object"==typeof e?(d=(0,c1.Go)(d),this.mergeContents(d,e)):d=e),c[a]=d}return new c5(c,this.keys,this.overrides,void 0,this.logService)}mergeContents(a,b){for(let c of Object.keys(b)){if(c in a&&(0,bf.Gv)(a[c])&&(0,bf.Gv)(b[c])){this.mergeContents(a[c],b[c]);continue}a[c]=(0,c1.Go)(b[c])}}getContentsForOverrideIdentifer(a){let b=null,c=null,d=a=>{a&&(c?this.mergeContents(c,a):c=(0,c1.Go)(a))};for(let c of this.overrides)1===c.identifiers.length&&c.identifiers[0]===a?b=c.contents:c.identifiers.includes(a)&&d(c.contents);return d(b),c}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(a,b){this.updateValue(a,b,!1)}removeValue(a){let b=this.keys.indexOf(a);-1!==b&&(this.keys.splice(b,1),(0,aB.iB)(this.contents,a),c2.rC.test(a)&&this.overrides.splice(this.overrides.findIndex(b=>(0,cL.aI)(b.identifiers,(0,c2.Gv)(a))),1))}updateValue(a,b,c){if((0,aB.kW)(this.contents,a,b,a=>this.logService.error(a)),(c=c||-1===this.keys.indexOf(a))&&this.keys.push(a),c2.rC.test(a)){let b=this.contents[a],c=(0,c2.Gv)(a),d={identifiers:c,keys:Object.keys(b),contents:(0,aB.ad)(b,a=>this.logService.error(a))},e=this.overrides.findIndex(a=>(0,cL.aI)(a.identifiers,c));-1!==e?this.overrides[e]=d:this.overrides.push(d)}}}class c6{constructor(a,b){this._name=a,this.logService=b,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||c5.createEmptyModel(this.logService)}parseRaw(a,b){this._raw=a;let{contents:c,keys:d,overrides:e,restricted:f,hasExcludedProperties:g}=this.doParseRaw(a,b);this._configurationModel=new c5(c,d,e,g?[a]:void 0,this.logService),this._restrictedConfigurations=f||[]}doParseRaw(a,b){let c=c3.O.as(c2.Fd.Configuration),d=c.getConfigurationProperties(),e=c.getExcludedConfigurationProperties(),f=this.filter(a,d,e,!0,b);a=f.raw;let g=(0,aB.ad)(a,a=>this.logService.error(`Conflict in settings file ${this._name}: ${a}`));return{contents:g,keys:Object.keys(a),overrides:this.toOverrides(a,a=>this.logService.error(`Conflict in settings file ${this._name}: ${a}`)),restricted:f.restricted,hasExcludedProperties:f.hasExcludedProperties}}filter(a,b,c,d,e){let f=!1;if(!e?.scopes&&!e?.skipRestricted&&!e?.skipUnregistered&&!e?.exclude?.length)return{raw:a,restricted:[],hasExcludedProperties:f};let g={},h=[];for(let i in a)if(c2.rC.test(i)&&d){let d=this.filter(a[i],b,c,!1,e);g[i]=d.raw,f=f||d.hasExcludedProperties,h.push(...d.restricted)}else{let d=b[i];d?.restricted&&h.push(i),this.shouldInclude(i,d,c,e)?g[i]=a[i]:f=!0}return{raw:g,restricted:h,hasExcludedProperties:f}}shouldInclude(a,b,c,d){if(d.exclude?.includes(a))return!1;if(d.include?.includes(a))return!0;if(d.skipRestricted&&b?.restricted||d.skipUnregistered&&!b)return!1;let e=b??c[a],f=e?void 0!==e.scope?e.scope:4:void 0;return void 0===f||void 0===d.scopes||d.scopes.includes(f)}toOverrides(a,b){let c=[];for(let d of Object.keys(a))if(c2.rC.test(d)){let e={},f=a[d];for(let a in f)e[a]=f[a];c.push({identifiers:(0,c2.Gv)(d),keys:Object.keys(e),contents:(0,aB.ad)(e,b)})}return c}}class c7{constructor(a,b,c,d,e,f,g,h,i,j,k,l,m){this.key=a,this.overrides=b,this._value=c,this.overrideIdentifiers=d,this.defaultConfiguration=e,this.policyConfiguration=f,this.applicationConfiguration=g,this.userConfiguration=h,this.localUserConfiguration=i,this.remoteUserConfiguration=j,this.workspaceConfiguration=k,this.folderConfigurationModel=l,this.memoryConfigurationModel=m}toInspectValue(a){return a?.value!==void 0||a?.override!==void 0||a?.overrides!==void 0?a:void 0}get defaultInspectValue(){return this._defaultInspectValue||(this._defaultInspectValue=this.defaultConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._defaultInspectValue}get defaultValue(){return this.defaultInspectValue.merged}get policyInspectValue(){return void 0===this._policyInspectValue&&(this._policyInspectValue=this.policyConfiguration?this.policyConfiguration.inspect(this.key):null),this._policyInspectValue}get policyValue(){return this.policyInspectValue?.merged}get applicationInspectValue(){return void 0===this._applicationInspectValue&&(this._applicationInspectValue=this.applicationConfiguration?this.applicationConfiguration.inspect(this.key):null),this._applicationInspectValue}get applicationValue(){return this.applicationInspectValue?.merged}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.userConfiguration.inspect(this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get userValue(){return this.userInspectValue.merged}get user(){return this.toInspectValue(this.userInspectValue)}get workspaceInspectValue(){return void 0===this._workspaceInspectValue&&(this._workspaceInspectValue=this.workspaceConfiguration?this.workspaceConfiguration.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceInspectValue}get workspaceValue(){return this.workspaceInspectValue?.merged}get workspaceFolderInspectValue(){return void 0===this._workspaceFolderInspectValue&&(this._workspaceFolderInspectValue=this.folderConfigurationModel?this.folderConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier):null),this._workspaceFolderInspectValue}get workspaceFolderValue(){return this.workspaceFolderInspectValue?.merged}get memoryInspectValue(){return void 0===this._memoryInspectValue&&(this._memoryInspectValue=this.memoryConfigurationModel.inspect(this.key,this.overrides.overrideIdentifier)),this._memoryInspectValue}get memoryValue(){return this.memoryInspectValue.merged}}class c8{constructor(a,b,c,d,e,f,g,h,i,j){this._defaultConfiguration=a,this._policyConfiguration=b,this._applicationConfiguration=c,this._localUserConfiguration=d,this._remoteUserConfiguration=e,this._workspaceConfiguration=f,this._folderConfigurations=g,this._memoryConfiguration=h,this._memoryConfigurationByResource=i,this.logService=j,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new b4.fT,this._userConfiguration=null}getValue(a,b,c){return this.getConsolidatedConfigurationModel(a,b,c).getValue(a)}updateValue(a,b,c={}){let d;c.resource?(d=this._memoryConfigurationByResource.get(c.resource))||(d=c5.createEmptyModel(this.logService),this._memoryConfigurationByResource.set(c.resource,d)):d=this._memoryConfiguration,void 0===b?d.removeValue(a):d.setValue(a,b),c.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(a,b,c){let d=this.getConsolidatedConfigurationModel(a,b,c),e=this.getFolderConfigurationModelForResource(b.resource,c),f=b.resource&&this._memoryConfigurationByResource.get(b.resource)||this._memoryConfiguration,g=new Set;for(let b of d.overrides)for(let c of b.identifiers)void 0!==d.getOverrideValue(a,c)&&g.add(c);return new c7(a,b,d.getValue(a),g.size?[...g]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,c?this._workspaceConfiguration:void 0,e||void 0,f)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){if(!this._userConfiguration)if(this._remoteUserConfiguration.isEmpty())this._userConfiguration=this._localUserConfiguration;else{let a=this._localUserConfiguration.merge(this._remoteUserConfiguration);this._userConfiguration=new c5(a.contents,a.keys,a.overrides,void 0,this.logService)}return this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(a,b,c){let d=this.getConsolidatedConfigurationModelForResource(b,c);if(b.overrideIdentifier&&(d=d.override(b.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&void 0!==this._policyConfiguration.getValue(a))for(let a of(d=d.merge(),this._policyConfiguration.keys))d.setValue(a,this._policyConfiguration.getValue(a));return d}getConsolidatedConfigurationModelForResource({resource:a},b){let c=this.getWorkspaceConsolidatedConfiguration();if(b&&a){let d=b.getFolder(a);d&&(c=this.getFolderConsolidatedConfiguration(d.uri)||c);let e=this._memoryConfigurationByResource.get(a);e&&(c=c.merge(e))}return c}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(a){let b=this._foldersConsolidatedConfigurations.get(a);if(!b){let c=this.getWorkspaceConsolidatedConfiguration(),d=this._folderConfigurations.get(a);d?(b=c.merge(d),this._foldersConsolidatedConfigurations.set(a,b)):b=c}return b}getFolderConfigurationModelForResource(a,b){if(b&&a){let c=b.getFolder(a);if(c)return this._folderConfigurations.get(c.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys,raw:Array.isArray(this.applicationConfiguration.raw)?void 0:this.applicationConfiguration.raw},userLocal:{contents:this.localUserConfiguration.contents,overrides:this.localUserConfiguration.overrides,keys:this.localUserConfiguration.keys,raw:Array.isArray(this.localUserConfiguration.raw)?void 0:this.localUserConfiguration.raw},userRemote:{contents:this.remoteUserConfiguration.contents,overrides:this.remoteUserConfiguration.overrides,keys:this.remoteUserConfiguration.keys,raw:Array.isArray(this.remoteUserConfiguration.raw)?void 0:this.remoteUserConfiguration.raw},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((a,b)=>{let{contents:c,overrides:d,keys:e}=this._folderConfigurations.get(b);return a.push([b,{contents:c,overrides:d,keys:e}]),a},[])}}static parse(a,b){return new c8(this.parseConfigurationModel(a.defaults,b),this.parseConfigurationModel(a.policy,b),this.parseConfigurationModel(a.application,b),this.parseConfigurationModel(a.userLocal,b),this.parseConfigurationModel(a.userRemote,b),this.parseConfigurationModel(a.workspace,b),a.folders.reduce((a,c)=>(a.set(ab.r.revive(c[0]),this.parseConfigurationModel(c[1],b)),a),new b4.fT),c5.createEmptyModel(b),new b4.fT,b)}static parseConfigurationModel(a,b){return new c5(a.contents,a.keys,a.overrides,a.raw,b)}}class c9{constructor(a,b,c,d,e){for(const f of(this.change=a,this.previous=b,this.currentConfiguraiton=c,this.currentWorkspace=d,this.logService=e,this._marker="\n",this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=46,this.affectedKeys=new Set,this._previousConfiguration=void 0,a.keys))this.affectedKeys.add(f);for(const[,b]of a.overrides)for(const a of b)this.affectedKeys.add(a);for(const a of(this._affectsConfigStr=this._marker,this.affectedKeys))this._affectsConfigStr+=a+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=c8.parse(this.previous.data,this.logService)),this._previousConfiguration}affectsConfiguration(a,b){let c=this._marker+a,d=this._affectsConfigStr.indexOf(c);if(d<0)return!1;let e=d+c.length;if(e>=this._affectsConfigStr.length)return!1;let f=this._affectsConfigStr.charCodeAt(e);if(f!==this._markerCode1&&f!==this._markerCode2)return!1;if(b){let c=this.previousConfiguration?this.previousConfiguration.getValue(a,b,this.previous?.workspace):void 0,d=this.currentConfiguraiton.getValue(a,b,this.currentWorkspace);return!(0,c1.aI)(c,d)}return!0}}class da extends _.jG{get configurationModel(){return this._configurationModel}constructor(a){super(),this.logService=a,this._configurationModel=c5.createEmptyModel(a)}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=c5.createEmptyModel(this.logService);let a=c3.O.as(c2.Fd.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(a),a)}updateConfigurationModel(a,b){let c=this.getConfigurationDefaultOverrides();for(let d of a){let a=c[d],e=b[d];void 0!==a?this._configurationModel.setValue(d,a):e?this._configurationModel.setValue(d,this.getDefaultValue(d,e)):this._configurationModel.removeValue(d)}}getDefaultValue(a,b){return(0,c1.Go)(b.default)}}var db=c(47309),dc=c(7052),dd=c(36901);let de="data-keybinding-context";class df{constructor(a,b){this._id=a,this._parent=b,this._value=Object.create(null),this._value._contextId=a}get value(){return{...this._value}}setValue(a,b){return!(0,c1.aI)(this._value[a],b)&&(this._value[a]=b,!0)}removeValue(a){return a in this._value&&(delete this._value[a],!0)}getValue(a){let b=this._value[a];return void 0===b&&this._parent?this._parent.getValue(a):b}}class dg extends df{static{this.INSTANCE=new dg}constructor(){super(-1,null)}setValue(a,b){return!1}removeValue(a){return!1}getValue(a){}}class dh extends df{static{this._keyPrefix="config."}constructor(a,b,c){super(a,null),this._configurationService=b,this._values=dc.cB.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(a=>{if(7===a.source){let a=Array.from(this._values,([a])=>a);this._values.clear(),c.fire(new dk(a))}else{let b=[];for(let c of a.affectedKeys){let a=`config.${c}`,d=this._values.findSuperstr(a);void 0!==d&&(b.push(...db.f.map(d,([a])=>a)),this._values.deleteSuperstr(a)),this._values.has(a)&&(b.push(a),this._values.delete(a))}c.fire(new dk(b))}})}dispose(){this._listener.dispose()}getValue(a){let b;if(0!==a.indexOf(dh._keyPrefix))return super.getValue(a);if(this._values.has(a))return this._values.get(a);let c=a.substr(dh._keyPrefix.length),d=this._configurationService.getValue(c);switch(typeof d){case"number":case"boolean":case"string":b=d;break;default:b=Array.isArray(d)?JSON.stringify(d):d}return this._values.set(a,b),b}setValue(a,b){return super.setValue(a,b)}removeValue(a){return super.removeValue(a)}}class di{constructor(a,b,c){this._service=a,this._key=b,this._defaultValue=c,this.reset()}set(a){this._service.setContext(this._key,a)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class dj{constructor(a){this.key=a}affectsSome(a){return a.has(this.key)}allKeysContainedIn(a){return this.affectsSome(a)}}class dk{constructor(a){this.keys=a}affectsSome(a){for(let b of this.keys)if(a.has(b))return!0;return!1}allKeysContainedIn(a){return this.keys.every(b=>a.has(b))}}class dl{constructor(a){this.events=a}affectsSome(a){for(let b of this.events)if(b.affectsSome(a))return!0;return!1}allKeysContainedIn(a){return this.events.every(b=>b.allKeysContainedIn(a))}}class dm extends _.jG{get onDidChangeContext(){return this._onDidChangeContext.event}constructor(a){super(),this._onDidChangeContext=this._register(new a$.fV({merge:a=>new dl(a)})),this._isDisposed=!1,this._myContextId=a}createKey(a,b){if(this._isDisposed)throw Error("AbstractContextKeyService has been disposed");return new di(this,a,b)}bufferChangeEvents(a){this._onDidChangeContext.pause();try{a()}finally{this._onDidChangeContext.resume()}}createScoped(a){if(this._isDisposed)throw Error("AbstractContextKeyService has been disposed");return new dp(this,a)}contextMatchesRules(a){if(this._isDisposed)throw Error("AbstractContextKeyService has been disposed");let b=this.getContextValuesContainer(this._myContextId);return!a||a.evaluate(b)}getContextKeyValue(a){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(a)}setContext(a,b){if(this._isDisposed)return;let c=this.getContextValuesContainer(this._myContextId);c&&c.setValue(a,b)&&this._onDidChangeContext.fire(new dj(a))}removeContext(a){!this._isDisposed&&this.getContextValuesContainer(this._myContextId).removeValue(a)&&this._onDidChangeContext.fire(new dj(a))}getContext(a){return this._isDisposed?dg.INSTANCE:this.getContextValuesContainer(function(a){for(;a;){if(a.hasAttribute(de)){let b=a.getAttribute(de);if(b)return parseInt(b,10);return NaN}a=a.parentElement}return 0}(a))}dispose(){super.dispose(),this._isDisposed=!0}}let dn=class extends dm{constructor(a){super(0),this._contexts=new Map,this._lastContextId=0,this.inputFocusedContext=dd.J7.bindTo(this);const b=this._register(new dh(this._myContextId,a,this._onDidChangeContext));this._contexts.set(this._myContextId,b),this._register(a$.Jh.runAndSubscribe(a_.Iv,({window:a,disposables:b})=>{let c=b.add(new _.HE);b.add((0,a_.ko)(a,a_.Bx.FOCUS_IN,()=>{c.value=new _.Cm,this.updateInputContextKeys(a.document,c.value)},!0))},{window:$.G,disposables:this._store}))}updateInputContextKeys(a,b){function c(){return!!a.activeElement&&(0,a_.yD)(a.activeElement)}let d=c();if(this.inputFocusedContext.set(d),d){let d=b.add((0,a_.w5)(a.activeElement));a$.Jh.once(d.onDidBlur)(()=>{(0,a_.fz)().document===a&&this.inputFocusedContext.set(c()),d.dispose()},void 0,b)}}getContextValuesContainer(a){return this._isDisposed?dg.INSTANCE:this._contexts.get(a)||dg.INSTANCE}createChildContext(a=this._myContextId){if(this._isDisposed)throw Error("ContextKeyService has been disposed");let b=++this._lastContextId;return this._contexts.set(b,new df(b,this.getContextValuesContainer(a))),b}disposeContext(a){this._isDisposed||this._contexts.delete(a)}};dn=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([(i=aB.pG,function(a,b){i(a,b,0)})],dn);class dp extends dm{constructor(a,b){if(super(a.createChildContext()),this._parentChangeListener=this._register(new _.HE),this._parent=a,this._updateParentChangeListener(),this._domNode=b,this._domNode.hasAttribute(de)){let a="";this._domNode.classList&&(a=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${a?": "+a:""}`)}this._domNode.setAttribute(de,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(a=>{let b=this._parent.getContextValuesContainer(this._myContextId).value;a.allKeysContainedIn(new Set(Object.keys(b)))||this._onDidChangeContext.fire(a)})}dispose(){this._isDisposed||(this._parentChangeListener.clear(),this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(de),super.dispose())}getContextValuesContainer(a){return this._isDisposed?dg.INSTANCE:this._parent.getContextValuesContainer(a)}createChildContext(a=this._myContextId){if(this._isDisposed)throw Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(a)}disposeContext(a){this._parent.disposeContext(a)}}c0.w.registerCommand("_setContext",function(a,b,c){var d;a.get(bU.fN).createKey(String(b),(d=c,(0,c1.PI)(d,a=>"object"==typeof a&&1===a.$mid?ab.r.revive(a).toString():a instanceof ab.r?a.toString():void 0)))}),c0.w.registerCommand({id:"getContextKeyInfo",handler:()=>[...bU.N1.all()].sort((a,b)=>a.key.localeCompare(b.key)),metadata:{description:(0,a3.kg)(1736,"A command that returns information about context keys"),args:[]}}),c0.w.registerCommand("_generateContextKeyInfo",function(){let a=[],b=new Set;for(let c of bU.N1.all())b.has(c.key)||(b.add(c.key),a.push(c));a.sort((a,b)=>a.key.localeCompare(b.key)),console.log(JSON.stringify(a,void 0,2))});var dq=c(66560),dr=c(89574),ds=c(46857),dt=c(34793),du=c(42913),dv=c(14826),dw=c(70288),dx=c(33040),dy=c(5355),dz=c(63060),dA=c(35001);let dB=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,dC=/(&amp;)?(&amp;)([^\s&])/g;(j=C||(C={}))[j.Right=0]="Right",j[j.Left=1]="Left",(k=D||(D={}))[k.Above=0]="Above",k[k.Below=1]="Below";class dD extends dv.E{constructor(a,b,c,d){a.classList.add("monaco-menu-container"),a.setAttribute("role","presentation");const e=document.createElement("div");e.classList.add("monaco-menu"),e.setAttribute("role","presentation"),super(e,{orientation:1,actionViewItemProvider:a=>this.doGetActionViewItem(a,c,f),context:c.context,actionRunner:c.actionRunner,ariaLabel:c.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...bc.zx||bc.j9?[10]:[]],keyDown:!0}}),this.menuStyles=d,this.menuElement=e,this.actionsList.tabIndex=0,this.initializeOrUpdateStyleSheet(a,d),this._register(dt.q.addTarget(e)),this._register((0,a_.ko)(e,a_.Bx.KEY_DOWN,a=>{new a1.Z(a).equals(2)&&a.preventDefault()})),c.enableMnemonics&&this._register((0,a_.ko)(e,a_.Bx.KEY_DOWN,a=>{let b=a.key.toLocaleLowerCase(),c=this.mnemonics.get(b);if(void 0!==c&&(a_.fs.stop(a,!0),1===c.length&&(c[0]instanceof dF&&c[0].container&&this.focusItemByElement(c[0].container),c[0].onClick(a)),c.length>1)){let a=c.shift();a&&a.container&&(this.focusItemByElement(a.container),c.push(a)),this.mnemonics.set(b,c)}})),bc.j9&&this._register((0,a_.ko)(e,a_.Bx.KEY_DOWN,a=>{let b=new a1.Z(a);b.equals(14)||b.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),a_.fs.stop(a,!0)):(b.equals(13)||b.equals(12))&&(this.focusedItem=0,this.focusPrevious(),a_.fs.stop(a,!0))})),this._register((0,a_.ko)(this.domNode,a_.Bx.MOUSE_OUT,a=>{let b=a.relatedTarget;(0,a_.QX)(b,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),a.stopPropagation())})),this._register((0,a_.ko)(this.actionsList,a_.Bx.MOUSE_OVER,a=>{let b=a.target;if(b&&(0,a_.QX)(b,this.actionsList)&&b!==this.actionsList){for(;b.parentElement!==this.actionsList&&null!==b.parentElement;)b=b.parentElement;if(b.classList.contains("action-item")){let a=this.focusedItem;this.setFocusedItem(b),a!==this.focusedItem&&this.updateFocus()}}})),this._register(dt.q.addTarget(this.actionsList)),this._register((0,a_.ko)(this.actionsList,dt.B.Tap,a=>{let b=a.initialTarget;if(b&&(0,a_.QX)(b,this.actionsList)&&b!==this.actionsList){for(;b.parentElement!==this.actionsList&&null!==b.parentElement;)b=b.parentElement;if(b.classList.contains("action-item")){let a=this.focusedItem;this.setFocusedItem(b),a!==this.focusedItem&&this.updateFocus()}}}));const f={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new a2.MU(e,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const g=this.scrollableElement.getDomNode();g.style.position="",this.styleScrollElement(g,d),this._register((0,a_.ko)(e,dt.B.Change,a=>{a_.fs.stop(a,!0);let b=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:b-a.translationY})})),this._register((0,a_.ko)(g,a_.Bx.MOUSE_UP,a=>{a.preventDefault()}));const h=(0,a_.zk)(a);e.style.maxHeight=`${Math.max(10,h.innerHeight-a.getBoundingClientRect().top-35)}px`,b=b.filter((a,d)=>c.submenuIds?.has(a.id)?(console.warn(`Found submenu cycle: ${a.id}`),!1):(!(a instanceof dq.wv)||d!==b.length-1&&0!==d&&!(b[d-1]instanceof dq.wv))&&!0),this.push(b,{icon:!0,label:!0,isMenu:!0}),a.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(a=>!(a instanceof dG)).forEach((a,b,c)=>{a.updatePositionInSet(b+1,c.length)})}initializeOrUpdateStyleSheet(a,b){this.styleSheet||((0,a_.Cl)(a)?this.styleSheet=(0,du.li)(a):(dD.globalStyleSheet||(dD.globalStyleSheet=(0,du.li)()),this.styleSheet=dD.globalStyleSheet)),this.styleSheet.textContent=function(a,b){let c=a.borderColor??"var(--vscode-menu-border)",d=`
56
56
  .monaco-menu {
@@ -522,7 +522,7 @@ ${this._themeCSS}`,this._styleElements.forEach(a=>a.textContent=this._allCSS)}ge
522
522
  `),this.styleElement.textContent=c.join("\n")}}let Z={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropOverBackground:"#383B3D",listDropBetweenBackground:"#EEEEEE",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:r.Q1.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:r.Q1.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:r.Q1.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0,treeStickyScrollBackground:void 0,treeStickyScrollBorder:void 0,treeStickyScrollShadow:void 0},$={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){},dispose(){}}};function _(a,b){let c=[],d=0,e=0;for(;d<a.length||e<b.length;)if(d>=a.length)c.push(b[e++]);else if(e>=b.length)c.push(a[d++]);else if(a[d]===b[e]){c.push(a[d]),d++,e++;continue}else a[d]<b[e]?c.push(a[d++]):c.push(b[e++]);return c}let aa=(a,b)=>a-b;class ab{constructor(a,b){this._templateId=a,this.renderers=b}get templateId(){return this._templateId}renderTemplate(a){return this.renderers.map(b=>b.renderTemplate(a))}renderElement(a,b,c,d){let e=0;for(let f of this.renderers)f.renderElement(a,b,c[e++],d)}disposeElement(a,b,c,d){let e=0;for(let f of this.renderers)f.disposeElement?.(a,b,c[e],d),e+=1}disposeTemplate(a){let b=0;for(let c of this.renderers)c.disposeTemplate(a[b++])}}class ac{constructor(a){this.accessibilityProvider=a,this.templateId="a18n"}renderTemplate(a){return{container:a,disposables:new v.Cm}}renderElement(a,b,c){let d=this.accessibilityProvider.getAriaLabel(a),e=d&&"string"!=typeof d?d:(0,D.l)(d);c.disposables.add((0,E.fm)(a=>{this.setAriaLabel(a.readObservable(e),c.container)}));let f=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(a);"number"==typeof f?c.container.setAttribute("aria-level",`${f}`):c.container.removeAttribute("aria-level")}setAriaLabel(a,b){a?b.setAttribute("aria-label",a):b.removeAttribute("aria-label")}disposeElement(a,b,c){c.disposables.clear()}disposeTemplate(a){a.disposables.dispose()}}class ad{constructor(a,b){this.list=a,this.dnd=b}getDragElements(a){let b=this.list.getSelectedElements();return b.indexOf(a)>-1?b:[a]}getDragURI(a){return this.dnd.getDragURI(a)}getDragLabel(a,b){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(a,b)}onDragStart(a,b){this.dnd.onDragStart?.(a,b)}onDragOver(a,b,c,d,e){return this.dnd.onDragOver(a,b,c,d,e)}onDragLeave(a,b,c,d){this.dnd.onDragLeave?.(a,b,c,d)}onDragEnd(a){this.dnd.onDragEnd?.(a)}drop(a,b,c,d,e){this.dnd.drop(a,b,c,d,e)}dispose(){this.dnd.dispose()}}class ae{get onDidChangeFocus(){return t.Jh.map(this.eventBufferer.wrapEvent(this.focus.onChange),a=>this.toListEvent(a),this.disposables)}get onDidChangeSelection(){return t.Jh.map(this.eventBufferer.wrapEvent(this.selection.onChange),a=>this.toListEvent(a),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let a=!1,b=t.Jh.chain(this.disposables.add(new k.f(this.view.domNode,"keydown")).event,b=>b.map(a=>new l.Z(a)).filter(b=>a=58===b.keyCode||b.shiftKey&&68===b.keyCode).map(a=>h.fs.stop(a,!0)).filter(()=>!1)),c=t.Jh.chain(this.disposables.add(new k.f(this.view.domNode,"keyup")).event,b=>b.forEach(()=>a=!1).map(a=>new l.Z(a)).filter(a=>58===a.keyCode||a.shiftKey&&68===a.keyCode).map(a=>h.fs.stop(a,!0)).map(({browserEvent:a})=>{let b=this.getFocus(),c=b.length?b[0]:void 0,d=void 0!==c?this.view.element(c):void 0,e=void 0!==c?this.view.domElement(c):this.view.domNode;return{index:c,element:d,anchor:e,browserEvent:a}})),d=t.Jh.chain(this.view.onContextMenu,b=>b.filter(b=>!a).map(({element:a,index:b,browserEvent:c})=>({element:a,index:b,anchor:new C.P((0,h.zk)(this.view.domNode),c),browserEvent:c})));return t.Jh.any(b,c,d)}get onKeyDown(){return this.disposables.add(new k.f(this.view.domNode,"keydown")).event}get onDidFocus(){return t.Jh.signal(this.disposables.add(new k.f(this.view.domNode,"focus",!0)).event)}get onDidBlur(){return t.Jh.signal(this.disposables.add(new k.f(this.view.domNode,"blur",!0)).event)}constructor(a,b,c,d,e=$){this.user=a,this._options=e,this.focus=new H("focused"),this.anchor=new H("anchor"),this.eventBufferer=new t.at,this._ariaLabel="",this.disposables=new v.Cm,this._onDidDispose=new t.vl,this.onDidDispose=this._onDidDispose.event;const f=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?this._options.accessibilityProvider?.getWidgetRole():"list";this.selection=new I("listbox"!==f);const g=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=e.accessibilityProvider,this.accessibilityProvider&&(g.push(new ac(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant?.(this.onDidChangeActiveDescendant,this,this.disposables)),d=d.map(a=>new ab(a.templateId,[...g,a]));const h={...e,dnd:e.dnd&&new ad(this,e.dnd)};if(this.view=this.createListView(b,c,d,h),this.view.domNode.setAttribute("role",f),e.styleController)this.styleController=e.styleController(this.view.domId);else{const a=(0,i.li)(this.view.domNode);this.styleController=new Y(a,this.view.domId)}if(this.spliceable=new o([new J(this.focus,this.view,e.identityProvider),new J(this.selection,this.view,e.identityProvider),new J(this.anchor,this.view,e.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new T(this,this.view)),("boolean"!=typeof e.keyboardSupport||e.keyboardSupport)&&(this.keyboardController=new Q(this,this.view,e),this.disposables.add(this.keyboardController)),e.keyboardNavigationLabelProvider){const a=e.keyboardNavigationDelegate||R;this.typeNavigationController=new S(this,this.view,e.keyboardNavigationLabelProvider,e.keyboardNavigationEventFilter??(()=>!0),a),this.disposables.add(this.typeNavigationController)}if(this.mouseController=this.createMouseController(e),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider){const a=this.accessibilityProvider.getWidgetAriaLabel(),b=a&&"string"!=typeof a?a:(0,D.l)(a);this.disposables.add((0,E.fm)(a=>{this.ariaLabel=a.readObservable(b)}))}!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(a,b,c,d){return new B.uO(a,b,c,d)}createMouseController(a){return new X(this)}updateOptions(a={}){this._options={...this._options,...a},this.typeNavigationController?.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(a),this.keyboardController?.updateOptions(a),this.view.updateOptions(a)}get options(){return this._options}splice(a,b,c=[]){if(a<0||a>this.view.length)throw new A(this.user,`Invalid start index: ${a}`);if(b<0)throw new A(this.user,`Invalid delete count: ${b}`);(0!==b||0!==c.length)&&this.eventBufferer.bufferEvents(()=>this.spliceable.splice(a,b,c))}rerender(){this.view.rerender()}element(a){return this.view.element(a)}indexOf(a){return this.view.indexOf(a)}indexAt(a){return this.view.indexAt(a)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get onDidChangeContentHeight(){return this.view.onDidChangeContentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(a){this.view.setScrollTop(a)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(a){this._ariaLabel=a,this.view.domNode.setAttribute("aria-label",a)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(a,b){this.view.layout(a,b)}setSelection(a,b){for(let b of a)if(b<0||b>=this.length)throw new A(this.user,`Invalid index ${b}`);a=a.filter(a=>this.getElementGroupId(a)!==z),this.selection.set(a,b)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(a=>this.view.element(a))}setAnchor(a){if(void 0===a)return void this.anchor.set([]);if(a<0||a>=this.length)throw new A(this.user,`Invalid index ${a}`);this.anchor.set([a])}getAnchor(){return this.anchor.get().at(0)}getAnchorElement(){let a=this.getAnchor();return void 0===a?void 0:this.element(a)}getElementGroupId(a){let b=this.options.identityProvider;if(!b?.getGroupId)return;let c=this.element(a);return b.getGroupId(c)}filterIndicesByGroup(a,b){let c=this.options.identityProvider;return c?.getGroupId?b===z?[]:a.filter(a=>{let d=this.element(a);return c.getGroupId(d)===b}):a}setFocus(a,b){for(let b of a)if(b<0||b>=this.length)throw new A(this.user,`Invalid index ${b}`);this.focus.set(a,b)}focusNext(a=1,b=!1,c,d){if(0===this.length)return;let e=this.focus.get(),f=this.findNextIndex(e.length>0?e[0]+a:0,b,d);f>-1&&this.setFocus([f],c)}focusPrevious(a=1,b=!1,c,d){if(0===this.length)return;let e=this.focus.get(),f=this.findPreviousIndex(e.length>0?e[0]-a:0,b,d);f>-1&&this.setFocus([f],c)}async focusNextPage(a,b){let c=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);c=0===c?0:c-1;let d=this.getFocus()[0];if(d!==c&&(void 0===d||c>d)){let e=this.findPreviousIndex(c,!1,b);e>-1&&d!==e?this.setFocus([e],a):this.setFocus([c],a)}else{let e=this.view.getScrollTop(),f=e+this.view.renderHeight;c>d&&(f-=this.view.elementHeight(c)),this.view.setScrollTop(f),this.view.getScrollTop()!==e&&(this.setFocus([]),await (0,q.wR)(0),await this.focusNextPage(a,b))}}async focusPreviousPage(a,b,c=()=>0){let d,e=c(),f=this.view.getScrollTop()+e;d=0===f?this.view.indexAt(f):this.view.indexAfter(f-1);let g=this.getFocus()[0];if(g!==d&&(void 0===g||g>=d)){let c=this.findNextIndex(d,!1,b);c>-1&&g!==c?this.setFocus([c],a):this.setFocus([d],a)}else this.view.setScrollTop(f-this.view.renderHeight-e),this.view.getScrollTop()+c()!==f&&(this.setFocus([]),await (0,q.wR)(0),await this.focusPreviousPage(a,b,c))}focusLast(a,b){if(0===this.length)return;let c=this.findPreviousIndex(this.length-1,!1,b);c>-1&&this.setFocus([c],a)}focusFirst(a,b){this.focusNth(0,a,b)}focusNth(a,b,c){if(0===this.length)return;let d=this.findNextIndex(a,!1,c);d>-1&&this.setFocus([d],b)}findNextIndex(a,b=!1,c){for(let d=0;d<this.length&&(!(a>=this.length)||b);d++){if(a%=this.length,!c||c(this.element(a)))return a;a++}return -1}findPreviousIndex(a,b=!1,c){for(let d=0;d<this.length&&(!(a<0)||b);d++){if(a=(this.length+a%this.length)%this.length,!c||c(this.element(a)))return a;a--}return -1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(a=>this.view.element(a))}reveal(a,b,c=0){if(a<0||a>=this.length)throw new A(this.user,`Invalid index ${a}`);let d=this.view.getScrollTop(),e=this.view.elementTop(a),f=this.view.elementHeight(a);if((0,y.Et)(b)){let a=f-this.view.renderHeight+c;this.view.setScrollTop(a*(0,w.qE)(b,0,1)+e-c)}else{let a=e+f,b=d+this.view.renderHeight;e<d+c&&a>=b||(e<d+c||a>=b&&f>=this.view.renderHeight?this.view.setScrollTop(e-c):a>=b&&this.view.setScrollTop(a-this.view.renderHeight))}}getRelativeTop(a,b=0){if(a<0||a>=this.length)throw new A(this.user,`Invalid index ${a}`);let c=this.view.getScrollTop(),d=this.view.elementTop(a),e=this.view.elementHeight(a);if(d<c+b||d+e>c+this.view.renderHeight)return null;let f=e-this.view.renderHeight+b;return Math.abs((c+b-d)/f)}getHTMLElement(){return this.view.domNode}getScrollableElement(){return this.view.scrollableElementDomNode}getElementID(a){return this.view.getElementDomId(a)}getElementTop(a){return this.view.elementTop(a)}style(a){this.styleController.style(a)}toListEvent({indexes:a,browserEvent:b}){return{indexes:a,elements:a.map(a=>this.view.element(a)),browserEvent:b}}_onFocusChange(){let a=this.focus.get();this.view.domNode.classList.toggle("element-focused",a.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){let a=this.focus.get();if(a.length>0){let b;this.accessibilityProvider?.getActiveDescendantId&&(b=this.accessibilityProvider.getActiveDescendantId(this.view.element(a[0]))),this.view.domNode.setAttribute("aria-activedescendant",b||this.view.getElementDomId(a[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){let a=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===a.length),this.view.domNode.classList.toggle("selection-single",1===a.length),this.view.domNode.classList.toggle("selection-multiple",a.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}F([s.B],ae.prototype,"onDidChangeFocus",null),F([s.B],ae.prototype,"onDidChangeSelection",null),F([s.B],ae.prototype,"onContextMenu",null),F([s.B],ae.prototype,"onKeyDown",null),F([s.B],ae.prototype,"onDidFocus",null),F([s.B],ae.prototype,"onDidBlur",null)},89481:(a,b,c)=>{"use strict";c.d(b,{d:()=>h});var d=c(43765);c(78014);var e=c(66036);c(95091);var f=c(76631),g=c(61811);class h{get debugName(){return this._debugNameData.getDebugName(this)??"(anonymous)"}constructor(a,b,c,d){this._debugNameData=a,this._runFn=b,this._changeTracker=c,this._state=2,this._updateCount=0,this._disposed=!1,this._dependencies=new Set,this._dependenciesToBeRemoved=new Set,this._isRunning=!1,this._iteration=0,this._store=void 0,this._delayedStore=void 0,this._changeSummary=this._changeTracker?.createChangeSummary(void 0),(0,g.t)()?.handleAutorunCreated(this,d),this._run()}dispose(){if(!this._disposed){for(let a of(this._disposed=!0,this._dependencies))a.removeObserver(this);this._dependencies.clear(),void 0!==this._store&&this._store.dispose(),void 0!==this._delayedStore&&this._delayedStore.dispose(),(0,g.t)()?.handleAutorunDisposed(this)}}_run(){let a=this._dependenciesToBeRemoved;this._dependenciesToBeRemoved=this._dependencies,this._dependencies=a,this._state=3;try{if(!this._disposed){(0,g.t)()?.handleAutorunStarted(this);let a=this._changeSummary,b=this._delayedStore;void 0!==b&&(this._delayedStore=void 0);try{this._isRunning=!0,this._changeTracker&&(this._changeTracker.beforeUpdate?.(this,a),this._changeSummary=this._changeTracker.createChangeSummary(a)),void 0!==this._store&&(this._store.dispose(),this._store=void 0),this._runFn(this,a)}catch(a){(0,e.y4)(a)}finally{this._isRunning=!1,void 0!==b&&b.dispose()}}}finally{for(let a of(this._disposed||(0,g.t)()?.handleAutorunFinished(this),this._dependenciesToBeRemoved))a.removeObserver(this);this._dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(a){3===this._state&&(this._checkIterations(),this._state=1),this._updateCount++}endUpdate(a){try{if(1===this._updateCount){this._iteration=1;do{if(this._checkIterations())return;if(1===this._state){for(let a of(this._state=3,this._dependencies))if(a.reportChanges(),2===this._state)break}this._iteration++,3!==this._state&&this._run()}while(3!==this._state)}}finally{this._updateCount--}(0,d.Ft)(()=>this._updateCount>=0)}handlePossibleChange(a){3===this._state&&this._isDependency(a)&&(this._checkIterations(),this._state=1)}handleChange(a,b){if(this._isDependency(a)){(0,g.t)()?.handleAutorunDependencyChanged(this,a,b);try{(!this._changeTracker||this._changeTracker.handleChange({changedObservable:a,change:b,didChange:b=>b===a},this._changeSummary))&&(this._checkIterations(),this._state=2)}catch(a){(0,e.y4)(a)}}}_isDependency(a){return this._dependencies.has(a)&&!this._dependenciesToBeRemoved.has(a)}_ensureNoRunning(){if(!this._isRunning)throw new e.D7("The reader object cannot be used outside its compute function!")}readObservable(a){if(this._ensureNoRunning(),this._disposed)return a.get();a.addObserver(this);let b=a.get();return this._dependencies.add(a),this._dependenciesToBeRemoved.delete(a),b}get store(){if(this._ensureNoRunning(),this._disposed)throw new e.D7("Cannot access store after dispose");return void 0===this._store&&(this._store=new f.Cm),this._store}debugGetState(){return{isRunning:this._isRunning,updateCount:this._updateCount,dependencies:this._dependencies,state:this._state,stateStr:function(a){switch(a){case 1:return"dependenciesMightHaveChanged";case 2:return"stale";case 3:return"upToDate";default:return"<unknown>"}}(this._state)}}debugRerun(){this._isRunning?this._state=2:this._run()}_checkIterations(){return this._iteration>100&&((0,e.y4)(new e.D7(`Autorun '${this.debugName}' is stuck in an infinite update loop.`)),!0)}}},89574:(a,b,c)=>{"use strict";let d;c.d(b,{rN:()=>T,R4:()=>N,nW:()=>M});var e=c(14016),f=c(75082),g=c(62677),h=c(70288),i=c(20522),j=c(94199),k=c(66560),l=c(80172),m=c(76631),n=c(18216),o=c(63060),p=c(85214),q=c(72816),r=c(29980),s=c(7092),t=c(99187),u=c(72663),v=c(58254),w=c(16794),x=c(39194),y=c(91088),z=c(5017),A=c(37327);c(34183),c(48727),c(11023);var B=c(18896);c(91018),c(62957),c(40563),c(58330),c(39014),c(26858);let C=["#007acc","#005a9e","#0098ff","#4fc3f7","#64b5f6","#42a5f5"];function D(a){if(d)return;let b=a.getBoundingClientRect(),c=(0,f.zk)(a).document,e=(0,f.$)(".animation-overlay");return e.style.position="fixed",e.style.left=`${b.left}px`,e.style.top=`${b.top}px`,e.style.width=`${b.width}px`,e.style.height=`${b.height}px`,e.style.pointerEvents="none",e.style.overflow="visible",e.style.zIndex="10000",c.body.appendChild(e),d=e,{overlay:e,cx:b.width/2,cy:b.height/2}}function E(a){setTimeout(()=>{d&&(d.remove(),d=void 0)},a)}function F(a,b){let c=[],d=Math.max(b.scale?.length??0,b.rotate?.length??0,b.translateY?.length??0);if(0!==d){for(let a=0;a<d;a++){let e={offset:1===d?1:a/(d-1)},f="",g=b.scale?.[a];void 0!==g&&(f+=`scale(${g})`);let h=b.rotate?.[a];void 0!==h&&(f+=` rotate(${h}deg)`);let i=b.translateY?.[a];void 0!==i&&(f+=` translateY(${i}px)`),f&&(e.transform=f.trim()),c.push(e)}a.animate(c,{duration:b.duration??350,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards"})}}var G=c(98030),H=c(46547),I=c(50702),J=c(95606);c(63838);var K=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g},L=function(a,b){return function(c,d){b(c,d,a)}};function M(a,b){let c,d=[];return O(a,d,(c=f.Di.getInstance()).keyStatus.altKey||(n.uF||n.j9)&&c.keyStatus.shiftKey,a=>"navigation"===a),d}function N(a,b,c,d){var e;let f={primary:[],secondary:[]};return O(a,f,!1,"string"==typeof(e=b)?a=>a===e:e,c,d),f}function O(a,b,c,d=a=>"navigation"===a,e=()=>!1,f=!1){let g,h;Array.isArray(b)?(g=b,h=b):(g=b.primary,h=b.secondary);let i=new Set;for(let[b,e]of a){let a;for(let j of(d(b)?(a=g).length>0&&f&&a.push(new k.wv):(a=h).length>0&&a.push(new k.wv),e)){c&&(j=j instanceof J.Xe&&j.alt?j.alt:j);let d=a.push(j);j instanceof k.YH&&i.add({group:b,action:j,index:d-1})}}for(let{group:a,action:b,index:c}of i){let f=d(a)?g:h,i=b.actions;e(b,a,f.length)&&f.splice(c,1,...i)}}let P=class extends h.Z4{constructor(a,b,c,d,e,g,h,i){super(void 0,a,{icon:!!(a.class||a.item.icon),label:!a.class&&!a.item.icon,draggable:b?.draggable,keybinding:b?.keybinding,hoverDelegate:b?.hoverDelegate,keybindingNotRenderedWithLabel:b?.keybindingNotRenderedWithLabel}),this._options=b,this._keybindingService=c,this._notificationService=d,this._contextKeyService=e,this._themeService=g,this._contextMenuService=h,this._accessibilityService=i,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new m.HE),this._altKey=f.Di.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}async onClick(a){if(a.preventDefault(),a.stopPropagation(),this._options?.onClickAnimation&&this.element&&!this._accessibilityService.isMotionReduced()){let a=this._menuItemAction.item.icon;!function(a,b,c){switch(b){case 1:!function(a){let b=D(a);if(!b)return;let{overlay:c,cx:d,cy:e}=b,g=a.getBoundingClientRect();F(a,{scale:[1,1.3,1],rotate:[0,-10,10,0],duration:350});for(let a=0;a<10;a++){let b=3+a%3*1.5,g=36*a*Math.PI/180,h=.6+a%4*.1,i=(0,f.$)(".animation-particle");i.style.position="absolute",i.style.width=`${b}px`,i.style.height=`${b}px`,i.style.borderRadius="50%",i.style.backgroundColor=C[a%C.length],i.style.left=`${d-b/2}px`,i.style.top=`${e-b/2}px`,c.appendChild(i);let j=35*Math.cos(g),k=35*Math.sin(g);i.animate([{opacity:0,transform:"scale(0) translate(0, 0)"},{opacity:h,transform:`scale(1) translate(${.5*j}px, ${.5*k}px)`,offset:.3},{opacity:h,transform:`scale(1) translate(${j}px, ${k}px)`,offset:.7},{opacity:0,transform:`scale(0) translate(${j}px, ${k}px)`}],{duration:1100,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards"})}let h=(0,f.$)(".animation-particle");h.style.position="absolute",h.style.left="0",h.style.top="0",h.style.width=`${g.width}px`,h.style.height=`${g.height}px`,h.style.borderRadius="50%",h.style.border="2px solid var(--vscode-focusBorder, #007acc)",h.style.boxSizing="border-box",c.appendChild(h),h.animate([{transform:"scale(1)",opacity:1},{transform:"scale(2)",opacity:0}],{duration:800,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards"}),E(2e3)}(a);break;case 2:c&&function(a,b){let c=D(a);if(!c)return;let{overlay:d,cx:e,cy:g}=c,h=a.getBoundingClientRect();F(a,{translateY:[0,-6,0],duration:350});for(let a=0;a<6;a++){let c=12+a%3*2,h=(0,f.$)(".animation-particle");h.style.position="absolute",h.style.left=`${e}px`,h.style.top=`${g}px`,h.style.fontSize=`${c}px`,h.style.lineHeight="1",h.style.color="var(--vscode-focusBorder, #007acc)",h.classList.add(...o.L.asClassNameArray(b)),d.appendChild(h);let i=(Math.random()-.5)*50,j=-50-a%3*10,k=(Math.random()-.5)*20,l=(Math.random()-.5)*40;h.animate([{opacity:0,transform:`translate(-50%, -50%) scale(0) rotate(${k}deg)`},{opacity:1,transform:`translate(calc(-50% + ${.3*i}px), calc(-50% + ${.3*j}px)) scale(1) rotate(${(k+l)*.3}deg)`,offset:.3},{opacity:1,transform:`translate(calc(-50% + ${.7*i}px), calc(-50% + ${.7*j}px)) scale(1) rotate(${(k+l)*.7}deg)`,offset:.7},{opacity:0,transform:`translate(calc(-50% + ${i}px), calc(-50% + ${j}px)) scale(0.8) rotate(${l}deg)`}],{duration:800+a%3*200,delay:80*a,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards"})}let i=(0,f.$)(".animation-particle");i.style.position="absolute",i.style.left="0",i.style.top="0",i.style.width=`${h.width}px`,i.style.height=`${h.height}px`,i.style.borderRadius="50%",i.style.border="2px solid var(--vscode-focusBorder, #007acc)",i.style.boxSizing="border-box",d.appendChild(i),i.animate([{transform:"scale(1)",opacity:1},{transform:"scale(2)",opacity:0}],{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards"}),E(2e3)}(a,c);break;case 3:!function(a){let b=D(a);if(!b)return;let{overlay:c,cx:d,cy:e}=b,g=a.getBoundingClientRect();F(a,{scale:[1,1.1,1],rotate:[0,-12,0],duration:400});for(let a=0;a<2;a++){let b=(0,f.$)(".animation-particle");b.style.position="absolute",b.style.left="0",b.style.top="0",b.style.width=`${g.width}px`,b.style.height=`${g.height}px`,b.style.borderRadius="50%",b.style.border="2px solid var(--vscode-focusBorder, #007acc)",b.style.boxSizing="border-box",c.appendChild(b),b.animate([{transform:"scale(0.8)",opacity:0},{transform:"scale(0.8)",opacity:.6,offset:.01},{transform:"scale(2.5)",opacity:0}],{duration:800,delay:150*a,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards"})}for(let a=0;a<6;a++){let b=60*a*Math.PI/180,g=30+a%2*10,h=(0,f.$)(".animation-particle");h.style.position="absolute",h.style.width="3.5px",h.style.height="3.5px",h.style.borderRadius="50%",h.style.backgroundColor="#0098ff",h.style.left=`${d-1.75}px`,h.style.top=`${e-1.75}px`,c.appendChild(h);let i=Math.cos(b)*g,j=Math.sin(b)*g;h.animate([{opacity:0,transform:"scale(0) translate(0, 0)"},{opacity:1,transform:`scale(1) translate(${i}px, ${j}px)`,offset:.5},{opacity:0,transform:`scale(0) translate(${i}px, ${j}px)`}],{duration:600,delay:100+50*a,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards"})}let h=(0,f.$)(".animation-particle");h.style.position="absolute",h.style.left="0",h.style.top="0",h.style.width=`${g.width}px`,h.style.height=`${g.height}px`,h.style.borderRadius="50%",h.style.backgroundColor="var(--vscode-focusBorder, #007acc)",c.appendChild(h),h.animate([{transform:"scale(0.9)",opacity:0},{transform:"scale(0.9)",opacity:.5,offset:.01},{transform:"scale(1.5)",opacity:0}],{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards"}),E(2e3)}(a);break;case 4:!function(a){let b=D(a);if(!b)return;let{overlay:c,cx:d,cy:e}=b;F(a,{scale:[1,1.15,1],duration:350});for(let a=0;a<8;a++){let b=(45*a+22.5)*Math.PI/180,g=(0,f.$)(".animation-particle");g.style.position="absolute",g.style.width="3px",g.style.height="3px",g.style.borderRadius="50%",g.style.backgroundColor="var(--vscode-editor-foreground, #ffffff)",g.style.left=`${d-1.5}px`,g.style.top=`${e-1.5}px`,c.appendChild(g);let h=14*Math.cos(b),i=14*Math.sin(b),j=30*Math.cos(b),k=30*Math.sin(b);g.animate([{opacity:0,transform:`scale(0) translate(${h}px, ${i}px)`},{opacity:.7,transform:`scale(1.2) translate(${(h+j)/2}px, ${(i+k)/2}px)`,offset:.25},{opacity:.7,transform:`scale(1) translate(${.8*j}px, ${.8*k}px)`,offset:.5},{opacity:.35,transform:`scale(1) translate(${j}px, ${k}px)`,offset:.75},{opacity:0,transform:`scale(0.5) translate(${j}px, ${k}px)`}],{duration:1100,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards"})}for(let a=0;a<8;a++){let b=45*a,g=(0,f.$)(".animation-particle");g.style.position="absolute",g.style.left=`${d}px`,g.style.top=`${e}px`,g.style.width="0",g.style.height="0",g.style.transform=`rotate(${b}deg)`,c.appendChild(g);let h=(0,f.$)(".animation-particle");h.style.position="absolute",h.style.width="2px",h.style.height="10px",h.style.backgroundColor="var(--vscode-focusBorder, #007acc)",h.style.left="-1px",h.style.top="-22px",h.style.transformOrigin="bottom center",g.appendChild(h),h.animate([{transform:"scale(1, 0)",opacity:.6},{transform:"scale(1, 1)",opacity:.6,offset:.2},{transform:"scale(1, 1)",opacity:.6,offset:.6},{transform:"scale(1, 1)",opacity:.6,offset:.8},{transform:"scale(0, 0.3)",opacity:0}],{duration:1200,delay:150,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"forwards"})}E(2e3)}(a)}}(this.element,this._options.onClickAnimation,o.L.isThemeIcon(a)?a:void 0)}try{await this.actionRunner.run(this._commandAction,this._context)}catch(a){this._notificationService.error(a)}}render(a){if(super.render(a),a.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let b=!1,c=()=>{let a=!!this._menuItemAction.alt?.enabled&&(!this._accessibilityService.isMotionReduced()||b)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&b);a!==this._wantsAltCommand&&(this._wantsAltCommand=a,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(c)),this._register((0,f.ko)(a,"mouseleave",a=>{b=!1,c()})),this._register((0,f.ko)(a,"mouseenter",a=>{b=!0,c()})),c()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){let a=this._commandAction.tooltip||this._commandAction.label,b=this._keybindingService.appendKeybinding(a,this._commandAction.id,this._contextKeyService);if(!this._wantsAltCommand&&this._menuItemAction.alt?.enabled){let a=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,c=this._keybindingService.appendKeybinding(a,this._menuItemAction.alt.id,this._contextKeyService);b=(0,q.kg)(1698,"{0}\n[{1}] {2}",b,l.Of.modifierLabels[n.OS].altKey,c)}return b}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(a){var b;this._itemClassDispose.value=void 0;let{element:c,label:d}=this;if(!c||!d)return;let f=this._commandAction.checked&&(b=a.toggled)&&void 0!==b.condition&&a.toggled.icon?a.toggled.icon:a.icon;if(f)if(o.L.isThemeIcon(f)){let a=o.L.asClassNameArray(f);d.classList.add(...a),this._itemClassDispose.value=(0,m.s)(()=>{d.classList.remove(...a)})}else d.style.backgroundImage=(0,G.HD)(this._themeService.getColorTheme().type)?(0,e.Tf)(f.dark):(0,e.Tf)(f.light),d.classList.add("icon"),this._itemClassDispose.value=(0,m.qE)((0,m.s)(()=>{d.style.backgroundImage="",d.classList.remove("icon")}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}};P=K([L(2,w.b),L(3,x.Ot),L(4,t.fN),L(5,H.Gy),L(6,u.Z),L(7,r.j)],P);let Q=class extends i.d{constructor(a,b,c,d,e){const f={...b,menuAsChild:b?.menuAsChild??!1,classNames:b?.classNames??(o.L.isThemeIcon(a.item.icon)?o.L.asClassName(a.item.icon):void 0),keybindingProvider:b?.keybindingProvider??(a=>c.lookupKeybinding(a.id))};super(a,{getActions:()=>a.actions},d,f),this._keybindingService=c,this._contextMenuService=d,this._themeService=e}render(a){super.render(a),(0,p.j)(this.element),a.classList.add("menu-entry");let{icon:b}=this._action.item;if(b&&!o.L.isThemeIcon(b)){this.element.classList.add("icon");let a=()=>{this.element&&(this.element.style.backgroundImage=(0,G.HD)(this._themeService.getColorTheme().type)?(0,e.Tf)(b.dark):(0,e.Tf)(b.light))};a(),this._register(this._themeService.onDidColorThemeChange(()=>{a()}))}}};Q=K([L(2,w.b),L(3,u.Z),L(4,H.Gy)],Q);let R=class extends h.EH{constructor(a,b,c,d,e,f,g,h){let j;super(null,a),this._keybindingService=c,this._notificationService=d,this._contextMenuService=e,this._menuService=f,this._instaService=g,this._storageService=h,this._defaultActionDisposables=this._register(new m.Cm),this._container=null,this._primaryActionListener=this._register(new m.HE),this._options=b,this._storageKey=`${a.item.submenu.id}_lastActionId`;const l=b?.togglePrimaryAction?h.get(this._storageKey,1):void 0;l&&(j=a.actions.find(a=>l===a.id)),j||(j=a.actions[0]),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(P,j,{keybinding:this._getDefaultActionKeybindingLabel(j),hoverDelegate:b?.hoverDelegate}));const n={keybindingProvider:a=>this._keybindingService.lookupKeybinding(a.id),...b,menuAsChild:b?.menuAsChild??!0,classNames:b?.classNames??["codicon","codicon-chevron-down"],actionRunner:b?.actionRunner??this._register(new k.LN)};this._dropdown=this._register(new i.d(a,a.actions,this._contextMenuService,n)),b?.togglePrimaryAction&&this.registerTogglePrimaryActionListener()}registerTogglePrimaryActionListener(){this._primaryActionListener.value=this._dropdown.actionRunner.onDidRun(a=>{a.action instanceof J.Xe&&this.update(a.action)})}update(a){this._options?.togglePrimaryAction&&this._storageService.store(this._storageKey,a.id,1,1),this._defaultActionDisposables.clear(),this._defaultAction=this._defaultActionDisposables.add(this._instaService.createInstance(P,a,{keybinding:this._getDefaultActionKeybindingLabel(a),hoverDelegate:this._options?.hoverDelegate})),this._defaultAction.actionRunner=this._defaultActionDisposables.add(new class extends k.LN{async runAction(a,b){await a.run(void 0)}}),this._container&&this._defaultAction.render((0,f.Hs)(this._container,(0,f.$)(".action-container")))}_getDefaultActionKeybindingLabel(a){let b;if(this._options?.renderKeybindingWithDefaultActionLabel){let c=this._keybindingService.lookupKeybinding(a.id);c&&(b=`(${c.getLabel()})`)}return b}setActionContext(a){super.setActionContext(a),this._defaultAction.setActionContext(a),this._dropdown.setActionContext(a)}set actionRunner(a){super.actionRunner=a,this._defaultAction.actionRunner=a,this._options?.togglePrimaryAction||(this._dropdown.actionRunner=a),this._primaryActionListener.value&&this.registerTogglePrimaryActionListener()}get actionRunner(){return super.actionRunner}render(a){this._container=a,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");let b=(0,f.$)(".action-container");this._defaultAction.render((0,f.BC)(this._container,b)),this._register((0,f.ko)(b,f.Bx.KEY_DOWN,a=>{let b=new g.Z(a);b.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),b.stopPropagation())}));let c=(0,f.$)(".dropdown-action-container");this._dropdown.render((0,f.BC)(this._container,c)),this._register((0,f.ko)(c,f.Bx.KEY_DOWN,a=>{let b=new g.Z(a);b.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),this._defaultAction.element?.focus(),b.stopPropagation())}))}focus(a){a?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(a){a?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}};R=K([L(2,w.b),L(3,x.Ot),L(4,u.Z),L(5,J.ez),L(6,v._Y),L(7,y.CS)],R);let S=class extends h.XF{constructor(a,b,c){super(null,a,a.actions.map(a=>a.id===k.wv.ID?j.J:{text:a.label,isDisabled:!a.enabled}),0,b,z.RE,{ariaLabel:a.tooltip||a.label,optionsAsChildren:!0,useCustomDrawn:!(0,I.CG)(c)}),this.select(Math.max(0,a.actions.findIndex(a=>a.checked)))}render(a){super.render(a),a.style.borderColor=(0,A.Gu)(B.Hc)}runAction(a,b){let c=this.action.actions[b];c&&this.actionRunner.run(c)}};function T(a,b,c){if(b instanceof J.Xe)return a.createInstance(P,b,c);if(b instanceof J.nI)if(b.item.isSelection)return a.createInstance(S,b);else if(b.item.isSplitButton)return a.createInstance(R,b,{...c,togglePrimaryAction:"boolean"!=typeof b.item.isSplitButton&&b.item.isSplitButton.togglePrimaryAction});else return a.createInstance(Q,b,c)}S=K([L(1,u.l),L(2,s.pG)],S)},89665:(a,b,c)=>{"use strict";let d,e;c.d(b,{Fu:()=>q,az:()=>j,xb:()=>o});var f=c(26529),g=c(50411),h=c(61822);class i{constructor(a,b,c,d,e,f){this._richEditBracketBrand=void 0,this.languageId=a,this.index=b,this.open=c,this.close=d,this.forwardRegex=e,this.reversedRegex=f,this._openSet=i._toSet(this.open),this._closeSet=i._toSet(this.close)}isOpen(a){return this._openSet.has(a)}isClose(a){return this._closeSet.has(a)}static _toSet(a){let b=new Set;for(let c of a)b.add(c);return b}}class j{constructor(a,b){this._richEditBracketsBrand=void 0;const c=function(a){let b=a.length;a=a.map(a=>[a[0].toLowerCase(),a[1].toLowerCase()]);let c=[];for(let a=0;a<b;a++)c[a]=a;let d=(a,b)=>{let[c,d]=a,[e,f]=b;return c===e||c===f||d===e||d===f},e=(a,d)=>{let e=Math.min(a,d),f=Math.max(a,d);for(let a=0;a<b;a++)c[a]===f&&(c[a]=e)};for(let f=0;f<b;f++){let g=a[f];for(let h=f+1;h<b;h++)d(g,a[h])&&e(c[f],c[h])}let f=[];for(let d=0;d<b;d++){let e=[],g=[];for(let f=0;f<b;f++)if(c[f]===d){let[b,c]=a[f];e.push(b),g.push(c)}e.length>0&&f.push({open:e,close:g})}return f}(b);for(const b of(this.brackets=c.map((b,d)=>new i(a,d,b.open,b.close,function(a,b,c,d){let e=[];e=(e=e.concat(a)).concat(b);for(let a=0,b=e.length;a<b;a++)k(e[a],c,d,e);return(e=m(e)).sort(l),e.reverse(),o(e)}(b.open,b.close,c,d),function(a,b,c,d){let e=[];e=(e=e.concat(a)).concat(b);for(let a=0,b=e.length;a<b;a++)k(e[a],c,d,e);return(e=m(e)).sort(l),e.reverse(),o(e.map(p))}(b.open,b.close,c,d))),this.forwardRegex=function(a){let b=[];for(let c of a){for(let a of c.open)b.push(a);for(let a of c.close)b.push(a)}return o(b=m(b))}(this.brackets),this.reversedRegex=function(a){let b=[];for(let c of a){for(let a of c.open)b.push(a);for(let a of c.close)b.push(a)}return o((b=m(b)).map(p))}(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0,this.brackets)){for(const a of b.open)this.textIsBracket[a]=b,this.textIsOpenBracket[a]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,a.length);for(const a of b.close)this.textIsBracket[a]=b,this.textIsOpenBracket[a]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,a.length)}}}function k(a,b,c,d){for(let e=0,f=b.length;e<f;e++){if(e===c)continue;let f=b[e];for(let b of f.open)b.indexOf(a)>=0&&d.push(b);for(let b of f.close)b.indexOf(a)>=0&&d.push(b)}}function l(a,b){return a.length-b.length}function m(a){if(a.length<=1)return a;let b=[],c=new Set;for(let d of a)c.has(d)||(b.push(d),c.add(d));return b}function n(a){let b=/^[\w ]+$/.test(a);return a=(0,f.bm)(a),b?`\\b${a}\\b`:a}function o(a,b){let c=`(${a.map(n).join(")|(")})`;return(0,f.OS)(c,!0,b)}let p=(d=null,e=null,function(a){return d!==a&&(e=function(a){let b=new Uint16Array(a.length),c=0;for(let d=a.length-1;d>=0;d--)b[c++]=a.charCodeAt(d);return(0,g.b7)().decode(b)}(d=a)),e});class q{static _findPrevBracketInText(a,b,c,d){let e=c.match(a);if(!e)return null;let f=c.length-(e.index||0),g=e[0].length,i=d+f;return new h.Q(b,i-g+1,b,i+1)}static findPrevBracketInRange(a,b,c,d,e){let f=p(c).substring(c.length-e,c.length-d);return this._findPrevBracketInText(a,b,f,d)}static findNextBracketInText(a,b,c,d){let e=c.match(a);if(!e)return null;let f=e.index||0,g=e[0].length;if(0===g)return null;let i=d+f;return new h.Q(b,i+1,b,i+1+g)}static findNextBracketInRange(a,b,c,d,e){let f=c.substring(d,e);return this.findNextBracketInText(a,b,f,d)}}},89676:(a,b,c)=>{"use strict";c.d(b,{m:()=>D});var d=c(75082),e=c(46857),f=c(9634),g=c(66560),h=c(81309),i=c(67298),j=c(66036),k=c(95091),l=c(47309),m=c(76631),n=c(72816),o=c(89574),p=c(95606),q=c(22583),r=c(80926),s=c(99187),t=c(72663),u=c(16794),v=c(45186),w=c(55241),x=c(58254);let y=(0,x.u1)("IActionViewItemService");class z{constructor(){this._providers=new Map,this._onDidChange=new k.vl,this.onDidChange=this._onDidChange.event}dispose(){this._onDidChange.dispose()}lookUp(a,b){return this._providers.get(this._makeKey(a,b))}_makeKey(a,b){return`${a.id}/${b instanceof p.D8?b.id:b}`}}(0,w.v)(y,z,1);var A=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g},B=function(a,b){return function(c,d){b(c,d,a)}};let C=class extends f.i{constructor(a,b,c,d,e,f,g,h){super(a,e,{getKeyBinding:a=>f.lookupKeybinding(a.id)??void 0,...b,allowContextMenu:!0,skipTelemetry:"string"==typeof b?.telemetrySource}),this._options=b,this._menuService=c,this._contextKeyService=d,this._contextMenuService=e,this._keybindingService=f,this._commandService=g,this._sessionDisposables=this._store.add(new m.Cm);const i=b?.telemetrySource;i&&this._store.add(this.actionBar.onDidRun(a=>h.publicLog2("workbenchActionExecuted",{id:a.action.id,from:i})))}setActions(a,b=[],c){this._sessionDisposables.clear();let j=a.slice(),k=b.slice(),m=[],o=0,r=[],s=!1;if(this._options?.hiddenItemStrategy!==-1)for(let a=0;a<j.length;a++){let b=j[a];if(b instanceof g.wv){r[a]=b;continue}(b instanceof p.Xe||b instanceof p.nI)&&b.hideActions&&(m.push(b.hideActions.toggle),b.hideActions.toggle.checked&&o++,b.hideActions.isHidden&&(s=!0,j[a]=void 0,this._options?.hiddenItemStrategy!==0&&(r[a]=b)))}if(this._options?.overflowBehavior!==void 0){let a=(0,i.E$)(new Set(this._options.overflowBehavior.exempted),l.f.map(j,a=>a?.id)),b=this._options.overflowBehavior.maxItems-a.size,c=0;for(let d=0;d<j.length;d++){let e=j[d];e&&(c++,!a.has(e.id)&&c>=b&&(j[d]=void 0,r[d]=e))}}(0,h.SK)(j),(0,h.SK)(r),super.setActions(g.wv.clean(j),g.wv.join(g.wv.clean(r),k)),(m.length>0||j.length>0)&&this._sessionDisposables.add((0,d.ko)(this.getElement(),"contextmenu",a=>{let b=new e.P((0,d.zk)(this.getElement()),a),h=this.getItemAction(b.target);if(!h)return;b.preventDefault(),b.stopPropagation();let i=[];if(h instanceof p.Xe&&h.menuKeybinding)i.push(h.menuKeybinding);else if(!(h instanceof p.nI||h instanceof f.s)){let a=!!this._keybindingService.lookupKeybinding(h.id);i.push((0,q.D)(this._commandService,this._keybindingService,h.id,void 0,a))}if(m.length>0){let a=!1;if(1===o&&this._options?.hiddenItemStrategy===0){a=!0;for(let a=0;a<m.length;a++)if(m[a].checked){m[a]=(0,g.ih)({id:h.id,label:h.label,checked:!0,enabled:!1,run(){}});break}}if(!a&&(h instanceof p.Xe||h instanceof p.nI)){if(!h.hideActions)return;i.push(h.hideActions.hide)}else i.push((0,g.ih)({id:"label",label:(0,n.kg)(1701,"Hide"),enabled:!1,run(){}}))}let j=g.wv.join(i,m);this._options?.resetMenu&&!c&&(c=[this._options.resetMenu]),s&&c&&(j.push(new g.wv),j.push((0,g.ih)({id:"resetThisMenu",label:(0,n.kg)(1702,"Reset Menu"),run:()=>this._menuService.resetHiddenStates(c)}))),0!==j.length&&this._contextMenuService.showContextMenu({getAnchor:()=>b,getActions:()=>j,menuId:this._options?.contextMenu,menuActionOptions:{renderShortTitle:!0,...this._options?.menuOptions},skipTelemetry:"string"==typeof this._options?.telemetrySource,contextKeyService:this._contextKeyService})}))}};C=A([B(2,p.ez),B(3,s.fN),B(4,t.Z),B(5,u.b),B(6,r.d),B(7,v.k)],C);let D=class extends C{get onDidChangeMenuItems(){return this._onDidChangeMenuItems.event}constructor(a,b,c,e,f,g,h,i,j,l,m){super(a,{resetMenu:b,...c,actionViewItemProvider:(e,f)=>{let g=l.lookUp(b,e instanceof p.nI?e.item.submenu.id:e.id);g||(g=c?.actionViewItemProvider);let h=g?.(e,f,m,(0,d.zk)(a).vscodeWindowId);return h||(0,o.rN)(m,e,f)}},e,f,g,h,i,j),this._onDidChangeMenuItems=this._store.add(new k.vl),this._container=a,this._menuOptions=c?.menuOptions,this._toolbarOptions=c?.toolbarOptions,this._menu=this._store.add(e.createMenu(b,f,{emitEventsForSubmenuChanges:!0,eventDebounceDelay:c?.eventDebounceDelay})),this._store.add(this._menu.onDidChange(()=>{this._updateToolbar(),this._onDidChangeMenuItems.fire(this)})),this._store.add(l.onDidChange(a=>{a===b&&this._updateToolbar()})),this._updateToolbar()}_updateToolbar(){let{primary:a,secondary:b}=(0,o.R4)(this._menu.getActions(this._menuOptions),this._toolbarOptions?.primaryGroup,this._toolbarOptions?.shouldInlineSubmenu,this._toolbarOptions?.useSeparatorsInPrimaryActions);this._container.classList.toggle("has-no-actions",0===a.length&&0===b.length),super.setActions(a,b)}setActions(){throw new j.D7("This toolbar is populated from a menu.")}};D=A([B(3,p.ez),B(4,s.fN),B(5,t.Z),B(6,u.b),B(7,r.d),B(8,v.k),B(9,y),B(10,x._Y)],D)},90178:(a,b,c)=>{"use strict";function d(a,b){let c,d=this,e=!1;return function(){return e?c:(e=!0,c=a.apply(d,arguments))}}c.d(b,{P:()=>d})},90605:(a,b,c)=>{"use strict";function d(a,b,c){let d=null,e=null;if("function"==typeof c.value?(d="value",0!==(e=c.value).length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof c.get&&(d="get",e=c.get),!e)throw Error("not supported");let f=`$memoize$${b}`;c[d]=function(...a){return this.hasOwnProperty(f)||Object.defineProperty(this,f,{configurable:!1,enumerable:!1,writable:!1,value:e.apply(this,a)}),this[f]}}c.d(b,{B:()=>d})},90637:(a,b,c)=>{"use strict";c.d(b,{GP:()=>h,LM:()=>f,Uv:()=>j,nt:()=>g,qL:()=>i});var d=c(81309),e=c(26529);class f{constructor(a,b,c,d){this._viewportBrand=void 0,this.top=0|a,this.left=0|b,this.width=0|c,this.height=0|d}}class g{constructor(a,b){this.tabSize=a,this.data=b}}class h{constructor(a,b,c,d,e,f,g){this._viewLineDataBrand=void 0,this.content=a,this.continuesWithWrappedLine=b,this.minColumn=c,this.maxColumn=d,this.startVisibleColumn=e,this.tokens=f,this.inlineDecorations=g}}class i{constructor(a,b,c,d,e,f,g,h,j,k,l,m){this.minColumn=a,this.maxColumn=b,this.content=c,this.continuesWithWrappedLine=d,this.isBasicASCII=i.isBasicASCII(c,f),this.containsRTL=i.containsRTL(c,this.isBasicASCII,e),this.tokens=g,this.inlineDecorations=h,this.tabSize=j,this.startVisibleColumn=k,this.textDirection=l,this.hasVariableFonts=m}static isBasicASCII(a,b){return!b||(0,e.aC)(a)}static containsRTL(a,b,c){return!b&&!!c&&(0,e.E_)(a)}}class j{constructor(a,b,c){this.color=a,this.zIndex=b,this.data=c}static compareByRenderingProps(a,b){return a.zIndex===b.zIndex?a.color<b.color?-1:+(a.color>b.color):a.zIndex-b.zIndex}static equals(a,b){return a.color===b.color&&a.zIndex===b.zIndex&&(0,d.aI)(a.data,b.data)}static equalsArr(a,b){return(0,d.aI)(a,b,j.equals)}}},90753:()=>{},91018:(a,b,c)=>{"use strict";c.d(b,{C9:()=>r,CQ:()=>s,GV:()=>n,H8:()=>D,P9:()=>C,QR:()=>v,Rj:()=>m,U4:()=>E,VF:()=>i,Yo:()=>w,eM:()=>z,ef:()=>j,f4:()=>q,fE:()=>o,fi:()=>B,gt:()=>l,ij:()=>t,k5:()=>G,lO:()=>u,p7:()=>k,pf:()=>F,pn:()=>A,sb:()=>H,uN:()=>p,yI:()=>x});var d=c(72816),e=c(55404),f=c(37327),g=c(34183),h=c(11023);let i=(0,f.x1)("list.focusBackground",null,(0,d.kg)(2008,"List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),j=(0,f.x1)("list.focusForeground",null,(0,d.kg)(2009,"List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),k=(0,f.x1)("list.focusOutline",{dark:g.tA,light:g.tA,hcDark:g.bu,hcLight:g.bu},(0,d.kg)(2010,"List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),l=(0,f.x1)("list.focusAndSelectionOutline",null,(0,d.kg)(2011,"List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.")),m=(0,f.x1)("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:e.Q1.fromHex("#0F4A85").transparent(.1)},(0,d.kg)(2012,"List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),n=(0,f.x1)("list.activeSelectionForeground",{dark:e.Q1.white,light:e.Q1.white,hcDark:null,hcLight:null},(0,d.kg)(2013,"List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),o=(0,f.x1)("list.activeSelectionIconForeground",null,(0,d.kg)(2014,"List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),p=(0,f.x1)("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:e.Q1.fromHex("#0F4A85").transparent(.1)},(0,d.kg)(2015,"List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),q=(0,f.x1)("list.inactiveSelectionForeground",null,(0,d.kg)(2016,"List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),r=(0,f.x1)("list.inactiveSelectionIconForeground",null,(0,d.kg)(2017,"List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),s=(0,f.x1)("list.inactiveFocusBackground",null,(0,d.kg)(2018,"List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),t=(0,f.x1)("list.inactiveFocusOutline",null,(0,d.kg)(2019,"List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),u=(0,f.x1)("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:e.Q1.white.transparent(.1),hcLight:e.Q1.fromHex("#0F4A85").transparent(.1)},(0,d.kg)(2020,"List/Tree background when hovering over items using the mouse.")),v=(0,f.x1)("list.hoverForeground",null,(0,d.kg)(2021,"List/Tree foreground when hovering over items using the mouse.")),w=(0,f.x1)("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},(0,d.kg)(2022,"List/Tree drag and drop background when moving items over other items when using the mouse.")),x=(0,f.x1)("list.dropBetweenBackground",{dark:g.t4,light:g.t4,hcDark:null,hcLight:null},(0,d.kg)(2023,"List/Tree drag and drop border color when moving items between items when using the mouse.")),y=(0,f.x1)("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:g.tA,hcLight:g.tA},(0,d.kg)(2024,"List/Tree foreground color of the match highlights when searching inside the list/tree.")),z=(0,f.x1)("list.focusHighlightForeground",{dark:y,light:(0,f.Hz)(m,y,"#BBE7FF"),hcDark:y,hcLight:y},(0,d.kg)(2025,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree."));(0,f.x1)("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},(0,d.kg)(2026,"List/Tree foreground color for invalid items, for example an unresolved root in explorer.")),(0,f.x1)("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},(0,d.kg)(2027,"Foreground color of list items containing errors.")),(0,f.x1)("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},(0,d.kg)(2028,"Foreground color of list items containing warnings."));let A=(0,f.x1)("listFilterWidget.background",{light:(0,f.e$)(h.Cg,0),dark:(0,f.a)(h.Cg,0),hcDark:h.Cg,hcLight:h.Cg},(0,d.kg)(2029,"Background color of the type filter widget in lists and trees.")),B=(0,f.x1)("listFilterWidget.outline",{dark:e.Q1.transparent,light:e.Q1.transparent,hcDark:"#f38518",hcLight:"#007ACC"},(0,d.kg)(2030,"Outline color of the type filter widget in lists and trees.")),C=(0,f.x1)("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:g.b1,hcLight:g.b1},(0,d.kg)(2031,"Outline color of the type filter widget in lists and trees, when there are no matches.")),D=(0,f.x1)("listFilterWidget.shadow",h.f9,(0,d.kg)(2032,"Shadow color of the type filter widget in lists and trees."));(0,f.x1)("list.filterMatchBackground",{dark:h.Ub,light:h.Ub,hcDark:null,hcLight:null},(0,d.kg)(2033,"Background color of the filtered match.")),(0,f.x1)("list.filterMatchBorder",{dark:h.EC,light:h.EC,hcDark:g.b1,hcLight:g.bu},(0,d.kg)(2034,"Border color of the filtered match.")),(0,f.x1)("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},(0,d.kg)(2035,"List/Tree foreground color for items that are deemphasized."));let E=(0,f.x1)("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},(0,d.kg)(2036,"Tree stroke color for the indentation guides.")),F=(0,f.x1)("tree.inactiveIndentGuidesStroke",(0,f.JO)(E,.4),(0,d.kg)(2037,"Tree stroke color for the indentation guides that are not active.")),G=(0,f.x1)("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},(0,d.kg)(2038,"Table border color between columns.")),H=(0,f.x1)("tree.tableOddRowsBackground",{dark:(0,f.JO)(g.CU,.04),light:(0,f.JO)(g.CU,.04),hcDark:null,hcLight:null},(0,d.kg)(2039,"Background color for odd table rows."));(0,f.x1)("editorActionList.background",h.Cg,(0,d.kg)(2040,"Action List background color.")),(0,f.x1)("editorActionList.foreground",h.Fi,(0,d.kg)(2041,"Action List foreground color.")),(0,f.x1)("editorActionList.focusForeground",n,(0,d.kg)(2042,"Action List foreground color for the focused item.")),(0,f.x1)("editorActionList.focusBackground",m,(0,d.kg)(2043,"Action List background color for the focused item."))},91088:(a,b,c)=>{"use strict";c.d(b,{CS:()=>s,pc:()=>u});var d,e,f,g,h,i,j=c(70687),k=c(95091),l=c(76631),m=c(85214),n=c(8253);(d=g||(g={}))[d.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",d[d.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY",(e=h||(h={}))[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed";class o extends l.jG{static{this.DEFAULT_FLUSH_DELAY=100}constructor(a,b=Object.create(null)){super(),this.database=a,this.options=b,this._onDidChangeStorage=this._register(new k.fV),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=h.None,this.cache=new Map,this.flushDelayer=this._register(new j.Th(o.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.pendingClose=void 0,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(a=>this.onDidChangeItemsExternal(a)))}onDidChangeItemsExternal(a){this._onDidChangeStorage.pause();try{a.changed?.forEach((a,b)=>this.acceptExternal(b,a)),a.deleted?.forEach(a=>this.acceptExternal(a,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(a,b){if(this.state===h.Closed)return;let c=!1;(0,m.z)(b)?c=this.cache.delete(a):this.cache.get(a)!==b&&(this.cache.set(a,b),c=!0),c&&this._onDidChangeStorage.fire({key:a,external:!0})}get(a,b){let c=this.cache.get(a);return(0,m.z)(c)?b:c}getBoolean(a,b){let c=this.get(a);return(0,m.z)(c)?b:"true"===c}getNumber(a,b){let c=this.get(a);return(0,m.z)(c)?b:parseInt(c,10)}async set(a,b,c=!1){if(this.state===h.Closed)return;if((0,m.z)(b))return this.delete(a,c);let d=(0,m.Gv)(b)||Array.isArray(b)?(0,n.As)(b):String(b);if(this.cache.get(a)!==d)return this.cache.set(a,d),this.pendingInserts.set(a,d),this.pendingDeletes.delete(a),this._onDidChangeStorage.fire({key:a,external:c}),this.doFlush()}async delete(a,b=!1){if(this.state!==h.Closed&&this.cache.delete(a))return this.pendingDeletes.has(a)||this.pendingDeletes.add(a),this.pendingInserts.delete(a),this._onDidChangeStorage.fire({key:a,external:b}),this.doFlush()}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}async flushPending(){if(!this.hasPending)return;let a={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(a).finally(()=>{if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)this.whenFlushedCallbacks.pop()?.()})}async flush(a){if(this.state!==h.Closed&&!this.pendingClose)return this.doFlush(a)}async doFlush(a){return this.options.hint===g.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),a)}async whenFlushed(){if(this.hasPending)return new Promise(a=>this.whenFlushedCallbacks.push(a))}}class p{constructor(){this.onDidChangeItemsExternal=k.Jh.None,this.items=new Map}async updateItems(a){a.insert?.forEach((a,b)=>this.items.set(b,a)),a.delete?.forEach(a=>this.items.delete(a))}}var q=c(58254);let r="__$__targetStorageMarker",s=(0,q.u1)("storageService");(f=i||(i={}))[f.NONE=0]="NONE",f[f.SHUTDOWN=1]="SHUTDOWN";class t extends l.jG{static{this.DEFAULT_FLUSH_INTERVAL=6e4}constructor(a={flushInterval:t.DEFAULT_FLUSH_INTERVAL}){super(),this._onDidChangeValue=this._register(new k.fV),this._onDidChangeTarget=this._register(new k.fV),this._onWillSaveState=this._register(new k.vl),this.onWillSaveState=this._onWillSaveState.event,this.runFlushWhenIdle=this._register(new l.HE),this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0,this._applicationSharedKeyTargets=void 0,this.flushWhenIdleScheduler=this._register(new j.uC(()=>this.doFlushWhenIdle(),a.flushInterval))}onDidChangeValue(a,b,c){return k.Jh.filter(this._onDidChangeValue.event,c=>c.scope===a&&(void 0===b||c.key===b),c)}doFlushWhenIdle(){this.runFlushWhenIdle.value=(0,j.$6)(()=>{this.shouldFlushWhenIdle()&&this.flush(),this.flushWhenIdleScheduler.schedule()})}shouldFlushWhenIdle(){return!0}emitDidChangeValue(a,b){let{key:c,external:d}=b;if(c===r){switch(a){case -2:this._applicationSharedKeyTargets=void 0;break;case -1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0}this._onDidChangeTarget.fire({scope:a})}else this._onDidChangeValue.fire({scope:a,key:c,target:this.getKeyTargets(a)[c],external:d})}get(a,b,c){return this.getStorage(b)?.get(a,c)}getBoolean(a,b,c){return this.getStorage(b)?.getBoolean(a,c)}getNumber(a,b,c){return this.getStorage(b)?.getNumber(a,c)}store(a,b,c,d,e=!1){(0,m.z)(b)?this.remove(a,c,e):this.withPausedEmitters(()=>{this.updateKeyTarget(a,c,d),this.getStorage(c)?.set(a,b,e)})}remove(a,b,c=!1){this.withPausedEmitters(()=>{this.updateKeyTarget(a,b,void 0),this.getStorage(b)?.delete(a,c)})}withPausedEmitters(a){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{a()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(a,b,c,d=!1){let e=this.getKeyTargets(b);"number"==typeof c?e[a]!==c&&(e[a]=c,this.getStorage(b)?.set(r,JSON.stringify(e),d)):"number"==typeof e[a]&&(delete e[a],this.getStorage(b)?.set(r,JSON.stringify(e),d))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}get applicationSharedKeyTargets(){return this._applicationSharedKeyTargets||(this._applicationSharedKeyTargets=this.loadKeyTargets(-2)),this._applicationSharedKeyTargets}getKeyTargets(a){switch(a){case -2:return this.applicationSharedKeyTargets;case -1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(a){let b=this.getStorage(a);return b?function(a){let b=a.get(r);if(b)try{return JSON.parse(b)}catch(a){}return Object.create(null)}(b):Object.create(null)}async flush(a=i.NONE){this._onWillSaveState.fire({reason:a});let b=this.getStorage(-1),c=this.getStorage(-2),d=this.getStorage(0),e=this.getStorage(1);switch(a){case i.NONE:await j.HC.settled([b?.whenFlushed()??Promise.resolve(),c?.whenFlushed()??Promise.resolve(),d?.whenFlushed()??Promise.resolve(),e?.whenFlushed()??Promise.resolve()]);break;case i.SHUTDOWN:await j.HC.settled([b?.flush(0)??Promise.resolve(),c?.flush(0)??Promise.resolve(),d?.flush(0)??Promise.resolve(),e?.flush(0)??Promise.resolve()])}}}class u extends t{constructor(){super(),this.applicationStorage=this._register(new o(new p,{hint:g.STORAGE_IN_MEMORY})),this.applicationSharedStorage=this._register(new o(new p,{hint:g.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new o(new p,{hint:g.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new o(new p,{hint:g.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(a=>this.emitDidChangeValue(1,a))),this._register(this.profileStorage.onDidChangeStorage(a=>this.emitDidChangeValue(0,a))),this._register(this.applicationStorage.onDidChangeStorage(a=>this.emitDidChangeValue(-1,a))),this._register(this.applicationSharedStorage.onDidChangeStorage(a=>this.emitDidChangeValue(-2,a)))}getStorage(a){switch(a){case -2:return this.applicationSharedStorage;case -1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}shouldFlushWhenIdle(){return!1}}},91291:(a,b,c)=>{"use strict";c.d(b,{U:()=>t});var d=c(78014),e=c(76631);c(94484);var f=c(1401),g=c(39482),h=c(6812),i=c(77509);class j{static equals(a,b){return a.x===b.x&&a.y===b.y}constructor(a,b){this.x=a,this.y=b}add(a){return new j(this.x+a.x,this.y+a.y)}deltaX(a){return new j(this.x+a,this.y)}deltaY(a){return new j(this.x,this.y+a)}toString(){return`(${this.x},${this.y})`}subtract(a){return new j(this.x-a.x,this.y-a.y)}scale(a){return new j(this.x*a,this.y*a)}mapComponents(a){return new j(a(this.x),a(this.y))}isZero(){return 0===this.x&&0===this.y}withThreshold(a){return this.mapComponents(b=>b>a?b-a:b<-a?b+a:0)}}var k=c(54265),l=c(14670),m=c(14960),n=c(74864),o=c(93539),p=c(87175),q=c(59825),r=c(60548),s=c(96062);function t(a){return u.get(a)}class u extends e.jG{static{this._map=new Map}static get(a){let b=u._map.get(a);if(!b){b=new u(a),u._map.set(a,b);let c=a.onDidDispose(()=>{let b=u._map.get(a);b&&(u._map.delete(a),b.dispose(),c.dispose())})}return b}_beginUpdate(){this._updateCounter++,1===this._updateCounter&&(this._currentTransaction=new k.XL(()=>{}))}_endUpdate(){if(this._updateCounter--,0===this._updateCounter){let a=this._currentTransaction;this._currentTransaction=void 0,a.finish()}}constructor(a){super(),this.editor=a,this._sawZeroLineWidth=!1,this._onDidContainerResize=(0,l.eP)({owner:this,getTransaction:()=>this._currentTransaction},a=>{let b=this.editor.getContainerDomNode(),c=new ResizeObserver(()=>{this._sawZeroLineWidth&&(this._sawZeroLineWidth=!1,this.editor.resetLineWidthCaches()),a(void 0)});return c.observe(b),{dispose:()=>c.disconnect()}},()=>({})),this._updateCounter=0,this._currentTransaction=void 0,this._model=(0,p.FY)(this,this.editor.getModel()),this.model=this._model,this.isReadonly=(0,l.eP)({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidChangeConfiguration,()=>this.editor.getOption(104)),this._versionId=(0,q.Z)({owner:this,lazy:!0},this.editor.getModel()?.getVersionId()??null),this.versionId=this._versionId,this._selections=(0,q.Z)({owner:this,equalsFn:(0,d.jb)((0,d.We)(i.L.selectionsEqual)),lazy:!0},this.editor.getSelections()??null),this.selections=this._selections,this.positions=(0,m.C)({owner:this,equalsFn:(0,d.jb)((0,d.We)(h.y.equals))},a=>this.selections.read(a)?.map(a=>a.getStartPosition())??null),this.isFocused=(0,l.eP)({owner:this,getTransaction:()=>this._currentTransaction},a=>{let b=this.editor.onDidFocusEditorWidget(a),c=this.editor.onDidBlurEditorWidget(a);return{dispose(){b.dispose(),c.dispose()}}},()=>this.editor.hasWidgetFocus()),this.isTextFocused=(0,l.eP)({owner:this,getTransaction:()=>this._currentTransaction},a=>{let b=this.editor.onDidFocusEditorText(a),c=this.editor.onDidBlurEditorText(a);return{dispose(){b.dispose(),c.dispose()}}},()=>this.editor.hasTextFocus()),this.inComposition=(0,l.eP)({owner:this,getTransaction:()=>this._currentTransaction},a=>{let b=this.editor.onDidCompositionStart(()=>{a(void 0)}),c=this.editor.onDidCompositionEnd(()=>{a(void 0)});return{dispose(){b.dispose(),c.dispose()}}},()=>this.editor.inComposition),this.value=(0,m.dQ)(this,a=>(this.versionId.read(a),this.model.read(a)?.getValue()??""),(a,b)=>{let c=this.model.get();null!==c&&a!==c.getValue()&&c.setValue(a)}),this.valueIsEmpty=(0,m.un)(this,a=>(this.versionId.read(a),this.editor.getModel()?.getValueLength()===0)),this.cursorSelection=(0,m.C)({owner:this,equalsFn:(0,d.jb)(i.L.selectionsEqual)},a=>this.selections.read(a)?.[0]??null),this.cursorPosition=(0,m.C)({owner:this,equalsFn:h.y.equals},a=>this.selections.read(a)?.[0]?.getPosition()??null),this.cursorLineNumber=(0,m.un)(this,a=>this.cursorPosition.read(a)?.lineNumber??null),this.onDidType=(0,r.Y)(this),this.onDidPaste=(0,r.Y)(this),this.scrollTop=(0,l.eP)({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidScrollChange,()=>this.editor.getScrollTop()),this.scrollLeft=(0,l.eP)({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidScrollChange,()=>this.editor.getScrollLeft()),this.layoutInfo=(0,l.eP)({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidLayoutChange,()=>this.editor.getLayoutInfo()),this.layoutInfoContentLeft=this.layoutInfo.map(a=>a.contentLeft),this.layoutInfoDecorationsLeft=this.layoutInfo.map(a=>a.decorationsLeft),this.layoutInfoWidth=this.layoutInfo.map(a=>a.width),this.layoutInfoHeight=this.layoutInfo.map(a=>a.height),this.layoutInfoMinimap=this.layoutInfo.map(a=>a.minimap),this.layoutInfoVerticalScrollbarWidth=this.layoutInfo.map(a=>a.verticalScrollbarWidth),this.contentWidth=(0,l.eP)({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidContentSizeChange,()=>this.editor.getContentWidth()),this.contentHeight=(0,l.eP)({owner:this,getTransaction:()=>this._currentTransaction},this.editor.onDidContentSizeChange,()=>this.editor.getContentHeight()),this._onDidChangeViewZones=(0,s.y)(this,this.editor.onDidChangeViewZones),this._onDidHiddenAreasChanged=(0,s.y)(this,this.editor.onDidChangeHiddenAreas),this._onDidLineHeightChanged=(0,s.y)(this,this.editor.onDidChangeLineHeight),this._widgetCounter=0,this.openedPeekWidgets=(0,p.FY)(this,0),this._register(this.editor.onBeginUpdate(()=>this._beginUpdate())),this._register(this.editor.onEndUpdate(()=>this._endUpdate())),this._register(this.editor.onDidChangeModel(()=>{this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidType(a=>{this._beginUpdate();try{this._forceUpdate(),this.onDidType.trigger(this._currentTransaction,a)}finally{this._endUpdate()}})),this._register(this.editor.onDidPaste(a=>{this._beginUpdate();try{this._forceUpdate(),this.onDidPaste.trigger(this._currentTransaction,a)}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeModelContent(a=>{this._beginUpdate();try{this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,a),this._forceUpdate()}finally{this._endUpdate()}})),this._register(this.editor.onDidChangeCursorSelection(a=>{this._beginUpdate();try{this._selections.set(this.editor.getSelections(),this._currentTransaction,a),this._forceUpdate()}finally{this._endUpdate()}})),this.domNode=(0,m.un)(a=>(this.model.read(a),this.editor.getDomNode()))}transaction(a){this._beginUpdate();try{return a(this._currentTransaction)}finally{this._endUpdate()}}forceUpdate(a){this._beginUpdate();try{if(this._forceUpdate(),!a)return;return a(this._currentTransaction)}finally{this._endUpdate()}}_forceUpdate(){this._beginUpdate();try{this._model.set(this.editor.getModel(),this._currentTransaction),this._versionId.set(this.editor.getModel()?.getVersionId()??null,this._currentTransaction,void 0),this._selections.set(this.editor.getSelections(),this._currentTransaction,void 0)}finally{this._endUpdate()}}getOption(a,b=n.j.ofCaller()){return(0,l.y0)(this,b=>this.editor.onDidChangeConfiguration(c=>{c.hasChanged(a)&&b(void 0)}),()=>this.editor.getOption(a),b)}setDecorations(a){let b=new e.Cm,c=this.editor.createDecorationsCollection();return b.add((0,o.zL)({owner:this,debugName:()=>`Apply decorations from ${a.debugName}`},b=>{let d=a.read(b);c.set(d)})),b.add({dispose:()=>{c.clear()}}),b}createOverlayWidget(a){let b="observableOverlayWidget"+this._widgetCounter++,c={getDomNode:()=>a.domNode,getPosition:()=>a.position.get(),getId:()=>b,allowEditorOverflow:a.allowEditorOverflow,getMinContentWidthInPx:()=>a.minContentWidthInPx.get()};this.editor.addOverlayWidget(c);let d=(0,o.fm)(b=>{a.position.read(b),a.minContentWidthInPx.read(b),this.editor.layoutOverlayWidget(c)});return(0,e.s)(()=>{d.dispose(),this.editor.removeOverlayWidget(c)})}createContentWidget(a){let b="observableContentWidget"+this._widgetCounter++,c={getDomNode:()=>a.domNode,getPosition:()=>a.position.get(),getId:()=>b,allowEditorOverflow:a.allowEditorOverflow};this.editor.addContentWidget(c);let d=(0,o.fm)(b=>{a.position.read(b),this.editor.layoutContentWidget(c)});return(0,e.s)(()=>{d.dispose(),this.editor.removeContentWidget(c)})}observeLineOffsetRange(a,b){let c=this.observePosition(a.map(a=>new h.y(a.startLineNumber,1)),b),d=this.observePosition(a.map(a=>new h.y(a.endLineNumberExclusive+1,1)),b);return(0,m.un)(b=>{c.read(b),d.read(b);let e=a.read(b),f=this.model.read(b)?.getLineCount(),h=(void 0!==f&&e.startLineNumber>f?this.editor.getBottomForLineNumber(f):this.editor.getTopForLineNumber(e.startLineNumber))-this.scrollTop.read(b),i=e.isEmpty?h:this.editor.getBottomForLineNumber(e.endLineNumberExclusive-1)-this.scrollTop.read(b);return new g.L(h,i)})}getLeftOfPosition(a,b){this.layoutInfo.read(b),this.value.read(b);let c=this.editor.getOffsetForColumn(a.lineNumber,a.column);if(-1===c){let b=this.editor.getOption(59).typicalHalfwidthCharacterWidth;c=a.column*b}return c}observePosition(a,b){let c=a.get(),f=(0,q.Z)({owner:this,debugName:()=>`topLeftOfPosition${c?.toString()}`,equalsFn:(0,d.jb)(j.equals)},new j(0,0)),g="observablePositionWidget"+this._widgetCounter++,h=document.createElement("div"),i={getDomNode:()=>h,getPosition:()=>c?{preference:[0],position:a.get()}:null,getId:()=>g,allowEditorOverflow:!1,useDisplayNone:!0,afterRender:(a,b)=>{let d=this._model.get();d&&c&&c.lineNumber>d.getLineCount()?f.set(new j(0,this.editor.getBottomForLineNumber(d.getLineCount())-this.scrollTop.get()),void 0):f.set(b?new j(b.left,b.top):null,void 0)}};return this.editor.addContentWidget(i),b.add((0,o.fm)(b=>{c=a.read(b),this.editor.layoutContentWidget(i)})),b.add((0,e.s)(()=>{this.editor.removeContentWidget(i)})),f}isTargetHovered(a,b){let c=(0,p.FY)("isInjectedTextHovered",!1);return b.add(this.editor.onMouseMove(b=>{let d=a(b);c.set(d,void 0)})),b.add(this.editor.onMouseLeave(a=>{c.set(!1,void 0)})),c}observeLineHeightForPosition(a){return(0,m.un)(b=>{let c=a instanceof h.y?a:a.read(b);return null===c?null:(this.getOption(75).read(b),this.editor.getLineHeightForPosition(c))})}observeLineHeightForLine(a){return"number"==typeof a?this.observeLineHeightForPosition(new h.y(a,1)):(0,m.un)(b=>{let c=a.read(b);return null===c?null:this.observeLineHeightForPosition(new h.y(c,1)).read(b)})}observeLineHeightsForLineRange(a){return(0,m.un)(b=>{let c=a instanceof f.M?a:a.read(b),d=[];for(let a=c.startLineNumber;a<c.endLineNumberExclusive;a++)d.push(this.observeLineHeightForLine(a).read(b));return d})}getWidthOfLine(a,b){this.layoutInfo.read(b),this.value.read(b),this.scrollTop.read(b);let c=this.editor.getWidthOfLine(a);return this._onDidContainerResize.read(b),0===c&&(this._sawZeroLineWidth=!0),c}observeTopForLineNumber(a){return(0,m.un)(b=>(this.layoutInfo.read(b),this._onDidChangeViewZones.read(b),this._onDidHiddenAreasChanged.read(b),this._onDidLineHeightChanged.read(b),this._versionId.read(b),this.editor.getTopForLineNumber(a)))}}},91324:(a,b,c)=>{"use strict";c.d(b,{Tf:()=>i,f7:()=>g});var d=c(70233),e=c(39482),f=c(66036);class g{static createEmpty(a,b){let c=g.defaultTokenMetadata,d=new Uint32Array(2);return d[0]=a.length,d[1]=c,new g(d,a,b)}static createFromTextAndMetadata(a,b){let c=0,d="",e=[];for(let{text:b,metadata:f}of a)e.push(c+b.length,f),c+=b.length,d+=b;return new g(new Uint32Array(e),d,b)}static convertToEndOffset(a,b){let c=(a.length>>>1)-1;for(let b=0;b<c;b++)a[b<<1]=a[b+1<<1];a[c<<1]=b}static findIndexInTokensArray(a,b){if(a.length<=2)return 0;let c=0,d=(a.length>>>1)-1;for(;c<d;){let e=c+Math.floor((d-c)/2),f=a[e<<1];if(f===b)return e+1;f<b?c=e+1:f>b&&(d=e)}return c}static{this.defaultTokenMetadata=0x2008000}constructor(a,b,c){this._lineTokensBrand=void 0,(a.length>1?a[a.length-2]:0)!==b.length&&(0,f.dz)(Error("Token length and text length do not match!")),this._tokens=a,this._tokensCount=this._tokens.length>>>1,this._text=b,this.languageIdCodec=c}getTextLength(){return this._text.length}equals(a){return a instanceof g&&this.slicedEquals(a,0,this._tokensCount)}slicedEquals(a,b,c){if(this._text!==a._text||this._tokensCount!==a._tokensCount)return!1;let d=b<<1,e=d+(c<<1);for(let b=d;b<e;b++)if(this._tokens[b]!==a._tokens[b])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(a){return a>0?this._tokens[a-1<<1]:0}getMetadata(a){return this._tokens[(a<<1)+1]}getLanguageId(a){let b=this._tokens[(a<<1)+1],c=d.x.getLanguageId(b);return this.languageIdCodec.decodeLanguageId(c)}getStandardTokenType(a){let b=this._tokens[(a<<1)+1];return d.x.getTokenType(b)}getForeground(a){let b=this._tokens[(a<<1)+1];return d.x.getForeground(b)}getClassName(a){let b=this._tokens[(a<<1)+1];return d.x.getClassNameFromMetadata(b)}getInlineStyle(a,b){let c=this._tokens[(a<<1)+1];return d.x.getInlineStyleFromMetadata(c,b)}getPresentation(a){let b=this._tokens[(a<<1)+1];return d.x.getPresentationFromMetadata(b)}getEndOffset(a){return this._tokens[a<<1]}findTokenIndexAtOffset(a){return g.findIndexInTokensArray(this._tokens,a)}inflate(){return this}sliceAndInflate(a,b,c){return new h(this,a,b,c)}sliceZeroCopy(a){return this.sliceAndInflate(a.start,a.endExclusive,0)}withInserted(a){if(0===a.length)return this;let b=0,c=0,d="",e=[],f=0;for(;;){let g=b<this._tokensCount?this._tokens[b<<1]:-1,h=c<a.length?a[c]:null;if(-1!==g&&(null===h||g<=h.offset)){d+=this._text.substring(f,g);let a=this._tokens[(b<<1)+1];e.push(d.length,a),b++,f=g}else if(h){if(h.offset>f){d+=this._text.substring(f,h.offset);let a=this._tokens[(b<<1)+1];e.push(d.length,a),f=h.offset}d+=h.text,e.push(d.length,h.tokenMetadata),c++}else break}return new g(new Uint32Array(e),d,this.languageIdCodec)}getTokensInRange(a){let b=new l,c=this.findTokenIndexAtOffset(a.start),d=this.findTokenIndexAtOffset(a.endExclusive);for(let f=c;f<=d;f++){let c=new e.L(this.getStartOffset(f),this.getEndOffset(f)).intersectionLength(a);c>0&&b.add(c,this.getMetadata(f))}return b.build()}getTokenText(a){let b=this.getStartOffset(a),c=this.getEndOffset(a);return this._text.substring(b,c)}forEach(a){let b=this.getCount();for(let c=0;c<b;c++)a(c)}toString(){let a="";return this.forEach(b=>{a+=`[${this.getTokenText(b)}]{${this.getClassName(b)}}`}),a}}class h{constructor(a,b,c,d){this._source=a,this._startOffset=b,this._endOffset=c,this._deltaOffset=d,this._firstTokenIndex=a.findTokenIndexAtOffset(b),this.languageIdCodec=a.languageIdCodec,this._tokensCount=0;for(let b=this._firstTokenIndex,d=a.getCount();b<d&&!(a.getStartOffset(b)>=c);b++)this._tokensCount++}getMetadata(a){return this._source.getMetadata(this._firstTokenIndex+a)}getLanguageId(a){return this._source.getLanguageId(this._firstTokenIndex+a)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(a){return a instanceof h&&this._startOffset===a._startOffset&&this._endOffset===a._endOffset&&this._deltaOffset===a._deltaOffset&&this._source.slicedEquals(a._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getStandardTokenType(a){return this._source.getStandardTokenType(this._firstTokenIndex+a)}getForeground(a){return this._source.getForeground(this._firstTokenIndex+a)}getEndOffset(a){let b=this._source.getEndOffset(this._firstTokenIndex+a);return Math.min(this._endOffset,b)-this._startOffset+this._deltaOffset}getClassName(a){return this._source.getClassName(this._firstTokenIndex+a)}getInlineStyle(a,b){return this._source.getInlineStyle(this._firstTokenIndex+a,b)}getPresentation(a){return this._source.getPresentation(this._firstTokenIndex+a)}findTokenIndexAtOffset(a){return this._source.findTokenIndexAtOffset(a+this._startOffset-this._deltaOffset)-this._firstTokenIndex}getTokenText(a){let b=this._firstTokenIndex+a,c=this._source.getStartOffset(b),d=this._source.getEndOffset(b),e=this._source.getTokenText(b);return c<this._startOffset&&(e=e.substring(this._startOffset-c)),d>this._endOffset&&(e=e.substring(0,e.length-(d-this._endOffset))),e}forEach(a){for(let b=0;b<this.getCount();b++)a(b)}}function i(a,b){let c=b.lineNumber;if(!a.tokenization.isCheapToTokenize(c))return;a.tokenization.forceTokenization(c);let d=a.tokenization.getLineTokens(c),e=d.findTokenIndexAtOffset(b.column-1);return d.getStandardTokenType(e)}class j{static fromLineTokens(a){let b=[];for(let c=0;c<a.getCount();c++)b.push(new k(a.getEndOffset(c)-a.getStartOffset(c),a.getMetadata(c)));return j.create(b)}static create(a){return new j(a)}constructor(a){this._tokenInfo=a}toLineTokens(a,b){return g.createFromTextAndMetadata(this.map((b,c)=>({text:b.substring(a),metadata:c.metadata})),b)}forEach(a){let b=0;for(let c of this._tokenInfo)a(new e.L(b,b+c.length),c),b+=c.length}map(a){let b=[],c=0;for(let d of this._tokenInfo){let f=new e.L(c,c+d.length);b.push(a(f,d)),c+=d.length}return b}slice(a){let b=[],c=0;for(let d of this._tokenInfo){let e=c,f=e+d.length;if(f>a.start){if(e>=a.endExclusive)break;let c=Math.max(0,a.start-e),g=Math.max(0,f-a.endExclusive);b.push(new k(d.length-c-g,d.metadata))}c+=d.length}return j.create(b)}}class k{constructor(a,b){this.length=a,this.metadata=b}}class l{constructor(){this._tokens=[]}add(a,b){this._tokens.push(new k(a,b))}build(){return j.create(this._tokens)}}},91902:(a,b,c)=>{"use strict";c.d(b,{D:()=>e});var d=c(95091);let e=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new d.vl,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(a){a=Math.min(Math.max(-5,a),20),this._zoomLevel!==a&&(this._zoomLevel=a,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},92312:()=>{},92640:(a,b,c)=>{"use strict";c.d(b,{Qi:()=>i,XO:()=>e});var d,e,f=c(95091);let g=Object.freeze(function(a,b){let c=setTimeout(a.bind(b),0);return{dispose(){clearTimeout(c)}}});(d=e||(e={})).isCancellationToken=function(a){return a===d.None||a===d.Cancelled||a instanceof h||!!a&&"object"==typeof a&&"boolean"==typeof a.isCancellationRequested&&"function"==typeof a.onCancellationRequested},d.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:f.Jh.None}),d.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:g});class h{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){!this._isCancelled&&(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?g:(this._emitter||(this._emitter=new f.vl),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class i{constructor(a){this._token=void 0,this._parentListener=void 0,this._parentListener=a&&a.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new h),this._token}cancel(){this._token?this._token instanceof h&&this._token.cancel():this._token=e.Cancelled}dispose(a=!1){a&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof h&&this._token.dispose():this._token=e.None}}},93231:(a,b,c)=>{"use strict";c.d(b,{x:()=>f8});var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=c(55241),y=c(2245),z=c(33402),A=c(74893),B=c(23365);let C=class{static{this.ID="editor.contrib.markerDecorations"}constructor(a,b){}dispose(){}};C=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([(d=B.A,function(a,b){d(a,b,1)})],C),(0,x.v)(y.w,A.B,0),(0,z.HW)(C.ID,C,0);var D=c(75082),E=c(66036),F=c(95091),G=c(76631),H=c(77497);c(88418);var I=c(28952),J=c(47322),K=c(81309),L=c(29943),M=c(18216),N=c(61714),O=c(69907);class P{static{this.items=[]}constructor(a,b){this.key=a,this.migrate=b}apply(a){let b=P._read(a,this.key);this.migrate(b,b=>P._read(a,b),(b,c)=>P._write(a,b,c))}static _read(a,b){if(null==a)return;let c=b.indexOf(".");if(c>=0){let d=b.substring(0,c);return this._read(a[d],b.substring(c+1))}return a[b]}static _write(a,b,c){let d=b.indexOf(".");if(d>=0){let e=b.substring(0,d);a[e]=a[e]||{},this._write(a[e],b.substring(d+1),c);return}a[b]=c}}function Q(a,b){P.items.push(new P(a,b))}function R(a,b){Q(a,(c,d,e)=>{if(void 0!==c){for(let[d,f]of b)if(c===d)return void e(a,f)}})}R("wordWrap",[[!0,"on"],[!1,"off"]]),R("lineNumbers",[[!0,"on"],[!1,"off"]]),R("cursorBlinking",[["visible","solid"]]),R("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),R("renderLineHighlight",[[!0,"line"],[!1,"none"]]),R("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),R("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),R("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),R("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),R("autoIndent",[[!1,"advanced"],[!0,"full"]]),R("matchBrackets",[[!0,"always"],[!1,"never"]]),R("renderFinalNewline",[[!0,"on"],[!1,"off"]]),R("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),R("occurrencesHighlight",[[!0,"singleFile"],[!1,"off"]]),R("wordBasedSuggestions",[[!0,"matchingDocuments"],[!1,"off"]]),R("defaultColorDecorators",[[!0,"auto"],[!1,"never"]]),R("minimap.autohide",[[!0,"mouseover"],[!1,"none"]]),Q("autoClosingBrackets",(a,b,c)=>{!1===a&&(c("autoClosingBrackets","never"),void 0===b("autoClosingQuotes")&&c("autoClosingQuotes","never"),void 0===b("autoSurround")&&c("autoSurround","never"))}),Q("renderIndentGuides",(a,b,c)=>{void 0!==a&&(c("renderIndentGuides",void 0),void 0===b("guides.indentation")&&c("guides.indentation",!!a))}),Q("highlightActiveIndentGuide",(a,b,c)=>{void 0!==a&&(c("highlightActiveIndentGuide",void 0),void 0===b("guides.highlightActiveIndentation")&&c("guides.highlightActiveIndentation",!!a))});let S={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};Q("suggest.filteredTypes",(a,b,c)=>{if(a&&"object"==typeof a){for(let d of Object.entries(S))!1===a[d[0]]&&void 0===b(`suggest.${d[1]}`)&&c(`suggest.${d[1]}`,!1);c("suggest.filteredTypes",void 0)}}),Q("quickSuggestions",(a,b,c)=>{if("boolean"==typeof a){let b=a?"on":"off";c("quickSuggestions",{comments:b,strings:b,other:b})}}),Q("experimental.stickyScroll.enabled",(a,b,c)=>{"boolean"==typeof a&&(c("experimental.stickyScroll.enabled",void 0),void 0===b("stickyScroll.enabled")&&c("stickyScroll.enabled",a))}),Q("experimental.stickyScroll.maxLineCount",(a,b,c)=>{"number"==typeof a&&(c("experimental.stickyScroll.maxLineCount",void 0),void 0===b("stickyScroll.maxLineCount")&&c("stickyScroll.maxLineCount",a))}),Q("editor.experimentalEditContextEnabled",(a,b,c)=>{"boolean"==typeof a&&(c("editor.experimentalEditContextEnabled",void 0),void 0===b("editor.editContext")&&c("editor.editContext",a))}),Q("codeActionsOnSave",(a,b,c)=>{if(a&&"object"==typeof a){let b=!1,d={};for(let c of Object.entries(a))"boolean"==typeof c[1]?(b=!0,d[c[0]]=c[1]?"explicit":"never"):d[c[0]]=c[1];b&&c("codeActionsOnSave",d)}}),Q("codeActionWidget.includeNearbyQuickfixes",(a,b,c)=>{"boolean"==typeof a&&(c("codeActionWidget.includeNearbyQuickfixes",void 0),void 0===b("codeActionWidget.includeNearbyQuickFixes")&&c("codeActionWidget.includeNearbyQuickFixes",a))}),Q("lightbulb.enabled",(a,b,c)=>{"boolean"==typeof a&&c("lightbulb.enabled",a?void 0:"off")}),Q("inlineSuggest.edits.codeShifting",(a,b,c)=>{"boolean"==typeof a&&(c("inlineSuggest.edits.codeShifting",void 0),c("inlineSuggest.edits.allowCodeShifting",a?"always":"never"))}),Q("hover.enabled",(a,b,c)=>{"boolean"==typeof a&&c("hover.enabled",a?"on":"off")});var T=c(28516),U=c(21495),V=c(91902),W=c(28524),X=c(29980),Y=c(61055),Z=c(16240);let $=class extends G.jG{constructor(a,b,c,d,e){super(),this._accessibilityService=e,this._onDidChange=this._register(new F.vl),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new F.vl),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new U.n0,this.isSimpleWidget=a,this.contextMenuId=b,this._containerObserver=this._register(new N.u(d,c.dimension)),this._targetWindowId=(0,D.zk)(d).vscodeWindowId,this._rawOptions=ac(c),this._validatedOptions=ab.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(19)&&this._containerObserver.startObserving(),this._register(V.D.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(T.M.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(O.T.onDidChange(()=>this._recomputeOptions())),this._register(Y.c.getInstance((0,D.zk)(d)).onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._register(Z.U.onDidChangeInputMode(()=>this._recomputeOptions()))}_recomputeOptions(){let a=this._computeOptions(),b=ab.checkEquals(this.options,a);null!==b&&(this.options=a,this._onDidChangeFast.fire(b),this._onDidChange.fire(b))}_computeOptions(){let a=this._readEnvConfiguration(),b=(0,W.l)(this._validatedOptions,a.pixelRatio,this.isSimpleWidget),c=this._readFontInfo(b),d={memory:this._computeOptionsMemory,outerWidth:a.outerWidth,outerHeight:a.outerHeight-this._reservedHeight,fontInfo:c,extraEditorClassName:a.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:a.emptySelectionClipboard,pixelRatio:a.pixelRatio,tabFocusMode:this._validatedOptions.get(164)||T.M.getTabFocusMode(),inputMode:Z.U.getInputMode(),accessibilitySupport:a.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount,editContextSupported:a.editContextSupported};return ab.computeOptions(this._validatedOptions,d)}_readEnvConfiguration(){let a;return{extraEditorClassName:(a="",J.nr||J.c8?a+="no-minimap-shadow enable-user-select ":a+="no-user-select ",M.zx&&(a+="mac "),a),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:J.Tc||J.gm,pixelRatio:Y.c.getInstance((0,D.ZF)(this._targetWindowId,!0).window).value,editContextSupported:"function"==typeof globalThis.EditContext,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(a){return O.T.readFontInfo((0,D.ZF)(this._targetWindowId,!0).window,a)}getRawOptions(){return this._rawOptions}updateOptions(a){let b=ac(a);ab.applyUpdate(this._rawOptions,b)&&(this._validatedOptions=ab.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(a){this._containerObserver.observe(a)}setIsDominatedByLongLines(a){this._isDominatedByLongLines!==a&&(this._isDominatedByLongLines=a,this._recomputeOptions())}setModelLineCount(a){let b=function(a){let b=0;for(;a;)a=Math.floor(a/10),b++;return b||1}(a);this._lineNumbersDigitCount!==b&&(this._lineNumbersDigitCount=b,this._recomputeOptions())}setViewLineCount(a){this._viewLineCount!==a&&(this._viewLineCount=a,this._recomputeOptions())}setReservedHeight(a){this._reservedHeight!==a&&(this._reservedHeight=a,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(a){this._glyphMarginDecorationLaneCount!==a&&(this._glyphMarginDecorationLaneCount=a,this._recomputeOptions())}};$=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([(e=X.j,function(a,b){e(a,b,4)})],$);class _{constructor(){this._values=[]}_read(a){return this._values[a]}get(a){return this._values[a]}_write(a,b){this._values[a]=b}}class aa{constructor(){this._values=[]}_read(a){if(a>=this._values.length)throw Error("Cannot read uninitialized value");return this._values[a]}get(a){return this._read(a)}_write(a,b){this._values[a]=b}}class ab{static validateOptions(a){let b=new _;for(let c of U.BE){let d="_never_"===c.name?void 0:a[c.name];b._write(c.id,c.validate(d))}return b}static computeOptions(a,b){let c=new aa;for(let d of U.BE)c._write(d.id,d.compute(b,c,a._read(d.id)));return c}static _deepEquals(a,b){if("object"!=typeof a||"object"!=typeof b||!a||!b)return a===b;if(Array.isArray(a)||Array.isArray(b))return!!(Array.isArray(a)&&Array.isArray(b))&&(0,K.aI)(a,b);if(Object.keys(a).length!==Object.keys(b).length)return!1;for(let c in a)if(!ab._deepEquals(a[c],b[c]))return!1;return!0}static checkEquals(a,b){let c=[],d=!1;for(let e of U.BE){let f=!ab._deepEquals(a._read(e.id),b._read(e.id));c[e.id]=f,f&&(d=!0)}return d?new U.lw(c):null}static applyUpdate(a,b){let c=!1;for(let d of U.BE)if(b.hasOwnProperty(d.name)){let e=d.applyUpdate(a[d.name],b[d.name]);a[d.name]=e.newValue,c=c||e.didChange}return c}}function ac(a){let b=(0,L.Go)(a);return P.items.forEach(a=>a.apply(b)),b}var ad=c(13352),ae=c(61556);c(94484);var af=c(87175);!function(a){let b={total:0,min:Number.MAX_VALUE,max:0},c={...b},d={...b},e={...b},f=0;a.sampleCount=(0,af.FY)("inputLatency.sampleCount",0);let g={keydown:0,input:0,render:0};function h(){1===g.keydown&&(performance.mark("keydown/end"),g.keydown=2)}function i(){performance.mark("input/start"),g.input=1,l()}function j(){1===g.input&&(performance.mark("input/end"),g.input=2)}function k(){1===g.render&&(performance.mark("render/end"),g.render=2)}function l(){setTimeout(m)}function m(){2===g.keydown&&2===g.input&&2===g.render&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),n("keydown",b),n("input",c),n("render",d),n("inputlatency",e),f++,a.sampleCount.set(a.sampleCount.get()+1,void 0),performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),g.keydown=0,g.input=0,g.render=0)}function n(a,b){let c=performance.getEntriesByName(a)[0].duration;b.total+=c,b.min=Math.min(b.min,c),b.max=Math.max(b.max,c)}function o(a){return{average:a.total/f,max:a.max,min:a.min}}function p(a){a.total=0,a.min=Number.MAX_VALUE,a.max=0}a.onKeyDown=function(){m(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),g.keydown=1,queueMicrotask(h)},a.onBeforeInput=i,a.onInput=function(){0===g.input&&i(),queueMicrotask(j)},a.onKeyUp=function(){m()},a.onSelectionChange=function(){m()},a.onRenderStart=function(){2===g.keydown&&2===g.input&&0===g.render&&(performance.mark("render/start"),g.render=1,queueMicrotask(k),l())},a.getAndClearMeasurements=function(){if(0===f)return;let a={keydown:o(b),input:o(c),render:o(d),total:o(e),sampleCount:f};return p(b),p(c),p(d),p(e),f=0,a}}(m||(m={}));var ag=c(42913),ah=c(97085),ai=c(46857),aj=c(70687),ak=c(37327);c(34183),c(48727);var al=c(11023);c(18896),c(91018),c(62957);var am=c(40563);c(58330),c(39014),c(26858);class an{constructor(a,b){this.x=a,this.y=b,this._pageCoordinatesBrand=void 0}toClientCoordinates(a){return new ao(this.x-a.scrollX,this.y-a.scrollY)}}class ao{constructor(a,b){this.clientX=a,this.clientY=b,this._clientCoordinatesBrand=void 0}toPageCoordinates(a){return new an(this.clientX+a.scrollX,this.clientY+a.scrollY)}}class ap{constructor(a,b,c,d){this.x=a,this.y=b,this.width=c,this.height=d,this._editorPagePositionBrand=void 0}}class aq{constructor(a,b){this.x=a,this.y=b,this._positionRelativeToEditorBrand=void 0}}function ar(a){let b=(0,D.BK)(a);return new ap(b.left,b.top,b.width,b.height)}function as(a,b,c){let d=b.width/a.offsetWidth,e=b.height/a.offsetHeight;return new aq((c.x-b.x)/d,(c.y-b.y)/e)}class at extends ai.P{get editorPos(){return this._editorPos??=ar(this._editorViewDomNode),this._editorPos}get relativePos(){return this._relativePos??=as(this._editorViewDomNode,this.editorPos,this.pos),this._relativePos}constructor(a,b,c){super((0,D.zk)(c),a),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=b,this.pos=new an(this.posx,this.posy),this._editorViewDomNode=c}}class au{constructor(a){this._editorViewDomNode=a}_create(a){return new at(a,!1,this._editorViewDomNode)}onContextMenu(a,b){return(0,D.ko)(a,D.Bx.CONTEXT_MENU,a=>{b(this._create(a))})}onMouseUp(a,b){return(0,D.ko)(a,D.Bx.MOUSE_UP,a=>{b(this._create(a))})}onMouseDown(a,b){return(0,D.ko)(a,D.Bx.MOUSE_DOWN,a=>{b(this._create(a))})}onPointerDown(a,b){return(0,D.ko)(a,D.Bx.POINTER_DOWN,a=>{b(this._create(a),a.pointerId)})}onMouseLeave(a,b){return(0,D.ko)(a,D.Bx.MOUSE_LEAVE,a=>{b(this._create(a))})}onMouseMove(a,b){return(0,D.ko)(a,D.Bx.MOUSE_MOVE,a=>b(this._create(a)))}}class av{constructor(a){this._editorViewDomNode=a}_create(a){return new at(a,!1,this._editorViewDomNode)}onPointerUp(a,b){return(0,D.ko)(a,"pointerup",a=>{b(this._create(a))})}onPointerDown(a,b){return(0,D.ko)(a,D.Bx.POINTER_DOWN,a=>{b(this._create(a),a.pointerId)})}onPointerLeave(a,b){return(0,D.ko)(a,D.Bx.POINTER_LEAVE,a=>{b(this._create(a))})}onPointerMove(a,b){return(0,D.ko)(a,"pointermove",a=>b(this._create(a)))}}class aw extends G.jG{constructor(a){super(),this._editorViewDomNode=a,this._globalPointerMoveMonitor=this._register(new ah._),this._keydownListener=null}startMonitoring(a,b,c,d,e){this._keydownListener=(0,D.un)(a.ownerDocument,"keydown",a=>{a.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,a.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(a,b,c,a=>{d(new at(a,!0,this._editorViewDomNode))},a=>{this._keydownListener.dispose(),e(a)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}class ax{static{this._idPool=0}constructor(a){this._editor=a,this._instanceId=++ax._idPool,this._counter=0,this._rules=new G.$w,this._garbageCollectionScheduler=new aj.uC(()=>this.garbageCollect(),1e3)}dispose(){this._rules.dispose(),this._garbageCollectionScheduler.dispose()}createClassNameRef(a){let b=this.getOrCreateRule(a);return b.increaseRefCount(),{className:b.className,dispose:()=>{b.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(a){let b=this.computeUniqueKey(a),c=this._rules.get(b);if(!c){let d=this._counter++;c=new ay(b,`dyn-rule-${this._instanceId}-${d}`,(0,D.Cl)(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,a),this._rules.set(b,c)}return c}computeUniqueKey(a){return JSON.stringify(a)}garbageCollect(){for(let a of this._rules.values())a.hasReferences()||this._rules.deleteAndDispose(a.key)}}class ay{constructor(a,b,c,d){this.key=a,this.className=b,this.properties=d,this._referenceCount=0,this._styleElementDisposables=new G.Cm,this._styleElement=(0,ag.li)(c,void 0,this._styleElementDisposables),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(a,b){let c=`.${a} {`;for(let a in b){let d,e=b[a];d="object"==typeof e?(0,ak.Gu)(e.id):e;let f=a.replace(/(^[A-Z])/,([a])=>a.toLowerCase()).replace(/([A-Z])/g,([a])=>`-${a.toLowerCase()}`);c+=`
523
523
  ${f}: ${d};`}return c+`
524
524
  }`}dispose(){this._styleElementDisposables.dispose(),this._styleElement=void 0}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}class az extends G.jG{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(a){return!1}onCompositionEnd(a){return!1}onConfigurationChanged(a){return!1}onCursorStateChanged(a){return!1}onDecorationsChanged(a){return!1}onFlushed(a){return!1}onFocusChanged(a){return!1}onLanguageConfigurationChanged(a){return!1}onLineMappingChanged(a){return!1}onLinesChanged(a){return!1}onLinesDeleted(a){return!1}onLinesInserted(a){return!1}onRevealRangeRequest(a){return!1}onScrollChanged(a){return!1}onThemeChanged(a){return!1}onTokensChanged(a){return!1}onTokensColorsChanged(a){return!1}onZonesChanged(a){return!1}handleEvents(a){let b=!1;for(let c=0,d=a.length;c<d;c++){let d=a[c];switch(d.type){case 0:this.onCompositionStart(d)&&(b=!0);break;case 1:this.onCompositionEnd(d)&&(b=!0);break;case 2:this.onConfigurationChanged(d)&&(b=!0);break;case 3:this.onCursorStateChanged(d)&&(b=!0);break;case 4:this.onDecorationsChanged(d)&&(b=!0);break;case 5:this.onFlushed(d)&&(b=!0);break;case 6:this.onFocusChanged(d)&&(b=!0);break;case 7:this.onLanguageConfigurationChanged(d)&&(b=!0);break;case 8:this.onLineMappingChanged(d)&&(b=!0);break;case 9:this.onLinesChanged(d)&&(b=!0);break;case 10:this.onLinesDeleted(d)&&(b=!0);break;case 11:this.onLinesInserted(d)&&(b=!0);break;case 12:this.onRevealRangeRequest(d)&&(b=!0);break;case 13:this.onScrollChanged(d)&&(b=!0);break;case 15:this.onTokensChanged(d)&&(b=!0);break;case 14:this.onThemeChanged(d)&&(b=!0);break;case 16:this.onTokensColorsChanged(d)&&(b=!0);break;case 17:this.onZonesChanged(d)&&(b=!0);break;default:console.info("View received unknown event: "),console.info(d)}}b&&(this._shouldRender=!0)}}class aA extends az{constructor(a){super(),this._context=a,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onBeforeRender(a){}}class aB{static write(a,b){a.setAttribute("data-mprt",String(b))}static read(a){let b=a.getAttribute("data-mprt");return null===b?0:parseInt(b,10)}static collect(a,b){let c=[],d=0;for(;a&&a!==a.ownerDocument.body&&a!==b;)a.nodeType===a.ELEMENT_NODE&&(c[d++]=this.read(a)),a=a.parentElement;let e=new Uint8Array(d);for(let a=0;a<d;a++)e[a]=c[d-a-1];return e}}var aC=c(31622),aD=c(6812),aE=c(61822),aF=c(18530),aG=c(71296),aH=c(94630),aI=c(2525);class aJ{constructor(a=null){this.hitTarget=a,this.type=0}}class aK{get hitTarget(){return this.spanNode}constructor(a,b,c){this.position=a,this.spanNode=b,this.injectedText=c,this.type=1}}(n||(n={})).createFromDOMInfo=function(a,b,c){let d=a.getPositionFromDOMInfo(b,c);return d?new aK(d,b,null):new aJ(b)};class aL{constructor(a,b){this.lastViewCursorsRenderData=a,this.lastTextareaPosition=b}}class aM{static _deduceRage(a,b=null){return!b&&a?new aE.Q(a.lineNumber,a.column,a.lineNumber,a.column):b??null}static createUnknown(a,b,c){return{type:0,element:a,mouseColumn:b,position:c,range:this._deduceRage(c)}}static createTextarea(a,b){return{type:1,element:a,mouseColumn:b,position:null,range:null}}static createMargin(a,b,c,d,e,f){return{type:a,element:b,mouseColumn:c,position:d,range:e,detail:f}}static createViewZone(a,b,c,d,e){return{type:a,element:b,mouseColumn:c,position:d,range:this._deduceRage(d),detail:e}}static createContentText(a,b,c,d,e){return{type:6,element:a,mouseColumn:b,position:c,range:this._deduceRage(c,d),detail:e}}static createContentEmpty(a,b,c,d){return{type:7,element:a,mouseColumn:b,position:c,range:this._deduceRage(c),detail:d}}static createContentWidget(a,b,c){return{type:9,element:a,mouseColumn:b,position:null,range:null,detail:c}}static createScrollbar(a,b,c){return{type:11,element:a,mouseColumn:b,position:c,range:this._deduceRage(c)}}static createOverlayWidget(a,b,c){return{type:12,element:a,mouseColumn:b,position:null,range:null,detail:c}}static createOutsideEditor(a,b,c,d){return{type:13,element:null,mouseColumn:a,position:b,range:this._deduceRage(b),outsidePosition:c,outsideDistance:d}}static _typeToString(a){return 1===a?"TEXTAREA":2===a?"GUTTER_GLYPH_MARGIN":3===a?"GUTTER_LINE_NUMBERS":4===a?"GUTTER_LINE_DECORATIONS":5===a?"GUTTER_VIEW_ZONE":6===a?"CONTENT_TEXT":7===a?"CONTENT_EMPTY":8===a?"CONTENT_VIEW_ZONE":9===a?"CONTENT_WIDGET":10===a?"OVERVIEW_RULER":11===a?"SCROLLBAR":12===a?"OVERLAY_WIDGET":"UNKNOWN"}static toString(a){return this._typeToString(a.type)+": "+a.position+" - "+a.range+" - "+JSON.stringify(a.detail)}}class aN{static isTextArea(a){return 2===a.length&&3===a[0]&&7===a[1]}static isChildOfViewLines(a){return a.length>=4&&3===a[0]&&8===a[3]}static isStrictChildOfViewLines(a){return a.length>4&&3===a[0]&&8===a[3]}static isChildOfScrollableElement(a){return a.length>=2&&3===a[0]&&6===a[1]}static isChildOfMinimap(a){return a.length>=2&&3===a[0]&&9===a[1]}static isChildOfContentWidgets(a){return a.length>=4&&3===a[0]&&1===a[3]}static isChildOfOverflowGuard(a){return a.length>=1&&3===a[0]}static isChildOfOverflowingContentWidgets(a){return a.length>=1&&2===a[0]}static isChildOfOverlayWidgets(a){return a.length>=2&&3===a[0]&&4===a[1]}static isChildOfOverflowingOverlayWidgets(a){return a.length>=1&&5===a[0]}}class aO{constructor(a,b,c){this.viewModel=a.viewModel;const d=a.configuration.options;this.layoutInfo=d.get(165),this.viewDomNode=b.viewDomNode,this.viewLinesGpu=b.viewLinesGpu,this.lineHeight=d.get(75),this.stickyTabStops=d.get(132),this.typicalHalfwidthCharacterWidth=d.get(59).typicalHalfwidthCharacterWidth,this.lastRenderData=c,this._context=a,this._viewHelper=b}getZoneAtCoord(a){return aO.getZoneAtCoord(this._context,a)}static getZoneAtCoord(a,b){let c=a.viewLayout.getWhitespaceAtVerticalOffset(b);if(c){let d,e=c.verticalOffset+c.height/2,f=a.viewModel.getLineCount(),g=null,h=null;return c.afterLineNumber!==f&&(h=new aD.y(c.afterLineNumber+1,1)),c.afterLineNumber>0&&(g=new aD.y(c.afterLineNumber,a.viewModel.getLineMaxColumn(c.afterLineNumber))),d=null===h?g:null===g?h:b<e?g:h,{viewZoneId:c.id,afterLineNumber:c.afterLineNumber,positionBefore:g,positionAfter:h,position:d}}return null}getFullLineRangeAtCoord(a){if(this._context.viewLayout.isAfterLines(a)){let a=this._context.viewModel.getLineCount(),b=this._context.viewModel.getLineMaxColumn(a);return{range:new aE.Q(a,b,a,b),isAfterLines:!0}}let b=this._context.viewLayout.getLineNumberAtVerticalOffset(a),c=this._context.viewModel.getLineMaxColumn(b);return{range:new aE.Q(b,1,b,c),isAfterLines:!1}}getLineNumberAtVerticalOffset(a){return this._context.viewLayout.getLineNumberAtVerticalOffset(a)}isAfterLines(a){return this._context.viewLayout.isAfterLines(a)}isInTopPadding(a){return this._context.viewLayout.isInTopPadding(a)}isInBottomPadding(a){return this._context.viewLayout.isInBottomPadding(a)}getVerticalOffsetForLineNumber(a){return this._context.viewLayout.getVerticalOffsetForLineNumber(a)}findAttribute(a,b){return aO._findAttribute(a,b,this._viewHelper.viewDomNode)}static _findAttribute(a,b,c){for(;a&&a!==a.ownerDocument.body;){if(a.hasAttribute&&a.hasAttribute(b))return a.getAttribute(b);if(a===c)break;a=a.parentNode}return null}getLineWidth(a){return this._viewHelper.getLineWidth(a)}isRtl(a){return this.viewModel.getTextDirection(a)===aH.z4.RTL}visibleRangeForPosition(a,b){return this._viewHelper.visibleRangeForPosition(a,b)}getPositionFromDOMInfo(a,b){return this._viewHelper.getPositionFromDOMInfo(a,b)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class aP{constructor(a,b,c,d){this.editorPos=b,this.pos=c,this.relativePos=d,this.mouseVerticalOffset=Math.max(0,a.getCurrentScrollTop()+this.relativePos.y),this.mouseContentHorizontalOffset=a.getCurrentScrollLeft()+this.relativePos.x-a.layoutInfo.contentLeft,this.isInMarginArea=this.relativePos.x<a.layoutInfo.contentLeft&&this.relativePos.x>=a.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,aT._getMouseColumn(this.mouseContentHorizontalOffset,a.typicalHalfwidthCharacterWidth))}}class aQ extends aP{get target(){return this._useHitTestTarget?this.hitTestResult.value.hitTarget:this._eventTarget}get targetPath(){return this._targetPathCacheElement!==this.target&&(this._targetPathCacheElement=this.target,this._targetPathCacheValue=aB.collect(this.target,this._ctx.viewDomNode)),this._targetPathCacheValue}constructor(a,b,c,d,e){super(a,b,c,d),this.hitTestResult=new aI.d(()=>aT.doHitTest(this._ctx,this)),this._targetPathCacheElement=null,this._targetPathCacheValue=new Uint8Array(0),this._ctx=a,this._eventTarget=e;const f=!!this._eventTarget;this._useHitTestTarget=!f}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}
525
- target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&null!==this.hitTestResult.value.hitTarget&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(a=null){return a&&a.column<this._ctx.viewModel.getLineMaxColumn(a.lineNumber)?aF.A.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(a.lineNumber),a.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(a=null){return aM.createUnknown(this.target,this._getMouseColumn(a),a)}fulfillTextarea(){return aM.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(a,b,c,d){return aM.createMargin(a,this.target,this._getMouseColumn(b),b,c,d)}fulfillViewZone(a,b,c){return aM.createViewZone(a,this.target,this._getMouseColumn(),b,c)}fulfillContentText(a,b,c){return aM.createContentText(this.target,this._getMouseColumn(a),a,b,c)}fulfillContentEmpty(a,b){return aM.createContentEmpty(this.target,this._getMouseColumn(a),a,b)}fulfillContentWidget(a){return aM.createContentWidget(this.target,this._getMouseColumn(),a)}fulfillScrollbar(a){return aM.createScrollbar(this.target,this._getMouseColumn(a),a)}fulfillOverlayWidget(a){return aM.createOverlayWidget(this.target,this._getMouseColumn(),a)}}let aR={isAfterLines:!0};function aS(a){return{isAfterLines:!1,horizontalDistanceToText:a}}class aT{constructor(a,b){this._context=a,this._viewHelper=b}mouseTargetIsWidget(a){let b=a.target,c=aB.collect(b,this._viewHelper.viewDomNode);return!!(aN.isChildOfContentWidgets(c)||aN.isChildOfOverflowingContentWidgets(c)||aN.isChildOfOverlayWidgets(c)||aN.isChildOfOverflowingOverlayWidgets(c))}createMouseTarget(a,b,c,d,e){let f=new aO(this._context,this._viewHelper,a),g=new aQ(f,b,c,d,e);try{let a=aT._createMouseTarget(f,g);if(6===a.type&&f.stickyTabStops&&null!==a.position){let b=aT._snapToSoftTabBoundary(a.position,f.viewModel),c=aE.Q.fromPositions(b,b).plusRange(a.range);return g.fulfillContentText(b,c,a.detail)}return a}catch(a){return g.fulfillUnknown()}}static _createMouseTarget(a,b){if(null===b.target)return b.fulfillUnknown();let c=null;return aN.isChildOfOverflowGuard(b.targetPath)||aN.isChildOfOverflowingContentWidgets(b.targetPath)||aN.isChildOfOverflowingOverlayWidgets(b.targetPath)||(c=c||b.fulfillUnknown()),(c=(c=(c=(c=(c=(c=(c=(c=(c=(c=c||aT._hitTestContentWidget(a,b))||aT._hitTestOverlayWidget(a,b))||aT._hitTestMinimap(a,b))||aT._hitTestScrollbarSlider(a,b))||aT._hitTestViewZone(a,b))||aT._hitTestMargin(a,b))||aT._hitTestViewCursor(a,b))||aT._hitTestTextArea(a,b))||aT._hitTestViewLines(a,b))||aT._hitTestScrollbar(a,b))||b.fulfillUnknown()}static _hitTestContentWidget(a,b){if(aN.isChildOfContentWidgets(b.targetPath)||aN.isChildOfOverflowingContentWidgets(b.targetPath)){let c=a.findAttribute(b.target,"widgetId");return c?b.fulfillContentWidget(c):b.fulfillUnknown()}return null}static _hitTestOverlayWidget(a,b){if(aN.isChildOfOverlayWidgets(b.targetPath)||aN.isChildOfOverflowingOverlayWidgets(b.targetPath)){let c=a.findAttribute(b.target,"widgetId");return c?b.fulfillOverlayWidget(c):b.fulfillUnknown()}return null}static _hitTestViewCursor(a,b){if(b.target){for(let c of a.lastRenderData.lastViewCursorsRenderData)if(b.target===c.domNode)return b.fulfillContentText(c.position,null,{mightBeForeignElement:!1,injectedText:null})}if(b.isInContentArea){let c=a.lastRenderData.lastViewCursorsRenderData,d=b.mouseContentHorizontalOffset,e=b.mouseVerticalOffset;for(let f of c){if(d<f.contentLeft||d>f.contentLeft+f.width)continue;let c=a.getVerticalOffsetForLineNumber(f.position.lineNumber);if(c<=e&&e<=c+f.height)return b.fulfillContentText(f.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(a,b){let c=a.getZoneAtCoord(b.mouseVerticalOffset);if(c){let a=b.isInContentArea?8:5;return b.fulfillViewZone(a,c.position,c)}return null}static _hitTestTextArea(a,b){return aN.isTextArea(b.targetPath)?a.lastRenderData.lastTextareaPosition?b.fulfillContentText(a.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):b.fulfillTextarea():null}static _hitTestMargin(a,b){if(b.isInMarginArea){let c=a.getFullLineRangeAtCoord(b.mouseVerticalOffset),d=c.range.getStartPosition(),e=Math.abs(b.relativePos.x),f={isAfterLines:c.isAfterLines,glyphMarginLeft:a.layoutInfo.glyphMarginLeft,glyphMarginWidth:a.layoutInfo.glyphMarginWidth,lineNumbersWidth:a.layoutInfo.lineNumbersWidth,offsetX:e};if((e-=a.layoutInfo.glyphMarginLeft)<=a.layoutInfo.glyphMarginWidth){let g=a.viewModel.coordinatesConverter.convertViewPositionToModelPosition(c.range.getStartPosition());return f.glyphMarginLane=a.viewModel.glyphLanes.getLanesAtLine(g.lineNumber)[Math.floor(e/a.lineHeight)],b.fulfillMargin(2,d,c.range,f)}return(e-=a.layoutInfo.glyphMarginWidth)<=a.layoutInfo.lineNumbersWidth?b.fulfillMargin(3,d,c.range,f):(e-=a.layoutInfo.lineNumbersWidth,b.fulfillMargin(4,d,c.range,f))}return null}static _hitTestViewLines(a,b){if(!aN.isChildOfViewLines(b.targetPath))return null;if(a.isInTopPadding(b.mouseVerticalOffset))return b.fulfillContentEmpty(new aD.y(1,1),aR);if(a.isAfterLines(b.mouseVerticalOffset)||a.isInBottomPadding(b.mouseVerticalOffset)){let c=a.viewModel.getLineCount(),d=a.viewModel.getLineMaxColumn(c);return b.fulfillContentEmpty(new aD.y(c,d),aR)}if(aN.isStrictChildOfViewLines(b.targetPath)){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),d=a.viewModel.getLineLength(c),e=a.getLineWidth(c);if(0===d){let a=aS(b.mouseContentHorizontalOffset-e);return b.fulfillContentEmpty(new aD.y(c,1),a)}if(a.isRtl(c)){if(b.mouseContentHorizontalOffset+e<=a.layoutInfo.contentWidth-a.layoutInfo.verticalScrollbarWidth){let d=aS(b.mouseContentHorizontalOffset-e),f=new aD.y(c,a.viewModel.getLineMaxColumn(c));return b.fulfillContentEmpty(f,d)}}else if(b.mouseContentHorizontalOffset>=e){let d=aS(b.mouseContentHorizontalOffset-e),f=new aD.y(c,a.viewModel.getLineMaxColumn(c));return b.fulfillContentEmpty(f,d)}}else if(a.viewLinesGpu){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset);if(0===a.viewModel.getLineLength(c)){let d=a.getLineWidth(c),e=aS(b.mouseContentHorizontalOffset-d);return b.fulfillContentEmpty(new aD.y(c,1),e)}let d=a.getLineWidth(c);if(a.isRtl(c)){if(b.mouseContentHorizontalOffset+d<=a.layoutInfo.contentWidth-a.layoutInfo.verticalScrollbarWidth){let e=aS(b.mouseContentHorizontalOffset-d),f=new aD.y(c,a.viewModel.getLineMaxColumn(c));return b.fulfillContentEmpty(f,e)}}else if(b.mouseContentHorizontalOffset>=d){let e=aS(b.mouseContentHorizontalOffset-d),f=new aD.y(c,a.viewModel.getLineMaxColumn(c));return b.fulfillContentEmpty(f,e)}let e=a.viewLinesGpu.getPositionAtCoordinate(c,b.mouseContentHorizontalOffset);if(e)return b.fulfillContentText(e,aE.Q.fromPositions(e,e),{injectedText:null,mightBeForeignElement:!1})}let c=b.hitTestResult.value;return 1===c.type?aT.createMouseTargetFromHitTestPosition(a,b,c.spanNode,c.position,c.injectedText):b.wouldBenefitFromHitTestTargetSwitch?(b.switchToHitTestTarget(),this._createMouseTarget(a,b)):b.fulfillUnknown()}static _hitTestMinimap(a,b){if(aN.isChildOfMinimap(b.targetPath)){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),d=a.viewModel.getLineMaxColumn(c);return b.fulfillScrollbar(new aD.y(c,d))}return null}static _hitTestScrollbarSlider(a,b){if(aN.isChildOfScrollableElement(b.targetPath)&&b.target&&1===b.target.nodeType){let c=b.target.className;if(c&&/\b(slider|scrollbar)\b/.test(c)){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),d=a.viewModel.getLineMaxColumn(c);return b.fulfillScrollbar(new aD.y(c,d))}}return null}static _hitTestScrollbar(a,b){if(aN.isChildOfScrollableElement(b.targetPath)){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),d=a.viewModel.getLineMaxColumn(c);return b.fulfillScrollbar(new aD.y(c,d))}return null}getMouseColumn(a){let b=this._context.configuration.options,c=b.get(165),d=this._context.viewLayout.getCurrentScrollLeft()+a.x-c.contentLeft;return aT._getMouseColumn(d,b.get(59).typicalHalfwidthCharacterWidth)}static _getMouseColumn(a,b){return a<0?1:Math.round(a/b)+1}static createMouseTargetFromHitTestPosition(a,b,c,d,e){let f=d.lineNumber,g=d.column,h=a.getLineWidth(f);if(b.mouseContentHorizontalOffset>h){let a=aS(b.mouseContentHorizontalOffset-h);return b.fulfillContentEmpty(d,a)}let i=a.visibleRangeForPosition(f,g);if(!i)return b.fulfillUnknown(d);let j=i.left;if(1>Math.abs(b.mouseContentHorizontalOffset-j))return b.fulfillContentText(d,null,{mightBeForeignElement:!!e,injectedText:e});let k=[];if(k.push({offset:i.left,column:g}),g>1){let b=a.visibleRangeForPosition(f,g-1);b&&k.push({offset:b.left,column:g-1})}if(g<a.viewModel.getLineMaxColumn(f)){let b=a.visibleRangeForPosition(f,g+1);b&&k.push({offset:b.left,column:g+1})}k.sort((a,b)=>a.offset-b.offset);let l=b.pos.toClientCoordinates((0,D.zk)(a.viewDomNode)),m=c.getBoundingClientRect(),n=m.left<=l.clientX&&l.clientX<=m.right,o=null;for(let a=1;a<k.length;a++){let c=k[a-1],e=k[a];if(c.offset<=b.mouseContentHorizontalOffset&&b.mouseContentHorizontalOffset<=e.offset){o=new aE.Q(f,c.column,f,e.column),d=Math.abs(c.offset-b.mouseContentHorizontalOffset)<Math.abs(e.offset-b.mouseContentHorizontalOffset)?new aD.y(f,c.column):new aD.y(f,e.column);break}}return b.fulfillContentText(d,o,{mightBeForeignElement:!n||!!e,injectedText:e})}static _doHitTestWithCaretRangeFromPoint(a,b){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),d=a.getVerticalOffsetForLineNumber(c),e=d+a.lineHeight;if(!(c===a.viewModel.getLineCount()&&b.mouseVerticalOffset>e)){let c=Math.floor((d+e)/2),f=b.pos.y+(c-b.mouseVerticalOffset);f<=b.editorPos.y&&(f=b.editorPos.y+1),f>=b.editorPos.y+b.editorPos.height&&(f=b.editorPos.y+b.editorPos.height-1);let g=new an(b.pos.x,f),h=this._actualDoHitTestWithCaretRangeFromPoint(a,g.toClientCoordinates((0,D.zk)(a.viewDomNode)));if(1===h.type)return h}return this._actualDoHitTestWithCaretRangeFromPoint(a,b.pos.toClientCoordinates((0,D.zk)(a.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(a,b){let c,d=(0,D.jG)(a.viewDomNode);if(!(c=d?void 0===d.caretRangeFromPoint?function(a,b,c){let d=document.createRange(),e=a.elementFromPoint(b,c);if(e?.hasChildNodes()){let a;for(;e&&e.firstChild&&e.firstChild.nodeType!==e.firstChild.TEXT_NODE&&e.lastChild&&e.lastChild.firstChild;)e=e.lastChild;let c=e.getBoundingClientRect(),f=(0,D.zk)(e).getComputedStyle(e,null),g=f.getPropertyValue("font-style"),h=f.getPropertyValue("font-variant"),i=f.getPropertyValue("font-weight"),j=f.getPropertyValue("font-size"),k=f.getPropertyValue("line-height"),l=f.getPropertyValue("font-family"),m=`${g} ${h} ${i} ${j}/${k} ${l}`,n=e.innerText,o=c.left,p=0;if(b>c.left+c.width)p=n.length;else{let c=aU.getInstance();for(let d=0;d<n.length+1;d++){if(b<(o+=a=c.getCharWidth(n.charAt(d),m)/2)){p=d;break}o+=a}}d.setStart(e.firstChild,p),d.setEnd(e.firstChild,p)}return d}(d,b.clientX,b.clientY):d.caretRangeFromPoint(b.clientX,b.clientY):a.viewDomNode.ownerDocument.caretRangeFromPoint(b.clientX,b.clientY))||!c.startContainer)return new aJ;let e=c.startContainer;if(e.nodeType===e.TEXT_NODE){let b=e.parentNode,d=b?b.parentNode:null,f=d?d.parentNode:null;return(f&&f.nodeType===f.ELEMENT_NODE?f.className:null)===aC.G.CLASS_NAME?n.createFromDOMInfo(a,b,c.startOffset):new aJ(e.parentNode)}if(e.nodeType===e.ELEMENT_NODE){let b=e.parentNode,c=b?b.parentNode:null;return(c&&c.nodeType===c.ELEMENT_NODE?c.className:null)===aC.G.CLASS_NAME?n.createFromDOMInfo(a,e,e.textContent.length):new aJ(e)}return new aJ}static _doHitTestWithCaretPositionFromPoint(a,b){let c=a.viewDomNode.ownerDocument.caretPositionFromPoint(b.clientX,b.clientY);if(c.offsetNode.nodeType===c.offsetNode.TEXT_NODE){let b=c.offsetNode.parentNode,d=b?b.parentNode:null,e=d?d.parentNode:null;return(e&&e.nodeType===e.ELEMENT_NODE?e.className:null)===aC.G.CLASS_NAME?n.createFromDOMInfo(a,c.offsetNode.parentNode,c.offset):new aJ(c.offsetNode.parentNode)}if(c.offsetNode.nodeType===c.offsetNode.ELEMENT_NODE){let b=c.offsetNode.parentNode,d=b&&b.nodeType===b.ELEMENT_NODE?b.className:null,e=b?b.parentNode:null,f=e&&e.nodeType===e.ELEMENT_NODE?e.className:null;if(d===aC.G.CLASS_NAME){let b=c.offsetNode.childNodes[Math.min(c.offset,c.offsetNode.childNodes.length-1)];if(b)return n.createFromDOMInfo(a,b,0)}else if(f===aC.G.CLASS_NAME)return n.createFromDOMInfo(a,c.offsetNode,0)}return new aJ(c.offsetNode)}static _snapToSoftTabBoundary(a,b){let c=b.getLineContent(a.lineNumber),{tabSize:d}=b.model.getOptions(),e=aG.s.atomicPosition(c,a.column-1,d,2);return -1!==e?new aD.y(a.lineNumber,e+1):a}static doHitTest(a,b){let c=new aJ;if("function"==typeof a.viewDomNode.ownerDocument.caretRangeFromPoint?c=this._doHitTestWithCaretRangeFromPoint(a,b):a.viewDomNode.ownerDocument.caretPositionFromPoint&&(c=this._doHitTestWithCaretPositionFromPoint(a,b.pos.toClientCoordinates((0,D.zk)(a.viewDomNode)))),1===c.type){let b=a.viewModel.getInjectedTextAt(c.position),d=a.viewModel.normalizePosition(c.position,2);(b||!d.equals(c.position))&&(c=new aK(d,c.spanNode,b))}return c}}class aU{static{this._INSTANCE=null}static getInstance(){return aU._INSTANCE||(aU._INSTANCE=new aU),aU._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(a,b){let c=a+b;if(this._cache[c])return this._cache[c];let d=this._canvas.getContext("2d");d.font=b;let e=d.measureText(a).width;return this._cache[c]=e,e}}var aV=c(39870),aW=c(34793),aX=c(27612),aY=c(77509),aZ=c(72542);class a$ extends G.jG{constructor(a,b,c,d){super(),this._context=a,this._viewHelper=b,this._mouseTargetFactory=c,this._dispatchMouse=d,this._operation=null}dispose(){super.dispose(),this.stop()}start(a,b){this._operation?this._operation.setPosition(a,b):this._operation=this._createDragScrollingOperation(a,b)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class a_ extends G.jG{constructor(a,b,c,d,e,f){super(),this._context=a,this._viewHelper=b,this._mouseTargetFactory=c,this._dispatchMouse=d,this._position=e,this._mouseEvent=f,this._lastTime=Date.now(),this._animationFrameDisposable=(0,D.PG)((0,D.zk)(f.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(a,b){this._position=a,this._mouseEvent=b}_tick(){let a=Date.now(),b=a-this._lastTime;return this._lastTime=a,b}}class a0 extends a${_createDragScrollingOperation(a,b){return new a1(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,a,b)}}class a1 extends a_{_getScrollSpeed(){let a=this._context.configuration.options.get(75),b=this._context.configuration.options.get(165).height/a,c=this._position.outsideDistance/a;return c<=1.5?Math.max(30,b*(1+c)):c<=3?Math.max(60,b*(2+c)):Math.max(200,b*(7+c))}_execute(){let a,b=this._context.configuration.options.get(75),c=this._getScrollSpeed(),d=this._tick()/1e3*c*b,e="above"===this._position.outsidePosition?-d:d;this._context.viewModel.viewLayout.deltaScrollNow(0,e),this._viewHelper.renderNow();let f=this._context.viewLayout.getLinesViewportData(),g="above"===this._position.outsidePosition?f.startLineNumber:f.endLineNumber,h="above"===this._position.outsidePosition?1===f.startLineNumber:f.endLineNumber===this._context.viewModel.getLineCount();{let b=ar(this._viewHelper.viewDomNode),c=this._context.configuration.options.get(165).horizontalScrollbarHeight,d=new an(this._mouseEvent.pos.x,b.y+b.height-c-.1),e=as(this._viewHelper.viewDomNode,b,d);a=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),b,d,e,null)}(!a.position||a.position.lineNumber!==g||h)&&(a="above"===this._position.outsidePosition?aM.createOutsideEditor(this._position.mouseColumn,new aD.y(g,1),"above",this._position.outsideDistance):aM.createOutsideEditor(this._position.mouseColumn,new aD.y(g,this._context.viewModel.getLineMaxColumn(g)),"below",this._position.outsideDistance)),this._dispatchMouse(a,!0,2),this._animationFrameDisposable=(0,D.PG)((0,D.zk)(a.element),()=>this._execute())}}class a2 extends a${_createDragScrollingOperation(a,b){return new a3(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,a,b)}}class a3 extends a_{_getScrollSpeed(){let a=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,b=this._context.configuration.options.get(165).contentWidth/a,c=this._position.outsideDistance/a;return c<=1.5?Math.max(30,b*(1+c)):c<=3?Math.max(60,b*(2+c)):Math.max(200,b*(7+c))}_execute(){let a,b=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,c=this._getScrollSpeed(),d=this._tick()/1e3*c*b*.5,e="left"===this._position.outsidePosition?-d:d;if(this._context.viewModel.viewLayout.deltaScrollNow(e,0),this._viewHelper.renderNow(),!this._position.position)return;let f=this._position.position.lineNumber;{let b=ar(this._viewHelper.viewDomNode),c=this._context.configuration.options.get(165).horizontalScrollbarHeight,d=new an(this._mouseEvent.pos.x,b.y+b.height-c-.1),e=as(this._viewHelper.viewDomNode,b,d);a=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),b,d,e,null)}a="left"===this._position.outsidePosition?aM.createOutsideEditor(a.mouseColumn,new aD.y(f,a.mouseColumn),"left",this._position.outsideDistance):aM.createOutsideEditor(a.mouseColumn,new aD.y(f,a.mouseColumn),"right",this._position.outsideDistance),this._dispatchMouse(a,!0,2),this._animationFrameDisposable=(0,D.PG)((0,D.zk)(a.element),()=>this._execute())}}class a4 extends az{constructor(a,b,c){super(),this._mouseLeaveMonitor=null,this._context=a,this.viewController=b,this.viewHelper=c,this.mouseTargetFactory=new aT(this._context,c),this._mouseDownOperation=this._register(new a5(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(a,b)=>this._createMouseTarget(a,b),a=>this._getMouseColumn(a))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(165).height;const d=new au(this.viewHelper.viewDomNode);this._register(d.onContextMenu(this.viewHelper.viewDomNode,a=>this._onContextMenu(a,!0))),this._register(d.onMouseMove(this.viewHelper.viewDomNode,a=>{this._onMouseMove(a),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=(0,D.ko)(this.viewHelper.viewDomNode.ownerDocument,"mousemove",a=>{this.viewHelper.viewDomNode.contains(a.target)||this._onMouseLeave(new at(a,!1,this.viewHelper.viewDomNode))}))})),this._register(d.onMouseUp(this.viewHelper.viewDomNode,a=>this._onMouseUp(a))),this._register(d.onMouseLeave(this.viewHelper.viewDomNode,a=>this._onMouseLeave(a)));let e=0;this._register(d.onPointerDown(this.viewHelper.viewDomNode,(a,b)=>{e=b})),this._register((0,D.ko)(this.viewHelper.viewDomNode,D.Bx.POINTER_UP,a=>{this._mouseDownOperation.onPointerUp()})),this._register(d.onMouseDown(this.viewHelper.viewDomNode,a=>this._onMouseDown(a,e))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){let a=aZ.QC.INSTANCE,b=0,c=V.D.getZoomLevel(),d=!1,e=0,f=f=>{if(this.viewController.emitMouseWheel(f),!this._context.configuration.options.get(84))return;let h=new ai.$(f);if(a.acceptStandardWheelEvent(h),a.isPhysicalMouseWheel()){if(g(f)){let a=V.D.getZoomLevel(),b=h.deltaY>0?1:-1;V.D.setZoomLevel(a+b),h.preventDefault(),h.stopPropagation()}}else Date.now()-b>50&&(c=V.D.getZoomLevel(),d=g(f),e=0),b=Date.now(),e+=h.deltaY,d&&(V.D.setZoomLevel(c+e/5),h.preventDefault(),h.stopPropagation())};function g(a){return M.zx?(a.metaKey||a.ctrlKey)&&!a.shiftKey&&!a.altKey:a.ctrlKey&&!a.metaKey&&!a.shiftKey&&!a.altKey}this._register((0,D.ko)(this.viewHelper.viewDomNode,D.Bx.MOUSE_WHEEL,f,{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(a){if(a.hasChanged(165)){let a=this._context.configuration.options.get(165).height;this._height!==a&&(this._height=a,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(a){return this._mouseDownOperation.onCursorStateChanged(a),!1}onFocusChanged(a){return!1}getTargetAtClientPoint(a,b){let c=new ao(a,b).toPageCoordinates((0,D.zk)(this.viewHelper.viewDomNode)),d=ar(this.viewHelper.viewDomNode);if(c.y<d.y||c.y>d.y+d.height||c.x<d.x||c.x>d.x+d.width)return null;let e=as(this.viewHelper.viewDomNode,d,c);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),d,c,e,null)}_createMouseTarget(a,b){let c=a.target;if(!this.viewHelper.viewDomNode.contains(c)){let b=(0,D.jG)(this.viewHelper.viewDomNode);b&&(c=b.elementsFromPoint(a.posx,a.posy).find(a=>this.viewHelper.viewDomNode.contains(a))??null)}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),a.editorPos,a.pos,a.relativePos,b?c:null)}_getMouseColumn(a){return this.mouseTargetFactory.getMouseColumn(a.relativePos)}_onContextMenu(a,b){this.viewController.emitContextMenu({event:a,target:this._createMouseTarget(a,b)})}_onMouseMove(a){this.mouseTargetFactory.mouseTargetIsWidget(a)||a.preventDefault(),this._mouseDownOperation.isActive()||a.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:a,target:this._createMouseTarget(a,!0)})}_onMouseLeave(a){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:a,target:null})}_onMouseUp(a){this.viewController.emitMouseUp({event:a,target:this._createMouseTarget(a,!0)})}_onMouseDown(a,b){let c=this._createMouseTarget(a,!0),d=6===c.type||7===c.type,e=2===c.type||3===c.type||4===c.type,f=3===c.type,g=this._context.configuration.options.get(125),h=8===c.type||5===c.type,i=9===c.type,j=a.leftButton||a.middleButton;M.zx&&a.leftButton&&a.ctrlKey&&(j=!1);let k=()=>{a.preventDefault(),this.viewHelper.focusTextArea()};if(j&&(d||f&&g))k(),this._mouseDownOperation.start(c.type,a,b);else if(e)a.preventDefault();else if(h){let d=c.detail;j&&this.viewHelper.shouldSuppressMouseDownOnViewZone(d.viewZoneId)&&(k(),this._mouseDownOperation.start(c.type,a,b),a.preventDefault())}else i&&this.viewHelper.shouldSuppressMouseDownOnWidget(c.detail)&&(k(),a.preventDefault());this.viewController.emitMouseDown({event:a,target:c})}}class a5 extends G.jG{constructor(a,b,c,d,e,f){super(),this._context=a,this._viewController=b,this._viewHelper=c,this._mouseTargetFactory=d,this._createMouseTarget=e,this._getMouseColumn=f,this._mouseMoveMonitor=this._register(new aw(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new a0(this._context,this._viewHelper,this._mouseTargetFactory,(a,b,c)=>this._dispatchMouse(a,b,c))),this._leftRightDragScrolling=this._register(new a2(this._context,this._viewHelper,this._mouseTargetFactory,(a,b,c)=>this._dispatchMouse(a,b,c))),this._mouseState=new a6,this._currentSelection=new aY.L(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}isActive(){return this._isActive}_onMouseDownThenMove(a){this._lastMouseEvent=a,this._mouseState.setModifiers(a);let b=this._findMousePosition(a,!1);b&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:a,target:b}):13===b.type?"above"===b.outsidePosition||"below"===b.outsidePosition?(this._topBottomDragScrolling.start(b,a),this._leftRightDragScrolling.stop()):(this._leftRightDragScrolling.start(b,a),this._topBottomDragScrolling.stop()):(this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop(),this._dispatchMouse(b,!0,1)))}start(a,b,c){this._lastMouseEvent=b,this._mouseState.setStartedOnLineNumbers(3===a),this._mouseState.setStartButtons(b),this._mouseState.setModifiers(b);let d=this._findMousePosition(b,!0);if(!d||!d.position)return;this._mouseState.trySetCount(b.detail,d.position),b.detail=this._mouseState.count;let e=this._context.configuration.options;if(!e.get(104)&&e.get(42)&&!e.get(28)&&!this._mouseState.altKey&&b.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===d.type&&d.position&&this._currentSelection.containsPosition(d.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,c,b.buttons,a=>this._onMouseDownThenMove(a),a=>{let b=this._findMousePosition(this._lastMouseEvent,!1);(0,D.kx)(a)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:b?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(d,b.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,c,b.buttons,a=>this._onMouseDownThenMove(a),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(a){this._currentSelection=a.selections[0]}_getPositionOutsideEditor(a){let b=a.editorPos,c=this._context.viewModel,d=this._context.viewLayout,e=this._getMouseColumn(a);if(a.posy<b.y){let c=b.y-a.posy,f=Math.max(d.getCurrentScrollTop()-c,0),g=aO.getZoneAtCoord(this._context,f);if(g){let a=this._helpPositionJumpOverViewZone(g);if(a)return aM.createOutsideEditor(e,a,"above",c)}let h=d.getLineNumberAtVerticalOffset(f);return aM.createOutsideEditor(e,new aD.y(h,1),"above",c)}if(a.posy>b.y+b.height){let f=a.posy-b.y-b.height,g=d.getCurrentScrollTop()+a.relativePos.y,h=aO.getZoneAtCoord(this._context,g);if(h){let a=this._helpPositionJumpOverViewZone(h);if(a)return aM.createOutsideEditor(e,a,"below",f)}let i=d.getLineNumberAtVerticalOffset(g);return aM.createOutsideEditor(e,new aD.y(i,c.getLineMaxColumn(i)),"below",f)}let f=d.getLineNumberAtVerticalOffset(d.getCurrentScrollTop()+a.relativePos.y),g=this._context.configuration.options.get(165),h=g.contentLeft;if(a.relativePos.x<=h){let b=h-a.relativePos.x,d=c.getTextDirection(f)===aH.z4.RTL;return aM.createOutsideEditor(e,new aD.y(f,d?c.getLineMaxColumn(f):1),"left",b)}let i=0===g.minimap.minimapLeft?g.width-g.verticalScrollbarWidth:g.minimap.minimapLeft;if(a.relativePos.x>=i){let b=a.relativePos.x-i,d=c.getTextDirection(f)===aH.z4.RTL;return aM.createOutsideEditor(e,new aD.y(f,d?1:c.getLineMaxColumn(f)),"right",b)}return null}_findMousePosition(a,b){let c=this._getPositionOutsideEditor(a);if(c)return c;let d=this._createMouseTarget(a,b);if(!d.position)return null;if(8===d.type||5===d.type){let a=this._helpPositionJumpOverViewZone(d.detail);if(a)return aM.createViewZone(d.type,d.element,d.mouseColumn,a,d.detail)}return d}_helpPositionJumpOverViewZone(a){let b=new aD.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),c=a.positionBefore,d=a.positionAfter;if(c&&d)if(c.isBefore(b))return c;else return d;return null}_dispatchMouse(a,b,c){a.position&&this._viewController.dispatchMouse({position:a.position,mouseColumn:a.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:c,inSelectionMode:b,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===a.type&&null!==a.detail.injectedText})}}class a6{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(a){this._altKey=a.altKey,this._ctrlKey=a.ctrlKey,this._metaKey=a.metaKey,this._shiftKey=a.shiftKey}setStartButtons(a){this._leftButton=a.leftButton,this._middleButton=a.middleButton}setStartedOnLineNumbers(a){this._startedOnLineNumbers=a}trySetCount(a,b){let c=new Date().getTime();c-this._lastSetMouseDownCountTime>a6.CLEAR_MOUSE_DOWN_COUNT_TIME&&(a=1),this._lastSetMouseDownCountTime=c,a>this._lastMouseDownCount+1&&(a=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(b)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=b,this._lastMouseDownCount=Math.min(a,this._lastMouseDownPositionEqualCount)}}var a7=c(73298),a8=c(62677),a9=c(26529),ba=c(37788),bb=c(36540);class bc{static{this.EMPTY=new bc("",0,0,null,void 0)}constructor(a,b,c,d,e){this.value=a,this.selectionStart=b,this.selectionEnd=c,this.selection=d,this.newlineCountBeforeSelection=e}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(a,b){let c,d=a.getValue(),e=a.getSelectionStart(),f=a.getSelectionEnd();return b&&d.substring(0,e)===b.value.substring(0,b.selectionStart)&&(c=b.newlineCountBeforeSelection),new bc(d,e,f,null,c)}collapseSelection(){return this.selectionStart===this.value.length?this:new bc(this.value,this.value.length,this.value.length,null,void 0)}isWrittenToTextArea(a,b){let c=this.value===a.getValue();return b?this.selectionStart===a.getSelectionStart()&&this.selectionEnd===a.getSelectionEnd()&&c:c}writeToTextArea(a,b,c){b.setValue(a,this.value),c&&b.setSelectionRange(a,this.selectionStart,this.selectionEnd)}deduceEditorPosition(a){if(a<=this.selectionStart){let b=this.value.substring(a,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,b,-1)}if(a>=this.selectionEnd){let b=this.value.substring(this.selectionEnd,a);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,b,1)}let b=this.value.substring(this.selectionStart,a);if(-1===b.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,b,1);let c=this.value.substring(a,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,c,-1)}_finishDeduceEditorPosition(a,b,c){let d=0,e=-1;for(;-1!==(e=b.indexOf("\n",e+1));)d++;return[a,c*b.length,d]}static deduceInput(a,b,c){if(!a)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};let d=Math.min((0,a9.Qp)(a.value,b.value),a.selectionStart,b.selectionStart),e=Math.min((0,a9.Vi)(a.value,b.value),a.value.length-a.selectionEnd,b.value.length-b.selectionEnd);a.value.substring(d,a.value.length-e);let f=b.value.substring(d,b.value.length-e),g=a.selectionStart-d,h=a.selectionEnd-d;return b.selectionStart-d==b.selectionEnd-d?{text:f,replacePrevCharCnt:a.selectionStart-d,replaceNextCharCnt:0,positionDelta:0}:{text:f,replacePrevCharCnt:h-g,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(a,b){if(!a)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(a.value===b.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:b.selectionEnd-a.selectionEnd};let c=Math.min((0,a9.Qp)(a.value,b.value),a.selectionEnd),d=Math.min((0,a9.Vi)(a.value,b.value),a.value.length-a.selectionEnd),e=a.value.substring(c,a.value.length-d),f=b.value.substring(c,b.value.length-d);a.selectionStart;let g=a.selectionEnd-c;b.selectionStart;let h=b.selectionEnd-c;return{text:f,replacePrevCharCnt:g,replaceNextCharCnt:e.length-g,positionDelta:h-f.length}}static fromScreenReaderContentState(a){let b,c;switch(a.selection.getDirection()){case 0:b=a.selectionStart,c=a.selectionEnd;break;case 1:b=a.selectionEnd,c=a.selectionStart}return new bc(a.value,b,c,a.selection,a.newlineCountBeforeSelection)}}var bd=function(a,b){return function(c,d){b(c,d,a)}};(o||(o={})).Tap="-monaco-textarea-synthetic-tap";class be{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(a){let b={text:a=a||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=a.length,b}}let bf=class extends G.jG{get textAreaState(){return this._textAreaState}constructor(a,b,c,d,e,f){super(),this._host=a,this._textArea=b,this._OS=c,this._browser=d,this._accessibilityService=e,this._logService=f,this._onFocus=this._register(new F.vl),this.onFocus=this._onFocus.event,this._onBlur=this._register(new F.vl),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new F.vl),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new F.vl),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new F.vl),this.onCut=this._onCut.event,this._onPaste=this._register(new F.vl),this.onPaste=this._onPaste.event,this._onWillCopy=this._register(new F.vl),this.onWillCopy=this._onWillCopy.event,this._onWillCut=this._register(new F.vl),this.onWillCut=this._onWillCut.event,this._onWillPaste=this._register(new F.vl),this.onWillPaste=this._onWillPaste.event,this._onType=this._register(new F.vl),this.onType=this._onType.event,this._onCompositionStart=this._register(new F.vl),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new F.vl),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new F.vl),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new F.vl),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new G.HE),this._asyncTriggerCut=this._register(new aj.uC(()=>this._onCut.fire(),0)),this._textAreaState=bc.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(F.Jh.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=new aj.uC(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let g=null;this._register(this._textArea.onKeyDown(a=>{let b=new a8.Z(a);(114===b.keyCode||this._currentComposition&&1===b.keyCode)&&b.stopPropagation(),b.equals(9)&&b.preventDefault(),g=b,this._onKeyDown.fire(b)})),this._register(this._textArea.onKeyUp(a=>{let b=new a8.Z(a);this._onKeyUp.fire(b)})),this._register(this._textArea.onCompositionStart(a=>{let b=new be;if(this._currentComposition){this._currentComposition=b;return}if(this._currentComposition=b,2===this._OS&&g&&g.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===a.data&&("ArrowRight"===g.code||"ArrowLeft"===g.code)){b.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:a.data});return}this._browser.isAndroid,this._onCompositionStart.fire({data:a.data})})),this._register(this._textArea.onCompositionUpdate(a=>{let b=this._currentComposition;if(!b)return;if(this._browser.isAndroid){let b=bc.readFromTextArea(this._textArea,this._textAreaState),c=bc.deduceAndroidCompositionInput(this._textAreaState,b);this._textAreaState=b,this._onType.fire(c),this._onCompositionUpdate.fire(a);return}let c=b.handleCompositionUpdate(a.data);this._textAreaState=bc.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(c),this._onCompositionUpdate.fire(a)})),this._register(this._textArea.onCompositionEnd(a=>{let b=this._currentComposition;if(!b)return;if(this._currentComposition=null,this._browser.isAndroid){let a=bc.readFromTextArea(this._textArea,this._textAreaState),b=bc.deduceAndroidCompositionInput(this._textAreaState,a);this._textAreaState=a,this._onType.fire(b),this._onCompositionEnd.fire();return}let c=b.handleCompositionUpdate(a.data);this._textAreaState=bc.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(c),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(a=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;let b=bc.readFromTextArea(this._textArea,this._textAreaState),c=bc.deduceInput(this._textAreaState,b,2===this._OS);0===c.replacePrevCharCnt&&1===c.text.length&&((0,a9.pc)(c.text.charCodeAt(0))||127===c.text.charCodeAt(0))||(this._textAreaState=b,(""!==c.text||0!==c.replacePrevCharCnt||0!==c.replaceNextCharCnt||0!==c.positionDelta)&&("insertFromPaste"===a.inputType?this._onPaste.fire({text:c.text,metadata:bb.bs.INSTANCE.get(c.text)}):this._onType.fire(c)))})),this._register(this._textArea.onCut(a=>{this._logService.trace("TextAreaInput#onCut",a);let b=(0,bb.y)(a,!0,this._host.context,this._logService,this._browser.isFirefox);this._onWillCut.fire(b),b.isHandled||(this._textArea.setIgnoreSelectionChangeTime("received cut event"),b.ensureClipboardGetsEditorData(),this._asyncTriggerCut.schedule())})),this._register(this._textArea.onCopy(a=>{this._logService.trace("TextAreaInput#onCopy",a),bb.Eq.electronBugWorkaroundCopyEventHasFired=!0;let b=(0,bb.y)(a,!1,this._host.context,this._logService,this._browser.isFirefox);this._onWillCopy.fire(b),b.isHandled||b.ensureClipboardGetsEditorData()})),this._register(this._textArea.onPaste(a=>{this._logService.trace("TextAreaInput#onPaste",a);let b=(0,bb.wL)(a);this._onWillPaste.fire(b),b.isHandled||(this._textArea.setIgnoreSelectionChangeTime("received paste event"),a.preventDefault(),this._logService.trace("TextAreaInput#onPaste with id : ",b.metadata?.id," with text.length: ",b.text.length),b.text&&(this._logService.trace("TextAreaInput#onPaste (before onPaste)"),this._onPaste.fire({text:b.text,metadata:b.metadata})))})),this._register(this._textArea.onFocus(()=>{let a=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!a&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new aj.uC(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let a=0;return(0,D.ko)(this._textArea.ownerDocument,"selectionchange",b=>{if(m.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;let c=Date.now(),d=c-a;if(a=c,d<5)return;let e=c-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),e<100||!this._textAreaState.selection)return;let f=this._textArea.getValue();if(this._textAreaState.value!==f)return;let g=this._textArea.getSelectionStart(),h=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===g&&this._textAreaState.selectionEnd===h)return;let i=this._textAreaState.deduceEditorPosition(g),j=this._host.deduceModelPosition(i[0],i[1],i[2]),k=this._textAreaState.deduceEditorPosition(h),l=this._host.deduceModelPosition(k[0],k[1],k[2]),n=new aY.L(j.lineNumber,j.column,l.lineNumber,l.column);this._onSelectionChangeRequest.fire(n)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(a){this._hasFocus!==a&&(this._hasFocus=a,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(a,b){this._hasFocus||(b=b.collapseSelection()),b.isWrittenToTextArea(this._textArea,this._hasFocus)||this._logService.trace(`writeTextAreaState(reason: ${a})`),b.writeToTextArea(a,this._textArea,this._hasFocus),this._textAreaState=b}writeNativeTextAreaContent(a){(this._accessibilityService.isScreenReaderOptimized()||"render"!==a)&&!this._currentComposition&&this._setAndWriteTextAreaState(a,this._host.getScreenReaderContent())}};bf=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([bd(4,X.j),bd(5,ba.rr)],bf);class bg extends G.jG{get ownerDocument(){return this._actual.ownerDocument}constructor(a){super(),this._actual=a,this._onSyntheticTap=this._register(new F.vl),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this.onKeyDown=this._register(new a7.f(this._actual,"keydown")).event,this.onKeyPress=this._register(new a7.f(this._actual,"keypress")).event,this.onKeyUp=this._register(new a7.f(this._actual,"keyup")).event,this.onCompositionStart=this._register(new a7.f(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new a7.f(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new a7.f(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new a7.f(this._actual,"beforeinput")).event,this.onInput=this._register(new a7.f(this._actual,"input")).event,this.onCut=this._register(new a7.f(this._actual,"cut")).event,this.onCopy=this._register(new a7.f(this._actual,"copy")).event,this.onPaste=this._register(new a7.f(this._actual,"paste")).event,this.onFocus=this._register(new a7.f(this._actual,"focus")).event,this.onBlur=this._register(new a7.f(this._actual,"blur")).event,this._register(this.onKeyDown(()=>m.onKeyDown())),this._register(this.onBeforeInput(()=>m.onBeforeInput())),this._register(this.onInput(()=>m.onInput())),this._register(this.onKeyUp(()=>m.onKeyUp())),this._register((0,D.ko)(this._actual,o.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){let a=(0,D.jG)(this._actual);return a?a.activeElement===this._actual:!!this._actual.isConnected&&(0,D.bq)()===this._actual}setIgnoreSelectionChangeTime(a){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(a,b){let c=this._actual;c.value!==b&&(this.setIgnoreSelectionChangeTime("setValue"),c.value=b)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(a,b,c){let d=this._actual,e=null,f=(0,D.jG)(d);e=f?f.activeElement:(0,D.bq)();let g=(0,D.zk)(e),h=e===d,i=d.selectionStart,j=d.selectionEnd;if(h&&i===b&&j===c){J.gm&&g.parent!==g&&d.focus();return}if(h){this.setIgnoreSelectionChangeTime("setSelectionRange"),d.setSelectionRange(b,c),J.gm&&g.parent!==g&&d.focus();return}try{let a=(0,D.zK)(d);this.setIgnoreSelectionChangeTime("setSelectionRange"),d.focus(),d.setSelectionRange(b,c),(0,D.wk)(d,a)}catch(a){}}}class bh extends a4{constructor(a,b,c){super(a,b,c),this._register(aW.q.addTarget(this.viewHelper.linesContentDomNode)),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Tap,a=>this.onTap(a))),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Change,a=>this.onChange(a))),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Contextmenu,a=>this._onContextMenu(new at(a,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register((0,D.ko)(this.viewHelper.linesContentDomNode,"pointerdown",a=>{let b=a.pointerType;if("mouse"===b){this._lastPointerType="mouse";return}"touch"===b?this._lastPointerType="touch":this._lastPointerType="pen"}));const d=new av(this.viewHelper.viewDomNode);this._register(d.onPointerMove(this.viewHelper.viewDomNode,a=>this._onMouseMove(a))),this._register(d.onPointerUp(this.viewHelper.viewDomNode,a=>this._onMouseUp(a))),this._register(d.onPointerLeave(this.viewHelper.viewDomNode,a=>this._onMouseLeave(a))),this._register(d.onPointerDown(this.viewHelper.viewDomNode,(a,b)=>this._onMouseDown(a,b)))}onTap(a){a.initialTarget&&this.viewHelper.linesContentDomNode.contains(a.initialTarget)&&(a.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(a,!1))}onChange(a){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-a.translationX,-a.translationY),"pen"===this._lastPointerType&&this._dispatchGesture(a,!0)}_dispatchGesture(a,b){let c=this._createMouseTarget(new at(a,!1,this.viewHelper.viewDomNode),!1);c.position&&this.viewController.dispatchMouse({position:c.position,mouseColumn:c.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:a.tapCount,inSelectionMode:b,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===c.type&&null!==c.detail.injectedText})}_onMouseDown(a,b){"touch"!==a.browserEvent.pointerType&&super._onMouseDown(a,b)}}class bi extends a4{constructor(a,b,c){super(a,b,c),this._register(aW.q.addTarget(this.viewHelper.linesContentDomNode)),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Tap,a=>this.onTap(a))),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Change,a=>this.onChange(a))),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Contextmenu,a=>this._onContextMenu(new at(a,!1,this.viewHelper.viewDomNode),!1)))}onTap(a){a.preventDefault(),this.viewHelper.focusTextArea();let b=this._createMouseTarget(new at(a,!1,this.viewHelper.viewDomNode),!1);if(b.position){let a=document.createEvent("CustomEvent");a.initEvent(o.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(a),this.viewController.moveTo(b.position,1)}}onChange(a){this._context.viewModel.viewLayout.deltaScrollNow(-a.translationX,-a.translationY)}}class bj extends G.jG{constructor(a,b,c){super(),(M.un||M.m0&&M.Fr)&&aV.e.pointerEvents?this.handler=this._register(new bh(a,b,c)):aX.G.TouchEvent?this.handler=this._register(new bi(a,b,c)):this.handler=this._register(new a4(a,b,c))}getTargetAtClientPoint(a,b){return this.handler.getTargetAtClientPoint(a,b)}}var bk=c(51027),bl=c(24092);class bm{constructor(a,b,c,d){this.configuration=a,this.viewModel=b,this.userInputEvents=c,this.commandDelegate=d}paste(a,b,c,d){this.commandDelegate.paste(a,b,c,d)}type(a){this.commandDelegate.type(a)}compositionType(a,b,c,d){this.commandDelegate.compositionType(a,b,c,d)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(a){bl.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:a})}_validateViewColumn(a){let b=this.viewModel.getLineMinColumn(a.lineNumber);return a.column<b?new aD.y(a.lineNumber,b):a}_hasMulticursorModifier(a){switch(this.configuration.options.get(86)){case"altKey":return a.altKey;case"ctrlKey":return a.ctrlKey;case"metaKey":return a.metaKey;default:return!1}}_hasNonMulticursorModifier(a){switch(this.configuration.options.get(86)){case"altKey":return a.ctrlKey||a.metaKey;case"ctrlKey":return a.altKey||a.metaKey;case"metaKey":return a.ctrlKey||a.altKey;default:return!1}}static _trySelectBracketContent(a,b){if(b.column>1){let c=a.bracketPairs.matchBracket(b.with(void 0,b.column-1));if(c&&c[0].getEndPosition().equals(b))return aY.L.fromPositions(c[0].getEndPosition(),c[1].getStartPosition())}if(b.column<=a.getLineMaxColumn(b.lineNumber)){let c=a.bracketPairs.matchBracket(b);if(c&&c[1].getStartPosition().equals(b))return aY.L.fromPositions(c[0].getEndPosition(),c[1].getStartPosition())}}static _trySelectStringContent(a,b){let{lineNumber:c,column:d}=b,{tokenization:e}=a;if(!e.hasAccurateTokensForLine(c))if(!e.isCheapToTokenize(c))return;else e.forceTokenization(c);let f=e.getLineTokens(c),g=f.findTokenIndexAtOffset(d-1),h=g;for(;g>0&&2===f.getStandardTokenType(g-1);)g--;for(;h+1<f.getCount()&&2===f.getStandardTokenType(h+1);)h++;let i=f.getStartOffset(g),j=f.getEndOffset(h);if(d!==i+2&&d!==j)return;let k=a.getLineContent(c),l=k.charAt(i);if('"'!==l&&"'"!==l&&"`"!==l||k.charAt(j-1)!==l)return;let m=k.substring(i+1,j-1);if(!(0,a9.E_)(m))return new aY.L(c,i+2,c,j)}dispatchMouse(a){let b=this.configuration.options,c=M.j9&&b.get(121),d=b.get(28),e=b.get(171);if(a.middleButton&&!c)e||this._columnSelect(a.position,a.mouseColumn,a.inSelectionMode);else if(a.startedOnLineNumbers)this._hasMulticursorModifier(a)?a.inSelectionMode?this._lastCursorLineSelect(a.position,a.revealType):this._createCursor(a.position,!0):a.inSelectionMode?this._lineSelectDrag(a.position,a.revealType):this._lineSelect(a.position,a.revealType);else if(a.mouseDownCount>=4)this._selectAll();else if(3===a.mouseDownCount)this._hasMulticursorModifier(a)?a.inSelectionMode?this._lastCursorLineSelectDrag(a.position,a.revealType):this._lastCursorLineSelect(a.position,a.revealType):a.inSelectionMode?this._lineSelectDrag(a.position,a.revealType):this._lineSelect(a.position,a.revealType);else if(2===a.mouseDownCount){if(!a.onInjectedText)if(this._hasMulticursorModifier(a))this._lastCursorWordSelect(a.position,a.revealType);else if(a.inSelectionMode)this._wordSelectDrag(a.position,a.revealType);else{let c;if(b.get(173)){let b=this.viewModel.model,d=this._convertViewToModelPosition(a.position);c=bm._trySelectBracketContent(b,d)||bm._trySelectStringContent(b,d)}c?this._select(c):this._wordSelect(a.position,a.revealType)}}else this._hasMulticursorModifier(a)?this._hasNonMulticursorModifier(a)||(a.shiftKey?this._columnSelect(a.position,a.mouseColumn,!0):a.inSelectionMode?this._lastCursorMoveToSelect(a.position,a.revealType):this._createCursor(a.position,!1)):a.inSelectionMode?a.altKey||d?this._columnSelect(a.position,a.mouseColumn,!0):this._moveToSelect(a.position,a.revealType):this.moveTo(a.position,a.revealType)}_usualArgs(a,b){return a=this._validateViewColumn(a),{source:"mouse",position:this._convertViewToModelPosition(a),viewPosition:a,revealType:b}}moveTo(a,b){bl.QM.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_moveToSelect(a,b){bl.QM.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_columnSelect(a,b,c){a=this._validateViewColumn(a),bl.QM.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(a),viewPosition:a,mouseColumn:b,doColumnSelect:c})}_createCursor(a,b){a=this._validateViewColumn(a),bl.QM.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(a),viewPosition:a,wholeLine:b})}_lastCursorMoveToSelect(a,b){bl.QM.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_wordSelect(a,b){bl.QM.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_wordSelectDrag(a,b){bl.QM.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_lastCursorWordSelect(a,b){bl.QM.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_lineSelect(a,b){bl.QM.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_lineSelectDrag(a,b){bl.QM.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_lastCursorLineSelect(a,b){bl.QM.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_lastCursorLineSelectDrag(a,b){bl.QM.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_select(a){bl.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"mouse",selection:a})}_selectAll(){bl.QM.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(a){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(a)}emitKeyDown(a){this.userInputEvents.emitKeyDown(a)}emitKeyUp(a){this.userInputEvents.emitKeyUp(a)}emitContextMenu(a){this.userInputEvents.emitContextMenu(a)}emitMouseMove(a){this.userInputEvents.emitMouseMove(a)}emitMouseLeave(a){this.userInputEvents.emitMouseLeave(a)}emitMouseUp(a){this.userInputEvents.emitMouseUp(a)}emitMouseDown(a){this.userInputEvents.emitMouseDown(a)}emitMouseDrag(a){this.userInputEvents.emitMouseDrag(a)}emitMouseDrop(a){this.userInputEvents.emitMouseDrop(a)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(a){this.userInputEvents.emitMouseWheel(a)}}var bn=c(80544),bo=c(50411);class bp{constructor(a){this._lineFactory=a,this._set(1,[])}flush(){this._set(1,[])}_set(a,b){this._lines=b,this._rendLineNumberStart=a}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(a){let b=a-this._rendLineNumberStart;if(b<0||b>=this._lines.length)throw new E.D7("Illegal value for lineNumber");return this._lines[b]}onLinesDeleted(a,b){if(0===this.getCount())return null;let c=this.getStartLineNumber(),d=this.getEndLineNumber();if(b<c)return this._rendLineNumberStart-=b-a+1,null;if(a>d)return null;let e=0,f=0;for(let g=c;g<=d;g++){let c=g-this._rendLineNumberStart;a<=g&&g<=b&&(0===f?(e=c,f=1):f++)}if(a<c){let d=0;d=b<c?b-a+1:c-a,this._rendLineNumberStart-=d}return this._lines.splice(e,f)}onLinesChanged(a,b){let c=a+b-1;if(0===this.getCount())return!1;let d=this.getStartLineNumber(),e=this.getEndLineNumber(),f=!1;for(let b=a;b<=c;b++)b>=d&&b<=e&&(this._lines[b-this._rendLineNumberStart].onContentChanged(),f=!0);return f}onLinesInserted(a,b){if(0===this.getCount())return null;let c=b-a+1,d=this.getStartLineNumber(),e=this.getEndLineNumber();if(a<=d)return this._rendLineNumberStart+=c,null;if(a>e)return null;if(c+a>e)return this._lines.splice(a-this._rendLineNumberStart,e-a+1);let f=[];for(let a=0;a<c;a++)f[a]=this._lineFactory.createLine();let g=a-this._rendLineNumberStart,h=this._lines.slice(0,g),i=this._lines.slice(g,this._lines.length-c),j=this._lines.slice(this._lines.length-c,this._lines.length);return this._lines=h.concat(f).concat(i),j}onTokensChanged(a){if(0===this.getCount())return!1;let b=this.getStartLineNumber(),c=this.getEndLineNumber(),d=!1;for(let e=0,f=a.length;e<f;e++){let f=a[e];if(f.toLineNumber<b||f.fromLineNumber>c)continue;let g=Math.max(b,f.fromLineNumber),h=Math.min(c,f.toLineNumber);for(let a=g;a<=h;a++){let b=a-this._rendLineNumberStart;this._lines[b].onTokensChanged(),d=!0}}return d}}class bq{constructor(a,b){this._viewContext=a,this._lineFactory=b,this.domNode=this._createDomNode(),this._linesCollection=new bp(this._lineFactory)}_createDomNode(){let a=(0,ae.Z)(document.createElement("div"));return a.setClassName("view-layer"),a.setPosition("absolute"),a.domNode.setAttribute("role","presentation"),a.domNode.setAttribute("aria-hidden","true"),a}onConfigurationChanged(a){return!!a.hasChanged(165)}onFlushed(a,b){if(b){let a=this._linesCollection.getStartLineNumber(),b=this._linesCollection.getEndLineNumber();for(let c=a;c<=b;c++)this._linesCollection.getLine(c).getDomNode()?.remove()}return this._linesCollection.flush(),!0}onLinesChanged(a){return this._linesCollection.onLinesChanged(a.fromLineNumber,a.count)}onLinesDeleted(a){let b=this._linesCollection.onLinesDeleted(a.fromLineNumber,a.toLineNumber);if(b)for(let a=0,c=b.length;a<c;a++){let c=b[a].getDomNode();c?.remove()}return!0}onLinesInserted(a){let b=this._linesCollection.onLinesInserted(a.fromLineNumber,a.toLineNumber);if(b)for(let a=0,c=b.length;a<c;a++){let c=b[a].getDomNode();c?.remove()}return!0}onScrollChanged(a){return a.scrollTopChanged}onTokensChanged(a){return this._linesCollection.onTokensChanged(a.ranges)}onZonesChanged(a){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(a){return this._linesCollection.getLine(a)}renderLines(a){let b=this._linesCollection._get(),c=new br(this.domNode.domNode,this._lineFactory,a,this._viewContext),d={rendLineNumberStart:b.rendLineNumberStart,lines:b.lines,linesLength:b.lines.length},e=c.render(d,a.startLineNumber,a.endLineNumber,a.relativeVerticalOffset);this._linesCollection._set(e.rendLineNumberStart,e.lines)}}class br{static{this._ttPolicy=(0,bn.H)("editorViewLayer",{createHTML:a=>a})}constructor(a,b,c,d){this._domNode=a,this._lineFactory=b,this._viewportData=c,this._viewContext=d}render(a,b,c,d){let e={rendLineNumberStart:a.rendLineNumberStart,lines:a.lines.slice(0),linesLength:a.linesLength};if(e.rendLineNumberStart+e.linesLength-1<b||c<e.rendLineNumberStart){e.rendLineNumberStart=b,e.linesLength=c-b+1,e.lines=[];for(let a=b;a<=c;a++)e.lines[a-b]=this._lineFactory.createLine();return this._finishRendering(e,!0,d),e}if(this._renderUntouchedLines(e,Math.max(b-e.rendLineNumberStart,0),Math.min(c-e.rendLineNumberStart,e.linesLength-1),d,b),e.rendLineNumberStart>b){let a=Math.min(c,e.rendLineNumberStart-1);b<=a&&(this._insertLinesBefore(e,b,a,d,b),e.linesLength+=a-b+1)}else if(e.rendLineNumberStart<b){let a=Math.min(e.linesLength,b-e.rendLineNumberStart);a>0&&(this._removeLinesBefore(e,a),e.linesLength-=a)}if(e.rendLineNumberStart=b,e.rendLineNumberStart+e.linesLength-1<c){let a=e.rendLineNumberStart+e.linesLength;a<=c&&(this._insertLinesAfter(e,a,c,d,b),e.linesLength+=c-a+1)}else if(e.rendLineNumberStart+e.linesLength-1>c){let a=Math.max(0,c-e.rendLineNumberStart+1),b=e.linesLength-1-a+1;b>0&&(this._removeLinesAfter(e,b),e.linesLength-=b)}return this._finishRendering(e,!1,d),e}_renderUntouchedLines(a,b,c,d,e){let f=a.rendLineNumberStart,g=a.lines;for(let a=b;a<=c;a++){let b=f+a;g[a].layoutLine(b,d[b-e],this._lineHeightForLineNumber(b))}}_insertLinesBefore(a,b,c,d,e){let f=[],g=0;for(let a=b;a<=c;a++)f[g++]=this._lineFactory.createLine();a.lines=f.concat(a.lines)}_removeLinesBefore(a,b){for(let c=0;c<b;c++){let b=a.lines[c].getDomNode();b?.remove()}a.lines.splice(0,b)}_insertLinesAfter(a,b,c,d,e){let f=[],g=0;for(let a=b;a<=c;a++)f[g++]=this._lineFactory.createLine();a.lines=a.lines.concat(f)}_removeLinesAfter(a,b){let c=a.linesLength-b;for(let d=0;d<b;d++){let b=a.lines[c+d].getDomNode();b?.remove()}a.lines.splice(c,b)}_finishRenderingNewLines(a,b,c,d){br._ttPolicy&&(c=br._ttPolicy.createHTML(c));let e=this._domNode.lastChild;b||!e?this._domNode.innerHTML=c:e.insertAdjacentHTML("afterend",c);let f=this._domNode.lastChild;for(let b=a.linesLength-1;b>=0;b--){let c=a.lines[b];d[b]&&(c.setDomNode(f),f=f.previousSibling)}}_finishRenderingInvalidLines(a,b,c){let d=document.createElement("div");br._ttPolicy&&(b=br._ttPolicy.createHTML(b)),d.innerHTML=b;for(let b=0;b<a.linesLength;b++){let e=a.lines[b];if(c[b]){let a=d.firstChild;e.getDomNode().replaceWith(a),e.setDomNode(a)}}}static{this._sb=new bo.fe(1e5)}_finishRendering(a,b,c){let d=br._sb,e=a.linesLength,f=a.lines,g=a.rendLineNumberStart,h=[];{d.reset();let i=!1;for(let a=0;a<e;a++){let b=f[a];if(h[a]=!1,b.getDomNode())continue;let e=a+g;b.renderLine(e,c[a],this._lineHeightForLineNumber(e),this._viewportData,d)&&(h[a]=!0,i=!0)}i&&this._finishRenderingNewLines(a,b,d.build(),h)}{d.reset();let b=!1,i=[];for(let a=0;a<e;a++){let e=f[a];if(i[a]=!1,h[a])continue;let j=a+g;e.renderLine(j,c[a],this._lineHeightForLineNumber(j),this._viewportData,d)&&(i[a]=!0,b=!0)}b&&this._finishRenderingInvalidLines(a,d.build(),i)}}_lineHeightForLineNumber(a){return this._viewContext.viewLayout.getLineHeightForLineNumber(a)}}class bs extends aA{constructor(a){super(a),this._dynamicOverlays=[],this._isFocused=!1,this._visibleLines=new bq(this._context,{createLine:()=>new bt(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;const b=this._context.configuration.options.get(59);(0,I.M)(this.domNode,b),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let a=0,b=this._dynamicOverlays.length;a<b;a++)if(this._dynamicOverlays[a].shouldRender())return!0;return!1}dispose(){super.dispose();for(let a=0,b=this._dynamicOverlays.length;a<b;a++)this._dynamicOverlays[a].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}addDynamicOverlay(a){this._dynamicOverlays.push(a)}onConfigurationChanged(a){this._visibleLines.onConfigurationChanged(a);let b=this._context.configuration.options.get(59);return(0,I.M)(this.domNode,b),!0}onFlushed(a){return this._visibleLines.onFlushed(a)}onFocusChanged(a){return this._isFocused=a.isFocused,!0}onLinesChanged(a){return this._visibleLines.onLinesChanged(a)}onLinesDeleted(a){return this._visibleLines.onLinesDeleted(a)}onLinesInserted(a){return this._visibleLines.onLinesInserted(a)}onScrollChanged(a){return this._visibleLines.onScrollChanged(a)||!0}onTokensChanged(a){return this._visibleLines.onTokensChanged(a)}onZonesChanged(a){return this._visibleLines.onZonesChanged(a)}prepareRender(a){let b=this._dynamicOverlays.filter(a=>a.shouldRender());for(let c=0,d=b.length;c<d;c++){let d=b[c];d.prepareRender(a),d.onDidRender()}}render(a){this._viewOverlaysRender(a),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(a){this._visibleLines.renderLines(a.viewportData)}}class bt{constructor(a){this._dynamicOverlays=a,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(a){this._domNode=(0,ae.Z)(a)}onContentChanged(){}onTokensChanged(){}renderLine(a,b,c,d,e){let f="";for(let b=0,c=this._dynamicOverlays.length;b<c;b++)f+=this._dynamicOverlays[b].render(d.startLineNumber,a);return this._renderedContent!==f&&(this._renderedContent=f,e.appendString('<div style="top:'),e.appendString(String(b)),e.appendString("px;height:"),e.appendString(String(c)),e.appendString("px;line-height:"),e.appendString(String(c)),e.appendString('px;">'),e.appendString(f),e.appendString("</div>"),!0)}layoutLine(a,b,c){this._domNode&&(this._domNode.setTop(b),this._domNode.setHeight(c),this._domNode.setLineHeight(c))}}class bu extends bs{constructor(a){super(a);const b=this._context.configuration.options.get(165);this._contentWidth=b.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(a){let b=this._context.configuration.options.get(165);return this._contentWidth=b.contentWidth,super.onConfigurationChanged(a)||!0}onScrollChanged(a){return super.onScrollChanged(a)||a.scrollWidthChanged}_viewOverlaysRender(a){super._viewOverlaysRender(a),this.domNode.setWidth(Math.max(a.scrollWidth,this._contentWidth))}}class bv extends bs{constructor(a){super(a);const b=this._context.configuration.options,c=b.get(165);this._contentLeft=c.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,I.M)(this.domNode,b.get(59))}onConfigurationChanged(a){let b=this._context.configuration.options;(0,I.M)(this.domNode,b.get(59));let c=b.get(165);return this._contentLeft=c.contentLeft,super.onConfigurationChanged(a)||!0}onScrollChanged(a){return super.onScrollChanged(a)||a.scrollHeightChanged}_viewOverlaysRender(a){super._viewOverlaysRender(a);let b=Math.min(a.scrollHeight,1e6);this.domNode.setHeight(b),this.domNode.setWidth(this._contentLeft)}}class bw{constructor(a){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=a}emitKeyDown(a){this.onKeyDown?.(a)}emitKeyUp(a){this.onKeyUp?.(a)}emitContextMenu(a){this.onContextMenu?.(this._convertViewToModelMouseEvent(a))}emitMouseMove(a){this.onMouseMove?.(this._convertViewToModelMouseEvent(a))}emitMouseLeave(a){this.onMouseLeave?.(this._convertViewToModelMouseEvent(a))}emitMouseDown(a){this.onMouseDown?.(this._convertViewToModelMouseEvent(a))}emitMouseUp(a){this.onMouseUp?.(this._convertViewToModelMouseEvent(a))}emitMouseDrag(a){this.onMouseDrag?.(this._convertViewToModelMouseEvent(a))}emitMouseDrop(a){this.onMouseDrop?.(this._convertViewToModelMouseEvent(a))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(a){this.onMouseWheel?.(a)}_convertViewToModelMouseEvent(a){return a.target?{event:a.event,target:this._convertViewToModelMouseTarget(a.target)}:a}_convertViewToModelMouseTarget(a){return bw.convertViewToModelMouseTarget(a,this._coordinatesConverter)}static convertViewToModelMouseTarget(a,b){let c={...a};return c.position&&(c.position=b.convertViewPositionToModelPosition(c.position)),c.range&&(c.range=b.convertViewRangeToModelRange(c.range)),(5===c.type||8===c.type)&&(c.detail=this.convertViewToModelViewZoneData(c.detail,b)),c}static convertViewToModelViewZoneData(a,b){return{viewZoneId:a.viewZoneId,positionBefore:a.positionBefore?b.convertViewPositionToModelPosition(a.positionBefore):a.positionBefore,positionAfter:a.positionAfter?b.convertViewPositionToModelPosition(a.positionAfter):a.positionAfter,position:b.convertViewPositionToModelPosition(a.position),afterLineNumber:b.convertViewPositionToModelPosition(new aD.y(a.afterLineNumber,1)).lineNumber}}}c(81562);class bx extends aA{constructor(a){super(a),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,ae.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let a=!1,b=this._context.configuration.options.get(165),c=b.contentWidth-b.verticalScrollbarWidth;this.contentWidth!==c&&(this.contentWidth=c,a=!0);let d=b.contentLeft;return this.contentLeft!==d&&(this.contentLeft=d,a=!0),a}onConfigurationChanged(a){return this.update()}onScrollChanged(a){return a.scrollTopChanged||a.scrollLeftChanged}onDecorationsChanged(a){return!0}onZonesChanged(a){return!0}prepareRender(a){}render(a){let b=0;for(let c of a.getDecorationsInViewport()){let d,e;if(!c.options.blockClassName)continue;let f=this.blocks[b];f||(f=this.blocks[b]=(0,ae.Z)(document.createElement("div")),this.domNode.appendChild(f)),c.options.blockIsAfterEnd?(d=a.getVerticalOffsetAfterLineNumber(c.range.endLineNumber,!1),e=a.getVerticalOffsetAfterLineNumber(c.range.endLineNumber,!0)):(d=a.getVerticalOffsetForLineNumber(c.range.startLineNumber,!0),e=c.range.isEmpty()&&!c.options.blockDoesNotCollapse?a.getVerticalOffsetForLineNumber(c.range.startLineNumber,!1):a.getVerticalOffsetAfterLineNumber(c.range.endLineNumber,!0));let[g,h,i,j]=c.options.blockPadding??[0,0,0,0];f.setClassName("blockDecorations-block "+c.options.blockClassName),f.setLeft(this.contentLeft-j),f.setWidth(this.contentWidth+j+h),f.setTop(d-a.scrollTop-g),f.setHeight(e-d+g+i),b++}for(let a=b;a<this.blocks.length;a++)this.blocks[a].domNode.remove();this.blocks.length=b}}class by extends aA{constructor(a,b){super(a),this._viewDomNode=b,this._widgets={},this.domNode=(0,ae.Z)(document.createElement("div")),aB.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,ae.Z)(document.createElement("div")),aB.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(a){for(let b of Object.keys(this._widgets))this._widgets[b].onConfigurationChanged(a);return!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLineMappingChanged(a){return this._updateAnchorsViewPositions(),!0}onLinesChanged(a){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(a){return this._updateAnchorsViewPositions(),!0}onLinesInserted(a){return this._updateAnchorsViewPositions(),!0}onScrollChanged(a){return!0}onZonesChanged(a){return!0}_updateAnchorsViewPositions(){for(let a of Object.keys(this._widgets))this._widgets[a].updateAnchorViewPosition()}addWidget(a){let b=new bz(this._context,this._viewDomNode,a);this._widgets[b.id]=b,b.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(b.domNode):this.domNode.appendChild(b.domNode),this.setShouldRender()}setWidgetPosition(a,b,c,d,e){let f=this._widgets[a.getId()];f.setPosition(b,c,d,e),f.useDisplayNone||this.setShouldRender()}removeWidget(a){let b=a.getId();if(this._widgets.hasOwnProperty(b)){let a=this._widgets[b];delete this._widgets[b];let c=a.domNode.domNode;c.remove(),c.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(a){return!!this._widgets.hasOwnProperty(a)&&this._widgets[a].suppressMouseDown}onBeforeRender(a){for(let b of Object.keys(this._widgets))this._widgets[b].onBeforeRender(a)}prepareRender(a){for(let b of Object.keys(this._widgets))this._widgets[b].prepareRender(a)}render(a){for(let b of Object.keys(this._widgets))this._widgets[b].render(a)}}class bz{constructor(a,b,c){this._primaryAnchor=new bA(null,null),this._secondaryAnchor=new bA(null,null),this._context=a,this._viewDomNode=b,this._actual=c;const d=this._context.configuration.options,e=d.get(165),f=d.get(4);this.domNode=(0,ae.Z)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=(this._actual.allowEditorOverflow||!1)&&f,this.suppressMouseDown=this._actual.suppressMouseDown||!1,this.useDisplayNone=this._actual.useDisplayNone||!1,this._fixedOverflowWidgets=d.get(51),this._contentWidth=e.contentWidth,this._contentLeft=e.contentLeft,this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(a){let b=this._context.configuration.options;if(a.hasChanged(165)){let a=b.get(165);this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(a,b,c){function d(a,b,c){if(!a)return new bA(null,null);let d=b.model.validatePosition(a);return b.coordinatesConverter.modelPositionIsVisible(d)?new bA(a,b.coordinatesConverter.convertModelPositionToViewPosition(d,c??void 0)):new bA(a,null)}this._affinity=a,this._primaryAnchor=d(b,this._context.viewModel,this._affinity),this._secondaryAnchor=d(c,this._context.viewModel,this._affinity)}_getMaxWidth(){let a=this.domNode.domNode.ownerDocument,b=a.defaultView;return this.allowEditorOverflow?b?.innerWidth||a.documentElement.offsetWidth||a.body.offsetWidth:this._contentWidth}setPosition(a,b,c,d){this._setPosition(d,a,b),this._preference=c,!this.useDisplayNone&&this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(a,b,c,d){let e=a.top,f=a.top+a.height,g=d.viewportHeight-f,h=a.left;return h+b>d.scrollLeft+d.viewportWidth&&(h=d.scrollLeft+d.viewportWidth-b),h<d.scrollLeft&&(h=d.scrollLeft),{fitsAbove:e>=c,aboveTop:e-c,fitsBelow:g>=c,belowTop:f,left:h}}_layoutHorizontalSegmentInPage(a,b,c,d){let e=Math.max(15,b.left-d),f=Math.min(b.left+b.width+d,a.width-15),g=this._viewDomNode.domNode.ownerDocument.defaultView,h=b.left+c-(g?.scrollX??0);if(h+d>f){let a=h-(f-d);h-=a,c-=a}if(h<e){let a=h-e;h-=a,c-=a}return[c,h]}_layoutBoxInPage(a,b,c,d){let e=a.top-c,f=a.top+a.height,g=(0,D.BK)(this._viewDomNode.domNode),h=this._viewDomNode.domNode.ownerDocument,i=h.defaultView,j=g.top+e-(i?.scrollY??0),k=g.top+f-(i?.scrollY??0),l=(0,D.tG)(h.body),[m,n]=this._layoutHorizontalSegmentInPage(l,g,a.left-d.scrollLeft+this._contentLeft,b),o=j>=22,p=k+c<=l.height-22;return this._fixedOverflowWidgets?{fitsAbove:o,aboveTop:Math.max(j,22),fitsBelow:p,belowTop:k,left:n}:{fitsAbove:o,aboveTop:e,fitsBelow:p,belowTop:f,left:m}}_prepareRenderWidgetAtExactPositionOverflowing(a){return new bB(a.top,a.left+this._contentLeft)}_getAnchorsCoordinates(a){return{primary:b(this._primaryAnchor.viewPosition,this._affinity),secondary:b(this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,this._affinity)};function b(b,c){if(!b)return null;let d=a.visibleRangeForPosition(b);if(!d)return null;let e=1===b.column&&3===c?0:d.left;return new bC(a.getVerticalOffsetForLineNumber(b.lineNumber)-a.scrollTop,e,a.getLineHeightForLineNumber(b.lineNumber))}}_reduceAnchorCoordinates(a,b,c){if(!b)return a;let d=this._context.configuration.options.get(59),e=b.left;return e=e<a.left?Math.max(e,a.left-c+d.typicalFullwidthCharacterWidth):Math.min(e,a.left+c-d.typicalFullwidthCharacterWidth),new bC(a.top,e,a.height)}_prepareRenderWidget(a){let b;if(!this._preference||0===this._preference.length)return null;let{primary:c,secondary:d}=this._getAnchorsCoordinates(a);if(!c)return{kind:"offViewport",preserveFocus:this.domNode.domNode.contains(this.domNode.domNode.ownerDocument.activeElement)};if(-1===this._cachedDomNodeOffsetWidth||-1===this._cachedDomNodeOffsetHeight){let a=null;if("function"==typeof this._actual.beforeRender&&(a=bD(this._actual.beforeRender,this._actual)),a)this._cachedDomNodeOffsetWidth=a.width,this._cachedDomNodeOffsetHeight=a.height;else{let a=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(a.width),this._cachedDomNodeOffsetHeight=Math.round(a.height)}}let e=this._reduceAnchorCoordinates(c,d,this._cachedDomNodeOffsetWidth);b=this.allowEditorOverflow?this._layoutBoxInPage(e,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,a):this._layoutBoxInViewport(e,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,a);for(let a=1;a<=2;a++)for(let c of this._preference)if(1===c){if(!b)return null;if(2===a||b.fitsAbove)return{kind:"inViewport",coordinate:new bB(b.aboveTop,b.left),position:1}}else if(2===c){if(!b)return null;if(2===a||b.fitsBelow)return{kind:"inViewport",coordinate:new bB(b.belowTop,b.left),position:2}}else if(this.allowEditorOverflow)return{kind:"inViewport",coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new bB(e.top,e.left)),position:0};else return{kind:"inViewport",coordinate:new bB(e.top,e.left),position:0};return null}onBeforeRender(a){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<a.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>a.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(a){this._renderData=this._prepareRenderWidget(a)}render(a){if(!this._renderData||"offViewport"===this._renderData.kind){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this._renderData?.kind==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),"function"==typeof this._actual.afterRender&&bD(this._actual.afterRender,this._actual,null,null);return}this.allowEditorOverflow?this.domNode.setTop(this._renderData.coordinate.top):this.domNode.setTop(this._renderData.coordinate.top+a.scrollTop-a.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&bD(this._actual.afterRender,this._actual,this._renderData.position,this._renderData.coordinate)}}class bA{constructor(a,b){this.modelPosition=a,this.viewPosition=b}}class bB{constructor(a,b){this.top=a,this.left=b,this._coordinateBrand=void 0}}class bC{constructor(a,b,c){this.top=a,this.left=b,this.height=c,this._anchorCoordinateBrand=void 0}}function bD(a,b,...c){try{return a.call(b,...c)}catch{return null}}c(30256);class bE extends az{}var bF=c(39924),bG=c(46547),bH=c(98030);class bI extends bE{constructor(a){super(),this._context=a;const b=this._context.configuration.options,c=b.get(165);this._renderLineHighlight=b.get(110),this._renderLineHighlightOnlyWhenFocus=b.get(111),this._wordWrap=c.isViewportWrapping,this._contentLeft=c.contentLeft,this._contentWidth=c.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new aY.L(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let a=!1,b=new Set;for(let a of this._selections)b.add(a.positionLineNumber);let c=Array.from(b);c.sort((a,b)=>a-b),(0,K.aI)(this._cursorLineNumbers,c)||(this._cursorLineNumbers=c,a=!0);let d=this._selections.every(a=>a.isEmpty());return this._selectionIsEmpty!==d&&(this._selectionIsEmpty=d,a=!0),a}onThemeChanged(a){return this._readFromSelections()}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(165);return this._renderLineHighlight=b.get(110),this._renderLineHighlightOnlyWhenFocus=b.get(111),this._wordWrap=c.isViewportWrapping,this._contentLeft=c.contentLeft,this._contentWidth=c.contentWidth,!0}onCursorStateChanged(a){return this._selections=a.selections,this._readFromSelections()}onFlushed(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollWidthChanged||a.scrollTopChanged}onZonesChanged(a){return!0}onFocusChanged(a){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=a.isFocused,!0)}prepareRender(a){if(!this._shouldRenderThis()){this._renderData=null;return}let b=a.visibleRange.startLineNumber,c=a.visibleRange.endLineNumber,d=[];for(let a=b;a<=c;a++)d[a-b]="";if(this._wordWrap){let e=this._renderOne(a,!1);for(let a of this._cursorLineNumbers){let f=this._context.viewModel.coordinatesConverter,g=f.convertViewPositionToModelPosition(new aD.y(a,1)).lineNumber,h=f.convertModelPositionToViewPosition(new aD.y(g,1)).lineNumber,i=f.convertModelPositionToViewPosition(new aD.y(g,this._context.viewModel.model.getLineMaxColumn(g))).lineNumber,j=Math.max(h,b),k=Math.min(i,c);for(let a=j;a<=k;a++)d[a-b]=e}}let e=this._renderOne(a,!0);for(let a of this._cursorLineNumbers)a<b||a>c||(d[a-b]=e);this._renderData=d}render(a,b){if(!this._renderData)return"";let c=b-a;return c>=this._renderData.length?"":this._renderData[c]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class bJ extends bI{_renderOne(a,b){let c="current-line"+(this._shouldRenderInMargin()?" current-line-both":"")+(b?" current-line-exact":"");return`<div class="${c}" style="width:${Math.max(a.scrollWidth,this._contentWidth)}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class bK extends bI{_renderOne(a,b){let c="current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")+(this._shouldRenderInMargin()&&b?" current-line-exact-margin":"");return`<div class="${c}" style="width:${this._contentLeft}px"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,bG.zy)((a,b)=>{let c=a.getColor(bF.kG),d=a.getColor(bF.xU);if(c&&(b.addRule(`.monaco-editor.focused .view-overlays .current-line { background-color: ${c}; }`),b.addRule(`.monaco-editor.focused .margin-view-overlays .current-line-margin { background-color: ${c}; border: none; }`)),d&&(b.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${d}; }`),b.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${d}; border: none; }`)),!c||c.isTransparent()||a.defines(bF.Mf)){let c=a.getColor(bF.Mf);c&&(b.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${c}; }`),b.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${c}; }`),(0,bH.Bb)(a.type)&&(b.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),b.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}}),c(41928);class bL extends bE{constructor(a){super(),this._context=a;const b=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){let b=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged||a.scrollWidthChanged}onZonesChanged(a){return!0}prepareRender(a){let b=a.getDecorationsInViewport(),c=[],d=0;for(let a=0,e=b.length;a<e;a++){let e=b[a];e.options.className&&(c[d++]=e)}c=c.sort((a,b)=>{if(a.options.zIndex<b.options.zIndex)return -1;if(a.options.zIndex>b.options.zIndex)return 1;let c=a.options.className,d=b.options.className;return c<d?-1:c>d?1:aE.Q.compareRangesUsingStarts(a.range,b.range)});let e=a.visibleRange.startLineNumber,f=a.visibleRange.endLineNumber,g=[];for(let a=e;a<=f;a++)g[a-e]="";this._renderWholeLineDecorations(a,c,g),this._renderNormalDecorations(a,c,g),this._renderResult=g}_renderWholeLineDecorations(a,b,c){let d=a.visibleRange.startLineNumber,e=a.visibleRange.endLineNumber;for(let a=0,f=b.length;a<f;a++){let f=b[a];if(!f.options.isWholeLine)continue;let g='<div class="cdr '+f.options.className+'" style="left:0;width:100%;"></div>',h=Math.max(f.range.startLineNumber,d),i=Math.min(f.range.endLineNumber,e);for(let a=h;a<=i;a++){let b=a-d;c[b]+=g}}}_renderNormalDecorations(a,b,c){let d=a.visibleRange.startLineNumber,e=null,f=!1,g=null,h=!1;for(let i=0,j=b.length;i<j;i++){let j=b[i];if(j.options.isWholeLine)continue;let k=j.options.className,l=!!j.options.showIfCollapsed,m=j.range;if(l&&1===m.endColumn&&m.endLineNumber!==m.startLineNumber&&(m=new aE.Q(m.startLineNumber,m.startColumn,m.endLineNumber-1,this._context.viewModel.getLineMaxColumn(m.endLineNumber-1))),e===k&&f===l&&aE.Q.areIntersectingOrTouching(g,m)){g=aE.Q.plusRange(g,m);continue}null!==e&&this._renderNormalDecoration(a,g,e,h,f,d,c),e=k,f=l,g=m,h=j.options.shouldFillLineOnLineBreak??!1}null!==e&&this._renderNormalDecoration(a,g,e,h,f,d,c)}_renderNormalDecoration(a,b,c,d,e,f,g){let h=a.linesVisibleRangesForRange(b,"findMatch"===c);if(h)for(let a=0,b=h.length;a<b;a++){let b=h[a];if(b.outsideRenderedLine)continue;let i=b.lineNumber-f;if(e&&1===b.ranges.length){let a=b.ranges[0];if(a.width<this._typicalHalfwidthCharacterWidth){let c=Math.max(0,Math.round(Math.round(a.left+a.width/2)-this._typicalHalfwidthCharacterWidth/2));b.ranges[0]=new bk.Y(c,this._typicalHalfwidthCharacterWidth)}}for(let a=0,e=b.ranges.length;a<e;a++){let f=d&&b.continuesOnNextLine&&1===e,h=b.ranges[a],j='<div class="cdr '+c+'" style="left:'+String(h.left)+"px;width:"+(f?"100%;":String(h.width)+"px;")+'"></div>';g[i]+=j}}}render(a,b){if(!this._renderResult)return"";let c=b-a;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}class bM extends aA{constructor(a,b,c,d){super(a);const e=this._context.configuration.options,f=e.get(117),g=e.get(83),h=e.get(49),i=e.get(120),j=e.get(158),k={listenOnDomNode:c.domNode,className:"editor-scrollable "+(0,bG.Pz)(a.theme.type),useShadows:!1,lazyRender:!0,vertical:f.vertical,horizontal:f.horizontal,verticalHasArrows:f.verticalHasArrows,horizontalHasArrows:f.horizontalHasArrows,verticalScrollbarSize:f.verticalScrollbarSize,verticalSliderSize:f.verticalSliderSize,horizontalScrollbarSize:f.horizontalScrollbarSize,horizontalSliderSize:f.horizontalSliderSize,handleMouseWheel:f.handleMouseWheel,alwaysConsumeMouseWheel:f.alwaysConsumeMouseWheel,arrowSize:f.arrowSize,mouseWheelScrollSensitivity:g,fastScrollSensitivity:h,scrollPredominantAxis:i,scrollByPage:f.scrollByPage,inertialScroll:j};this.scrollbar=this._register(new aZ.oO(b.domNode,k,this._context.viewLayout.getScrollable())),aB.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=(0,ae.Z)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const l=(a,b,c)=>{let d={};{let b=a.scrollTop;b&&(d.scrollTop=this._context.viewLayout.getCurrentScrollTop()+b,a.scrollTop=0)}if(c){let b=a.scrollLeft;b&&(d.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+b,a.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(d,1)};this._register((0,D.ko)(c.domNode,"scroll",a=>l(c.domNode,!0,!0))),this._register((0,D.ko)(b.domNode,"scroll",a=>l(b.domNode,!0,!1))),this._register((0,D.ko)(d.domNode,"scroll",a=>l(d.domNode,!0,!1))),this._register((0,D.ko)(this.scrollbarDomNode.domNode,"scroll",a=>l(this.scrollbarDomNode.domNode,!0,!1)))}_setLayout(){let a=this._context.configuration.options,b=a.get(165);this.scrollbarDomNode.setLeft(b.contentLeft),"right"===a.get(81).side?this.scrollbarDomNode.setWidth(b.contentWidth+b.minimap.minimapWidth):this.scrollbarDomNode.setWidth(b.contentWidth),this.scrollbarDomNode.setHeight(b.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(a){this.scrollbar.delegateVerticalScrollbarPointerDown(a)}delegateScrollFromMouseWheelEvent(a){this.scrollbar.delegateScrollFromMouseWheelEvent(a)}onConfigurationChanged(a){if(a.hasChanged(117)||a.hasChanged(83)||a.hasChanged(49)){let a=this._context.configuration.options,b=a.get(117),c=a.get(83),d=a.get(49),e=a.get(120),f={vertical:b.vertical,horizontal:b.horizontal,verticalScrollbarSize:b.verticalScrollbarSize,horizontalScrollbarSize:b.horizontalScrollbarSize,scrollByPage:b.scrollByPage,handleMouseWheel:b.handleMouseWheel,mouseWheelScrollSensitivity:c,fastScrollSensitivity:d,scrollPredominantAxis:e};this.scrollbar.updateOptions(f)}return a.hasChanged(165)&&this._setLayout(),!0}onScrollChanged(a){return!0}onThemeChanged(a){return this.scrollbar.updateClassName("editor-scrollable "+(0,bG.Pz)(this._context.theme.type)),!0}prepareRender(a){}render(a){this.scrollbar.renderNow()}}c(22300);class bN{constructor(a,b,c,d,e){this.startLineNumber=a,this.endLineNumber=b,this.className=c,this.tooltip=d,this._decorationToRenderBrand=void 0,this.zIndex=e??0}}class bO{constructor(a,b,c){this.className=a,this.zIndex=b,this.tooltip=c}}class bP{constructor(){this.decorations=[]}add(a){this.decorations.push(a)}getDecorations(){return this.decorations}}class bQ extends bE{_render(a,b,c){let d=[];for(let c=a;c<=b;c++)d[c-a]=new bP;if(0===c.length)return d;c.sort((a,b)=>a.className===b.className?a.startLineNumber===b.startLineNumber?a.endLineNumber-b.endLineNumber:a.startLineNumber-b.startLineNumber:a.className<b.className?-1:1);let e=null,f=0;for(let g of c){let c=g.className,h=g.zIndex,i=Math.max(g.startLineNumber,a)-a,j=Math.min(g.endLineNumber,b)-a;e===c?(i=Math.max(f+1,i),f=Math.max(f,j)):(e=c,f=j);for(let a=i;a<=f;a++)d[a].add(new bO(c,h,g.tooltip))}return d}}class bR extends aA{constructor(a){super(a),this._widgets={},this._context=a;const b=this._context.configuration.options,c=b.get(165);this.domNode=(0,ae.Z)(document.createElement("div")),this.domNode.setClassName("glyph-margin-widgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this._lineHeight=b.get(75),this._glyphMargin=b.get(66),this._glyphMarginLeft=c.glyphMarginLeft,this._glyphMarginWidth=c.glyphMarginWidth,this._glyphMarginDecorationLaneCount=c.glyphMarginDecorationLaneCount,this._managedDomNodes=[],this._decorationGlyphsToRender=[]}dispose(){this._managedDomNodes=[],this._decorationGlyphsToRender=[],this._widgets={},super.dispose()}getWidgets(){return Object.values(this._widgets)}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(165);return this._lineHeight=b.get(75),this._glyphMargin=b.get(66),this._glyphMarginLeft=c.glyphMarginLeft,this._glyphMarginWidth=c.glyphMarginWidth,this._glyphMarginDecorationLaneCount=c.glyphMarginDecorationLaneCount,!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}addWidget(a){let b=(0,ae.Z)(a.getDomNode());this._widgets[a.getId()]={widget:a,preference:a.getPosition(),domNode:b,renderInfo:null},b.setPosition("absolute"),b.setDisplay("none"),b.setAttribute("widgetId",a.getId()),this.domNode.appendChild(b),this.setShouldRender()}setWidgetPosition(a,b){let c=this._widgets[a.getId()];return!(c.preference.lane===b.lane&&c.preference.zIndex===b.zIndex&&aE.Q.equalsRange(c.preference.range,b.range))&&(c.preference=b,this.setShouldRender(),!0)}removeWidget(a){let b=a.getId();if(this._widgets[b]){let a=this._widgets[b].domNode.domNode;delete this._widgets[b],a.remove(),this.setShouldRender()}}_collectDecorationBasedGlyphRenderRequest(a,b){let c=a.visibleRange.startLineNumber,d=a.visibleRange.endLineNumber;for(let e of a.getDecorationsInViewport()){let a=e.options.glyphMarginClassName;if(!a)continue;let f=Math.max(e.range.startLineNumber,c),g=Math.min(e.range.endLineNumber,d),h=e.options.glyphMargin?.position??aH.ZS.Center,i=e.options.zIndex??0;for(let c=f;c<=g;c++){let d=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(c,0)),e=this._context.viewModel.glyphLanes.getLanesAtLine(d.lineNumber).indexOf(h);b.push(new bS(c,e,i,a))}}}_collectWidgetBasedGlyphRenderRequest(a,b){let c=a.visibleRange.startLineNumber,d=a.visibleRange.endLineNumber;for(let a of Object.values(this._widgets)){let e=a.preference.range,{startLineNumber:f,endLineNumber:g}=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(aE.Q.lift(e));if(!f||!g||g<c||f>d)continue;let h=Math.max(f,c),i=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(h,0)),j=this._context.viewModel.glyphLanes.getLanesAtLine(i.lineNumber).indexOf(a.preference.lane);b.push(new bT(h,j,a.preference.zIndex,a))}}_collectSortedGlyphRenderRequests(a){let b=[];return this._collectDecorationBasedGlyphRenderRequest(a,b),this._collectWidgetBasedGlyphRenderRequest(a,b),b.sort((a,b)=>{if(a.lineNumber===b.lineNumber){if(a.laneIndex===b.laneIndex){if(a.zIndex===b.zIndex)return b.type===a.type?0===a.type&&0===b.type?a.className<b.className?-1:1:0:b.type-a.type;return b.zIndex-a.zIndex}return a.laneIndex-b.laneIndex}return a.lineNumber-b.lineNumber}),b}prepareRender(a){if(!this._glyphMargin){this._decorationGlyphsToRender=[];return}for(let a of Object.values(this._widgets))a.renderInfo=null;let b=new K.j3(this._collectSortedGlyphRenderRequests(a)),c=[];for(;b.length>0;){let a=b.peek();if(!a)break;let d=b.takeWhile(b=>b.lineNumber===a.lineNumber&&b.laneIndex===a.laneIndex);if(!d||0===d.length)break;let e=d[0];if(0===e.type){let a=[];for(let b of d){if(b.zIndex!==e.zIndex||b.type!==e.type)break;(0===a.length||a[a.length-1]!==b.className)&&a.push(b.className)}c.push(e.accept(a.join(" ")))}else e.widget.renderInfo={lineNumber:e.lineNumber,laneIndex:e.laneIndex}}this._decorationGlyphsToRender=c}render(a){if(!this._glyphMargin){for(let a of Object.values(this._widgets))a.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){let a=this._managedDomNodes.pop();a?.domNode.remove()}return}let b=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(let c of Object.values(this._widgets))if(c.renderInfo){let d=a.viewportData.relativeVerticalOffset[c.renderInfo.lineNumber-a.viewportData.startLineNumber],e=this._glyphMarginLeft+c.renderInfo.laneIndex*this._lineHeight;c.domNode.setDisplay("block"),c.domNode.setTop(d),c.domNode.setLeft(e),c.domNode.setWidth(b),c.domNode.setHeight(this._lineHeight)}else c.domNode.setDisplay("none");for(let c=0;c<this._decorationGlyphsToRender.length;c++){let d,e=this._decorationGlyphsToRender[c],f=e.lineNumber,g=a.viewportData.relativeVerticalOffset[f-a.viewportData.startLineNumber],h=this._glyphMarginLeft+e.laneIndex*this._lineHeight;c<this._managedDomNodes.length?d=this._managedDomNodes[c]:(d=(0,ae.Z)(document.createElement("div")),this._managedDomNodes.push(d),this.domNode.appendChild(d));let i=this._context.viewLayout.getLineHeightForLineNumber(f);d.setClassName("cgmr codicon "+e.combinedClassName),d.setPosition("absolute"),d.setTop(g),d.setLeft(h),d.setWidth(b),d.setHeight(i)}for(;this._managedDomNodes.length>this._decorationGlyphsToRender.length;){let a=this._managedDomNodes.pop();a?.domNode.remove()}}}class bS{constructor(a,b,c,d){this.lineNumber=a,this.laneIndex=b,this.zIndex=c,this.className=d,this.type=0}accept(a){return new bU(this.lineNumber,this.laneIndex,a)}}class bT{constructor(a,b,c,d){this.lineNumber=a,this.laneIndex=b,this.zIndex=c,this.widget=d,this.type=1}}class bU{constructor(a,b,c){this.lineNumber=a,this.laneIndex=b,this.combinedClassName=c}}c(95592);var bV=c(85214),bW=c(42491),bX=c(2126);class bY extends bE{constructor(a){super(),this._context=a,this._primaryPosition=null;const b=this._context.configuration.options,c=b.get(166),d=b.get(59);this._spaceWidth=d.spaceWidth,this._maxIndentLeft=-1===c.wrappingColumn?-1:c.wrappingColumn*d.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=b.get(22),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(166),d=b.get(59);return this._spaceWidth=d.spaceWidth,this._maxIndentLeft=-1===c.wrappingColumn?-1:c.wrappingColumn*d.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=b.get(22),!0}onCursorStateChanged(a){let b=a.selections[0].getPosition();return!this._primaryPosition?.equals(b)&&(this._primaryPosition=b,!0)}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}onLanguageConfigurationChanged(a){return!0}prepareRender(a){if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs){this._renderResult=null;return}let b=a.visibleRange.startLineNumber,c=a.visibleRange.endLineNumber,d=a.scrollWidth,e=this._primaryPosition,f=this.getGuidesByLine(b,Math.min(c+1,this._context.viewModel.getLineCount()),e),g=[];for(let e=b;e<=c;e++){let c=e-b,h=f[c],i="",j=a.visibleRangeForPosition(new aD.y(e,1))?.left??0;for(let b of h){let c=-1===b.column?j+(b.visibleColumn-1)*this._spaceWidth:a.visibleRangeForPosition(new aD.y(e,b.column)).left;if(c>d||this._maxIndentLeft>0&&c>this._maxIndentLeft)break;let f=b.horizontalLine?b.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",g=b.horizontalLine?(a.visibleRangeForPosition(new aD.y(e,b.horizontalLine.endColumn))?.left??c+this._spaceWidth)-c:this._spaceWidth;i+=`<div class="core-guide ${b.className} ${f}" style="left:${c}px;width:${g}px"></div>`}g[c]=i}this._renderResult=g}getGuidesByLine(a,b,c){let d=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(a,b,c,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?bX.N6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?bX.N6.EnabledForActive:bX.N6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,e=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(a,b):null,f=0,g=0,h=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&c){let d=this._context.viewModel.getActiveIndentGuide(c.lineNumber,a,b);f=d.startLineNumber,g=d.endLineNumber,h=d.indent}let{indentSize:i}=this._context.viewModel.model.getOptions(),j=[];for(let c=a;c<=b;c++){let b=[];j.push(b);let k=d?d[c-a]:[],l=new K.j3(k),m=e?e[c-a]:0;for(let a=1;a<=m;a++){let d=(a-1)*i+1,e=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===k.length)&&f<=c&&c<=g&&a===h;b.push(...l.takeWhile(a=>a.visibleColumn<d)||[]);let j=l.peek();(!j||j.visibleColumn!==d||j.horizontalLine)&&b.push(new bX.TH(d,-1,`core-guide-indent lvl-${(a-1)%30}`+(e?" indent-active":""),null,-1,-1))}b.push(...l.takeWhile(a=>!0)||[])}return j}render(a,b){if(!this._renderResult)return"";let c=b-a;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}function bZ(a){if(!(a&&a.isTransparent()))return a}(0,bG.zy)((a,b)=>{let c=[{bracketColor:bF.sN,guideColor:bF.n4,guideColorActive:bF.bB},{bracketColor:bF.lQ,guideColor:bF.I2,guideColorActive:bF.WS},{bracketColor:bF.ss,guideColor:bF.Bo,guideColorActive:bF.Pe},{bracketColor:bF.l5,guideColor:bF.If,guideColorActive:bF.WD},{bracketColor:bF.sH,guideColor:bF.BD,guideColorActive:bF.P1},{bracketColor:bF.zp,guideColor:bF.IW,guideColorActive:bF.WY}],d=new bW.k,e=[{indentColor:bF.vV,indentColorActive:bF.H0},{indentColor:bF.ob,indentColorActive:bF.Am},{indentColor:bF.hz,indentColorActive:bF.tK},{indentColor:bF.ow,indentColorActive:bF.A3},{indentColor:bF.vP,indentColorActive:bF.tp},{indentColor:bF.CM,indentColorActive:bF.As}],f=c.map(b=>{let c=a.getColor(b.bracketColor),d=a.getColor(b.guideColor),e=a.getColor(b.guideColorActive),f=bZ(bZ(d)??c?.transparent(.3)),g=bZ(bZ(e)??c);if(f&&g)return{guideColor:f,guideColorActive:g}}).filter(bV.O9),g=e.map(b=>{let c=a.getColor(b.indentColor),d=a.getColor(b.indentColorActive),e=bZ(c),f=bZ(d);if(e&&f)return{indentColor:e,indentColorActive:f}}).filter(bV.O9);if(f.length>0){for(let a=0;a<30;a++){let c=f[a%f.length];b.addRule(`.monaco-editor .${d.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${c.guideColor}; --guide-color-active: ${c.guideColorActive}; }`)}b.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),b.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),b.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),b.addRule(`.monaco-editor .vertical.${d.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),b.addRule(`.monaco-editor .horizontal-top.${d.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),b.addRule(`.monaco-editor .horizontal-bottom.${d.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(g.length>0){for(let a=0;a<30;a++){let c=g[a%g.length];b.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${c.indentColor}; --indent-color-active: ${c.indentColorActive}; }`)}b.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),b.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}),c(2804);class b$ extends bE{static{this.CLASS_NAME="line-numbers"}constructor(a){super(),this._context=a,this._readConfig(),this._lastCursorModelPosition=new aD.y(1,1),this._renderResult=null,this._activeModelLineNumber=1,this._context.addEventHandler(this)}_readConfig(){let a=this._context.configuration.options;this._lineHeight=a.get(75);let b=a.get(76);this._renderLineNumbers=b.renderType,this._renderCustomLineNumbers=b.renderFn,this._renderFinalNewline=a.get(109);let c=a.get(165);this._lineNumbersLeft=c.lineNumbersLeft,this._lineNumbersWidth=c.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){return this._readConfig(),!0}onCursorStateChanged(a){let b=a.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(b);let c=!1;return this._activeModelLineNumber!==this._lastCursorModelPosition.lineNumber&&(this._activeModelLineNumber=this._lastCursorModelPosition.lineNumber,c=!0),(2===this._renderLineNumbers||3===this._renderLineNumbers)&&(c=!0),c}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}onDecorationsChanged(a){return a.affectsLineNumber}_getLineRenderLineNumber(a){let b=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(a,1));if(1!==b.column)return"";let c=b.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(c);if(2===this._renderLineNumbers){let a=Math.abs(this._lastCursorModelPosition.lineNumber-c);return 0===a?'<span class="relative-current-line-number">'+c+"</span>":String(a)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===c||c%10==0||c===this._context.viewModel.getLineCount()?String(c):"":String(c)}prepareRender(a){if(0===this._renderLineNumbers){this._renderResult=null;return}let b=M.j9?this._lineHeight%2==0?" lh-even":" lh-odd":"",c=a.visibleRange.startLineNumber,d=a.visibleRange.endLineNumber,e=this._context.viewModel.getDecorationsInViewport(a.visibleRange).filter(a=>!!a.options.lineNumberClassName);e.sort((a,b)=>aE.Q.compareRangesUsingEnds(a.range,b.range));let f=0,g=this._context.viewModel.getLineCount(),h=[];for(let a=c;a<=d;a++){let d=a-c,i=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(a,1)).lineNumber,j=this._getLineRenderLineNumber(a),k="";for(;f<e.length&&e[f].range.endLineNumber<a;)f++;for(let b=f;b<e.length;b++){let{range:c,options:d}=e[b];c.startLineNumber<=a&&(k+=" "+d.lineNumberClassName)}if(!j&&!k){h[d]="";continue}a===g&&0===this._context.viewModel.getLineLength(a)&&("off"===this._renderFinalNewline&&(j=""),"dimmed"===this._renderFinalNewline&&(k+=" dimmed-line-number")),i===this._activeModelLineNumber&&(k+=" active-line-number"),h[d]=`<div class="${b$.CLASS_NAME}${b}${k}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${j}</div>`}this._renderResult=h}render(a,b){if(!this._renderResult)return"";let c=b-a;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}(0,bG.zy)((a,b)=>{let c=a.getColor(bF.Qt),d=a.getColor(bF.JB);d?b.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${d}; }`):c&&b.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${c.transparent(.4)}; }`)}),c(76293);let b_="monaco-mouse-cursor-text";c(61148);class b0{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;let a=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=a.left;let b=this._domNode.offsetWidth;this._clientRectScale=b>0?a.width/b:1}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(a,b){this._domNode=a,this.endNode=b,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class b1{constructor(a,b){this.themeType=b;const c=a.options,d=c.get(59);this.renderWhitespace=c.get(113),this.experimentalWhitespaceRendering=c.get(47),this.renderControlCharacters=c.get(108),this.spaceWidth=d.spaceWidth,this.middotWidth=d.middotWidth,this.wsmiddotWidth=d.wsmiddotWidth,this.useMonospaceOptimizations=d.isMonospace&&!c.get(40),this.canUseHalfwidthRightwardsArrow=d.canUseHalfwidthRightwardsArrow,this.lineHeight=c.get(75),this.stopRenderingLineAfter=c.get(133),this.fontLigatures=c.get(60),this.verticalScrollbarSize=c.get(117).verticalScrollbarSize,this.useGpu="on"===c.get(46)}equals(a){return this.themeType===a.themeType&&this.renderWhitespace===a.renderWhitespace&&this.experimentalWhitespaceRendering===a.experimentalWhitespaceRendering&&this.renderControlCharacters===a.renderControlCharacters&&this.spaceWidth===a.spaceWidth&&this.middotWidth===a.middotWidth&&this.wsmiddotWidth===a.wsmiddotWidth&&this.useMonospaceOptimizations===a.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===a.canUseHalfwidthRightwardsArrow&&this.lineHeight===a.lineHeight&&this.stopRenderingLineAfter===a.stopRenderingLineAfter&&this.fontLigatures===a.fontLigatures&&this.verticalScrollbarSize===a.verticalScrollbarSize&&this.useGpu===a.useGpu}}class b2{constructor(){this._currentVisibleRange=new aE.Q(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(a){this._currentVisibleRange=a}}class b3{constructor(a,b,c,d,e,f,g){this.minimalReveal=a,this.lineNumber=b,this.startColumn=c,this.endColumn=d,this.startScrollTop=e,this.stopScrollTop=f,this.scrollType=g,this.type="range",this.minLineNumber=b,this.maxLineNumber=b}}class b4{constructor(a,b,c,d,e){this.minimalReveal=a,this.selections=b,this.startScrollTop=c,this.stopScrollTop=d,this.scrollType=e,this.type="selections";let f=b[0].startLineNumber,g=b[0].endLineNumber;for(let a=1,c=b.length;a<c;a++){const c=b[a];f=Math.min(f,c.startLineNumber),g=Math.max(g,c.endLineNumber)}this.minLineNumber=f,this.maxLineNumber=g}}class b5 extends aA{static{this.HORIZONTAL_EXTRA_PX=30}constructor(a,b,c){super(a);const d=this._context.configuration,e=this._context.configuration.options,f=e.get(59),g=e.get(166);this._lineHeight=e.get(75),this._typicalHalfwidthCharacterWidth=f.typicalHalfwidthCharacterWidth,this._isViewportWrapping=g.isViewportWrapping,this._revealHorizontalRightPadding=e.get(114),this._cursorSurroundingLines=e.get(35),this._cursorSurroundingLinesStyle=e.get(36),this._canUseLayerHinting=!e.get(39),this._viewLineOptions=new b1(d,this._context.theme.type),this._linesContent=c,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new bq(this._context,{createLine:()=>new aC.G(b,this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,aB.write(this.domNode,8),this.domNode.setClassName(`view-lines ${b_}`),(0,I.M)(this.domNode,f),this._maxLineWidth=0,this._asyncUpdateLineWidths=new aj.uC(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new aj.uC(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new b2,this._horizontalRevealRequest=null,this._stickyScrollEnabled=e.get(131).enabled,this._maxNumberStickyLines=e.get(131).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(a){this._visibleLines.onConfigurationChanged(a),a.hasChanged(166)&&(this._maxLineWidth=0);let b=this._context.configuration.options,c=b.get(59),d=b.get(166);return this._lineHeight=b.get(75),this._typicalHalfwidthCharacterWidth=c.typicalHalfwidthCharacterWidth,this._isViewportWrapping=d.isViewportWrapping,this._revealHorizontalRightPadding=b.get(114),this._cursorSurroundingLines=b.get(35),this._cursorSurroundingLinesStyle=b.get(36),this._canUseLayerHinting=!b.get(39),this._stickyScrollEnabled=b.get(131).enabled,this._maxNumberStickyLines=b.get(131).maxLineCount,(0,I.M)(this.domNode,c),this._onOptionsMaybeChanged(),a.hasChanged(165)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){let a=new b1(this._context.configuration,this._context.theme.type);if(!this._viewLineOptions.equals(a)){this._viewLineOptions=a;let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let a=b;a<=c;a++)this._visibleLines.getVisibleLine(a).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(a){let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber(),d=!1;for(let a=b;a<=c;a++)d=this._visibleLines.getVisibleLine(a).onSelectionChanged()||d;return d}onDecorationsChanged(a){let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let a=b;a<=c;a++)this._visibleLines.getVisibleLine(a).onDecorationsChanged();return!0}onFlushed(a){let b=this._visibleLines.onFlushed(a,this._viewLineOptions.useGpu);return this._maxLineWidth=0,b}onLinesChanged(a){return this._visibleLines.onLinesChanged(a)}onLinesDeleted(a){return this._visibleLines.onLinesDeleted(a)}onLinesInserted(a){return this._visibleLines.onLinesInserted(a)}onRevealRangeRequest(a){let b=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),a.source,a.minimalReveal,a.range,a.selections,a.verticalType);if(-1===b)return!1;let c=this._context.viewLayout.validateScrollPosition({scrollTop:b});a.revealHorizontal?a.range&&a.range.startLineNumber!==a.range.endLineNumber?c={scrollTop:c.scrollTop,scrollLeft:0}:a.range?this._horizontalRevealRequest=new b3(a.minimalReveal,a.range.startLineNumber,a.range.startColumn,a.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),c.scrollTop,a.scrollType):a.selections&&a.selections.length>0&&(this._horizontalRevealRequest=new b4(a.minimalReveal,a.selections,this._context.viewLayout.getCurrentScrollTop(),c.scrollTop,a.scrollType)):this._horizontalRevealRequest=null;let d=Math.abs(this._context.viewLayout.getCurrentScrollTop()-c.scrollTop)<=this._lineHeight?1:a.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(c,d),!0}onScrollChanged(a){if(this._horizontalRevealRequest&&a.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&a.scrollTopChanged){let b=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),c=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(a.scrollTop<b||a.scrollTop>c)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(a.scrollWidth),this._visibleLines.onScrollChanged(a)||a.scrollTopChanged||a.scrollLeftChanged}onTokensChanged(a){return this._visibleLines.onTokensChanged(a)}onZonesChanged(a){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(a)}onThemeChanged(a){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(a,b){let c=this._getViewLineDomNode(a);if(null===c)return null;let d=this._getLineNumberFor(c);if(-1===d||d<1||d>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(d))return new aD.y(d,1);let e=this._visibleLines.getStartLineNumber(),f=this._visibleLines.getEndLineNumber();if(d<e||d>f)return null;let g=this._visibleLines.getVisibleLine(d).getColumnOfNodeOffset(a,b),h=this._context.viewModel.getLineMinColumn(d);return g<h&&(g=h),new aD.y(d,g)}_getViewLineDomNode(a){for(;a&&1===a.nodeType;){if(a.className===aC.G.CLASS_NAME)return a;a=a.parentElement}return null}_getLineNumberFor(a){let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let d=b;d<=c;d++)if(a===this._visibleLines.getVisibleLine(d).getDomNode())return d;return -1}getLineWidth(a){let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();if(a<b||a>c)return -1;let d=new b0(this.domNode.domNode,this._textRangeRestingSpot),e=this._visibleLines.getVisibleLine(a).getWidth(d);return this._updateLineWidthsSlowIfDomDidLayout(d),e}resetLineWidthCaches(){let a=this._visibleLines.getStartLineNumber(),b=this._visibleLines.getEndLineNumber();for(let c=a;c<=b;c++)this._visibleLines.getVisibleLine(c).resetCachedWidth()}linesVisibleRangesForRange(a,b){let c=a.endLineNumber,d=aE.Q.intersectRanges(a,this._lastRenderedData.getCurrentVisibleRange());if(!d)return null;let e=[],f=0,g=new b0(this.domNode.domNode,this._textRangeRestingSpot),h=0;b&&(h=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(d.startLineNumber,1)).lineNumber);let i=this._visibleLines.getStartLineNumber(),j=this._visibleLines.getEndLineNumber();for(let a=d.startLineNumber;a<=d.endLineNumber;a++){if(a<i||a>j)continue;let k=a===d.startLineNumber?d.startColumn:1,l=a!==c,m=l?this._context.viewModel.getLineMaxColumn(a):d.endColumn,n=this._visibleLines.getVisibleLine(a).getVisibleRangesForRange(a,k,m,g);if(n){if(b&&a<c){let b=h;if(b!==(h=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(a+1,1)).lineNumber)){let a=n.ranges[n.ranges.length-1];a.width+=this._typicalHalfwidthCharacterWidth,this._context.viewModel.getTextDirection(b)===aH.z4.RTL&&(a.left-=this._typicalHalfwidthCharacterWidth)}}e[f++]=new bk.BG(n.outsideRenderedLine,a,bk.Y.from(n.ranges),l)}}return(this._updateLineWidthsSlowIfDomDidLayout(g),0===f)?null:e}_visibleRangesForLineRange(a,b,c){if(a<this._visibleLines.getStartLineNumber()||a>this._visibleLines.getEndLineNumber())return null;let d=new b0(this.domNode.domNode,this._textRangeRestingSpot),e=this._visibleLines.getVisibleLine(a).getVisibleRangesForRange(a,b,c,d);return this._updateLineWidthsSlowIfDomDidLayout(d),e}_lineIsRenderedRTL(a){return!(a<this._visibleLines.getStartLineNumber()||a>this._visibleLines.getEndLineNumber())&&this._visibleLines.getVisibleLine(a).isRenderedRTL()}visibleRangeForPosition(a){let b=this._visibleRangesForLineRange(a.lineNumber,a.column,a.column);return b?new bk.qN(b.outsideRenderedLine,b.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(a){!a.didDomLayout||this._asyncUpdateLineWidths.isScheduled()&&(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow())}_updateLineWidths(a){let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber(),d=1,e=!0;for(let f=b;f<=c;f++){let b=this._visibleLines.getVisibleLine(f);if(a&&!b.getWidthIsFast()){e=!1;continue}d=Math.max(d,b.getWidth(null))}return e&&1===b&&c===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(d),e}_checkMonospaceFontAssumptions(){let a=-1,b=-1,c=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let e=c;e<=d;e++){let c=this._visibleLines.getVisibleLine(e);if(c.needsMonospaceFontCheck()){let d=c.getWidth(null);d>b&&(b=d,a=e)}}if(-1!==a&&!this._visibleLines.getVisibleLine(a).monospaceAssumptionsAreValid())for(let a=c;a<=d;a++)this._visibleLines.getVisibleLine(a).onMonospaceAssumptionsInvalidated()}prepareRender(){throw Error("Not supported")}render(){throw Error("Not supported")}renderText(a){if(this._visibleLines.renderLines(a),this._lastRenderedData.setCurrentVisibleRange(a.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){let b=this._horizontalRevealRequest;if(a.startLineNumber<=b.minLineNumber&&b.maxLineNumber<=a.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();let a=this._computeScrollLeftToReveal(b);a&&(this._isViewportWrapping||a.hasRTL||this._ensureMaxLineWidth(a.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:a.scrollLeft},b.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),M.j9&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){let a=this._visibleLines.getStartLineNumber(),b=this._visibleLines.getEndLineNumber();for(let c=a;c<=b;c++)if(this._visibleLines.getVisibleLine(c).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");let b=this._context.viewLayout.getCurrentScrollTop()-a.bigNumbersDelta;this._linesContent.setTop(-b),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(a){if(this._viewLineOptions.useGpu)return;let b=Math.ceil(a);this._maxLineWidth<b&&(this._maxLineWidth=b,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(a,b,c,d,e,f){let g,h,i,j,k=a.top,l=a.height,m=k+l;if(e&&e.length>0){let a=e[0].startLineNumber,b=e[0].endLineNumber;for(let c=1,d=e.length;c<d;c++){let d=e[c];a=Math.min(a,d.startLineNumber),b=Math.max(b,d.endLineNumber)}g=!1,h=this._context.viewLayout.getVerticalOffsetForLineNumber(a),i=this._context.viewLayout.getVerticalOffsetForLineNumber(b)+this._lineHeight}else{if(!d)return -1;g=!0,h=this._context.viewLayout.getVerticalOffsetForLineNumber(d.startLineNumber),i=this._context.viewLayout.getVerticalOffsetForLineNumber(d.endLineNumber)+this._lineHeight}let n=("mouse"===b||c)&&"default"===this._cursorSurroundingLinesStyle,o=0,p=0;if(n)c||(o=this._lineHeight);else{let a=Math.min(l/this._lineHeight/2,Math.max(this._cursorSurroundingLines,this._stickyScrollEnabled?this._maxNumberStickyLines:0));o=a*this._lineHeight,p=Math.max(0,a-1)*this._lineHeight}if(c||0!==f&&4!==f||(p+=this._lineHeight),h-=o,(i+=p)-h>l){if(!g)return -1;j=h}else if(5===f||6===f)if(6===f&&k<=h&&i<=m)j=k;else{let a=h-Math.max(5*this._lineHeight,.2*l);j=Math.max(i-l,a)}else j=1===f||2===f?2===f&&k<=h&&i<=m?k:Math.max(0,(h+i)/2-l/2):this._computeMinimumScrolling(k,m,h,i,3===f,4===f);return j}_computeScrollLeftToReveal(a){let b=this._context.viewLayout.getCurrentViewport(),c=this._context.configuration.options.get(165),d=b.left,e=d+b.width-c.verticalScrollbarWidth,f=0x40000000,g=0,h=!1;if("range"===a.type){h=this._lineIsRenderedRTL(a.lineNumber);let b=this._visibleRangesForLineRange(a.lineNumber,a.startColumn,a.endColumn);if(!b)return null;for(let a of b.ranges)f=Math.min(f,Math.round(a.left)),g=Math.max(g,Math.round(a.left+a.width))}else for(let b of a.selections){if(b.startLineNumber!==b.endLineNumber)return null;let a=this._visibleRangesForLineRange(b.startLineNumber,b.startColumn,b.endColumn);if(h||=this._lineIsRenderedRTL(b.startLineNumber),!a)return null;for(let b of a.ranges)f=Math.min(f,Math.round(b.left)),g=Math.max(g,Math.round(b.left+b.width))}return(a.minimalReveal||(f=Math.max(0,f-b5.HORIZONTAL_EXTRA_PX),g+=this._revealHorizontalRightPadding),"selections"===a.type&&g-f>b.width)?null:{scrollLeft:this._computeMinimumScrolling(d,e,f,g),maxHorizontalOffset:g,hasRTL:h}}_computeMinimumScrolling(a,b,c,d,e,f){a|=0,b|=0,c|=0,d|=0,e=!!e,f=!!f;let g=b-a;return!(d-c<g)||e?c:f?Math.max(0,d-g):c<a?c:d>b?Math.max(0,d-g):a}}c(46742);class b6 extends bQ{constructor(a){super(),this._context=a;const b=this._context.configuration.options.get(165);this._decorationsLeft=b.decorationsLeft,this._decorationsWidth=b.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){let b=this._context.configuration.options.get(165);return this._decorationsLeft=b.decorationsLeft,this._decorationsWidth=b.decorationsWidth,!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}_getDecorations(a){let b=a.getDecorationsInViewport(),c=[],d=0;for(let a=0,e=b.length;a<e;a++){let e=b[a],f=e.options.linesDecorationsClassName,g=e.options.zIndex;f&&(c[d++]=new bN(e.range.startLineNumber,e.range.endLineNumber,f,e.options.linesDecorationsTooltip??null,g));let h=e.options.firstLineDecorationClassName;h&&(c[d++]=new bN(e.range.startLineNumber,e.range.startLineNumber,h,e.options.linesDecorationsTooltip??null,g))}return c}prepareRender(a){let b=a.visibleRange.startLineNumber,c=a.visibleRange.endLineNumber,d=this._render(b,c,this._getDecorations(a)),e='" style="left:'+this._decorationsLeft.toString()+"px;width:"+this._decorationsWidth.toString()+'px;"></div>',f=[];for(let a=b;a<=c;a++){let c=a-b,g=d[c].getDecorations(),h="";for(let a of g){let b='<div class="cldr '+a.className;null!==a.tooltip&&(b+='" title="'+a.tooltip),b+=e,h+=b}f[c]=h}this._renderResult=f}render(a,b){return this._renderResult?this._renderResult[b-a]:""}}c(15486);class b7 extends aA{static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(a){super(a);const b=this._context.configuration.options,c=b.get(165);this._canUseLayerHinting=!b.get(39),this._contentLeft=c.contentLeft,this._glyphMarginLeft=c.glyphMarginLeft,this._glyphMarginWidth=c.glyphMarginWidth,this._domNode=(0,ae.Z)(document.createElement("div")),this._domNode.setClassName(b7.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,ae.Z)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(b7.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}getDomNode(){return this._domNode}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(165);return this._canUseLayerHinting=!b.get(39),this._contentLeft=c.contentLeft,this._glyphMarginLeft=c.glyphMarginLeft,this._glyphMarginWidth=c.glyphMarginWidth,!0}onScrollChanged(a){return super.onScrollChanged(a)||a.scrollTopChanged}prepareRender(a){}render(a){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");let b=a.scrollTop-a.bigNumbersDelta;this._domNode.setTop(-b);let c=Math.min(a.scrollHeight,1e6);this._domNode.setHeight(c),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(c)}}c(35412);class b8 extends bQ{constructor(a){super(),this._context=a,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){return!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}_getDecorations(a){let b=a.getDecorationsInViewport(),c=[],d=0;for(let a=0,e=b.length;a<e;a++){let e=b[a],f=e.options.marginClassName,g=e.options.zIndex;f&&(c[d++]=new bN(e.range.startLineNumber,e.range.endLineNumber,f,null,g))}return c}prepareRender(a){let b=a.visibleRange.startLineNumber,c=a.visibleRange.endLineNumber,d=this._render(b,c,this._getDecorations(a)),e=[];for(let a=b;a<=c;a++){let c=a-b,f=d[c].getDecorations(),g="";for(let a of f)g+='<div class="cmdr '+a.className+'" style=""></div>';e[c]=g}this._renderResult=e}render(a,b){return this._renderResult?this._renderResult[b-a]:""}}c(44232);class b9{static{this.Empty=new b9(0,0,0,0)}constructor(a,b,c,d){this._rgba8Brand=void 0,this.r=b9._clamp(a),this.g=b9._clamp(b),this.b=b9._clamp(c),this.a=b9._clamp(d)}equals(a){return this.r===a.r&&this.g===a.g&&this.b===a.b&&this.a===a.a}static _clamp(a){return a<0?0:a>255?255:0|a}}var ca=c(36036);class cb extends G.jG{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,G.lC)(new cb)),this._INSTANCE}constructor(){super(),this._onDidChange=this._register(new F.vl),this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(ca.dG.onDidChange(a=>{a.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){let a=ca.dG.getColorMap();if(!a){this._colors=[];for(let a=0;a<=2;a++)this._colors[a]=b9.Empty;this._backgroundIsLight=!0;return}this._colors=[b9.Empty];for(let b=1;b<a.length;b++){let c=a[b].rgba;this._colors[b]=new b9(c.r,c.g,c.b,Math.round(255*c.a))}let b=a[2].getRelativeLuminance();this._backgroundIsLight=b>=.5,this._onDidChange.fire(void 0)}getColor(a){(a<1||a>=this._colors.length)&&(a=2);let b=this._colors[a];return b||((0,E.dz)(new E.D7(`Missing color for colorId ${a}`)),b=b9.Empty),b}backgroundIsLight(){return this._backgroundIsLight}}let cc=(()=>{let a=[];for(let b=32;b<=126;b++)a.push(b);return a.push(65533),a})();var cd=c(96419);class ce{constructor(a,b){this.scale=b,this._minimapCharRendererBrand=void 0,this.charDataNormal=ce.soften(a,.8),this.charDataLight=ce.soften(a,50/60)}static soften(a,b){let c=new Uint8ClampedArray(a.length);for(let d=0,e=a.length;d<e;d++)c[d]=(0,cd.W)(a[d]*b);return c}renderChar(a,b,c,d,e,f,g,h,i,j,k){var l,m;let n=+this.scale,o=2*this.scale,p=k?1:o;if(b+n>a.width||c+p>a.height)return void console.warn("bad render request outside image data");let q=j?this.charDataLight:this.charDataNormal,r=(l=d,m=i,(l-=32)<0||l>96?m<=2?(l+96)%96:95:l),s=4*a.width,t=g.r,u=g.g,v=g.b,w=e.r-t,x=e.g-u,y=e.b-v,z=Math.max(f,h),A=a.data,B=r*n*o,C=c*s+4*b;for(let a=0;a<p;a++){let a=C;for(let b=0;b<n;b++){let b=q[B++]/255*(f/255);A[a++]=t+w*b,A[a++]=u+x*b,A[a++]=v+y*b,A[a++]=z}C+=s}}blockRenderChar(a,b,c,d,e,f,g,h){let i=+this.scale,j=2*this.scale,k=h?1:j;if(b+i>a.width||c+k>a.height)return void console.warn("bad render request outside image data");let l=4*a.width,m=e/255*.5,n=f.r,o=f.g,p=f.b,q=d.r-n,r=d.g-o,s=d.b-p,t=n+q*m,u=o+r*m,v=p+s*m,w=Math.max(e,g),x=a.data,y=c*l+4*b;for(let a=0;a<k;a++){let a=y;for(let b=0;b<i;b++)x[a++]=t,x[a++]=u,x[a++]=v,x[a++]=w;y+=l}}}var cf=c(90178);let cg={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},ch=a=>{let b=new Uint8ClampedArray(a.length/2);for(let c=0;c<a.length;c+=2)b[c>>1]=cg[a[c]]<<4|15&cg[a[c+1]];return b},ci={1:(0,cf.P)(()=>ch("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,cf.P)(()=>ch("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class cj{static create(a,b){let c;return this.lastCreated&&a===this.lastCreated.scale&&b===this.lastFontFamily?this.lastCreated:(c=ci[a]?new ce(ci[a](),a):cj.createFromSampleData(cj.createSampleData(b).data,a),this.lastFontFamily=b,this.lastCreated=c,c)}static createSampleData(a){let b=document.createElement("canvas"),c=b.getContext("2d");b.style.height="16px",b.height=16,b.width=960,b.style.width="960px",c.fillStyle="#ffffff",c.font=`bold 16px ${a}`,c.textBaseline="middle";let d=0;for(let a of cc)c.fillText(String.fromCharCode(a),d,8),d+=10;return c.getImageData(0,0,960,16)}static createFromSampleData(a,b){if(61440!==a.length)throw Error("Unexpected source in MinimapCharRenderer");return new ce(cj._downsample(a,b),b)}static _downsampleChar(a,b,c,d,e){let f=+e,g=2*e,h=d,i=0;for(let d=0;d<g;d++){let e=d/g*16,j=(d+1)/g*16;for(let d=0;d<f;d++){let g=d/f*10,k=(d+1)/f*10,l=0,m=0;for(let c=e;c<j;c++){let d=b+3840*Math.floor(c),e=1-(c-Math.floor(c));for(let b=g;b<k;b++){let c=1-(b-Math.floor(b)),f=d+4*Math.floor(b),g=c*e;m+=g,l+=a[f]*a[f+3]/255*g}}let n=l/m;i=Math.max(i,n),c[h++]=(0,cd.W)(n)}}return i}static _downsample(a,b){let c=2*b*1*b,d=96*c,e=new Uint8ClampedArray(d),f=0,g=0,h=0;for(let d=0;d<96;d++)h=Math.max(h,this._downsampleChar(a,g,e,f,b)),f+=c,g+=40;if(h>0){let a=255/h;for(let b=0;b<d;b++)e[b]*=a}return e}}var ck=c(17577);let cl=M.uF?'"Segoe WPC", "Segoe UI", sans-serif':M.zx?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif';var cm=c(42190);class cn{constructor(a,b,c){const d=a.options,e=d.get(163),f=d.get(165),g=f.minimap,h=d.get(59),i=d.get(81);this.renderMinimap=g.renderMinimap,this.size=i.size,this.minimapHeightIsEditorHeight=g.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=d.get(119),this.paddingTop=d.get(96).top,this.paddingBottom=d.get(96).bottom,this.showSlider=i.showSlider,this.autohide=i.autohide,this.pixelRatio=e,this.typicalHalfwidthCharacterWidth=h.typicalHalfwidthCharacterWidth,this.lineHeight=d.get(75),this.minimapLeft=g.minimapLeft,this.minimapWidth=g.minimapWidth,this.minimapHeight=f.height,this.canvasInnerWidth=g.minimapCanvasInnerWidth,this.canvasInnerHeight=g.minimapCanvasInnerHeight,this.canvasOuterWidth=g.minimapCanvasOuterWidth,this.canvasOuterHeight=g.minimapCanvasOuterHeight,this.isSampling=g.minimapIsSampling,this.editorHeight=f.height,this.fontScale=g.minimapScale,this.minimapLineHeight=g.minimapLineHeight,this.minimapCharWidth=+this.fontScale,this.sectionHeaderFontFamily=cl,this.sectionHeaderFontSize=i.sectionHeaderFontSize*e,this.sectionHeaderLetterSpacing=i.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=cn._getSectionHeaderColor(b,c.getColor(1)),this.charRenderer=(0,cf.P)(()=>cj.create(this.fontScale,h.fontFamily)),this.defaultBackgroundColor=c.getColor(2),this.backgroundColor=cn._getMinimapBackground(b,this.defaultBackgroundColor),this.foregroundAlpha=cn._getMinimapForegroundOpacity(b)}static _getMinimapBackground(a,b){let c=a.getColor(am.IL);return c?new b9(c.rgba.r,c.rgba.g,c.rgba.b,Math.round(255*c.rgba.a)):b}static _getMinimapForegroundOpacity(a){let b=a.getColor(am.K1);return b?b9._clamp(Math.round(255*b.rgba.a)):255}static _getSectionHeaderColor(a,b){let c=a.getColor(al.By);return c?new b9(c.rgba.r,c.rgba.g,c.rgba.b,Math.round(255*c.rgba.a)):b}equals(a){return this.renderMinimap===a.renderMinimap&&this.size===a.size&&this.minimapHeightIsEditorHeight===a.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===a.scrollBeyondLastLine&&this.paddingTop===a.paddingTop&&this.paddingBottom===a.paddingBottom&&this.showSlider===a.showSlider&&this.autohide===a.autohide&&this.pixelRatio===a.pixelRatio&&this.typicalHalfwidthCharacterWidth===a.typicalHalfwidthCharacterWidth&&this.lineHeight===a.lineHeight&&this.minimapLeft===a.minimapLeft&&this.minimapWidth===a.minimapWidth&&this.minimapHeight===a.minimapHeight&&this.canvasInnerWidth===a.canvasInnerWidth&&this.canvasInnerHeight===a.canvasInnerHeight&&this.canvasOuterWidth===a.canvasOuterWidth&&this.canvasOuterHeight===a.canvasOuterHeight&&this.isSampling===a.isSampling&&this.editorHeight===a.editorHeight&&this.fontScale===a.fontScale&&this.minimapLineHeight===a.minimapLineHeight&&this.minimapCharWidth===a.minimapCharWidth&&this.sectionHeaderFontSize===a.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===a.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(a.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(a.backgroundColor)&&this.foregroundAlpha===a.foregroundAlpha}}class co{constructor(a,b,c,d,e,f,g,h,i){this.scrollTop=a,this.scrollHeight=b,this.sliderNeeded=c,this._computedSliderRatio=d,this.sliderTop=e,this.sliderHeight=f,this.topPaddingLineCount=g,this.startLineNumber=h,this.endLineNumber=i}getDesiredScrollTopFromDelta(a){return Math.round(this.scrollTop+a/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(a){return Math.round((a-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(a){let b=Math.max(this.startLineNumber,a.startLineNumber),c=Math.min(this.endLineNumber,a.endLineNumber);return b>c?null:[b,c]}getYForLineNumber(a,b){return(a-this.startLineNumber+this.topPaddingLineCount)*b}static create(a,b,c,d,e,f,g,h,i,j,k){let l,m,n=a.pixelRatio,o=a.minimapLineHeight,p=Math.floor(a.canvasInnerHeight/o),q=a.lineHeight;if(a.minimapHeightIsEditorHeight){let b=h*a.lineHeight+a.paddingTop+a.paddingBottom;a.scrollBeyondLastLine&&(b+=Math.max(0,e-a.lineHeight-a.paddingBottom));let c=Math.max(1,Math.floor(e*e/b)),d=Math.max(0,a.minimapHeight-c),f=d/(j-e),k=Math.floor(a.canvasInnerHeight/a.minimapLineHeight);return new co(i,j,d>0,f,i*f,c,Math.floor(a.paddingTop/a.lineHeight),1,Math.min(g,k))}l=f&&c!==g?Math.floor((c-b+1)*o/n):Math.floor(e/q*o/n);let r=Math.floor(a.paddingTop/q),s=Math.floor(a.paddingBottom/q);a.scrollBeyondLastLine&&(s=Math.max(s,e/q-1)),m=s>0?(r+g+s-e/q-1)*o/n:Math.max(0,(r+g)*o/n-l);let t=(m=Math.min(a.minimapHeight-l,m))/(j-e),u=i*t;if(p>=r+g+s)return new co(i,j,m>0,t,u,l,r,1,g);{let c,e,f=Math.max(1,Math.floor((b>1?b+r:Math.max(1,i/q))-u*n/o));f<r?(c=r-f+1,f=1):(c=0,f=Math.max(1,f-r)),k&&k.scrollHeight===j&&(k.scrollTop>i&&(f=Math.min(f,k.startLineNumber),c=Math.max(c,k.topPaddingLineCount)),k.scrollTop<i&&(f=Math.max(f,k.startLineNumber),c=Math.min(c,k.topPaddingLineCount)));let h=Math.min(g,f-c+p-1),m=(i-d)/q;return e=i>=a.paddingTop?(b-f+c+m)*o/n:i/a.paddingTop*(c+m)*o/n,new co(i,j,!0,t,e,l,c,f,h)}}}class cp{static{this.INVALID=new cp(-1)}constructor(a){this.dy=a}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}class cq{constructor(a,b,c){this.renderedLayout=a,this._imageData=b,this._renderedLines=new bp({createLine:()=>cp.INVALID}),this._renderedLines._set(a.startLineNumber,c)}linesEquals(a){if(!this.scrollEquals(a))return!1;let b=this._renderedLines._get().lines;for(let a=0,c=b.length;a<c;a++)if(-1===b[a].dy)return!1;return!0}scrollEquals(a){return this.renderedLayout.startLineNumber===a.startLineNumber&&this.renderedLayout.endLineNumber===a.endLineNumber}_get(){let a=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:a.rendLineNumberStart,lines:a.lines}}onLinesChanged(a,b){return this._renderedLines.onLinesChanged(a,b)}onLinesDeleted(a,b){this._renderedLines.onLinesDeleted(a,b)}onLinesInserted(a,b){this._renderedLines.onLinesInserted(a,b)}onTokensChanged(a){return this._renderedLines.onTokensChanged(a)}}class cr{constructor(a,b,c,d){this._backgroundFillData=cr._createBackgroundFillData(b,c,d),this._buffers=[a.createImageData(b,c),a.createImageData(b,c)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;let a=this._buffers[this._lastUsedBuffer];return a.data.set(this._backgroundFillData),a}static _createBackgroundFillData(a,b,c){let d=c.r,e=c.g,f=c.b,g=c.a,h=new Uint8ClampedArray(a*b*4),i=0;for(let c=0;c<b;c++)for(let b=0;b<a;b++)h[i]=d,h[i+1]=e,h[i+2]=f,h[i+3]=g,i+=4;return h}}class cs{static compute(a,b,c){if(0===a.renderMinimap||!a.isSampling)return[null,[]];let{minimapLineCount:d}=U.xZ.computeContainedMinimapLineCount({viewLineCount:b,scrollBeyondLastLine:a.scrollBeyondLastLine,paddingTop:a.paddingTop,paddingBottom:a.paddingBottom,height:a.editorHeight,lineHeight:a.lineHeight,pixelRatio:a.pixelRatio}),e=b/d,f=e/2;if(!c||0===c.minimapLines.length){let a=[];if(a[0]=1,d>1){for(let b=0,c=d-1;b<c;b++)a[b]=Math.round(b*e+f);a[d-1]=b}return[new cs(e,a),[]]}let g=c.minimapLines,h=g.length,i=[],j=0,k=0,l=1,m=[],n=null;for(let a=0;a<d;a++){let c,o=Math.max(l,Math.round(a*e)),p=Math.max(o,Math.round((a+1)*e));for(;j<h&&g[j]<o;){if(m.length<10){let a=j+1+k;n&&"deleted"===n.type&&n._oldIndex===j-1?n.deleteToLineNumber++:(n={type:"deleted",_oldIndex:j,deleteFromLineNumber:a,deleteToLineNumber:a},m.push(n)),k--}j++}if(j<h&&g[j]<=p)c=g[j],j++;else if(c=0===a?1:a+1===d?b:Math.round(a*e+f),m.length<10){let b=j+1+k;n&&"inserted"===n.type&&n._i===a-1?n.insertToLineNumber++:(n={type:"inserted",_i:a,insertFromLineNumber:b,insertToLineNumber:b},m.push(n)),k++}i[a]=c,l=c}if(m.length<10)for(;j<h;){let a=j+1+k;n&&"deleted"===n.type&&n._oldIndex===j-1?n.deleteToLineNumber++:(n={type:"deleted",_oldIndex:j,deleteFromLineNumber:a,deleteToLineNumber:a},m.push(n)),k--,j++}else m=[{type:"flush"}];return[new cs(e,i),m]}constructor(a,b){this.samplingRatio=a,this.minimapLines=b}modelLineToMinimapLine(a){return Math.min(this.minimapLines.length,Math.max(1,Math.round(a/this.samplingRatio)))}modelLineRangeToMinimapLineRange(a,b){let c=this.modelLineToMinimapLine(a)-1;for(;c>0&&this.minimapLines[c-1]>=a;)c--;let d=this.modelLineToMinimapLine(b)-1;for(;d+1<this.minimapLines.length&&this.minimapLines[d+1]<=b;)d++;if(c===d){let d=this.minimapLines[c];if(d<a||d>b)return null}return[c+1,d+1]}decorationLineRangeToMinimapLineRange(a,b){let c=this.modelLineToMinimapLine(a),d=this.modelLineToMinimapLine(b);return a!==b&&d===c&&(d===this.minimapLines.length?c>1&&c--:d++),[c,d]}onLinesDeleted(a){let b=a.toLineNumber-a.fromLineNumber+1,c=this.minimapLines.length,d=0;for(let e=this.minimapLines.length-1;e>=0&&!(this.minimapLines[e]<a.fromLineNumber);e--)this.minimapLines[e]<=a.toLineNumber?(this.minimapLines[e]=Math.max(1,a.fromLineNumber-1),c=Math.min(c,e),d=Math.max(d,e)):this.minimapLines[e]-=b;return[c,d]}onLinesInserted(a){let b=a.toLineNumber-a.fromLineNumber+1;for(let c=this.minimapLines.length-1;c>=0&&!(this.minimapLines[c]<a.fromLineNumber);c--)this.minimapLines[c]+=b}}class ct extends aA{constructor(a){super(a),this._sectionHeaderCache=new ck.qK(10,1.5),this.tokensColorTracker=cb.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new cn(this._context.configuration,this._context.theme,this.tokensColorTracker);const[b]=cs.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=b,this._shouldCheckSampling=!1,this._actual=new cu(a.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){let a=new cn(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(a)&&(this.options=a,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(a){return this._onOptionsMaybeChanged()}onCursorStateChanged(a){return this._selections=a.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(a){return!!a.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(a){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(a){if(!this._samplingState)return this._actual.onLinesChanged(a.fromLineNumber,a.count);{let b=this._samplingState.modelLineRangeToMinimapLineRange(a.fromLineNumber,a.fromLineNumber+a.count-1);return!!b&&this._actual.onLinesChanged(b[0],b[1]-b[0]+1)}}onLinesDeleted(a){if(!this._samplingState)return this._actual.onLinesDeleted(a.fromLineNumber,a.toLineNumber);{let[b,c]=this._samplingState.onLinesDeleted(a);return b<=c&&this._actual.onLinesChanged(b+1,c-b+1),this._shouldCheckSampling=!0,!0}}onLinesInserted(a){return this._samplingState?(this._samplingState.onLinesInserted(a),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(a.fromLineNumber,a.toLineNumber)}onScrollChanged(a){return this._actual.onScrollChanged(a)}onThemeChanged(a){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(a){if(!this._samplingState)return this._actual.onTokensChanged(a.ranges);{let b=[];for(let c of a.ranges){let a=this._samplingState.modelLineRangeToMinimapLineRange(c.fromLineNumber,c.toLineNumber);a&&b.push({fromLineNumber:a[0],toLineNumber:a[1]})}return!!b.length&&this._actual.onTokensChanged(b)}}onTokensColorsChanged(a){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(a){return this._actual.onZonesChanged()}prepareRender(a){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(a){let b=a.visibleRange.startLineNumber,c=a.visibleRange.endLineNumber;this._samplingState&&(b=this._samplingState.modelLineToMinimapLine(b),c=this._samplingState.modelLineToMinimapLine(c));let d={viewportContainsWhitespaceGaps:a.viewportData.whitespaceViewportData.length>0,scrollWidth:a.scrollWidth,scrollHeight:a.scrollHeight,viewportStartLineNumber:b,viewportEndLineNumber:c,viewportStartLineNumberVerticalOffset:a.getVerticalOffsetForLineNumber(b),scrollTop:a.scrollTop,scrollLeft:a.scrollLeft,viewportWidth:a.viewportWidth,viewportHeight:a.viewportHeight};this._actual.render(d)}_recreateLineSampling(){this._minimapSelections=null;let a=!!this._samplingState,[b,c]=cs.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=b,a&&this._samplingState)for(let a of c)switch(a.type){case"deleted":this._actual.onLinesDeleted(a.deleteFromLineNumber,a.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(a.insertFromLineNumber,a.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(a){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[a-1]):this._context.viewModel.getLineContent(a)}getLineMaxColumn(a){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[a-1]):this._context.viewModel.getLineMaxColumn(a)}getMinimapLinesRenderingData(a,b,c){if(this._samplingState){let d=[];for(let e=0,f=b-a+1;e<f;e++)c[e]?d[e]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[a+e-1]):d[e]=null;return d}return this._context.viewModel.getMinimapLinesRenderingData(a,b,c).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState)for(let a of(this._minimapSelections=[],this._selections)){let[b,c]=this._samplingState.decorationLineRangeToMinimapLineRange(a.startLineNumber,a.endLineNumber);this._minimapSelections.push(new aY.L(b,a.startColumn,c,a.endColumn))}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(a,b){return this._getMinimapDecorationsInViewport(a,b).filter(a=>!a.options.minimap?.sectionHeaderStyle)}getSectionHeaderDecorationsInViewport(a,b){let c=this.options.sectionHeaderFontSize/this.options.minimapLineHeight;return a=Math.floor(Math.max(1,a-c)),this._getMinimapDecorationsInViewport(a,b).filter(a=>!!a.options.minimap?.sectionHeaderStyle)}_getMinimapDecorationsInViewport(a,b){let c;if(this._samplingState){let d=this._samplingState.minimapLines[a-1],e=this._samplingState.minimapLines[b-1];c=new aE.Q(d,1,e,this._context.viewModel.getLineMaxColumn(e))}else c=new aE.Q(a,1,b,this._context.viewModel.getLineMaxColumn(b));let d=this._context.viewModel.getMinimapDecorationsInRange(c);if(this._samplingState){let a=[];for(let b of d){if(!b.options.minimap)continue;let c=b.range,d=this._samplingState.modelLineToMinimapLine(c.startLineNumber),e=this._samplingState.modelLineToMinimapLine(c.endLineNumber);a.push(new cm.vo(new aE.Q(d,c.startColumn,e,c.endColumn),b.options))}return a}return d}getSectionHeaderText(a,b){let c=a.options.minimap?.sectionHeaderText;if(!c)return null;let d=this._sectionHeaderCache.get(c);if(d)return d;let e=b(c);return this._sectionHeaderCache.set(c,e),e}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(a){this._samplingState&&(a=this._samplingState.minimapLines[a-1]),this._context.viewModel.revealRange("mouse",!1,new aE.Q(a,1,a,1),1,0)}setScrollTop(a){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:a},1)}}class cu extends G.jG{constructor(a,b){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._isMouseOverMinimap=!1,this._theme=a,this._model=b,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(am.yr),this._domNode=(0,ae.Z)(document.createElement("div")),aB.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,ae.Z)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,ae.Z)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,ae.Z)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,ae.Z)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,ae.Z)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._hideDelayedScheduler=this._register(new aj.uC(()=>this._hideImmediatelyIfMouseIsOutside(),500)),this._register((0,D.un)(this._domNode.domNode,D.Bx.MOUSE_OVER,()=>{this._isMouseOverMinimap=!0})),this._register((0,D.un)(this._domNode.domNode,D.Bx.MOUSE_LEAVE,()=>{this._isMouseOverMinimap=!1})),this._pointerDownListener=(0,D.un)(this._domNode.domNode,D.Bx.POINTER_DOWN,a=>{a.preventDefault();let b="mouse"===a.pointerType,c=0===a.button;if(0!==this._model.options.renderMinimap&&this._lastRenderData){if("proportional"!==this._model.options.size){if(c&&this._lastRenderData){let b=(0,D.BK)(this._slider.domNode),c=b.top+b.height/2;this._startSliderDragging(a,c,this._lastRenderData.renderedLayout)}return}if(c||!b){let b=this._model.options.minimapLineHeight,c=Math.floor(this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*a.offsetY/b)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;c=Math.min(c,this._model.getLineCount()),this._model.revealLineNumber(c)}}}),this._sliderPointerMoveMonitor=new ah._,this._sliderPointerDownListener=(0,D.un)(this._slider.domNode,D.Bx.POINTER_DOWN,a=>{a.preventDefault(),a.stopPropagation(),0===a.button&&this._lastRenderData&&this._startSliderDragging(a,a.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=aW.q.addTarget(this._domNode.domNode),this._sliderTouchStartListener=(0,D.ko)(this._domNode.domNode,aW.B.Start,a=>{a.preventDefault(),a.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(a))},{passive:!1}),this._sliderTouchMoveListener=(0,D.ko)(this._domNode.domNode,aW.B.Change,a=>{a.preventDefault(),a.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(a)},{passive:!1}),this._sliderTouchEndListener=(0,D.un)(this._domNode.domNode,aW.B.End,a=>{a.preventDefault(),a.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_hideSoon(){this._hideDelayedScheduler.cancel(),this._hideDelayedScheduler.schedule()}_hideImmediatelyIfMouseIsOutside(){this._isMouseOverMinimap?this._hideSoon():this._domNode.toggleClassName("active",!1)}_startSliderDragging(a,b,c){if(!a.target||!(a.target instanceof Element))return;let d=a.pageX;this._slider.toggleClassName("active",!0);let e=(a,e)=>{let f=(0,D.BK)(this._domNode.domNode),g=Math.min(Math.abs(e-d),Math.abs(e-f.left),Math.abs(e-f.left-f.width));M.uF&&g>140?this._model.setScrollTop(c.scrollTop):this._model.setScrollTop(c.getDesiredScrollTopFromDelta(a-b))};a.pageY!==b&&e(a.pageY,d),this._sliderPointerMoveMonitor.startMonitoring(a.target,a.pointerId,a.buttons,a=>e(a.pageY,a.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(a){let b=this._domNode.domNode.getBoundingClientRect().top,c=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(a.pageY-b);this._model.setScrollTop(c)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){let a=["minimap"];return"always"===this._model.options.showSlider?a.push("slider-always"):a.push("slider-mouseover"),"mouseover"===this._model.options.autohide?a.push("minimap-autohide-mouseover"):"scroll"===this._model.options.autohide&&a.push("minimap-autohide-scroll"),a.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return!this._buffers&&this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new cr(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(a,b){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(a,b)}onLinesDeleted(a,b){return this._lastRenderData?.onLinesDeleted(a,b),!0}onLinesInserted(a,b){return this._lastRenderData?.onLinesInserted(a,b),!0}onScrollChanged(a){return"scroll"===this._model.options.autohide&&(a.scrollTopChanged||a.scrollHeightChanged)&&(this._domNode.toggleClassName("active",!0),this._hideSoon()),this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(am.yr),this._renderDecorations=!0,!0}onTokensChanged(a){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(a)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(a){if(0===this._model.options.renderMinimap){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}a.scrollLeft+a.viewportWidth>=a.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");let b=co.create(this._model.options,a.viewportStartLineNumber,a.viewportEndLineNumber,a.viewportStartLineNumberVerticalOffset,a.viewportHeight,a.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),a.scrollTop,a.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(b.sliderNeeded?"block":"none"),this._slider.setTop(b.sliderTop),this._slider.setHeight(b.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(b.sliderHeight),this.renderDecorations(b),this._lastRenderData=this.renderLines(b)}renderDecorations(a){if(this._renderDecorations){this._renderDecorations=!1;let b=this._model.getSelections();b.sort(aE.Q.compareRangesUsingStarts);let c=this._model.getMinimapDecorationsInViewport(a.startLineNumber,a.endLineNumber);c.sort((a,b)=>(a.options.zIndex||0)-(b.options.zIndex||0));let{canvasInnerWidth:d,canvasInnerHeight:e}=this._model.options,f=this._model.options.minimapLineHeight,g=this._model.options.minimapCharWidth,h=this._model.getOptions().tabSize,i=this._decorationsCanvas.domNode.getContext("2d");i.clearRect(0,0,d,e);let j=new cv(a.startLineNumber,a.endLineNumber,!1);this._renderSelectionLineHighlights(i,b,j,a,f),this._renderDecorationsLineHighlights(i,c,j,a,f);let k=new cv(a.startLineNumber,a.endLineNumber,null);this._renderSelectionsHighlights(i,b,k,a,f,h,g,d),this._renderDecorationsHighlights(i,c,k,a,f,h,g,d),this._renderSectionHeaders(a)}}_renderSelectionLineHighlights(a,b,c,d,e){if(!this._selectionColor||this._selectionColor.isTransparent())return;a.fillStyle=this._selectionColor.transparent(.5).toString();let f=0,g=0;for(let h of b){let b=d.intersectWithViewport(h);if(!b)continue;let[i,j]=b;for(let a=i;a<=j;a++)c.set(a,!0);let k=d.getYForLineNumber(i,e),l=d.getYForLineNumber(j,e);g>=k||(g>f&&a.fillRect(U.xq,f,a.canvas.width,g-f),f=k),g=l}g>f&&a.fillRect(U.xq,f,a.canvas.width,g-f)}_renderDecorationsLineHighlights(a,b,c,d,e){let f=new Map;for(let g=b.length-1;g>=0;g--){let h=b[g],i=h.options.minimap;if(!i||1!==i.position)continue;let j=d.intersectWithViewport(h.range);if(!j)continue;let[k,l]=j,m=i.getColor(this._theme.value);if(!m||m.isTransparent())continue;let n=f.get(m.toString());n||(n=m.transparent(.5).toString(),f.set(m.toString(),n)),a.fillStyle=n;for(let b=k;b<=l;b++){if(c.has(b))continue;c.set(b,!0);let f=d.getYForLineNumber(b,e);a.fillRect(U.xq,f,a.canvas.width,e)}}}_renderSelectionsHighlights(a,b,c,d,e,f,g,h){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(let i of b){let b=d.intersectWithViewport(i);if(!b)continue;let[j,k]=b;for(let b=j;b<=k;b++)this.renderDecorationOnLine(a,c,i,this._selectionColor,d,b,e,e,f,g,h)}}_renderDecorationsHighlights(a,b,c,d,e,f,g,h){for(let i of b){let b=i.options.minimap;if(!b)continue;let j=d.intersectWithViewport(i.range);if(!j)continue;let[k,l]=j,m=b.getColor(this._theme.value);if(!(!m||m.isTransparent()))for(let j=k;j<=l;j++)switch(b.position){case 1:this.renderDecorationOnLine(a,c,i.range,m,d,j,e,e,f,g,h);continue;case 2:{let b=d.getYForLineNumber(j,e);this.renderDecoration(a,m,2,b,2,e);continue}}}}renderDecorationOnLine(a,b,c,d,e,f,g,h,i,j,k){let l=e.getYForLineNumber(f,h);if(l+g<0||l>this._model.options.canvasInnerHeight)return;let{startLineNumber:m,endLineNumber:n}=c,o=m===f?c.startColumn:1,p=n===f?c.endColumn:this._model.getLineMaxColumn(f),q=this.getXOffsetForPosition(b,f,o,i,j,k),r=this.getXOffsetForPosition(b,f,p,i,j,k);this.renderDecoration(a,d,q,l,r-q,g)}getXOffsetForPosition(a,b,c,d,e,f){if(1===c)return U.xq;if((c-1)*e>=f)return f;let g=a.get(b);if(!g){let c=this._model.getLineContent(b);g=[U.xq];let h=U.xq;for(let a=1;a<c.length+1;a++){let b=c.charCodeAt(a-1),i=h+(9===b?d*e:(0,a9.ne)(b)?2*e:e);if(i>=f){g[a]=f;break}g[a]=i,h=i}a.set(b,g)}return c-1<g.length?g[c-1]:f}renderDecoration(a,b,c,d,e,f){a.fillStyle=b&&b.toString()||"",a.fillRect(c,d,e,f)}_renderSectionHeaders(a){let b=this._model.options.minimapLineHeight,c=this._model.options.sectionHeaderFontSize,d=this._model.options.sectionHeaderLetterSpacing,e=1.5*c,{canvasInnerWidth:f}=this._model.options,g=this._model.options.backgroundColor,h=`rgb(${g.r} ${g.g} ${g.b} / .7)`,i=this._model.options.sectionHeaderFontColor,j=`rgb(${i.r} ${i.g} ${i.b})`,k=this._decorationsCanvas.domNode.getContext("2d");k.letterSpacing=d+"px",k.font="500 "+c+"px "+this._model.options.sectionHeaderFontFamily,k.strokeStyle=j,k.lineWidth=.4;let l=this._model.getSectionHeaderDecorationsInViewport(a.startLineNumber,a.endLineNumber);l.sort((a,b)=>a.range.startLineNumber-b.range.startLineNumber);let m=cu._fitSectionHeader.bind(null,k,f-U.xq);for(let d of l){let g=a.getYForLineNumber(d.range.startLineNumber,b)+c,i=g-c,l=i+2,n=this._model.getSectionHeaderText(d,m);cu._renderSectionLabel(k,n,d.options.minimap?.sectionHeaderStyle===2,h,j,f,i,e,g,l)}}static _fitSectionHeader(a,b,c){if(!c)return c;let d=a.measureText(c).width,e=a.measureText("…").width;if(d<=b||d<=e)return c;let f=c.length,g=Math.floor((b-e)/(d/c.length))-1,h=Math.ceil(g/2);for(;h>0&&/\s/.test(c[h-1]);)--h;return c.substring(0,h)+"…"+c.substring(f-(g-h))}static _renderSectionLabel(a,b,c,d,e,f,g,h,i,j){b&&(a.fillStyle=d,a.fillRect(0,g,f,h),a.fillStyle=e,a.fillText(b,U.xq,i)),c&&(a.beginPath(),a.moveTo(0,j),a.lineTo(f,j),a.closePath(),a.stroke())}renderLines(a){let b=a.startLineNumber,c=a.endLineNumber,d=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(a)){let b=this._lastRenderData._get();return new cq(a,b.imageData,b.lines)}let e=this._getBuffer();if(!e)return null;let[f,g,h]=cu._renderUntouchedLines(e,a.topPaddingLineCount,b,c,d,this._lastRenderData),i=this._model.getMinimapLinesRenderingData(b,c,h),j=this._model.getOptions().tabSize,k=this._model.options.defaultBackgroundColor,l=this._model.options.backgroundColor,m=this._model.options.foregroundAlpha,n=this._model.tokensColorTracker,o=n.backgroundIsLight(),p=this._model.options.renderMinimap,q=this._model.options.charRenderer(),r=this._model.options.fontScale,s=this._model.options.minimapCharWidth,t=(1===p?2:3)*r,u=d>t?Math.floor((d-t)/2):0,v=l.a/255,w=new b9(Math.round((l.r-k.r)*v+k.r),Math.round((l.g-k.g)*v+k.g),Math.round((l.b-k.b)*v+k.b),255),x=a.topPaddingLineCount*d,y=[];for(let a=0,f=c-b+1;a<f;a++)h[a]&&cu._renderLine(e,w,l.a,o,p,s,n,m,q,x,u,j,i[a],r,d),y[a]=new cp(x),x+=d;let z=-1===f?0:f,A=-1===g?e.height:g;return this._canvas.domNode.getContext("2d").putImageData(e,0,0,0,z,e.width,A-z),new cq(a,e,y)}static _renderUntouchedLines(a,b,c,d,e,f){let g=[];if(!f){for(let a=0,b=d-c+1;a<b;a++)g[a]=!0;return[-1,-1,g]}let h=f._get(),i=h.imageData.data,j=h.rendLineNumberStart,k=h.lines,l=k.length,m=a.width,n=a.data,o=(d-c+1)*e*m*4,p=-1,q=-1,r=-1,s=-1,t=-1,u=-1,v=b*e;for(let a=c;a<=d;a++){let b=a-c,d=a-j,f=d>=0&&d<l?k[d].dy:-1;if(-1===f){g[b]=!0,v+=e;continue}let h=f*m*4,w=(f+e)*m*4,x=v*m*4,y=(v+e)*m*4;s===h&&u===x?s=w:(-1!==r&&(n.set(i.subarray(r,s),t),-1===p&&0===r&&r===t&&(p=s),-1===q&&s===o&&r===t&&(q=r)),r=h,s=w,t=x),u=y,g[b]=!1,v+=e}return -1!==r&&(n.set(i.subarray(r,s),t),-1===p&&0===r&&r===t&&(p=s),-1===q&&s===o&&r===t&&(q=r)),[-1===p?-1:p/(4*m),-1===q?-1:q/(4*m),g]}static _renderLine(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){let p=m.content,q=m.tokens,r=a.width-f,s=1===o,t=U.xq,u=0,v=0;for(let m=0,o=q.getCount();m<o;m++){let o=q.getEndOffset(m),w=q.getForeground(m),x=g.getColor(w);for(;u<o;u++){if(t>r)return;let g=p.charCodeAt(u);if(9===g){let a=l-(u+v)%l;v+=a-1,t+=a*f}else if(32===g)t+=f;else{let l=(0,a9.ne)(g)?2:1;for(let m=0;m<l;m++)if(2===e?i.blockRenderChar(a,t,j+k,x,h,b,c,s):i.renderChar(a,t,j+k,g,x,h,b,c,n,d,s),(t+=f)>r)return}}}}}class cv{constructor(a,b,c){this._startLineNumber=a,this._endLineNumber=b,this._defaultValue=c,this._values=[];for(let a=0,b=this._endLineNumber-this._startLineNumber+1;a<b;a++)this._values[a]=c}has(a){return this.get(a)!==this._defaultValue}set(a,b){a<this._startLineNumber||a>this._endLineNumber||(this._values[a-this._startLineNumber]=b)}get(a){return a<this._startLineNumber||a>this._endLineNumber?this._defaultValue:this._values[a-this._startLineNumber]}}c(59708);class cw extends aA{constructor(a,b){super(a),this._viewDomNode=b;const c=this._context.configuration.options.get(165);this._widgets={},this._verticalScrollbarWidth=c.verticalScrollbarWidth,this._minimapWidth=c.minimap.minimapWidth,this._horizontalScrollbarHeight=c.horizontalScrollbarHeight,this._editorHeight=c.height,this._editorWidth=c.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,ae.Z)(document.createElement("div")),aB.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,ae.Z)(document.createElement("div")),aB.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(a){let b=this._context.configuration.options.get(165);return this._verticalScrollbarWidth=b.verticalScrollbarWidth,this._minimapWidth=b.minimap.minimapWidth,this._horizontalScrollbarHeight=b.horizontalScrollbarHeight,this._editorHeight=b.height,this._editorWidth=b.width,!0}_widgetCanOverflow(a){let b=this._context.configuration.options.get(4);return(a.allowEditorOverflow||!1)&&b}addWidget(a){let b=(0,ae.Z)(a.getDomNode());this._widgets[a.getId()]={widget:a,preference:null,domNode:b},b.setPosition("absolute"),b.setAttribute("widgetId",a.getId()),this._widgetCanOverflow(a)?this.overflowingOverlayWidgetsDomNode.appendChild(b):this._domNode.appendChild(b),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(a,b){let c=this._widgets[a.getId()],d=b?b.preference:null,e=b?.stackOrdinal;return c.preference===d&&c.stack===e?(this._updateMaxMinWidth(),!1):(c.preference=d,c.stack=e,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(a){let b=a.getId();if(this._widgets.hasOwnProperty(b)){let a=this._widgets[b].domNode.domNode;delete this._widgets[b],a.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let a=0,b=Object.keys(this._widgets);for(let c=0,d=b.length;c<d;c++){let d=b[c],e=this._widgets[d],f=e.widget.getMinContentWidthInPx?.();void 0!==f&&(a=Math.max(a,f))}this._context.viewLayout.setOverlayWidgetsMinWidth(a)}_renderWidget(a,b){let c=a.domNode;if(null===a.preference)return void c.setTop("");let d=2*this._verticalScrollbarWidth+this._minimapWidth;if(0===a.preference||1===a.preference){if(1===a.preference){let a=c.domNode.clientHeight;c.setTop(this._editorHeight-a-2*this._horizontalScrollbarHeight)}else c.setTop(0);void 0!==a.stack?(c.setTop(b[a.preference]),b[a.preference]+=c.domNode.clientWidth):c.setRight(d)}else if(2===a.preference)c.domNode.style.right="50%",void 0!==a.stack?(c.setTop(b[2]),b[2]+=c.domNode.clientHeight):c.setTop(0);else{let{top:b,left:d}=a.preference;if(this._context.configuration.options.get(51)&&this._widgetCanOverflow(a.widget)){let a=this._viewDomNodeRect;c.setTop(b+a.top),c.setLeft(d+a.left),c.setPosition("fixed")}else c.setTop(b),c.setLeft(d),c.setPosition("absolute")}}prepareRender(a){this._viewDomNodeRect=(0,D.BK)(this._viewDomNode.domNode)}render(a){this._domNode.setWidth(this._editorWidth);let b=Object.keys(this._widgets),c=Array.from({length:3},()=>0);b.sort((a,b)=>(this._widgets[a].stack||0)-(this._widgets[b].stack||0));for(let a=0,d=b.length;a<d;a++){let d=b[a];this._renderWidget(this._widgets[d],c)}}}var cx=c(55404),cy=c(90637);class cz{constructor(a,b){const c=a.options;this.lineHeight=c.get(75),this.pixelRatio=c.get(163),this.overviewRulerLanes=c.get(95),this.renderBorder=c.get(94);const d=b.getColor(bF.x9);this.borderColor=d?d.toString():null,this.hideCursor=c.get(68);const e=b.getColor(bF.D0);this.cursorColorSingle=e?e.transparent(.7).toString():null;const f=b.getColor(bF.sC);this.cursorColorPrimary=f?f.transparent(.7).toString():null;const g=b.getColor(bF.we);this.cursorColorSecondary=g?g.transparent(.7).toString():null,this.themeType=b.type;const h=c.get(81),i=h.enabled,j=h.side,k=b.getColor(bF.Xr),l=ca.dG.getDefaultBackground();k?this.backgroundColor=k:i&&"right"===j?this.backgroundColor=l:this.backgroundColor=null;const m=c.get(165).overviewRuler;this.top=m.top,this.right=m.right,this.domWidth=m.width,this.domHeight=m.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[n,o]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=n,this.w=o}_initLanes(a,b,c){let d=b-a;if(c>=3){let b=Math.floor(d/3),c=Math.floor(d/3),e=d-b-c,f=a+b;return[[0,a,f,a,a+b+e,a,f,a],[0,b,e,b+e,c,b+e+c,e+c,b+e+c]]}if(2!==c)return[[0,a,a,a,a,a,a,a],[0,d,d,d,d,d,d,d]];{let b=Math.floor(d/2),c=d-b;return[[0,a,a,a,a+b,a,a,a],[0,b,b,b,c,b+c,b+c,b+c]]}}equals(a){return this.lineHeight===a.lineHeight&&this.pixelRatio===a.pixelRatio&&this.overviewRulerLanes===a.overviewRulerLanes&&this.renderBorder===a.renderBorder&&this.borderColor===a.borderColor&&this.hideCursor===a.hideCursor&&this.cursorColorSingle===a.cursorColorSingle&&this.cursorColorPrimary===a.cursorColorPrimary&&this.cursorColorSecondary===a.cursorColorSecondary&&this.themeType===a.themeType&&cx.Q1.equals(this.backgroundColor,a.backgroundColor)&&this.top===a.top&&this.right===a.right&&this.domWidth===a.domWidth&&this.domHeight===a.domHeight&&this.canvasWidth===a.canvasWidth&&this.canvasHeight===a.canvasHeight}}class cA extends aA{constructor(a){super(a),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,ae.Z)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=ca.dG.onDidChange(a=>{a.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new aD.y(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(a){let b=new cz(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(b))&&(this._settings=b,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,a&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(a){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(a){this._cursorPositions=[];for(let b=0,c=a.selections.length;b<c;b++){let d=this._settings.cursorColorSingle;c>1&&(d=0===b?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:a.selections[b].getPosition(),color:d})}return this._cursorPositions.sort((a,b)=>aD.y.compare(a.position,b.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(a){return!!a.affectsOverviewRuler&&this._markRenderingIsMaybeNeeded()}onFlushed(a){return this._markRenderingIsNeeded()}onScrollChanged(a){return!!a.scrollHeightChanged&&this._markRenderingIsNeeded()}onZonesChanged(a){return this._markRenderingIsNeeded()}onThemeChanged(a){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}getDomNode(){return this._domNode.domNode}prepareRender(a){}render(a){this._render(),this._actualShouldRender=0}_render(){let a=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes){this._domNode.setBackgroundColor(a?cx.Q1.Format.CSS.formatHexA(a):""),this._domNode.setDisplay("none");return}let b=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(b.sort(cy.Uv.compareByRenderingProps),1!==this._actualShouldRender||cy.Uv.equalsArr(this._renderedDecorations,b)||(this._actualShouldRender=2),1!==this._actualShouldRender||(0,K.aI)(this._renderedCursorPositions,this._cursorPositions,(a,b)=>a.position.lineNumber===b.position.lineNumber&&a.color===b.color)||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=b,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");let c=this._settings.canvasWidth,d=this._settings.canvasHeight,e=this._settings.lineHeight,f=this._context.viewLayout,g=d/this._context.viewLayout.getScrollHeight(),h=6*this._settings.pixelRatio|0,i=h/2|0,j=this._domNode.domNode.getContext("2d");a?(a.isOpaque()||j.clearRect(0,0,c,d),j.fillStyle=cx.Q1.Format.CSS.formatHexA(a),j.fillRect(0,0,c,d)):j.clearRect(0,0,c,d);let k=this._settings.x,l=this._settings.w;for(let a of b){let b=a.color,c=a.data;j.fillStyle=b;let m=0,n=0,o=0;for(let a=0,b=c.length/3;a<b;a++){let b=c[3*a],p=c[3*a+1],q=c[3*a+2],r=f.getVerticalOffsetForLineNumber(p)*g|0,s=(f.getVerticalOffsetForLineNumber(q)+e)*g|0;if(s-r<h){let a=(r+s)/2|0;a<i?a=i:a+i>d&&(a=d-i),r=a-i,s=a+i}r>o+1||b!==m?(0!==a&&j.fillRect(k[m],n,l[m],o-n),m=b,n=r,o=s):s>o&&(o=s)}j.fillRect(k[m],n,l[m],o-n)}if(!this._settings.hideCursor){let a=2*this._settings.pixelRatio|0,b=a/2|0,c=this._settings.x[7],e=this._settings.w[7],h=-100,i=-100,k=null;for(let l=0,m=this._cursorPositions.length;l<m;l++){let m=this._cursorPositions[l].color;if(!m)continue;let n=this._cursorPositions[l].position,o=f.getVerticalOffsetForLineNumber(n.lineNumber)*g|0;o<b?o=b:o+b>d&&(o=d-b);let p=o-b,q=p+a;p>i+1||m!==k?(0!==l&&k&&j.fillRect(c,h,e,i-h),h=p,i=q):q>i&&(i=q),k=m,j.fillStyle=m}k&&j.fillRect(c,h,e,i-h)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(j.beginPath(),j.lineWidth=1,j.strokeStyle=this._settings.borderColor,j.moveTo(0,0),j.lineTo(0,d),j.moveTo(1,0),j.lineTo(c,0),j.stroke())}}var cB=c(7266);class cC extends az{constructor(a,b){super(),this._context=a;const c=this._context.configuration.options;this._domNode=(0,ae.Z)(document.createElement("canvas")),this._domNode.setClassName(b),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new cB.rW(a=>this._context.viewLayout.getVerticalOffsetForLineNumber(a)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(c.get(75)),this._zoneManager.setPixelRatio(c.get(163)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(a){let b=this._context.configuration.options;return a.hasChanged(75)&&(this._zoneManager.setLineHeight(b.get(75)),this._render()),a.hasChanged(163)&&(this._zoneManager.setPixelRatio(b.get(163)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(a){return this._render(),!0}onScrollChanged(a){return a.scrollHeightChanged&&(this._zoneManager.setOuterHeight(a.scrollHeight),this._render()),!0}onZonesChanged(a){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(a){this._domNode.setTop(a.top),this._domNode.setRight(a.right);let b=!1;b=this._zoneManager.setDOMWidth(a.width)||b,(b=this._zoneManager.setDOMHeight(a.height)||b)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(a){this._zoneManager.setZones(a),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;let a=this._zoneManager.getCanvasWidth(),b=this._zoneManager.getCanvasHeight(),c=this._zoneManager.resolveColorZones(),d=this._zoneManager.getId2Color(),e=this._domNode.domNode.getContext("2d");return e.clearRect(0,0,a,b),c.length>0&&this._renderOneLane(e,c,d,a),!0}_renderOneLane(a,b,c,d){let e=0,f=0,g=0;for(let h of b){let b=h.colorId,i=h.from,j=h.to;b!==e?(0!==e&&a.fillRect(0,f,d,g-f),a.fillStyle=c[e=b],f=i,g=j):g>=i?g=Math.max(g,j):(a.fillRect(0,f,d,g-f),f=i,g=j)}a.fillRect(0,f,d,g-f)}}c(55184);class cD extends aA{constructor(a){super(a),this.domNode=(0,ae.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const b=this._context.configuration.options;this._rulers=b.get(116),this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth}onConfigurationChanged(a){let b=this._context.configuration.options;return this._rulers=b.get(116),this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth,!0}onScrollChanged(a){return a.scrollHeightChanged}prepareRender(a){}_ensureRulersCount(){let a=this._renderedRulers.length,b=this._rulers.length;if(a===b)return;if(a<b){let c=b-a;for(;c>0;){let a=(0,ae.Z)(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth("1ch"),this.domNode.appendChild(a),this._renderedRulers.push(a),c--}return}let c=a-b;for(;c>0;){let a=this._renderedRulers.pop();this.domNode.removeChild(a),c--}}render(a){this._ensureRulersCount();for(let b=0,c=this._rulers.length;b<c;b++){let c=this._renderedRulers[b],d=this._rulers[b];c.setBoxShadow(d.color?`1px 0 0 0 ${d.color} inset`:""),c.setHeight(Math.min(a.scrollHeight,1e6)),c.setLeft(d.column*this._typicalHalfwidthCharacterWidth)}}}c(32043);class cE extends aA{constructor(a){super(a),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const b=this._context.configuration.options.get(117);this._useShadows=b.useShadows,this._domNode=(0,ae.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}_updateShouldShow(){let a=this._useShadows&&this._scrollTop>0;return this._shouldShow!==a&&(this._shouldShow=a,!0)}getDomNode(){return this._domNode}_updateWidth(){let a=this._context.configuration.options.get(165);0===a.minimap.renderMinimap||a.minimap.minimapWidth>0&&0===a.minimap.minimapLeft?this._width=a.width:this._width=a.width-a.verticalScrollbarWidth}onConfigurationChanged(a){let b=this._context.configuration.options.get(117);return this._useShadows=b.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(a){return this._scrollTop=a.scrollTop,this._updateShouldShow()}prepareRender(a){}render(a){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}c(81792);class cF{constructor(a){this.left=a.left,this.width=a.width,this.startStyle=null,this.endStyle=null}}class cG{constructor(a,b){this.lineNumber=a,this.ranges=b}}function cH(a){return new cF(a)}function cI(a){return new cG(a.lineNumber,a.ranges.map(cH))}class cJ extends bE{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(a){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=a;const b=this._context.configuration.options;this._roundedSelection=b.get(115),this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){let b=this._context.configuration.options;return this._roundedSelection=b.get(115),this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(a){return this._selections=a.selections.slice(0),!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}_visibleRangesHaveGaps(a){for(let b=0,c=a.length;b<c;b++)if(a[b].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(a,b,c){let d=this._typicalHalfwidthCharacterWidth/4,e=null,f=null;if(c&&c.length>0&&b.length>0){let d=b[0].lineNumber;if(d===a.startLineNumber)for(let a=0;!e&&a<c.length;a++)c[a].lineNumber===d&&(e=c[a].ranges[0]);let g=b[b.length-1].lineNumber;if(g===a.endLineNumber)for(let a=c.length-1;!f&&a>=0;a--)c[a].lineNumber===g&&(f=c[a].ranges[0]);e&&!e.startStyle&&(e=null),f&&!f.startStyle&&(f=null)}for(let a=0,c=b.length;a<c;a++){let g=b[a].ranges[0],h=g.left,i=g.left+g.width,j={top:0,bottom:0},k={top:0,bottom:0};if(a>0){let c=b[a-1].ranges[0].left,e=b[a-1].ranges[0].left+b[a-1].ranges[0].width;cK(h-c)<d?j.top=2:h>c&&(j.top=1),cK(i-e)<d?k.top=2:c<i&&i<e&&(k.top=1)}else e&&(j.top=e.startStyle.top,k.top=e.endStyle.top);if(a+1<c){let c=b[a+1].ranges[0].left,e=b[a+1].ranges[0].left+b[a+1].ranges[0].width;cK(h-c)<d?j.bottom=2:c<h&&h<e&&(j.bottom=1),cK(i-e)<d?k.bottom=2:i<e&&(k.bottom=1)}else f&&(j.bottom=f.startStyle.bottom,k.bottom=f.endStyle.bottom);g.startStyle=j,g.endStyle=k}}_getVisibleRangesWithStyle(a,b,c){let d=(b.linesVisibleRangesForRange(a,!0)||[]).map(cI);return!this._visibleRangesHaveGaps(d)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(b.visibleRange,d,c),d}_createSelectionPiece(a,b,c,d,e){return'<div class="cslr '+c+'" style="top:'+a.toString()+"px;bottom:"+b.toString()+"px;left:"+d.toString()+"px;width:"+e.toString()+'px;"></div>'}_actualRenderOneSelection(a,b,c,d){if(0===d.length)return;let e=!!d[0].ranges[0].startStyle,f=d[0].lineNumber,g=d[d.length-1].lineNumber;for(let h=0,i=d.length;h<i;h++){let i=d[h],j=i.lineNumber,k=j-b,l=c?+(j===f):0,m=c?+(j!==f&&j===g):0,n="",o="";for(let a=0,b=i.ranges.length;a<b;a++){let b=i.ranges[a];if(e){let a=b.startStyle,c=b.endStyle;if(1===a.top||1===a.bottom){n+=this._createSelectionPiece(l,m,cJ.SELECTION_CLASS_NAME,b.left-cJ.ROUNDED_PIECE_WIDTH,cJ.ROUNDED_PIECE_WIDTH);let c=cJ.EDITOR_BACKGROUND_CLASS_NAME;1===a.top&&(c+=" "+cJ.SELECTION_TOP_RIGHT),1===a.bottom&&(c+=" "+cJ.SELECTION_BOTTOM_RIGHT),n+=this._createSelectionPiece(l,m,c,b.left-cJ.ROUNDED_PIECE_WIDTH,cJ.ROUNDED_PIECE_WIDTH)}if(1===c.top||1===c.bottom){n+=this._createSelectionPiece(l,m,cJ.SELECTION_CLASS_NAME,b.left+b.width,cJ.ROUNDED_PIECE_WIDTH);let a=cJ.EDITOR_BACKGROUND_CLASS_NAME;1===c.top&&(a+=" "+cJ.SELECTION_TOP_LEFT),1===c.bottom&&(a+=" "+cJ.SELECTION_BOTTOM_LEFT),n+=this._createSelectionPiece(l,m,a,b.left+b.width,cJ.ROUNDED_PIECE_WIDTH)}}let c=cJ.SELECTION_CLASS_NAME;if(e){let a=b.startStyle,d=b.endStyle;0===a.top&&(c+=" "+cJ.SELECTION_TOP_LEFT),0===a.bottom&&(c+=" "+cJ.SELECTION_BOTTOM_LEFT),0===d.top&&(c+=" "+cJ.SELECTION_TOP_RIGHT),0===d.bottom&&(c+=" "+cJ.SELECTION_BOTTOM_RIGHT)}o+=this._createSelectionPiece(l,m,c,b.left,b.width)}a[k][0]+=n,a[k][1]+=o}}prepareRender(a){let b=[],c=a.visibleRange.startLineNumber,d=a.visibleRange.endLineNumber;for(let a=c;a<=d;a++)b[a-c]=["",""];let e=[];for(let d=0,f=this._selections.length;d<f;d++){let f=this._selections[d];if(f.isEmpty()){e[d]=null;continue}let g=this._getVisibleRangesWithStyle(f,a,this._previousFrameVisibleRangesWithStyle[d]);e[d]=g,this._actualRenderOneSelection(b,c,this._selections.length>1,g)}this._previousFrameVisibleRangesWithStyle=e,this._renderResult=b.map(([a,b])=>a+b)}render(a,b){if(!this._renderResult)return"";let c=b-a;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}function cK(a){return a<0?-a:a}(0,bG.zy)((a,b)=>{let c=a.getColor(al.rm);c&&!c.isTransparent()&&b.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${c}; }`)}),c(50924);class cL{constructor(a,b,c,d,e,f,g){this.top=a,this.left=b,this.paddingLeft=c,this.width=d,this.height=e,this.textContent=f,this.textContentClassName=g}}(f=p||(p={}))[f.Single=0]="Single",f[f.MultiPrimary=1]="MultiPrimary",f[f.MultiSecondary=2]="MultiSecondary";class cM{constructor(a,b){this._context=a;const c=this._context.configuration.options,d=c.get(59);this._cursorStyle=c.get(161),this._typicalHalfwidthCharacterWidth=d.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(c.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=c.get(38),this._isVisible=!0,this._domNode=(0,ae.Z)(document.createElement("div")),this._domNode.setClassName(`cursor ${b_}`),this._domNode.setHeight(this._context.viewLayout.getLineHeightForLineNumber(1)),this._domNode.setTop(0),this._domNode.setLeft(0),(0,I.M)(this._domNode,d),this._domNode.setDisplay("none"),this._position=new aD.y(1,1),this._pluralityClass="",this.setPlurality(b),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(a){switch(a){default:case p.Single:this._pluralityClass="";break;case p.MultiPrimary:this._pluralityClass="cursor-primary";break;case p.MultiSecondary:this._pluralityClass="cursor-secondary"}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(59);return this._cursorStyle=b.get(161),this._typicalHalfwidthCharacterWidth=c.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(b.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=b.get(38),(0,I.M)(this._domNode,c),!0}onCursorPositionChanged(a,b){return b?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=a,!0}_getGraphemeAwarePosition(){let{lineNumber:a,column:b}=this._position,c=this._context.viewModel.getLineContent(a),[d,e]=(0,a9.m)(c,b-1);return[new aD.y(a,d+1),c.substring(d,e)]}_prepareRender(a){let b="",c="",[d,e]=this._getGraphemeAwarePosition(),f=this._context.viewLayout.getLineHeightForLineNumber(d.lineNumber),g=0===this._lineCursorHeight?f:Math.min(f,this._lineCursorHeight),h=(f-g)/2;if(this._cursorStyle===U.m9.Line||this._cursorStyle===U.m9.LineThin){let f,i=a.visibleRangeForPosition(d);if(!i||i.outsideRenderedLine)return null;let j=(0,D.zk)(this._domNode.domNode);this._cursorStyle===U.m9.Line?(f=(0,D.vT)(j,this._lineCursorWidth>0?this._lineCursorWidth:2))>2&&(b=e,c=this._getTokenClassName(d)):f=(0,D.vT)(j,1);let k=i.left,l=0;return f>=2&&k>=1&&(k-=l=1),new cL(a.getVerticalOffsetForLineNumber(d.lineNumber)-a.bigNumbersDelta+h,k,l,f,g,b,c)}let i=a.linesVisibleRangesForRange(new aE.Q(d.lineNumber,d.column,d.lineNumber,d.column+e.length),!1);if(!i||0===i.length)return null;let j=i[0];if(j.outsideRenderedLine||0===j.ranges.length)return null;let k=j.ranges[0],l=" "===e||k.width<1?this._typicalHalfwidthCharacterWidth:k.width;this._cursorStyle===U.m9.Block&&(b=e,c=this._getTokenClassName(d));let m=a.getVerticalOffsetForLineNumber(d.lineNumber)-a.bigNumbersDelta,n=f;return(this._cursorStyle===U.m9.Underline||this._cursorStyle===U.m9.UnderlineThin)&&(m+=f-2,n=2),new cL(m,k.left,0,l,n,b,c)}_getTokenClassName(a){let b=this._context.viewModel.getViewLineData(a.lineNumber),c=b.tokens.findTokenIndexAtOffset(a.column-1);return b.tokens.getClassName(c)}prepareRender(a){this._renderData=this._prepareRender(a)}render(a){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${b_} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class cN extends aA{static{this.BLINK_INTERVAL=500}constructor(a){super(a);const b=this._context.configuration.options;this._readOnly=b.get(104),this._cursorBlinking=b.get(32),this._cursorStyle=b.get(161),this._cursorSmoothCaretAnimation=b.get(33),this._editContextEnabled=b.get(170),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new cM(this._context,p.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,ae.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new aj.pc,this._cursorFlatBlinkInterval=new D.Be,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(a){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(a){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(a){let b=this._context.configuration.options;this._readOnly=b.get(104),this._cursorBlinking=b.get(32),this._cursorStyle=b.get(161),this._cursorSmoothCaretAnimation=b.get(33),this._editContextEnabled=b.get(170),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(a);for(let b=0,c=this._secondaryCursors.length;b<c;b++)this._secondaryCursors[b].onConfigurationChanged(a);return!0}_onCursorPositionChanged(a,b,c){let d=this._secondaryCursors.length!==b.length||"explicit"===this._cursorSmoothCaretAnimation&&3!==c;if(this._primaryCursor.setPlurality(b.length?p.MultiPrimary:p.Single),this._primaryCursor.onCursorPositionChanged(a,d),this._updateBlinking(),this._secondaryCursors.length<b.length){let a=b.length-this._secondaryCursors.length;for(let b=0;b<a;b++){let a=new cM(this._context,p.MultiSecondary);this._domNode.domNode.insertBefore(a.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(a)}}else if(this._secondaryCursors.length>b.length){let a=this._secondaryCursors.length-b.length;for(let b=0;b<a;b++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let a=0;a<b.length;a++)this._secondaryCursors[a].onCursorPositionChanged(b[a],d)}onCursorStateChanged(a){let b=[];for(let c=0,d=a.selections.length;c<d;c++)b[c]=a.selections[c].getPosition();this._onCursorPositionChanged(b[0],b.slice(1),a.reason);let c=a.selections[0].isEmpty();return this._selectionIsEmpty!==c&&(this._selectionIsEmpty=c,this._updateDomClassName()),!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onFocusChanged(a){return this._editorHasFocus=a.isFocused,this._updateBlinking(),!1}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return!0}onTokensChanged(a){let b=b=>{for(let c=0,d=a.ranges.length;c<d;c++)if(a.ranges[c].fromLineNumber<=b.lineNumber&&b.lineNumber<=a.ranges[c].toLineNumber)return!0;return!1};if(b(this._primaryCursor.getPosition()))return!0;for(let a of this._secondaryCursors)if(b(a.getPosition()))return!0;return!1}onZonesChanged(a){return!0}_getCursorBlinking(){return(!this._isComposingInput||this._editContextEnabled)&&this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();let a=this._getCursorBlinking(),b=0===a;b?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),b||5===a||(1===a?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},cN.BLINK_INTERVAL,(0,D.zk)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},cN.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let a="cursors-layer";switch(!this._selectionIsEmpty&&(a+=" has-selection"),this._cursorStyle){case U.m9.Line:a+=" cursor-line-style";break;case U.m9.Block:a+=" cursor-block-style";break;case U.m9.Underline:a+=" cursor-underline-style";break;case U.m9.LineThin:a+=" cursor-line-thin-style";break;case U.m9.BlockOutline:a+=" cursor-block-outline-style";break;case U.m9.UnderlineThin:a+=" cursor-underline-thin-style";break;default:a+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:a+=" cursor-blink";break;case 2:a+=" cursor-smooth";break;case 3:a+=" cursor-phase";break;case 4:a+=" cursor-expand";break;default:a+=" cursor-solid"}else a+=" cursor-solid";return("on"===this._cursorSmoothCaretAnimation||"explicit"===this._cursorSmoothCaretAnimation)&&(a+=" cursor-smooth-caret-animation"),a}_show(){this._primaryCursor.show();for(let a=0,b=this._secondaryCursors.length;a<b;a++)this._secondaryCursors[a].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let a=0,b=this._secondaryCursors.length;a<b;a++)this._secondaryCursors[a].hide();this._isVisible=!1}prepareRender(a){this._primaryCursor.prepareRender(a);for(let b=0,c=this._secondaryCursors.length;b<c;b++)this._secondaryCursors[b].prepareRender(a)}render(a){let b=[],c=0,d=this._primaryCursor.render(a);d&&(b[c++]=d);for(let d=0,e=this._secondaryCursors.length;d<e;d++){let e=this._secondaryCursors[d].render(a);e&&(b[c++]=e)}this._renderData=b}getLastRenderData(){return this._renderData}}(0,bG.zy)((a,b)=>{for(let c of[{class:".cursor",foreground:bF.D0,background:bF.kM},{class:".cursor-primary",foreground:bF.sC,background:bF.je},{class:".cursor-secondary",foreground:bF.we,background:bF.L0}]){let d=a.getColor(c.foreground);if(d){let e=a.getColor(c.background);e||(e=d.opposite()),b.addRule(`.monaco-editor .cursors-layer ${c.class} { background-color: ${d}; border-color: ${d}; color: ${e}; }`),(0,bH.Bb)(a.type)&&b.addRule(`.monaco-editor .cursors-layer.has-selection ${c.class} { border-left: 1px solid ${e}; border-right: 1px solid ${e}; }`)}}});let cO=()=>{throw Error("Invalid change accessor")};class cP extends aA{constructor(a){super(a);const b=this._context.configuration.options,c=b.get(165);this._lineHeight=b.get(75),this._contentWidth=c.contentWidth,this._contentLeft=c.contentLeft,this.domNode=(0,ae.Z)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,ae.Z)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){let a=this._context.viewLayout.getWhitespaces(),b=new Map;for(let c of a)b.set(c.id,c);let c=!1;return this._context.viewModel.changeWhitespace(a=>{let d=Object.keys(this._zones);for(let e=0,f=d.length;e<f;e++){let f=d[e],g=this._zones[f],h=this._computeWhitespaceProps(g.delegate);g.isInHiddenArea=h.isInHiddenArea;let i=b.get(f);i&&(i.afterLineNumber!==h.afterViewLineNumber||i.height!==h.heightInPx)&&(a.changeOneWhitespace(f,h.afterViewLineNumber,h.heightInPx),this._safeCallOnComputedHeight(g.delegate,h.heightInPx),c=!0)}}),c}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(165);return this._lineHeight=b.get(75),this._contentWidth=c.contentWidth,this._contentLeft=c.contentLeft,a.hasChanged(75)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(a){return this._recomputeWhitespacesProps()}onLinesDeleted(a){return!0}onScrollChanged(a){return a.scrollTopChanged||a.scrollWidthChanged}onZonesChanged(a){return!0}onLinesInserted(a){return!0}_getZoneOrdinal(a){return a.ordinal??a.afterColumn??1e4}_computeWhitespaceProps(a){let b,c;if(0===a.afterLineNumber)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(a),minWidthInPx:this._minWidthInPixels(a)};if(void 0!==a.afterColumn)b=this._context.viewModel.model.validatePosition({lineNumber:a.afterLineNumber,column:a.afterColumn});else{let c=this._context.viewModel.model.validatePosition({lineNumber:a.afterLineNumber,column:1}).lineNumber;b=new aD.y(c,this._context.viewModel.model.getLineMaxColumn(c))}c=b.column===this._context.viewModel.model.getLineMaxColumn(b.lineNumber)?this._context.viewModel.model.validatePosition({lineNumber:b.lineNumber+1,column:1}):this._context.viewModel.model.validatePosition({lineNumber:b.lineNumber,column:b.column+1});let d=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(b,a.afterColumnAffinity,!0),e=a.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(c);return{isInHiddenArea:!e,afterViewLineNumber:d.lineNumber,heightInPx:e?this._heightInPixels(a):0,minWidthInPx:this._minWidthInPixels(a)}}changeViewZones(a){let b=!1;return this._context.viewModel.changeWhitespace(c=>{let d={addZone:a=>(b=!0,this._addZone(c,a)),removeZone:a=>{a&&(b=this._removeZone(c,a)||b)},layoutZone:a=>{a&&(b=this._layoutZone(c,a)||b)}};(function(a,b){try{a(b)}catch(a){(0,E.dz)(a);return}})(a,d),d.addZone=cO,d.removeZone=cO,d.layoutZone=cO}),b}_addZone(a,b){let c=this._computeWhitespaceProps(b),d={whitespaceId:a.insertWhitespace(c.afterViewLineNumber,this._getZoneOrdinal(b),c.heightInPx,c.minWidthInPx),delegate:b,isInHiddenArea:c.isInHiddenArea,isVisible:!1,domNode:(0,ae.Z)(b.domNode),marginDomNode:b.marginDomNode?(0,ae.Z)(b.marginDomNode):null};return this._safeCallOnComputedHeight(d.delegate,c.heightInPx),d.domNode.setPosition("absolute"),d.domNode.domNode.style.width="100%",d.domNode.setDisplay("none"),d.domNode.setAttribute("monaco-view-zone",d.whitespaceId),this.domNode.appendChild(d.domNode),d.marginDomNode&&(d.marginDomNode.setPosition("absolute"),d.marginDomNode.domNode.style.width="100%",d.marginDomNode.setDisplay("none"),d.marginDomNode.setAttribute("monaco-view-zone",d.whitespaceId),this.marginDomNode.appendChild(d.marginDomNode)),this._zones[d.whitespaceId]=d,this.setShouldRender(),d.whitespaceId}_removeZone(a,b){if(this._zones.hasOwnProperty(b)){let c=this._zones[b];return delete this._zones[b],a.removeWhitespace(c.whitespaceId),c.domNode.removeAttribute("monaco-visible-view-zone"),c.domNode.removeAttribute("monaco-view-zone"),c.domNode.domNode.remove(),c.marginDomNode&&(c.marginDomNode.removeAttribute("monaco-visible-view-zone"),c.marginDomNode.removeAttribute("monaco-view-zone"),c.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(a,b){if(this._zones.hasOwnProperty(b)){let c=this._zones[b],d=this._computeWhitespaceProps(c.delegate);return c.isInHiddenArea=d.isInHiddenArea,a.changeOneWhitespace(c.whitespaceId,d.afterViewLineNumber,d.heightInPx),this._safeCallOnComputedHeight(c.delegate,d.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(a){return!!this._zones.hasOwnProperty(a)&&!!this._zones[a].delegate.suppressMouseDown}_heightInPixels(a){return"number"==typeof a.heightInPx?a.heightInPx:"number"==typeof a.heightInLines?this._lineHeight*a.heightInLines:this._lineHeight}_minWidthInPixels(a){return"number"==typeof a.minWidthInPx?a.minWidthInPx:0}_safeCallOnComputedHeight(a,b){if("function"==typeof a.onComputedHeight)try{a.onComputedHeight(b)}catch(a){(0,E.dz)(a)}}_safeCallOnDomNodeTop(a,b){if("function"==typeof a.onDomNodeTop)try{a.onDomNodeTop(b)}catch(a){(0,E.dz)(a)}}prepareRender(a){}render(a){let b=a.viewportData.whitespaceViewportData,c={},d=!1;for(let a of b)this._zones[a.id].isInHiddenArea||(c[a.id]=a,d=!0);let e=Object.keys(this._zones);for(let b=0,d=e.length;b<d;b++){let d=e[b],f=this._zones[d],g=0,h=0,i="none";c.hasOwnProperty(d)?(g=c[d].verticalOffset-a.bigNumbersDelta,h=c[d].height,i="block",f.isVisible||(f.domNode.setAttribute("monaco-visible-view-zone","true"),f.isVisible=!0),this._safeCallOnDomNodeTop(f.delegate,a.getScrolledTopFromAbsoluteTop(c[d].verticalOffset))):(f.isVisible&&(f.domNode.removeAttribute("monaco-visible-view-zone"),f.isVisible=!1),this._safeCallOnDomNodeTop(f.delegate,a.getScrolledTopFromAbsoluteTop(-1e6))),f.domNode.setTop(g),f.domNode.setHeight(h),f.domNode.setDisplay(i),f.marginDomNode&&(f.marginDomNode.setTop(g),f.marginDomNode.setHeight(h),f.marginDomNode.setDisplay(i))}d&&(this.domNode.setWidth(Math.max(a.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}c(92312);var cQ=c(39482);class cR extends bE{constructor(a){super(),this._context=a,this._options=new cS(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){let b=new cS(this._context.configuration);return this._options.equals(b)?a.hasChanged(165):(this._options=b,!0)}onCursorStateChanged(a){return this._selection=a.selections,"selection"===this._options.renderWhitespace}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}prepareRender(a){if("none"===this._options.renderWhitespace){this._renderResult=null;return}this._renderResult=[];for(let b=a.viewportData.startLineNumber;b<=a.viewportData.endLineNumber;b++){let c=b-a.viewportData.startLineNumber,d=this._context.viewModel.getViewLineRenderingData(b),e=null;if("selection"===this._options.renderWhitespace)for(let a of this._selection){if(a.endLineNumber<b||a.startLineNumber>b)continue;let c=a.startLineNumber===b?a.startColumn:d.minColumn,f=a.endLineNumber===b?a.endColumn:d.maxColumn;c<f&&(e||(e=[]),e.push(new cQ.L(c-1,f-1)))}this._renderResult[c]=this._applyRenderWhitespace(a,b,e,d)}}_applyRenderWhitespace(a,b,c,d){let e;if("selection"===this._options.renderWhitespace&&!c||"trailing"===this._options.renderWhitespace&&d.continuesWithWrappedLine)return"";let f=this._context.theme.getColor(bF.w4),g=this._options.renderWithSVG,h=d.content,i=-1===this._options.stopRenderingLineAfter?h.length:Math.min(this._options.stopRenderingLineAfter,h.length),j=d.continuesWithWrappedLine,k=d.minColumn-1,l="boundary"===this._options.renderWhitespace,m="trailing"===this._options.renderWhitespace,n=a.getLineHeightForLineNumber(b),o=this._options.middotWidth,p=this._options.wsmiddotWidth,q=this._options.spaceWidth,r=Math.abs(p-q)<Math.abs(o-q)?11825:183,s=this._options.canUseHalfwidthRightwardsArrow,t="",u=!1,v=(0,a9.HG)(h);-1===v?(u=!0,v=i,e=i):e=(0,a9.lT)(h);let w=0,x=c&&c[w],y=0;for(let d=k;d<i;d++){let f=h.charCodeAt(d);if(x&&x.endExclusive<=d&&(w++,x=c&&c[w]),9!==f&&32!==f||m&&!u&&d<=e)continue;if(l&&d>=v&&d<=e&&32===f){let a=d-1>=0?h.charCodeAt(d-1):0,b=d+1<i?h.charCodeAt(d+1):0;if(32!==a&&32!==b)continue}if(l&&j&&d===i-1){let a=d-1>=0?h.charCodeAt(d-1):0;if(32===f&&32!==a&&9!==a)continue}if(c&&!(x&&x.start<=d&&d<x.endExclusive))continue;let k=a.visibleRangeForPosition(new aD.y(b,d+1));k&&(g?(y=Math.max(y,k.left),9===f?t+=this._renderArrow(n,q,k.left):t+=`<circle cx="${(k.left+q/2).toFixed(2)}" cy="${(n/2).toFixed(2)}" r="${(q/7).toFixed(2)}" />`):9===f?t+=`<div class="mwh" style="left:${k.left}px;height:${n}px;">${s?String.fromCharCode(65515):String.fromCharCode(8594)}</div>`:t+=`<div class="mwh" style="left:${k.left}px;height:${n}px;">${String.fromCharCode(r)}</div>`)}return g?(y=Math.round(y+q),`<svg style="bottom:0;position:absolute;width:${y}px;height:${n}px" viewBox="0 0 ${y} ${n}" xmlns="http://www.w3.org/2000/svg" fill="${f}">`+t+"</svg>"):t}_renderArrow(a,b,c){let d=a/2,e={x:0,y:b/7/2},f={x:.8*b,y:e.y},g={x:f.x-.2*f.x,y:f.y+.2*f.x},h={x:g.x+.1*f.x,y:g.y+.1*f.x},i={x:h.x+.35*f.x,y:h.y-.35*f.x},j={x:i.x,y:-i.y},k={x:h.x,y:-h.y},l={x:g.x,y:-g.y},m={x:f.x,y:-f.y},n={x:e.x,y:-e.y},o=[e,f,g,h,i,j,k,l,m,n].map(a=>`${(c+a.x).toFixed(2)} ${(d+a.y).toFixed(2)}`).join(" L ");return`<path d="M ${o}" />`}render(a,b){if(!this._renderResult)return"";let c=b-a;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}class cS{constructor(a){const b=a.options,c=b.get(59),d=b.get(47);"off"===d?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===d?(this.renderWhitespace=b.get(113),this.renderWithSVG=!0):(this.renderWhitespace=b.get(113),this.renderWithSVG=!1),this.spaceWidth=c.spaceWidth,this.middotWidth=c.middotWidth,this.wsmiddotWidth=c.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=c.canUseHalfwidthRightwardsArrow,this.lineHeight=b.get(75),this.stopRenderingLineAfter=b.get(133)}equals(a){return this.renderWhitespace===a.renderWhitespace&&this.renderWithSVG===a.renderWithSVG&&this.spaceWidth===a.spaceWidth&&this.middotWidth===a.middotWidth&&this.wsmiddotWidth===a.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===a.canUseHalfwidthRightwardsArrow&&this.lineHeight===a.lineHeight&&this.stopRenderingLineAfter===a.stopRenderingLineAfter}}class cT{constructor(a,b,c,d){this.selections=a,this.startLineNumber=0|b.startLineNumber,this.endLineNumber=0|b.endLineNumber,this.relativeVerticalOffset=b.relativeVerticalOffset,this.bigNumbersDelta=0|b.bigNumbersDelta,this.lineHeight=0|b.lineHeight,this.whitespaceViewportData=c,this._model=d,this.visibleRange=new aE.Q(b.startLineNumber,this._model.getLineMinColumn(b.startLineNumber),b.endLineNumber,this._model.getLineMaxColumn(b.endLineNumber))}getViewLineRenderingData(a){return this._model.getViewportViewLineRenderingData(this.visibleRange,a)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class cU{get type(){return this._theme.type}get value(){return this._theme}constructor(a){this._theme=a}update(a){this._theme=a}getColor(a){return this._theme.getColor(a)}}class cV{constructor(a,b,c){this.configuration=a,this.theme=new cU(b),this.viewModel=c,this.viewLayout=c.viewLayout}addEventHandler(a){this.viewModel.addViewEventHandler(a)}removeEventHandler(a){this.viewModel.removeViewEventHandler(a)}}var cW=c(58254),cX=c(72816),cY=c(90605),cZ=c(70233);let c$=new Float32Array([1,0,1,1,0,1,0,0,0,1,1,0]);function c_(a){if(!a)throw Error(`Value "${a}" cannot be null`);return a}function c0(a,b,c){let d=new b.ResizeObserver(b=>{let e=b.find(b=>b.target===a);if(!e)return;if(!("devicePixelContentBoxSize"in e)){d?.disconnect(),d=void 0;return}let f=e.devicePixelContentBoxSize[0].inlineSize,g=e.devicePixelContentBoxSize[0].blockSize;f>0&&g>0&&c(f,g)});try{d.observe(a,{box:["device-pixel-content-box"]})}catch{throw d.disconnect(),d=void 0,new E.D7("Could not observe device pixel dimensions")}return(0,G.s)(()=>d?.disconnect())}let c1=0;class c2 extends G.jG{get cacheKey(){return`${this.fontFamily}_${this.fontSize}px`}constructor(a,b,c,d){super(),this.fontSize=a,this.fontFamily=b,this.devicePixelRatio=c,this._decorationStyleCache=d,this.id=c1++,this._workGlyph={source:null,boundingBox:{left:0,bottom:0,right:0,top:0},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0},this._workGlyphConfig={chars:void 0,tokenMetadata:0,decorationStyleSetId:0},this._antiAliasing=M.zx?"greyscale":"subpixel";const e=Math.ceil(this.fontSize*c);this._canvas=new OffscreenCanvas(3*e,3*e),this._ctx=c_(this._canvas.getContext("2d",{willReadFrequently:!0,alpha:"greyscale"===this._antiAliasing})),this._ctx.textBaseline="top",this._ctx.fillStyle="#FFFFFF",this._ctx.font=`${e}px ${this.fontFamily}`,this._textMetrics=this._ctx.measureText("A")}rasterizeGlyph(a,b,c,d){return""===a?{source:this._canvas,boundingBox:{top:0,left:0,bottom:-1,right:-1},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0}:this._workGlyphConfig.chars===a&&this._workGlyphConfig.tokenMetadata===b&&this._workGlyphConfig.decorationStyleSetId===c?this._workGlyph:(this._workGlyphConfig.chars=a,this._workGlyphConfig.tokenMetadata=b,this._workGlyphConfig.decorationStyleSetId=c,this._rasterizeGlyph(a,b,c,d))}_rasterizeGlyph(a,b,c,d){let e=Math.ceil(this.fontSize*this.devicePixelRatio),f=3*e;this._canvas.width!==f&&(this._canvas.width=f,this._canvas.height=f),this._ctx.save();let g=(15&b)/10,h=d[cZ.x.getBackground(b)]??d[2],i=this._decorationStyleCache.getStyleSet(c);"subpixel"===this._antiAliasing?(this._ctx.fillStyle=h,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height)):this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);let j=new bo.fe(200),k=cZ.x.getFontStyle(b);if(1&k&&j.appendString("italic "),i?.bold!==void 0?i.bold&&j.appendString("bold "):2&k&&j.appendString("bold "),j.appendString(`${e}px ${this.fontFamily}`),this._ctx.font=j.build(),i?.color!==void 0?this._ctx.fillStyle=`#${i.color.toString(16).padStart(8,"0")}`:this._ctx.fillStyle=d[cZ.x.getForeground(b)],i?.opacity!==void 0&&(this._ctx.globalAlpha=i.opacity),this._ctx.textBaseline="top",this._ctx.fillText(a,e+g,e),i?.strikethrough){let a=Math.round(e-.65*this._textMetrics.alphabeticBaseline),b=i?.strikethroughThickness!==void 0?Math.round(i.strikethroughThickness*this.devicePixelRatio):Math.max(1,Math.floor(e/10));i?.strikethroughColor!==void 0&&(this._ctx.fillStyle=`#${i.strikethroughColor.toString(16).padStart(8,"0")}`),this._ctx.fillRect(e,a-Math.floor(b/2),Math.ceil(this._textMetrics.width),b)}this._ctx.restore();let l=this._ctx.getImageData(0,0,this._canvas.width,this._canvas.height);if("subpixel"===this._antiAliasing){let a=parseInt(h.substring(1,3),16),b=parseInt(h.substring(3,5),16),c=parseInt(h.substring(5,7),16);this._clearColor(l,a,b,c),this._ctx.putImageData(l,0,0)}return this._findGlyphBoundingBox(l,this._workGlyph.boundingBox),this._workGlyph.source=this._canvas,this._workGlyph.originOffset.x=this._workGlyph.boundingBox.left-e,this._workGlyph.originOffset.y=this._workGlyph.boundingBox.top-e,this._workGlyph.fontBoundingBoxAscent=this._textMetrics.fontBoundingBoxAscent,this._workGlyph.fontBoundingBoxDescent=this._textMetrics.fontBoundingBoxDescent,this._workGlyph}_clearColor(a,b,c,d){for(let e=0;e<a.data.length;e+=4)a.data[e]===b&&a.data[e+1]===c&&a.data[e+2]===d&&(a.data[e+3]=0)}_findGlyphBoundingBox(a,b){let c=this._canvas.height,d=this._canvas.width,e=!1;for(let f=0;f<c;f++){for(let c=0;c<d;c++){let g=f*d*4+4*c+3;if(0!==a.data[g]){b.top=f,e=!0;break}}if(e)break}b.left=0,e=!1;for(let f=0;f<d;f++){for(let g=0;g<c;g++){let c=g*d*4+4*f+3;if(0!==a.data[c]){b.left=f,e=!0;break}}if(e)break}b.right=d,e=!1;for(let f=d-1;f>=b.left;f--){for(let g=0;g<c;g++){let c=g*d*4+4*f+3;if(0!==a.data[c]){b.right=f,e=!0;break}}if(e)break}b.bottom=b.top,e=!1;for(let f=c-1;f>=0;f--){for(let c=0;c<d;c++){let g=f*d*4+4*c+3;if(0!==a.data[g]){b.bottom=f,e=!0;break}}if(e)break}}getTextMetrics(a){return this._ctx.measureText(a)}}!function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);f>3&&g&&Object.defineProperty(b,c,g)}([cY.B],c2.prototype,"cacheKey",null);let c3=class extends G.jG{constructor(a){super(),this._logService=a,this._tasks=[],this._i=0,this._register((0,G.s)(()=>this.clear()))}enqueue(a){this._tasks.push(a),this._start()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(a){this._idleCallback=void 0;let b=0,c=0,d=a.timeRemaining(),e=0;for(;this._i<this._tasks.length;){if(b=Date.now(),!this._tasks[this._i]()&&this._i++,1.5*(c=Math.max(b=Math.max(1,Date.now()-b),c))>(e=a.timeRemaining())){d-b<-20&&this._logService.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(d-b))}ms`),this._start();return}d=e}this.clear()}};c3=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([(g=ba.rr,function(a,b){g(a,b,0)})],c3);class c4 extends c3{_requestCallback(a){return(0,D.fz)().setTimeout(()=>a(this._createDeadline(16)))}_cancelCallback(a){(0,D.fz)().clearTimeout(a)}_createDeadline(a){let b=Date.now()+a;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}class c5 extends c3{_requestCallback(a){return(0,D.fz)().requestIdleCallback(a)}_cancelCallback(a){(0,D.fz)().cancelIdleCallback(a)}}let c6="requestIdleCallback"in(0,D.fz)()?c5:c4;class c7{constructor(a,b){this._canvas=a,this._textureIndex=b,this._currentRow={x:0,y:0,h:0},this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=c_(this._canvas.getContext("2d",{willReadFrequently:!0}))}allocate(a){let b=a.boundingBox.right-a.boundingBox.left+1,c=a.boundingBox.bottom-a.boundingBox.top+1;if(b>this._canvas.width||c>this._canvas.height)throw new E.D7("Glyph is too large for the atlas page");if(a.boundingBox.right-a.boundingBox.left+1>this._canvas.width-this._currentRow.x&&(this._currentRow.x=0,this._currentRow.y+=this._currentRow.h,this._currentRow.h=1),this._currentRow.y+a.boundingBox.bottom-a.boundingBox.top+1>this._canvas.height)return;this._ctx.drawImage(a.source,a.boundingBox.left,a.boundingBox.top,b,c,this._currentRow.x,this._currentRow.y,b,c);let d={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:this._currentRow.x,y:this._currentRow.y,w:b,h:c,originOffsetX:a.originOffset.x,originOffsetY:a.originOffset.y,fontBoundingBoxAscent:a.fontBoundingBoxAscent,fontBoundingBoxDescent:a.fontBoundingBoxDescent};return this._currentRow.x+=b,this._currentRow.h=Math.max(this._currentRow.h,c),this._allocatedGlyphs.add(d),d}getUsagePreview(){let a=this._canvas.width,b=this._canvas.height,c=new OffscreenCanvas(a,b),d=c_(c.getContext("2d"));d.fillStyle="#808080",d.fillRect(0,0,a,b);let e=new Map,f=new Map;for(let a of this._allocatedGlyphs)e.set(a.y,Math.max(e.get(a.y)??0,a.h)),f.set(a.y,Math.max(f.get(a.y)??0,a.x+a.w));for(let a of this._allocatedGlyphs)d.fillStyle="#4040FF",d.fillRect(a.x,a.y,a.w,a.h),d.fillStyle="#FF0000",d.fillRect(a.x,a.y+a.h,a.w,e.get(a.y)-a.h);for(let[b,c]of f.entries())b!==this._currentRow.y&&(d.fillStyle="#FF0000",d.fillRect(c,b,a-c,e.get(b)));return c.convertToBlob()}getStats(){let a=this._canvas.width,b=this._canvas.height,c=0,d=0,e=a*b,f=new Map,g=new Map;for(let a of this._allocatedGlyphs)f.set(a.y,Math.max(f.get(a.y)??0,a.h)),g.set(a.y,Math.max(g.get(a.y)??0,a.x+a.w));for(let a of this._allocatedGlyphs)c+=a.w*a.h,d+=a.w*(f.get(a.y)-a.h);for(let[b,c]of g.entries())b!==this._currentRow.y&&(d+=(a-c)*f.get(b));return`page${this._textureIndex}:
525
+ target: ${this.target?this.target.outerHTML:null}`}get wouldBenefitFromHitTestTargetSwitch(){return!this._useHitTestTarget&&null!==this.hitTestResult.value.hitTarget&&this.target!==this.hitTestResult.value.hitTarget}switchToHitTestTarget(){this._useHitTestTarget=!0}_getMouseColumn(a=null){return a&&a.column<this._ctx.viewModel.getLineMaxColumn(a.lineNumber)?aF.A.visibleColumnFromColumn(this._ctx.viewModel.getLineContent(a.lineNumber),a.column,this._ctx.viewModel.model.getOptions().tabSize)+1:this.mouseColumn}fulfillUnknown(a=null){return aM.createUnknown(this.target,this._getMouseColumn(a),a)}fulfillTextarea(){return aM.createTextarea(this.target,this._getMouseColumn())}fulfillMargin(a,b,c,d){return aM.createMargin(a,this.target,this._getMouseColumn(b),b,c,d)}fulfillViewZone(a,b,c){return aM.createViewZone(a,this.target,this._getMouseColumn(),b,c)}fulfillContentText(a,b,c){return aM.createContentText(this.target,this._getMouseColumn(a),a,b,c)}fulfillContentEmpty(a,b){return aM.createContentEmpty(this.target,this._getMouseColumn(a),a,b)}fulfillContentWidget(a){return aM.createContentWidget(this.target,this._getMouseColumn(),a)}fulfillScrollbar(a){return aM.createScrollbar(this.target,this._getMouseColumn(a),a)}fulfillOverlayWidget(a){return aM.createOverlayWidget(this.target,this._getMouseColumn(),a)}}let aR={isAfterLines:!0};function aS(a){return{isAfterLines:!1,horizontalDistanceToText:a}}class aT{constructor(a,b){this._context=a,this._viewHelper=b}mouseTargetIsWidget(a){let b=a.target,c=aB.collect(b,this._viewHelper.viewDomNode);return!!(aN.isChildOfContentWidgets(c)||aN.isChildOfOverflowingContentWidgets(c)||aN.isChildOfOverlayWidgets(c)||aN.isChildOfOverflowingOverlayWidgets(c))}createMouseTarget(a,b,c,d,e){let f=new aO(this._context,this._viewHelper,a),g=new aQ(f,b,c,d,e);try{let a=aT._createMouseTarget(f,g);if(6===a.type&&f.stickyTabStops&&null!==a.position){let b=aT._snapToSoftTabBoundary(a.position,f.viewModel),c=aE.Q.fromPositions(b,b).plusRange(a.range);return g.fulfillContentText(b,c,a.detail)}return a}catch(a){return g.fulfillUnknown()}}static _createMouseTarget(a,b){if(null===b.target)return b.fulfillUnknown();let c=null;return aN.isChildOfOverflowGuard(b.targetPath)||aN.isChildOfOverflowingContentWidgets(b.targetPath)||aN.isChildOfOverflowingOverlayWidgets(b.targetPath)||(c=c||b.fulfillUnknown()),(c=(c=(c=(c=(c=(c=(c=(c=(c=(c=c||aT._hitTestContentWidget(a,b))||aT._hitTestOverlayWidget(a,b))||aT._hitTestMinimap(a,b))||aT._hitTestScrollbarSlider(a,b))||aT._hitTestViewZone(a,b))||aT._hitTestMargin(a,b))||aT._hitTestViewCursor(a,b))||aT._hitTestTextArea(a,b))||aT._hitTestViewLines(a,b))||aT._hitTestScrollbar(a,b))||b.fulfillUnknown()}static _hitTestContentWidget(a,b){if(aN.isChildOfContentWidgets(b.targetPath)||aN.isChildOfOverflowingContentWidgets(b.targetPath)){let c=a.findAttribute(b.target,"widgetId");return c?b.fulfillContentWidget(c):b.fulfillUnknown()}return null}static _hitTestOverlayWidget(a,b){if(aN.isChildOfOverlayWidgets(b.targetPath)||aN.isChildOfOverflowingOverlayWidgets(b.targetPath)){let c=a.findAttribute(b.target,"widgetId");return c?b.fulfillOverlayWidget(c):b.fulfillUnknown()}return null}static _hitTestViewCursor(a,b){if(b.target){for(let c of a.lastRenderData.lastViewCursorsRenderData)if(b.target===c.domNode)return b.fulfillContentText(c.position,null,{mightBeForeignElement:!1,injectedText:null})}if(b.isInContentArea){let c=a.lastRenderData.lastViewCursorsRenderData,d=b.mouseContentHorizontalOffset,e=b.mouseVerticalOffset;for(let f of c){if(d<f.contentLeft||d>f.contentLeft+f.width)continue;let c=a.getVerticalOffsetForLineNumber(f.position.lineNumber);if(c<=e&&e<=c+f.height)return b.fulfillContentText(f.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(a,b){let c=a.getZoneAtCoord(b.mouseVerticalOffset);if(c){let a=b.isInContentArea?8:5;return b.fulfillViewZone(a,c.position,c)}return null}static _hitTestTextArea(a,b){return aN.isTextArea(b.targetPath)?a.lastRenderData.lastTextareaPosition?b.fulfillContentText(a.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):b.fulfillTextarea():null}static _hitTestMargin(a,b){if(b.isInMarginArea){let c=a.getFullLineRangeAtCoord(b.mouseVerticalOffset),d=c.range.getStartPosition(),e=Math.abs(b.relativePos.x),f={isAfterLines:c.isAfterLines,glyphMarginLeft:a.layoutInfo.glyphMarginLeft,glyphMarginWidth:a.layoutInfo.glyphMarginWidth,lineNumbersWidth:a.layoutInfo.lineNumbersWidth,offsetX:e};if((e-=a.layoutInfo.glyphMarginLeft)<=a.layoutInfo.glyphMarginWidth){let g=a.viewModel.coordinatesConverter.convertViewPositionToModelPosition(c.range.getStartPosition());return f.glyphMarginLane=a.viewModel.glyphLanes.getLanesAtLine(g.lineNumber)[Math.floor(e/a.lineHeight)],b.fulfillMargin(2,d,c.range,f)}return(e-=a.layoutInfo.glyphMarginWidth)<=a.layoutInfo.lineNumbersWidth?b.fulfillMargin(3,d,c.range,f):(e-=a.layoutInfo.lineNumbersWidth,b.fulfillMargin(4,d,c.range,f))}return null}static _hitTestViewLines(a,b){if(!aN.isChildOfViewLines(b.targetPath))return null;if(a.isInTopPadding(b.mouseVerticalOffset))return b.fulfillContentEmpty(new aD.y(1,1),aR);if(a.isAfterLines(b.mouseVerticalOffset)||a.isInBottomPadding(b.mouseVerticalOffset)){let c=a.viewModel.getLineCount(),d=a.viewModel.getLineMaxColumn(c);return b.fulfillContentEmpty(new aD.y(c,d),aR)}if(aN.isStrictChildOfViewLines(b.targetPath)){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),d=a.viewModel.getLineLength(c),e=a.getLineWidth(c);if(0===d){let a=aS(b.mouseContentHorizontalOffset-e);return b.fulfillContentEmpty(new aD.y(c,1),a)}if(a.isRtl(c)){if(b.mouseContentHorizontalOffset+e<=a.layoutInfo.contentWidth-a.layoutInfo.verticalScrollbarWidth){let d=aS(b.mouseContentHorizontalOffset-e),f=new aD.y(c,a.viewModel.getLineMaxColumn(c));return b.fulfillContentEmpty(f,d)}}else if(b.mouseContentHorizontalOffset>=e){let d=aS(b.mouseContentHorizontalOffset-e),f=new aD.y(c,a.viewModel.getLineMaxColumn(c));return b.fulfillContentEmpty(f,d)}}else if(a.viewLinesGpu){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset);if(0===a.viewModel.getLineLength(c)){let d=a.getLineWidth(c),e=aS(b.mouseContentHorizontalOffset-d);return b.fulfillContentEmpty(new aD.y(c,1),e)}let d=a.getLineWidth(c);if(a.isRtl(c)){if(b.mouseContentHorizontalOffset+d<=a.layoutInfo.contentWidth-a.layoutInfo.verticalScrollbarWidth){let e=aS(b.mouseContentHorizontalOffset-d),f=new aD.y(c,a.viewModel.getLineMaxColumn(c));return b.fulfillContentEmpty(f,e)}}else if(b.mouseContentHorizontalOffset>=d){let e=aS(b.mouseContentHorizontalOffset-d),f=new aD.y(c,a.viewModel.getLineMaxColumn(c));return b.fulfillContentEmpty(f,e)}let e=a.viewLinesGpu.getPositionAtCoordinate(c,b.mouseContentHorizontalOffset);if(e)return b.fulfillContentText(e,aE.Q.fromPositions(e,e),{injectedText:null,mightBeForeignElement:!1})}let c=b.hitTestResult.value;return 1===c.type?aT.createMouseTargetFromHitTestPosition(a,b,c.spanNode,c.position,c.injectedText):b.wouldBenefitFromHitTestTargetSwitch?(b.switchToHitTestTarget(),this._createMouseTarget(a,b)):b.fulfillUnknown()}static _hitTestMinimap(a,b){if(aN.isChildOfMinimap(b.targetPath)){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),d=a.viewModel.getLineMaxColumn(c);return b.fulfillScrollbar(new aD.y(c,d))}return null}static _hitTestScrollbarSlider(a,b){if(aN.isChildOfScrollableElement(b.targetPath)&&b.target&&1===b.target.nodeType){let c=b.target.className;if(c&&/\b(slider|scrollbar)\b/.test(c)){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),d=a.viewModel.getLineMaxColumn(c);return b.fulfillScrollbar(new aD.y(c,d))}}return null}static _hitTestScrollbar(a,b){if(aN.isChildOfScrollableElement(b.targetPath)){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),d=a.viewModel.getLineMaxColumn(c);return b.fulfillScrollbar(new aD.y(c,d))}return null}getMouseColumn(a){let b=this._context.configuration.options,c=b.get(165),d=this._context.viewLayout.getCurrentScrollLeft()+a.x-c.contentLeft;return aT._getMouseColumn(d,b.get(59).typicalHalfwidthCharacterWidth)}static _getMouseColumn(a,b){return a<0?1:Math.round(a/b)+1}static createMouseTargetFromHitTestPosition(a,b,c,d,e){let f=d.lineNumber,g=d.column,h=a.getLineWidth(f);if(b.mouseContentHorizontalOffset>h){let a=aS(b.mouseContentHorizontalOffset-h);return b.fulfillContentEmpty(d,a)}let i=a.visibleRangeForPosition(f,g);if(!i)return b.fulfillUnknown(d);let j=i.left;if(1>Math.abs(b.mouseContentHorizontalOffset-j))return b.fulfillContentText(d,null,{mightBeForeignElement:!!e,injectedText:e});let k=[];if(k.push({offset:i.left,column:g}),g>1){let b=a.visibleRangeForPosition(f,g-1);b&&k.push({offset:b.left,column:g-1})}if(g<a.viewModel.getLineMaxColumn(f)){let b=a.visibleRangeForPosition(f,g+1);b&&k.push({offset:b.left,column:g+1})}k.sort((a,b)=>a.offset-b.offset);let l=b.pos.toClientCoordinates((0,D.zk)(a.viewDomNode)),m=c.getBoundingClientRect(),n=m.left<=l.clientX&&l.clientX<=m.right,o=null;for(let a=1;a<k.length;a++){let c=k[a-1],e=k[a];if(c.offset<=b.mouseContentHorizontalOffset&&b.mouseContentHorizontalOffset<=e.offset){o=new aE.Q(f,c.column,f,e.column),d=Math.abs(c.offset-b.mouseContentHorizontalOffset)<Math.abs(e.offset-b.mouseContentHorizontalOffset)?new aD.y(f,c.column):new aD.y(f,e.column);break}}return b.fulfillContentText(d,o,{mightBeForeignElement:!n||!!e,injectedText:e})}static _doHitTestWithCaretRangeFromPoint(a,b){let c=a.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),d=a.getVerticalOffsetForLineNumber(c),e=d+a.lineHeight;if(!(c===a.viewModel.getLineCount()&&b.mouseVerticalOffset>e)){let c=Math.floor((d+e)/2),f=b.pos.y+(c-b.mouseVerticalOffset);f<=b.editorPos.y&&(f=b.editorPos.y+1),f>=b.editorPos.y+b.editorPos.height&&(f=b.editorPos.y+b.editorPos.height-1);let g=new an(b.pos.x,f),h=this._actualDoHitTestWithCaretRangeFromPoint(a,g.toClientCoordinates((0,D.zk)(a.viewDomNode)));if(1===h.type)return h}return this._actualDoHitTestWithCaretRangeFromPoint(a,b.pos.toClientCoordinates((0,D.zk)(a.viewDomNode)))}static _actualDoHitTestWithCaretRangeFromPoint(a,b){let c,d=(0,D.jG)(a.viewDomNode);if(!(c=d?void 0===d.caretRangeFromPoint?function(a,b,c){let d=document.createRange(),e=a.elementFromPoint(b,c);if(e?.hasChildNodes()){let a;for(;e&&e.firstChild&&e.firstChild.nodeType!==e.firstChild.TEXT_NODE&&e.lastChild&&e.lastChild.firstChild;)e=e.lastChild;let c=e.getBoundingClientRect(),f=(0,D.zk)(e).getComputedStyle(e,null),g=f.getPropertyValue("font-style"),h=f.getPropertyValue("font-variant"),i=f.getPropertyValue("font-weight"),j=f.getPropertyValue("font-size"),k=f.getPropertyValue("line-height"),l=f.getPropertyValue("font-family"),m=`${g} ${h} ${i} ${j}/${k} ${l}`,n=e.innerText,o=c.left,p=0;if(b>c.left+c.width)p=n.length;else{let c=aU.getInstance();for(let d=0;d<n.length+1;d++){if(b<(o+=a=c.getCharWidth(n.charAt(d),m)/2)){p=d;break}o+=a}}d.setStart(e.firstChild,p),d.setEnd(e.firstChild,p)}return d}(d,b.clientX,b.clientY):d.caretRangeFromPoint(b.clientX,b.clientY):a.viewDomNode.ownerDocument.caretRangeFromPoint(b.clientX,b.clientY))||!c.startContainer)return new aJ;let e=c.startContainer;if(e.nodeType===e.TEXT_NODE){let b=e.parentNode,d=b?b.parentNode:null,f=d?d.parentNode:null;return(f&&f.nodeType===f.ELEMENT_NODE?f.className:null)===aC.G.CLASS_NAME?n.createFromDOMInfo(a,b,c.startOffset):new aJ(e.parentNode)}if(e.nodeType===e.ELEMENT_NODE){let b=e.parentNode,c=b?b.parentNode:null;return(c&&c.nodeType===c.ELEMENT_NODE?c.className:null)===aC.G.CLASS_NAME?n.createFromDOMInfo(a,e,e.textContent.length):new aJ(e)}return new aJ}static _doHitTestWithCaretPositionFromPoint(a,b){let c=a.viewDomNode.ownerDocument.caretPositionFromPoint(b.clientX,b.clientY);if(c.offsetNode.nodeType===c.offsetNode.TEXT_NODE){let b=c.offsetNode.parentNode,d=b?b.parentNode:null,e=d?d.parentNode:null;return(e&&e.nodeType===e.ELEMENT_NODE?e.className:null)===aC.G.CLASS_NAME?n.createFromDOMInfo(a,c.offsetNode.parentNode,c.offset):new aJ(c.offsetNode.parentNode)}if(c.offsetNode.nodeType===c.offsetNode.ELEMENT_NODE){let b=c.offsetNode.parentNode,d=b&&b.nodeType===b.ELEMENT_NODE?b.className:null,e=b?b.parentNode:null,f=e&&e.nodeType===e.ELEMENT_NODE?e.className:null;if(d===aC.G.CLASS_NAME){let b=c.offsetNode.childNodes[Math.min(c.offset,c.offsetNode.childNodes.length-1)];if(b)return n.createFromDOMInfo(a,b,0)}else if(f===aC.G.CLASS_NAME)return n.createFromDOMInfo(a,c.offsetNode,0)}return new aJ(c.offsetNode)}static _snapToSoftTabBoundary(a,b){let c=b.getLineContent(a.lineNumber),{tabSize:d}=b.model.getOptions(),e=aG.s.atomicPosition(c,a.column-1,d,2);return -1!==e?new aD.y(a.lineNumber,e+1):a}static doHitTest(a,b){let c=new aJ;if("function"==typeof a.viewDomNode.ownerDocument.caretRangeFromPoint?c=this._doHitTestWithCaretRangeFromPoint(a,b):a.viewDomNode.ownerDocument.caretPositionFromPoint&&(c=this._doHitTestWithCaretPositionFromPoint(a,b.pos.toClientCoordinates((0,D.zk)(a.viewDomNode)))),1===c.type){let b=a.viewModel.getInjectedTextAt(c.position),d=a.viewModel.normalizePosition(c.position,2);(b||!d.equals(c.position))&&(c=new aK(d,c.spanNode,b))}return c}}class aU{static{this._INSTANCE=null}static getInstance(){return aU._INSTANCE||(aU._INSTANCE=new aU),aU._INSTANCE}constructor(){this._cache={},this._canvas=document.createElement("canvas")}getCharWidth(a,b){let c=a+b;if(this._cache[c])return this._cache[c];let d=this._canvas.getContext("2d");d.font=b;let e=d.measureText(a).width;return this._cache[c]=e,e}}var aV=c(39870),aW=c(34793),aX=c(27612),aY=c(77509),aZ=c(72542);class a$ extends G.jG{constructor(a,b,c,d){super(),this._context=a,this._viewHelper=b,this._mouseTargetFactory=c,this._dispatchMouse=d,this._operation=null}dispose(){super.dispose(),this.stop()}start(a,b){this._operation?this._operation.setPosition(a,b):this._operation=this._createDragScrollingOperation(a,b)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class a_ extends G.jG{constructor(a,b,c,d,e,f){super(),this._context=a,this._viewHelper=b,this._mouseTargetFactory=c,this._dispatchMouse=d,this._position=e,this._mouseEvent=f,this._lastTime=Date.now(),this._animationFrameDisposable=(0,D.PG)((0,D.zk)(f.browserEvent),()=>this._execute())}dispose(){this._animationFrameDisposable.dispose(),super.dispose()}setPosition(a,b){this._position=a,this._mouseEvent=b}_tick(){let a=Date.now(),b=a-this._lastTime;return this._lastTime=a,b}}class a0 extends a${_createDragScrollingOperation(a,b){return new a1(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,a,b)}}class a1 extends a_{_getScrollSpeed(){let a=this._context.configuration.options.get(75),b=this._context.configuration.options.get(165).height/a,c=this._position.outsideDistance/a;return c<=1.5?Math.max(30,b*(1+c)):c<=3?Math.max(60,b*(2+c)):Math.max(200,b*(7+c))}_execute(){let a,b=this._context.configuration.options.get(75),c=this._getScrollSpeed(),d=this._tick()/1e3*c*b,e="above"===this._position.outsidePosition?-d:d;this._context.viewModel.viewLayout.deltaScrollNow(0,e),this._viewHelper.renderNow();let f=this._context.viewLayout.getLinesViewportData(),g="above"===this._position.outsidePosition?f.startLineNumber:f.endLineNumber,h="above"===this._position.outsidePosition?1===f.startLineNumber:f.endLineNumber===this._context.viewModel.getLineCount();{let b=ar(this._viewHelper.viewDomNode),c=this._context.configuration.options.get(165).horizontalScrollbarHeight,d=new an(this._mouseEvent.pos.x,b.y+b.height-c-.1),e=as(this._viewHelper.viewDomNode,b,d);a=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),b,d,e,null)}(!a.position||a.position.lineNumber!==g||h)&&(a="above"===this._position.outsidePosition?aM.createOutsideEditor(this._position.mouseColumn,new aD.y(g,1),"above",this._position.outsideDistance):aM.createOutsideEditor(this._position.mouseColumn,new aD.y(g,this._context.viewModel.getLineMaxColumn(g)),"below",this._position.outsideDistance)),this._dispatchMouse(a,!0,2),this._animationFrameDisposable=(0,D.PG)((0,D.zk)(a.element),()=>this._execute())}}class a2 extends a${_createDragScrollingOperation(a,b){return new a3(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,a,b)}}class a3 extends a_{_getScrollSpeed(){let a=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,b=this._context.configuration.options.get(165).contentWidth/a,c=this._position.outsideDistance/a;return c<=1.5?Math.max(30,b*(1+c)):c<=3?Math.max(60,b*(2+c)):Math.max(200,b*(7+c))}_execute(){let a,b=this._context.configuration.options.get(59).typicalFullwidthCharacterWidth,c=this._getScrollSpeed(),d=this._tick()/1e3*c*b*.5,e="left"===this._position.outsidePosition?-d:d;if(this._context.viewModel.viewLayout.deltaScrollNow(e,0),this._viewHelper.renderNow(),!this._position.position)return;let f=this._position.position.lineNumber;{let b=ar(this._viewHelper.viewDomNode),c=this._context.configuration.options.get(165).horizontalScrollbarHeight,d=new an(this._mouseEvent.pos.x,b.y+b.height-c-.1),e=as(this._viewHelper.viewDomNode,b,d);a=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),b,d,e,null)}a="left"===this._position.outsidePosition?aM.createOutsideEditor(a.mouseColumn,new aD.y(f,a.mouseColumn),"left",this._position.outsideDistance):aM.createOutsideEditor(a.mouseColumn,new aD.y(f,a.mouseColumn),"right",this._position.outsideDistance),this._dispatchMouse(a,!0,2),this._animationFrameDisposable=(0,D.PG)((0,D.zk)(a.element),()=>this._execute())}}class a4 extends az{constructor(a,b,c){super(),this._mouseLeaveMonitor=null,this._context=a,this.viewController=b,this.viewHelper=c,this.mouseTargetFactory=new aT(this._context,c),this._mouseDownOperation=this._register(new a5(this._context,this.viewController,this.viewHelper,this.mouseTargetFactory,(a,b)=>this._createMouseTarget(a,b),a=>this._getMouseColumn(a))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(165).height;const d=new au(this.viewHelper.viewDomNode);this._register(d.onContextMenu(this.viewHelper.viewDomNode,a=>this._onContextMenu(a,!0))),this._register(d.onMouseMove(this.viewHelper.viewDomNode,a=>{this._onMouseMove(a),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=(0,D.ko)(this.viewHelper.viewDomNode.ownerDocument,"mousemove",a=>{this.viewHelper.viewDomNode.contains(a.target)||this._onMouseLeave(new at(a,!1,this.viewHelper.viewDomNode))}))})),this._register(d.onMouseUp(this.viewHelper.viewDomNode,a=>this._onMouseUp(a))),this._register(d.onMouseLeave(this.viewHelper.viewDomNode,a=>this._onMouseLeave(a)));let e=0;this._register(d.onPointerDown(this.viewHelper.viewDomNode,(a,b)=>{e=b})),this._register((0,D.ko)(this.viewHelper.viewDomNode,D.Bx.POINTER_UP,a=>{this._mouseDownOperation.onPointerUp()})),this._register(d.onMouseDown(this.viewHelper.viewDomNode,a=>this._onMouseDown(a,e))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){let a=aZ.QC.INSTANCE,b=0,c=V.D.getZoomLevel(),d=!1,e=0,f=f=>{if(this.viewController.emitMouseWheel(f),!this._context.configuration.options.get(84))return;let h=new ai.$(f);if(a.acceptStandardWheelEvent(h),a.isPhysicalMouseWheel()){if(g(f)){let a=V.D.getZoomLevel(),b=h.deltaY>0?1:-1;V.D.setZoomLevel(a+b),h.preventDefault(),h.stopPropagation()}}else Date.now()-b>50&&(c=V.D.getZoomLevel(),d=g(f),e=0),b=Date.now(),e+=h.deltaY,d&&(V.D.setZoomLevel(c+e/5),h.preventDefault(),h.stopPropagation())};function g(a){return M.zx?(a.metaKey||a.ctrlKey)&&!a.shiftKey&&!a.altKey:a.ctrlKey&&!a.metaKey&&!a.shiftKey&&!a.altKey}this._register((0,D.ko)(this.viewHelper.viewDomNode,D.Bx.MOUSE_WHEEL,f,{capture:!0,passive:!1}))}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(a){if(a.hasChanged(165)){let a=this._context.configuration.options.get(165).height;this._height!==a&&(this._height=a,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(a){return this._mouseDownOperation.onCursorStateChanged(a),!1}onFocusChanged(a){return!1}getTargetAtClientPoint(a,b){let c=new ao(a,b).toPageCoordinates((0,D.zk)(this.viewHelper.viewDomNode)),d=ar(this.viewHelper.viewDomNode);if(c.y<d.y||c.y>d.y+d.height||c.x<d.x||c.x>d.x+d.width)return null;let e=as(this.viewHelper.viewDomNode,d,c);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),d,c,e,null)}_createMouseTarget(a,b){let c=a.target;if(!this.viewHelper.viewDomNode.contains(c)){let b=(0,D.jG)(this.viewHelper.viewDomNode);b&&(c=b.elementsFromPoint(a.posx,a.posy).find(a=>this.viewHelper.viewDomNode.contains(a))??null)}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),a.editorPos,a.pos,a.relativePos,b?c:null)}_getMouseColumn(a){return this.mouseTargetFactory.getMouseColumn(a.relativePos)}_onContextMenu(a,b){this.viewController.emitContextMenu({event:a,target:this._createMouseTarget(a,b)})}_onMouseMove(a){this.mouseTargetFactory.mouseTargetIsWidget(a)||a.preventDefault(),this._mouseDownOperation.isActive()||a.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:a,target:this._createMouseTarget(a,!0)})}_onMouseLeave(a){this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:a,target:null})}_onMouseUp(a){this.viewController.emitMouseUp({event:a,target:this._createMouseTarget(a,!0)})}_onMouseDown(a,b){let c=this._createMouseTarget(a,!0),d=6===c.type||7===c.type,e=2===c.type||3===c.type||4===c.type,f=3===c.type,g=this._context.configuration.options.get(125),h=8===c.type||5===c.type,i=9===c.type,j=a.leftButton||a.middleButton;M.zx&&a.leftButton&&a.ctrlKey&&(j=!1);let k=()=>{a.preventDefault(),this.viewHelper.focusTextArea()};if(j&&(d||f&&g))k(),this._mouseDownOperation.start(c.type,a,b);else if(e)a.preventDefault();else if(h){let d=c.detail;j&&this.viewHelper.shouldSuppressMouseDownOnViewZone(d.viewZoneId)&&(k(),this._mouseDownOperation.start(c.type,a,b),a.preventDefault())}else i&&this.viewHelper.shouldSuppressMouseDownOnWidget(c.detail)&&(k(),a.preventDefault());this.viewController.emitMouseDown({event:a,target:c})}}class a5 extends G.jG{constructor(a,b,c,d,e,f){super(),this._context=a,this._viewController=b,this._viewHelper=c,this._mouseTargetFactory=d,this._createMouseTarget=e,this._getMouseColumn=f,this._mouseMoveMonitor=this._register(new aw(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new a0(this._context,this._viewHelper,this._mouseTargetFactory,(a,b,c)=>this._dispatchMouse(a,b,c))),this._leftRightDragScrolling=this._register(new a2(this._context,this._viewHelper,this._mouseTargetFactory,(a,b,c)=>this._dispatchMouse(a,b,c))),this._mouseState=new a6,this._currentSelection=new aY.L(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}isActive(){return this._isActive}_onMouseDownThenMove(a){this._lastMouseEvent=a,this._mouseState.setModifiers(a);let b=this._findMousePosition(a,!1);b&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:a,target:b}):13===b.type?"above"===b.outsidePosition||"below"===b.outsidePosition?(this._topBottomDragScrolling.start(b,a),this._leftRightDragScrolling.stop()):(this._leftRightDragScrolling.start(b,a),this._topBottomDragScrolling.stop()):(this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop(),this._dispatchMouse(b,!0,1)))}start(a,b,c){this._lastMouseEvent=b,this._mouseState.setStartedOnLineNumbers(3===a),this._mouseState.setStartButtons(b),this._mouseState.setModifiers(b);let d=this._findMousePosition(b,!0);if(!d||!d.position)return;this._mouseState.trySetCount(b.detail,d.position),b.detail=this._mouseState.count;let e=this._context.configuration.options;if(!e.get(104)&&e.get(42)&&!e.get(28)&&!this._mouseState.altKey&&b.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===d.type&&d.position&&this._currentSelection.containsPosition(d.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,c,b.buttons,a=>this._onMouseDownThenMove(a),a=>{let b=this._findMousePosition(this._lastMouseEvent,!1);(0,D.kx)(a)?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:b?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(d,b.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,c,b.buttons,a=>this._onMouseDownThenMove(a),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop(),this._leftRightDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(a){this._currentSelection=a.selections[0]}_getPositionOutsideEditor(a){let b=a.editorPos,c=this._context.viewModel,d=this._context.viewLayout,e=this._getMouseColumn(a);if(a.posy<b.y){let c=b.y-a.posy,f=Math.max(d.getCurrentScrollTop()-c,0),g=aO.getZoneAtCoord(this._context,f);if(g){let a=this._helpPositionJumpOverViewZone(g);if(a)return aM.createOutsideEditor(e,a,"above",c)}let h=d.getLineNumberAtVerticalOffset(f);return aM.createOutsideEditor(e,new aD.y(h,1),"above",c)}if(a.posy>b.y+b.height){let f=a.posy-b.y-b.height,g=d.getCurrentScrollTop()+a.relativePos.y,h=aO.getZoneAtCoord(this._context,g);if(h){let a=this._helpPositionJumpOverViewZone(h);if(a)return aM.createOutsideEditor(e,a,"below",f)}let i=d.getLineNumberAtVerticalOffset(g);return aM.createOutsideEditor(e,new aD.y(i,c.getLineMaxColumn(i)),"below",f)}let f=d.getLineNumberAtVerticalOffset(d.getCurrentScrollTop()+a.relativePos.y),g=this._context.configuration.options.get(165),h=g.contentLeft;if(a.relativePos.x<=h){let b=h-a.relativePos.x,d=c.getTextDirection(f)===aH.z4.RTL;return aM.createOutsideEditor(e,new aD.y(f,d?c.getLineMaxColumn(f):1),"left",b)}let i=0===g.minimap.minimapLeft?g.width-g.verticalScrollbarWidth:g.minimap.minimapLeft;if(a.relativePos.x>=i){let b=a.relativePos.x-i,d=c.getTextDirection(f)===aH.z4.RTL;return aM.createOutsideEditor(e,new aD.y(f,d?1:c.getLineMaxColumn(f)),"right",b)}return null}_findMousePosition(a,b){let c=this._getPositionOutsideEditor(a);if(c)return c;let d=this._createMouseTarget(a,b);if(!d.position)return null;if(8===d.type||5===d.type){let a=this._helpPositionJumpOverViewZone(d.detail);if(a)return aM.createViewZone(d.type,d.element,d.mouseColumn,a,d.detail)}return d}_helpPositionJumpOverViewZone(a){let b=new aD.y(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),c=a.positionBefore,d=a.positionAfter;if(c&&d)if(c.isBefore(b))return c;else return d;return null}_dispatchMouse(a,b,c){a.position&&this._viewController.dispatchMouse({position:a.position,mouseColumn:a.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:c,inSelectionMode:b,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===a.type&&null!==a.detail.injectedText})}}class a6{static{this.CLEAR_MOUSE_DOWN_COUNT_TIME=400}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(a){this._altKey=a.altKey,this._ctrlKey=a.ctrlKey,this._metaKey=a.metaKey,this._shiftKey=a.shiftKey}setStartButtons(a){this._leftButton=a.leftButton,this._middleButton=a.middleButton}setStartedOnLineNumbers(a){this._startedOnLineNumbers=a}trySetCount(a,b){let c=new Date().getTime();c-this._lastSetMouseDownCountTime>a6.CLEAR_MOUSE_DOWN_COUNT_TIME&&(a=1),this._lastSetMouseDownCountTime=c,a>this._lastMouseDownCount+1&&(a=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(b)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=b,this._lastMouseDownCount=Math.min(a,this._lastMouseDownPositionEqualCount)}}var a7=c(73298),a8=c(62677),a9=c(26529),ba=c(37788),bb=c(36540);class bc{static{this.EMPTY=new bc("",0,0,null,void 0)}constructor(a,b,c,d,e){this.value=a,this.selectionStart=b,this.selectionEnd=c,this.selection=d,this.newlineCountBeforeSelection=e}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(a,b){let c,d=a.getValue(),e=a.getSelectionStart(),f=a.getSelectionEnd();return b&&d.substring(0,e)===b.value.substring(0,b.selectionStart)&&(c=b.newlineCountBeforeSelection),new bc(d,e,f,null,c)}collapseSelection(){return this.selectionStart===this.value.length?this:new bc(this.value,this.value.length,this.value.length,null,void 0)}isWrittenToTextArea(a,b){let c=this.value===a.getValue();return b?this.selectionStart===a.getSelectionStart()&&this.selectionEnd===a.getSelectionEnd()&&c:c}writeToTextArea(a,b,c){b.setValue(a,this.value),c&&b.setSelectionRange(a,this.selectionStart,this.selectionEnd)}deduceEditorPosition(a){if(a<=this.selectionStart){let b=this.value.substring(a,this.selectionStart);return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,b,-1)}if(a>=this.selectionEnd){let b=this.value.substring(this.selectionEnd,a);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,b,1)}let b=this.value.substring(this.selectionStart,a);if(-1===b.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selection?.getStartPosition()??null,b,1);let c=this.value.substring(a,this.selectionEnd);return this._finishDeduceEditorPosition(this.selection?.getEndPosition()??null,c,-1)}_finishDeduceEditorPosition(a,b,c){let d=0,e=-1;for(;-1!==(e=b.indexOf("\n",e+1));)d++;return[a,c*b.length,d]}static deduceInput(a,b,c){if(!a)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};let d=Math.min((0,a9.Qp)(a.value,b.value),a.selectionStart,b.selectionStart),e=Math.min((0,a9.Vi)(a.value,b.value),a.value.length-a.selectionEnd,b.value.length-b.selectionEnd);a.value.substring(d,a.value.length-e);let f=b.value.substring(d,b.value.length-e),g=a.selectionStart-d,h=a.selectionEnd-d;return b.selectionStart-d==b.selectionEnd-d?{text:f,replacePrevCharCnt:a.selectionStart-d,replaceNextCharCnt:0,positionDelta:0}:{text:f,replacePrevCharCnt:h-g,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(a,b){if(!a)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(a.value===b.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:b.selectionEnd-a.selectionEnd};let c=Math.min((0,a9.Qp)(a.value,b.value),a.selectionEnd),d=Math.min((0,a9.Vi)(a.value,b.value),a.value.length-a.selectionEnd),e=a.value.substring(c,a.value.length-d),f=b.value.substring(c,b.value.length-d);a.selectionStart;let g=a.selectionEnd-c;b.selectionStart;let h=b.selectionEnd-c;return{text:f,replacePrevCharCnt:g,replaceNextCharCnt:e.length-g,positionDelta:h-f.length}}static fromScreenReaderContentState(a){let b,c;switch(a.selection.getDirection()){case 0:b=a.selectionStart,c=a.selectionEnd;break;case 1:b=a.selectionEnd,c=a.selectionStart}return new bc(a.value,b,c,a.selection,a.newlineCountBeforeSelection)}}var bd=function(a,b){return function(c,d){b(c,d,a)}};(o||(o={})).Tap="-monaco-textarea-synthetic-tap";class be{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(a){let b={text:a=a||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=a.length,b}}let bf=class extends G.jG{get textAreaState(){return this._textAreaState}constructor(a,b,c,d,e,f){super(),this._host=a,this._textArea=b,this._OS=c,this._browser=d,this._accessibilityService=e,this._logService=f,this._onFocus=this._register(new F.vl),this.onFocus=this._onFocus.event,this._onBlur=this._register(new F.vl),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new F.vl),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new F.vl),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new F.vl),this.onCut=this._onCut.event,this._onPaste=this._register(new F.vl),this.onPaste=this._onPaste.event,this._onWillCopy=this._register(new F.vl),this.onWillCopy=this._onWillCopy.event,this._onWillCut=this._register(new F.vl),this.onWillCut=this._onWillCut.event,this._onWillPaste=this._register(new F.vl),this.onWillPaste=this._onWillPaste.event,this._onType=this._register(new F.vl),this.onType=this._onType.event,this._onCompositionStart=this._register(new F.vl),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new F.vl),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new F.vl),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new F.vl),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncFocusGainWriteScreenReaderContent=this._register(new G.HE),this._asyncTriggerCut=this._register(new aj.uC(()=>this._onCut.fire(),0)),this._textAreaState=bc.EMPTY,this._selectionChangeListener=null,this._accessibilityService.isScreenReaderOptimized()&&this.writeNativeTextAreaContent("ctor"),this._register(F.Jh.runAndSubscribe(this._accessibilityService.onDidChangeScreenReaderOptimized,()=>{this._accessibilityService.isScreenReaderOptimized()&&!this._asyncFocusGainWriteScreenReaderContent.value?this._asyncFocusGainWriteScreenReaderContent.value=new aj.uC(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0):this._asyncFocusGainWriteScreenReaderContent.clear()})),this._hasFocus=!1,this._currentComposition=null;let g=null;this._register(this._textArea.onKeyDown(a=>{let b=new a8.Z(a);(114===b.keyCode||this._currentComposition&&1===b.keyCode)&&b.stopPropagation(),b.equals(9)&&b.preventDefault(),g=b,this._onKeyDown.fire(b)})),this._register(this._textArea.onKeyUp(a=>{let b=new a8.Z(a);this._onKeyUp.fire(b)})),this._register(this._textArea.onCompositionStart(a=>{let b=new be;if(this._currentComposition){this._currentComposition=b;return}if(this._currentComposition=b,2===this._OS&&g&&g.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===a.data&&("ArrowRight"===g.code||"ArrowLeft"===g.code)){b.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:a.data});return}this._browser.isAndroid,this._onCompositionStart.fire({data:a.data})})),this._register(this._textArea.onCompositionUpdate(a=>{let b=this._currentComposition;if(!b)return;if(this._browser.isAndroid){let b=bc.readFromTextArea(this._textArea,this._textAreaState),c=bc.deduceAndroidCompositionInput(this._textAreaState,b);this._textAreaState=b,this._onType.fire(c),this._onCompositionUpdate.fire(a);return}let c=b.handleCompositionUpdate(a.data);this._textAreaState=bc.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(c),this._onCompositionUpdate.fire(a)})),this._register(this._textArea.onCompositionEnd(a=>{let b=this._currentComposition;if(!b)return;if(this._currentComposition=null,this._browser.isAndroid){let a=bc.readFromTextArea(this._textArea,this._textAreaState),b=bc.deduceAndroidCompositionInput(this._textAreaState,a);this._textAreaState=a,this._onType.fire(b),this._onCompositionEnd.fire();return}let c=b.handleCompositionUpdate(a.data);this._textAreaState=bc.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(c),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(a=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;let b=bc.readFromTextArea(this._textArea,this._textAreaState),c=bc.deduceInput(this._textAreaState,b,2===this._OS);0===c.replacePrevCharCnt&&1===c.text.length&&((0,a9.pc)(c.text.charCodeAt(0))||127===c.text.charCodeAt(0))||(this._textAreaState=b,(""!==c.text||0!==c.replacePrevCharCnt||0!==c.replaceNextCharCnt||0!==c.positionDelta)&&("insertFromPaste"===a.inputType?this._onPaste.fire({text:c.text,metadata:bb.bs.INSTANCE.get(c.text)}):this._onType.fire(c)))})),this._register(this._textArea.onCut(a=>{this._logService.trace("TextAreaInput#onCut",a);let b=(0,bb.y)(a,!0,this._host.context,this._logService,this._browser.isFirefox);this._onWillCut.fire(b),b.isHandled||(this._textArea.setIgnoreSelectionChangeTime("received cut event"),b.ensureClipboardGetsEditorData(),this._asyncTriggerCut.schedule())})),this._register(this._textArea.onCopy(a=>{this._logService.trace("TextAreaInput#onCopy",a),bb.Eq.electronBugWorkaroundCopyEventHasFired=!0;let b=(0,bb.y)(a,!1,this._host.context,this._logService,this._browser.isFirefox);this._onWillCopy.fire(b),b.isHandled||b.ensureClipboardGetsEditorData()})),this._register(this._textArea.onPaste(a=>{this._logService.trace("TextAreaInput#onPaste",a);let b=(0,bb.wL)(a);this._onWillPaste.fire(b),b.isHandled||(this._textArea.setIgnoreSelectionChangeTime("received paste event"),a.preventDefault(),this._logService.trace("TextAreaInput#onPaste with id : ",b.metadata?.id," with text.length: ",b.text.length),b.text&&(this._logService.trace("TextAreaInput#onPaste (before onPaste)"),this._onPaste.fire({text:b.text,metadata:b.metadata})))})),this._register(this._textArea.onFocus(()=>{let a=this._hasFocus;this._setHasFocus(!0),this._accessibilityService.isScreenReaderOptimized()&&this._browser.isSafari&&!a&&this._hasFocus&&(this._asyncFocusGainWriteScreenReaderContent.value||(this._asyncFocusGainWriteScreenReaderContent.value=new aj.uC(()=>this.writeNativeTextAreaContent("asyncFocusGain"),0)),this._asyncFocusGainWriteScreenReaderContent.value.schedule())})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeNativeTextAreaContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let a=0;return(0,D.ko)(this._textArea.ownerDocument,"selectionchange",b=>{if(m.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;let c=Date.now(),d=c-a;if(a=c,d<5)return;let e=c-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),e<100||!this._textAreaState.selection)return;let f=this._textArea.getValue();if(this._textAreaState.value!==f)return;let g=this._textArea.getSelectionStart(),h=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===g&&this._textAreaState.selectionEnd===h)return;let i=this._textAreaState.deduceEditorPosition(g),j=this._host.deduceModelPosition(i[0],i[1],i[2]),k=this._textAreaState.deduceEditorPosition(h),l=this._host.deduceModelPosition(k[0],k[1],k[2]),n=new aY.L(j.lineNumber,j.column,l.lineNumber,l.column);this._onSelectionChangeRequest.fire(n)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(a){this._hasFocus!==a&&(this._hasFocus=a,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeNativeTextAreaContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(a,b){this._hasFocus||(b=b.collapseSelection()),b.isWrittenToTextArea(this._textArea,this._hasFocus)||this._logService.trace(`writeTextAreaState(reason: ${a})`),b.writeToTextArea(a,this._textArea,this._hasFocus),this._textAreaState=b}writeNativeTextAreaContent(a){(this._accessibilityService.isScreenReaderOptimized()||"render"!==a)&&!this._currentComposition&&this._setAndWriteTextAreaState(a,this._host.getScreenReaderContent())}};bf=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([bd(4,X.j),bd(5,ba.rr)],bf);class bg extends G.jG{get ownerDocument(){return this._actual.ownerDocument}constructor(a){super(),this._actual=a,this._onSyntheticTap=this._register(new F.vl),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this.onKeyDown=this._register(new a7.f(this._actual,"keydown")).event,this.onKeyPress=this._register(new a7.f(this._actual,"keypress")).event,this.onKeyUp=this._register(new a7.f(this._actual,"keyup")).event,this.onCompositionStart=this._register(new a7.f(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new a7.f(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new a7.f(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new a7.f(this._actual,"beforeinput")).event,this.onInput=this._register(new a7.f(this._actual,"input")).event,this.onCut=this._register(new a7.f(this._actual,"cut")).event,this.onCopy=this._register(new a7.f(this._actual,"copy")).event,this.onPaste=this._register(new a7.f(this._actual,"paste")).event,this.onFocus=this._register(new a7.f(this._actual,"focus")).event,this.onBlur=this._register(new a7.f(this._actual,"blur")).event,this._register(this.onKeyDown(()=>m.onKeyDown())),this._register(this.onBeforeInput(()=>m.onBeforeInput())),this._register(this.onInput(()=>m.onInput())),this._register(this.onKeyUp(()=>m.onKeyUp())),this._register((0,D.ko)(this._actual,o.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){let a=(0,D.jG)(this._actual);return a?a.activeElement===this._actual:!!this._actual.isConnected&&(0,D.bq)()===this._actual}setIgnoreSelectionChangeTime(a){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(a,b){let c=this._actual;c.value!==b&&(this.setIgnoreSelectionChangeTime("setValue"),c.value=b)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(a,b,c){let d=this._actual,e=null,f=(0,D.jG)(d);e=f?f.activeElement:(0,D.bq)();let g=(0,D.zk)(e),h=e===d,i=d.selectionStart,j=d.selectionEnd;if(h&&i===b&&j===c){J.gm&&g.parent!==g&&d.focus();return}if(h){this.setIgnoreSelectionChangeTime("setSelectionRange"),d.setSelectionRange(b,c),J.gm&&g.parent!==g&&d.focus();return}try{let a=(0,D.zK)(d);this.setIgnoreSelectionChangeTime("setSelectionRange"),d.focus(),d.setSelectionRange(b,c),(0,D.wk)(d,a)}catch(a){}}}class bh extends a4{constructor(a,b,c){super(a,b,c),this._register(aW.q.addTarget(this.viewHelper.linesContentDomNode)),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Tap,a=>this.onTap(a))),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Change,a=>this.onChange(a))),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Contextmenu,a=>this._onContextMenu(new at(a,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register((0,D.ko)(this.viewHelper.linesContentDomNode,"pointerdown",a=>{let b=a.pointerType;if("mouse"===b){this._lastPointerType="mouse";return}"touch"===b?this._lastPointerType="touch":this._lastPointerType="pen"}));const d=new av(this.viewHelper.viewDomNode);this._register(d.onPointerMove(this.viewHelper.viewDomNode,a=>this._onMouseMove(a))),this._register(d.onPointerUp(this.viewHelper.viewDomNode,a=>this._onMouseUp(a))),this._register(d.onPointerLeave(this.viewHelper.viewDomNode,a=>this._onMouseLeave(a))),this._register(d.onPointerDown(this.viewHelper.viewDomNode,(a,b)=>this._onMouseDown(a,b)))}onTap(a){a.initialTarget&&this.viewHelper.linesContentDomNode.contains(a.initialTarget)&&(a.preventDefault(),this.viewHelper.focusTextArea(),this._dispatchGesture(a,!1))}onChange(a){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-a.translationX,-a.translationY),"pen"===this._lastPointerType&&this._dispatchGesture(a,!0)}_dispatchGesture(a,b){let c=this._createMouseTarget(new at(a,!1,this.viewHelper.viewDomNode),!1);c.position&&this.viewController.dispatchMouse({position:c.position,mouseColumn:c.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:a.tapCount,inSelectionMode:b,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===c.type&&null!==c.detail.injectedText})}_onMouseDown(a,b){"touch"!==a.browserEvent.pointerType&&super._onMouseDown(a,b)}}class bi extends a4{constructor(a,b,c){super(a,b,c),this._register(aW.q.addTarget(this.viewHelper.linesContentDomNode)),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Tap,a=>this.onTap(a))),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Change,a=>this.onChange(a))),this._register((0,D.ko)(this.viewHelper.linesContentDomNode,aW.B.Contextmenu,a=>this._onContextMenu(new at(a,!1,this.viewHelper.viewDomNode),!1)))}onTap(a){a.preventDefault(),this.viewHelper.focusTextArea();let b=this._createMouseTarget(new at(a,!1,this.viewHelper.viewDomNode),!1);if(b.position){let a=document.createEvent("CustomEvent");a.initEvent(o.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(a),this.viewController.moveTo(b.position,1)}}onChange(a){this._context.viewModel.viewLayout.deltaScrollNow(-a.translationX,-a.translationY)}}class bj extends G.jG{constructor(a,b,c){super(),(M.un||M.m0&&M.Fr)&&aV.e.pointerEvents?this.handler=this._register(new bh(a,b,c)):aX.G.TouchEvent?this.handler=this._register(new bi(a,b,c)):this.handler=this._register(new a4(a,b,c))}getTargetAtClientPoint(a,b){return this.handler.getTargetAtClientPoint(a,b)}}var bk=c(51027),bl=c(24092);class bm{constructor(a,b,c,d){this.configuration=a,this.viewModel=b,this.userInputEvents=c,this.commandDelegate=d}paste(a,b,c,d){this.commandDelegate.paste(a,b,c,d)}type(a){this.commandDelegate.type(a)}compositionType(a,b,c,d){this.commandDelegate.compositionType(a,b,c,d)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(a){bl.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:a})}_validateViewColumn(a){let b=this.viewModel.getLineMinColumn(a.lineNumber);return a.column<b?new aD.y(a.lineNumber,b):a}_hasMulticursorModifier(a){switch(this.configuration.options.get(86)){case"altKey":return a.altKey;case"ctrlKey":return a.ctrlKey;case"metaKey":return a.metaKey;default:return!1}}_hasNonMulticursorModifier(a){switch(this.configuration.options.get(86)){case"altKey":return a.ctrlKey||a.metaKey;case"ctrlKey":return a.altKey||a.metaKey;case"metaKey":return a.ctrlKey||a.altKey;default:return!1}}static _trySelectBracketContent(a,b){if(b.column>1){let c=a.bracketPairs.matchBracket(b.with(void 0,b.column-1));if(c&&c[0].getEndPosition().equals(b))return aY.L.fromPositions(c[0].getEndPosition(),c[1].getStartPosition())}if(b.column<=a.getLineMaxColumn(b.lineNumber)){let c=a.bracketPairs.matchBracket(b);if(c&&c[1].getStartPosition().equals(b))return aY.L.fromPositions(c[0].getEndPosition(),c[1].getStartPosition())}}static _trySelectStringContent(a,b){let{lineNumber:c,column:d}=b,{tokenization:e}=a;if(!e.hasAccurateTokensForLine(c))if(!e.isCheapToTokenize(c))return;else e.forceTokenization(c);let f=e.getLineTokens(c),g=f.findTokenIndexAtOffset(d-1),h=g;for(;g>0&&2===f.getStandardTokenType(g-1);)g--;for(;h+1<f.getCount()&&2===f.getStandardTokenType(h+1);)h++;let i=f.getStartOffset(g),j=f.getEndOffset(h);if(d!==i+2&&d!==j)return;let k=a.getLineContent(c),l=k.charAt(i);if('"'!==l&&"'"!==l&&"`"!==l||k.charAt(j-1)!==l)return;let m=k.substring(i+1,j-1);if(!(0,a9.E_)(m))return new aY.L(c,i+2,c,j)}dispatchMouse(a){let b=this.configuration.options,c=M.j9&&b.get(121),d=b.get(28),e=b.get(171);if(a.middleButton&&!c)e||this._columnSelect(a.position,a.mouseColumn,a.inSelectionMode);else if(a.startedOnLineNumbers)this._hasMulticursorModifier(a)?a.inSelectionMode?this._lastCursorLineSelect(a.position,a.revealType):this._createCursor(a.position,!0):a.inSelectionMode?this._lineSelectDrag(a.position,a.revealType):this._lineSelect(a.position,a.revealType);else if(a.mouseDownCount>=4)this._selectAll();else if(3===a.mouseDownCount)this._hasMulticursorModifier(a)?a.inSelectionMode?this._lastCursorLineSelectDrag(a.position,a.revealType):this._lastCursorLineSelect(a.position,a.revealType):a.inSelectionMode?this._lineSelectDrag(a.position,a.revealType):this._lineSelect(a.position,a.revealType);else if(2===a.mouseDownCount){if(!a.onInjectedText)if(this._hasMulticursorModifier(a))this._lastCursorWordSelect(a.position,a.revealType);else if(a.inSelectionMode)this._wordSelectDrag(a.position,a.revealType);else{let c;if(b.get(173)){let b=this.viewModel.model,d=this._convertViewToModelPosition(a.position);c=bm._trySelectBracketContent(b,d)||bm._trySelectStringContent(b,d)}c?this._select(c):this._wordSelect(a.position,a.revealType)}}else this._hasMulticursorModifier(a)?this._hasNonMulticursorModifier(a)||(a.shiftKey?this._columnSelect(a.position,a.mouseColumn,!0):a.inSelectionMode?this._lastCursorMoveToSelect(a.position,a.revealType):this._createCursor(a.position,!1)):a.inSelectionMode?a.altKey||d?this._columnSelect(a.position,a.mouseColumn,!0):this._moveToSelect(a.position,a.revealType):this.moveTo(a.position,a.revealType)}_usualArgs(a,b){return a=this._validateViewColumn(a),{source:"mouse",position:this._convertViewToModelPosition(a),viewPosition:a,revealType:b}}moveTo(a,b){bl.QM.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_moveToSelect(a,b){bl.QM.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_columnSelect(a,b,c){a=this._validateViewColumn(a),bl.QM.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(a),viewPosition:a,mouseColumn:b,doColumnSelect:c})}_createCursor(a,b){a=this._validateViewColumn(a),bl.QM.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(a),viewPosition:a,wholeLine:b})}_lastCursorMoveToSelect(a,b){bl.QM.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_wordSelect(a,b){bl.QM.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_wordSelectDrag(a,b){bl.QM.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_lastCursorWordSelect(a,b){bl.QM.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_lineSelect(a,b){bl.QM.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_lineSelectDrag(a,b){bl.QM.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_lastCursorLineSelect(a,b){bl.QM.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_lastCursorLineSelectDrag(a,b){bl.QM.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(a,b))}_select(a){bl.QM.SetSelection.runCoreEditorCommand(this.viewModel,{source:"mouse",selection:a})}_selectAll(){bl.QM.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(a){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(a)}emitKeyDown(a){this.userInputEvents.emitKeyDown(a)}emitKeyUp(a){this.userInputEvents.emitKeyUp(a)}emitContextMenu(a){this.userInputEvents.emitContextMenu(a)}emitMouseMove(a){this.userInputEvents.emitMouseMove(a)}emitMouseLeave(a){this.userInputEvents.emitMouseLeave(a)}emitMouseUp(a){this.userInputEvents.emitMouseUp(a)}emitMouseDown(a){this.userInputEvents.emitMouseDown(a)}emitMouseDrag(a){this.userInputEvents.emitMouseDrag(a)}emitMouseDrop(a){this.userInputEvents.emitMouseDrop(a)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(a){this.userInputEvents.emitMouseWheel(a)}}var bn=c(80544),bo=c(50411);class bp{constructor(a){this._lineFactory=a,this._set(1,[])}flush(){this._set(1,[])}_set(a,b){this._lines=b,this._rendLineNumberStart=a}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(a){let b=a-this._rendLineNumberStart;if(b<0||b>=this._lines.length)throw new E.D7("Illegal value for lineNumber");return this._lines[b]}onLinesDeleted(a,b){if(0===this.getCount())return null;let c=this.getStartLineNumber(),d=this.getEndLineNumber();if(b<c)return this._rendLineNumberStart-=b-a+1,null;if(a>d)return null;let e=0,f=0;for(let g=c;g<=d;g++){let c=g-this._rendLineNumberStart;a<=g&&g<=b&&(0===f?(e=c,f=1):f++)}if(a<c){let d=0;d=b<c?b-a+1:c-a,this._rendLineNumberStart-=d}return this._lines.splice(e,f)}onLinesChanged(a,b){let c=a+b-1;if(0===this.getCount())return!1;let d=this.getStartLineNumber(),e=this.getEndLineNumber(),f=!1;for(let b=a;b<=c;b++)b>=d&&b<=e&&(this._lines[b-this._rendLineNumberStart].onContentChanged(),f=!0);return f}onLinesInserted(a,b){if(0===this.getCount())return null;let c=b-a+1,d=this.getStartLineNumber(),e=this.getEndLineNumber();if(a<=d)return this._rendLineNumberStart+=c,null;if(a>e)return null;if(c+a>e)return this._lines.splice(a-this._rendLineNumberStart,e-a+1);let f=[];for(let a=0;a<c;a++)f[a]=this._lineFactory.createLine();let g=a-this._rendLineNumberStart,h=this._lines.slice(0,g),i=this._lines.slice(g,this._lines.length-c),j=this._lines.slice(this._lines.length-c,this._lines.length);return this._lines=h.concat(f).concat(i),j}onTokensChanged(a){if(0===this.getCount())return!1;let b=this.getStartLineNumber(),c=this.getEndLineNumber(),d=!1;for(let e=0,f=a.length;e<f;e++){let f=a[e];if(f.toLineNumber<b||f.fromLineNumber>c)continue;let g=Math.max(b,f.fromLineNumber),h=Math.min(c,f.toLineNumber);for(let a=g;a<=h;a++){let b=a-this._rendLineNumberStart;this._lines[b].onTokensChanged(),d=!0}}return d}}class bq{constructor(a,b){this._viewContext=a,this._lineFactory=b,this.domNode=this._createDomNode(),this._linesCollection=new bp(this._lineFactory)}_createDomNode(){let a=(0,ae.Z)(document.createElement("div"));return a.setClassName("view-layer"),a.setPosition("absolute"),a.domNode.setAttribute("role","presentation"),a.domNode.setAttribute("aria-hidden","true"),a}onConfigurationChanged(a){return!!a.hasChanged(165)}onFlushed(a,b){if(b){let a=this._linesCollection.getStartLineNumber(),b=this._linesCollection.getEndLineNumber();for(let c=a;c<=b;c++)this._linesCollection.getLine(c).getDomNode()?.remove()}return this._linesCollection.flush(),!0}onLinesChanged(a){return this._linesCollection.onLinesChanged(a.fromLineNumber,a.count)}onLinesDeleted(a){let b=this._linesCollection.onLinesDeleted(a.fromLineNumber,a.toLineNumber);if(b)for(let a=0,c=b.length;a<c;a++){let c=b[a].getDomNode();c?.remove()}return!0}onLinesInserted(a){let b=this._linesCollection.onLinesInserted(a.fromLineNumber,a.toLineNumber);if(b)for(let a=0,c=b.length;a<c;a++){let c=b[a].getDomNode();c?.remove()}return!0}onScrollChanged(a){return a.scrollTopChanged}onTokensChanged(a){return this._linesCollection.onTokensChanged(a.ranges)}onZonesChanged(a){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(a){return this._linesCollection.getLine(a)}renderLines(a){let b=this._linesCollection._get(),c=new br(this.domNode.domNode,this._lineFactory,a,this._viewContext),d={rendLineNumberStart:b.rendLineNumberStart,lines:b.lines,linesLength:b.lines.length},e=c.render(d,a.startLineNumber,a.endLineNumber,a.relativeVerticalOffset);this._linesCollection._set(e.rendLineNumberStart,e.lines)}}class br{static{this._ttPolicy=(0,bn.H)("editorViewLayer",{createHTML:a=>a})}constructor(a,b,c,d){this._domNode=a,this._lineFactory=b,this._viewportData=c,this._viewContext=d}render(a,b,c,d){let e={rendLineNumberStart:a.rendLineNumberStart,lines:a.lines.slice(0),linesLength:a.linesLength};if(e.rendLineNumberStart+e.linesLength-1<b||c<e.rendLineNumberStart){e.rendLineNumberStart=b,e.linesLength=c-b+1,e.lines=[];for(let a=b;a<=c;a++)e.lines[a-b]=this._lineFactory.createLine();return this._finishRendering(e,!0,d),e}if(this._renderUntouchedLines(e,Math.max(b-e.rendLineNumberStart,0),Math.min(c-e.rendLineNumberStart,e.linesLength-1),d,b),e.rendLineNumberStart>b){let a=Math.min(c,e.rendLineNumberStart-1);b<=a&&(this._insertLinesBefore(e,b,a,d,b),e.linesLength+=a-b+1)}else if(e.rendLineNumberStart<b){let a=Math.min(e.linesLength,b-e.rendLineNumberStart);a>0&&(this._removeLinesBefore(e,a),e.linesLength-=a)}if(e.rendLineNumberStart=b,e.rendLineNumberStart+e.linesLength-1<c){let a=e.rendLineNumberStart+e.linesLength;a<=c&&(this._insertLinesAfter(e,a,c,d,b),e.linesLength+=c-a+1)}else if(e.rendLineNumberStart+e.linesLength-1>c){let a=Math.max(0,c-e.rendLineNumberStart+1),b=e.linesLength-1-a+1;b>0&&(this._removeLinesAfter(e,b),e.linesLength-=b)}return this._finishRendering(e,!1,d),e}_renderUntouchedLines(a,b,c,d,e){let f=a.rendLineNumberStart,g=a.lines;for(let a=b;a<=c;a++){let b=f+a;g[a].layoutLine(b,d[b-e],this._lineHeightForLineNumber(b))}}_insertLinesBefore(a,b,c,d,e){let f=[],g=0;for(let a=b;a<=c;a++)f[g++]=this._lineFactory.createLine();a.lines=f.concat(a.lines)}_removeLinesBefore(a,b){for(let c=0;c<b;c++){let b=a.lines[c].getDomNode();b?.remove()}a.lines.splice(0,b)}_insertLinesAfter(a,b,c,d,e){let f=[],g=0;for(let a=b;a<=c;a++)f[g++]=this._lineFactory.createLine();a.lines=a.lines.concat(f)}_removeLinesAfter(a,b){let c=a.linesLength-b;for(let d=0;d<b;d++){let b=a.lines[c+d].getDomNode();b?.remove()}a.lines.splice(c,b)}_finishRenderingNewLines(a,b,c,d){br._ttPolicy&&(c=br._ttPolicy.createHTML(c));let e=this._domNode.lastChild;b||!e?this._domNode.innerHTML=c:e.insertAdjacentHTML("afterend",c);let f=this._domNode.lastChild;for(let b=a.linesLength-1;b>=0;b--){let c=a.lines[b];d[b]&&(c.setDomNode(f),f=f.previousSibling)}}_finishRenderingInvalidLines(a,b,c){let d=document.createElement("div");br._ttPolicy&&(b=br._ttPolicy.createHTML(b)),d.innerHTML=b;for(let b=0;b<a.linesLength;b++){let e=a.lines[b];if(c[b]){let a=d.firstChild;e.getDomNode().replaceWith(a),e.setDomNode(a)}}}static{this._sb=new bo.fe(1e5)}_finishRendering(a,b,c){let d=br._sb,e=a.linesLength,f=a.lines,g=a.rendLineNumberStart,h=[];{d.reset();let i=!1;for(let a=0;a<e;a++){let b=f[a];if(h[a]=!1,b.getDomNode())continue;let e=a+g;b.renderLine(e,c[a],this._lineHeightForLineNumber(e),this._viewportData,d)&&(h[a]=!0,i=!0)}i&&this._finishRenderingNewLines(a,b,d.build(),h)}{d.reset();let b=!1,i=[];for(let a=0;a<e;a++){let e=f[a];if(i[a]=!1,h[a])continue;let j=a+g;e.renderLine(j,c[a],this._lineHeightForLineNumber(j),this._viewportData,d)&&(i[a]=!0,b=!0)}b&&this._finishRenderingInvalidLines(a,d.build(),i)}}_lineHeightForLineNumber(a){return this._viewContext.viewLayout.getLineHeightForLineNumber(a)}}class bs extends aA{constructor(a){super(a),this._dynamicOverlays=[],this._isFocused=!1,this._visibleLines=new bq(this._context,{createLine:()=>new bt(this._dynamicOverlays)}),this.domNode=this._visibleLines.domNode;const b=this._context.configuration.options.get(59);(0,I.M)(this.domNode,b),this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let a=0,b=this._dynamicOverlays.length;a<b;a++)if(this._dynamicOverlays[a].shouldRender())return!0;return!1}dispose(){super.dispose();for(let a=0,b=this._dynamicOverlays.length;a<b;a++)this._dynamicOverlays[a].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}addDynamicOverlay(a){this._dynamicOverlays.push(a)}onConfigurationChanged(a){this._visibleLines.onConfigurationChanged(a);let b=this._context.configuration.options.get(59);return(0,I.M)(this.domNode,b),!0}onFlushed(a){return this._visibleLines.onFlushed(a)}onFocusChanged(a){return this._isFocused=a.isFocused,!0}onLinesChanged(a){return this._visibleLines.onLinesChanged(a)}onLinesDeleted(a){return this._visibleLines.onLinesDeleted(a)}onLinesInserted(a){return this._visibleLines.onLinesInserted(a)}onScrollChanged(a){return this._visibleLines.onScrollChanged(a)||!0}onTokensChanged(a){return this._visibleLines.onTokensChanged(a)}onZonesChanged(a){return this._visibleLines.onZonesChanged(a)}prepareRender(a){let b=this._dynamicOverlays.filter(a=>a.shouldRender());for(let c=0,d=b.length;c<d;c++){let d=b[c];d.prepareRender(a),d.onDidRender()}}render(a){this._viewOverlaysRender(a),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(a){this._visibleLines.renderLines(a.viewportData)}}class bt{constructor(a){this._dynamicOverlays=a,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(a){this._domNode=(0,ae.Z)(a)}onContentChanged(){}onTokensChanged(){}renderLine(a,b,c,d,e){let f="";for(let b=0,c=this._dynamicOverlays.length;b<c;b++)f+=this._dynamicOverlays[b].render(d.startLineNumber,a);return this._renderedContent!==f&&(this._renderedContent=f,e.appendString('<div style="top:'),e.appendString(String(b)),e.appendString("px;height:"),e.appendString(String(c)),e.appendString("px;line-height:"),e.appendString(String(c)),e.appendString('px;">'),e.appendString(f),e.appendString("</div>"),!0)}layoutLine(a,b,c){this._domNode&&(this._domNode.setTop(b),this._domNode.setHeight(c),this._domNode.setLineHeight(c))}}class bu extends bs{constructor(a){super(a);const b=this._context.configuration.options.get(165);this._contentWidth=b.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(a){let b=this._context.configuration.options.get(165);return this._contentWidth=b.contentWidth,super.onConfigurationChanged(a)||!0}onScrollChanged(a){return super.onScrollChanged(a)||a.scrollWidthChanged}_viewOverlaysRender(a){super._viewOverlaysRender(a),this.domNode.setWidth(Math.max(a.scrollWidth,this._contentWidth))}}class bv extends bs{constructor(a){super(a);const b=this._context.configuration.options,c=b.get(165);this._contentLeft=c.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,I.M)(this.domNode,b.get(59))}onConfigurationChanged(a){let b=this._context.configuration.options;(0,I.M)(this.domNode,b.get(59));let c=b.get(165);return this._contentLeft=c.contentLeft,super.onConfigurationChanged(a)||!0}onScrollChanged(a){return super.onScrollChanged(a)||a.scrollHeightChanged}_viewOverlaysRender(a){super._viewOverlaysRender(a);let b=Math.min(a.scrollHeight,1e6);this.domNode.setHeight(b),this.domNode.setWidth(this._contentLeft)}}class bw{constructor(a){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=a}emitKeyDown(a){this.onKeyDown?.(a)}emitKeyUp(a){this.onKeyUp?.(a)}emitContextMenu(a){this.onContextMenu?.(this._convertViewToModelMouseEvent(a))}emitMouseMove(a){this.onMouseMove?.(this._convertViewToModelMouseEvent(a))}emitMouseLeave(a){this.onMouseLeave?.(this._convertViewToModelMouseEvent(a))}emitMouseDown(a){this.onMouseDown?.(this._convertViewToModelMouseEvent(a))}emitMouseUp(a){this.onMouseUp?.(this._convertViewToModelMouseEvent(a))}emitMouseDrag(a){this.onMouseDrag?.(this._convertViewToModelMouseEvent(a))}emitMouseDrop(a){this.onMouseDrop?.(this._convertViewToModelMouseEvent(a))}emitMouseDropCanceled(){this.onMouseDropCanceled?.()}emitMouseWheel(a){this.onMouseWheel?.(a)}_convertViewToModelMouseEvent(a){return a.target?{event:a.event,target:this._convertViewToModelMouseTarget(a.target)}:a}_convertViewToModelMouseTarget(a){return bw.convertViewToModelMouseTarget(a,this._coordinatesConverter)}static convertViewToModelMouseTarget(a,b){let c={...a};return c.position&&(c.position=b.convertViewPositionToModelPosition(c.position)),c.range&&(c.range=b.convertViewRangeToModelRange(c.range)),(5===c.type||8===c.type)&&(c.detail=this.convertViewToModelViewZoneData(c.detail,b)),c}static convertViewToModelViewZoneData(a,b){return{viewZoneId:a.viewZoneId,positionBefore:a.positionBefore?b.convertViewPositionToModelPosition(a.positionBefore):a.positionBefore,positionAfter:a.positionAfter?b.convertViewPositionToModelPosition(a.positionAfter):a.positionAfter,position:b.convertViewPositionToModelPosition(a.position),afterLineNumber:b.convertViewPositionToModelPosition(new aD.y(a.afterLineNumber,1)).lineNumber}}}c(81562);class bx extends aA{constructor(a){super(a),this.blocks=[],this.contentWidth=-1,this.contentLeft=0,this.domNode=(0,ae.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("blockDecorations-container"),this.update()}update(){let a=!1,b=this._context.configuration.options.get(165),c=b.contentWidth-b.verticalScrollbarWidth;this.contentWidth!==c&&(this.contentWidth=c,a=!0);let d=b.contentLeft;return this.contentLeft!==d&&(this.contentLeft=d,a=!0),a}onConfigurationChanged(a){return this.update()}onScrollChanged(a){return a.scrollTopChanged||a.scrollLeftChanged}onDecorationsChanged(a){return!0}onZonesChanged(a){return!0}prepareRender(a){}render(a){let b=0;for(let c of a.getDecorationsInViewport()){let d,e;if(!c.options.blockClassName)continue;let f=this.blocks[b];f||(f=this.blocks[b]=(0,ae.Z)(document.createElement("div")),this.domNode.appendChild(f)),c.options.blockIsAfterEnd?(d=a.getVerticalOffsetAfterLineNumber(c.range.endLineNumber,!1),e=a.getVerticalOffsetAfterLineNumber(c.range.endLineNumber,!0)):(d=a.getVerticalOffsetForLineNumber(c.range.startLineNumber,!0),e=c.range.isEmpty()&&!c.options.blockDoesNotCollapse?a.getVerticalOffsetForLineNumber(c.range.startLineNumber,!1):a.getVerticalOffsetAfterLineNumber(c.range.endLineNumber,!0));let[g,h,i,j]=c.options.blockPadding??[0,0,0,0];f.setClassName("blockDecorations-block "+c.options.blockClassName),f.setLeft(this.contentLeft-j),f.setWidth(this.contentWidth+j+h),f.setTop(d-a.scrollTop-g),f.setHeight(e-d+g+i),b++}for(let a=b;a<this.blocks.length;a++)this.blocks[a].domNode.remove();this.blocks.length=b}}class by extends aA{constructor(a,b){super(a),this._viewDomNode=b,this._widgets={},this.domNode=(0,ae.Z)(document.createElement("div")),aB.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,ae.Z)(document.createElement("div")),aB.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(a){for(let b of Object.keys(this._widgets))this._widgets[b].onConfigurationChanged(a);return!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLineMappingChanged(a){return this._updateAnchorsViewPositions(),!0}onLinesChanged(a){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(a){return this._updateAnchorsViewPositions(),!0}onLinesInserted(a){return this._updateAnchorsViewPositions(),!0}onScrollChanged(a){return!0}onZonesChanged(a){return!0}_updateAnchorsViewPositions(){for(let a of Object.keys(this._widgets))this._widgets[a].updateAnchorViewPosition()}addWidget(a){let b=new bz(this._context,this._viewDomNode,a);this._widgets[b.id]=b,b.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(b.domNode):this.domNode.appendChild(b.domNode),this.setShouldRender()}setWidgetPosition(a,b,c,d,e){let f=this._widgets[a.getId()];f.setPosition(b,c,d,e),f.useDisplayNone||this.setShouldRender()}removeWidget(a){let b=a.getId();if(this._widgets.hasOwnProperty(b)){let a=this._widgets[b];delete this._widgets[b];let c=a.domNode.domNode;c.remove(),c.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(a){return!!this._widgets.hasOwnProperty(a)&&this._widgets[a].suppressMouseDown}onBeforeRender(a){for(let b of Object.keys(this._widgets))this._widgets[b].onBeforeRender(a)}prepareRender(a){for(let b of Object.keys(this._widgets))this._widgets[b].prepareRender(a)}render(a){for(let b of Object.keys(this._widgets))this._widgets[b].render(a)}}class bz{constructor(a,b,c){this._primaryAnchor=new bA(null,null),this._secondaryAnchor=new bA(null,null),this._context=a,this._viewDomNode=b,this._actual=c;const d=this._context.configuration.options,e=d.get(165),f=d.get(4);this.domNode=(0,ae.Z)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=(this._actual.allowEditorOverflow||!1)&&f,this.suppressMouseDown=this._actual.suppressMouseDown||!1,this.useDisplayNone=this._actual.useDisplayNone||!1,this._fixedOverflowWidgets=d.get(51),this._contentWidth=e.contentWidth,this._contentLeft=e.contentLeft,this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(a){let b=this._context.configuration.options;if(a.hasChanged(165)){let a=b.get(165);this._contentLeft=a.contentLeft,this._contentWidth=a.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(a,b,c){function d(a,b,c){if(!a)return new bA(null,null);let d=b.model.validatePosition(a);return b.coordinatesConverter.modelPositionIsVisible(d)?new bA(a,b.coordinatesConverter.convertModelPositionToViewPosition(d,c??void 0)):new bA(a,null)}this._affinity=a,this._primaryAnchor=d(b,this._context.viewModel,this._affinity),this._secondaryAnchor=d(c,this._context.viewModel,this._affinity)}_getMaxWidth(){let a=this.domNode.domNode.ownerDocument,b=a.defaultView;return this.allowEditorOverflow?b?.innerWidth||a.documentElement.offsetWidth||a.body.offsetWidth:this._contentWidth}setPosition(a,b,c,d){this._setPosition(d,a,b),this._preference=c,!this.useDisplayNone&&this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(a,b,c,d){let e=a.top,f=a.top+a.height,g=d.viewportHeight-f,h=a.left;return h+b>d.scrollLeft+d.viewportWidth&&(h=d.scrollLeft+d.viewportWidth-b),h<d.scrollLeft&&(h=d.scrollLeft),{fitsAbove:e>=c,aboveTop:e-c,fitsBelow:g>=c,belowTop:f,left:h}}_layoutHorizontalSegmentInPage(a,b,c,d){let e=Math.max(15,b.left-d),f=Math.min(b.left+b.width+d,a.width-15),g=this._viewDomNode.domNode.ownerDocument.defaultView,h=b.left+c-(g?.scrollX??0);if(h+d>f){let a=h-(f-d);h-=a,c-=a}if(h<e){let a=h-e;h-=a,c-=a}return[c,h]}_layoutBoxInPage(a,b,c,d){let e=a.top-c,f=a.top+a.height,g=(0,D.BK)(this._viewDomNode.domNode),h=this._viewDomNode.domNode.ownerDocument,i=h.defaultView,j=g.top+e-(i?.scrollY??0),k=g.top+f-(i?.scrollY??0),l=(0,D.tG)(h.body),[m,n]=this._layoutHorizontalSegmentInPage(l,g,a.left-d.scrollLeft+this._contentLeft,b),o=j>=22,p=k+c<=l.height-22;return this._fixedOverflowWidgets?{fitsAbove:o,aboveTop:Math.max(j,22),fitsBelow:p,belowTop:k,left:n}:{fitsAbove:o,aboveTop:e,fitsBelow:p,belowTop:f,left:m}}_prepareRenderWidgetAtExactPositionOverflowing(a){return new bB(a.top,a.left+this._contentLeft)}_getAnchorsCoordinates(a){return{primary:b(this._primaryAnchor.viewPosition,this._affinity),secondary:b(this._secondaryAnchor.viewPosition?.lineNumber===this._primaryAnchor.viewPosition?.lineNumber?this._secondaryAnchor.viewPosition:null,this._affinity)};function b(b,c){if(!b)return null;let d=a.visibleRangeForPosition(b);if(!d)return null;let e=1===b.column&&3===c?0:d.left;return new bC(a.getVerticalOffsetForLineNumber(b.lineNumber)-a.scrollTop,e,a.getLineHeightForLineNumber(b.lineNumber))}}_reduceAnchorCoordinates(a,b,c){if(!b)return a;let d=this._context.configuration.options.get(59),e=b.left;return e=e<a.left?Math.max(e,a.left-c+d.typicalFullwidthCharacterWidth):Math.min(e,a.left+c-d.typicalFullwidthCharacterWidth),new bC(a.top,e,a.height)}_prepareRenderWidget(a){let b;if(!this._preference||0===this._preference.length)return null;let{primary:c,secondary:d}=this._getAnchorsCoordinates(a);if(!c)return{kind:"offViewport",preserveFocus:this.domNode.domNode.contains(this.domNode.domNode.ownerDocument.activeElement)};if(-1===this._cachedDomNodeOffsetWidth||-1===this._cachedDomNodeOffsetHeight){let a=null;if("function"==typeof this._actual.beforeRender&&(a=bD(this._actual.beforeRender,this._actual)),a)this._cachedDomNodeOffsetWidth=a.width,this._cachedDomNodeOffsetHeight=a.height;else{let a=this.domNode.domNode.getBoundingClientRect();this._cachedDomNodeOffsetWidth=Math.round(a.width),this._cachedDomNodeOffsetHeight=Math.round(a.height)}}let e=this._reduceAnchorCoordinates(c,d,this._cachedDomNodeOffsetWidth);b=this.allowEditorOverflow?this._layoutBoxInPage(e,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,a):this._layoutBoxInViewport(e,this._cachedDomNodeOffsetWidth,this._cachedDomNodeOffsetHeight,a);for(let a=1;a<=2;a++)for(let c of this._preference)if(1===c){if(!b)return null;if(2===a||b.fitsAbove)return{kind:"inViewport",coordinate:new bB(b.aboveTop,b.left),position:1}}else if(2===c){if(!b)return null;if(2===a||b.fitsBelow)return{kind:"inViewport",coordinate:new bB(b.belowTop,b.left),position:2}}else if(this.allowEditorOverflow)return{kind:"inViewport",coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(new bB(e.top,e.left)),position:0};else return{kind:"inViewport",coordinate:new bB(e.top,e.left),position:0};return null}onBeforeRender(a){!this._primaryAnchor.viewPosition||!this._preference||this._primaryAnchor.viewPosition.lineNumber<a.startLineNumber||this._primaryAnchor.viewPosition.lineNumber>a.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(a){this._renderData=this._prepareRenderWidget(a)}render(a){if(!this._renderData||"offViewport"===this._renderData.kind){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this._renderData?.kind==="offViewport"&&this._renderData.preserveFocus?this.domNode.setTop(-1e3):this.domNode.setVisibility("hidden")),"function"==typeof this._actual.afterRender&&bD(this._actual.afterRender,this._actual,null,null);return}this.allowEditorOverflow?this.domNode.setTop(this._renderData.coordinate.top):this.domNode.setTop(this._renderData.coordinate.top+a.scrollTop-a.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&bD(this._actual.afterRender,this._actual,this._renderData.position,this._renderData.coordinate)}}class bA{constructor(a,b){this.modelPosition=a,this.viewPosition=b}}class bB{constructor(a,b){this.top=a,this.left=b,this._coordinateBrand=void 0}}class bC{constructor(a,b,c){this.top=a,this.left=b,this.height=c,this._anchorCoordinateBrand=void 0}}function bD(a,b,...c){try{return a.call(b,...c)}catch{return null}}c(30256);class bE extends az{}var bF=c(39924),bG=c(46547),bH=c(98030);class bI extends bE{constructor(a){super(),this._context=a;const b=this._context.configuration.options,c=b.get(165);this._renderLineHighlight=b.get(110),this._renderLineHighlightOnlyWhenFocus=b.get(111),this._wordWrap=c.isViewportWrapping,this._contentLeft=c.contentLeft,this._contentWidth=c.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new aY.L(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let a=!1,b=new Set;for(let a of this._selections)b.add(a.positionLineNumber);let c=Array.from(b);c.sort((a,b)=>a-b),(0,K.aI)(this._cursorLineNumbers,c)||(this._cursorLineNumbers=c,a=!0);let d=this._selections.every(a=>a.isEmpty());return this._selectionIsEmpty!==d&&(this._selectionIsEmpty=d,a=!0),a}onThemeChanged(a){return this._readFromSelections()}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(165);return this._renderLineHighlight=b.get(110),this._renderLineHighlightOnlyWhenFocus=b.get(111),this._wordWrap=c.isViewportWrapping,this._contentLeft=c.contentLeft,this._contentWidth=c.contentWidth,!0}onCursorStateChanged(a){return this._selections=a.selections,this._readFromSelections()}onFlushed(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollWidthChanged||a.scrollTopChanged}onZonesChanged(a){return!0}onFocusChanged(a){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=a.isFocused,!0)}prepareRender(a){if(!this._shouldRenderThis()){this._renderData=null;return}let b=a.visibleRange.startLineNumber,c=a.visibleRange.endLineNumber,d=[];for(let a=b;a<=c;a++)d[a-b]="";if(this._wordWrap){let e=this._renderOne(a,!1);for(let a of this._cursorLineNumbers){let f=this._context.viewModel.coordinatesConverter,g=f.convertViewPositionToModelPosition(new aD.y(a,1)).lineNumber,h=f.convertModelPositionToViewPosition(new aD.y(g,1)).lineNumber,i=f.convertModelPositionToViewPosition(new aD.y(g,this._context.viewModel.model.getLineMaxColumn(g))).lineNumber,j=Math.max(h,b),k=Math.min(i,c);for(let a=j;a<=k;a++)d[a-b]=e}}let e=this._renderOne(a,!0);for(let a of this._cursorLineNumbers)a<b||a>c||(d[a-b]=e);this._renderData=d}render(a,b){if(!this._renderData)return"";let c=b-a;return c>=this._renderData.length?"":this._renderData[c]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class bJ extends bI{_renderOne(a,b){let c="current-line"+(this._shouldRenderInMargin()?" current-line-both":"")+(b?" current-line-exact":"");return`<div class="${c}" style="width:${Math.max(a.scrollWidth,this._contentWidth)}px;"></div>`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class bK extends bI{_renderOne(a,b){let c="current-line"+(this._shouldRenderInMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")+(this._shouldRenderInMargin()&&b?" current-line-exact-margin":"");return`<div class="${c}" style="width:${this._contentLeft}px"></div>`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,bG.zy)((a,b)=>{let c=a.getColor(bF.kG),d=a.getColor(bF.xU);if(c&&(b.addRule(`.monaco-editor.focused .view-overlays .current-line { background-color: ${c}; }`),b.addRule(`.monaco-editor.focused .margin-view-overlays .current-line-margin { background-color: ${c}; border: none; }`)),d&&(b.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${d}; }`),b.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${d}; border: none; }`)),!c||c.isTransparent()||a.defines(bF.Mf)){let c=a.getColor(bF.Mf);c&&(b.addRule(`.monaco-editor .view-overlays .current-line-exact { border: 2px solid ${c}; }`),b.addRule(`.monaco-editor .margin-view-overlays .current-line-exact-margin { border: 2px solid ${c}; }`),(0,bH.Bb)(a.type)&&(b.addRule(".monaco-editor .view-overlays .current-line-exact { border-width: 1px; }"),b.addRule(".monaco-editor .margin-view-overlays .current-line-exact-margin { border-width: 1px; }")))}}),c(41928);class bL extends bE{constructor(a){super(),this._context=a;const b=this._context.configuration.options;this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){let b=this._context.configuration.options;return this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged||a.scrollWidthChanged}onZonesChanged(a){return!0}prepareRender(a){let b=a.getDecorationsInViewport(),c=[],d=0;for(let a=0,e=b.length;a<e;a++){let e=b[a];e.options.className&&(c[d++]=e)}c=c.sort((a,b)=>{if(a.options.zIndex<b.options.zIndex)return -1;if(a.options.zIndex>b.options.zIndex)return 1;let c=a.options.className,d=b.options.className;return c<d?-1:c>d?1:aE.Q.compareRangesUsingStarts(a.range,b.range)});let e=a.visibleRange.startLineNumber,f=a.visibleRange.endLineNumber,g=[];for(let a=e;a<=f;a++)g[a-e]="";this._renderWholeLineDecorations(a,c,g),this._renderNormalDecorations(a,c,g),this._renderResult=g}_renderWholeLineDecorations(a,b,c){let d=a.visibleRange.startLineNumber,e=a.visibleRange.endLineNumber;for(let a=0,f=b.length;a<f;a++){let f=b[a];if(!f.options.isWholeLine)continue;let g='<div class="cdr '+f.options.className+'" style="left:0;width:100%;"></div>',h=Math.max(f.range.startLineNumber,d),i=Math.min(f.range.endLineNumber,e);for(let a=h;a<=i;a++){let b=a-d;c[b]+=g}}}_renderNormalDecorations(a,b,c){let d=a.visibleRange.startLineNumber,e=null,f=!1,g=null,h=!1;for(let i=0,j=b.length;i<j;i++){let j=b[i];if(j.options.isWholeLine)continue;let k=j.options.className,l=!!j.options.showIfCollapsed,m=j.range;if(l&&1===m.endColumn&&m.endLineNumber!==m.startLineNumber&&(m=new aE.Q(m.startLineNumber,m.startColumn,m.endLineNumber-1,this._context.viewModel.getLineMaxColumn(m.endLineNumber-1))),e===k&&f===l&&aE.Q.areIntersectingOrTouching(g,m)){g=aE.Q.plusRange(g,m);continue}null!==e&&this._renderNormalDecoration(a,g,e,h,f,d,c),e=k,f=l,g=m,h=j.options.shouldFillLineOnLineBreak??!1}null!==e&&this._renderNormalDecoration(a,g,e,h,f,d,c)}_renderNormalDecoration(a,b,c,d,e,f,g){let h=a.linesVisibleRangesForRange(b,"findMatch"===c);if(h)for(let a=0,b=h.length;a<b;a++){let b=h[a];if(b.outsideRenderedLine)continue;let i=b.lineNumber-f;if(e&&1===b.ranges.length){let a=b.ranges[0];if(a.width<this._typicalHalfwidthCharacterWidth){let c=Math.max(0,Math.round(Math.round(a.left+a.width/2)-this._typicalHalfwidthCharacterWidth/2));b.ranges[0]=new bk.Y(c,this._typicalHalfwidthCharacterWidth)}}for(let a=0,e=b.ranges.length;a<e;a++){let f=d&&b.continuesOnNextLine&&1===e,h=b.ranges[a],j='<div class="cdr '+c+'" style="left:'+String(h.left)+"px;width:"+(f?"100%;":String(h.width)+"px;")+'"></div>';g[i]+=j}}}render(a,b){if(!this._renderResult)return"";let c=b-a;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}class bM extends aA{constructor(a,b,c,d){super(a);const e=this._context.configuration.options,f=e.get(117),g=e.get(83),h=e.get(49),i=e.get(120),j=e.get(158),k={listenOnDomNode:c.domNode,className:"editor-scrollable "+(0,bG.Pz)(a.theme.type),useShadows:!1,lazyRender:!0,vertical:f.vertical,horizontal:f.horizontal,verticalHasArrows:f.verticalHasArrows,horizontalHasArrows:f.horizontalHasArrows,verticalScrollbarSize:f.verticalScrollbarSize,verticalSliderSize:f.verticalSliderSize,horizontalScrollbarSize:f.horizontalScrollbarSize,horizontalSliderSize:f.horizontalSliderSize,handleMouseWheel:f.handleMouseWheel,alwaysConsumeMouseWheel:f.alwaysConsumeMouseWheel,arrowSize:f.arrowSize,mouseWheelScrollSensitivity:g,fastScrollSensitivity:h,scrollPredominantAxis:i,scrollByPage:f.scrollByPage,inertialScroll:j};this.scrollbar=this._register(new aZ.oO(b.domNode,k,this._context.viewLayout.getScrollable())),aB.write(this.scrollbar.getDomNode(),6),this.scrollbarDomNode=(0,ae.Z)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const l=(a,b,c)=>{let d={};{let b=a.scrollTop;b&&(d.scrollTop=this._context.viewLayout.getCurrentScrollTop()+b,a.scrollTop=0)}if(c){let b=a.scrollLeft;b&&(d.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+b,a.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(d,1)};this._register((0,D.ko)(c.domNode,"scroll",a=>l(c.domNode,!0,!0))),this._register((0,D.ko)(b.domNode,"scroll",a=>l(b.domNode,!0,!1))),this._register((0,D.ko)(d.domNode,"scroll",a=>l(d.domNode,!0,!1))),this._register((0,D.ko)(this.scrollbarDomNode.domNode,"scroll",a=>l(this.scrollbarDomNode.domNode,!0,!1)))}_setLayout(){let a=this._context.configuration.options,b=a.get(165);this.scrollbarDomNode.setLeft(b.contentLeft),"right"===a.get(81).side?this.scrollbarDomNode.setWidth(b.contentWidth+b.minimap.minimapWidth):this.scrollbarDomNode.setWidth(b.contentWidth),this.scrollbarDomNode.setHeight(b.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(a){this.scrollbar.delegateVerticalScrollbarPointerDown(a)}delegateScrollFromMouseWheelEvent(a){this.scrollbar.delegateScrollFromMouseWheelEvent(a)}onConfigurationChanged(a){if(a.hasChanged(117)||a.hasChanged(83)||a.hasChanged(49)){let a=this._context.configuration.options,b=a.get(117),c=a.get(83),d=a.get(49),e=a.get(120),f={vertical:b.vertical,horizontal:b.horizontal,verticalScrollbarSize:b.verticalScrollbarSize,horizontalScrollbarSize:b.horizontalScrollbarSize,scrollByPage:b.scrollByPage,handleMouseWheel:b.handleMouseWheel,mouseWheelScrollSensitivity:c,fastScrollSensitivity:d,scrollPredominantAxis:e};this.scrollbar.updateOptions(f)}return a.hasChanged(165)&&this._setLayout(),!0}onScrollChanged(a){return!0}onThemeChanged(a){return this.scrollbar.updateClassName("editor-scrollable "+(0,bG.Pz)(this._context.theme.type)),!0}prepareRender(a){}render(a){this.scrollbar.renderNow()}}c(22300);class bN{constructor(a,b,c,d,e){this.startLineNumber=a,this.endLineNumber=b,this.className=c,this.tooltip=d,this._decorationToRenderBrand=void 0,this.zIndex=e??0}}class bO{constructor(a,b,c){this.className=a,this.zIndex=b,this.tooltip=c}}class bP{constructor(){this.decorations=[]}add(a){this.decorations.push(a)}getDecorations(){return this.decorations}}class bQ extends bE{_render(a,b,c){let d=[];for(let c=a;c<=b;c++)d[c-a]=new bP;if(0===c.length)return d;c.sort((a,b)=>a.className===b.className?a.startLineNumber===b.startLineNumber?a.endLineNumber-b.endLineNumber:a.startLineNumber-b.startLineNumber:a.className<b.className?-1:1);let e=null,f=0;for(let g of c){let c=g.className,h=g.zIndex,i=Math.max(g.startLineNumber,a)-a,j=Math.min(g.endLineNumber,b)-a;e===c?(i=Math.max(f+1,i),f=Math.max(f,j)):(e=c,f=j);for(let a=i;a<=f;a++)d[a].add(new bO(c,h,g.tooltip))}return d}}class bR extends aA{constructor(a){super(a),this._widgets={},this._context=a;const b=this._context.configuration.options,c=b.get(165);this.domNode=(0,ae.Z)(document.createElement("div")),this.domNode.setClassName("glyph-margin-widgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this._lineHeight=b.get(75),this._glyphMargin=b.get(66),this._glyphMarginLeft=c.glyphMarginLeft,this._glyphMarginWidth=c.glyphMarginWidth,this._glyphMarginDecorationLaneCount=c.glyphMarginDecorationLaneCount,this._managedDomNodes=[],this._decorationGlyphsToRender=[]}dispose(){this._managedDomNodes=[],this._decorationGlyphsToRender=[],this._widgets={},super.dispose()}getWidgets(){return Object.values(this._widgets)}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(165);return this._lineHeight=b.get(75),this._glyphMargin=b.get(66),this._glyphMarginLeft=c.glyphMarginLeft,this._glyphMarginWidth=c.glyphMarginWidth,this._glyphMarginDecorationLaneCount=c.glyphMarginDecorationLaneCount,!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}addWidget(a){let b=(0,ae.Z)(a.getDomNode());this._widgets[a.getId()]={widget:a,preference:a.getPosition(),domNode:b,renderInfo:null},b.setPosition("absolute"),b.setDisplay("none"),b.setAttribute("widgetId",a.getId()),this.domNode.appendChild(b),this.setShouldRender()}setWidgetPosition(a,b){let c=this._widgets[a.getId()];return!(c.preference.lane===b.lane&&c.preference.zIndex===b.zIndex&&aE.Q.equalsRange(c.preference.range,b.range))&&(c.preference=b,this.setShouldRender(),!0)}removeWidget(a){let b=a.getId();if(this._widgets[b]){let a=this._widgets[b].domNode.domNode;delete this._widgets[b],a.remove(),this.setShouldRender()}}_collectDecorationBasedGlyphRenderRequest(a,b){let c=a.visibleRange.startLineNumber,d=a.visibleRange.endLineNumber;for(let e of a.getDecorationsInViewport()){let a=e.options.glyphMarginClassName;if(!a)continue;let f=Math.max(e.range.startLineNumber,c),g=Math.min(e.range.endLineNumber,d),h=e.options.glyphMargin?.position??aH.ZS.Center,i=e.options.zIndex??0;for(let c=f;c<=g;c++){let d=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(c,0)),e=this._context.viewModel.glyphLanes.getLanesAtLine(d.lineNumber).indexOf(h);b.push(new bS(c,e,i,a))}}}_collectWidgetBasedGlyphRenderRequest(a,b){let c=a.visibleRange.startLineNumber,d=a.visibleRange.endLineNumber;for(let a of Object.values(this._widgets)){let e=a.preference.range,{startLineNumber:f,endLineNumber:g}=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(aE.Q.lift(e));if(!f||!g||g<c||f>d)continue;let h=Math.max(f,c),i=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(h,0)),j=this._context.viewModel.glyphLanes.getLanesAtLine(i.lineNumber).indexOf(a.preference.lane);b.push(new bT(h,j,a.preference.zIndex,a))}}_collectSortedGlyphRenderRequests(a){let b=[];return this._collectDecorationBasedGlyphRenderRequest(a,b),this._collectWidgetBasedGlyphRenderRequest(a,b),b.sort((a,b)=>{if(a.lineNumber===b.lineNumber){if(a.laneIndex===b.laneIndex){if(a.zIndex===b.zIndex)return b.type===a.type?0===a.type&&0===b.type?a.className<b.className?-1:1:0:b.type-a.type;return b.zIndex-a.zIndex}return a.laneIndex-b.laneIndex}return a.lineNumber-b.lineNumber}),b}prepareRender(a){if(!this._glyphMargin){this._decorationGlyphsToRender=[];return}for(let a of Object.values(this._widgets))a.renderInfo=null;let b=new K.j3(this._collectSortedGlyphRenderRequests(a)),c=[];for(;b.length>0;){let a=b.peek();if(!a)break;let d=b.takeWhile(b=>b.lineNumber===a.lineNumber&&b.laneIndex===a.laneIndex);if(!d||0===d.length)break;let e=d[0];if(0===e.type){let a=[];for(let b of d){if(b.zIndex!==e.zIndex||b.type!==e.type)break;(0===a.length||a[a.length-1]!==b.className)&&a.push(b.className)}c.push(e.accept(a.join(" ")))}else e.widget.renderInfo={lineNumber:e.lineNumber,laneIndex:e.laneIndex}}this._decorationGlyphsToRender=c}render(a){if(!this._glyphMargin){for(let a of Object.values(this._widgets))a.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){let a=this._managedDomNodes.pop();a?.domNode.remove()}return}let b=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(let c of Object.values(this._widgets))if(c.renderInfo){let d=a.viewportData.relativeVerticalOffset[c.renderInfo.lineNumber-a.viewportData.startLineNumber],e=this._glyphMarginLeft+c.renderInfo.laneIndex*this._lineHeight;c.domNode.setDisplay("block"),c.domNode.setTop(d),c.domNode.setLeft(e),c.domNode.setWidth(b),c.domNode.setHeight(this._lineHeight)}else c.domNode.setDisplay("none");for(let c=0;c<this._decorationGlyphsToRender.length;c++){let d,e=this._decorationGlyphsToRender[c],f=e.lineNumber,g=a.viewportData.relativeVerticalOffset[f-a.viewportData.startLineNumber],h=this._glyphMarginLeft+e.laneIndex*this._lineHeight;c<this._managedDomNodes.length?d=this._managedDomNodes[c]:(d=(0,ae.Z)(document.createElement("div")),this._managedDomNodes.push(d),this.domNode.appendChild(d));let i=this._context.viewLayout.getLineHeightForLineNumber(f);d.setClassName("cgmr codicon "+e.combinedClassName),d.setPosition("absolute"),d.setTop(g),d.setLeft(h),d.setWidth(b),d.setHeight(i)}for(;this._managedDomNodes.length>this._decorationGlyphsToRender.length;){let a=this._managedDomNodes.pop();a?.domNode.remove()}}}class bS{constructor(a,b,c,d){this.lineNumber=a,this.laneIndex=b,this.zIndex=c,this.className=d,this.type=0}accept(a){return new bU(this.lineNumber,this.laneIndex,a)}}class bT{constructor(a,b,c,d){this.lineNumber=a,this.laneIndex=b,this.zIndex=c,this.widget=d,this.type=1}}class bU{constructor(a,b,c){this.lineNumber=a,this.laneIndex=b,this.combinedClassName=c}}c(95592);var bV=c(85214),bW=c(42491),bX=c(2126);class bY extends bE{constructor(a){super(),this._context=a,this._primaryPosition=null;const b=this._context.configuration.options,c=b.get(166),d=b.get(59);this._spaceWidth=d.spaceWidth,this._maxIndentLeft=-1===c.wrappingColumn?-1:c.wrappingColumn*d.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=b.get(22),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(166),d=b.get(59);return this._spaceWidth=d.spaceWidth,this._maxIndentLeft=-1===c.wrappingColumn?-1:c.wrappingColumn*d.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=b.get(22),!0}onCursorStateChanged(a){let b=a.selections[0].getPosition();return!this._primaryPosition?.equals(b)&&(this._primaryPosition=b,!0)}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}onLanguageConfigurationChanged(a){return!0}prepareRender(a){if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs){this._renderResult=null;return}let b=a.visibleRange.startLineNumber,c=a.visibleRange.endLineNumber,d=a.scrollWidth,e=this._primaryPosition,f=this.getGuidesByLine(b,Math.min(c+1,this._context.viewModel.getLineCount()),e),g=[];for(let e=b;e<=c;e++){let c=e-b,h=f[c],i="",j=a.visibleRangeForPosition(new aD.y(e,1))?.left??0;for(let b of h){let c=-1===b.column?j+(b.visibleColumn-1)*this._spaceWidth:a.visibleRangeForPosition(new aD.y(e,b.column)).left;if(c>d||this._maxIndentLeft>0&&c>this._maxIndentLeft)break;let f=b.horizontalLine?b.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",g=b.horizontalLine?(a.visibleRangeForPosition(new aD.y(e,b.horizontalLine.endColumn))?.left??c+this._spaceWidth)-c:this._spaceWidth;i+=`<div class="core-guide ${b.className} ${f}" style="left:${c}px;width:${g}px"></div>`}g[c]=i}this._renderResult=g}getGuidesByLine(a,b,c){let d=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(a,b,c,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?bX.N6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?bX.N6.EnabledForActive:bX.N6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,e=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(a,b):null,f=0,g=0,h=0;if(!1!==this._bracketPairGuideOptions.highlightActiveIndentation&&c){let d=this._context.viewModel.getActiveIndentGuide(c.lineNumber,a,b);f=d.startLineNumber,g=d.endLineNumber,h=d.indent}let{indentSize:i}=this._context.viewModel.model.getOptions(),j=[];for(let c=a;c<=b;c++){let b=[];j.push(b);let k=d?d[c-a]:[],l=new K.j3(k),m=e?e[c-a]:0;for(let a=1;a<=m;a++){let d=(a-1)*i+1,e=("always"===this._bracketPairGuideOptions.highlightActiveIndentation||0===k.length)&&f<=c&&c<=g&&a===h;b.push(...l.takeWhile(a=>a.visibleColumn<d)||[]);let j=l.peek();(!j||j.visibleColumn!==d||j.horizontalLine)&&b.push(new bX.TH(d,-1,`core-guide-indent lvl-${(a-1)%30}`+(e?" indent-active":""),null,-1,-1))}b.push(...l.takeWhile(a=>!0)||[])}return j}render(a,b){if(!this._renderResult)return"";let c=b-a;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}function bZ(a){if(!(a&&a.isTransparent()))return a}(0,bG.zy)((a,b)=>{let c=[{bracketColor:bF.sN,guideColor:bF.n4,guideColorActive:bF.bB},{bracketColor:bF.lQ,guideColor:bF.I2,guideColorActive:bF.WS},{bracketColor:bF.ss,guideColor:bF.Bo,guideColorActive:bF.Pe},{bracketColor:bF.l5,guideColor:bF.If,guideColorActive:bF.WD},{bracketColor:bF.sH,guideColor:bF.BD,guideColorActive:bF.P1},{bracketColor:bF.zp,guideColor:bF.IW,guideColorActive:bF.WY}],d=new bW.k,e=[{indentColor:bF.vV,indentColorActive:bF.H0},{indentColor:bF.ob,indentColorActive:bF.Am},{indentColor:bF.hz,indentColorActive:bF.tK},{indentColor:bF.ow,indentColorActive:bF.A3},{indentColor:bF.vP,indentColorActive:bF.tp},{indentColor:bF.CM,indentColorActive:bF.As}],f=c.map(b=>{let c=a.getColor(b.bracketColor),d=a.getColor(b.guideColor),e=a.getColor(b.guideColorActive),f=bZ(bZ(d)??c?.transparent(.3)),g=bZ(bZ(e)??c);if(f&&g)return{guideColor:f,guideColorActive:g}}).filter(bV.O9),g=e.map(b=>{let c=a.getColor(b.indentColor),d=a.getColor(b.indentColorActive),e=bZ(c),f=bZ(d);if(e&&f)return{indentColor:e,indentColorActive:f}}).filter(bV.O9);if(f.length>0){for(let a=0;a<30;a++){let c=f[a%f.length];b.addRule(`.monaco-editor .${d.getInlineClassNameOfLevel(a).replace(/ /g,".")} { --guide-color: ${c.guideColor}; --guide-color-active: ${c.guideColorActive}; }`)}b.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),b.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),b.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),b.addRule(`.monaco-editor .vertical.${d.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),b.addRule(`.monaco-editor .horizontal-top.${d.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),b.addRule(`.monaco-editor .horizontal-bottom.${d.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(g.length>0){for(let a=0;a<30;a++){let c=g[a%g.length];b.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${a} { --indent-color: ${c.indentColor}; --indent-color-active: ${c.indentColorActive}; }`)}b.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),b.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}}),c(2804);class b$ extends bE{static{this.CLASS_NAME="line-numbers"}constructor(a){super(),this._context=a,this._readConfig(),this._lastCursorModelPosition=new aD.y(1,1),this._renderResult=null,this._activeModelLineNumber=1,this._context.addEventHandler(this)}_readConfig(){let a=this._context.configuration.options;this._lineHeight=a.get(75);let b=a.get(76);this._renderLineNumbers=b.renderType,this._renderCustomLineNumbers=b.renderFn,this._renderFinalNewline=a.get(109);let c=a.get(165);this._lineNumbersLeft=c.lineNumbersLeft,this._lineNumbersWidth=c.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){return this._readConfig(),!0}onCursorStateChanged(a){let b=a.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(b);let c=!1;return this._activeModelLineNumber!==this._lastCursorModelPosition.lineNumber&&(this._activeModelLineNumber=this._lastCursorModelPosition.lineNumber,c=!0),(2===this._renderLineNumbers||3===this._renderLineNumbers)&&(c=!0),c}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}onDecorationsChanged(a){return a.affectsLineNumber}_getLineRenderLineNumber(a){let b=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(a,1));if(1!==b.column)return"";let c=b.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(c);if(2===this._renderLineNumbers){let a=Math.abs(this._lastCursorModelPosition.lineNumber-c);return 0===a?'<span class="relative-current-line-number">'+c+"</span>":String(a)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===c||c%10==0||c===this._context.viewModel.getLineCount()?String(c):"":String(c)}prepareRender(a){if(0===this._renderLineNumbers){this._renderResult=null;return}let b=M.j9?this._lineHeight%2==0?" lh-even":" lh-odd":"",c=a.visibleRange.startLineNumber,d=a.visibleRange.endLineNumber,e=this._context.viewModel.getDecorationsInViewport(a.visibleRange).filter(a=>!!a.options.lineNumberClassName);e.sort((a,b)=>aE.Q.compareRangesUsingEnds(a.range,b.range));let f=0,g=this._context.viewModel.getLineCount(),h=[];for(let a=c;a<=d;a++){let d=a-c,i=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(a,1)).lineNumber,j=this._getLineRenderLineNumber(a),k="";for(;f<e.length&&e[f].range.endLineNumber<a;)f++;for(let b=f;b<e.length;b++){let{range:c,options:d}=e[b];c.startLineNumber<=a&&(k+=" "+d.lineNumberClassName)}if(!j&&!k){h[d]="";continue}a===g&&0===this._context.viewModel.getLineLength(a)&&("off"===this._renderFinalNewline&&(j=""),"dimmed"===this._renderFinalNewline&&(k+=" dimmed-line-number")),i===this._activeModelLineNumber&&(k+=" active-line-number"),h[d]=`<div class="${b$.CLASS_NAME}${b}${k}" style="left:${this._lineNumbersLeft}px;width:${this._lineNumbersWidth}px;">${j}</div>`}this._renderResult=h}render(a,b){if(!this._renderResult)return"";let c=b-a;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}(0,bG.zy)((a,b)=>{let c=a.getColor(bF.Qt),d=a.getColor(bF.JB);d?b.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${d}; }`):c&&b.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${c.transparent(.4)}; }`)}),c(76293);let b_="monaco-mouse-cursor-text";c(61148);class b0{get didDomLayout(){return this._didDomLayout}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;let a=this._domNode.getBoundingClientRect();this.markDidDomLayout(),this._clientRectDeltaLeft=a.left;let b=this._domNode.offsetWidth;this._clientRectScale=b>0?a.width/b:1}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}constructor(a,b){this._domNode=a,this.endNode=b,this._didDomLayout=!1,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1}markDidDomLayout(){this._didDomLayout=!0}}class b1{constructor(a,b){this.themeType=b;const c=a.options,d=c.get(59);this.renderWhitespace=c.get(113),this.experimentalWhitespaceRendering=c.get(47),this.renderControlCharacters=c.get(108),this.spaceWidth=d.spaceWidth,this.middotWidth=d.middotWidth,this.wsmiddotWidth=d.wsmiddotWidth,this.useMonospaceOptimizations=d.isMonospace&&!c.get(40),this.canUseHalfwidthRightwardsArrow=d.canUseHalfwidthRightwardsArrow,this.lineHeight=c.get(75),this.stopRenderingLineAfter=c.get(133),this.fontLigatures=c.get(60),this.verticalScrollbarSize=c.get(117).verticalScrollbarSize,this.useGpu="on"===c.get(46)}equals(a){return this.themeType===a.themeType&&this.renderWhitespace===a.renderWhitespace&&this.experimentalWhitespaceRendering===a.experimentalWhitespaceRendering&&this.renderControlCharacters===a.renderControlCharacters&&this.spaceWidth===a.spaceWidth&&this.middotWidth===a.middotWidth&&this.wsmiddotWidth===a.wsmiddotWidth&&this.useMonospaceOptimizations===a.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===a.canUseHalfwidthRightwardsArrow&&this.lineHeight===a.lineHeight&&this.stopRenderingLineAfter===a.stopRenderingLineAfter&&this.fontLigatures===a.fontLigatures&&this.verticalScrollbarSize===a.verticalScrollbarSize&&this.useGpu===a.useGpu}}class b2{constructor(){this._currentVisibleRange=new aE.Q(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(a){this._currentVisibleRange=a}}class b3{constructor(a,b,c,d,e,f,g){this.minimalReveal=a,this.lineNumber=b,this.startColumn=c,this.endColumn=d,this.startScrollTop=e,this.stopScrollTop=f,this.scrollType=g,this.type="range",this.minLineNumber=b,this.maxLineNumber=b}}class b4{constructor(a,b,c,d,e){this.minimalReveal=a,this.selections=b,this.startScrollTop=c,this.stopScrollTop=d,this.scrollType=e,this.type="selections";let f=b[0].startLineNumber,g=b[0].endLineNumber;for(let a=1,c=b.length;a<c;a++){const c=b[a];f=Math.min(f,c.startLineNumber),g=Math.max(g,c.endLineNumber)}this.minLineNumber=f,this.maxLineNumber=g}}class b5 extends aA{static{this.HORIZONTAL_EXTRA_PX=30}constructor(a,b,c){super(a);const d=this._context.configuration,e=this._context.configuration.options,f=e.get(59),g=e.get(166);this._lineHeight=e.get(75),this._typicalHalfwidthCharacterWidth=f.typicalHalfwidthCharacterWidth,this._isViewportWrapping=g.isViewportWrapping,this._revealHorizontalRightPadding=e.get(114),this._cursorSurroundingLines=e.get(35),this._cursorSurroundingLinesStyle=e.get(36),this._canUseLayerHinting=!e.get(39),this._viewLineOptions=new b1(d,this._context.theme.type),this._linesContent=c,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new bq(this._context,{createLine:()=>new aC.G(b,this._viewLineOptions)}),this.domNode=this._visibleLines.domNode,aB.write(this.domNode,8),this.domNode.setClassName(`view-lines ${b_}`),(0,I.M)(this.domNode,f),this._maxLineWidth=0,this._asyncUpdateLineWidths=new aj.uC(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new aj.uC(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new b2,this._horizontalRevealRequest=null,this._stickyScrollEnabled=e.get(131).enabled,this._maxNumberStickyLines=e.get(131).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}onConfigurationChanged(a){this._visibleLines.onConfigurationChanged(a),a.hasChanged(166)&&(this._maxLineWidth=0);let b=this._context.configuration.options,c=b.get(59),d=b.get(166);return this._lineHeight=b.get(75),this._typicalHalfwidthCharacterWidth=c.typicalHalfwidthCharacterWidth,this._isViewportWrapping=d.isViewportWrapping,this._revealHorizontalRightPadding=b.get(114),this._cursorSurroundingLines=b.get(35),this._cursorSurroundingLinesStyle=b.get(36),this._canUseLayerHinting=!b.get(39),this._stickyScrollEnabled=b.get(131).enabled,this._maxNumberStickyLines=b.get(131).maxLineCount,(0,I.M)(this.domNode,c),this._onOptionsMaybeChanged(),a.hasChanged(165)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){let a=new b1(this._context.configuration,this._context.theme.type);if(!this._viewLineOptions.equals(a)){this._viewLineOptions=a;let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let a=b;a<=c;a++)this._visibleLines.getVisibleLine(a).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(a){let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber(),d=!1;for(let a=b;a<=c;a++)d=this._visibleLines.getVisibleLine(a).onSelectionChanged()||d;return d}onDecorationsChanged(a){let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let a=b;a<=c;a++)this._visibleLines.getVisibleLine(a).onDecorationsChanged();return!0}onFlushed(a){let b=this._visibleLines.onFlushed(a,this._viewLineOptions.useGpu);return this._maxLineWidth=0,b}onLinesChanged(a){return this._visibleLines.onLinesChanged(a)}onLinesDeleted(a){return this._visibleLines.onLinesDeleted(a)}onLinesInserted(a){return this._visibleLines.onLinesInserted(a)}onRevealRangeRequest(a){let b=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),a.source,a.minimalReveal,a.range,a.selections,a.verticalType);if(-1===b)return!1;let c=this._context.viewLayout.validateScrollPosition({scrollTop:b});a.revealHorizontal?a.range&&a.range.startLineNumber!==a.range.endLineNumber?c={scrollTop:c.scrollTop,scrollLeft:0}:a.range?this._horizontalRevealRequest=new b3(a.minimalReveal,a.range.startLineNumber,a.range.startColumn,a.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),c.scrollTop,a.scrollType):a.selections&&a.selections.length>0&&(this._horizontalRevealRequest=new b4(a.minimalReveal,a.selections,this._context.viewLayout.getCurrentScrollTop(),c.scrollTop,a.scrollType)):this._horizontalRevealRequest=null;let d=Math.abs(this._context.viewLayout.getCurrentScrollTop()-c.scrollTop)<=this._lineHeight?1:a.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(c,d),!0}onScrollChanged(a){if(this._horizontalRevealRequest&&a.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&a.scrollTopChanged){let b=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),c=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(a.scrollTop<b||a.scrollTop>c)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(a.scrollWidth),this._visibleLines.onScrollChanged(a)||a.scrollTopChanged||a.scrollLeftChanged}onTokensChanged(a){return this._visibleLines.onTokensChanged(a)}onZonesChanged(a){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(a)}onThemeChanged(a){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(a,b){let c=this._getViewLineDomNode(a);if(null===c)return null;let d=this._getLineNumberFor(c);if(-1===d||d<1||d>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(d))return new aD.y(d,1);let e=this._visibleLines.getStartLineNumber(),f=this._visibleLines.getEndLineNumber();if(d<e||d>f)return null;let g=this._visibleLines.getVisibleLine(d).getColumnOfNodeOffset(a,b),h=this._context.viewModel.getLineMinColumn(d);return g<h&&(g=h),new aD.y(d,g)}_getViewLineDomNode(a){for(;a&&1===a.nodeType;){if(a.className===aC.G.CLASS_NAME)return a;a=a.parentElement}return null}_getLineNumberFor(a){let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let d=b;d<=c;d++)if(a===this._visibleLines.getVisibleLine(d).getDomNode())return d;return -1}getLineWidth(a){let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();if(a<b||a>c)return -1;let d=new b0(this.domNode.domNode,this._textRangeRestingSpot),e=this._visibleLines.getVisibleLine(a).getWidth(d);return this._updateLineWidthsSlowIfDomDidLayout(d),e}resetLineWidthCaches(){let a=this._visibleLines.getStartLineNumber(),b=this._visibleLines.getEndLineNumber();for(let c=a;c<=b;c++)this._visibleLines.getVisibleLine(c).resetCachedWidth()}linesVisibleRangesForRange(a,b){let c=a.endLineNumber,d=aE.Q.intersectRanges(a,this._lastRenderedData.getCurrentVisibleRange());if(!d)return null;let e=[],f=0,g=new b0(this.domNode.domNode,this._textRangeRestingSpot),h=0;b&&(h=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(d.startLineNumber,1)).lineNumber);let i=this._visibleLines.getStartLineNumber(),j=this._visibleLines.getEndLineNumber();for(let a=d.startLineNumber;a<=d.endLineNumber;a++){if(a<i||a>j)continue;let k=a===d.startLineNumber?d.startColumn:1,l=a!==c,m=l?this._context.viewModel.getLineMaxColumn(a):d.endColumn,n=this._visibleLines.getVisibleLine(a).getVisibleRangesForRange(a,k,m,g);if(n){if(b&&a<c){let b=h;if(b!==(h=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new aD.y(a+1,1)).lineNumber)){let a=n.ranges[n.ranges.length-1];a.width+=this._typicalHalfwidthCharacterWidth,this._context.viewModel.getTextDirection(b)===aH.z4.RTL&&(a.left-=this._typicalHalfwidthCharacterWidth)}}e[f++]=new bk.BG(n.outsideRenderedLine,a,bk.Y.from(n.ranges),l)}}return(this._updateLineWidthsSlowIfDomDidLayout(g),0===f)?null:e}_visibleRangesForLineRange(a,b,c){if(a<this._visibleLines.getStartLineNumber()||a>this._visibleLines.getEndLineNumber())return null;let d=new b0(this.domNode.domNode,this._textRangeRestingSpot),e=this._visibleLines.getVisibleLine(a).getVisibleRangesForRange(a,b,c,d);return this._updateLineWidthsSlowIfDomDidLayout(d),e}_lineIsRenderedRTL(a){return!(a<this._visibleLines.getStartLineNumber()||a>this._visibleLines.getEndLineNumber())&&this._visibleLines.getVisibleLine(a).isRenderedRTL()}visibleRangeForPosition(a){let b=this._visibleRangesForLineRange(a.lineNumber,a.column,a.column);return b?new bk.qN(b.outsideRenderedLine,b.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(a){!a.didDomLayout||this._asyncUpdateLineWidths.isScheduled()&&(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow())}_updateLineWidths(a){let b=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber(),d=1,e=!0;for(let f=b;f<=c;f++){let b=this._visibleLines.getVisibleLine(f);if(a&&!b.getWidthIsFast()){e=!1;continue}d=Math.max(d,b.getWidth(null))}return e&&1===b&&c===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(d),e}_checkMonospaceFontAssumptions(){let a=-1,b=-1,c=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let e=c;e<=d;e++){let c=this._visibleLines.getVisibleLine(e);if(c.needsMonospaceFontCheck()){let d=c.getWidth(null);d>b&&(b=d,a=e)}}if(-1!==a&&!this._visibleLines.getVisibleLine(a).monospaceAssumptionsAreValid())for(let a=c;a<=d;a++)this._visibleLines.getVisibleLine(a).onMonospaceAssumptionsInvalidated()}prepareRender(){throw Error("Not supported")}render(){throw Error("Not supported")}renderText(a){if(this._visibleLines.renderLines(a),this._lastRenderedData.setCurrentVisibleRange(a.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){let b=this._horizontalRevealRequest;if(a.startLineNumber<=b.minLineNumber&&b.maxLineNumber<=a.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();let a=this._computeScrollLeftToReveal(b);a&&(this._isViewportWrapping||a.hasRTL||this._ensureMaxLineWidth(a.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:a.scrollLeft},b.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),M.j9&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){let a=this._visibleLines.getStartLineNumber(),b=this._visibleLines.getEndLineNumber();for(let c=a;c<=b;c++)if(this._visibleLines.getVisibleLine(c).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");let b=this._context.viewLayout.getCurrentScrollTop()-a.bigNumbersDelta;this._linesContent.setTop(-b),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(a){if(this._viewLineOptions.useGpu)return;let b=Math.ceil(a);this._maxLineWidth<b&&(this._maxLineWidth=b,this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(a,b,c,d,e,f){let g,h,i,j,k=a.top,l=a.height,m=k+l;if(e&&e.length>0){let a=e[0].startLineNumber,b=e[0].endLineNumber;for(let c=1,d=e.length;c<d;c++){let d=e[c];a=Math.min(a,d.startLineNumber),b=Math.max(b,d.endLineNumber)}g=!1,h=this._context.viewLayout.getVerticalOffsetForLineNumber(a),i=this._context.viewLayout.getVerticalOffsetForLineNumber(b)+this._lineHeight}else{if(!d)return -1;g=!0,h=this._context.viewLayout.getVerticalOffsetForLineNumber(d.startLineNumber),i=this._context.viewLayout.getVerticalOffsetForLineNumber(d.endLineNumber)+this._lineHeight}let n=("mouse"===b||c)&&"default"===this._cursorSurroundingLinesStyle,o=0,p=0;if(n)c||(o=this._lineHeight);else{let a=Math.min(l/this._lineHeight/2,Math.max(this._cursorSurroundingLines,this._stickyScrollEnabled?this._maxNumberStickyLines:0));o=a*this._lineHeight,p=Math.max(0,a-1)*this._lineHeight}if(c||0!==f&&4!==f||(p+=this._lineHeight),h-=o,(i+=p)-h>l){if(!g)return -1;j=h}else if(5===f||6===f)if(6===f&&k<=h&&i<=m)j=k;else{let a=h-Math.max(5*this._lineHeight,.2*l);j=Math.max(i-l,a)}else j=1===f||2===f?2===f&&k<=h&&i<=m?k:Math.max(0,(h+i)/2-l/2):this._computeMinimumScrolling(k,m,h,i,3===f,4===f);return j}_computeScrollLeftToReveal(a){let b=this._context.viewLayout.getCurrentViewport(),c=this._context.configuration.options.get(165),d=b.left,e=d+b.width-c.verticalScrollbarWidth,f=0x40000000,g=0,h=!1;if("range"===a.type){h=this._lineIsRenderedRTL(a.lineNumber);let b=this._visibleRangesForLineRange(a.lineNumber,a.startColumn,a.endColumn);if(!b)return null;for(let a of b.ranges)f=Math.min(f,Math.round(a.left)),g=Math.max(g,Math.round(a.left+a.width))}else for(let b of a.selections){if(b.startLineNumber!==b.endLineNumber)return null;let a=this._visibleRangesForLineRange(b.startLineNumber,b.startColumn,b.endColumn);if(h||=this._lineIsRenderedRTL(b.startLineNumber),!a)return null;for(let b of a.ranges)f=Math.min(f,Math.round(b.left)),g=Math.max(g,Math.round(b.left+b.width))}return(a.minimalReveal||(f=Math.max(0,f-b5.HORIZONTAL_EXTRA_PX),g+=this._revealHorizontalRightPadding),"selections"===a.type&&g-f>b.width)?null:{scrollLeft:this._computeMinimumScrolling(d,e,f,g),maxHorizontalOffset:g,hasRTL:h}}_computeMinimumScrolling(a,b,c,d,e,f){a|=0,b|=0,c|=0,d|=0,e=!!e,f=!!f;let g=b-a;return!(d-c<g)||e?c:f?Math.max(0,d-g):c<a?c:d>b?Math.max(0,d-g):a}}c(46742);class b6 extends bQ{constructor(a){super(),this._context=a;const b=this._context.configuration.options.get(165);this._decorationsLeft=b.decorationsLeft,this._decorationsWidth=b.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){let b=this._context.configuration.options.get(165);return this._decorationsLeft=b.decorationsLeft,this._decorationsWidth=b.decorationsWidth,!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}_getDecorations(a){let b=a.getDecorationsInViewport(),c=[],d=0;for(let a=0,e=b.length;a<e;a++){let e=b[a],f=e.options.linesDecorationsClassName,g=e.options.zIndex;f&&(c[d++]=new bN(e.range.startLineNumber,e.range.endLineNumber,f,e.options.linesDecorationsTooltip??null,g));let h=e.options.firstLineDecorationClassName;h&&(c[d++]=new bN(e.range.startLineNumber,e.range.startLineNumber,h,e.options.linesDecorationsTooltip??null,g))}return c}prepareRender(a){let b=a.visibleRange.startLineNumber,c=a.visibleRange.endLineNumber,d=this._render(b,c,this._getDecorations(a)),e='" style="left:'+this._decorationsLeft.toString()+"px;width:"+this._decorationsWidth.toString()+'px;"></div>',f=[];for(let a=b;a<=c;a++){let c=a-b,g=d[c].getDecorations(),h="";for(let a of g){let b='<div class="cldr '+a.className;null!==a.tooltip&&(b+='" title="'+a.tooltip),b+=e,h+=b}f[c]=h}this._renderResult=f}render(a,b){return this._renderResult?this._renderResult[b-a]:""}}c(15486);class b7 extends aA{static{this.CLASS_NAME="glyph-margin"}static{this.OUTER_CLASS_NAME="margin"}constructor(a){super(a);const b=this._context.configuration.options,c=b.get(165);this._canUseLayerHinting=!b.get(39),this._contentLeft=c.contentLeft,this._glyphMarginLeft=c.glyphMarginLeft,this._glyphMarginWidth=c.glyphMarginWidth,this._domNode=(0,ae.Z)(document.createElement("div")),this._domNode.setClassName(b7.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,ae.Z)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(b7.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}getDomNode(){return this._domNode}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(165);return this._canUseLayerHinting=!b.get(39),this._contentLeft=c.contentLeft,this._glyphMarginLeft=c.glyphMarginLeft,this._glyphMarginWidth=c.glyphMarginWidth,!0}onScrollChanged(a){return super.onScrollChanged(a)||a.scrollTopChanged}prepareRender(a){}render(a){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");let b=a.scrollTop-a.bigNumbersDelta;this._domNode.setTop(-b);let c=Math.min(a.scrollHeight,1e6);this._domNode.setHeight(c),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(c)}}c(35412);class b8 extends bQ{constructor(a){super(),this._context=a,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){return!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}_getDecorations(a){let b=a.getDecorationsInViewport(),c=[],d=0;for(let a=0,e=b.length;a<e;a++){let e=b[a],f=e.options.marginClassName,g=e.options.zIndex;f&&(c[d++]=new bN(e.range.startLineNumber,e.range.endLineNumber,f,null,g))}return c}prepareRender(a){let b=a.visibleRange.startLineNumber,c=a.visibleRange.endLineNumber,d=this._render(b,c,this._getDecorations(a)),e=[];for(let a=b;a<=c;a++){let c=a-b,f=d[c].getDecorations(),g="";for(let a of f)g+='<div class="cmdr '+a.className+'" style=""></div>';e[c]=g}this._renderResult=e}render(a,b){return this._renderResult?this._renderResult[b-a]:""}}c(44232);class b9{static{this.Empty=new b9(0,0,0,0)}constructor(a,b,c,d){this._rgba8Brand=void 0,this.r=b9._clamp(a),this.g=b9._clamp(b),this.b=b9._clamp(c),this.a=b9._clamp(d)}equals(a){return this.r===a.r&&this.g===a.g&&this.b===a.b&&this.a===a.a}static _clamp(a){return a<0?0:a>255?255:0|a}}var ca=c(36036);class cb extends G.jG{static{this._INSTANCE=null}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,G.lC)(new cb)),this._INSTANCE}constructor(){super(),this._onDidChange=this._register(new F.vl),this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(ca.dG.onDidChange(a=>{a.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){let a=ca.dG.getColorMap();if(!a){this._colors=[];for(let a=0;a<=2;a++)this._colors[a]=b9.Empty;this._backgroundIsLight=!0;return}this._colors=[b9.Empty];for(let b=1;b<a.length;b++){let c=a[b].rgba;this._colors[b]=new b9(c.r,c.g,c.b,Math.round(255*c.a))}let b=a[2].getRelativeLuminance();this._backgroundIsLight=b>=.5,this._onDidChange.fire(void 0)}getColor(a){(a<1||a>=this._colors.length)&&(a=2);let b=this._colors[a];return b||((0,E.dz)(new E.D7(`Missing color for colorId ${a}`)),b=b9.Empty),b}backgroundIsLight(){return this._backgroundIsLight}}let cc=(()=>{let a=[];for(let b=32;b<=126;b++)a.push(b);return a.push(65533),a})();var cd=c(96419);class ce{constructor(a,b){this.scale=b,this._minimapCharRendererBrand=void 0,this.charDataNormal=ce.soften(a,.8),this.charDataLight=ce.soften(a,50/60)}static soften(a,b){let c=new Uint8ClampedArray(a.length);for(let d=0,e=a.length;d<e;d++)c[d]=(0,cd.W)(a[d]*b);return c}renderChar(a,b,c,d,e,f,g,h,i,j,k){var l,m;let n=+this.scale,o=2*this.scale,p=k?1:o;if(b+n>a.width||c+p>a.height)return void console.warn("bad render request outside image data");let q=j?this.charDataLight:this.charDataNormal,r=(l=d,m=i,(l-=32)<0||l>96?m<=2?(l+96)%96:95:l),s=4*a.width,t=g.r,u=g.g,v=g.b,w=e.r-t,x=e.g-u,y=e.b-v,z=Math.max(f,h),A=a.data,B=r*n*o,C=c*s+4*b;for(let a=0;a<p;a++){let a=C;for(let b=0;b<n;b++){let b=q[B++]/255*(f/255);A[a++]=t+w*b,A[a++]=u+x*b,A[a++]=v+y*b,A[a++]=z}C+=s}}blockRenderChar(a,b,c,d,e,f,g,h){let i=+this.scale,j=2*this.scale,k=h?1:j;if(b+i>a.width||c+k>a.height)return void console.warn("bad render request outside image data");let l=4*a.width,m=e/255*.5,n=f.r,o=f.g,p=f.b,q=d.r-n,r=d.g-o,s=d.b-p,t=n+q*m,u=o+r*m,v=p+s*m,w=Math.max(e,g),x=a.data,y=c*l+4*b;for(let a=0;a<k;a++){let a=y;for(let b=0;b<i;b++)x[a++]=t,x[a++]=u,x[a++]=v,x[a++]=w;y+=l}}}var cf=c(90178);let cg={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15},ch=a=>{let b=new Uint8ClampedArray(a.length/2);for(let c=0;c<a.length;c+=2)b[c>>1]=cg[a[c]]<<4|15&cg[a[c+1]];return b},ci={1:(0,cf.P)(()=>ch("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,cf.P)(()=>ch("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class cj{static create(a,b){let c;return this.lastCreated&&a===this.lastCreated.scale&&b===this.lastFontFamily?this.lastCreated:(c=ci[a]?new ce(ci[a](),a):cj.createFromSampleData(cj.createSampleData(b).data,a),this.lastFontFamily=b,this.lastCreated=c,c)}static createSampleData(a){let b=document.createElement("canvas"),c=b.getContext("2d");b.style.height="16px",b.height=16,b.width=960,b.style.width="960px",c.fillStyle="#ffffff",c.font=`bold 16px ${a}`,c.textBaseline="middle";let d=0;for(let a of cc)c.fillText(String.fromCharCode(a),d,8),d+=10;return c.getImageData(0,0,960,16)}static createFromSampleData(a,b){if(61440!==a.length)throw Error("Unexpected source in MinimapCharRenderer");return new ce(cj._downsample(a,b),b)}static _downsampleChar(a,b,c,d,e){let f=+e,g=2*e,h=d,i=0;for(let d=0;d<g;d++){let e=d/g*16,j=(d+1)/g*16;for(let d=0;d<f;d++){let g=d/f*10,k=(d+1)/f*10,l=0,m=0;for(let c=e;c<j;c++){let d=b+3840*Math.floor(c),e=1-(c-Math.floor(c));for(let b=g;b<k;b++){let c=1-(b-Math.floor(b)),f=d+4*Math.floor(b),g=c*e;m+=g,l+=a[f]*a[f+3]/255*g}}let n=l/m;i=Math.max(i,n),c[h++]=(0,cd.W)(n)}}return i}static _downsample(a,b){let c=2*b*1*b,d=96*c,e=new Uint8ClampedArray(d),f=0,g=0,h=0;for(let d=0;d<96;d++)h=Math.max(h,this._downsampleChar(a,g,e,f,b)),f+=c,g+=40;if(h>0){let a=255/h;for(let b=0;b<d;b++)e[b]*=a}return e}}var ck=c(17577);let cl=M.uF?'"Segoe WPC", "Segoe UI", sans-serif':M.zx?"-apple-system, BlinkMacSystemFont, sans-serif":'system-ui, "Ubuntu", "Droid Sans", sans-serif';var cm=c(42190);class cn{constructor(a,b,c){const d=a.options,e=d.get(163),f=d.get(165),g=f.minimap,h=d.get(59),i=d.get(81);this.renderMinimap=g.renderMinimap,this.size=i.size,this.minimapHeightIsEditorHeight=g.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=d.get(119),this.paddingTop=d.get(96).top,this.paddingBottom=d.get(96).bottom,this.showSlider=i.showSlider,this.autohide=i.autohide,this.pixelRatio=e,this.typicalHalfwidthCharacterWidth=h.typicalHalfwidthCharacterWidth,this.lineHeight=d.get(75),this.minimapLeft=g.minimapLeft,this.minimapWidth=g.minimapWidth,this.minimapHeight=f.height,this.canvasInnerWidth=g.minimapCanvasInnerWidth,this.canvasInnerHeight=g.minimapCanvasInnerHeight,this.canvasOuterWidth=g.minimapCanvasOuterWidth,this.canvasOuterHeight=g.minimapCanvasOuterHeight,this.isSampling=g.minimapIsSampling,this.editorHeight=f.height,this.fontScale=g.minimapScale,this.minimapLineHeight=g.minimapLineHeight,this.minimapCharWidth=+this.fontScale,this.sectionHeaderFontFamily=cl,this.sectionHeaderFontSize=i.sectionHeaderFontSize*e,this.sectionHeaderLetterSpacing=i.sectionHeaderLetterSpacing,this.sectionHeaderFontColor=cn._getSectionHeaderColor(b,c.getColor(1)),this.charRenderer=(0,cf.P)(()=>cj.create(this.fontScale,h.fontFamily)),this.defaultBackgroundColor=c.getColor(2),this.backgroundColor=cn._getMinimapBackground(b,this.defaultBackgroundColor),this.foregroundAlpha=cn._getMinimapForegroundOpacity(b)}static _getMinimapBackground(a,b){let c=a.getColor(am.IL);return c?new b9(c.rgba.r,c.rgba.g,c.rgba.b,Math.round(255*c.rgba.a)):b}static _getMinimapForegroundOpacity(a){let b=a.getColor(am.K1);return b?b9._clamp(Math.round(255*b.rgba.a)):255}static _getSectionHeaderColor(a,b){let c=a.getColor(al.By);return c?new b9(c.rgba.r,c.rgba.g,c.rgba.b,Math.round(255*c.rgba.a)):b}equals(a){return this.renderMinimap===a.renderMinimap&&this.size===a.size&&this.minimapHeightIsEditorHeight===a.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===a.scrollBeyondLastLine&&this.paddingTop===a.paddingTop&&this.paddingBottom===a.paddingBottom&&this.showSlider===a.showSlider&&this.autohide===a.autohide&&this.pixelRatio===a.pixelRatio&&this.typicalHalfwidthCharacterWidth===a.typicalHalfwidthCharacterWidth&&this.lineHeight===a.lineHeight&&this.minimapLeft===a.minimapLeft&&this.minimapWidth===a.minimapWidth&&this.minimapHeight===a.minimapHeight&&this.canvasInnerWidth===a.canvasInnerWidth&&this.canvasInnerHeight===a.canvasInnerHeight&&this.canvasOuterWidth===a.canvasOuterWidth&&this.canvasOuterHeight===a.canvasOuterHeight&&this.isSampling===a.isSampling&&this.editorHeight===a.editorHeight&&this.fontScale===a.fontScale&&this.minimapLineHeight===a.minimapLineHeight&&this.minimapCharWidth===a.minimapCharWidth&&this.sectionHeaderFontSize===a.sectionHeaderFontSize&&this.sectionHeaderLetterSpacing===a.sectionHeaderLetterSpacing&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(a.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(a.backgroundColor)&&this.foregroundAlpha===a.foregroundAlpha}}class co{constructor(a,b,c,d,e,f,g,h,i){this.scrollTop=a,this.scrollHeight=b,this.sliderNeeded=c,this._computedSliderRatio=d,this.sliderTop=e,this.sliderHeight=f,this.topPaddingLineCount=g,this.startLineNumber=h,this.endLineNumber=i}getDesiredScrollTopFromDelta(a){return Math.round(this.scrollTop+a/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(a){return Math.round((a-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(a){let b=Math.max(this.startLineNumber,a.startLineNumber),c=Math.min(this.endLineNumber,a.endLineNumber);return b>c?null:[b,c]}getYForLineNumber(a,b){return(a-this.startLineNumber+this.topPaddingLineCount)*b}static create(a,b,c,d,e,f,g,h,i,j,k){let l,m,n=a.pixelRatio,o=a.minimapLineHeight,p=Math.floor(a.canvasInnerHeight/o),q=a.lineHeight;if(a.minimapHeightIsEditorHeight){let b=h*a.lineHeight+a.paddingTop+a.paddingBottom;a.scrollBeyondLastLine&&(b+=Math.max(0,e-a.lineHeight-a.paddingBottom));let c=Math.max(1,Math.floor(e*e/b)),d=Math.max(0,a.minimapHeight-c),f=d/(j-e),k=Math.floor(a.canvasInnerHeight/a.minimapLineHeight);return new co(i,j,d>0,f,i*f,c,Math.floor(a.paddingTop/a.lineHeight),1,Math.min(g,k))}l=f&&c!==g?Math.floor((c-b+1)*o/n):Math.floor(e/q*o/n);let r=Math.floor(a.paddingTop/q),s=Math.floor(a.paddingBottom/q);a.scrollBeyondLastLine&&(s=Math.max(s,e/q-1)),m=s>0?(r+g+s-e/q-1)*o/n:Math.max(0,(r+g)*o/n-l);let t=(m=Math.min(a.minimapHeight-l,m))/(j-e),u=i*t;if(p>=r+g+s)return new co(i,j,m>0,t,u,l,r,1,g);{let c,e,f=Math.max(1,Math.floor((b>1?b+r:Math.max(1,i/q))-u*n/o));f<r?(c=r-f+1,f=1):(c=0,f=Math.max(1,f-r)),k&&k.scrollHeight===j&&(k.scrollTop>i&&(f=Math.min(f,k.startLineNumber),c=Math.max(c,k.topPaddingLineCount)),k.scrollTop<i&&(f=Math.max(f,k.startLineNumber),c=Math.min(c,k.topPaddingLineCount)));let h=Math.min(g,f-c+p-1),m=(i-d)/q;return e=i>=a.paddingTop?(b-f+c+m)*o/n:i/a.paddingTop*(c+m)*o/n,new co(i,j,!0,t,e,l,c,f,h)}}}class cp{static{this.INVALID=new cp(-1)}constructor(a){this.dy=a}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}class cq{constructor(a,b,c){this.renderedLayout=a,this._imageData=b,this._renderedLines=new bp({createLine:()=>cp.INVALID}),this._renderedLines._set(a.startLineNumber,c)}linesEquals(a){if(!this.scrollEquals(a))return!1;let b=this._renderedLines._get().lines;for(let a=0,c=b.length;a<c;a++)if(-1===b[a].dy)return!1;return!0}scrollEquals(a){return this.renderedLayout.startLineNumber===a.startLineNumber&&this.renderedLayout.endLineNumber===a.endLineNumber}_get(){let a=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:a.rendLineNumberStart,lines:a.lines}}onLinesChanged(a,b){return this._renderedLines.onLinesChanged(a,b)}onLinesDeleted(a,b){this._renderedLines.onLinesDeleted(a,b)}onLinesInserted(a,b){this._renderedLines.onLinesInserted(a,b)}onTokensChanged(a){return this._renderedLines.onTokensChanged(a)}}class cr{constructor(a,b,c,d){this._backgroundFillData=cr._createBackgroundFillData(b,c,d),this._buffers=[a.createImageData(b,c),a.createImageData(b,c)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;let a=this._buffers[this._lastUsedBuffer];return a.data.set(this._backgroundFillData),a}static _createBackgroundFillData(a,b,c){let d=c.r,e=c.g,f=c.b,g=c.a,h=new Uint8ClampedArray(a*b*4),i=0;for(let c=0;c<b;c++)for(let b=0;b<a;b++)h[i]=d,h[i+1]=e,h[i+2]=f,h[i+3]=g,i+=4;return h}}class cs{static compute(a,b,c){if(0===a.renderMinimap||!a.isSampling)return[null,[]];let{minimapLineCount:d}=U.xZ.computeContainedMinimapLineCount({viewLineCount:b,scrollBeyondLastLine:a.scrollBeyondLastLine,paddingTop:a.paddingTop,paddingBottom:a.paddingBottom,height:a.editorHeight,lineHeight:a.lineHeight,pixelRatio:a.pixelRatio}),e=b/d,f=e/2;if(!c||0===c.minimapLines.length){let a=[];if(a[0]=1,d>1){for(let b=0,c=d-1;b<c;b++)a[b]=Math.round(b*e+f);a[d-1]=b}return[new cs(e,a),[]]}let g=c.minimapLines,h=g.length,i=[],j=0,k=0,l=1,m=[],n=null;for(let a=0;a<d;a++){let c,o=Math.max(l,Math.round(a*e)),p=Math.max(o,Math.round((a+1)*e));for(;j<h&&g[j]<o;){if(m.length<10){let a=j+1+k;n&&"deleted"===n.type&&n._oldIndex===j-1?n.deleteToLineNumber++:(n={type:"deleted",_oldIndex:j,deleteFromLineNumber:a,deleteToLineNumber:a},m.push(n)),k--}j++}if(j<h&&g[j]<=p)c=g[j],j++;else if(c=0===a?1:a+1===d?b:Math.round(a*e+f),m.length<10){let b=j+1+k;n&&"inserted"===n.type&&n._i===a-1?n.insertToLineNumber++:(n={type:"inserted",_i:a,insertFromLineNumber:b,insertToLineNumber:b},m.push(n)),k++}i[a]=c,l=c}if(m.length<10)for(;j<h;){let a=j+1+k;n&&"deleted"===n.type&&n._oldIndex===j-1?n.deleteToLineNumber++:(n={type:"deleted",_oldIndex:j,deleteFromLineNumber:a,deleteToLineNumber:a},m.push(n)),k--,j++}else m=[{type:"flush"}];return[new cs(e,i),m]}constructor(a,b){this.samplingRatio=a,this.minimapLines=b}modelLineToMinimapLine(a){return Math.min(this.minimapLines.length,Math.max(1,Math.round(a/this.samplingRatio)))}modelLineRangeToMinimapLineRange(a,b){let c=this.modelLineToMinimapLine(a)-1;for(;c>0&&this.minimapLines[c-1]>=a;)c--;let d=this.modelLineToMinimapLine(b)-1;for(;d+1<this.minimapLines.length&&this.minimapLines[d+1]<=b;)d++;if(c===d){let d=this.minimapLines[c];if(d<a||d>b)return null}return[c+1,d+1]}decorationLineRangeToMinimapLineRange(a,b){let c=this.modelLineToMinimapLine(a),d=this.modelLineToMinimapLine(b);return a!==b&&d===c&&(d===this.minimapLines.length?c>1&&c--:d++),[c,d]}onLinesDeleted(a){let b=a.toLineNumber-a.fromLineNumber+1,c=this.minimapLines.length,d=0;for(let e=this.minimapLines.length-1;e>=0&&!(this.minimapLines[e]<a.fromLineNumber);e--)this.minimapLines[e]<=a.toLineNumber?(this.minimapLines[e]=Math.max(1,a.fromLineNumber-1),c=Math.min(c,e),d=Math.max(d,e)):this.minimapLines[e]-=b;return[c,d]}onLinesInserted(a){let b=a.toLineNumber-a.fromLineNumber+1;for(let c=this.minimapLines.length-1;c>=0&&!(this.minimapLines[c]<a.fromLineNumber);c--)this.minimapLines[c]+=b}}class ct extends aA{constructor(a){super(a),this._sectionHeaderCache=new ck.qK(10,1.5),this.tokensColorTracker=cb.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new cn(this._context.configuration,this._context.theme,this.tokensColorTracker);const[b]=cs.compute(this.options,this._context.viewModel.getLineCount(),null);this._samplingState=b,this._shouldCheckSampling=!1,this._actual=new cu(a.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){let a=new cn(this._context.configuration,this._context.theme,this.tokensColorTracker);return!this.options.equals(a)&&(this.options=a,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(a){return this._onOptionsMaybeChanged()}onCursorStateChanged(a){return this._selections=a.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(a){return!!a.affectsMinimap&&this._actual.onDecorationsChanged()}onFlushed(a){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(a){if(!this._samplingState)return this._actual.onLinesChanged(a.fromLineNumber,a.count);{let b=this._samplingState.modelLineRangeToMinimapLineRange(a.fromLineNumber,a.fromLineNumber+a.count-1);return!!b&&this._actual.onLinesChanged(b[0],b[1]-b[0]+1)}}onLinesDeleted(a){if(!this._samplingState)return this._actual.onLinesDeleted(a.fromLineNumber,a.toLineNumber);{let[b,c]=this._samplingState.onLinesDeleted(a);return b<=c&&this._actual.onLinesChanged(b+1,c-b+1),this._shouldCheckSampling=!0,!0}}onLinesInserted(a){return this._samplingState?(this._samplingState.onLinesInserted(a),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(a.fromLineNumber,a.toLineNumber)}onScrollChanged(a){return this._actual.onScrollChanged(a)}onThemeChanged(a){return this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(a){if(!this._samplingState)return this._actual.onTokensChanged(a.ranges);{let b=[];for(let c of a.ranges){let a=this._samplingState.modelLineRangeToMinimapLineRange(c.fromLineNumber,c.toLineNumber);a&&b.push({fromLineNumber:a[0],toLineNumber:a[1]})}return!!b.length&&this._actual.onTokensChanged(b)}}onTokensColorsChanged(a){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(a){return this._actual.onZonesChanged()}prepareRender(a){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(a){let b=a.visibleRange.startLineNumber,c=a.visibleRange.endLineNumber;this._samplingState&&(b=this._samplingState.modelLineToMinimapLine(b),c=this._samplingState.modelLineToMinimapLine(c));let d={viewportContainsWhitespaceGaps:a.viewportData.whitespaceViewportData.length>0,scrollWidth:a.scrollWidth,scrollHeight:a.scrollHeight,viewportStartLineNumber:b,viewportEndLineNumber:c,viewportStartLineNumberVerticalOffset:a.getVerticalOffsetForLineNumber(b),scrollTop:a.scrollTop,scrollLeft:a.scrollLeft,viewportWidth:a.viewportWidth,viewportHeight:a.viewportHeight};this._actual.render(d)}_recreateLineSampling(){this._minimapSelections=null;let a=!!this._samplingState,[b,c]=cs.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=b,a&&this._samplingState)for(let a of c)switch(a.type){case"deleted":this._actual.onLinesDeleted(a.deleteFromLineNumber,a.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(a.insertFromLineNumber,a.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(a){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[a-1]):this._context.viewModel.getLineContent(a)}getLineMaxColumn(a){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[a-1]):this._context.viewModel.getLineMaxColumn(a)}getMinimapLinesRenderingData(a,b,c){if(this._samplingState){let d=[];for(let e=0,f=b-a+1;e<f;e++)c[e]?d[e]=this._context.viewModel.getViewLineData(this._samplingState.minimapLines[a+e-1]):d[e]=null;return d}return this._context.viewModel.getMinimapLinesRenderingData(a,b,c).data}getSelections(){if(null===this._minimapSelections)if(this._samplingState)for(let a of(this._minimapSelections=[],this._selections)){let[b,c]=this._samplingState.decorationLineRangeToMinimapLineRange(a.startLineNumber,a.endLineNumber);this._minimapSelections.push(new aY.L(b,a.startColumn,c,a.endColumn))}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(a,b){return this._getMinimapDecorationsInViewport(a,b).filter(a=>!a.options.minimap?.sectionHeaderStyle)}getSectionHeaderDecorationsInViewport(a,b){let c=this.options.sectionHeaderFontSize/this.options.minimapLineHeight;return a=Math.floor(Math.max(1,a-c)),this._getMinimapDecorationsInViewport(a,b).filter(a=>!!a.options.minimap?.sectionHeaderStyle)}_getMinimapDecorationsInViewport(a,b){let c;if(this._samplingState){let d=this._samplingState.minimapLines[a-1],e=this._samplingState.minimapLines[b-1];c=new aE.Q(d,1,e,this._context.viewModel.getLineMaxColumn(e))}else c=new aE.Q(a,1,b,this._context.viewModel.getLineMaxColumn(b));let d=this._context.viewModel.getMinimapDecorationsInRange(c);if(this._samplingState){let a=[];for(let b of d){if(!b.options.minimap)continue;let c=b.range,d=this._samplingState.modelLineToMinimapLine(c.startLineNumber),e=this._samplingState.modelLineToMinimapLine(c.endLineNumber);a.push(new cm.vo(new aE.Q(d,c.startColumn,e,c.endColumn),b.options))}return a}return d}getSectionHeaderText(a,b){let c=a.options.minimap?.sectionHeaderText;if(!c)return null;let d=this._sectionHeaderCache.get(c);if(d)return d;let e=b(c);return this._sectionHeaderCache.set(c,e),e}getOptions(){return this._context.viewModel.model.getOptions()}revealLineNumber(a){this._samplingState&&(a=this._samplingState.minimapLines[a-1]),this._context.viewModel.revealRange("mouse",!1,new aE.Q(a,1,a,1),1,0)}setScrollTop(a){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:a},1)}}class cu extends G.jG{constructor(a,b){super(),this._renderDecorations=!1,this._gestureInProgress=!1,this._isMouseOverMinimap=!1,this._theme=a,this._model=b,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(am.yr),this._domNode=(0,ae.Z)(document.createElement("div")),aB.write(this._domNode,9),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=(0,ae.Z)(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=(0,ae.Z)(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=(0,ae.Z)(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=(0,ae.Z)(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=(0,ae.Z)(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._hideDelayedScheduler=this._register(new aj.uC(()=>this._hideImmediatelyIfMouseIsOutside(),500)),this._register((0,D.un)(this._domNode.domNode,D.Bx.MOUSE_OVER,()=>{this._isMouseOverMinimap=!0})),this._register((0,D.un)(this._domNode.domNode,D.Bx.MOUSE_LEAVE,()=>{this._isMouseOverMinimap=!1})),this._pointerDownListener=(0,D.un)(this._domNode.domNode,D.Bx.POINTER_DOWN,a=>{a.preventDefault();let b="mouse"===a.pointerType,c=0===a.button;if(0!==this._model.options.renderMinimap&&this._lastRenderData){if("proportional"!==this._model.options.size){if(c&&this._lastRenderData){let b=(0,D.BK)(this._slider.domNode),c=b.top+b.height/2;this._startSliderDragging(a,c,this._lastRenderData.renderedLayout)}return}if(c||!b){let b=this._model.options.minimapLineHeight,c=Math.floor(this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*a.offsetY/b)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;c=Math.min(c,this._model.getLineCount()),this._model.revealLineNumber(c)}}}),this._sliderPointerMoveMonitor=new ah._,this._sliderPointerDownListener=(0,D.un)(this._slider.domNode,D.Bx.POINTER_DOWN,a=>{a.preventDefault(),a.stopPropagation(),0===a.button&&this._lastRenderData&&this._startSliderDragging(a,a.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=aW.q.addTarget(this._domNode.domNode),this._sliderTouchStartListener=(0,D.ko)(this._domNode.domNode,aW.B.Start,a=>{a.preventDefault(),a.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(a))},{passive:!1}),this._sliderTouchMoveListener=(0,D.ko)(this._domNode.domNode,aW.B.Change,a=>{a.preventDefault(),a.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(a)},{passive:!1}),this._sliderTouchEndListener=(0,D.un)(this._domNode.domNode,aW.B.End,a=>{a.preventDefault(),a.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_hideSoon(){this._hideDelayedScheduler.cancel(),this._hideDelayedScheduler.schedule()}_hideImmediatelyIfMouseIsOutside(){this._isMouseOverMinimap?this._hideSoon():this._domNode.toggleClassName("active",!1)}_startSliderDragging(a,b,c){if(!a.target||!(a.target instanceof Element))return;let d=a.pageX;this._slider.toggleClassName("active",!0);let e=(a,e)=>{let f=(0,D.BK)(this._domNode.domNode),g=Math.min(Math.abs(e-d),Math.abs(e-f.left),Math.abs(e-f.left-f.width));M.uF&&g>140?this._model.setScrollTop(c.scrollTop):this._model.setScrollTop(c.getDesiredScrollTopFromDelta(a-b))};a.pageY!==b&&e(a.pageY,d),this._sliderPointerMoveMonitor.startMonitoring(a.target,a.pointerId,a.buttons,a=>e(a.pageY,a.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(a){let b=this._domNode.domNode.getBoundingClientRect().top,c=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(a.pageY-b);this._model.setScrollTop(c)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){let a=["minimap"];return"always"===this._model.options.showSlider?a.push("slider-always"):a.push("slider-mouseover"),"mouseover"===this._model.options.autohide?a.push("minimap-autohide-mouseover"):"scroll"===this._model.options.autohide&&a.push("minimap-autohide-scroll"),a.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return!this._buffers&&this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new cr(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(a,b){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(a,b)}onLinesDeleted(a,b){return this._lastRenderData?.onLinesDeleted(a,b),!0}onLinesInserted(a,b){return this._lastRenderData?.onLinesInserted(a,b),!0}onScrollChanged(a){return"scroll"===this._model.options.autohide&&(a.scrollTopChanged||a.scrollHeightChanged)&&(this._domNode.toggleClassName("active",!0),this._hideSoon()),this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(am.yr),this._renderDecorations=!0,!0}onTokensChanged(a){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(a)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(a){if(0===this._model.options.renderMinimap){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}a.scrollLeft+a.viewportWidth>=a.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");let b=co.create(this._model.options,a.viewportStartLineNumber,a.viewportEndLineNumber,a.viewportStartLineNumberVerticalOffset,a.viewportHeight,a.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),a.scrollTop,a.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(b.sliderNeeded?"block":"none"),this._slider.setTop(b.sliderTop),this._slider.setHeight(b.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(b.sliderHeight),this.renderDecorations(b),this._lastRenderData=this.renderLines(b)}renderDecorations(a){if(this._renderDecorations){this._renderDecorations=!1;let b=this._model.getSelections();b.sort(aE.Q.compareRangesUsingStarts);let c=this._model.getMinimapDecorationsInViewport(a.startLineNumber,a.endLineNumber);c.sort((a,b)=>(a.options.zIndex||0)-(b.options.zIndex||0));let{canvasInnerWidth:d,canvasInnerHeight:e}=this._model.options,f=this._model.options.minimapLineHeight,g=this._model.options.minimapCharWidth,h=this._model.getOptions().tabSize,i=this._decorationsCanvas.domNode.getContext("2d");i.clearRect(0,0,d,e);let j=new cv(a.startLineNumber,a.endLineNumber,!1);this._renderSelectionLineHighlights(i,b,j,a,f),this._renderDecorationsLineHighlights(i,c,j,a,f);let k=new cv(a.startLineNumber,a.endLineNumber,null);this._renderSelectionsHighlights(i,b,k,a,f,h,g,d),this._renderDecorationsHighlights(i,c,k,a,f,h,g,d),this._renderSectionHeaders(a)}}_renderSelectionLineHighlights(a,b,c,d,e){if(!this._selectionColor||this._selectionColor.isTransparent())return;a.fillStyle=this._selectionColor.transparent(.5).toString();let f=0,g=0;for(let h of b){let b=d.intersectWithViewport(h);if(!b)continue;let[i,j]=b;for(let a=i;a<=j;a++)c.set(a,!0);let k=d.getYForLineNumber(i,e),l=d.getYForLineNumber(j,e);g>=k||(g>f&&a.fillRect(U.xq,f,a.canvas.width,g-f),f=k),g=l}g>f&&a.fillRect(U.xq,f,a.canvas.width,g-f)}_renderDecorationsLineHighlights(a,b,c,d,e){let f=new Map;for(let g=b.length-1;g>=0;g--){let h=b[g],i=h.options.minimap;if(!i||1!==i.position)continue;let j=d.intersectWithViewport(h.range);if(!j)continue;let[k,l]=j,m=i.getColor(this._theme.value);if(!m||m.isTransparent())continue;let n=f.get(m.toString());n||(n=m.transparent(.5).toString(),f.set(m.toString(),n)),a.fillStyle=n;for(let b=k;b<=l;b++){if(c.has(b))continue;c.set(b,!0);let f=d.getYForLineNumber(b,e);a.fillRect(U.xq,f,a.canvas.width,e)}}}_renderSelectionsHighlights(a,b,c,d,e,f,g,h){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(let i of b){let b=d.intersectWithViewport(i);if(!b)continue;let[j,k]=b;for(let b=j;b<=k;b++)this.renderDecorationOnLine(a,c,i,this._selectionColor,d,b,e,e,f,g,h)}}_renderDecorationsHighlights(a,b,c,d,e,f,g,h){for(let i of b){let b=i.options.minimap;if(!b)continue;let j=d.intersectWithViewport(i.range);if(!j)continue;let[k,l]=j,m=b.getColor(this._theme.value);if(!(!m||m.isTransparent()))for(let j=k;j<=l;j++)switch(b.position){case 1:this.renderDecorationOnLine(a,c,i.range,m,d,j,e,e,f,g,h);continue;case 2:{let b=d.getYForLineNumber(j,e);this.renderDecoration(a,m,2,b,2,e);continue}}}}renderDecorationOnLine(a,b,c,d,e,f,g,h,i,j,k){let l=e.getYForLineNumber(f,h);if(l+g<0||l>this._model.options.canvasInnerHeight)return;let{startLineNumber:m,endLineNumber:n}=c,o=m===f?c.startColumn:1,p=n===f?c.endColumn:this._model.getLineMaxColumn(f),q=this.getXOffsetForPosition(b,f,o,i,j,k),r=this.getXOffsetForPosition(b,f,p,i,j,k);this.renderDecoration(a,d,q,l,r-q,g)}getXOffsetForPosition(a,b,c,d,e,f){if(1===c)return U.xq;if((c-1)*e>=f)return f;let g=a.get(b);if(!g){let c=this._model.getLineContent(b);g=[U.xq];let h=U.xq;for(let a=1;a<c.length+1;a++){let b=c.charCodeAt(a-1),i=h+(9===b?d*e:(0,a9.ne)(b)?2*e:e);if(i>=f){g[a]=f;break}g[a]=i,h=i}a.set(b,g)}return c-1<g.length?g[c-1]:f}renderDecoration(a,b,c,d,e,f){a.fillStyle=b&&b.toString()||"",a.fillRect(c,d,e,f)}_renderSectionHeaders(a){let b=this._model.options.minimapLineHeight,c=this._model.options.sectionHeaderFontSize,d=this._model.options.sectionHeaderLetterSpacing,e=1.5*c,{canvasInnerWidth:f}=this._model.options,g=this._model.options.backgroundColor,h=`rgb(${g.r} ${g.g} ${g.b} / .7)`,i=this._model.options.sectionHeaderFontColor,j=`rgb(${i.r} ${i.g} ${i.b})`,k=this._decorationsCanvas.domNode.getContext("2d");k.letterSpacing=d+"px",k.font="500 "+c+"px "+this._model.options.sectionHeaderFontFamily,k.strokeStyle=j,k.lineWidth=.4;let l=this._model.getSectionHeaderDecorationsInViewport(a.startLineNumber,a.endLineNumber);l.sort((a,b)=>a.range.startLineNumber-b.range.startLineNumber);let m=cu._fitSectionHeader.bind(null,k,f-U.xq);for(let d of l){let g=a.getYForLineNumber(d.range.startLineNumber,b)+c,i=g-c,l=i+2,n=this._model.getSectionHeaderText(d,m);cu._renderSectionLabel(k,n,d.options.minimap?.sectionHeaderStyle===2,h,j,f,i,e,g,l)}}static _fitSectionHeader(a,b,c){if(!c)return c;let d=a.measureText(c).width,e=a.measureText("…").width;if(d<=b||d<=e)return c;let f=c.length,g=Math.floor((b-e)/(d/c.length))-1,h=Math.ceil(g/2);for(;h>0&&/\s/.test(c[h-1]);)--h;return c.substring(0,h)+"…"+c.substring(f-(g-h))}static _renderSectionLabel(a,b,c,d,e,f,g,h,i,j){b&&(a.fillStyle=d,a.fillRect(0,g,f,h),a.fillStyle=e,a.fillText(b,U.xq,i)),c&&(a.beginPath(),a.moveTo(0,j),a.lineTo(f,j),a.closePath(),a.stroke())}renderLines(a){let b=a.startLineNumber,c=a.endLineNumber,d=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(a)){let b=this._lastRenderData._get();return new cq(a,b.imageData,b.lines)}let e=this._getBuffer();if(!e)return null;let[f,g,h]=cu._renderUntouchedLines(e,a.topPaddingLineCount,b,c,d,this._lastRenderData),i=this._model.getMinimapLinesRenderingData(b,c,h),j=this._model.getOptions().tabSize,k=this._model.options.defaultBackgroundColor,l=this._model.options.backgroundColor,m=this._model.options.foregroundAlpha,n=this._model.tokensColorTracker,o=n.backgroundIsLight(),p=this._model.options.renderMinimap,q=this._model.options.charRenderer(),r=this._model.options.fontScale,s=this._model.options.minimapCharWidth,t=(1===p?2:3)*r,u=d>t?Math.floor((d-t)/2):0,v=l.a/255,w=new b9(Math.round((l.r-k.r)*v+k.r),Math.round((l.g-k.g)*v+k.g),Math.round((l.b-k.b)*v+k.b),255),x=a.topPaddingLineCount*d,y=[];for(let a=0,f=c-b+1;a<f;a++)h[a]&&cu._renderLine(e,w,l.a,o,p,s,n,m,q,x,u,j,i[a],r,d),y[a]=new cp(x),x+=d;let z=-1===f?0:f,A=-1===g?e.height:g;return this._canvas.domNode.getContext("2d").putImageData(e,0,0,0,z,e.width,A-z),new cq(a,e,y)}static _renderUntouchedLines(a,b,c,d,e,f){let g=[];if(!f){for(let a=0,b=d-c+1;a<b;a++)g[a]=!0;return[-1,-1,g]}let h=f._get(),i=h.imageData.data,j=h.rendLineNumberStart,k=h.lines,l=k.length,m=a.width,n=a.data,o=(d-c+1)*e*m*4,p=-1,q=-1,r=-1,s=-1,t=-1,u=-1,v=b*e;for(let a=c;a<=d;a++){let b=a-c,d=a-j,f=d>=0&&d<l?k[d].dy:-1;if(-1===f){g[b]=!0,v+=e;continue}let h=f*m*4,w=(f+e)*m*4,x=v*m*4,y=(v+e)*m*4;s===h&&u===x?s=w:(-1!==r&&(n.set(i.subarray(r,s),t),-1===p&&0===r&&r===t&&(p=s),-1===q&&s===o&&r===t&&(q=r)),r=h,s=w,t=x),u=y,g[b]=!1,v+=e}return -1!==r&&(n.set(i.subarray(r,s),t),-1===p&&0===r&&r===t&&(p=s),-1===q&&s===o&&r===t&&(q=r)),[-1===p?-1:p/(4*m),-1===q?-1:q/(4*m),g]}static _renderLine(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){let p=m.content,q=m.tokens,r=a.width-f,s=1===o,t=U.xq,u=0,v=0;for(let m=0,o=q.getCount();m<o;m++){let o=q.getEndOffset(m),w=q.getForeground(m),x=g.getColor(w);for(;u<o;u++){if(t>r)return;let g=p.charCodeAt(u);if(9===g){let a=l-(u+v)%l;v+=a-1,t+=a*f}else if(32===g)t+=f;else{let l=(0,a9.ne)(g)?2:1;for(let m=0;m<l;m++)if(2===e?i.blockRenderChar(a,t,j+k,x,h,b,c,s):i.renderChar(a,t,j+k,g,x,h,b,c,n,d,s),(t+=f)>r)return}}}}}class cv{constructor(a,b,c){this._startLineNumber=a,this._endLineNumber=b,this._defaultValue=c,this._values=[];for(let a=0,b=this._endLineNumber-this._startLineNumber+1;a<b;a++)this._values[a]=c}has(a){return this.get(a)!==this._defaultValue}set(a,b){a<this._startLineNumber||a>this._endLineNumber||(this._values[a-this._startLineNumber]=b)}get(a){return a<this._startLineNumber||a>this._endLineNumber?this._defaultValue:this._values[a-this._startLineNumber]}}c(59708);class cw extends aA{constructor(a,b){super(a),this._viewDomNode=b;const c=this._context.configuration.options.get(165);this._widgets={},this._verticalScrollbarWidth=c.verticalScrollbarWidth,this._minimapWidth=c.minimap.minimapWidth,this._horizontalScrollbarHeight=c.horizontalScrollbarHeight,this._editorHeight=c.height,this._editorWidth=c.width,this._viewDomNodeRect={top:0,left:0,width:0,height:0},this._domNode=(0,ae.Z)(document.createElement("div")),aB.write(this._domNode,4),this._domNode.setClassName("overlayWidgets"),this.overflowingOverlayWidgetsDomNode=(0,ae.Z)(document.createElement("div")),aB.write(this.overflowingOverlayWidgetsDomNode,5),this.overflowingOverlayWidgetsDomNode.setClassName("overflowingOverlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(a){let b=this._context.configuration.options.get(165);return this._verticalScrollbarWidth=b.verticalScrollbarWidth,this._minimapWidth=b.minimap.minimapWidth,this._horizontalScrollbarHeight=b.horizontalScrollbarHeight,this._editorHeight=b.height,this._editorWidth=b.width,!0}_widgetCanOverflow(a){let b=this._context.configuration.options.get(4);return(a.allowEditorOverflow||!1)&&b}addWidget(a){let b=(0,ae.Z)(a.getDomNode());this._widgets[a.getId()]={widget:a,preference:null,domNode:b},b.setPosition("absolute"),b.setAttribute("widgetId",a.getId()),this._widgetCanOverflow(a)?this.overflowingOverlayWidgetsDomNode.appendChild(b):this._domNode.appendChild(b),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(a,b){let c=this._widgets[a.getId()],d=b?b.preference:null,e=b?.stackOrdinal;return c.preference===d&&c.stack===e?(this._updateMaxMinWidth(),!1):(c.preference=d,c.stack=e,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(a){let b=a.getId();if(this._widgets.hasOwnProperty(b)){let a=this._widgets[b].domNode.domNode;delete this._widgets[b],a.remove(),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){let a=0,b=Object.keys(this._widgets);for(let c=0,d=b.length;c<d;c++){let d=b[c],e=this._widgets[d],f=e.widget.getMinContentWidthInPx?.();void 0!==f&&(a=Math.max(a,f))}this._context.viewLayout.setOverlayWidgetsMinWidth(a)}_renderWidget(a,b){let c=a.domNode;if(null===a.preference)return void c.setTop("");let d=2*this._verticalScrollbarWidth+this._minimapWidth;if(0===a.preference||1===a.preference){if(1===a.preference){let a=c.domNode.clientHeight;c.setTop(this._editorHeight-a-2*this._horizontalScrollbarHeight)}else c.setTop(0);void 0!==a.stack?(c.setTop(b[a.preference]),b[a.preference]+=c.domNode.clientWidth):c.setRight(d)}else if(2===a.preference)c.domNode.style.right="50%",void 0!==a.stack?(c.setTop(b[2]),b[2]+=c.domNode.clientHeight):c.setTop(0);else{let{top:b,left:d}=a.preference;if(this._context.configuration.options.get(51)&&this._widgetCanOverflow(a.widget)){let a=this._viewDomNodeRect;c.setTop(b+a.top),c.setLeft(d+a.left),c.setPosition("fixed")}else c.setTop(b),c.setLeft(d),c.setPosition("absolute")}}prepareRender(a){this._viewDomNodeRect=(0,D.BK)(this._viewDomNode.domNode)}render(a){this._domNode.setWidth(this._editorWidth);let b=Object.keys(this._widgets),c=Array.from({length:3},()=>0);b.sort((a,b)=>(this._widgets[a].stack||0)-(this._widgets[b].stack||0));for(let a=0,d=b.length;a<d;a++){let d=b[a];this._renderWidget(this._widgets[d],c)}}}var cx=c(55404),cy=c(90637);class cz{constructor(a,b){const c=a.options;this.lineHeight=c.get(75),this.pixelRatio=c.get(163),this.overviewRulerLanes=c.get(95),this.renderBorder=c.get(94);const d=b.getColor(bF.x9);this.borderColor=d?d.toString():null,this.hideCursor=c.get(68);const e=b.getColor(bF.D0);this.cursorColorSingle=e?e.transparent(.7).toString():null;const f=b.getColor(bF.sC);this.cursorColorPrimary=f?f.transparent(.7).toString():null;const g=b.getColor(bF.we);this.cursorColorSecondary=g?g.transparent(.7).toString():null,this.themeType=b.type;const h=c.get(81),i=h.enabled,j=h.side,k=b.getColor(bF.Xr),l=ca.dG.getDefaultBackground();k?this.backgroundColor=k:i&&"right"===j?this.backgroundColor=l:this.backgroundColor=null;const m=c.get(165).overviewRuler;this.top=m.top,this.right=m.right,this.domWidth=m.width,this.domHeight=m.height,0===this.overviewRulerLanes?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[n,o]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=n,this.w=o}_initLanes(a,b,c){let d=b-a;if(c>=3){let b=Math.floor(d/3),c=Math.floor(d/3),e=d-b-c,f=a+b;return[[0,a,f,a,a+b+e,a,f,a],[0,b,e,b+e,c,b+e+c,e+c,b+e+c]]}if(2!==c)return[[0,a,a,a,a,a,a,a],[0,d,d,d,d,d,d,d]];{let b=Math.floor(d/2),c=d-b;return[[0,a,a,a,a+b,a,a,a],[0,b,b,b,c,b+c,b+c,b+c]]}}equals(a){return this.lineHeight===a.lineHeight&&this.pixelRatio===a.pixelRatio&&this.overviewRulerLanes===a.overviewRulerLanes&&this.renderBorder===a.renderBorder&&this.borderColor===a.borderColor&&this.hideCursor===a.hideCursor&&this.cursorColorSingle===a.cursorColorSingle&&this.cursorColorPrimary===a.cursorColorPrimary&&this.cursorColorSecondary===a.cursorColorSecondary&&this.themeType===a.themeType&&cx.Q1.equals(this.backgroundColor,a.backgroundColor)&&this.top===a.top&&this.right===a.right&&this.domWidth===a.domWidth&&this.domHeight===a.domHeight&&this.canvasWidth===a.canvasWidth&&this.canvasHeight===a.canvasHeight}}class cA extends aA{constructor(a){super(a),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,ae.Z)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=ca.dG.onDidChange(a=>{a.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[{position:new aD.y(1,1),color:this._settings.cursorColorSingle}]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(a){let b=new cz(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(b))&&(this._settings=b,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,a&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(a){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}onCursorStateChanged(a){this._cursorPositions=[];for(let b=0,c=a.selections.length;b<c;b++){let d=this._settings.cursorColorSingle;c>1&&(d=0===b?this._settings.cursorColorPrimary:this._settings.cursorColorSecondary),this._cursorPositions.push({position:a.selections[b].getPosition(),color:d})}return this._cursorPositions.sort((a,b)=>aD.y.compare(a.position,b.position)),this._markRenderingIsMaybeNeeded()}onDecorationsChanged(a){return!!a.affectsOverviewRuler&&this._markRenderingIsMaybeNeeded()}onFlushed(a){return this._markRenderingIsNeeded()}onScrollChanged(a){return!!a.scrollHeightChanged&&this._markRenderingIsNeeded()}onZonesChanged(a){return this._markRenderingIsNeeded()}onThemeChanged(a){return!!this._updateSettings(!1)&&this._markRenderingIsNeeded()}getDomNode(){return this._domNode.domNode}prepareRender(a){}render(a){this._render(),this._actualShouldRender=0}_render(){let a=this._settings.backgroundColor;if(0===this._settings.overviewRulerLanes){this._domNode.setBackgroundColor(a?cx.Q1.Format.CSS.formatHexA(a):""),this._domNode.setDisplay("none");return}let b=this._context.viewModel.getAllOverviewRulerDecorations(this._context.theme);if(b.sort(cy.Uv.compareByRenderingProps),1!==this._actualShouldRender||cy.Uv.equalsArr(this._renderedDecorations,b)||(this._actualShouldRender=2),1!==this._actualShouldRender||(0,K.aI)(this._renderedCursorPositions,this._cursorPositions,(a,b)=>a.position.lineNumber===b.position.lineNumber&&a.color===b.color)||(this._actualShouldRender=2),1===this._actualShouldRender)return;this._renderedDecorations=b,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");let c=this._settings.canvasWidth,d=this._settings.canvasHeight,e=this._settings.lineHeight,f=this._context.viewLayout,g=d/this._context.viewLayout.getScrollHeight(),h=6*this._settings.pixelRatio|0,i=h/2|0,j=this._domNode.domNode.getContext("2d");a?(a.isOpaque()||j.clearRect(0,0,c,d),j.fillStyle=cx.Q1.Format.CSS.formatHexA(a),j.fillRect(0,0,c,d)):j.clearRect(0,0,c,d);let k=this._settings.x,l=this._settings.w;for(let a of b){let b=a.color,c=a.data;j.fillStyle=b;let m=0,n=0,o=0;for(let a=0,b=c.length/3;a<b;a++){let b=c[3*a],p=c[3*a+1],q=c[3*a+2],r=f.getVerticalOffsetForLineNumber(p)*g|0,s=(f.getVerticalOffsetForLineNumber(q)+e)*g|0;if(s-r<h){let a=(r+s)/2|0;a<i?a=i:a+i>d&&(a=d-i),r=a-i,s=a+i}r>o+1||b!==m?(0!==a&&j.fillRect(k[m],n,l[m],o-n),m=b,n=r,o=s):s>o&&(o=s)}j.fillRect(k[m],n,l[m],o-n)}if(!this._settings.hideCursor){let a=2*this._settings.pixelRatio|0,b=a/2|0,c=this._settings.x[7],e=this._settings.w[7],h=-100,i=-100,k=null;for(let l=0,m=this._cursorPositions.length;l<m;l++){let m=this._cursorPositions[l].color;if(!m)continue;let n=this._cursorPositions[l].position,o=f.getVerticalOffsetForLineNumber(n.lineNumber)*g|0;o<b?o=b:o+b>d&&(o=d-b);let p=o-b,q=p+a;p>i+1||m!==k?(0!==l&&k&&j.fillRect(c,h,e,i-h),h=p,i=q):q>i&&(i=q),k=m,j.fillStyle=m}k&&j.fillRect(c,h,e,i-h)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(j.beginPath(),j.lineWidth=1,j.strokeStyle=this._settings.borderColor,j.moveTo(0,0),j.lineTo(0,d),j.moveTo(1,0),j.lineTo(c,0),j.stroke())}}var cB=c(7266);class cC extends az{constructor(a,b){super(),this._context=a;const c=this._context.configuration.options;this._domNode=(0,ae.Z)(document.createElement("canvas")),this._domNode.setClassName(b),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new cB.rW(a=>this._context.viewLayout.getVerticalOffsetForLineNumber(a)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(c.get(75)),this._zoneManager.setPixelRatio(c.get(163)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(a){let b=this._context.configuration.options;return a.hasChanged(75)&&(this._zoneManager.setLineHeight(b.get(75)),this._render()),a.hasChanged(163)&&(this._zoneManager.setPixelRatio(b.get(163)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(a){return this._render(),!0}onScrollChanged(a){return a.scrollHeightChanged&&(this._zoneManager.setOuterHeight(a.scrollHeight),this._render()),!0}onZonesChanged(a){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(a){this._domNode.setTop(a.top),this._domNode.setRight(a.right);let b=!1;b=this._zoneManager.setDOMWidth(a.width)||b,(b=this._zoneManager.setDOMHeight(a.height)||b)&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(a){this._zoneManager.setZones(a),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;let a=this._zoneManager.getCanvasWidth(),b=this._zoneManager.getCanvasHeight(),c=this._zoneManager.resolveColorZones(),d=this._zoneManager.getId2Color(),e=this._domNode.domNode.getContext("2d");return e.clearRect(0,0,a,b),c.length>0&&this._renderOneLane(e,c,d,a),!0}_renderOneLane(a,b,c,d){let e=0,f=0,g=0;for(let h of b){let b=h.colorId,i=h.from,j=h.to;b!==e?(0!==e&&a.fillRect(0,f,d,g-f),a.fillStyle=c[e=b],f=i,g=j):g>=i?g=Math.max(g,j):(a.fillRect(0,f,d,g-f),f=i,g=j)}a.fillRect(0,f,d,g-f)}}c(55184);class cD extends aA{constructor(a){super(a),this.domNode=(0,ae.Z)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const b=this._context.configuration.options;this._rulers=b.get(116),this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth}onConfigurationChanged(a){let b=this._context.configuration.options;return this._rulers=b.get(116),this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth,!0}onScrollChanged(a){return a.scrollHeightChanged}prepareRender(a){}_ensureRulersCount(){let a=this._renderedRulers.length,b=this._rulers.length;if(a===b)return;if(a<b){let c=b-a;for(;c>0;){let a=(0,ae.Z)(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth("1ch"),this.domNode.appendChild(a),this._renderedRulers.push(a),c--}return}let c=a-b;for(;c>0;){let a=this._renderedRulers.pop();this.domNode.removeChild(a),c--}}render(a){this._ensureRulersCount();for(let b=0,c=this._rulers.length;b<c;b++){let c=this._renderedRulers[b],d=this._rulers[b];c.setBoxShadow(d.color?`1px 0 0 0 ${d.color} inset`:""),c.setHeight(Math.min(a.scrollHeight,1e6)),c.setLeft(d.column*this._typicalHalfwidthCharacterWidth)}}}c(54424);class cE extends aA{constructor(a){super(a),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const b=this._context.configuration.options.get(117);this._useShadows=b.useShadows,this._domNode=(0,ae.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}_updateShouldShow(){let a=this._useShadows&&this._scrollTop>0;return this._shouldShow!==a&&(this._shouldShow=a,!0)}getDomNode(){return this._domNode}_updateWidth(){let a=this._context.configuration.options.get(165);0===a.minimap.renderMinimap||a.minimap.minimapWidth>0&&0===a.minimap.minimapLeft?this._width=a.width:this._width=a.width-a.verticalScrollbarWidth}onConfigurationChanged(a){let b=this._context.configuration.options.get(117);return this._useShadows=b.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(a){return this._scrollTop=a.scrollTop,this._updateShouldShow()}prepareRender(a){}render(a){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}c(81792);class cF{constructor(a){this.left=a.left,this.width=a.width,this.startStyle=null,this.endStyle=null}}class cG{constructor(a,b){this.lineNumber=a,this.ranges=b}}function cH(a){return new cF(a)}function cI(a){return new cG(a.lineNumber,a.ranges.map(cH))}class cJ extends bE{static{this.SELECTION_CLASS_NAME="selected-text"}static{this.SELECTION_TOP_LEFT="top-left-radius"}static{this.SELECTION_BOTTOM_LEFT="bottom-left-radius"}static{this.SELECTION_TOP_RIGHT="top-right-radius"}static{this.SELECTION_BOTTOM_RIGHT="bottom-right-radius"}static{this.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background"}static{this.ROUNDED_PIECE_WIDTH=10}constructor(a){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=a;const b=this._context.configuration.options;this._roundedSelection=b.get(115),this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){let b=this._context.configuration.options;return this._roundedSelection=b.get(115),this._typicalHalfwidthCharacterWidth=b.get(59).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(a){return this._selections=a.selections.slice(0),!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}_visibleRangesHaveGaps(a){for(let b=0,c=a.length;b<c;b++)if(a[b].ranges.length>1)return!0;return!1}_enrichVisibleRangesWithStyle(a,b,c){let d=this._typicalHalfwidthCharacterWidth/4,e=null,f=null;if(c&&c.length>0&&b.length>0){let d=b[0].lineNumber;if(d===a.startLineNumber)for(let a=0;!e&&a<c.length;a++)c[a].lineNumber===d&&(e=c[a].ranges[0]);let g=b[b.length-1].lineNumber;if(g===a.endLineNumber)for(let a=c.length-1;!f&&a>=0;a--)c[a].lineNumber===g&&(f=c[a].ranges[0]);e&&!e.startStyle&&(e=null),f&&!f.startStyle&&(f=null)}for(let a=0,c=b.length;a<c;a++){let g=b[a].ranges[0],h=g.left,i=g.left+g.width,j={top:0,bottom:0},k={top:0,bottom:0};if(a>0){let c=b[a-1].ranges[0].left,e=b[a-1].ranges[0].left+b[a-1].ranges[0].width;cK(h-c)<d?j.top=2:h>c&&(j.top=1),cK(i-e)<d?k.top=2:c<i&&i<e&&(k.top=1)}else e&&(j.top=e.startStyle.top,k.top=e.endStyle.top);if(a+1<c){let c=b[a+1].ranges[0].left,e=b[a+1].ranges[0].left+b[a+1].ranges[0].width;cK(h-c)<d?j.bottom=2:c<h&&h<e&&(j.bottom=1),cK(i-e)<d?k.bottom=2:i<e&&(k.bottom=1)}else f&&(j.bottom=f.startStyle.bottom,k.bottom=f.endStyle.bottom);g.startStyle=j,g.endStyle=k}}_getVisibleRangesWithStyle(a,b,c){let d=(b.linesVisibleRangesForRange(a,!0)||[]).map(cI);return!this._visibleRangesHaveGaps(d)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(b.visibleRange,d,c),d}_createSelectionPiece(a,b,c,d,e){return'<div class="cslr '+c+'" style="top:'+a.toString()+"px;bottom:"+b.toString()+"px;left:"+d.toString()+"px;width:"+e.toString()+'px;"></div>'}_actualRenderOneSelection(a,b,c,d){if(0===d.length)return;let e=!!d[0].ranges[0].startStyle,f=d[0].lineNumber,g=d[d.length-1].lineNumber;for(let h=0,i=d.length;h<i;h++){let i=d[h],j=i.lineNumber,k=j-b,l=c?+(j===f):0,m=c?+(j!==f&&j===g):0,n="",o="";for(let a=0,b=i.ranges.length;a<b;a++){let b=i.ranges[a];if(e){let a=b.startStyle,c=b.endStyle;if(1===a.top||1===a.bottom){n+=this._createSelectionPiece(l,m,cJ.SELECTION_CLASS_NAME,b.left-cJ.ROUNDED_PIECE_WIDTH,cJ.ROUNDED_PIECE_WIDTH);let c=cJ.EDITOR_BACKGROUND_CLASS_NAME;1===a.top&&(c+=" "+cJ.SELECTION_TOP_RIGHT),1===a.bottom&&(c+=" "+cJ.SELECTION_BOTTOM_RIGHT),n+=this._createSelectionPiece(l,m,c,b.left-cJ.ROUNDED_PIECE_WIDTH,cJ.ROUNDED_PIECE_WIDTH)}if(1===c.top||1===c.bottom){n+=this._createSelectionPiece(l,m,cJ.SELECTION_CLASS_NAME,b.left+b.width,cJ.ROUNDED_PIECE_WIDTH);let a=cJ.EDITOR_BACKGROUND_CLASS_NAME;1===c.top&&(a+=" "+cJ.SELECTION_TOP_LEFT),1===c.bottom&&(a+=" "+cJ.SELECTION_BOTTOM_LEFT),n+=this._createSelectionPiece(l,m,a,b.left+b.width,cJ.ROUNDED_PIECE_WIDTH)}}let c=cJ.SELECTION_CLASS_NAME;if(e){let a=b.startStyle,d=b.endStyle;0===a.top&&(c+=" "+cJ.SELECTION_TOP_LEFT),0===a.bottom&&(c+=" "+cJ.SELECTION_BOTTOM_LEFT),0===d.top&&(c+=" "+cJ.SELECTION_TOP_RIGHT),0===d.bottom&&(c+=" "+cJ.SELECTION_BOTTOM_RIGHT)}o+=this._createSelectionPiece(l,m,c,b.left,b.width)}a[k][0]+=n,a[k][1]+=o}}prepareRender(a){let b=[],c=a.visibleRange.startLineNumber,d=a.visibleRange.endLineNumber;for(let a=c;a<=d;a++)b[a-c]=["",""];let e=[];for(let d=0,f=this._selections.length;d<f;d++){let f=this._selections[d];if(f.isEmpty()){e[d]=null;continue}let g=this._getVisibleRangesWithStyle(f,a,this._previousFrameVisibleRangesWithStyle[d]);e[d]=g,this._actualRenderOneSelection(b,c,this._selections.length>1,g)}this._previousFrameVisibleRangesWithStyle=e,this._renderResult=b.map(([a,b])=>a+b)}render(a,b){if(!this._renderResult)return"";let c=b-a;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}function cK(a){return a<0?-a:a}(0,bG.zy)((a,b)=>{let c=a.getColor(al.rm);c&&!c.isTransparent()&&b.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${c}; }`)}),c(50924);class cL{constructor(a,b,c,d,e,f,g){this.top=a,this.left=b,this.paddingLeft=c,this.width=d,this.height=e,this.textContent=f,this.textContentClassName=g}}(f=p||(p={}))[f.Single=0]="Single",f[f.MultiPrimary=1]="MultiPrimary",f[f.MultiSecondary=2]="MultiSecondary";class cM{constructor(a,b){this._context=a;const c=this._context.configuration.options,d=c.get(59);this._cursorStyle=c.get(161),this._typicalHalfwidthCharacterWidth=d.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(c.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=c.get(38),this._isVisible=!0,this._domNode=(0,ae.Z)(document.createElement("div")),this._domNode.setClassName(`cursor ${b_}`),this._domNode.setHeight(this._context.viewLayout.getLineHeightForLineNumber(1)),this._domNode.setTop(0),this._domNode.setLeft(0),(0,I.M)(this._domNode,d),this._domNode.setDisplay("none"),this._position=new aD.y(1,1),this._pluralityClass="",this.setPlurality(b),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}setPlurality(a){switch(a){default:case p.Single:this._pluralityClass="";break;case p.MultiPrimary:this._pluralityClass="cursor-primary";break;case p.MultiSecondary:this._pluralityClass="cursor-secondary"}}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(59);return this._cursorStyle=b.get(161),this._typicalHalfwidthCharacterWidth=c.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(b.get(37),this._typicalHalfwidthCharacterWidth),this._lineCursorHeight=b.get(38),(0,I.M)(this._domNode,c),!0}onCursorPositionChanged(a,b){return b?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=a,!0}_getGraphemeAwarePosition(){let{lineNumber:a,column:b}=this._position,c=this._context.viewModel.getLineContent(a),[d,e]=(0,a9.m)(c,b-1);return[new aD.y(a,d+1),c.substring(d,e)]}_prepareRender(a){let b="",c="",[d,e]=this._getGraphemeAwarePosition(),f=this._context.viewLayout.getLineHeightForLineNumber(d.lineNumber),g=0===this._lineCursorHeight?f:Math.min(f,this._lineCursorHeight),h=(f-g)/2;if(this._cursorStyle===U.m9.Line||this._cursorStyle===U.m9.LineThin){let f,i=a.visibleRangeForPosition(d);if(!i||i.outsideRenderedLine)return null;let j=(0,D.zk)(this._domNode.domNode);this._cursorStyle===U.m9.Line?(f=(0,D.vT)(j,this._lineCursorWidth>0?this._lineCursorWidth:2))>2&&(b=e,c=this._getTokenClassName(d)):f=(0,D.vT)(j,1);let k=i.left,l=0;return f>=2&&k>=1&&(k-=l=1),new cL(a.getVerticalOffsetForLineNumber(d.lineNumber)-a.bigNumbersDelta+h,k,l,f,g,b,c)}let i=a.linesVisibleRangesForRange(new aE.Q(d.lineNumber,d.column,d.lineNumber,d.column+e.length),!1);if(!i||0===i.length)return null;let j=i[0];if(j.outsideRenderedLine||0===j.ranges.length)return null;let k=j.ranges[0],l=" "===e||k.width<1?this._typicalHalfwidthCharacterWidth:k.width;this._cursorStyle===U.m9.Block&&(b=e,c=this._getTokenClassName(d));let m=a.getVerticalOffsetForLineNumber(d.lineNumber)-a.bigNumbersDelta,n=f;return(this._cursorStyle===U.m9.Underline||this._cursorStyle===U.m9.UnderlineThin)&&(m+=f-2,n=2),new cL(m,k.left,0,l,n,b,c)}_getTokenClassName(a){let b=this._context.viewModel.getViewLineData(a.lineNumber),c=b.tokens.findTokenIndexAtOffset(a.column-1);return b.tokens.getClassName(c)}prepareRender(a){this._renderData=this._prepareRender(a)}render(a){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${this._pluralityClass} ${b_} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class cN extends aA{static{this.BLINK_INTERVAL=500}constructor(a){super(a);const b=this._context.configuration.options;this._readOnly=b.get(104),this._cursorBlinking=b.get(32),this._cursorStyle=b.get(161),this._cursorSmoothCaretAnimation=b.get(33),this._editContextEnabled=b.get(170),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new cM(this._context,p.Single),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,ae.Z)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new aj.pc,this._cursorFlatBlinkInterval=new D.Be,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(a){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(a){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(a){let b=this._context.configuration.options;this._readOnly=b.get(104),this._cursorBlinking=b.get(32),this._cursorStyle=b.get(161),this._cursorSmoothCaretAnimation=b.get(33),this._editContextEnabled=b.get(170),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(a);for(let b=0,c=this._secondaryCursors.length;b<c;b++)this._secondaryCursors[b].onConfigurationChanged(a);return!0}_onCursorPositionChanged(a,b,c){let d=this._secondaryCursors.length!==b.length||"explicit"===this._cursorSmoothCaretAnimation&&3!==c;if(this._primaryCursor.setPlurality(b.length?p.MultiPrimary:p.Single),this._primaryCursor.onCursorPositionChanged(a,d),this._updateBlinking(),this._secondaryCursors.length<b.length){let a=b.length-this._secondaryCursors.length;for(let b=0;b<a;b++){let a=new cM(this._context,p.MultiSecondary);this._domNode.domNode.insertBefore(a.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(a)}}else if(this._secondaryCursors.length>b.length){let a=this._secondaryCursors.length-b.length;for(let b=0;b<a;b++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let a=0;a<b.length;a++)this._secondaryCursors[a].onCursorPositionChanged(b[a],d)}onCursorStateChanged(a){let b=[];for(let c=0,d=a.selections.length;c<d;c++)b[c]=a.selections[c].getPosition();this._onCursorPositionChanged(b[0],b.slice(1),a.reason);let c=a.selections[0].isEmpty();return this._selectionIsEmpty!==c&&(this._selectionIsEmpty=c,this._updateDomClassName()),!0}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onFocusChanged(a){return this._editorHasFocus=a.isFocused,this._updateBlinking(),!1}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return!0}onTokensChanged(a){let b=b=>{for(let c=0,d=a.ranges.length;c<d;c++)if(a.ranges[c].fromLineNumber<=b.lineNumber&&b.lineNumber<=a.ranges[c].toLineNumber)return!0;return!1};if(b(this._primaryCursor.getPosition()))return!0;for(let a of this._secondaryCursors)if(b(a.getPosition()))return!0;return!1}onZonesChanged(a){return!0}_getCursorBlinking(){return(!this._isComposingInput||this._editContextEnabled)&&this._editorHasFocus?this._readOnly?5:this._cursorBlinking:0}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();let a=this._getCursorBlinking(),b=0===a;b?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),b||5===a||(1===a?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},cN.BLINK_INTERVAL,(0,D.zk)(this._domNode.domNode)):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},cN.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let a="cursors-layer";switch(!this._selectionIsEmpty&&(a+=" has-selection"),this._cursorStyle){case U.m9.Line:a+=" cursor-line-style";break;case U.m9.Block:a+=" cursor-block-style";break;case U.m9.Underline:a+=" cursor-underline-style";break;case U.m9.LineThin:a+=" cursor-line-thin-style";break;case U.m9.BlockOutline:a+=" cursor-block-outline-style";break;case U.m9.UnderlineThin:a+=" cursor-underline-thin-style";break;default:a+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:a+=" cursor-blink";break;case 2:a+=" cursor-smooth";break;case 3:a+=" cursor-phase";break;case 4:a+=" cursor-expand";break;default:a+=" cursor-solid"}else a+=" cursor-solid";return("on"===this._cursorSmoothCaretAnimation||"explicit"===this._cursorSmoothCaretAnimation)&&(a+=" cursor-smooth-caret-animation"),a}_show(){this._primaryCursor.show();for(let a=0,b=this._secondaryCursors.length;a<b;a++)this._secondaryCursors[a].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let a=0,b=this._secondaryCursors.length;a<b;a++)this._secondaryCursors[a].hide();this._isVisible=!1}prepareRender(a){this._primaryCursor.prepareRender(a);for(let b=0,c=this._secondaryCursors.length;b<c;b++)this._secondaryCursors[b].prepareRender(a)}render(a){let b=[],c=0,d=this._primaryCursor.render(a);d&&(b[c++]=d);for(let d=0,e=this._secondaryCursors.length;d<e;d++){let e=this._secondaryCursors[d].render(a);e&&(b[c++]=e)}this._renderData=b}getLastRenderData(){return this._renderData}}(0,bG.zy)((a,b)=>{for(let c of[{class:".cursor",foreground:bF.D0,background:bF.kM},{class:".cursor-primary",foreground:bF.sC,background:bF.je},{class:".cursor-secondary",foreground:bF.we,background:bF.L0}]){let d=a.getColor(c.foreground);if(d){let e=a.getColor(c.background);e||(e=d.opposite()),b.addRule(`.monaco-editor .cursors-layer ${c.class} { background-color: ${d}; border-color: ${d}; color: ${e}; }`),(0,bH.Bb)(a.type)&&b.addRule(`.monaco-editor .cursors-layer.has-selection ${c.class} { border-left: 1px solid ${e}; border-right: 1px solid ${e}; }`)}}});let cO=()=>{throw Error("Invalid change accessor")};class cP extends aA{constructor(a){super(a);const b=this._context.configuration.options,c=b.get(165);this._lineHeight=b.get(75),this._contentWidth=c.contentWidth,this._contentLeft=c.contentLeft,this.domNode=(0,ae.Z)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,ae.Z)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){let a=this._context.viewLayout.getWhitespaces(),b=new Map;for(let c of a)b.set(c.id,c);let c=!1;return this._context.viewModel.changeWhitespace(a=>{let d=Object.keys(this._zones);for(let e=0,f=d.length;e<f;e++){let f=d[e],g=this._zones[f],h=this._computeWhitespaceProps(g.delegate);g.isInHiddenArea=h.isInHiddenArea;let i=b.get(f);i&&(i.afterLineNumber!==h.afterViewLineNumber||i.height!==h.heightInPx)&&(a.changeOneWhitespace(f,h.afterViewLineNumber,h.heightInPx),this._safeCallOnComputedHeight(g.delegate,h.heightInPx),c=!0)}}),c}onConfigurationChanged(a){let b=this._context.configuration.options,c=b.get(165);return this._lineHeight=b.get(75),this._contentWidth=c.contentWidth,this._contentLeft=c.contentLeft,a.hasChanged(75)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(a){return this._recomputeWhitespacesProps()}onLinesDeleted(a){return!0}onScrollChanged(a){return a.scrollTopChanged||a.scrollWidthChanged}onZonesChanged(a){return!0}onLinesInserted(a){return!0}_getZoneOrdinal(a){return a.ordinal??a.afterColumn??1e4}_computeWhitespaceProps(a){let b,c;if(0===a.afterLineNumber)return{isInHiddenArea:!1,afterViewLineNumber:0,heightInPx:this._heightInPixels(a),minWidthInPx:this._minWidthInPixels(a)};if(void 0!==a.afterColumn)b=this._context.viewModel.model.validatePosition({lineNumber:a.afterLineNumber,column:a.afterColumn});else{let c=this._context.viewModel.model.validatePosition({lineNumber:a.afterLineNumber,column:1}).lineNumber;b=new aD.y(c,this._context.viewModel.model.getLineMaxColumn(c))}c=b.column===this._context.viewModel.model.getLineMaxColumn(b.lineNumber)?this._context.viewModel.model.validatePosition({lineNumber:b.lineNumber+1,column:1}):this._context.viewModel.model.validatePosition({lineNumber:b.lineNumber,column:b.column+1});let d=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(b,a.afterColumnAffinity,!0),e=a.showInHiddenAreas||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(c);return{isInHiddenArea:!e,afterViewLineNumber:d.lineNumber,heightInPx:e?this._heightInPixels(a):0,minWidthInPx:this._minWidthInPixels(a)}}changeViewZones(a){let b=!1;return this._context.viewModel.changeWhitespace(c=>{let d={addZone:a=>(b=!0,this._addZone(c,a)),removeZone:a=>{a&&(b=this._removeZone(c,a)||b)},layoutZone:a=>{a&&(b=this._layoutZone(c,a)||b)}};(function(a,b){try{a(b)}catch(a){(0,E.dz)(a);return}})(a,d),d.addZone=cO,d.removeZone=cO,d.layoutZone=cO}),b}_addZone(a,b){let c=this._computeWhitespaceProps(b),d={whitespaceId:a.insertWhitespace(c.afterViewLineNumber,this._getZoneOrdinal(b),c.heightInPx,c.minWidthInPx),delegate:b,isInHiddenArea:c.isInHiddenArea,isVisible:!1,domNode:(0,ae.Z)(b.domNode),marginDomNode:b.marginDomNode?(0,ae.Z)(b.marginDomNode):null};return this._safeCallOnComputedHeight(d.delegate,c.heightInPx),d.domNode.setPosition("absolute"),d.domNode.domNode.style.width="100%",d.domNode.setDisplay("none"),d.domNode.setAttribute("monaco-view-zone",d.whitespaceId),this.domNode.appendChild(d.domNode),d.marginDomNode&&(d.marginDomNode.setPosition("absolute"),d.marginDomNode.domNode.style.width="100%",d.marginDomNode.setDisplay("none"),d.marginDomNode.setAttribute("monaco-view-zone",d.whitespaceId),this.marginDomNode.appendChild(d.marginDomNode)),this._zones[d.whitespaceId]=d,this.setShouldRender(),d.whitespaceId}_removeZone(a,b){if(this._zones.hasOwnProperty(b)){let c=this._zones[b];return delete this._zones[b],a.removeWhitespace(c.whitespaceId),c.domNode.removeAttribute("monaco-visible-view-zone"),c.domNode.removeAttribute("monaco-view-zone"),c.domNode.domNode.remove(),c.marginDomNode&&(c.marginDomNode.removeAttribute("monaco-visible-view-zone"),c.marginDomNode.removeAttribute("monaco-view-zone"),c.marginDomNode.domNode.remove()),this.setShouldRender(),!0}return!1}_layoutZone(a,b){if(this._zones.hasOwnProperty(b)){let c=this._zones[b],d=this._computeWhitespaceProps(c.delegate);return c.isInHiddenArea=d.isInHiddenArea,a.changeOneWhitespace(c.whitespaceId,d.afterViewLineNumber,d.heightInPx),this._safeCallOnComputedHeight(c.delegate,d.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(a){return!!this._zones.hasOwnProperty(a)&&!!this._zones[a].delegate.suppressMouseDown}_heightInPixels(a){return"number"==typeof a.heightInPx?a.heightInPx:"number"==typeof a.heightInLines?this._lineHeight*a.heightInLines:this._lineHeight}_minWidthInPixels(a){return"number"==typeof a.minWidthInPx?a.minWidthInPx:0}_safeCallOnComputedHeight(a,b){if("function"==typeof a.onComputedHeight)try{a.onComputedHeight(b)}catch(a){(0,E.dz)(a)}}_safeCallOnDomNodeTop(a,b){if("function"==typeof a.onDomNodeTop)try{a.onDomNodeTop(b)}catch(a){(0,E.dz)(a)}}prepareRender(a){}render(a){let b=a.viewportData.whitespaceViewportData,c={},d=!1;for(let a of b)this._zones[a.id].isInHiddenArea||(c[a.id]=a,d=!0);let e=Object.keys(this._zones);for(let b=0,d=e.length;b<d;b++){let d=e[b],f=this._zones[d],g=0,h=0,i="none";c.hasOwnProperty(d)?(g=c[d].verticalOffset-a.bigNumbersDelta,h=c[d].height,i="block",f.isVisible||(f.domNode.setAttribute("monaco-visible-view-zone","true"),f.isVisible=!0),this._safeCallOnDomNodeTop(f.delegate,a.getScrolledTopFromAbsoluteTop(c[d].verticalOffset))):(f.isVisible&&(f.domNode.removeAttribute("monaco-visible-view-zone"),f.isVisible=!1),this._safeCallOnDomNodeTop(f.delegate,a.getScrolledTopFromAbsoluteTop(-1e6))),f.domNode.setTop(g),f.domNode.setHeight(h),f.domNode.setDisplay(i),f.marginDomNode&&(f.marginDomNode.setTop(g),f.marginDomNode.setHeight(h),f.marginDomNode.setDisplay(i))}d&&(this.domNode.setWidth(Math.max(a.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}c(92312);var cQ=c(39482);class cR extends bE{constructor(a){super(),this._context=a,this._options=new cS(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(a){let b=new cS(this._context.configuration);return this._options.equals(b)?a.hasChanged(165):(this._options=b,!0)}onCursorStateChanged(a){return this._selection=a.selections,"selection"===this._options.renderWhitespace}onDecorationsChanged(a){return!0}onFlushed(a){return!0}onLinesChanged(a){return!0}onLinesDeleted(a){return!0}onLinesInserted(a){return!0}onScrollChanged(a){return a.scrollTopChanged}onZonesChanged(a){return!0}prepareRender(a){if("none"===this._options.renderWhitespace){this._renderResult=null;return}this._renderResult=[];for(let b=a.viewportData.startLineNumber;b<=a.viewportData.endLineNumber;b++){let c=b-a.viewportData.startLineNumber,d=this._context.viewModel.getViewLineRenderingData(b),e=null;if("selection"===this._options.renderWhitespace)for(let a of this._selection){if(a.endLineNumber<b||a.startLineNumber>b)continue;let c=a.startLineNumber===b?a.startColumn:d.minColumn,f=a.endLineNumber===b?a.endColumn:d.maxColumn;c<f&&(e||(e=[]),e.push(new cQ.L(c-1,f-1)))}this._renderResult[c]=this._applyRenderWhitespace(a,b,e,d)}}_applyRenderWhitespace(a,b,c,d){let e;if("selection"===this._options.renderWhitespace&&!c||"trailing"===this._options.renderWhitespace&&d.continuesWithWrappedLine)return"";let f=this._context.theme.getColor(bF.w4),g=this._options.renderWithSVG,h=d.content,i=-1===this._options.stopRenderingLineAfter?h.length:Math.min(this._options.stopRenderingLineAfter,h.length),j=d.continuesWithWrappedLine,k=d.minColumn-1,l="boundary"===this._options.renderWhitespace,m="trailing"===this._options.renderWhitespace,n=a.getLineHeightForLineNumber(b),o=this._options.middotWidth,p=this._options.wsmiddotWidth,q=this._options.spaceWidth,r=Math.abs(p-q)<Math.abs(o-q)?11825:183,s=this._options.canUseHalfwidthRightwardsArrow,t="",u=!1,v=(0,a9.HG)(h);-1===v?(u=!0,v=i,e=i):e=(0,a9.lT)(h);let w=0,x=c&&c[w],y=0;for(let d=k;d<i;d++){let f=h.charCodeAt(d);if(x&&x.endExclusive<=d&&(w++,x=c&&c[w]),9!==f&&32!==f||m&&!u&&d<=e)continue;if(l&&d>=v&&d<=e&&32===f){let a=d-1>=0?h.charCodeAt(d-1):0,b=d+1<i?h.charCodeAt(d+1):0;if(32!==a&&32!==b)continue}if(l&&j&&d===i-1){let a=d-1>=0?h.charCodeAt(d-1):0;if(32===f&&32!==a&&9!==a)continue}if(c&&!(x&&x.start<=d&&d<x.endExclusive))continue;let k=a.visibleRangeForPosition(new aD.y(b,d+1));k&&(g?(y=Math.max(y,k.left),9===f?t+=this._renderArrow(n,q,k.left):t+=`<circle cx="${(k.left+q/2).toFixed(2)}" cy="${(n/2).toFixed(2)}" r="${(q/7).toFixed(2)}" />`):9===f?t+=`<div class="mwh" style="left:${k.left}px;height:${n}px;">${s?String.fromCharCode(65515):String.fromCharCode(8594)}</div>`:t+=`<div class="mwh" style="left:${k.left}px;height:${n}px;">${String.fromCharCode(r)}</div>`)}return g?(y=Math.round(y+q),`<svg style="bottom:0;position:absolute;width:${y}px;height:${n}px" viewBox="0 0 ${y} ${n}" xmlns="http://www.w3.org/2000/svg" fill="${f}">`+t+"</svg>"):t}_renderArrow(a,b,c){let d=a/2,e={x:0,y:b/7/2},f={x:.8*b,y:e.y},g={x:f.x-.2*f.x,y:f.y+.2*f.x},h={x:g.x+.1*f.x,y:g.y+.1*f.x},i={x:h.x+.35*f.x,y:h.y-.35*f.x},j={x:i.x,y:-i.y},k={x:h.x,y:-h.y},l={x:g.x,y:-g.y},m={x:f.x,y:-f.y},n={x:e.x,y:-e.y},o=[e,f,g,h,i,j,k,l,m,n].map(a=>`${(c+a.x).toFixed(2)} ${(d+a.y).toFixed(2)}`).join(" L ");return`<path d="M ${o}" />`}render(a,b){if(!this._renderResult)return"";let c=b-a;return c<0||c>=this._renderResult.length?"":this._renderResult[c]}}class cS{constructor(a){const b=a.options,c=b.get(59),d=b.get(47);"off"===d?(this.renderWhitespace="none",this.renderWithSVG=!1):"svg"===d?(this.renderWhitespace=b.get(113),this.renderWithSVG=!0):(this.renderWhitespace=b.get(113),this.renderWithSVG=!1),this.spaceWidth=c.spaceWidth,this.middotWidth=c.middotWidth,this.wsmiddotWidth=c.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=c.canUseHalfwidthRightwardsArrow,this.lineHeight=b.get(75),this.stopRenderingLineAfter=b.get(133)}equals(a){return this.renderWhitespace===a.renderWhitespace&&this.renderWithSVG===a.renderWithSVG&&this.spaceWidth===a.spaceWidth&&this.middotWidth===a.middotWidth&&this.wsmiddotWidth===a.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===a.canUseHalfwidthRightwardsArrow&&this.lineHeight===a.lineHeight&&this.stopRenderingLineAfter===a.stopRenderingLineAfter}}class cT{constructor(a,b,c,d){this.selections=a,this.startLineNumber=0|b.startLineNumber,this.endLineNumber=0|b.endLineNumber,this.relativeVerticalOffset=b.relativeVerticalOffset,this.bigNumbersDelta=0|b.bigNumbersDelta,this.lineHeight=0|b.lineHeight,this.whitespaceViewportData=c,this._model=d,this.visibleRange=new aE.Q(b.startLineNumber,this._model.getLineMinColumn(b.startLineNumber),b.endLineNumber,this._model.getLineMaxColumn(b.endLineNumber))}getViewLineRenderingData(a){return this._model.getViewportViewLineRenderingData(this.visibleRange,a)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class cU{get type(){return this._theme.type}get value(){return this._theme}constructor(a){this._theme=a}update(a){this._theme=a}getColor(a){return this._theme.getColor(a)}}class cV{constructor(a,b,c){this.configuration=a,this.theme=new cU(b),this.viewModel=c,this.viewLayout=c.viewLayout}addEventHandler(a){this.viewModel.addViewEventHandler(a)}removeEventHandler(a){this.viewModel.removeViewEventHandler(a)}}var cW=c(58254),cX=c(72816),cY=c(90605),cZ=c(70233);let c$=new Float32Array([1,0,1,1,0,1,0,0,0,1,1,0]);function c_(a){if(!a)throw Error(`Value "${a}" cannot be null`);return a}function c0(a,b,c){let d=new b.ResizeObserver(b=>{let e=b.find(b=>b.target===a);if(!e)return;if(!("devicePixelContentBoxSize"in e)){d?.disconnect(),d=void 0;return}let f=e.devicePixelContentBoxSize[0].inlineSize,g=e.devicePixelContentBoxSize[0].blockSize;f>0&&g>0&&c(f,g)});try{d.observe(a,{box:["device-pixel-content-box"]})}catch{throw d.disconnect(),d=void 0,new E.D7("Could not observe device pixel dimensions")}return(0,G.s)(()=>d?.disconnect())}let c1=0;class c2 extends G.jG{get cacheKey(){return`${this.fontFamily}_${this.fontSize}px`}constructor(a,b,c,d){super(),this.fontSize=a,this.fontFamily=b,this.devicePixelRatio=c,this._decorationStyleCache=d,this.id=c1++,this._workGlyph={source:null,boundingBox:{left:0,bottom:0,right:0,top:0},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0},this._workGlyphConfig={chars:void 0,tokenMetadata:0,decorationStyleSetId:0},this._antiAliasing=M.zx?"greyscale":"subpixel";const e=Math.ceil(this.fontSize*c);this._canvas=new OffscreenCanvas(3*e,3*e),this._ctx=c_(this._canvas.getContext("2d",{willReadFrequently:!0,alpha:"greyscale"===this._antiAliasing})),this._ctx.textBaseline="top",this._ctx.fillStyle="#FFFFFF",this._ctx.font=`${e}px ${this.fontFamily}`,this._textMetrics=this._ctx.measureText("A")}rasterizeGlyph(a,b,c,d){return""===a?{source:this._canvas,boundingBox:{top:0,left:0,bottom:-1,right:-1},originOffset:{x:0,y:0},fontBoundingBoxAscent:0,fontBoundingBoxDescent:0}:this._workGlyphConfig.chars===a&&this._workGlyphConfig.tokenMetadata===b&&this._workGlyphConfig.decorationStyleSetId===c?this._workGlyph:(this._workGlyphConfig.chars=a,this._workGlyphConfig.tokenMetadata=b,this._workGlyphConfig.decorationStyleSetId=c,this._rasterizeGlyph(a,b,c,d))}_rasterizeGlyph(a,b,c,d){let e=Math.ceil(this.fontSize*this.devicePixelRatio),f=3*e;this._canvas.width!==f&&(this._canvas.width=f,this._canvas.height=f),this._ctx.save();let g=(15&b)/10,h=d[cZ.x.getBackground(b)]??d[2],i=this._decorationStyleCache.getStyleSet(c);"subpixel"===this._antiAliasing?(this._ctx.fillStyle=h,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height)):this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height);let j=new bo.fe(200),k=cZ.x.getFontStyle(b);if(1&k&&j.appendString("italic "),i?.bold!==void 0?i.bold&&j.appendString("bold "):2&k&&j.appendString("bold "),j.appendString(`${e}px ${this.fontFamily}`),this._ctx.font=j.build(),i?.color!==void 0?this._ctx.fillStyle=`#${i.color.toString(16).padStart(8,"0")}`:this._ctx.fillStyle=d[cZ.x.getForeground(b)],i?.opacity!==void 0&&(this._ctx.globalAlpha=i.opacity),this._ctx.textBaseline="top",this._ctx.fillText(a,e+g,e),i?.strikethrough){let a=Math.round(e-.65*this._textMetrics.alphabeticBaseline),b=i?.strikethroughThickness!==void 0?Math.round(i.strikethroughThickness*this.devicePixelRatio):Math.max(1,Math.floor(e/10));i?.strikethroughColor!==void 0&&(this._ctx.fillStyle=`#${i.strikethroughColor.toString(16).padStart(8,"0")}`),this._ctx.fillRect(e,a-Math.floor(b/2),Math.ceil(this._textMetrics.width),b)}this._ctx.restore();let l=this._ctx.getImageData(0,0,this._canvas.width,this._canvas.height);if("subpixel"===this._antiAliasing){let a=parseInt(h.substring(1,3),16),b=parseInt(h.substring(3,5),16),c=parseInt(h.substring(5,7),16);this._clearColor(l,a,b,c),this._ctx.putImageData(l,0,0)}return this._findGlyphBoundingBox(l,this._workGlyph.boundingBox),this._workGlyph.source=this._canvas,this._workGlyph.originOffset.x=this._workGlyph.boundingBox.left-e,this._workGlyph.originOffset.y=this._workGlyph.boundingBox.top-e,this._workGlyph.fontBoundingBoxAscent=this._textMetrics.fontBoundingBoxAscent,this._workGlyph.fontBoundingBoxDescent=this._textMetrics.fontBoundingBoxDescent,this._workGlyph}_clearColor(a,b,c,d){for(let e=0;e<a.data.length;e+=4)a.data[e]===b&&a.data[e+1]===c&&a.data[e+2]===d&&(a.data[e+3]=0)}_findGlyphBoundingBox(a,b){let c=this._canvas.height,d=this._canvas.width,e=!1;for(let f=0;f<c;f++){for(let c=0;c<d;c++){let g=f*d*4+4*c+3;if(0!==a.data[g]){b.top=f,e=!0;break}}if(e)break}b.left=0,e=!1;for(let f=0;f<d;f++){for(let g=0;g<c;g++){let c=g*d*4+4*f+3;if(0!==a.data[c]){b.left=f,e=!0;break}}if(e)break}b.right=d,e=!1;for(let f=d-1;f>=b.left;f--){for(let g=0;g<c;g++){let c=g*d*4+4*f+3;if(0!==a.data[c]){b.right=f,e=!0;break}}if(e)break}b.bottom=b.top,e=!1;for(let f=c-1;f>=0;f--){for(let c=0;c<d;c++){let g=f*d*4+4*c+3;if(0!==a.data[g]){b.bottom=f,e=!0;break}}if(e)break}}getTextMetrics(a){return this._ctx.measureText(a)}}!function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);f>3&&g&&Object.defineProperty(b,c,g)}([cY.B],c2.prototype,"cacheKey",null);let c3=class extends G.jG{constructor(a){super(),this._logService=a,this._tasks=[],this._i=0,this._register((0,G.s)(()=>this.clear()))}enqueue(a){this._tasks.push(a),this._start()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(a){this._idleCallback=void 0;let b=0,c=0,d=a.timeRemaining(),e=0;for(;this._i<this._tasks.length;){if(b=Date.now(),!this._tasks[this._i]()&&this._i++,1.5*(c=Math.max(b=Math.max(1,Date.now()-b),c))>(e=a.timeRemaining())){d-b<-20&&this._logService.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(d-b))}ms`),this._start();return}d=e}this.clear()}};c3=function(a,b,c,d){var e,f=arguments.length,g=f<3?b:null===d?d=Object.getOwnPropertyDescriptor(b,c):d;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)g=Reflect.decorate(a,b,c,d);else for(var h=a.length-1;h>=0;h--)(e=a[h])&&(g=(f<3?e(g):f>3?e(b,c,g):e(b,c))||g);return f>3&&g&&Object.defineProperty(b,c,g),g}([(g=ba.rr,function(a,b){g(a,b,0)})],c3);class c4 extends c3{_requestCallback(a){return(0,D.fz)().setTimeout(()=>a(this._createDeadline(16)))}_cancelCallback(a){(0,D.fz)().clearTimeout(a)}_createDeadline(a){let b=Date.now()+a;return{timeRemaining:()=>Math.max(0,b-Date.now())}}}class c5 extends c3{_requestCallback(a){return(0,D.fz)().requestIdleCallback(a)}_cancelCallback(a){(0,D.fz)().cancelIdleCallback(a)}}let c6="requestIdleCallback"in(0,D.fz)()?c5:c4;class c7{constructor(a,b){this._canvas=a,this._textureIndex=b,this._currentRow={x:0,y:0,h:0},this._allocatedGlyphs=new Set,this._nextIndex=0,this._ctx=c_(this._canvas.getContext("2d",{willReadFrequently:!0}))}allocate(a){let b=a.boundingBox.right-a.boundingBox.left+1,c=a.boundingBox.bottom-a.boundingBox.top+1;if(b>this._canvas.width||c>this._canvas.height)throw new E.D7("Glyph is too large for the atlas page");if(a.boundingBox.right-a.boundingBox.left+1>this._canvas.width-this._currentRow.x&&(this._currentRow.x=0,this._currentRow.y+=this._currentRow.h,this._currentRow.h=1),this._currentRow.y+a.boundingBox.bottom-a.boundingBox.top+1>this._canvas.height)return;this._ctx.drawImage(a.source,a.boundingBox.left,a.boundingBox.top,b,c,this._currentRow.x,this._currentRow.y,b,c);let d={pageIndex:this._textureIndex,glyphIndex:this._nextIndex++,x:this._currentRow.x,y:this._currentRow.y,w:b,h:c,originOffsetX:a.originOffset.x,originOffsetY:a.originOffset.y,fontBoundingBoxAscent:a.fontBoundingBoxAscent,fontBoundingBoxDescent:a.fontBoundingBoxDescent};return this._currentRow.x+=b,this._currentRow.h=Math.max(this._currentRow.h,c),this._allocatedGlyphs.add(d),d}getUsagePreview(){let a=this._canvas.width,b=this._canvas.height,c=new OffscreenCanvas(a,b),d=c_(c.getContext("2d"));d.fillStyle="#808080",d.fillRect(0,0,a,b);let e=new Map,f=new Map;for(let a of this._allocatedGlyphs)e.set(a.y,Math.max(e.get(a.y)??0,a.h)),f.set(a.y,Math.max(f.get(a.y)??0,a.x+a.w));for(let a of this._allocatedGlyphs)d.fillStyle="#4040FF",d.fillRect(a.x,a.y,a.w,a.h),d.fillStyle="#FF0000",d.fillRect(a.x,a.y+a.h,a.w,e.get(a.y)-a.h);for(let[b,c]of f.entries())b!==this._currentRow.y&&(d.fillStyle="#FF0000",d.fillRect(c,b,a-c,e.get(b)));return c.convertToBlob()}getStats(){let a=this._canvas.width,b=this._canvas.height,c=0,d=0,e=a*b,f=new Map,g=new Map;for(let a of this._allocatedGlyphs)f.set(a.y,Math.max(f.get(a.y)??0,a.h)),g.set(a.y,Math.max(g.get(a.y)??0,a.x+a.w));for(let a of this._allocatedGlyphs)c+=a.w*a.h,d+=a.w*(f.get(a.y)-a.h);for(let[b,c]of g.entries())b!==this._currentRow.y&&(d+=(a-c)*f.get(b));return`page${this._textureIndex}:
526
526
  Total: ${e} (${a}x${b})
527
527
  Used: ${c} (${(c/e*100).toPrecision(2)}%)
528
528
  Wasted: ${d} (${(d/e*100).toPrecision(2)}%)