@codingame/monaco-vscode-api 1.79.7-next.2 → 1.79.7

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 (459) hide show
  1. package/README.md +2 -2
  2. package/dist/api.js +15 -17
  3. package/dist/composite.d.ts +1 -1
  4. package/dist/configurationRegistry.d.ts +1 -1
  5. package/dist/contextkey.d.ts +2 -2
  6. package/dist/createApi.js +8 -8
  7. package/dist/default-extensions/bat.js +1 -1
  8. package/dist/default-extensions/clojure.js +1 -1
  9. package/dist/default-extensions/coffeescript.js +1 -1
  10. package/dist/default-extensions/cpp.js +1 -1
  11. package/dist/default-extensions/csharp.js +1 -1
  12. package/dist/default-extensions/css.js +1 -1
  13. package/dist/default-extensions/dart.js +1 -1
  14. package/dist/default-extensions/diff.js +1 -1
  15. package/dist/default-extensions/docker.js +1 -1
  16. package/dist/default-extensions/fsharp.js +1 -1
  17. package/dist/default-extensions/go.js +1 -1
  18. package/dist/default-extensions/groovy.js +1 -1
  19. package/dist/default-extensions/handlebars.js +1 -1
  20. package/dist/default-extensions/hlsl.js +1 -1
  21. package/dist/default-extensions/html.js +1 -1
  22. package/dist/default-extensions/ini.js +1 -1
  23. package/dist/default-extensions/java.js +1 -1
  24. package/dist/default-extensions/javascript.js +1 -1
  25. package/dist/default-extensions/json.js +1 -1
  26. package/dist/default-extensions/julia.js +1 -1
  27. package/dist/default-extensions/latex.js +1 -1
  28. package/dist/default-extensions/less.js +1 -1
  29. package/dist/default-extensions/log.js +1 -1
  30. package/dist/default-extensions/lua.js +1 -1
  31. package/dist/default-extensions/make.js +1 -1
  32. package/dist/default-extensions/markdown-basics.js +1 -1
  33. package/dist/default-extensions/npm.js +1 -1
  34. package/dist/default-extensions/objective-c.js +1 -1
  35. package/dist/default-extensions/perl.js +1 -1
  36. package/dist/default-extensions/php.js +1 -1
  37. package/dist/default-extensions/powershell.js +1 -1
  38. package/dist/default-extensions/pug.js +1 -1
  39. package/dist/default-extensions/python.js +1 -1
  40. package/dist/default-extensions/r.js +1 -1
  41. package/dist/default-extensions/razor.js +1 -1
  42. package/dist/default-extensions/references-view.js +1 -1
  43. package/dist/default-extensions/ruby.js +1 -1
  44. package/dist/default-extensions/rust.js +1 -1
  45. package/dist/default-extensions/scss.js +1 -1
  46. package/dist/default-extensions/search-result.js +1 -1
  47. package/dist/default-extensions/shaderlab.js +1 -1
  48. package/dist/default-extensions/shellscript.js +1 -1
  49. package/dist/default-extensions/sql.js +1 -1
  50. package/dist/default-extensions/swift.js +1 -1
  51. package/dist/default-extensions/theme-abyss.js +1 -1
  52. package/dist/default-extensions/theme-defaults.js +1 -1
  53. package/dist/default-extensions/theme-kimbie-dark.js +1 -1
  54. package/dist/default-extensions/theme-monokai-dimmed.js +1 -1
  55. package/dist/default-extensions/theme-monokai.js +1 -1
  56. package/dist/default-extensions/theme-quietlight.js +1 -1
  57. package/dist/default-extensions/theme-red.js +1 -1
  58. package/dist/default-extensions/theme-seti.js +1 -1
  59. package/dist/default-extensions/theme-solarized-dark.js +1 -1
  60. package/dist/default-extensions/theme-solarized-light.js +1 -1
  61. package/dist/default-extensions/theme-tomorrow-night-blue.js +1 -1
  62. package/dist/default-extensions/typescript-basics.js +1 -1
  63. package/dist/default-extensions/vb.js +1 -1
  64. package/dist/default-extensions/xml.js +1 -1
  65. package/dist/default-extensions/yaml.js +1 -1
  66. package/dist/editor.d.ts +2 -2
  67. package/dist/editorBrowser.d.ts +2 -2
  68. package/dist/event.d.ts +1 -1
  69. package/dist/{extension-tools.js → extension-tools-98a21c83.js} +129 -1869
  70. package/dist/extensions.d.ts +4 -4
  71. package/dist/extensions.d2.ts +1 -1
  72. package/dist/extensions.js +11 -6
  73. package/dist/extensionsRegistry.d.ts +2 -2
  74. package/dist/files.d.ts +17 -17
  75. package/dist/instantiation.d.ts +1 -1
  76. package/dist/json.js +101 -0
  77. package/dist/keybinding.d.ts +2 -2
  78. package/dist/languageFeatures.d.ts +51 -51
  79. package/dist/log.d.ts +1 -1
  80. package/dist/monaco.d.ts +15 -7
  81. package/dist/monaco.js +1 -0
  82. package/dist/rollup-extension-directory-plugin.d.ts +3 -3
  83. package/dist/rollup-extension-directory-plugin.js +4 -8
  84. package/dist/rollup-vsix-plugin.d.ts +2 -3
  85. package/dist/rollup-vsix-plugin.js +3 -7
  86. package/dist/service-override/audioCue.js +1 -1
  87. package/dist/service-override/configuration.d.ts +4 -4
  88. package/dist/service-override/configuration.js +1 -1
  89. package/dist/service-override/debug.js +1 -1
  90. package/dist/service-override/dialogs.js +1 -1
  91. package/dist/service-override/editor.d.ts +2 -2
  92. package/dist/service-override/editor.js +1 -1
  93. package/dist/service-override/files.d.ts +17 -112
  94. package/dist/service-override/files.js +131 -235
  95. package/dist/service-override/keybindings.d.ts +1 -1
  96. package/dist/service-override/keybindings.js +1 -1
  97. package/dist/service-override/languages.d.ts +1 -1
  98. package/dist/service-override/languages.js +1 -1
  99. package/dist/service-override/layout.js +1 -1
  100. package/dist/service-override/markers.js +1 -1
  101. package/dist/service-override/model.js +1 -1
  102. package/dist/service-override/notifications.js +1 -1
  103. package/dist/service-override/output.js +2 -2
  104. package/dist/service-override/preferences.js +1 -1
  105. package/dist/service-override/quickaccess.js +1 -1
  106. package/dist/service-override/search.js +1 -1
  107. package/dist/service-override/snippets.js +1 -1
  108. package/dist/service-override/terminal.d.ts +2 -2
  109. package/dist/service-override/terminal.js +1 -1
  110. package/dist/service-override/textmate.js +1 -1
  111. package/dist/service-override/theme.d.ts +1 -1
  112. package/dist/service-override/theme.js +1 -1
  113. package/dist/service-override/tools/editor.js +7 -6
  114. package/dist/service-override/views.d.ts +5 -6
  115. package/dist/service-override/views.js +6 -30
  116. package/dist/services.d.ts +513 -323
  117. package/dist/services.js +7 -2
  118. package/dist/standaloneServices.d.ts +1 -1
  119. package/dist/views.d.ts +4 -4
  120. package/dist/vscode/vs/platform/tunnel/common/tunnel.js +1 -14
  121. package/dist/vscode/vs/workbench/api/common/extHostCommands.js +11 -11
  122. package/dist/vscode/vs/workbench/api/common/extHostOutput.js +1 -1
  123. package/dist/vscode/vs/workbench/api/common/extHostTextEditor.js +1 -1
  124. package/dist/vscode/vs/workbench/api/common/extHostTypeConverters.js +1 -1
  125. package/dist/vscode/vs/workbench/api/common/extHostTypes.js +1 -18
  126. package/dist/vscode/vs/workbench/common/editor.js +11 -1
  127. package/dist/vscode/vs/workbench/contrib/customEditor/common/customEditor.js +1 -53
  128. package/dist/vscode/vs/workbench/contrib/externalUriOpener/common/externalUriOpenerService.js +1 -169
  129. package/dist/vscode/vs/workbench/contrib/webview/browser/webview.js +1 -24
  130. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewWorkbenchService.js +3 -174
  131. package/dist/vscode/vs/workbench/contrib/webviewView/browser/webviewViewService.js +1 -43
  132. package/dist/vscode/vs/workbench/services/editor/common/editorGroupsService.js +37 -1
  133. package/dist/vscode/vs/workbench/services/history/common/history.js +13 -1
  134. package/dist/vscode-default-extensions/npm/dist/browser/npmBrowserMain.js.extensionResource.js +1 -1
  135. package/dist/vscode-default-extensions/references-view/dist/extension.js.extensionResource.js +1 -1
  136. package/dist/vscode-default-extensions/search-result/dist/extension.js.extensionResource.js +1 -1
  137. package/dist/{vscode-apis → vscode-services}/commands.js +1 -1
  138. package/dist/{vscode-apis → vscode-services}/debug.js +1 -1
  139. package/dist/{vscode-apis → vscode-services}/env.js +11 -9
  140. package/dist/vscode-services/extHost.js +393 -0
  141. package/dist/{vscode-apis → vscode-services}/extensions.js +2 -16
  142. package/dist/{vscode-apis → vscode-services}/l10n.js +1 -1
  143. package/dist/{vscode-apis → vscode-services}/languages.js +1 -8
  144. package/dist/{missing-services.js → vscode-services/missing-services.js} +109 -170
  145. package/dist/{vscode-apis → vscode-services}/window.js +7 -37
  146. package/dist/{vscode-apis → vscode-services}/workspace.js +3 -3
  147. package/dist/workbenchThemeService.d.ts +1 -1
  148. package/dist/workers/outputLinkComputer.worker.d.ts +2 -0
  149. package/dist/workers/textMate.worker.d.ts +2 -0
  150. package/dist/workspace.d.ts +1 -1
  151. package/monaco-editor-treemending.patch +780 -780
  152. package/package.json +93 -19
  153. package/dist/_virtual/index.js +0 -2
  154. package/dist/default-extensions/configuration-editing.js +0 -9
  155. package/dist/default-extensions/css-language-features.js +0 -10
  156. package/dist/default-extensions/debug-auto-launch.js +0 -6
  157. package/dist/default-extensions/debug-server-ready.js +0 -6
  158. package/dist/default-extensions/emmet.js +0 -7
  159. package/dist/default-extensions/extension-editing.js +0 -7
  160. package/dist/default-extensions/git-base.js +0 -16
  161. package/dist/default-extensions/git.js +0 -6
  162. package/dist/default-extensions/github-authentication.js +0 -7
  163. package/dist/default-extensions/github.js +0 -7
  164. package/dist/default-extensions/grunt.js +0 -6
  165. package/dist/default-extensions/gulp.js +0 -6
  166. package/dist/default-extensions/html-language-features.js +0 -10
  167. package/dist/default-extensions/ipynb.js +0 -7
  168. package/dist/default-extensions/jake.js +0 -6
  169. package/dist/default-extensions/json-language-features.js +0 -8
  170. package/dist/default-extensions/markdown-language-features.js +0 -18
  171. package/dist/default-extensions/markdown-math.js +0 -32
  172. package/dist/default-extensions/media-preview.js +0 -16
  173. package/dist/default-extensions/merge-conflict.js +0 -7
  174. package/dist/default-extensions/microsoft-authentication.js +0 -7
  175. package/dist/default-extensions/notebook-renderers.js +0 -6
  176. package/dist/default-extensions/php-language-features.js +0 -6
  177. package/dist/default-extensions/restructuredtext.js +0 -9
  178. package/dist/default-extensions/simple-browser.js +0 -10
  179. package/dist/default-extensions/typescript-language-features.js +0 -93
  180. package/dist/default-extensions/vscode-api-tests.js +0 -6
  181. package/dist/default-extensions/vscode-colorize-tests.js +0 -9
  182. package/dist/default-extensions/vscode-test-resolver.js +0 -6
  183. package/dist/ext-hosts/all.js +0 -26
  184. package/dist/ext-hosts/clipboard.js +0 -12
  185. package/dist/ext-hosts/commands.js +0 -18
  186. package/dist/ext-hosts/configuration.js +0 -16
  187. package/dist/ext-hosts/debug.js +0 -16
  188. package/dist/ext-hosts/decorations.js +0 -16
  189. package/dist/ext-hosts/dialogs.js +0 -14
  190. package/dist/ext-hosts/documentsAndEditors.js +0 -34
  191. package/dist/ext-hosts/editorTabs.js +0 -17
  192. package/dist/ext-hosts/filesystem.js +0 -24
  193. package/dist/ext-hosts/filesystemEvent.js +0 -17
  194. package/dist/ext-hosts/languageFeatures.js +0 -21
  195. package/dist/ext-hosts/languages.js +0 -17
  196. package/dist/ext-hosts/localization.js +0 -16
  197. package/dist/ext-hosts/messages.js +0 -24
  198. package/dist/ext-hosts/output.js +0 -16
  199. package/dist/ext-hosts/progress.js +0 -15
  200. package/dist/ext-hosts/quickopen.js +0 -15
  201. package/dist/ext-hosts/search.js +0 -17
  202. package/dist/ext-hosts/statusBar.js +0 -15
  203. package/dist/ext-hosts/storage.js +0 -28
  204. package/dist/ext-hosts/telemetry.js +0 -17
  205. package/dist/ext-hosts/terminal.js +0 -17
  206. package/dist/ext-hosts/theming.js +0 -15
  207. package/dist/ext-hosts/views.js +0 -30
  208. package/dist/ext-hosts/window.js +0 -20
  209. package/dist/ext-hosts/workspace.js +0 -16
  210. package/dist/extHost.js +0 -271
  211. package/dist/extensionWorker.js +0 -80
  212. package/dist/node_modules/toposort/index.js +0 -76
  213. package/dist/vscode/vs/platform/extensions/common/extensionValidator.js +0 -79
  214. package/dist/vscode/vs/platform/webview/common/mimeTypes.js +0 -22
  215. package/dist/vscode/vs/platform/webview/common/webviewPortMapping.js +0 -58
  216. package/dist/vscode/vs/workbench/api/browser/mainThreadCustomEditors.js +0 -567
  217. package/dist/vscode/vs/workbench/api/browser/mainThreadDialogs.js +0 -65
  218. package/dist/vscode/vs/workbench/api/browser/mainThreadLogService.js +0 -76
  219. package/dist/vscode/vs/workbench/api/browser/mainThreadUriOpeners.js +0 -104
  220. package/dist/vscode/vs/workbench/api/browser/mainThreadWebviewManager.js +0 -27
  221. package/dist/vscode/vs/workbench/api/browser/mainThreadWebviewPanels.js +0 -281
  222. package/dist/vscode/vs/workbench/api/browser/mainThreadWebviewViews.js +0 -98
  223. package/dist/vscode/vs/workbench/api/browser/mainThreadWebviews.js +0 -130
  224. package/dist/vscode/vs/workbench/api/common/extHostCustomEditors.js +0 -282
  225. package/dist/vscode/vs/workbench/api/common/extHostDialogs.js +0 -22
  226. package/dist/vscode/vs/workbench/api/common/extHostLogService.js +0 -17
  227. package/dist/vscode/vs/workbench/api/common/extHostLoggerService.js +0 -63
  228. package/dist/vscode/vs/workbench/api/common/extHostUriOpener.js +0 -44
  229. package/dist/vscode/vs/workbench/api/common/extHostWebview.js +0 -212
  230. package/dist/vscode/vs/workbench/api/common/extHostWebviewMessaging.js +0 -149
  231. package/dist/vscode/vs/workbench/api/common/extHostWebviewPanels.js +0 -225
  232. package/dist/vscode/vs/workbench/api/common/extHostWebviewView.js +0 -147
  233. package/dist/vscode/vs/workbench/browser/iframe.js +0 -16
  234. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.css.js +0 -4
  235. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +0 -301
  236. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsOutline.js +0 -362
  237. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.css.js +0 -4
  238. package/dist/vscode/vs/workbench/contrib/codeEditor/browser/outline/documentSymbolsTree.js +0 -281
  239. package/dist/vscode/vs/workbench/contrib/customEditor/browser/customEditor.contribution.js +0 -14
  240. package/dist/vscode/vs/workbench/contrib/customEditor/browser/customEditorInputFactory.js +0 -143
  241. package/dist/vscode/vs/workbench/contrib/customEditor/browser/customEditors.js +0 -212
  242. package/dist/vscode/vs/workbench/contrib/customEditor/browser/media/customEditor.css.js +0 -4
  243. package/dist/vscode/vs/workbench/contrib/customEditor/common/contributedCustomEditors.js +0 -72
  244. package/dist/vscode/vs/workbench/contrib/customEditor/common/customEditorModelManager.js +0 -61
  245. package/dist/vscode/vs/workbench/contrib/customEditor/common/customTextEditorModel.js +0 -70
  246. package/dist/vscode/vs/workbench/contrib/customEditor/common/extensionPoint.js +0 -106
  247. package/dist/vscode/vs/workbench/contrib/externalUriOpener/common/configuration.js +0 -68
  248. package/dist/vscode/vs/workbench/contrib/externalUriOpener/common/contributedOpeners.js +0 -79
  249. package/dist/vscode/vs/workbench/contrib/externalUriOpener/common/externalUriOpener.contribution.js +0 -5
  250. package/dist/vscode/vs/workbench/contrib/outline/browser/outline.contribution.js +0 -261
  251. package/dist/vscode/vs/workbench/contrib/outline/browser/outline.js +0 -10
  252. package/dist/vscode/vs/workbench/contrib/outline/browser/outlinePane.css.js +0 -4
  253. package/dist/vscode/vs/workbench/contrib/outline/browser/outlinePane.js +0 -290
  254. package/dist/vscode/vs/workbench/contrib/outline/browser/outlineViewState.js +0 -66
  255. package/dist/vscode/vs/workbench/contrib/url/common/urlGlob.js +0 -60
  256. package/dist/vscode/vs/workbench/contrib/webview/browser/overlayWebview.js +0 -288
  257. package/dist/vscode/vs/workbench/contrib/webview/browser/resourceLoading.js +0 -94
  258. package/dist/vscode/vs/workbench/contrib/webview/browser/themeing.js +0 -86
  259. package/dist/vscode/vs/workbench/contrib/webview/browser/webviewElement.js +0 -643
  260. package/dist/vscode/vs/workbench/contrib/webview/browser/webviewFindWidget.js +0 -59
  261. package/dist/vscode/vs/workbench/contrib/webview/browser/webviewService.js +0 -57
  262. package/dist/vscode/vs/workbench/contrib/webview/common/webview.js +0 -39
  263. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewCommands.js +0 -120
  264. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditor.js +0 -170
  265. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewEditorInputSerializer.js +0 -119
  266. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewIconManager.js +0 -56
  267. package/dist/vscode/vs/workbench/contrib/webviewPanel/browser/webviewPanel.contribution.js +0 -61
  268. package/dist/vscode/vs/workbench/services/outline/browser/outlineService.js +0 -35
  269. package/dist/vscode/vs/workbench/services/workingCopy/common/resourceWorkingCopy.js +0 -78
  270. package/dist/vscode-default-extensions/configuration-editing/dist/browser/configurationEditingMain.js.extensionResource.js +0 -2
  271. package/dist/vscode-default-extensions/configuration-editing/package.json.js +0 -2
  272. package/dist/vscode-default-extensions/configuration-editing/schemas/attachContainer.schema.json.extensionResource.js +0 -2
  273. package/dist/vscode-default-extensions/css-language-features/client/dist/browser/cssClientMain.js.extensionResource.js +0 -2
  274. package/dist/vscode-default-extensions/css-language-features/package.json.js +0 -2
  275. package/dist/vscode-default-extensions/css-language-features/schemas/package.schema.json.extensionResource.js +0 -2
  276. package/dist/vscode-default-extensions/css-language-features/server/dist/browser/cssServerMain.js.extensionResource.js +0 -2
  277. package/dist/vscode-default-extensions/debug-auto-launch/package.json.js +0 -2
  278. package/dist/vscode-default-extensions/debug-server-ready/package.json.js +0 -2
  279. package/dist/vscode-default-extensions/emmet/dist/browser/emmetBrowserMain.js.extensionResource.js +0 -2
  280. package/dist/vscode-default-extensions/emmet/package.json.js +0 -2
  281. package/dist/vscode-default-extensions/extension-editing/dist/browser/extensionEditingBrowserMain.js.extensionResource.js +0 -2
  282. package/dist/vscode-default-extensions/extension-editing/package.json.js +0 -2
  283. package/dist/vscode-default-extensions/git/package.json.js +0 -2
  284. package/dist/vscode-default-extensions/git-base/dist/browser/extension.js.extensionResource.js +0 -2
  285. package/dist/vscode-default-extensions/git-base/languages/git-commit.language-configuration.json.extensionResource.js +0 -2
  286. package/dist/vscode-default-extensions/git-base/languages/git-rebase.language-configuration.json.extensionResource.js +0 -2
  287. package/dist/vscode-default-extensions/git-base/languages/ignore.language-configuration.json.extensionResource.js +0 -2
  288. package/dist/vscode-default-extensions/git-base/package.json.js +0 -2
  289. package/dist/vscode-default-extensions/git-base/syntaxes/git-commit.tmLanguage.json.extensionResource.js +0 -2
  290. package/dist/vscode-default-extensions/git-base/syntaxes/git-rebase.tmLanguage.json.extensionResource.js +0 -2
  291. package/dist/vscode-default-extensions/git-base/syntaxes/ignore.tmLanguage.json.extensionResource.js +0 -2
  292. package/dist/vscode-default-extensions/github/markdown.css.extensionResource.js +0 -2
  293. package/dist/vscode-default-extensions/github/package.json.js +0 -2
  294. package/dist/vscode-default-extensions/github-authentication/dist/browser/extension.js.extensionResource.js +0 -2
  295. package/dist/vscode-default-extensions/github-authentication/package.json.js +0 -2
  296. package/dist/vscode-default-extensions/grunt/package.json.js +0 -2
  297. package/dist/vscode-default-extensions/gulp/package.json.js +0 -2
  298. package/dist/vscode-default-extensions/html-language-features/client/dist/browser/htmlClientMain.js.extensionResource.js +0 -2
  299. package/dist/vscode-default-extensions/html-language-features/package.json.js +0 -2
  300. package/dist/vscode-default-extensions/html-language-features/schemas/package.schema.json.extensionResource.js +0 -2
  301. package/dist/vscode-default-extensions/html-language-features/server/dist/browser/htmlServerMain.js.extensionResource.js +0 -2
  302. package/dist/vscode-default-extensions/ipynb/dist/browser/ipynbMain.js.extensionResource.js +0 -2
  303. package/dist/vscode-default-extensions/ipynb/package.json.js +0 -2
  304. package/dist/vscode-default-extensions/jake/package.json.js +0 -2
  305. package/dist/vscode-default-extensions/json-language-features/client/dist/browser/jsonClientMain.js.extensionResource.js +0 -2
  306. package/dist/vscode-default-extensions/json-language-features/package.json.js +0 -2
  307. package/dist/vscode-default-extensions/json-language-features/server/dist/browser/jsonServerMain.js.extensionResource.js +0 -2
  308. package/dist/vscode-default-extensions/markdown-language-features/dist/browser/extension.js.extensionResource.js +0 -2
  309. package/dist/vscode-default-extensions/markdown-language-features/media/highlight.css.extensionResource.js +0 -2
  310. package/dist/vscode-default-extensions/markdown-language-features/media/index.js.extensionResource.js +0 -2
  311. package/dist/vscode-default-extensions/markdown-language-features/media/markdown.css.extensionResource.js +0 -2
  312. package/dist/vscode-default-extensions/markdown-language-features/media/pre.js.extensionResource.js +0 -2
  313. package/dist/vscode-default-extensions/markdown-language-features/media/preview-dark.svg.extensionResource.js +0 -2
  314. package/dist/vscode-default-extensions/markdown-language-features/media/preview-light.svg.extensionResource.js +0 -2
  315. package/dist/vscode-default-extensions/markdown-language-features/package.json.js +0 -2
  316. package/dist/vscode-default-extensions/markdown-language-features/schemas/package.schema.json.extensionResource.js +0 -2
  317. package/dist/vscode-default-extensions/markdown-language-features/server/dist/browser/workerMain.js.extensionResource.js +0 -2
  318. package/dist/vscode-default-extensions/markdown-math/dist/browser/extension.js.extensionResource.js +0 -2
  319. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_AMS-Regular.woff2.extensionResource.js +0 -2
  320. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Caligraphic-Bold.woff2.extensionResource.js +0 -2
  321. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Caligraphic-Regular.woff2.extensionResource.js +0 -2
  322. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Fraktur-Bold.woff2.extensionResource.js +0 -2
  323. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Fraktur-Regular.woff2.extensionResource.js +0 -2
  324. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Main-Bold.woff2.extensionResource.js +0 -2
  325. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Main-BoldItalic.woff2.extensionResource.js +0 -2
  326. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Main-Italic.woff2.extensionResource.js +0 -2
  327. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Main-Regular.woff2.extensionResource.js +0 -2
  328. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Math-BoldItalic.woff2.extensionResource.js +0 -2
  329. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Math-Italic.woff2.extensionResource.js +0 -2
  330. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_SansSerif-Bold.woff2.extensionResource.js +0 -2
  331. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_SansSerif-Italic.woff2.extensionResource.js +0 -2
  332. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_SansSerif-Regular.woff2.extensionResource.js +0 -2
  333. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Script-Regular.woff2.extensionResource.js +0 -2
  334. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Size1-Regular.woff2.extensionResource.js +0 -2
  335. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Size2-Regular.woff2.extensionResource.js +0 -2
  336. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Size3-Regular.woff2.extensionResource.js +0 -2
  337. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Size4-Regular.woff2.extensionResource.js +0 -2
  338. package/dist/vscode-default-extensions/markdown-math/notebook-out/fonts/KaTeX_Typewriter-Regular.woff2.extensionResource.js +0 -2
  339. package/dist/vscode-default-extensions/markdown-math/notebook-out/katex.min.css.extensionResource.js +0 -2
  340. package/dist/vscode-default-extensions/markdown-math/package.json.js +0 -2
  341. package/dist/vscode-default-extensions/markdown-math/preview-styles/index.css.extensionResource.js +0 -2
  342. package/dist/vscode-default-extensions/markdown-math/syntaxes/md-math-block.tmLanguage.json.extensionResource.js +0 -2
  343. package/dist/vscode-default-extensions/markdown-math/syntaxes/md-math-inline.tmLanguage.json.extensionResource.js +0 -2
  344. package/dist/vscode-default-extensions/markdown-math/syntaxes/md-math.tmLanguage.json.extensionResource.js +0 -2
  345. package/dist/vscode-default-extensions/media-preview/dist/browser/extension.js.extensionResource.js +0 -2
  346. package/dist/vscode-default-extensions/media-preview/media/audioPreview.css.extensionResource.js +0 -2
  347. package/dist/vscode-default-extensions/media-preview/media/audioPreview.js.extensionResource.js +0 -2
  348. package/dist/vscode-default-extensions/media-preview/media/imagePreview.css.extensionResource.js +0 -2
  349. package/dist/vscode-default-extensions/media-preview/media/imagePreview.js.extensionResource.js +0 -2
  350. package/dist/vscode-default-extensions/media-preview/media/loading-dark.svg.extensionResource.js +0 -2
  351. package/dist/vscode-default-extensions/media-preview/media/loading-hc.svg.extensionResource.js +0 -2
  352. package/dist/vscode-default-extensions/media-preview/media/loading.svg.extensionResource.js +0 -2
  353. package/dist/vscode-default-extensions/media-preview/media/videoPreview.css.extensionResource.js +0 -2
  354. package/dist/vscode-default-extensions/media-preview/media/videoPreview.js.extensionResource.js +0 -2
  355. package/dist/vscode-default-extensions/media-preview/package.json.js +0 -2
  356. package/dist/vscode-default-extensions/merge-conflict/dist/browser/mergeConflictMain.js.extensionResource.js +0 -2
  357. package/dist/vscode-default-extensions/merge-conflict/package.json.js +0 -2
  358. package/dist/vscode-default-extensions/microsoft-authentication/dist/browser/extension.js.extensionResource.js +0 -2
  359. package/dist/vscode-default-extensions/microsoft-authentication/package.json.js +0 -2
  360. package/dist/vscode-default-extensions/notebook-renderers/package.json.js +0 -2
  361. package/dist/vscode-default-extensions/php-language-features/package.json.js +0 -2
  362. package/dist/vscode-default-extensions/restructuredtext/language-configuration.json.extensionResource.js +0 -2
  363. package/dist/vscode-default-extensions/restructuredtext/package.json.js +0 -2
  364. package/dist/vscode-default-extensions/restructuredtext/syntaxes/rst.tmLanguage.json.extensionResource.js +0 -2
  365. package/dist/vscode-default-extensions/simple-browser/dist/browser/extension.js.extensionResource.js +0 -2
  366. package/dist/vscode-default-extensions/simple-browser/media/codicon.css.extensionResource.js +0 -2
  367. package/dist/vscode-default-extensions/simple-browser/media/index.js.extensionResource.js +0 -2
  368. package/dist/vscode-default-extensions/simple-browser/media/main.css.extensionResource.js +0 -2
  369. package/dist/vscode-default-extensions/simple-browser/package.json.js +0 -2
  370. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/extension.js.extensionResource.js +0 -2
  371. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.d.ts.extensionResource.js +0 -2
  372. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.decorators.d.ts.extensionResource.js +0 -2
  373. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.decorators.legacy.d.ts.extensionResource.js +0 -2
  374. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.dom.d.ts.extensionResource.js +0 -2
  375. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.dom.iterable.d.ts.extensionResource.js +0 -2
  376. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2015.collection.d.ts.extensionResource.js +0 -2
  377. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2015.core.d.ts.extensionResource.js +0 -2
  378. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2015.d.ts.extensionResource.js +0 -2
  379. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2015.generator.d.ts.extensionResource.js +0 -2
  380. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2015.iterable.d.ts.extensionResource.js +0 -2
  381. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2015.promise.d.ts.extensionResource.js +0 -2
  382. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2015.proxy.d.ts.extensionResource.js +0 -2
  383. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2015.reflect.d.ts.extensionResource.js +0 -2
  384. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2015.symbol.d.ts.extensionResource.js +0 -2
  385. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2015.symbol.wellknown.d.ts.extensionResource.js +0 -2
  386. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2016.array.include.d.ts.extensionResource.js +0 -2
  387. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2016.d.ts.extensionResource.js +0 -2
  388. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2016.full.d.ts.extensionResource.js +0 -2
  389. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2017.d.ts.extensionResource.js +0 -2
  390. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2017.full.d.ts.extensionResource.js +0 -2
  391. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2017.intl.d.ts.extensionResource.js +0 -2
  392. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2017.object.d.ts.extensionResource.js +0 -2
  393. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2017.sharedmemory.d.ts.extensionResource.js +0 -2
  394. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2017.string.d.ts.extensionResource.js +0 -2
  395. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2017.typedarrays.d.ts.extensionResource.js +0 -2
  396. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2018.asyncgenerator.d.ts.extensionResource.js +0 -2
  397. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2018.asynciterable.d.ts.extensionResource.js +0 -2
  398. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2018.d.ts.extensionResource.js +0 -2
  399. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2018.full.d.ts.extensionResource.js +0 -2
  400. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2018.intl.d.ts.extensionResource.js +0 -2
  401. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2018.promise.d.ts.extensionResource.js +0 -2
  402. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2018.regexp.d.ts.extensionResource.js +0 -2
  403. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2019.array.d.ts.extensionResource.js +0 -2
  404. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2019.d.ts.extensionResource.js +0 -2
  405. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2019.full.d.ts.extensionResource.js +0 -2
  406. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2019.intl.d.ts.extensionResource.js +0 -2
  407. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2019.object.d.ts.extensionResource.js +0 -2
  408. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2019.string.d.ts.extensionResource.js +0 -2
  409. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2019.symbol.d.ts.extensionResource.js +0 -2
  410. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2020.bigint.d.ts.extensionResource.js +0 -2
  411. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2020.d.ts.extensionResource.js +0 -2
  412. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2020.date.d.ts.extensionResource.js +0 -2
  413. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2020.full.d.ts.extensionResource.js +0 -2
  414. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2020.intl.d.ts.extensionResource.js +0 -2
  415. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2020.number.d.ts.extensionResource.js +0 -2
  416. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2020.promise.d.ts.extensionResource.js +0 -2
  417. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2020.sharedmemory.d.ts.extensionResource.js +0 -2
  418. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2020.string.d.ts.extensionResource.js +0 -2
  419. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2020.symbol.wellknown.d.ts.extensionResource.js +0 -2
  420. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2021.d.ts.extensionResource.js +0 -2
  421. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2021.full.d.ts.extensionResource.js +0 -2
  422. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2021.intl.d.ts.extensionResource.js +0 -2
  423. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2021.promise.d.ts.extensionResource.js +0 -2
  424. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2021.string.d.ts.extensionResource.js +0 -2
  425. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2021.weakref.d.ts.extensionResource.js +0 -2
  426. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2022.array.d.ts.extensionResource.js +0 -2
  427. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2022.d.ts.extensionResource.js +0 -2
  428. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2022.error.d.ts.extensionResource.js +0 -2
  429. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2022.full.d.ts.extensionResource.js +0 -2
  430. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2022.intl.d.ts.extensionResource.js +0 -2
  431. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2022.object.d.ts.extensionResource.js +0 -2
  432. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2022.regexp.d.ts.extensionResource.js +0 -2
  433. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2022.sharedmemory.d.ts.extensionResource.js +0 -2
  434. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2022.string.d.ts.extensionResource.js +0 -2
  435. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2023.array.d.ts.extensionResource.js +0 -2
  436. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2023.d.ts.extensionResource.js +0 -2
  437. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es2023.full.d.ts.extensionResource.js +0 -2
  438. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es5.d.ts.extensionResource.js +0 -2
  439. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.es6.d.ts.extensionResource.js +0 -2
  440. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.esnext.d.ts.extensionResource.js +0 -2
  441. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.esnext.full.d.ts.extensionResource.js +0 -2
  442. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.esnext.intl.d.ts.extensionResource.js +0 -2
  443. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.scripthost.d.ts.extensionResource.js +0 -2
  444. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.webworker.d.ts.extensionResource.js +0 -2
  445. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.webworker.importscripts.d.ts.extensionResource.js +0 -2
  446. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/lib.webworker.iterable.d.ts.extensionResource.js +0 -2
  447. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/tsserver.web.js.extensionResource.js +0 -2
  448. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/tsserver.web.js.map.extensionResource.js +0 -2
  449. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/typesMap.json.extensionResource.js +0 -2
  450. package/dist/vscode-default-extensions/typescript-language-features/dist/browser/typescript/typescript.d.ts.extensionResource.js +0 -2
  451. package/dist/vscode-default-extensions/typescript-language-features/package.json.js +0 -2
  452. package/dist/vscode-default-extensions/typescript-language-features/schemas/jsconfig.schema.json.extensionResource.js +0 -2
  453. package/dist/vscode-default-extensions/typescript-language-features/schemas/package.schema.json.extensionResource.js +0 -2
  454. package/dist/vscode-default-extensions/typescript-language-features/schemas/tsconfig.schema.json.extensionResource.js +0 -2
  455. package/dist/vscode-default-extensions/vscode-api-tests/package.json.js +0 -2
  456. package/dist/vscode-default-extensions/vscode-colorize-tests/package.json.js +0 -2
  457. package/dist/vscode-default-extensions/vscode-colorize-tests/producticons/ElegantIcons.woff.extensionResource.js +0 -2
  458. package/dist/vscode-default-extensions/vscode-colorize-tests/producticons/test-product-icon-theme.json.extensionResource.js +0 -2
  459. package/dist/vscode-default-extensions/vscode-test-resolver/package.json.js +0 -2
@@ -1,15 +1,14 @@
1
1
  import require$$0$1__default from 'fs';
2
2
  import require$$2 from 'util';
3
3
  import * as path from 'path';
4
- import path__default, { sep } from 'path';
4
+ import path__default from 'path';
5
5
  import { resolve, dirname, extname, basename, relative as relative$1 } from 'node:path';
6
6
  import process$1, { env as env$1 } from 'node:process';
7
7
  import { performance } from 'node:perf_hooks';
8
8
  import { createHash as createHash$1 } from 'node:crypto';
9
9
  import { mkdir, writeFile, readFile, lstat, realpath, readdir } from 'node:fs/promises';
10
10
  import * as tty from 'tty';
11
- import { createFilter, attachScopes, makeLegalIdentifier, addExtension } from '@rollup/pluginutils';
12
- import * as url from 'url';
11
+ import { addExtension } from '@rollup/pluginutils';
13
12
 
14
13
  /*---------------------------------------------------------------------------------------------
15
14
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -25,7 +24,7 @@ function isString$1(str) {
25
24
  * @returns whether the provided parameter is of type `object` but **not**
26
25
  * `null`, an `array`, a `regexp`, nor a `date`.
27
26
  */
28
- function isObject$2(obj) {
27
+ function isObject(obj) {
29
28
  // The method can't do a type cast since there are type (like strings) which
30
29
  // are subclasses of any put not positvely matched by the function. Hence type
31
30
  // narrowing results in wrong results.
@@ -115,7 +114,7 @@ function replaceNLStrings(extensionManifest, messages, originalMessages) {
115
114
  }
116
115
  }
117
116
  }
118
- else if (isObject$2(value)) {
117
+ else if (isObject(value)) {
119
118
  for (const k in value) {
120
119
  if (value.hasOwnProperty(k)) {
121
120
  k === 'commands' ? processEntry(value, k, true) : processEntry(value, k, command);
@@ -137,10 +136,6 @@ function replaceNLStrings(extensionManifest, messages, originalMessages) {
137
136
 
138
137
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
139
138
 
140
- function getDefaultExportFromCjs$1 (x) {
141
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
142
- }
143
-
144
139
  var lib = {};
145
140
 
146
141
  var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -1436,18 +1431,18 @@ function getParseErrorMessage(errorCode) {
1436
1431
 
1437
1432
  var version$1 = "3.25.1";
1438
1433
 
1439
- const comma$1 = ','.charCodeAt(0);
1440
- const semicolon$1 = ';'.charCodeAt(0);
1434
+ const comma = ','.charCodeAt(0);
1435
+ const semicolon = ';'.charCodeAt(0);
1441
1436
  const chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
1442
- const intToChar$1 = new Uint8Array(64); // 64 possible chars.
1443
- const charToInt$1 = new Uint8Array(128); // z is 122 in ASCII
1437
+ const intToChar = new Uint8Array(64); // 64 possible chars.
1438
+ const charToInt = new Uint8Array(128); // z is 122 in ASCII
1444
1439
  for (let i = 0; i < chars$1.length; i++) {
1445
1440
  const c = chars$1.charCodeAt(i);
1446
- intToChar$1[i] = c;
1447
- charToInt$1[c] = i;
1441
+ intToChar[i] = c;
1442
+ charToInt[c] = i;
1448
1443
  }
1449
1444
  // Provide a fallback for older environments.
1450
- const td$1 = typeof TextDecoder !== 'undefined'
1445
+ const td = typeof TextDecoder !== 'undefined'
1451
1446
  ? /* #__PURE__ */ new TextDecoder()
1452
1447
  : typeof Buffer !== 'undefined'
1453
1448
  ? {
@@ -1516,7 +1511,7 @@ function decodeInteger(mappings, pos, state, j) {
1516
1511
  let integer = 0;
1517
1512
  do {
1518
1513
  const c = mappings.charCodeAt(pos++);
1519
- integer = charToInt$1[c];
1514
+ integer = charToInt[c];
1520
1515
  value |= (integer & 31) << shift;
1521
1516
  shift += 5;
1522
1517
  } while (integer & 32);
@@ -1531,7 +1526,7 @@ function decodeInteger(mappings, pos, state, j) {
1531
1526
  function hasMoreVlq(mappings, i, length) {
1532
1527
  if (i >= length)
1533
1528
  return false;
1534
- return mappings.charCodeAt(i) !== comma$1;
1529
+ return mappings.charCodeAt(i) !== comma;
1535
1530
  }
1536
1531
  function sort(line) {
1537
1532
  line.sort(sortComparator);
@@ -1539,7 +1534,7 @@ function sort(line) {
1539
1534
  function sortComparator(a, b) {
1540
1535
  return a[0] - b[0];
1541
1536
  }
1542
- function encode$1(decoded) {
1537
+ function encode(decoded) {
1543
1538
  const state = new Int32Array(5);
1544
1539
  const bufLength = 1024 * 16;
1545
1540
  const subLength = bufLength - 36;
@@ -1551,10 +1546,10 @@ function encode$1(decoded) {
1551
1546
  const line = decoded[i];
1552
1547
  if (i > 0) {
1553
1548
  if (pos === bufLength) {
1554
- out += td$1.decode(buf);
1549
+ out += td.decode(buf);
1555
1550
  pos = 0;
1556
1551
  }
1557
- buf[pos++] = semicolon$1;
1552
+ buf[pos++] = semicolon;
1558
1553
  }
1559
1554
  if (line.length === 0)
1560
1555
  continue;
@@ -1564,26 +1559,26 @@ function encode$1(decoded) {
1564
1559
  // We can push up to 5 ints, each int can take at most 7 chars, and we
1565
1560
  // may push a comma.
1566
1561
  if (pos > subLength) {
1567
- out += td$1.decode(sub);
1562
+ out += td.decode(sub);
1568
1563
  buf.copyWithin(0, subLength, pos);
1569
1564
  pos -= subLength;
1570
1565
  }
1571
1566
  if (j > 0)
1572
- buf[pos++] = comma$1;
1573
- pos = encodeInteger$1(buf, pos, state, segment, 0); // genColumn
1567
+ buf[pos++] = comma;
1568
+ pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
1574
1569
  if (segment.length === 1)
1575
1570
  continue;
1576
- pos = encodeInteger$1(buf, pos, state, segment, 1); // sourcesIndex
1577
- pos = encodeInteger$1(buf, pos, state, segment, 2); // sourceLine
1578
- pos = encodeInteger$1(buf, pos, state, segment, 3); // sourceColumn
1571
+ pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
1572
+ pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
1573
+ pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
1579
1574
  if (segment.length === 4)
1580
1575
  continue;
1581
- pos = encodeInteger$1(buf, pos, state, segment, 4); // namesIndex
1576
+ pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
1582
1577
  }
1583
1578
  }
1584
- return out + td$1.decode(buf.subarray(0, pos));
1579
+ return out + td.decode(buf.subarray(0, pos));
1585
1580
  }
1586
- function encodeInteger$1(buf, pos, state, segment, j) {
1581
+ function encodeInteger(buf, pos, state, segment, j) {
1587
1582
  const next = segment[j];
1588
1583
  let num = next - state[j];
1589
1584
  state[j] = next;
@@ -1593,12 +1588,12 @@ function encodeInteger$1(buf, pos, state, segment, j) {
1593
1588
  num >>>= 5;
1594
1589
  if (num > 0)
1595
1590
  clamped |= 0b100000;
1596
- buf[pos++] = intToChar$1[clamped];
1591
+ buf[pos++] = intToChar[clamped];
1597
1592
  } while (num > 0);
1598
1593
  return pos;
1599
1594
  }
1600
1595
 
1601
- let BitSet$1 = class BitSet {
1596
+ class BitSet {
1602
1597
  constructor(arg) {
1603
1598
  this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
1604
1599
  }
@@ -1610,7 +1605,7 @@ let BitSet$1 = class BitSet {
1610
1605
  has(n) {
1611
1606
  return !!(this.bits[n >> 5] & (1 << (n & 31)));
1612
1607
  }
1613
- };
1608
+ }
1614
1609
 
1615
1610
  let Chunk$1 = class Chunk {
1616
1611
  constructor(start, end, content) {
@@ -1766,7 +1761,7 @@ let Chunk$1 = class Chunk {
1766
1761
  }
1767
1762
  };
1768
1763
 
1769
- function getBtoa$1 () {
1764
+ function getBtoa () {
1770
1765
  if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
1771
1766
  return (str) => window.btoa(unescape(encodeURIComponent(str)));
1772
1767
  } else if (typeof Buffer === 'function') {
@@ -1778,16 +1773,16 @@ function getBtoa$1 () {
1778
1773
  }
1779
1774
  }
1780
1775
 
1781
- const btoa$1 = /*#__PURE__*/ getBtoa$1();
1776
+ const btoa = /*#__PURE__*/ getBtoa();
1782
1777
 
1783
- let SourceMap$1 = class SourceMap {
1778
+ class SourceMap {
1784
1779
  constructor(properties) {
1785
1780
  this.version = 3;
1786
1781
  this.file = properties.file;
1787
1782
  this.sources = properties.sources;
1788
1783
  this.sourcesContent = properties.sourcesContent;
1789
1784
  this.names = properties.names;
1790
- this.mappings = encode$1(properties.mappings);
1785
+ this.mappings = encode(properties.mappings);
1791
1786
  if (typeof properties.x_google_ignoreList !== 'undefined') {
1792
1787
  this.x_google_ignoreList = properties.x_google_ignoreList;
1793
1788
  }
@@ -1798,11 +1793,11 @@ let SourceMap$1 = class SourceMap {
1798
1793
  }
1799
1794
 
1800
1795
  toUrl() {
1801
- return 'data:application/json;charset=utf-8;base64,' + btoa$1(this.toString());
1796
+ return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());
1802
1797
  }
1803
- };
1798
+ }
1804
1799
 
1805
- function guessIndent$1(code) {
1800
+ function guessIndent(code) {
1806
1801
  const lines = code.split('\n');
1807
1802
 
1808
1803
  const tabbed = lines.filter((line) => /^\t+/.test(line));
@@ -1828,7 +1823,7 @@ function guessIndent$1(code) {
1828
1823
  return new Array(min + 1).join(' ');
1829
1824
  }
1830
1825
 
1831
- function getRelativePath$1(from, to) {
1826
+ function getRelativePath(from, to) {
1832
1827
  const fromParts = from.split(/[/\\]/);
1833
1828
  const toParts = to.split(/[/\\]/);
1834
1829
 
@@ -1879,7 +1874,7 @@ function getLocator$1(source) {
1879
1874
  };
1880
1875
  }
1881
1876
 
1882
- let Mappings$1 = class Mappings {
1877
+ class Mappings {
1883
1878
  constructor(hires) {
1884
1879
  this.hires = hires;
1885
1880
  this.generatedCodeLine = 0;
@@ -1947,17 +1942,17 @@ let Mappings$1 = class Mappings {
1947
1942
 
1948
1943
  this.generatedCodeColumn += lines[lines.length - 1].length;
1949
1944
  }
1950
- };
1945
+ }
1951
1946
 
1952
- const n$1 = '\n';
1947
+ const n = '\n';
1953
1948
 
1954
- const warned$1 = {
1949
+ const warned = {
1955
1950
  insertLeft: false,
1956
1951
  insertRight: false,
1957
1952
  storeName: false,
1958
1953
  };
1959
1954
 
1960
- let MagicString$1 = class MagicString {
1955
+ class MagicString {
1961
1956
  constructor(string, options = {}) {
1962
1957
  const chunk = new Chunk$1(0, string.length, string);
1963
1958
 
@@ -1972,7 +1967,7 @@ let MagicString$1 = class MagicString {
1972
1967
  byEnd: { writable: true, value: {} },
1973
1968
  filename: { writable: true, value: options.filename },
1974
1969
  indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
1975
- sourcemapLocations: { writable: true, value: new BitSet$1() },
1970
+ sourcemapLocations: { writable: true, value: new BitSet() },
1976
1971
  storedNames: { writable: true, value: {} },
1977
1972
  indentStr: { writable: true, value: undefined },
1978
1973
  ignoreList: { writable: true, value: options.ignoreList },
@@ -2052,7 +2047,7 @@ let MagicString$1 = class MagicString {
2052
2047
  cloned.indentExclusionRanges = this.indentExclusionRanges.slice();
2053
2048
  }
2054
2049
 
2055
- cloned.sourcemapLocations = new BitSet$1(this.sourcemapLocations);
2050
+ cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
2056
2051
 
2057
2052
  cloned.intro = this.intro;
2058
2053
  cloned.outro = this.outro;
@@ -2065,7 +2060,7 @@ let MagicString$1 = class MagicString {
2065
2060
 
2066
2061
  const sourceIndex = 0;
2067
2062
  const names = Object.keys(this.storedNames);
2068
- const mappings = new Mappings$1(options.hires);
2063
+ const mappings = new Mappings(options.hires);
2069
2064
 
2070
2065
  const locate = getLocator$1(this.original);
2071
2066
 
@@ -2094,7 +2089,7 @@ let MagicString$1 = class MagicString {
2094
2089
 
2095
2090
  return {
2096
2091
  file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
2097
- sources: [options.source ? getRelativePath$1(options.file || '', options.source) : (options.file || '')],
2092
+ sources: [options.source ? getRelativePath(options.file || '', options.source) : (options.file || '')],
2098
2093
  sourcesContent: options.includeContent ? [this.original] : undefined,
2099
2094
  names,
2100
2095
  mappings: mappings.raw,
@@ -2103,12 +2098,12 @@ let MagicString$1 = class MagicString {
2103
2098
  }
2104
2099
 
2105
2100
  generateMap(options) {
2106
- return new SourceMap$1(this.generateDecodedMap(options));
2101
+ return new SourceMap(this.generateDecodedMap(options));
2107
2102
  }
2108
2103
 
2109
2104
  _ensureindentStr() {
2110
2105
  if (this.indentStr === undefined) {
2111
- this.indentStr = guessIndent$1(this.original);
2106
+ this.indentStr = guessIndent(this.original);
2112
2107
  }
2113
2108
  }
2114
2109
 
@@ -2217,22 +2212,22 @@ let MagicString$1 = class MagicString {
2217
2212
  }
2218
2213
 
2219
2214
  insertLeft(index, content) {
2220
- if (!warned$1.insertLeft) {
2215
+ if (!warned.insertLeft) {
2221
2216
  console.warn(
2222
2217
  'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'
2223
2218
  ); // eslint-disable-line no-console
2224
- warned$1.insertLeft = true;
2219
+ warned.insertLeft = true;
2225
2220
  }
2226
2221
 
2227
2222
  return this.appendLeft(index, content);
2228
2223
  }
2229
2224
 
2230
2225
  insertRight(index, content) {
2231
- if (!warned$1.insertRight) {
2226
+ if (!warned.insertRight) {
2232
2227
  console.warn(
2233
2228
  'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'
2234
2229
  ); // eslint-disable-line no-console
2235
- warned$1.insertRight = true;
2230
+ warned.insertRight = true;
2236
2231
  }
2237
2232
 
2238
2233
  return this.prependRight(index, content);
@@ -2296,11 +2291,11 @@ let MagicString$1 = class MagicString {
2296
2291
  this._split(end);
2297
2292
 
2298
2293
  if (options === true) {
2299
- if (!warned$1.storeName) {
2294
+ if (!warned.storeName) {
2300
2295
  console.warn(
2301
2296
  'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'
2302
2297
  ); // eslint-disable-line no-console
2303
- warned$1.storeName = true;
2298
+ warned.storeName = true;
2304
2299
  }
2305
2300
 
2306
2301
  options = { storeName: true };
@@ -2416,30 +2411,30 @@ let MagicString$1 = class MagicString {
2416
2411
  }
2417
2412
 
2418
2413
  lastLine() {
2419
- let lineIndex = this.outro.lastIndexOf(n$1);
2414
+ let lineIndex = this.outro.lastIndexOf(n);
2420
2415
  if (lineIndex !== -1) return this.outro.substr(lineIndex + 1);
2421
2416
  let lineStr = this.outro;
2422
2417
  let chunk = this.lastChunk;
2423
2418
  do {
2424
2419
  if (chunk.outro.length > 0) {
2425
- lineIndex = chunk.outro.lastIndexOf(n$1);
2420
+ lineIndex = chunk.outro.lastIndexOf(n);
2426
2421
  if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;
2427
2422
  lineStr = chunk.outro + lineStr;
2428
2423
  }
2429
2424
 
2430
2425
  if (chunk.content.length > 0) {
2431
- lineIndex = chunk.content.lastIndexOf(n$1);
2426
+ lineIndex = chunk.content.lastIndexOf(n);
2432
2427
  if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;
2433
2428
  lineStr = chunk.content + lineStr;
2434
2429
  }
2435
2430
 
2436
2431
  if (chunk.intro.length > 0) {
2437
- lineIndex = chunk.intro.lastIndexOf(n$1);
2432
+ lineIndex = chunk.intro.lastIndexOf(n);
2438
2433
  if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;
2439
2434
  lineStr = chunk.intro + lineStr;
2440
2435
  }
2441
2436
  } while ((chunk = chunk.previous));
2442
- lineIndex = this.intro.lastIndexOf(n$1);
2437
+ lineIndex = this.intro.lastIndexOf(n);
2443
2438
  if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;
2444
2439
  return this.intro + lineStr;
2445
2440
  }
@@ -2740,7 +2735,7 @@ let MagicString$1 = class MagicString {
2740
2735
 
2741
2736
  return this._replaceRegexp(searchValue, replacement);
2742
2737
  }
2743
- };
2738
+ }
2744
2739
 
2745
2740
  const hasOwnProp = Object.prototype.hasOwnProperty;
2746
2741
 
@@ -2754,7 +2749,7 @@ let Bundle$1 = class Bundle {
2754
2749
  }
2755
2750
 
2756
2751
  addSource(source) {
2757
- if (source instanceof MagicString$1) {
2752
+ if (source instanceof MagicString) {
2758
2753
  return this.addSource({
2759
2754
  content: source,
2760
2755
  filename: source.filename,
@@ -2795,7 +2790,7 @@ let Bundle$1 = class Bundle {
2795
2790
 
2796
2791
  append(str, options) {
2797
2792
  this.addSource({
2798
- content: new MagicString$1(str),
2793
+ content: new MagicString(str),
2799
2794
  separator: (options && options.separator) || '',
2800
2795
  });
2801
2796
 
@@ -2828,7 +2823,7 @@ let Bundle$1 = class Bundle {
2828
2823
  });
2829
2824
  });
2830
2825
 
2831
- const mappings = new Mappings$1(options.hires);
2826
+ const mappings = new Mappings(options.hires);
2832
2827
 
2833
2828
  if (this.intro) {
2834
2829
  mappings.advance(this.intro);
@@ -2891,7 +2886,7 @@ let Bundle$1 = class Bundle {
2891
2886
  return {
2892
2887
  file: options.file ? options.file.split(/[/\\]/).pop() : undefined,
2893
2888
  sources: this.uniqueSources.map((source) => {
2894
- return options.file ? getRelativePath$1(options.file, source.filename) : source.filename;
2889
+ return options.file ? getRelativePath(options.file, source.filename) : source.filename;
2895
2890
  }),
2896
2891
  sourcesContent: this.uniqueSources.map((source) => {
2897
2892
  return options.includeContent ? source.content : null;
@@ -2903,7 +2898,7 @@ let Bundle$1 = class Bundle {
2903
2898
  }
2904
2899
 
2905
2900
  generateMap(options) {
2906
- return new SourceMap$1(this.generateDecodedMap(options));
2901
+ return new SourceMap(this.generateDecodedMap(options));
2907
2902
  }
2908
2903
 
2909
2904
  getIndentString() {
@@ -3473,7 +3468,7 @@ const logLevelPriority = {
3473
3468
  [LOGLEVEL_WARN]: 2
3474
3469
  };
3475
3470
 
3476
- function getLocator$2(source, options) {
3471
+ function getLocator(source, options) {
3477
3472
  if (options === void 0) { options = {}; }
3478
3473
  var offsetLine = options.offsetLine || 0;
3479
3474
  var offsetColumn = options.offsetColumn || 0;
@@ -3511,7 +3506,7 @@ function locate(source, search, options) {
3511
3506
  if (typeof options === 'number') {
3512
3507
  throw new Error('locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument');
3513
3508
  }
3514
- return getLocator$2(source, options)(search, options && options.startIndex);
3509
+ return getLocator(source, options)(search, options && options.startIndex);
3515
3510
  }
3516
3511
 
3517
3512
  function spaces(index) {
@@ -6419,14 +6414,14 @@ class ParameterVariable extends LocalVariable {
6419
6414
  }
6420
6415
  }
6421
6416
 
6422
- const chars$2 = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';
6417
+ const chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$';
6423
6418
  const base = 64;
6424
6419
  function toBase64(value) {
6425
6420
  let outString = '';
6426
6421
  do {
6427
6422
  const currentDigit = value % base;
6428
6423
  value = (value / base) | 0;
6429
- outString = chars$2[currentDigit] + outString;
6424
+ outString = chars[currentDigit] + outString;
6430
6425
  } while (value !== 0);
6431
6426
  return outString;
6432
6427
  }
@@ -13375,7 +13370,7 @@ class Module {
13375
13370
  // By default, `id` is the file name. Custom resolvers and loaders
13376
13371
  // can change that, but it makes sense to use it for the source file name
13377
13372
  const fileName = this.id;
13378
- this.magicString = new MagicString$1(code, {
13373
+ this.magicString = new MagicString(code, {
13379
13374
  filename: (this.excludeFromSourcemap ? null : fileName),
13380
13375
  indentExclusionRanges: []
13381
13376
  });
@@ -14998,7 +14993,7 @@ function getGlobalName(chunk, globals, hasExports, log) {
14998
14993
  return chunk.variableName;
14999
14994
  }
15000
14995
  }
15001
- let Chunk$2 = class Chunk {
14996
+ class Chunk {
15002
14997
  constructor(orderedModules, inputOptions, outputOptions, unsetOptions, pluginDriver, modulesById, chunkByModule, externalChunkByModule, facadeChunkByModule, includedNamespaces, manualChunkAlias, getPlaceholder, bundle, inputBase, snippets) {
15003
14998
  this.orderedModules = orderedModules;
15004
14999
  this.inputOptions = inputOptions;
@@ -15821,7 +15816,7 @@ let Chunk$2 = class Chunk {
15821
15816
  if (namespace.renderFirst())
15822
15817
  hoistedSource += n + rendered;
15823
15818
  else
15824
- magicString.addSource(new MagicString$1(rendered));
15819
+ magicString.addSource(new MagicString(rendered));
15825
15820
  }
15826
15821
  const accessedGlobalVariables = accessedGlobalsByScope.get(module.scope);
15827
15822
  if (accessedGlobalVariables) {
@@ -15980,7 +15975,7 @@ let Chunk$2 = class Chunk {
15980
15975
  }
15981
15976
  }
15982
15977
  }
15983
- };
15978
+ }
15984
15979
  function getChunkNameFromModule(module) {
15985
15980
  return getPredefinedChunkNameFromModule(module) ?? getAliasName(module.id);
15986
15981
  }
@@ -16915,7 +16910,7 @@ function collapseSourcemaps(file, map, modules, bundleSourcemapChain, excludeCon
16915
16910
  file = basename(file);
16916
16911
  }
16917
16912
  sourcesContent = (excludeContent ? null : sourcesContent);
16918
- return new SourceMap$1({ file, mappings, names, sources, sourcesContent });
16913
+ return new SourceMap({ file, mappings, names, sources, sourcesContent });
16919
16914
  }
16920
16915
  function collapseSourcemap(id, originalCode, originalSourcemap, sourcemapChain, log) {
16921
16916
  if (sourcemapChain.length === 0) {
@@ -17258,7 +17253,7 @@ class Bundle {
17258
17253
  ? includedModules.map(module => ({ alias: null, modules: [module] }))
17259
17254
  : getChunkAssignments(this.graph.entryModules, manualChunkAliasByEntry, experimentalMinChunkSize, this.inputOptions.onLog)) {
17260
17255
  sortByExecutionOrder(modules);
17261
- const chunk = new Chunk$2(modules, this.inputOptions, this.outputOptions, this.unsetOptions, this.pluginDriver, this.graph.modulesById, chunkByModule, externalChunkByModule, this.facadeChunkByModule, this.includedNamespaces, alias, getHashPlaceholder, bundle, inputBase, snippets);
17256
+ const chunk = new Chunk(modules, this.inputOptions, this.outputOptions, this.unsetOptions, this.pluginDriver, this.graph.modulesById, chunkByModule, externalChunkByModule, this.facadeChunkByModule, this.includedNamespaces, alias, getHashPlaceholder, bundle, inputBase, snippets);
17262
17257
  chunks.push(chunk);
17263
17258
  }
17264
17259
  for (const chunk of chunks) {
@@ -17579,14 +17574,14 @@ var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
17579
17574
 
17580
17575
  var ref = Object.prototype;
17581
17576
  var hasOwnProperty = ref.hasOwnProperty;
17582
- var toString$2 = ref.toString;
17577
+ var toString = ref.toString;
17583
17578
 
17584
17579
  var hasOwn = Object.hasOwn || (function (obj, propName) { return (
17585
17580
  hasOwnProperty.call(obj, propName)
17586
17581
  ); });
17587
17582
 
17588
17583
  var isArray = Array.isArray || (function (obj) { return (
17589
- toString$2.call(obj) === "[object Array]"
17584
+ toString.call(obj) === "[object Array]"
17590
17585
  ); });
17591
17586
 
17592
17587
  function wordsRegexp(words) {
@@ -23343,14 +23338,14 @@ async function transform(source, module, pluginDriver, log) {
23343
23338
  getCombinedSourcemap() {
23344
23339
  const combinedMap = collapseSourcemap(id, originalCode, originalSourcemap, sourcemapChain, log);
23345
23340
  if (!combinedMap) {
23346
- const magicString = new MagicString$1(originalCode);
23341
+ const magicString = new MagicString(originalCode);
23347
23342
  return magicString.generateMap({ hires: true, includeContent: true, source: id });
23348
23343
  }
23349
23344
  if (originalSourcemap !== combinedMap) {
23350
23345
  originalSourcemap = combinedMap;
23351
23346
  sourcemapChain.length = 0;
23352
23347
  }
23353
- return new SourceMap$1({
23348
+ return new SourceMap({
23354
23349
  ...combinedMap,
23355
23350
  file: null,
23356
23351
  sourcesContent: combinedMap.sourcesContent
@@ -25811,1730 +25806,64 @@ createColors({
25811
25806
  useColor: env$1.FORCE_COLOR !== '0' && !env$1.NO_COLOR
25812
25807
  });
25813
25808
 
25814
- // @ts-check
25815
- /** @typedef { import('estree').BaseNode} BaseNode */
25816
-
25817
- /** @typedef {{
25818
- skip: () => void;
25819
- remove: () => void;
25820
- replace: (node: BaseNode) => void;
25821
- }} WalkerContext */
25822
-
25823
- class WalkerBase {
25824
- constructor() {
25825
- /** @type {boolean} */
25826
- this.should_skip = false;
25827
-
25828
- /** @type {boolean} */
25829
- this.should_remove = false;
25830
-
25831
- /** @type {BaseNode | null} */
25832
- this.replacement = null;
25833
-
25834
- /** @type {WalkerContext} */
25835
- this.context = {
25836
- skip: () => (this.should_skip = true),
25837
- remove: () => (this.should_remove = true),
25838
- replace: (node) => (this.replacement = node)
25839
- };
25840
- }
25841
-
25842
- /**
25843
- *
25844
- * @param {any} parent
25845
- * @param {string} prop
25846
- * @param {number} index
25847
- * @param {BaseNode} node
25848
- */
25849
- replace(parent, prop, index, node) {
25850
- if (parent) {
25851
- if (index !== null) {
25852
- parent[prop][index] = node;
25853
- } else {
25854
- parent[prop] = node;
25855
- }
25856
- }
25857
- }
25858
-
25859
- /**
25860
- *
25861
- * @param {any} parent
25862
- * @param {string} prop
25863
- * @param {number} index
25864
- */
25865
- remove(parent, prop, index) {
25866
- if (parent) {
25867
- if (index !== null) {
25868
- parent[prop].splice(index, 1);
25869
- } else {
25870
- delete parent[prop];
25871
- }
25872
- }
25873
- }
25809
+ function extractCommandResources(command) {
25810
+ if (Array.isArray(command)) {
25811
+ return command.flatMap(extractCommandResources);
25812
+ }
25813
+ if (command.icon != null) {
25814
+ if (typeof command.icon === 'object') {
25815
+ return [{ path: command.icon.light, sync: false }, { path: command.icon.dark, sync: false }];
25816
+ }
25817
+ else {
25818
+ return [{ path: command.icon, sync: false }];
25819
+ }
25820
+ }
25821
+ return [];
25874
25822
  }
25875
-
25876
- // @ts-check
25877
-
25878
- /** @typedef { import('estree').BaseNode} BaseNode */
25879
- /** @typedef { import('./walker.js').WalkerContext} WalkerContext */
25880
-
25881
- /** @typedef {(
25882
- * this: WalkerContext,
25883
- * node: BaseNode,
25884
- * parent: BaseNode,
25885
- * key: string,
25886
- * index: number
25887
- * ) => void} SyncHandler */
25888
-
25889
- class SyncWalker extends WalkerBase {
25890
- /**
25891
- *
25892
- * @param {SyncHandler} enter
25893
- * @param {SyncHandler} leave
25894
- */
25895
- constructor(enter, leave) {
25896
- super();
25897
-
25898
- /** @type {SyncHandler} */
25899
- this.enter = enter;
25900
-
25901
- /** @type {SyncHandler} */
25902
- this.leave = leave;
25903
- }
25904
-
25905
- /**
25906
- *
25907
- * @param {BaseNode} node
25908
- * @param {BaseNode} parent
25909
- * @param {string} [prop]
25910
- * @param {number} [index]
25911
- * @returns {BaseNode}
25912
- */
25913
- visit(node, parent, prop, index) {
25914
- if (node) {
25915
- if (this.enter) {
25916
- const _should_skip = this.should_skip;
25917
- const _should_remove = this.should_remove;
25918
- const _replacement = this.replacement;
25919
- this.should_skip = false;
25920
- this.should_remove = false;
25921
- this.replacement = null;
25922
-
25923
- this.enter.call(this.context, node, parent, prop, index);
25924
-
25925
- if (this.replacement) {
25926
- node = this.replacement;
25927
- this.replace(parent, prop, index, node);
25928
- }
25929
-
25930
- if (this.should_remove) {
25931
- this.remove(parent, prop, index);
25932
- }
25933
-
25934
- const skipped = this.should_skip;
25935
- const removed = this.should_remove;
25936
-
25937
- this.should_skip = _should_skip;
25938
- this.should_remove = _should_remove;
25939
- this.replacement = _replacement;
25940
-
25941
- if (skipped) return node;
25942
- if (removed) return null;
25943
- }
25944
-
25945
- for (const key in node) {
25946
- const value = node[key];
25947
-
25948
- if (typeof value !== "object") {
25949
- continue;
25950
- } else if (Array.isArray(value)) {
25951
- for (let i = 0; i < value.length; i += 1) {
25952
- if (value[i] !== null && typeof value[i].type === 'string') {
25953
- if (!this.visit(value[i], node, key, i)) {
25954
- // removed
25955
- i--;
25956
- }
25957
- }
25958
- }
25959
- } else if (value !== null && typeof value.type === "string") {
25960
- this.visit(value, node, key, null);
25961
- }
25962
- }
25963
-
25964
- if (this.leave) {
25965
- const _replacement = this.replacement;
25966
- const _should_remove = this.should_remove;
25967
- this.replacement = null;
25968
- this.should_remove = false;
25969
-
25970
- this.leave.call(this.context, node, parent, prop, index);
25971
-
25972
- if (this.replacement) {
25973
- node = this.replacement;
25974
- this.replace(parent, prop, index, node);
25975
- }
25976
-
25977
- if (this.should_remove) {
25978
- this.remove(parent, prop, index);
25979
- }
25980
-
25981
- const removed = this.should_remove;
25982
-
25983
- this.replacement = _replacement;
25984
- this.should_remove = _should_remove;
25985
-
25986
- if (removed) return null;
25987
- }
25988
- }
25989
-
25990
- return node;
25991
- }
25823
+ function extractGrammarResources(grammar) {
25824
+ return [{ path: grammar.path, sync: false }];
25992
25825
  }
25993
-
25994
- // @ts-check
25995
-
25996
- /** @typedef { import('estree').BaseNode} BaseNode */
25997
- /** @typedef { import('./sync.js').SyncHandler} SyncHandler */
25998
- /** @typedef { import('./async.js').AsyncHandler} AsyncHandler */
25999
-
26000
- /**
26001
- *
26002
- * @param {BaseNode} ast
26003
- * @param {{
26004
- * enter?: SyncHandler
26005
- * leave?: SyncHandler
26006
- * }} walker
26007
- * @returns {BaseNode}
26008
- */
26009
- function walk(ast, { enter, leave }) {
26010
- const instance = new SyncWalker(enter, leave);
26011
- return instance.visit(ast, null);
25826
+ function extractLanguageResources(language) {
25827
+ const paths = [];
25828
+ if (language.icon != null) {
25829
+ paths.push({ path: language.icon.dark, sync: true }, { path: language.icon.light, sync: true });
25830
+ }
25831
+ if (language.configuration != null) {
25832
+ paths.push({ path: language.configuration, sync: true });
25833
+ }
25834
+ return paths;
26012
25835
  }
26013
-
26014
- const comma = ','.charCodeAt(0);
26015
- const semicolon = ';'.charCodeAt(0);
26016
- const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
26017
- const intToChar = new Uint8Array(64); // 64 possible chars.
26018
- const charToInt = new Uint8Array(128); // z is 122 in ASCII
26019
- for (let i = 0; i < chars.length; i++) {
26020
- const c = chars.charCodeAt(i);
26021
- intToChar[i] = c;
26022
- charToInt[c] = i;
25836
+ function extractSnippetsResources(snippet) {
25837
+ return [{ path: snippet.path, sync: false }];
26023
25838
  }
26024
- // Provide a fallback for older environments.
26025
- const td = typeof TextDecoder !== 'undefined'
26026
- ? /* #__PURE__ */ new TextDecoder()
26027
- : typeof Buffer !== 'undefined'
26028
- ? {
26029
- decode(buf) {
26030
- const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
26031
- return out.toString();
26032
- },
26033
- }
26034
- : {
26035
- decode(buf) {
26036
- let out = '';
26037
- for (let i = 0; i < buf.length; i++) {
26038
- out += String.fromCharCode(buf[i]);
26039
- }
26040
- return out;
26041
- },
26042
- };
26043
- function encode(decoded) {
26044
- const state = new Int32Array(5);
26045
- const bufLength = 1024 * 16;
26046
- const subLength = bufLength - 36;
26047
- const buf = new Uint8Array(bufLength);
26048
- const sub = buf.subarray(0, subLength);
26049
- let pos = 0;
26050
- let out = '';
26051
- for (let i = 0; i < decoded.length; i++) {
26052
- const line = decoded[i];
26053
- if (i > 0) {
26054
- if (pos === bufLength) {
26055
- out += td.decode(buf);
26056
- pos = 0;
25839
+ async function extractThemeResources(theme, getFileContent) {
25840
+ const themeContent = await getFileContent(theme.path);
25841
+ const themeDocument = parseJson(theme.path, themeContent.toString('utf8'));
25842
+ const paths = [{ path: theme.path, sync: false }];
25843
+ if (themeDocument.fonts != null) {
25844
+ for (const font of themeDocument.fonts) {
25845
+ for (const src of font.src) {
25846
+ paths.push({ path: path.join(path.dirname(theme.path), src.path), sync: true });
26057
25847
  }
26058
- buf[pos++] = semicolon;
26059
25848
  }
26060
- if (line.length === 0)
26061
- continue;
26062
- state[0] = 0;
26063
- for (let j = 0; j < line.length; j++) {
26064
- const segment = line[j];
26065
- // We can push up to 5 ints, each int can take at most 7 chars, and we
26066
- // may push a comma.
26067
- if (pos > subLength) {
26068
- out += td.decode(sub);
26069
- buf.copyWithin(0, subLength, pos);
26070
- pos -= subLength;
25849
+ }
25850
+ if (themeDocument.iconDefinitions != null) {
25851
+ for (const iconDefinition of Object.values(themeDocument.iconDefinitions)) {
25852
+ if (iconDefinition.iconPath != null) {
25853
+ paths.push({ path: path.join(path.dirname(theme.path), iconDefinition.iconPath), sync: true });
26071
25854
  }
26072
- if (j > 0)
26073
- buf[pos++] = comma;
26074
- pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
26075
- if (segment.length === 1)
26076
- continue;
26077
- pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
26078
- pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
26079
- pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
26080
- if (segment.length === 4)
26081
- continue;
26082
- pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
26083
25855
  }
26084
25856
  }
26085
- return out + td.decode(buf.subarray(0, pos));
25857
+ return paths;
26086
25858
  }
26087
- function encodeInteger(buf, pos, state, segment, j) {
26088
- const next = segment[j];
26089
- let num = next - state[j];
26090
- state[j] = next;
26091
- num = num < 0 ? (-num << 1) | 1 : num << 1;
26092
- do {
26093
- let clamped = num & 0b011111;
26094
- num >>>= 5;
26095
- if (num > 0)
26096
- clamped |= 0b100000;
26097
- buf[pos++] = intToChar[clamped];
26098
- } while (num > 0);
26099
- return pos;
26100
- }
26101
-
26102
- class BitSet {
26103
- constructor(arg) {
26104
- this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
26105
- }
26106
-
26107
- add(n) {
26108
- this.bits[n >> 5] |= 1 << (n & 31);
26109
- }
26110
-
26111
- has(n) {
26112
- return !!(this.bits[n >> 5] & (1 << (n & 31)));
26113
- }
26114
- }
26115
-
26116
- class Chunk {
26117
- constructor(start, end, content) {
26118
- this.start = start;
26119
- this.end = end;
26120
- this.original = content;
26121
-
26122
- this.intro = '';
26123
- this.outro = '';
26124
-
26125
- this.content = content;
26126
- this.storeName = false;
26127
- this.edited = false;
26128
-
26129
- {
26130
- this.previous = null;
26131
- this.next = null;
26132
- }
26133
- }
26134
-
26135
- appendLeft(content) {
26136
- this.outro += content;
26137
- }
26138
-
26139
- appendRight(content) {
26140
- this.intro = this.intro + content;
26141
- }
26142
-
26143
- clone() {
26144
- const chunk = new Chunk(this.start, this.end, this.original);
26145
-
26146
- chunk.intro = this.intro;
26147
- chunk.outro = this.outro;
26148
- chunk.content = this.content;
26149
- chunk.storeName = this.storeName;
26150
- chunk.edited = this.edited;
26151
-
26152
- return chunk;
26153
- }
26154
-
26155
- contains(index) {
26156
- return this.start < index && index < this.end;
26157
- }
26158
-
26159
- eachNext(fn) {
26160
- let chunk = this;
26161
- while (chunk) {
26162
- fn(chunk);
26163
- chunk = chunk.next;
26164
- }
26165
- }
26166
-
26167
- eachPrevious(fn) {
26168
- let chunk = this;
26169
- while (chunk) {
26170
- fn(chunk);
26171
- chunk = chunk.previous;
26172
- }
26173
- }
26174
-
26175
- edit(content, storeName, contentOnly) {
26176
- this.content = content;
26177
- if (!contentOnly) {
26178
- this.intro = '';
26179
- this.outro = '';
26180
- }
26181
- this.storeName = storeName;
26182
-
26183
- this.edited = true;
26184
-
26185
- return this;
26186
- }
26187
-
26188
- prependLeft(content) {
26189
- this.outro = content + this.outro;
26190
- }
26191
-
26192
- prependRight(content) {
26193
- this.intro = content + this.intro;
26194
- }
26195
-
26196
- split(index) {
26197
- const sliceIndex = index - this.start;
26198
-
26199
- const originalBefore = this.original.slice(0, sliceIndex);
26200
- const originalAfter = this.original.slice(sliceIndex);
26201
-
26202
- this.original = originalBefore;
26203
-
26204
- const newChunk = new Chunk(index, this.end, originalAfter);
26205
- newChunk.outro = this.outro;
26206
- this.outro = '';
26207
-
26208
- this.end = index;
26209
-
26210
- if (this.edited) {
26211
- // TODO is this block necessary?...
26212
- newChunk.edit('', false);
26213
- this.content = '';
26214
- } else {
26215
- this.content = originalBefore;
26216
- }
26217
-
26218
- newChunk.next = this.next;
26219
- if (newChunk.next) newChunk.next.previous = newChunk;
26220
- newChunk.previous = this;
26221
- this.next = newChunk;
26222
-
26223
- return newChunk;
26224
- }
26225
-
26226
- toString() {
26227
- return this.intro + this.content + this.outro;
26228
- }
26229
-
26230
- trimEnd(rx) {
26231
- this.outro = this.outro.replace(rx, '');
26232
- if (this.outro.length) return true;
26233
-
26234
- const trimmed = this.content.replace(rx, '');
26235
-
26236
- if (trimmed.length) {
26237
- if (trimmed !== this.content) {
26238
- this.split(this.start + trimmed.length).edit('', undefined, true);
26239
- }
26240
- return true;
26241
- } else {
26242
- this.edit('', undefined, true);
26243
-
26244
- this.intro = this.intro.replace(rx, '');
26245
- if (this.intro.length) return true;
26246
- }
26247
- }
26248
-
26249
- trimStart(rx) {
26250
- this.intro = this.intro.replace(rx, '');
26251
- if (this.intro.length) return true;
26252
-
26253
- const trimmed = this.content.replace(rx, '');
26254
-
26255
- if (trimmed.length) {
26256
- if (trimmed !== this.content) {
26257
- this.split(this.end - trimmed.length);
26258
- this.edit('', undefined, true);
26259
- }
26260
- return true;
26261
- } else {
26262
- this.edit('', undefined, true);
26263
-
26264
- this.outro = this.outro.replace(rx, '');
26265
- if (this.outro.length) return true;
26266
- }
26267
- }
26268
- }
26269
-
26270
- function getBtoa () {
26271
- if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
26272
- return (str) => window.btoa(unescape(encodeURIComponent(str)));
26273
- } else if (typeof Buffer === 'function') {
26274
- return (str) => Buffer.from(str, 'utf-8').toString('base64');
26275
- } else {
26276
- return () => {
26277
- throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');
26278
- };
26279
- }
26280
- }
26281
-
26282
- const btoa = /*#__PURE__*/ getBtoa();
26283
-
26284
- class SourceMap {
26285
- constructor(properties) {
26286
- this.version = 3;
26287
- this.file = properties.file;
26288
- this.sources = properties.sources;
26289
- this.sourcesContent = properties.sourcesContent;
26290
- this.names = properties.names;
26291
- this.mappings = encode(properties.mappings);
26292
- }
26293
-
26294
- toString() {
26295
- return JSON.stringify(this);
26296
- }
26297
-
26298
- toUrl() {
26299
- return 'data:application/json;charset=utf-8;base64,' + btoa(this.toString());
26300
- }
26301
- }
26302
-
26303
- function guessIndent(code) {
26304
- const lines = code.split('\n');
26305
-
26306
- const tabbed = lines.filter((line) => /^\t+/.test(line));
26307
- const spaced = lines.filter((line) => /^ {2,}/.test(line));
26308
-
26309
- if (tabbed.length === 0 && spaced.length === 0) {
26310
- return null;
26311
- }
26312
-
26313
- // More lines tabbed than spaced? Assume tabs, and
26314
- // default to tabs in the case of a tie (or nothing
26315
- // to go on)
26316
- if (tabbed.length >= spaced.length) {
26317
- return '\t';
26318
- }
26319
-
26320
- // Otherwise, we need to guess the multiple
26321
- const min = spaced.reduce((previous, current) => {
26322
- const numSpaces = /^ +/.exec(current)[0].length;
26323
- return Math.min(numSpaces, previous);
26324
- }, Infinity);
26325
-
26326
- return new Array(min + 1).join(' ');
26327
- }
26328
-
26329
- function getRelativePath(from, to) {
26330
- const fromParts = from.split(/[/\\]/);
26331
- const toParts = to.split(/[/\\]/);
26332
-
26333
- fromParts.pop(); // get dirname
26334
-
26335
- while (fromParts[0] === toParts[0]) {
26336
- fromParts.shift();
26337
- toParts.shift();
26338
- }
26339
-
26340
- if (fromParts.length) {
26341
- let i = fromParts.length;
26342
- while (i--) fromParts[i] = '..';
26343
- }
26344
-
26345
- return fromParts.concat(toParts).join('/');
26346
- }
26347
-
26348
- const toString = Object.prototype.toString;
26349
-
26350
- function isObject(thing) {
26351
- return toString.call(thing) === '[object Object]';
26352
- }
26353
-
26354
- function getLocator(source) {
26355
- const originalLines = source.split('\n');
26356
- const lineOffsets = [];
26357
-
26358
- for (let i = 0, pos = 0; i < originalLines.length; i++) {
26359
- lineOffsets.push(pos);
26360
- pos += originalLines[i].length + 1;
26361
- }
26362
-
26363
- return function locate(index) {
26364
- let i = 0;
26365
- let j = lineOffsets.length;
26366
- while (i < j) {
26367
- const m = (i + j) >> 1;
26368
- if (index < lineOffsets[m]) {
26369
- j = m;
26370
- } else {
26371
- i = m + 1;
26372
- }
26373
- }
26374
- const line = i - 1;
26375
- const column = index - lineOffsets[line];
26376
- return { line, column };
26377
- };
26378
- }
26379
-
26380
- class Mappings {
26381
- constructor(hires) {
26382
- this.hires = hires;
26383
- this.generatedCodeLine = 0;
26384
- this.generatedCodeColumn = 0;
26385
- this.raw = [];
26386
- this.rawSegments = this.raw[this.generatedCodeLine] = [];
26387
- this.pending = null;
26388
- }
26389
-
26390
- addEdit(sourceIndex, content, loc, nameIndex) {
26391
- if (content.length) {
26392
- const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
26393
- if (nameIndex >= 0) {
26394
- segment.push(nameIndex);
26395
- }
26396
- this.rawSegments.push(segment);
26397
- } else if (this.pending) {
26398
- this.rawSegments.push(this.pending);
26399
- }
26400
-
26401
- this.advance(content);
26402
- this.pending = null;
26403
- }
26404
-
26405
- addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {
26406
- let originalCharIndex = chunk.start;
26407
- let first = true;
26408
-
26409
- while (originalCharIndex < chunk.end) {
26410
- if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
26411
- this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);
26412
- }
26413
-
26414
- if (original[originalCharIndex] === '\n') {
26415
- loc.line += 1;
26416
- loc.column = 0;
26417
- this.generatedCodeLine += 1;
26418
- this.raw[this.generatedCodeLine] = this.rawSegments = [];
26419
- this.generatedCodeColumn = 0;
26420
- first = true;
26421
- } else {
26422
- loc.column += 1;
26423
- this.generatedCodeColumn += 1;
26424
- first = false;
26425
- }
26426
-
26427
- originalCharIndex += 1;
26428
- }
26429
-
26430
- this.pending = null;
26431
- }
26432
-
26433
- advance(str) {
26434
- if (!str) return;
26435
-
26436
- const lines = str.split('\n');
26437
-
26438
- if (lines.length > 1) {
26439
- for (let i = 0; i < lines.length - 1; i++) {
26440
- this.generatedCodeLine++;
26441
- this.raw[this.generatedCodeLine] = this.rawSegments = [];
26442
- }
26443
- this.generatedCodeColumn = 0;
26444
- }
26445
-
26446
- this.generatedCodeColumn += lines[lines.length - 1].length;
26447
- }
26448
- }
26449
-
26450
- const n = '\n';
26451
-
26452
- const warned = {
26453
- insertLeft: false,
26454
- insertRight: false,
26455
- storeName: false,
26456
- };
26457
-
26458
- class MagicString {
26459
- constructor(string, options = {}) {
26460
- const chunk = new Chunk(0, string.length, string);
26461
-
26462
- Object.defineProperties(this, {
26463
- original: { writable: true, value: string },
26464
- outro: { writable: true, value: '' },
26465
- intro: { writable: true, value: '' },
26466
- firstChunk: { writable: true, value: chunk },
26467
- lastChunk: { writable: true, value: chunk },
26468
- lastSearchedChunk: { writable: true, value: chunk },
26469
- byStart: { writable: true, value: {} },
26470
- byEnd: { writable: true, value: {} },
26471
- filename: { writable: true, value: options.filename },
26472
- indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
26473
- sourcemapLocations: { writable: true, value: new BitSet() },
26474
- storedNames: { writable: true, value: {} },
26475
- indentStr: { writable: true, value: undefined },
26476
- });
26477
-
26478
- this.byStart[0] = chunk;
26479
- this.byEnd[string.length] = chunk;
26480
- }
26481
-
26482
- addSourcemapLocation(char) {
26483
- this.sourcemapLocations.add(char);
26484
- }
26485
-
26486
- append(content) {
26487
- if (typeof content !== 'string') throw new TypeError('outro content must be a string');
26488
-
26489
- this.outro += content;
26490
- return this;
26491
- }
26492
-
26493
- appendLeft(index, content) {
26494
- if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
26495
-
26496
- this._split(index);
26497
-
26498
- const chunk = this.byEnd[index];
26499
-
26500
- if (chunk) {
26501
- chunk.appendLeft(content);
26502
- } else {
26503
- this.intro += content;
26504
- }
26505
- return this;
26506
- }
26507
-
26508
- appendRight(index, content) {
26509
- if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
26510
-
26511
- this._split(index);
26512
-
26513
- const chunk = this.byStart[index];
26514
-
26515
- if (chunk) {
26516
- chunk.appendRight(content);
26517
- } else {
26518
- this.outro += content;
26519
- }
26520
- return this;
26521
- }
26522
-
26523
- clone() {
26524
- const cloned = new MagicString(this.original, { filename: this.filename });
26525
-
26526
- let originalChunk = this.firstChunk;
26527
- let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());
26528
-
26529
- while (originalChunk) {
26530
- cloned.byStart[clonedChunk.start] = clonedChunk;
26531
- cloned.byEnd[clonedChunk.end] = clonedChunk;
26532
-
26533
- const nextOriginalChunk = originalChunk.next;
26534
- const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();
26535
-
26536
- if (nextClonedChunk) {
26537
- clonedChunk.next = nextClonedChunk;
26538
- nextClonedChunk.previous = clonedChunk;
26539
-
26540
- clonedChunk = nextClonedChunk;
26541
- }
26542
-
26543
- originalChunk = nextOriginalChunk;
26544
- }
26545
-
26546
- cloned.lastChunk = clonedChunk;
26547
-
26548
- if (this.indentExclusionRanges) {
26549
- cloned.indentExclusionRanges = this.indentExclusionRanges.slice();
26550
- }
26551
-
26552
- cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
26553
-
26554
- cloned.intro = this.intro;
26555
- cloned.outro = this.outro;
26556
-
26557
- return cloned;
26558
- }
26559
-
26560
- generateDecodedMap(options) {
26561
- options = options || {};
26562
-
26563
- const sourceIndex = 0;
26564
- const names = Object.keys(this.storedNames);
26565
- const mappings = new Mappings(options.hires);
26566
-
26567
- const locate = getLocator(this.original);
26568
-
26569
- if (this.intro) {
26570
- mappings.advance(this.intro);
26571
- }
26572
-
26573
- this.firstChunk.eachNext((chunk) => {
26574
- const loc = locate(chunk.start);
26575
-
26576
- if (chunk.intro.length) mappings.advance(chunk.intro);
26577
-
26578
- if (chunk.edited) {
26579
- mappings.addEdit(
26580
- sourceIndex,
26581
- chunk.content,
26582
- loc,
26583
- chunk.storeName ? names.indexOf(chunk.original) : -1
26584
- );
26585
- } else {
26586
- mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);
26587
- }
26588
-
26589
- if (chunk.outro.length) mappings.advance(chunk.outro);
26590
- });
26591
-
26592
- return {
26593
- file: options.file ? options.file.split(/[/\\]/).pop() : null,
26594
- sources: [options.source ? getRelativePath(options.file || '', options.source) : null],
26595
- sourcesContent: options.includeContent ? [this.original] : [null],
26596
- names,
26597
- mappings: mappings.raw,
26598
- };
26599
- }
26600
-
26601
- generateMap(options) {
26602
- return new SourceMap(this.generateDecodedMap(options));
26603
- }
26604
-
26605
- _ensureindentStr() {
26606
- if (this.indentStr === undefined) {
26607
- this.indentStr = guessIndent(this.original);
26608
- }
26609
- }
26610
-
26611
- _getRawIndentString() {
26612
- this._ensureindentStr();
26613
- return this.indentStr;
26614
- }
26615
-
26616
- getIndentString() {
26617
- this._ensureindentStr();
26618
- return this.indentStr === null ? '\t' : this.indentStr;
26619
- }
26620
-
26621
- indent(indentStr, options) {
26622
- const pattern = /^[^\r\n]/gm;
26623
-
26624
- if (isObject(indentStr)) {
26625
- options = indentStr;
26626
- indentStr = undefined;
26627
- }
26628
-
26629
- if (indentStr === undefined) {
26630
- this._ensureindentStr();
26631
- indentStr = this.indentStr || '\t';
26632
- }
26633
-
26634
- if (indentStr === '') return this; // noop
26635
-
26636
- options = options || {};
26637
-
26638
- // Process exclusion ranges
26639
- const isExcluded = {};
26640
-
26641
- if (options.exclude) {
26642
- const exclusions =
26643
- typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;
26644
- exclusions.forEach((exclusion) => {
26645
- for (let i = exclusion[0]; i < exclusion[1]; i += 1) {
26646
- isExcluded[i] = true;
26647
- }
26648
- });
26649
- }
26650
-
26651
- let shouldIndentNextCharacter = options.indentStart !== false;
26652
- const replacer = (match) => {
26653
- if (shouldIndentNextCharacter) return `${indentStr}${match}`;
26654
- shouldIndentNextCharacter = true;
26655
- return match;
26656
- };
26657
-
26658
- this.intro = this.intro.replace(pattern, replacer);
26659
-
26660
- let charIndex = 0;
26661
- let chunk = this.firstChunk;
26662
-
26663
- while (chunk) {
26664
- const end = chunk.end;
26665
-
26666
- if (chunk.edited) {
26667
- if (!isExcluded[charIndex]) {
26668
- chunk.content = chunk.content.replace(pattern, replacer);
26669
-
26670
- if (chunk.content.length) {
26671
- shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n';
26672
- }
26673
- }
26674
- } else {
26675
- charIndex = chunk.start;
26676
-
26677
- while (charIndex < end) {
26678
- if (!isExcluded[charIndex]) {
26679
- const char = this.original[charIndex];
26680
-
26681
- if (char === '\n') {
26682
- shouldIndentNextCharacter = true;
26683
- } else if (char !== '\r' && shouldIndentNextCharacter) {
26684
- shouldIndentNextCharacter = false;
26685
-
26686
- if (charIndex === chunk.start) {
26687
- chunk.prependRight(indentStr);
26688
- } else {
26689
- this._splitChunk(chunk, charIndex);
26690
- chunk = chunk.next;
26691
- chunk.prependRight(indentStr);
26692
- }
26693
- }
26694
- }
26695
-
26696
- charIndex += 1;
26697
- }
26698
- }
26699
-
26700
- charIndex = chunk.end;
26701
- chunk = chunk.next;
26702
- }
26703
-
26704
- this.outro = this.outro.replace(pattern, replacer);
26705
-
26706
- return this;
26707
- }
26708
-
26709
- insert() {
26710
- throw new Error(
26711
- 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)'
26712
- );
26713
- }
26714
-
26715
- insertLeft(index, content) {
26716
- if (!warned.insertLeft) {
26717
- console.warn(
26718
- 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'
26719
- ); // eslint-disable-line no-console
26720
- warned.insertLeft = true;
26721
- }
26722
-
26723
- return this.appendLeft(index, content);
26724
- }
26725
-
26726
- insertRight(index, content) {
26727
- if (!warned.insertRight) {
26728
- console.warn(
26729
- 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'
26730
- ); // eslint-disable-line no-console
26731
- warned.insertRight = true;
26732
- }
26733
-
26734
- return this.prependRight(index, content);
26735
- }
26736
-
26737
- move(start, end, index) {
26738
- if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');
26739
-
26740
- this._split(start);
26741
- this._split(end);
26742
- this._split(index);
26743
-
26744
- const first = this.byStart[start];
26745
- const last = this.byEnd[end];
26746
-
26747
- const oldLeft = first.previous;
26748
- const oldRight = last.next;
26749
-
26750
- const newRight = this.byStart[index];
26751
- if (!newRight && last === this.lastChunk) return this;
26752
- const newLeft = newRight ? newRight.previous : this.lastChunk;
26753
-
26754
- if (oldLeft) oldLeft.next = oldRight;
26755
- if (oldRight) oldRight.previous = oldLeft;
26756
-
26757
- if (newLeft) newLeft.next = first;
26758
- if (newRight) newRight.previous = last;
26759
-
26760
- if (!first.previous) this.firstChunk = last.next;
26761
- if (!last.next) {
26762
- this.lastChunk = first.previous;
26763
- this.lastChunk.next = null;
26764
- }
26765
-
26766
- first.previous = newLeft;
26767
- last.next = newRight || null;
26768
-
26769
- if (!newLeft) this.firstChunk = first;
26770
- if (!newRight) this.lastChunk = last;
26771
- return this;
26772
- }
26773
-
26774
- overwrite(start, end, content, options) {
26775
- options = options || {};
26776
- return this.update(start, end, content, { ...options, overwrite: !options.contentOnly });
26777
- }
26778
-
26779
- update(start, end, content, options) {
26780
- if (typeof content !== 'string') throw new TypeError('replacement content must be a string');
26781
-
26782
- while (start < 0) start += this.original.length;
26783
- while (end < 0) end += this.original.length;
26784
-
26785
- if (end > this.original.length) throw new Error('end is out of bounds');
26786
- if (start === end)
26787
- throw new Error(
26788
- 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead'
26789
- );
26790
-
26791
- this._split(start);
26792
- this._split(end);
26793
-
26794
- if (options === true) {
26795
- if (!warned.storeName) {
26796
- console.warn(
26797
- 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'
26798
- ); // eslint-disable-line no-console
26799
- warned.storeName = true;
26800
- }
26801
-
26802
- options = { storeName: true };
26803
- }
26804
- const storeName = options !== undefined ? options.storeName : false;
26805
- const overwrite = options !== undefined ? options.overwrite : false;
26806
-
26807
- if (storeName) {
26808
- const original = this.original.slice(start, end);
26809
- Object.defineProperty(this.storedNames, original, {
26810
- writable: true,
26811
- value: true,
26812
- enumerable: true,
26813
- });
26814
- }
26815
-
26816
- const first = this.byStart[start];
26817
- const last = this.byEnd[end];
26818
-
26819
- if (first) {
26820
- let chunk = first;
26821
- while (chunk !== last) {
26822
- if (chunk.next !== this.byStart[chunk.end]) {
26823
- throw new Error('Cannot overwrite across a split point');
26824
- }
26825
- chunk = chunk.next;
26826
- chunk.edit('', false);
26827
- }
26828
-
26829
- first.edit(content, storeName, !overwrite);
26830
- } else {
26831
- // must be inserting at the end
26832
- const newChunk = new Chunk(start, end, '').edit(content, storeName);
26833
-
26834
- // TODO last chunk in the array may not be the last chunk, if it's moved...
26835
- last.next = newChunk;
26836
- newChunk.previous = last;
26837
- }
26838
- return this;
26839
- }
26840
-
26841
- prepend(content) {
26842
- if (typeof content !== 'string') throw new TypeError('outro content must be a string');
26843
-
26844
- this.intro = content + this.intro;
26845
- return this;
26846
- }
26847
-
26848
- prependLeft(index, content) {
26849
- if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
26850
-
26851
- this._split(index);
26852
-
26853
- const chunk = this.byEnd[index];
26854
-
26855
- if (chunk) {
26856
- chunk.prependLeft(content);
26857
- } else {
26858
- this.intro = content + this.intro;
26859
- }
26860
- return this;
26861
- }
26862
-
26863
- prependRight(index, content) {
26864
- if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
26865
-
26866
- this._split(index);
26867
-
26868
- const chunk = this.byStart[index];
26869
-
26870
- if (chunk) {
26871
- chunk.prependRight(content);
26872
- } else {
26873
- this.outro = content + this.outro;
26874
- }
26875
- return this;
26876
- }
26877
-
26878
- remove(start, end) {
26879
- while (start < 0) start += this.original.length;
26880
- while (end < 0) end += this.original.length;
26881
-
26882
- if (start === end) return this;
26883
-
26884
- if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');
26885
- if (start > end) throw new Error('end must be greater than start');
26886
-
26887
- this._split(start);
26888
- this._split(end);
26889
-
26890
- let chunk = this.byStart[start];
26891
-
26892
- while (chunk) {
26893
- chunk.intro = '';
26894
- chunk.outro = '';
26895
- chunk.edit('');
26896
-
26897
- chunk = end > chunk.end ? this.byStart[chunk.end] : null;
26898
- }
26899
- return this;
26900
- }
26901
-
26902
- lastChar() {
26903
- if (this.outro.length) return this.outro[this.outro.length - 1];
26904
- let chunk = this.lastChunk;
26905
- do {
26906
- if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];
26907
- if (chunk.content.length) return chunk.content[chunk.content.length - 1];
26908
- if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];
26909
- } while ((chunk = chunk.previous));
26910
- if (this.intro.length) return this.intro[this.intro.length - 1];
26911
- return '';
26912
- }
26913
-
26914
- lastLine() {
26915
- let lineIndex = this.outro.lastIndexOf(n);
26916
- if (lineIndex !== -1) return this.outro.substr(lineIndex + 1);
26917
- let lineStr = this.outro;
26918
- let chunk = this.lastChunk;
26919
- do {
26920
- if (chunk.outro.length > 0) {
26921
- lineIndex = chunk.outro.lastIndexOf(n);
26922
- if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;
26923
- lineStr = chunk.outro + lineStr;
26924
- }
26925
-
26926
- if (chunk.content.length > 0) {
26927
- lineIndex = chunk.content.lastIndexOf(n);
26928
- if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;
26929
- lineStr = chunk.content + lineStr;
26930
- }
26931
-
26932
- if (chunk.intro.length > 0) {
26933
- lineIndex = chunk.intro.lastIndexOf(n);
26934
- if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;
26935
- lineStr = chunk.intro + lineStr;
26936
- }
26937
- } while ((chunk = chunk.previous));
26938
- lineIndex = this.intro.lastIndexOf(n);
26939
- if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;
26940
- return this.intro + lineStr;
26941
- }
26942
-
26943
- slice(start = 0, end = this.original.length) {
26944
- while (start < 0) start += this.original.length;
26945
- while (end < 0) end += this.original.length;
26946
-
26947
- let result = '';
26948
-
26949
- // find start chunk
26950
- let chunk = this.firstChunk;
26951
- while (chunk && (chunk.start > start || chunk.end <= start)) {
26952
- // found end chunk before start
26953
- if (chunk.start < end && chunk.end >= end) {
26954
- return result;
26955
- }
26956
-
26957
- chunk = chunk.next;
26958
- }
26959
-
26960
- if (chunk && chunk.edited && chunk.start !== start)
26961
- throw new Error(`Cannot use replaced character ${start} as slice start anchor.`);
26962
-
26963
- const startChunk = chunk;
26964
- while (chunk) {
26965
- if (chunk.intro && (startChunk !== chunk || chunk.start === start)) {
26966
- result += chunk.intro;
26967
- }
26968
-
26969
- const containsEnd = chunk.start < end && chunk.end >= end;
26970
- if (containsEnd && chunk.edited && chunk.end !== end)
26971
- throw new Error(`Cannot use replaced character ${end} as slice end anchor.`);
26972
-
26973
- const sliceStart = startChunk === chunk ? start - chunk.start : 0;
26974
- const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
26975
-
26976
- result += chunk.content.slice(sliceStart, sliceEnd);
26977
-
26978
- if (chunk.outro && (!containsEnd || chunk.end === end)) {
26979
- result += chunk.outro;
26980
- }
26981
-
26982
- if (containsEnd) {
26983
- break;
26984
- }
26985
-
26986
- chunk = chunk.next;
26987
- }
26988
-
26989
- return result;
26990
- }
26991
-
26992
- // TODO deprecate this? not really very useful
26993
- snip(start, end) {
26994
- const clone = this.clone();
26995
- clone.remove(0, start);
26996
- clone.remove(end, clone.original.length);
26997
-
26998
- return clone;
26999
- }
27000
-
27001
- _split(index) {
27002
- if (this.byStart[index] || this.byEnd[index]) return;
27003
-
27004
- let chunk = this.lastSearchedChunk;
27005
- const searchForward = index > chunk.end;
27006
-
27007
- while (chunk) {
27008
- if (chunk.contains(index)) return this._splitChunk(chunk, index);
27009
-
27010
- chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
27011
- }
27012
- }
27013
-
27014
- _splitChunk(chunk, index) {
27015
- if (chunk.edited && chunk.content.length) {
27016
- // zero-length edited chunks are a special case (overlapping replacements)
27017
- const loc = getLocator(this.original)(index);
27018
- throw new Error(
27019
- `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`
27020
- );
27021
- }
27022
-
27023
- const newChunk = chunk.split(index);
27024
-
27025
- this.byEnd[index] = chunk;
27026
- this.byStart[index] = newChunk;
27027
- this.byEnd[newChunk.end] = newChunk;
27028
-
27029
- if (chunk === this.lastChunk) this.lastChunk = newChunk;
27030
-
27031
- this.lastSearchedChunk = chunk;
27032
- return true;
27033
- }
27034
-
27035
- toString() {
27036
- let str = this.intro;
27037
-
27038
- let chunk = this.firstChunk;
27039
- while (chunk) {
27040
- str += chunk.toString();
27041
- chunk = chunk.next;
27042
- }
27043
-
27044
- return str + this.outro;
27045
- }
27046
-
27047
- isEmpty() {
27048
- let chunk = this.firstChunk;
27049
- do {
27050
- if (
27051
- (chunk.intro.length && chunk.intro.trim()) ||
27052
- (chunk.content.length && chunk.content.trim()) ||
27053
- (chunk.outro.length && chunk.outro.trim())
27054
- )
27055
- return false;
27056
- } while ((chunk = chunk.next));
27057
- return true;
27058
- }
27059
-
27060
- length() {
27061
- let chunk = this.firstChunk;
27062
- let length = 0;
27063
- do {
27064
- length += chunk.intro.length + chunk.content.length + chunk.outro.length;
27065
- } while ((chunk = chunk.next));
27066
- return length;
27067
- }
27068
-
27069
- trimLines() {
27070
- return this.trim('[\\r\\n]');
27071
- }
27072
-
27073
- trim(charType) {
27074
- return this.trimStart(charType).trimEnd(charType);
27075
- }
27076
-
27077
- trimEndAborted(charType) {
27078
- const rx = new RegExp((charType || '\\s') + '+$');
27079
-
27080
- this.outro = this.outro.replace(rx, '');
27081
- if (this.outro.length) return true;
27082
-
27083
- let chunk = this.lastChunk;
27084
-
27085
- do {
27086
- const end = chunk.end;
27087
- const aborted = chunk.trimEnd(rx);
27088
-
27089
- // if chunk was trimmed, we have a new lastChunk
27090
- if (chunk.end !== end) {
27091
- if (this.lastChunk === chunk) {
27092
- this.lastChunk = chunk.next;
27093
- }
27094
-
27095
- this.byEnd[chunk.end] = chunk;
27096
- this.byStart[chunk.next.start] = chunk.next;
27097
- this.byEnd[chunk.next.end] = chunk.next;
27098
- }
27099
-
27100
- if (aborted) return true;
27101
- chunk = chunk.previous;
27102
- } while (chunk);
27103
-
27104
- return false;
27105
- }
27106
-
27107
- trimEnd(charType) {
27108
- this.trimEndAborted(charType);
27109
- return this;
27110
- }
27111
- trimStartAborted(charType) {
27112
- const rx = new RegExp('^' + (charType || '\\s') + '+');
27113
-
27114
- this.intro = this.intro.replace(rx, '');
27115
- if (this.intro.length) return true;
27116
-
27117
- let chunk = this.firstChunk;
27118
-
27119
- do {
27120
- const end = chunk.end;
27121
- const aborted = chunk.trimStart(rx);
27122
-
27123
- if (chunk.end !== end) {
27124
- // special case...
27125
- if (chunk === this.lastChunk) this.lastChunk = chunk.next;
27126
-
27127
- this.byEnd[chunk.end] = chunk;
27128
- this.byStart[chunk.next.start] = chunk.next;
27129
- this.byEnd[chunk.next.end] = chunk.next;
27130
- }
27131
-
27132
- if (aborted) return true;
27133
- chunk = chunk.next;
27134
- } while (chunk);
27135
-
27136
- return false;
27137
- }
27138
-
27139
- trimStart(charType) {
27140
- this.trimStartAborted(charType);
27141
- return this;
27142
- }
27143
-
27144
- hasChanged() {
27145
- return this.original !== this.toString();
27146
- }
27147
-
27148
- _replaceRegexp(searchValue, replacement) {
27149
- function getReplacement(match, str) {
27150
- if (typeof replacement === 'string') {
27151
- return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => {
27152
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter
27153
- if (i === '$') return '$';
27154
- if (i === '&') return match[0];
27155
- const num = +i;
27156
- if (num < match.length) return match[+i];
27157
- return `$${i}`;
27158
- });
27159
- } else {
27160
- return replacement(...match, match.index, str, match.groups);
27161
- }
27162
- }
27163
- function matchAll(re, str) {
27164
- let match;
27165
- const matches = [];
27166
- while ((match = re.exec(str))) {
27167
- matches.push(match);
27168
- }
27169
- return matches;
27170
- }
27171
- if (searchValue.global) {
27172
- const matches = matchAll(searchValue, this.original);
27173
- matches.forEach((match) => {
27174
- if (match.index != null)
27175
- this.overwrite(
27176
- match.index,
27177
- match.index + match[0].length,
27178
- getReplacement(match, this.original)
27179
- );
27180
- });
27181
- } else {
27182
- const match = this.original.match(searchValue);
27183
- if (match && match.index != null)
27184
- this.overwrite(
27185
- match.index,
27186
- match.index + match[0].length,
27187
- getReplacement(match, this.original)
27188
- );
27189
- }
27190
- return this;
27191
- }
27192
-
27193
- _replaceString(string, replacement) {
27194
- const { original } = this;
27195
- const index = original.indexOf(string);
27196
-
27197
- if (index !== -1) {
27198
- this.overwrite(index, index + string.length, replacement);
27199
- }
27200
-
27201
- return this;
27202
- }
27203
-
27204
- replace(searchValue, replacement) {
27205
- if (typeof searchValue === 'string') {
27206
- return this._replaceString(searchValue, replacement);
27207
- }
27208
-
27209
- return this._replaceRegexp(searchValue, replacement);
27210
- }
27211
-
27212
- _replaceAllString(string, replacement) {
27213
- const { original } = this;
27214
- const stringLength = string.length;
27215
- for (
27216
- let index = original.indexOf(string);
27217
- index !== -1;
27218
- index = original.indexOf(string, index + stringLength)
27219
- ) {
27220
- this.overwrite(index, index + stringLength, replacement);
27221
- }
27222
-
27223
- return this;
27224
- }
27225
-
27226
- replaceAll(searchValue, replacement) {
27227
- if (typeof searchValue === 'string') {
27228
- return this._replaceAllString(searchValue, replacement);
27229
- }
27230
-
27231
- if (!searchValue.global) {
27232
- throw new TypeError(
27233
- 'MagicString.prototype.replaceAll called with a non-global RegExp argument'
27234
- );
27235
- }
27236
-
27237
- return this._replaceRegexp(searchValue, replacement);
27238
- }
27239
- }
27240
-
27241
- var escape = function (str) { return str.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&'); };
27242
-
27243
- var isReference = function (node, parent) {
27244
- if (node.type === 'MemberExpression') {
27245
- return !node.computed && isReference(node.object, node);
27246
- }
27247
-
27248
- if (node.type === 'Identifier') {
27249
- // TODO is this right?
27250
- if (parent.type === 'MemberExpression') { return parent.computed || node === parent.object; }
27251
-
27252
- // disregard the `bar` in { bar: foo }
27253
- if (parent.type === 'Property' && node !== parent.value) { return false; }
27254
-
27255
- // disregard the `bar` in `class Foo { bar () {...} }`
27256
- if (parent.type === 'MethodDefinition') { return false; }
27257
-
27258
- // disregard the `bar` in `export { foo as bar }`
27259
- if (parent.type === 'ExportSpecifier' && node !== parent.local) { return false; }
27260
-
27261
- // disregard the `bar` in `import { bar as foo }`
27262
- if (parent.type === 'ImportSpecifier' && node === parent.imported) {
27263
- return false;
27264
- }
27265
-
27266
- return true;
27267
- }
27268
-
27269
- return false;
27270
- };
27271
-
27272
- var flatten = function (startNode) {
27273
- var parts = [];
27274
- var node = startNode;
27275
-
27276
- while (node.type === 'MemberExpression') {
27277
- parts.unshift(node.property.name);
27278
- node = node.object;
27279
- }
27280
-
27281
- var name = node.name;
27282
- parts.unshift(name);
27283
-
27284
- return { name: name, keypath: parts.join('.') };
27285
- };
27286
-
27287
- function inject(options) {
27288
- if (!options) { throw new Error('Missing options'); }
27289
-
27290
- var filter = createFilter(options.include, options.exclude);
27291
-
27292
- var modules = options.modules;
27293
-
27294
- if (!modules) {
27295
- modules = Object.assign({}, options);
27296
- delete modules.include;
27297
- delete modules.exclude;
27298
- delete modules.sourceMap;
27299
- delete modules.sourcemap;
27300
- }
27301
-
27302
- var modulesMap = new Map(Object.entries(modules));
27303
-
27304
- // Fix paths on Windows
27305
- if (sep !== '/') {
27306
- modulesMap.forEach(function (mod, key) {
27307
- modulesMap.set(
27308
- key,
27309
- Array.isArray(mod) ? [mod[0].split(sep).join('/'), mod[1]] : mod.split(sep).join('/')
27310
- );
27311
- });
27312
- }
27313
-
27314
- var firstpass = new RegExp(("(?:" + (Array.from(modulesMap.keys()).map(escape).join('|')) + ")"), 'g');
27315
- var sourceMap = options.sourceMap !== false && options.sourcemap !== false;
27316
-
27317
- return {
27318
- name: 'inject',
27319
-
27320
- transform: function transform(code, id) {
27321
- if (!filter(id)) { return null; }
27322
- if (code.search(firstpass) === -1) { return null; }
27323
-
27324
- if (sep !== '/') { id = id.split(sep).join('/'); } // eslint-disable-line no-param-reassign
27325
-
27326
- var ast = null;
27327
- try {
27328
- ast = this.parse(code);
27329
- } catch (err) {
27330
- this.warn({
27331
- code: 'PARSE_ERROR',
27332
- message: ("rollup-plugin-inject: failed to parse " + id + ". Consider restricting the plugin to particular files via options.include")
27333
- });
27334
- }
27335
- if (!ast) {
27336
- return null;
27337
- }
27338
-
27339
- var imports = new Set();
27340
- ast.body.forEach(function (node) {
27341
- if (node.type === 'ImportDeclaration') {
27342
- node.specifiers.forEach(function (specifier) {
27343
- imports.add(specifier.local.name);
27344
- });
27345
- }
27346
- });
27347
-
27348
- // analyse scopes
27349
- var scope = attachScopes(ast, 'scope');
27350
-
27351
- var magicString = new MagicString(code);
27352
-
27353
- var newImports = new Map();
27354
-
27355
- function handleReference(node, name, keypath) {
27356
- var mod = modulesMap.get(keypath);
27357
- if (mod && !imports.has(name) && !scope.contains(name)) {
27358
- if (typeof mod === 'string') { mod = [mod, 'default']; }
27359
-
27360
- // prevent module from importing itself
27361
- if (mod[0] === id) { return false; }
27362
-
27363
- var hash = keypath + ":" + (mod[0]) + ":" + (mod[1]);
27364
-
27365
- var importLocalName =
27366
- name === keypath ? name : makeLegalIdentifier(("$inject_" + keypath));
27367
-
27368
- if (!newImports.has(hash)) {
27369
- // escape apostrophes and backslashes for use in single-quoted string literal
27370
- var modName = mod[0].replace(/[''\\]/g, '\\$&');
27371
- if (mod[1] === '*') {
27372
- newImports.set(hash, ("import * as " + importLocalName + " from '" + modName + "';"));
27373
- } else {
27374
- newImports.set(hash, ("import { " + (mod[1]) + " as " + importLocalName + " } from '" + modName + "';"));
27375
- }
27376
- }
27377
-
27378
- if (name !== keypath) {
27379
- magicString.overwrite(node.start, node.end, importLocalName, {
27380
- storeName: true
27381
- });
27382
- }
27383
-
27384
- return true;
27385
- }
27386
-
27387
- return false;
27388
- }
27389
-
27390
- walk(ast, {
27391
- enter: function enter(node, parent) {
27392
- if (sourceMap) {
27393
- magicString.addSourcemapLocation(node.start);
27394
- magicString.addSourcemapLocation(node.end);
27395
- }
27396
-
27397
- if (node.scope) {
27398
- scope = node.scope; // eslint-disable-line prefer-destructuring
27399
- }
27400
-
27401
- // special case – shorthand properties. because node.key === node.value,
27402
- // we can't differentiate once we've descended into the node
27403
- if (node.type === 'Property' && node.shorthand && node.value.type === 'Identifier') {
27404
- var ref = node.key;
27405
- var name = ref.name;
27406
- handleReference(node, name, name);
27407
- this.skip();
27408
- return;
27409
- }
27410
-
27411
- if (isReference(node, parent)) {
27412
- var ref$1 = flatten(node);
27413
- var name$1 = ref$1.name;
27414
- var keypath = ref$1.keypath;
27415
- var handled = handleReference(node, name$1, keypath);
27416
- if (handled) {
27417
- this.skip();
27418
- }
27419
- }
27420
- },
27421
- leave: function leave(node) {
27422
- if (node.scope) {
27423
- scope = scope.parent;
27424
- }
27425
- }
27426
- });
27427
-
27428
- if (newImports.size === 0) {
27429
- return {
27430
- code: code,
27431
- ast: ast,
27432
- map: sourceMap ? magicString.generateMap({ hires: true }) : null
27433
- };
27434
- }
27435
- var importBlock = Array.from(newImports.values()).join('\n\n');
27436
-
27437
- magicString.prepend((importBlock + "\n\n"));
27438
-
27439
- return {
27440
- code: magicString.toString(),
27441
- map: sourceMap ? magicString.generateMap({ hires: true }) : null
27442
- };
27443
- }
27444
- };
27445
- }
27446
-
27447
- var embeddedRegexp = /^data:(.*?),(.*?)/;
27448
- var commentRegexp = /\/\*([\s\S]*?)\*\//g;
27449
- var urlsRegexp = /(?:@import\s+)?url\s*\(\s*(("(.*?)")|('(.*?)')|(.*?))\s*\)|(?:@import\s+)(("(.*?)")|('(.*?)')|(.*?))[\s;]/ig;
27450
-
27451
- function isEmbedded (src) {
27452
- return embeddedRegexp.test(src.trim());
27453
- }
27454
-
27455
- function getUrls (text) {
27456
- var urls = [];
27457
- var urlMatch, url;
27458
-
27459
- text = text.replace(commentRegexp, '');
27460
-
27461
- while ((urlMatch = urlsRegexp.exec(text))) {
27462
- // Match 3, 5, 6 group if '[@import] url(path)', match 9, 11, 12 group if '@import path'
27463
- url = urlMatch[3] || urlMatch[5] || urlMatch[6] || urlMatch[9] || urlMatch[11] || urlMatch[12];
27464
-
27465
- if (url && !isEmbedded(url) && urls.indexOf(url) === -1) {
27466
- urls.push(url);
27467
- }
27468
- }
27469
-
27470
- return urls;
27471
- }
27472
-
27473
- var cssParser = getUrls;
27474
-
27475
- var parseCssUrls = cssParser;
27476
- var cssUrlParser = parseCssUrls;
27477
-
27478
- var parseCssUrl = /*@__PURE__*/getDefaultExportFromCjs$1(cssUrlParser);
27479
-
27480
- function extractCommandResources(command) {
27481
- if (Array.isArray(command)) {
27482
- return command.flatMap(extractCommandResources);
27483
- }
27484
- if (command.icon != null) {
27485
- if (typeof command.icon === 'object') {
27486
- return [{ path: command.icon.light, sync: true }, { path: command.icon.dark, sync: true }];
27487
- }
27488
- else {
27489
- return [{ path: command.icon, sync: true }];
27490
- }
27491
- }
27492
- return [];
27493
- }
27494
- function extractGrammarResources(grammar) {
27495
- return [{ path: grammar.path, sync: false }];
27496
- }
27497
- function extractLanguageResources(language) {
27498
- const paths = [];
27499
- if (language.icon != null) {
27500
- paths.push({ path: language.icon.dark, sync: true }, { path: language.icon.light, sync: true });
27501
- }
27502
- if (language.configuration != null) {
27503
- paths.push({ path: language.configuration, sync: true });
27504
- }
27505
- return paths;
27506
- }
27507
- function extractSnippetsResources(snippet) {
27508
- return [{ path: snippet.path, sync: false }];
27509
- }
27510
- async function extractThemeResources(theme, getFileContent) {
27511
- const themeContent = await getFileContent(theme.path);
27512
- const themeDocument = parseJson(theme.path, themeContent.toString('utf8'));
27513
- const paths = [{ path: theme.path, sync: false }];
27514
- if (themeDocument.fonts != null) {
27515
- for (const font of themeDocument.fonts) {
27516
- for (const src of font.src) {
27517
- paths.push({ path: path.join(path.dirname(theme.path), src.path), sync: true });
27518
- }
27519
- }
27520
- }
27521
- if (themeDocument.iconDefinitions != null) {
27522
- for (const iconDefinition of Object.values(themeDocument.iconDefinitions)) {
27523
- if (iconDefinition.iconPath != null) {
27524
- paths.push({ path: path.join(path.dirname(theme.path), iconDefinition.iconPath), sync: true });
27525
- }
27526
- }
27527
- }
27528
- return paths;
27529
- }
27530
- function extractJsonValidationResources(jsonValidation) {
27531
- if (jsonValidation.url.startsWith('./')) {
27532
- return [{
27533
- path: jsonValidation.url,
27534
- sync: true
27535
- }];
27536
- }
27537
- return [];
25859
+ function extractJsonValidationResources(jsonValidation) {
25860
+ if (jsonValidation.url.startsWith('./')) {
25861
+ return [{
25862
+ path: jsonValidation.url,
25863
+ sync: true
25864
+ }];
25865
+ }
25866
+ return [];
27538
25867
  }
27539
25868
  function extractViewsContainerResources(viewContainers) {
27540
25869
  return Object.values(viewContainers).flatMap(containers => containers.map(container => ({
@@ -27562,18 +25891,6 @@ async function extractResourcesFromExtensionManifestContribute(contribute, getFi
27562
25891
  resources.push(...contribute.jsonValidation.flatMap(extractJsonValidationResources));
27563
25892
  if (contribute.viewsContainers != null)
27564
25893
  resources.push(...extractViewsContainerResources(contribute.viewsContainers));
27565
- if (contribute['markdown.previewStyles'] != null) {
27566
- resources.push(...(await Promise.all(contribute['markdown.previewStyles'].map(async (path) => [
27567
- { path, sync: false },
27568
- ...(await extractResources(path, getFileContent))
27569
- ]))).flat());
27570
- }
27571
- if (contribute['markdown.previewScripts'] != null) {
27572
- resources.push(...(await Promise.all(contribute['markdown.previewScripts'].map(async (path) => [
27573
- { path, sync: false },
27574
- ...(await extractResources(path, getFileContent))
27575
- ]))).flat());
27576
- }
27577
25894
  return resources.filter((resource, index, list) => !resource.path.startsWith('$(') && !list.slice(0, index).some(o => o.path === resource.path));
27578
25895
  }
27579
25896
  async function extractResourcesFromExtensionManifest(manifest, getFileContent) {
@@ -27582,64 +25899,10 @@ async function extractResourcesFromExtensionManifest(manifest, getFileContent) {
27582
25899
  resources.push(...await extractResourcesFromExtensionManifestContribute(manifest.contributes, getFileContent));
27583
25900
  }
27584
25901
  if (manifest.browser != null) {
27585
- const jsPath = addExtension(manifest.browser, '.js');
27586
25902
  resources.push({
27587
- path: jsPath,
25903
+ path: addExtension(manifest.browser, '.js'),
27588
25904
  sync: false
27589
25905
  });
27590
- resources.push(...(await extractResources(jsPath, getFileContent)));
27591
- }
27592
- return resources;
27593
- }
27594
- async function extractResources(resourcePath, getFileContent) {
27595
- const resources = [];
27596
- const content = (await getFileContent(resourcePath)).toString('utf-8');
27597
- if (resourcePath.endsWith('.js')) {
27598
- for (const match of content.matchAll(/Uri\.joinPath\(context\.extensionUri, '([^']+)'\)/g)) {
27599
- resources.push({
27600
- path: match[1],
27601
- sync: false
27602
- });
27603
- resources.push(...(await extractResources(match[1], getFileContent)));
27604
- }
27605
- for (const match of content.matchAll(/this.extensionResource\('media', '(.*)'\)/g)) {
27606
- resources.push({
27607
- path: `./media/${match[1]}`,
27608
- sync: false
27609
- });
27610
- resources.push(...(await extractResources(`./media/${match[1]}`, getFileContent)));
27611
- }
27612
- for (const match of content.matchAll(/this\._extensionResourcePath\(resourceProvider, '(.*)'\)/g)) {
27613
- resources.push({
27614
- path: `./media/${match[1]}`,
27615
- sync: false
27616
- });
27617
- resources.push(...(await extractResources(`./media/${match[1]}`, getFileContent)));
27618
- }
27619
- for (const match of content.matchAll(/this\.extensionResourceUrl\('media', '(.*)'\)/g)) {
27620
- resources.push({
27621
- path: `./media/${match[1]}`,
27622
- sync: false
27623
- });
27624
- resources.push(...(await extractResources(`./media/${match[1]}`, getFileContent)));
27625
- }
27626
- }
27627
- if (resourcePath.endsWith('.css')) {
27628
- const urls = parseCssUrl(content);
27629
- for (const url of urls) {
27630
- const assetPath = './' + path.join(path.dirname(resourcePath), url);
27631
- try {
27632
- await getFileContent(assetPath);
27633
- resources.push({
27634
- path: assetPath,
27635
- sync: false
27636
- });
27637
- }
27638
- catch (err) {
27639
- // ignore, the file doesn't exist
27640
- // It happens for the markdown-math extension without consequences
27641
- }
27642
- }
27643
25906
  }
27644
25907
  return resources;
27645
25908
  }
@@ -27651,9 +25914,9 @@ function parseJson(path, text) {
27651
25914
  }
27652
25915
  return result;
27653
25916
  }
27654
- async function buildExtensionCode(extPath, rollupPlugins, getFileContent) {
25917
+ async function buildExtensionCode(path, rollupPlugins, getFileContent) {
27655
25918
  const build = await rollup({
27656
- input: extPath,
25919
+ input: path,
27657
25920
  external: ['vscode'],
27658
25921
  plugins: [
27659
25922
  ...(getFileContent != null
@@ -27667,9 +25930,6 @@ async function buildExtensionCode(extPath, rollupPlugins, getFileContent) {
27667
25930
  }
27668
25931
  }]
27669
25932
  : []),
27670
- inject({
27671
- Worker: url.fileURLToPath(new URL('./extensionWorker.js', import.meta.url))
27672
- }),
27673
25933
  ...rollupPlugins
27674
25934
  ]
27675
25935
  });