@k8slens/extensions 5.4.1-git.adf3b8dc60.0 → 5.4.1-git.b08daa811d.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/dist/src/common/app-event-bus/app-event-bus.injectable.d.ts +1 -1
  2. package/dist/src/common/app-paths/directory-for-binaries/directory-for-binaries.injectable.d.ts +1 -1
  3. package/dist/src/common/app-paths/directory-for-bundled-binaries/directory-for-bundled-binaries.injectable.d.ts +1 -1
  4. package/dist/src/common/app-paths/directory-for-downloads/directory-for-downloads.injectable.d.ts +1 -1
  5. package/dist/src/common/app-paths/directory-for-exes/directory-for-exes.injectable.d.ts +1 -1
  6. package/dist/src/common/app-paths/directory-for-kube-configs/directory-for-kube-configs.injectable.d.ts +1 -1
  7. package/dist/src/common/app-paths/directory-for-temp/directory-for-temp.injectable.d.ts +1 -1
  8. package/dist/src/common/app-paths/directory-for-user-data/directory-for-user-data.injectable.d.ts +1 -1
  9. package/dist/src/common/app-paths/get-custom-kube-config-directory/get-custom-kube-config-directory.injectable.d.ts +1 -1
  10. package/dist/src/common/cluster/authorization-review.injectable.d.ts +1 -1
  11. package/dist/src/common/cluster/list-namespaces.injectable.d.ts +1 -1
  12. package/dist/src/common/cluster-store/allowed-resources.injectable.d.ts +1 -1
  13. package/dist/src/common/cluster-store/cluster-store.injectable.d.ts +1 -1
  14. package/dist/src/common/cluster-store/hosted-cluster.injectable.d.ts +1 -1
  15. package/dist/src/common/directory-for-lens-local-storage/directory-for-lens-local-storage.injectable.d.ts +1 -1
  16. package/dist/src/common/fs/fs.injectable.d.ts +1 -1
  17. package/dist/src/common/fs/read-dir.injectable.d.ts +1 -1
  18. package/dist/src/common/fs/read-file.injectable.d.ts +1 -1
  19. package/dist/src/common/fs/read-json-file.injectable.d.ts +1 -1
  20. package/dist/src/common/fs/write-file.injectable.d.ts +4 -0
  21. package/dist/src/common/fs/write-json-file.injectable.d.ts +1 -1
  22. package/dist/src/common/hotbar-store.injectable.d.ts +1 -1
  23. package/dist/src/common/ipc/native-theme.d.ts +6 -0
  24. package/dist/src/common/k8s-api/endpoints/events.api.d.ts +6 -0
  25. package/dist/src/common/k8s-api/endpoints/helm-charts.api.d.ts +5 -5
  26. package/dist/src/common/k8s-api/endpoints/metrics.api.d.ts +1 -1
  27. package/dist/src/common/k8s-api/kube-object.d.ts +15 -0
  28. package/dist/src/common/user-store/user-store.injectable.d.ts +1 -1
  29. package/dist/src/common/utils/is-allowed-resource.injectable.d.ts +1 -1
  30. package/dist/src/common/utils/lazy-initialized.d.ts +17 -0
  31. package/dist/src/common/vars/context-dir.injectable.d.ts +1 -1
  32. package/dist/src/common/vars/is-development.injectable.d.ts +1 -1
  33. package/dist/src/common/vars/is-linux.injectable.d.ts +1 -1
  34. package/dist/src/common/vars/is-windows.injectable.d.ts +1 -1
  35. package/dist/src/common/vars.d.ts +11 -0
  36. package/dist/src/extensions/as-legacy-globals-for-extension-api/as-legacy-global-function-for-extension-api.d.ts +2 -4
  37. package/dist/src/extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api-with-modifications.d.ts +2 -10
  38. package/dist/src/extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api-with-modifications.test.d.ts +1 -0
  39. package/dist/src/extensions/as-legacy-globals-for-extension-api/as-legacy-global-object-for-extension-api.d.ts +2 -2
  40. package/dist/src/extensions/common-api/get-enabled-extensions/get-enabled-extensions.injectable.d.ts +1 -1
  41. package/dist/src/extensions/extension-api.js +644 -672
  42. package/dist/src/extensions/extension-discovery/extension-discovery.injectable.d.ts +1 -1
  43. package/dist/src/extensions/extension-discovery/is-compatible-bundled-extension/is-compatible-bundled-extension.injectable.d.ts +1 -1
  44. package/dist/src/extensions/extension-discovery/is-compatible-extension/is-compatible-extension.injectable.d.ts +1 -1
  45. package/dist/src/extensions/extension-installation-state-store/extension-installation-state-store.injectable.d.ts +1 -1
  46. package/dist/src/extensions/extension-installer/extension-installer.injectable.d.ts +1 -1
  47. package/dist/src/extensions/extension-installer/extension-package-root-directory/extension-package-root-directory.injectable.d.ts +1 -1
  48. package/dist/src/extensions/extension-installer/install-extension/install-extension.injectable.d.ts +1 -1
  49. package/dist/src/extensions/extension-installer/install-extensions/install-extensions.injectable.d.ts +1 -1
  50. package/dist/src/extensions/extension-loader/create-extension-instance/create-extension-instance.injectable.d.ts +1 -1
  51. package/dist/src/extensions/extension-loader/create-extension-instance/file-system-provisioner-store/directory-for-extension-data/directory-for-extension-data.injectable.d.ts +1 -1
  52. package/dist/src/extensions/extension-loader/create-extension-instance/file-system-provisioner-store/file-system-provisioner-store.injectable.d.ts +1 -1
  53. package/dist/src/extensions/extension-loader/extension-loader.injectable.d.ts +1 -1
  54. package/dist/src/extensions/extension-loader/update-extensions-state/update-extensions-state.injectable.d.ts +1 -1
  55. package/dist/src/extensions/extension-packages-root/extension-packages-root.injectable.d.ts +1 -1
  56. package/dist/src/extensions/extensions-store/extensions-store.injectable.d.ts +1 -1
  57. package/dist/src/extensions/extensions.injectable.d.ts +1 -1
  58. package/dist/src/extensions/main-extensions.injectable.d.ts +1 -1
  59. package/dist/src/extensions/renderer-api/components.d.ts +2 -2
  60. package/dist/src/extensions/renderer-extensions.injectable.d.ts +1 -1
  61. package/dist/src/extensions/vendors-node_modules_monaco-editor_esm_vs_language_css_cssMode_js.extension-api.js +17 -17
  62. package/dist/src/extensions/vendors-node_modules_monaco-editor_esm_vs_language_html_htmlMode_js.extension-api.js +8 -8
  63. package/dist/src/extensions/vendors-node_modules_monaco-editor_esm_vs_language_json_jsonMode_js.extension-api.js +13 -13
  64. package/dist/src/extensions/vendors-node_modules_monaco-editor_esm_vs_language_typescript_tsMode_js.extension-api.js +2 -2
  65. package/dist/src/main/__test__/{router.test.d.ts → static-file-route.test.d.ts} +0 -0
  66. package/dist/src/main/app-paths/app-name/app-name.injectable.d.ts +1 -1
  67. package/dist/src/main/app-paths/app-paths.injectable.d.ts +1 -1
  68. package/dist/src/main/app-paths/directory-for-integration-testing/directory-for-integration-testing.injectable.d.ts +1 -1
  69. package/dist/src/main/app-paths/get-electron-app-path/electron-app/electron-app.injectable.d.ts +1 -1
  70. package/dist/src/main/app-paths/get-electron-app-path/get-electron-app-path.injectable.d.ts +1 -1
  71. package/dist/src/main/app-paths/register-channel/ipc-main/ipc-main.injectable.d.ts +1 -1
  72. package/dist/src/main/app-paths/register-channel/register-channel.injectable.d.ts +1 -1
  73. package/dist/src/main/app-paths/set-electron-app-path/set-electron-app-path.injectable.d.ts +1 -1
  74. package/dist/src/main/catalog-sources/kubeconfig-sync-manager/kubeconfig-sync-manager.injectable.d.ts +1 -1
  75. package/dist/src/main/child-process/spawn.injectable.d.ts +5 -0
  76. package/dist/src/main/context-handler/context-handler.d.ts +4 -1
  77. package/dist/src/main/context-handler/create-context-handler.injectable.d.ts +1 -1
  78. package/dist/src/main/create-cluster/create-cluster.injectable.d.ts +1 -1
  79. package/dist/src/main/helm/exec.d.ts +12 -0
  80. package/dist/src/main/helm/helm-release-manager.d.ts +1 -1
  81. package/dist/src/main/helm/helm-service.d.ts +1 -1
  82. package/dist/src/main/initializers/init-ipc-main-handlers/init-ipc-main-handlers.injectable.d.ts +1 -1
  83. package/dist/src/main/kube-auth-proxy/create-kube-auth-proxy-cert-files.d.ts +13 -0
  84. package/dist/src/main/kube-auth-proxy/create-kube-auth-proxy-cert-files.injectable.d.ts +3 -0
  85. package/dist/src/main/kube-auth-proxy/create-kube-auth-proxy.injectable.d.ts +3 -1
  86. package/dist/src/main/kube-auth-proxy/kube-auth-proxy-ca.injectable.d.ts +4 -0
  87. package/dist/src/main/kube-auth-proxy/kube-auth-proxy.d.ts +5 -4
  88. package/dist/src/main/kubeconfig-manager/create-kubeconfig-manager.injectable.d.ts +1 -1
  89. package/dist/src/main/kubectl/bundled-kubectl.injectable.d.ts +1 -1
  90. package/dist/src/main/kubectl/create-kubectl.injectable.d.ts +1 -1
  91. package/dist/src/main/kubectl/directory-for-kubectl-binaries/directory-for-kubectl-binaries.injectable.d.ts +1 -1
  92. package/dist/src/main/kubectl/kubectl.d.ts +0 -1
  93. package/dist/src/main/lens-proxy.d.ts +6 -6
  94. package/dist/src/main/menu/electron-menu-items.injectable.d.ts +1 -1
  95. package/dist/src/main/native-theme.d.ts +6 -0
  96. package/dist/src/main/protocol-handler/lens-protocol-router-main/lens-protocol-router-main.injectable.d.ts +1 -1
  97. package/dist/src/main/proxy-functions/index.d.ts +1 -1
  98. package/dist/src/main/proxy-functions/{kube-api-request.d.ts → kube-api-upgrade-request.d.ts} +1 -1
  99. package/dist/src/main/proxy-functions/shell-api-request/shell-api-request.injectable.d.ts +1 -1
  100. package/dist/src/main/proxy-functions/shell-api-request/shell-request-authenticator/shell-request-authenticator.injectable.d.ts +1 -1
  101. package/dist/src/main/router/parse-request.injectable.d.ts +3 -0
  102. package/dist/src/main/router/router-content-types.d.ts +14 -0
  103. package/dist/src/main/{router.d.ts → router/router.d.ts} +28 -6
  104. package/dist/src/main/router/router.injectable.d.ts +3 -2
  105. package/dist/src/main/router/router.test.d.ts +5 -0
  106. package/dist/src/main/routes/helm/charts/get-chart-route.injectable.d.ts +9 -0
  107. package/dist/src/main/routes/helm/charts/get-chart-values-route.injectable.d.ts +4 -0
  108. package/dist/src/main/routes/helm/charts/list-charts-route.injectable.d.ts +4 -0
  109. package/dist/src/main/routes/helm/releases/delete-release-route.injectable.d.ts +4 -0
  110. package/dist/src/main/routes/helm/releases/get-release-history-route.injectable.d.ts +4 -0
  111. package/dist/src/main/routes/helm/releases/get-release-route.injectable.d.ts +4 -0
  112. package/dist/src/main/routes/helm/releases/get-release-values-route.injectable.d.ts +4 -0
  113. package/dist/src/main/routes/helm/releases/install-chart-route.injectable.d.ts +11 -0
  114. package/dist/src/main/routes/helm/releases/list-releases-route.injectable.d.ts +4 -0
  115. package/dist/src/main/routes/helm/releases/rollback-release-route.injectable.d.ts +4 -0
  116. package/dist/src/main/routes/helm/releases/update-release-route.injectable.d.ts +11 -0
  117. package/dist/src/main/routes/kubeconfig-route/get-service-account-route.injectable.d.ts +33 -0
  118. package/dist/src/main/routes/metrics/add-metrics-route.injectable.d.ts +8 -0
  119. package/dist/src/main/routes/metrics/get-metric-providers-route.injectable.d.ts +9 -0
  120. package/dist/src/main/routes/metrics/metrics-query.d.ts +7 -0
  121. package/dist/src/main/routes/port-forward/{create-port-forward.injectable.d.ts → functionality/create-port-forward.injectable.d.ts} +1 -1
  122. package/dist/src/main/routes/port-forward/{port-forward.d.ts → functionality/port-forward.d.ts} +0 -0
  123. package/dist/src/main/routes/port-forward/get-current-port-forward-route.injectable.d.ts +6 -0
  124. package/dist/src/main/routes/port-forward/start-port-forward-route.injectable.d.ts +6 -0
  125. package/dist/src/main/routes/port-forward/stop-current-port-forward-route.injectable.d.ts +6 -0
  126. package/dist/src/main/routes/resource-applier/apply-resource-route.injectable.d.ts +4 -0
  127. package/dist/src/main/routes/resource-applier/patch-resource-route.injectable.d.ts +4 -0
  128. package/dist/src/main/routes/static-file-route.injectable.d.ts +5 -0
  129. package/dist/src/main/routes/versions/get-version-route.injectable.d.ts +6 -0
  130. package/dist/src/main/shell-session/create-shell-session.injectable.d.ts +1 -1
  131. package/dist/src/main/shell-session/local-shell-session/local-shell-session.injectable.d.ts +1 -1
  132. package/dist/src/main/shell-session/node-shell-session/node-shell-session.injectable.d.ts +1 -1
  133. package/dist/src/main/shell-session/shell-env-modifier/terminal-shell-env-modify.injectable.d.ts +1 -1
  134. package/dist/src/main/tray/tray-menu-items.injectable.d.ts +1 -1
  135. package/dist/src/renderer/api/catalog-entity-registry/catalog-entity-registry.injectable.d.ts +1 -1
  136. package/dist/src/renderer/app-paths/app-paths.injectable.d.ts +1 -1
  137. package/dist/src/renderer/app-paths/get-value-from-registered-channel/get-value-from-registered-channel.injectable.d.ts +1 -1
  138. package/dist/src/renderer/app-paths/get-value-from-registered-channel/ipc-renderer/ipc-renderer.injectable.d.ts +1 -1
  139. package/dist/src/renderer/cluster-frame-context/cluster-frame-context.injectable.d.ts +1 -1
  140. package/dist/src/renderer/components/+add-cluster/add-cluster.d.ts +1 -3
  141. package/dist/src/renderer/components/+catalog/catalog-entity-store/catalog-entity-store.injectable.d.ts +1 -1
  142. package/dist/src/renderer/components/+catalog/catalog-previous-active-tab-storage/catalog-previous-active-tab-storage.injectable.d.ts +1 -1
  143. package/dist/src/renderer/components/+catalog/catalog.d.ts +1 -3
  144. package/dist/src/renderer/components/+catalog/custom-category-columns.injectable.d.ts +1 -1
  145. package/dist/src/renderer/components/+catalog/custom-views.injectable.d.ts +1 -1
  146. package/dist/src/renderer/components/+catalog/get-category-columns.injectable.d.ts +1 -1
  147. package/dist/src/renderer/components/+cluster/cluster-issues.d.ts +2 -3
  148. package/dist/src/renderer/components/+cluster/cluster-metric-switchers.d.ts +1 -3
  149. package/dist/src/renderer/components/+cluster/cluster-metrics.d.ts +1 -3
  150. package/dist/src/renderer/components/+cluster/cluster-overview-store/cluster-overview-store.injectable.d.ts +1 -1
  151. package/dist/src/renderer/components/+cluster/cluster-overview.d.ts +1 -3
  152. package/dist/src/renderer/components/+cluster/cluster-pie-charts.d.ts +1 -3
  153. package/dist/src/renderer/components/+cluster/sidebar-item.d.ts +1 -3
  154. package/dist/src/renderer/components/+config/route-tabs.injectable.d.ts +1 -1
  155. package/dist/src/renderer/components/+config/route.d.ts +1 -3
  156. package/dist/src/renderer/components/+config/sidebar-item.d.ts +1 -3
  157. package/dist/src/renderer/components/+custom-resources/crd-list.d.ts +1 -2
  158. package/dist/src/renderer/components/+custom-resources/crd-resources.d.ts +1 -2
  159. package/dist/src/renderer/components/+custom-resources/custom-resources.injectable.d.ts +1 -1
  160. package/dist/src/renderer/components/+custom-resources/grouped-custom-resources.injectable.d.ts +1 -1
  161. package/dist/src/renderer/components/+custom-resources/route-tabs.injectable.d.ts +1 -1
  162. package/dist/src/renderer/components/+custom-resources/sidebar-item.d.ts +1 -3
  163. package/dist/src/renderer/components/+events/events.d.ts +0 -1
  164. package/dist/src/renderer/components/+events/kube-event-details.d.ts +1 -3
  165. package/dist/src/renderer/components/+events/sidebar-item.d.ts +1 -3
  166. package/dist/src/renderer/components/+extensions/attempt-install/attempt-install.injectable.d.ts +1 -1
  167. package/dist/src/renderer/components/+extensions/attempt-install/create-temp-files-and-validate/create-temp-files-and-validate.injectable.d.ts +1 -1
  168. package/dist/src/renderer/components/+extensions/attempt-install/get-extension-dest-folder/get-extension-dest-folder.injectable.d.ts +1 -1
  169. package/dist/src/renderer/components/+extensions/attempt-install/unpack-extension/unpack-extension.injectable.d.ts +1 -1
  170. package/dist/src/renderer/components/+extensions/attempt-install-by-info/attempt-install-by-info.injectable.d.ts +1 -1
  171. package/dist/src/renderer/components/+extensions/attempt-installs/attempt-installs.injectable.d.ts +1 -1
  172. package/dist/src/renderer/components/+extensions/confirm-uninstall-extension/confirm-uninstall-extension.injectable.d.ts +1 -1
  173. package/dist/src/renderer/components/+extensions/disable-extension/disable-extension.injectable.d.ts +1 -1
  174. package/dist/src/renderer/components/+extensions/enable-extension/enable-extension.injectable.d.ts +1 -1
  175. package/dist/src/renderer/components/+extensions/extensions.d.ts +1 -3
  176. package/dist/src/renderer/components/+extensions/get-base-registry-url/get-base-registry-url.injectable.d.ts +1 -1
  177. package/dist/src/renderer/components/+extensions/install-from-input/install-from-input.injectable.d.ts +1 -1
  178. package/dist/src/renderer/components/+extensions/install-from-select-file-dialog.injectable.d.ts +1 -1
  179. package/dist/src/renderer/components/+extensions/install-on-drop/install-on-drop.injectable.d.ts +1 -1
  180. package/dist/src/renderer/components/+extensions/install.d.ts +1 -3
  181. package/dist/src/renderer/components/+extensions/installed-extensions.d.ts +1 -3
  182. package/dist/src/renderer/components/+extensions/uninstall-extension/uninstall-extension.injectable.d.ts +1 -1
  183. package/dist/src/renderer/components/+extensions/user-extensions/user-extensions.injectable.d.ts +1 -1
  184. package/dist/src/renderer/components/+helm/route-tabs.injectable.d.ts +1 -1
  185. package/dist/src/renderer/components/+helm/route.d.ts +1 -3
  186. package/dist/src/renderer/components/+helm/sidebar-item.d.ts +1 -3
  187. package/dist/src/renderer/components/+helm-charts/helm-chart-details.d.ts +1 -3
  188. package/dist/src/renderer/components/+helm-releases/create-release/create-release.injectable.d.ts +1 -1
  189. package/dist/src/renderer/components/+helm-releases/delete-release/delete-release.injectable.d.ts +1 -1
  190. package/dist/src/renderer/components/+helm-releases/release-details/release-details.d.ts +1 -3
  191. package/dist/src/renderer/components/+helm-releases/release-details/release-details.injectable.d.ts +1 -1
  192. package/dist/src/renderer/components/+helm-releases/release-details/release-route-parameters.injectable.d.ts +1 -1
  193. package/dist/src/renderer/components/+helm-releases/release-details/release-values.injectable.d.ts +1 -1
  194. package/dist/src/renderer/components/+helm-releases/release-details/release.injectable.d.ts +1 -1
  195. package/dist/src/renderer/components/+helm-releases/release-details/user-supplied-values-are-shown.injectable.d.ts +2 -2
  196. package/dist/src/renderer/components/+helm-releases/release-menu.d.ts +1 -3
  197. package/dist/src/renderer/components/+helm-releases/release-rollback-dialog-model/release-rollback-dialog-model.injectable.d.ts +1 -1
  198. package/dist/src/renderer/components/+helm-releases/release-rollback-dialog.d.ts +1 -3
  199. package/dist/src/renderer/components/+helm-releases/releases.d.ts +1 -3
  200. package/dist/src/renderer/components/+helm-releases/releases.injectable.d.ts +1 -1
  201. package/dist/src/renderer/components/+helm-releases/removable-releases.injectable.d.ts +1 -1
  202. package/dist/src/renderer/components/+helm-releases/rollback-release/rollback-release.injectable.d.ts +1 -1
  203. package/dist/src/renderer/components/+helm-releases/update-release/update-release.injectable.d.ts +1 -1
  204. package/dist/src/renderer/components/+namespaces/add-namespace-dialog-model/add-namespace-dialog-model.injectable.d.ts +1 -1
  205. package/dist/src/renderer/components/+namespaces/add-namespace-dialog.d.ts +1 -3
  206. package/dist/src/renderer/components/+namespaces/namespace-details.d.ts +1 -3
  207. package/dist/src/renderer/components/+namespaces/namespace-select-filter-model/namespace-select-filter-model.injectable.d.ts +1 -1
  208. package/dist/src/renderer/components/+namespaces/namespace-select-filter.d.ts +1 -3
  209. package/dist/src/renderer/components/+namespaces/namespace-select.d.ts +1 -3
  210. package/dist/src/renderer/components/+namespaces/namespace-store/namespace-store.injectable.d.ts +1 -1
  211. package/dist/src/renderer/components/+namespaces/route.d.ts +1 -3
  212. package/dist/src/renderer/components/+namespaces/sidebar-item.d.ts +1 -3
  213. package/dist/src/renderer/components/+network/route-tabs.injectable.d.ts +1 -1
  214. package/dist/src/renderer/components/+network/route.d.ts +1 -3
  215. package/dist/src/renderer/components/+network/sidebar-item.d.ts +1 -3
  216. package/dist/src/renderer/components/+network-port-forwards/port-forward-menu.d.ts +1 -3
  217. package/dist/src/renderer/components/+network-port-forwards/port-forwards.d.ts +1 -3
  218. package/dist/src/renderer/components/+network-services/service-details.d.ts +1 -3
  219. package/dist/src/renderer/components/+network-services/service-port-component.d.ts +1 -3
  220. package/dist/src/renderer/components/+nodes/details.d.ts +1 -3
  221. package/dist/src/renderer/components/+nodes/sidebar-item.d.ts +1 -3
  222. package/dist/src/renderer/components/+preferences/app-preferences/app-preferences.injectable.d.ts +1 -1
  223. package/dist/src/renderer/components/+preferences/application.d.ts +1 -3
  224. package/dist/src/renderer/components/+preferences/extensions.d.ts +1 -3
  225. package/dist/src/renderer/components/+preferences/kubectl-binaries.d.ts +1 -3
  226. package/dist/src/renderer/components/+preferences/preferences.d.ts +1 -3
  227. package/dist/src/renderer/components/+preferences/telemetry.d.ts +1 -3
  228. package/dist/src/renderer/components/+storage/route-tabs.injectable.d.ts +1 -1
  229. package/dist/src/renderer/components/+storage/route.d.ts +1 -3
  230. package/dist/src/renderer/components/+storage/sidebar-item.d.ts +1 -3
  231. package/dist/src/renderer/components/+storage-classes/storage-class-details.d.ts +1 -3
  232. package/dist/src/renderer/components/+user-management/route-tabs.injectable.d.ts +1 -1
  233. package/dist/src/renderer/components/+user-management/route.d.ts +1 -3
  234. package/dist/src/renderer/components/+user-management/sidebar-item.d.ts +1 -3
  235. package/dist/src/renderer/components/+welcome/welcome-banner-items/welcome-banner-items.injectable.d.ts +1 -1
  236. package/dist/src/renderer/components/+welcome/welcome-menu-items/welcome-menu-items.injectable.d.ts +1 -1
  237. package/dist/src/renderer/components/+welcome/welcome.d.ts +1 -3
  238. package/dist/src/renderer/components/+workloads/route-tabs.injectable.d.ts +1 -1
  239. package/dist/src/renderer/components/+workloads/route.d.ts +1 -3
  240. package/dist/src/renderer/components/+workloads/sidebar-item.d.ts +1 -3
  241. package/dist/src/renderer/components/+workloads-cronjobs/cronjob-details.d.ts +1 -3
  242. package/dist/src/renderer/components/+workloads-daemonsets/daemonset-details.d.ts +1 -3
  243. package/dist/src/renderer/components/+workloads-deployments/deployment-details.d.ts +1 -3
  244. package/dist/src/renderer/components/+workloads-jobs/job-details.d.ts +1 -3
  245. package/dist/src/renderer/components/+workloads-overview/detail-components.injectable.d.ts +1 -1
  246. package/dist/src/renderer/components/+workloads-overview/overview-statuses.d.ts +1 -3
  247. package/dist/src/renderer/components/+workloads-overview/overview.d.ts +1 -3
  248. package/dist/src/renderer/components/+workloads-overview/workloads.injectable.d.ts +2 -2
  249. package/dist/src/renderer/components/+workloads-pods/pod-container-port.d.ts +1 -3
  250. package/dist/src/renderer/components/+workloads-pods/pod-details-container.d.ts +1 -3
  251. package/dist/src/renderer/components/+workloads-replicasets/replicaset-details.d.ts +1 -3
  252. package/dist/src/renderer/components/+workloads-statefulsets/statefulset-details.d.ts +1 -3
  253. package/dist/src/renderer/components/activate-entity-command/activate-entity-command.d.ts +1 -3
  254. package/dist/src/renderer/components/catalog-entities/weblink-add-command.d.ts +1 -3
  255. package/dist/src/renderer/components/cluster-manager/cluster-manager.d.ts +1 -3
  256. package/dist/src/renderer/components/command-palette/command-container.d.ts +1 -3
  257. package/dist/src/renderer/components/command-palette/command-dialog.d.ts +1 -3
  258. package/dist/src/renderer/components/command-palette/command-overlay.injectable.d.ts +1 -1
  259. package/dist/src/renderer/components/command-palette/registered-commands/internal-commands.injectable.d.ts +1 -1
  260. package/dist/src/renderer/components/command-palette/registered-commands/registered-commands.injectable.d.ts +1 -1
  261. package/dist/src/renderer/components/dock/create-resource/clear-create-resource-tab-data.injectable.d.ts +1 -1
  262. package/dist/src/renderer/components/dock/create-resource/create-resource-tab.injectable.d.ts +1 -1
  263. package/dist/src/renderer/components/dock/create-resource/create-resource-templates.injectable.d.ts +1 -1
  264. package/dist/src/renderer/components/dock/create-resource/lens-templates.injectable.d.ts +1 -1
  265. package/dist/src/renderer/components/dock/create-resource/store.injectable.d.ts +1 -1
  266. package/dist/src/renderer/components/dock/create-resource/user-templates.injectable.d.ts +1 -1
  267. package/dist/src/renderer/components/dock/create-resource/view.d.ts +1 -3
  268. package/dist/src/renderer/components/dock/dock/close-dock-tab.injectable.d.ts +1 -1
  269. package/dist/src/renderer/components/dock/dock/create-dock-tab.injectable.d.ts +1 -1
  270. package/dist/src/renderer/components/dock/dock/dock-storage.injectable.d.ts +1 -1
  271. package/dist/src/renderer/components/dock/dock/rename-tab.injectable.d.ts +1 -1
  272. package/dist/src/renderer/components/dock/dock/select-dock-tab.injectable.d.ts +1 -1
  273. package/dist/src/renderer/components/dock/dock/store.injectable.d.ts +1 -1
  274. package/dist/src/renderer/components/dock/dock-tab-store/create-dock-tab-store.injectable.d.ts +1 -1
  275. package/dist/src/renderer/components/dock/dock-tab.d.ts +1 -3
  276. package/dist/src/renderer/components/dock/dock.d.ts +1 -3
  277. package/dist/src/renderer/components/dock/edit-resource/clear-edit-resource-tab-data.injectable.d.ts +1 -1
  278. package/dist/src/renderer/components/dock/edit-resource/edit-resource-tab.injectable.d.ts +1 -1
  279. package/dist/src/renderer/components/dock/edit-resource/store.injectable.d.ts +1 -1
  280. package/dist/src/renderer/components/dock/edit-resource/view.d.ts +1 -3
  281. package/dist/src/renderer/components/dock/editor-panel.d.ts +1 -3
  282. package/dist/src/renderer/components/dock/info-panel.d.ts +1 -3
  283. package/dist/src/renderer/components/dock/install-chart/clear-install-chart-tab-data.injectable.d.ts +1 -1
  284. package/dist/src/renderer/components/dock/install-chart/create-install-chart-tab.injectable.d.ts +1 -1
  285. package/dist/src/renderer/components/dock/install-chart/store.injectable.d.ts +1 -1
  286. package/dist/src/renderer/components/dock/install-chart/view.d.ts +1 -3
  287. package/dist/src/renderer/components/dock/logs/are-logs-present.injectable.d.ts +1 -1
  288. package/dist/src/renderer/components/dock/logs/call-for-logs.injectable.d.ts +2 -2
  289. package/dist/src/renderer/components/dock/logs/clear-log-tab-data.injectable.d.ts +1 -1
  290. package/dist/src/renderer/components/dock/logs/controls.d.ts +1 -3
  291. package/dist/src/renderer/components/dock/logs/create-logs-tab.injectable.d.ts +1 -1
  292. package/dist/src/renderer/components/dock/logs/create-pod-logs-tab.injectable.d.ts +1 -1
  293. package/dist/src/renderer/components/dock/logs/create-workload-logs-tab.injectable.d.ts +1 -1
  294. package/dist/src/renderer/components/dock/logs/get-log-tab-data.injectable.d.ts +1 -1
  295. package/dist/src/renderer/components/dock/logs/get-logs-without-timestamps.injectable.d.ts +1 -1
  296. package/dist/src/renderer/components/dock/logs/get-logs.injectable.d.ts +1 -1
  297. package/dist/src/renderer/components/dock/logs/get-timestamp-split-logs.injectable.d.ts +1 -1
  298. package/dist/src/renderer/components/dock/logs/is-logs-tab-data-valid.injectable.d.ts +1 -1
  299. package/dist/src/renderer/components/dock/logs/load-logs.injectable.d.ts +1 -1
  300. package/dist/src/renderer/components/dock/logs/logs-view-model.injectable.d.ts +1 -1
  301. package/dist/src/renderer/components/dock/logs/reload-logs.injectable.d.ts +1 -1
  302. package/dist/src/renderer/components/dock/logs/set-log-tab-data.injectable.d.ts +1 -1
  303. package/dist/src/renderer/components/dock/logs/stop-loading-logs.injectable.d.ts +1 -1
  304. package/dist/src/renderer/components/dock/logs/store.injectable.d.ts +1 -1
  305. package/dist/src/renderer/components/dock/logs/tab-store.injectable.d.ts +1 -1
  306. package/dist/src/renderer/components/dock/logs/view.d.ts +1 -3
  307. package/dist/src/renderer/components/dock/terminal/clear-terminal-tab-data.injectable.d.ts +1 -1
  308. package/dist/src/renderer/components/dock/terminal/create-terminal-tab.injectable.d.ts +1 -1
  309. package/dist/src/renderer/components/dock/terminal/create-terminal.injectable.d.ts +1 -1
  310. package/dist/src/renderer/components/dock/terminal/dock-tab.d.ts +1 -3
  311. package/dist/src/renderer/components/dock/terminal/get-terminal-api.injectable.d.ts +1 -1
  312. package/dist/src/renderer/components/dock/terminal/send-command.injectable.d.ts +1 -1
  313. package/dist/src/renderer/components/dock/terminal/store.injectable.d.ts +1 -1
  314. package/dist/src/renderer/components/dock/terminal/view.d.ts +1 -3
  315. package/dist/src/renderer/components/dock/upgrade-chart/clear-upgrade-chart-tab-data.injectable.d.ts +1 -1
  316. package/dist/src/renderer/components/dock/upgrade-chart/create-upgrade-chart-tab.injectable.d.ts +1 -1
  317. package/dist/src/renderer/components/dock/upgrade-chart/store.injectable.d.ts +1 -1
  318. package/dist/src/renderer/components/dock/upgrade-chart/view.d.ts +1 -3
  319. package/dist/src/renderer/components/drawer/drawer-storage/drawer-storage.injectable.d.ts +2 -2
  320. package/dist/src/renderer/components/drawer/drawer.d.ts +1 -3
  321. package/dist/src/renderer/components/duration/reactive-duration.d.ts +13 -0
  322. package/dist/src/renderer/components/hotbar/hotbar-add-command.d.ts +1 -3
  323. package/dist/src/renderer/components/hotbar/hotbar-remove-command.d.ts +1 -3
  324. package/dist/src/renderer/components/hotbar/hotbar-rename-command.d.ts +1 -3
  325. package/dist/src/renderer/components/hotbar/hotbar-selector.d.ts +1 -3
  326. package/dist/src/renderer/components/hotbar/hotbar-switch-command.d.ts +1 -3
  327. package/dist/src/renderer/components/input/validators/unique-hotbar-name.injectable.d.ts +1 -1
  328. package/dist/src/renderer/components/item-object-list/content.d.ts +2 -0
  329. package/dist/src/renderer/components/item-object-list/storage.injectable.d.ts +2 -2
  330. package/dist/src/renderer/components/kube-object/age.d.ts +14 -0
  331. package/dist/src/renderer/components/kube-object-menu/dependencies/api-manager.injectable.d.ts +1 -1
  332. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster-name.injectable.d.ts +1 -1
  333. package/dist/src/renderer/components/kube-object-menu/dependencies/cluster.injectable.d.ts +1 -1
  334. package/dist/src/renderer/components/kube-object-menu/dependencies/hide-details.injectable.d.ts +1 -1
  335. package/dist/src/renderer/components/kube-object-menu/dependencies/kube-object-menu-items/kube-object-menu-items.injectable.d.ts +1 -1
  336. package/dist/src/renderer/components/kube-object-status-icon/kube-object-status-icon.d.ts +1 -3
  337. package/dist/src/renderer/components/kube-object-status-icon/status-registrations.injectable.d.ts +1 -1
  338. package/dist/src/renderer/components/kube-object-status-icon/statuses-for-kube-object.injectable.d.ts +1 -1
  339. package/dist/src/renderer/components/layout/main-layout.d.ts +1 -3
  340. package/dist/src/renderer/components/layout/sidebar-item.d.ts +1 -3
  341. package/dist/src/renderer/components/layout/sidebar-storage/sidebar-storage.injectable.d.ts +2 -2
  342. package/dist/src/renderer/components/layout/top-bar/top-bar-items/top-bar-items.injectable.d.ts +1 -1
  343. package/dist/src/renderer/components/layout/top-bar/top-bar.d.ts +2 -4
  344. package/dist/src/renderer/components/status-bar/registered-status-bar-items.injectable.d.ts +1 -1
  345. package/dist/src/renderer/components/status-bar/status-bar-items.injectable.d.ts +1 -1
  346. package/dist/src/renderer/components/status-bar/status-bar.d.ts +1 -3
  347. package/dist/src/renderer/components/switch/switcher.d.ts +1 -1
  348. package/dist/src/renderer/components/table/table-model/table-model.injectable.d.ts +1 -1
  349. package/dist/src/renderer/create-cluster/create-cluster.injectable.d.ts +1 -1
  350. package/dist/src/renderer/frames/cluster-frame/cluster-frame.d.ts +1 -3
  351. package/dist/src/renderer/frames/cluster-frame/init-cluster-frame/frame-routing-id/frame-routing-id.injectable.d.ts +1 -1
  352. package/dist/src/renderer/frames/cluster-frame/init-cluster-frame/frame-routing-id/web-frame/web-frame.injectable.d.ts +1 -1
  353. package/dist/src/renderer/frames/cluster-frame/init-cluster-frame/init-cluster-frame.injectable.d.ts +1 -1
  354. package/dist/src/renderer/frames/root-frame/init-root-frame/init-root-frame.injectable.d.ts +1 -1
  355. package/dist/src/renderer/frames/root-frame/root-frame.d.ts +1 -3
  356. package/dist/src/renderer/initializers/workload-events.d.ts +1 -3
  357. package/dist/src/renderer/kube-watch-api/kube-watch-api.injectable.d.ts +1 -1
  358. package/dist/src/renderer/kube-watch-api/subscribe-stores.injectable.d.ts +1 -1
  359. package/dist/src/renderer/navigation/history.injectable.d.ts +1 -1
  360. package/dist/src/renderer/navigation/observable-history.injectable.d.ts +1 -1
  361. package/dist/src/renderer/port-forward/port-forward-dialog-model/port-forward-dialog-model.injectable.d.ts +1 -1
  362. package/dist/src/renderer/port-forward/port-forward-dialog.d.ts +1 -3
  363. package/dist/src/renderer/port-forward/port-forward-store/port-forward-store.injectable.d.ts +1 -1
  364. package/dist/src/renderer/protocol-handler/bind-protocol-add-route-handlers/bind-protocol-add-route-handlers.injectable.d.ts +1 -1
  365. package/dist/src/renderer/protocol-handler/lens-protocol-router-renderer/lens-protocol-router-renderer.injectable.d.ts +1 -1
  366. package/dist/src/renderer/search-store/search-store.injectable.d.ts +1 -1
  367. package/dist/src/renderer/theme.store.d.ts +5 -0
  368. package/dist/src/renderer/utils/create-storage/create-storage.injectable.d.ts +1 -1
  369. package/dist/src/renderer/utils/save-file.injectable.d.ts +1 -1
  370. package/dist/src/renderer/window/event-listener.injectable.d.ts +1 -1
  371. package/package.json +1 -1
  372. package/dist/src/main/helm/helm-cli.d.ts +0 -13
  373. package/dist/src/main/lens-binary.d.ts +0 -42
  374. package/dist/src/main/routes/helm-route.d.ts +0 -18
  375. package/dist/src/main/routes/index.d.ts +0 -10
  376. package/dist/src/main/routes/kubeconfig-route.d.ts +0 -8
  377. package/dist/src/main/routes/metrics-route.d.ts +0 -12
  378. package/dist/src/main/routes/port-forward/route-port-forward/route-port-forward.d.ts +0 -11
  379. package/dist/src/main/routes/port-forward/route-port-forward/route-port-forward.injectable.d.ts +0 -3
  380. package/dist/src/main/routes/port-forward-route.d.ts +0 -9
  381. package/dist/src/main/routes/resource-applier-route.d.ts +0 -9
  382. package/dist/src/main/routes/version-route.d.ts +0 -8
  383. package/dist/webpack.dev-server.d.ts +0 -14
  384. package/dist/webpack.renderer.d.ts +0 -25
@@ -15,7 +15,7 @@
15
15
  \*****************************************************************************************/
16
16
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17
17
 
18
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"removeProperty\": () => (/* binding */ removeProperty),\n/* harmony export */ \"setProperty\": () => (/* binding */ setProperty),\n/* harmony export */ \"applyEdit\": () => (/* binding */ applyEdit),\n/* harmony export */ \"isWS\": () => (/* binding */ isWS)\n/* harmony export */ });\n/* harmony import */ var _format_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/format.js\");\n/* harmony import */ var _parser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/parser.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n\nfunction removeProperty(text, path, options) {\n return setProperty(text, path, void 0, options);\n}\nfunction setProperty(text, originalPath, value, options) {\n var _a;\n var path = originalPath.slice();\n var errors = [];\n var root = (0,_parser_js__WEBPACK_IMPORTED_MODULE_1__.parseTree)(text, errors);\n var parent = void 0;\n var lastSegment = void 0;\n while (path.length > 0) {\n lastSegment = path.pop();\n parent = (0,_parser_js__WEBPACK_IMPORTED_MODULE_1__.findNodeAtLocation)(root, path);\n if (parent === void 0 && value !== void 0) {\n if (typeof lastSegment === 'string') {\n value = (_a = {}, _a[lastSegment] = value, _a);\n }\n else {\n value = [value];\n }\n }\n else {\n break;\n }\n }\n if (!parent) {\n // empty document\n if (value === void 0) { // delete\n throw new Error('Can not delete in empty document');\n }\n return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, options);\n }\n else if (parent.type === 'object' && typeof lastSegment === 'string' && Array.isArray(parent.children)) {\n var existing = (0,_parser_js__WEBPACK_IMPORTED_MODULE_1__.findNodeAtLocation)(parent, [lastSegment]);\n if (existing !== void 0) {\n if (value === void 0) { // delete\n if (!existing.parent) {\n throw new Error('Malformed AST');\n }\n var propertyIndex = parent.children.indexOf(existing.parent);\n var removeBegin = void 0;\n var removeEnd = existing.parent.offset + existing.parent.length;\n if (propertyIndex > 0) {\n // remove the comma of the previous node\n var previous = parent.children[propertyIndex - 1];\n removeBegin = previous.offset + previous.length;\n }\n else {\n removeBegin = parent.offset + 1;\n if (parent.children.length > 1) {\n // remove the comma of the next node\n var next = parent.children[1];\n removeEnd = next.offset;\n }\n }\n return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: '' }, options);\n }\n else {\n // set value of existing property\n return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, options);\n }\n }\n else {\n if (value === void 0) { // delete\n return []; // property does not exist, nothing to do\n }\n var newProperty = JSON.stringify(lastSegment) + \": \" + JSON.stringify(value);\n var index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map(function (p) { return p.children[0].value; })) : parent.children.length;\n var edit = void 0;\n if (index > 0) {\n var previous = parent.children[index - 1];\n edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };\n }\n else if (parent.children.length === 0) {\n edit = { offset: parent.offset + 1, length: 0, content: newProperty };\n }\n else {\n edit = { offset: parent.offset + 1, length: 0, content: newProperty + ',' };\n }\n return withFormatting(text, edit, options);\n }\n }\n else if (parent.type === 'array' && typeof lastSegment === 'number' && Array.isArray(parent.children)) {\n var insertIndex = lastSegment;\n if (insertIndex === -1) {\n // Insert\n var newProperty = \"\" + JSON.stringify(value);\n var edit = void 0;\n if (parent.children.length === 0) {\n edit = { offset: parent.offset + 1, length: 0, content: newProperty };\n }\n else {\n var previous = parent.children[parent.children.length - 1];\n edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };\n }\n return withFormatting(text, edit, options);\n }\n else if (value === void 0 && parent.children.length >= 0) {\n // Removal\n var removalIndex = lastSegment;\n var toRemove = parent.children[removalIndex];\n var edit = void 0;\n if (parent.children.length === 1) {\n // only item\n edit = { offset: parent.offset + 1, length: parent.length - 2, content: '' };\n }\n else if (parent.children.length - 1 === removalIndex) {\n // last item\n var previous = parent.children[removalIndex - 1];\n var offset = previous.offset + previous.length;\n var parentEndOffset = parent.offset + parent.length;\n edit = { offset: offset, length: parentEndOffset - 2 - offset, content: '' };\n }\n else {\n edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: '' };\n }\n return withFormatting(text, edit, options);\n }\n else if (value !== void 0) {\n var edit = void 0;\n var newProperty = \"\" + JSON.stringify(value);\n if (!options.isArrayInsertion && parent.children.length > lastSegment) {\n var toModify = parent.children[lastSegment];\n edit = { offset: toModify.offset, length: toModify.length, content: newProperty };\n }\n else if (parent.children.length === 0 || lastSegment === 0) {\n edit = { offset: parent.offset + 1, length: 0, content: parent.children.length === 0 ? newProperty : newProperty + ',' };\n }\n else {\n var index = lastSegment > parent.children.length ? parent.children.length : lastSegment;\n var previous = parent.children[index - 1];\n edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };\n }\n return withFormatting(text, edit, options);\n }\n else {\n throw new Error(\"Can not \" + (value === void 0 ? 'remove' : (options.isArrayInsertion ? 'insert' : 'modify')) + \" Array index \" + insertIndex + \" as length is not sufficient\");\n }\n }\n else {\n throw new Error(\"Can not add \" + (typeof lastSegment !== 'number' ? 'index' : 'property') + \" to parent of type \" + parent.type);\n }\n}\nfunction withFormatting(text, edit, options) {\n if (!options.formattingOptions) {\n return [edit];\n }\n // apply the edit\n var newText = applyEdit(text, edit);\n // format the new text\n var begin = edit.offset;\n var end = edit.offset + edit.content.length;\n if (edit.length === 0 || edit.content.length === 0) { // insert or remove\n while (begin > 0 && !(0,_format_js__WEBPACK_IMPORTED_MODULE_0__.isEOL)(newText, begin - 1)) {\n begin--;\n }\n while (end < newText.length && !(0,_format_js__WEBPACK_IMPORTED_MODULE_0__.isEOL)(newText, end)) {\n end++;\n }\n }\n var edits = (0,_format_js__WEBPACK_IMPORTED_MODULE_0__.format)(newText, { offset: begin, length: end - begin }, options.formattingOptions);\n // apply the formatting edits and track the begin and end offsets of the changes\n for (var i = edits.length - 1; i >= 0; i--) {\n var edit_1 = edits[i];\n newText = applyEdit(newText, edit_1);\n begin = Math.min(begin, edit_1.offset);\n end = Math.max(end, edit_1.offset + edit_1.length);\n end += edit_1.content.length - edit_1.length;\n }\n // create a single edit with all changes\n var editLength = text.length - (newText.length - end) - begin;\n return [{ offset: begin, length: editLength, content: newText.substring(begin, end) }];\n}\nfunction applyEdit(text, edit) {\n return text.substring(0, edit.offset) + edit.content + text.substring(edit.offset + edit.length);\n}\nfunction isWS(text, offset) {\n return '\\r\\n \\t'.indexOf(text.charAt(offset)) !== -1;\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/edit.js?");
18
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"applyEdit\": () => (/* binding */ applyEdit),\n/* harmony export */ \"isWS\": () => (/* binding */ isWS),\n/* harmony export */ \"removeProperty\": () => (/* binding */ removeProperty),\n/* harmony export */ \"setProperty\": () => (/* binding */ setProperty)\n/* harmony export */ });\n/* harmony import */ var _format_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./format.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/format.js\");\n/* harmony import */ var _parser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./parser.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/parser.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n\nfunction removeProperty(text, path, options) {\n return setProperty(text, path, void 0, options);\n}\nfunction setProperty(text, originalPath, value, options) {\n var _a;\n var path = originalPath.slice();\n var errors = [];\n var root = (0,_parser_js__WEBPACK_IMPORTED_MODULE_1__.parseTree)(text, errors);\n var parent = void 0;\n var lastSegment = void 0;\n while (path.length > 0) {\n lastSegment = path.pop();\n parent = (0,_parser_js__WEBPACK_IMPORTED_MODULE_1__.findNodeAtLocation)(root, path);\n if (parent === void 0 && value !== void 0) {\n if (typeof lastSegment === 'string') {\n value = (_a = {}, _a[lastSegment] = value, _a);\n }\n else {\n value = [value];\n }\n }\n else {\n break;\n }\n }\n if (!parent) {\n // empty document\n if (value === void 0) { // delete\n throw new Error('Can not delete in empty document');\n }\n return withFormatting(text, { offset: root ? root.offset : 0, length: root ? root.length : 0, content: JSON.stringify(value) }, options);\n }\n else if (parent.type === 'object' && typeof lastSegment === 'string' && Array.isArray(parent.children)) {\n var existing = (0,_parser_js__WEBPACK_IMPORTED_MODULE_1__.findNodeAtLocation)(parent, [lastSegment]);\n if (existing !== void 0) {\n if (value === void 0) { // delete\n if (!existing.parent) {\n throw new Error('Malformed AST');\n }\n var propertyIndex = parent.children.indexOf(existing.parent);\n var removeBegin = void 0;\n var removeEnd = existing.parent.offset + existing.parent.length;\n if (propertyIndex > 0) {\n // remove the comma of the previous node\n var previous = parent.children[propertyIndex - 1];\n removeBegin = previous.offset + previous.length;\n }\n else {\n removeBegin = parent.offset + 1;\n if (parent.children.length > 1) {\n // remove the comma of the next node\n var next = parent.children[1];\n removeEnd = next.offset;\n }\n }\n return withFormatting(text, { offset: removeBegin, length: removeEnd - removeBegin, content: '' }, options);\n }\n else {\n // set value of existing property\n return withFormatting(text, { offset: existing.offset, length: existing.length, content: JSON.stringify(value) }, options);\n }\n }\n else {\n if (value === void 0) { // delete\n return []; // property does not exist, nothing to do\n }\n var newProperty = JSON.stringify(lastSegment) + \": \" + JSON.stringify(value);\n var index = options.getInsertionIndex ? options.getInsertionIndex(parent.children.map(function (p) { return p.children[0].value; })) : parent.children.length;\n var edit = void 0;\n if (index > 0) {\n var previous = parent.children[index - 1];\n edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };\n }\n else if (parent.children.length === 0) {\n edit = { offset: parent.offset + 1, length: 0, content: newProperty };\n }\n else {\n edit = { offset: parent.offset + 1, length: 0, content: newProperty + ',' };\n }\n return withFormatting(text, edit, options);\n }\n }\n else if (parent.type === 'array' && typeof lastSegment === 'number' && Array.isArray(parent.children)) {\n var insertIndex = lastSegment;\n if (insertIndex === -1) {\n // Insert\n var newProperty = \"\" + JSON.stringify(value);\n var edit = void 0;\n if (parent.children.length === 0) {\n edit = { offset: parent.offset + 1, length: 0, content: newProperty };\n }\n else {\n var previous = parent.children[parent.children.length - 1];\n edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };\n }\n return withFormatting(text, edit, options);\n }\n else if (value === void 0 && parent.children.length >= 0) {\n // Removal\n var removalIndex = lastSegment;\n var toRemove = parent.children[removalIndex];\n var edit = void 0;\n if (parent.children.length === 1) {\n // only item\n edit = { offset: parent.offset + 1, length: parent.length - 2, content: '' };\n }\n else if (parent.children.length - 1 === removalIndex) {\n // last item\n var previous = parent.children[removalIndex - 1];\n var offset = previous.offset + previous.length;\n var parentEndOffset = parent.offset + parent.length;\n edit = { offset: offset, length: parentEndOffset - 2 - offset, content: '' };\n }\n else {\n edit = { offset: toRemove.offset, length: parent.children[removalIndex + 1].offset - toRemove.offset, content: '' };\n }\n return withFormatting(text, edit, options);\n }\n else if (value !== void 0) {\n var edit = void 0;\n var newProperty = \"\" + JSON.stringify(value);\n if (!options.isArrayInsertion && parent.children.length > lastSegment) {\n var toModify = parent.children[lastSegment];\n edit = { offset: toModify.offset, length: toModify.length, content: newProperty };\n }\n else if (parent.children.length === 0 || lastSegment === 0) {\n edit = { offset: parent.offset + 1, length: 0, content: parent.children.length === 0 ? newProperty : newProperty + ',' };\n }\n else {\n var index = lastSegment > parent.children.length ? parent.children.length : lastSegment;\n var previous = parent.children[index - 1];\n edit = { offset: previous.offset + previous.length, length: 0, content: ',' + newProperty };\n }\n return withFormatting(text, edit, options);\n }\n else {\n throw new Error(\"Can not \" + (value === void 0 ? 'remove' : (options.isArrayInsertion ? 'insert' : 'modify')) + \" Array index \" + insertIndex + \" as length is not sufficient\");\n }\n }\n else {\n throw new Error(\"Can not add \" + (typeof lastSegment !== 'number' ? 'index' : 'property') + \" to parent of type \" + parent.type);\n }\n}\nfunction withFormatting(text, edit, options) {\n if (!options.formattingOptions) {\n return [edit];\n }\n // apply the edit\n var newText = applyEdit(text, edit);\n // format the new text\n var begin = edit.offset;\n var end = edit.offset + edit.content.length;\n if (edit.length === 0 || edit.content.length === 0) { // insert or remove\n while (begin > 0 && !(0,_format_js__WEBPACK_IMPORTED_MODULE_0__.isEOL)(newText, begin - 1)) {\n begin--;\n }\n while (end < newText.length && !(0,_format_js__WEBPACK_IMPORTED_MODULE_0__.isEOL)(newText, end)) {\n end++;\n }\n }\n var edits = (0,_format_js__WEBPACK_IMPORTED_MODULE_0__.format)(newText, { offset: begin, length: end - begin }, options.formattingOptions);\n // apply the formatting edits and track the begin and end offsets of the changes\n for (var i = edits.length - 1; i >= 0; i--) {\n var edit_1 = edits[i];\n newText = applyEdit(newText, edit_1);\n begin = Math.min(begin, edit_1.offset);\n end = Math.max(end, edit_1.offset + edit_1.length);\n end += edit_1.content.length - edit_1.length;\n }\n // create a single edit with all changes\n var editLength = text.length - (newText.length - end) - begin;\n return [{ offset: begin, length: editLength, content: newText.substring(begin, end) }];\n}\nfunction applyEdit(text, edit) {\n return text.substring(0, edit.offset) + edit.content + text.substring(edit.offset + edit.length);\n}\nfunction isWS(text, offset) {\n return '\\r\\n \\t'.indexOf(text.charAt(offset)) !== -1;\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/edit.js?");
19
19
 
20
20
  /***/ }),
21
21
 
@@ -35,7 +35,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
35
35
  \*******************************************************************************************/
36
36
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
37
37
 
38
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"getLocation\": () => (/* binding */ getLocation),\n/* harmony export */ \"parse\": () => (/* binding */ parse),\n/* harmony export */ \"parseTree\": () => (/* binding */ parseTree),\n/* harmony export */ \"findNodeAtLocation\": () => (/* binding */ findNodeAtLocation),\n/* harmony export */ \"getNodePath\": () => (/* binding */ getNodePath),\n/* harmony export */ \"getNodeValue\": () => (/* binding */ getNodeValue),\n/* harmony export */ \"contains\": () => (/* binding */ contains),\n/* harmony export */ \"findNodeAtOffset\": () => (/* binding */ findNodeAtOffset),\n/* harmony export */ \"visit\": () => (/* binding */ visit),\n/* harmony export */ \"stripComments\": () => (/* binding */ stripComments),\n/* harmony export */ \"getNodeType\": () => (/* binding */ getNodeType)\n/* harmony export */ });\n/* harmony import */ var _scanner_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scanner.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/scanner.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\nvar ParseOptions;\n(function (ParseOptions) {\n ParseOptions.DEFAULT = {\n allowTrailingComma: false\n };\n})(ParseOptions || (ParseOptions = {}));\n/**\n * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.\n */\nfunction getLocation(text, position) {\n var segments = []; // strings or numbers\n var earlyReturnException = new Object();\n var previousNode = undefined;\n var previousNodeInst = {\n value: {},\n offset: 0,\n length: 0,\n type: 'object',\n parent: undefined\n };\n var isAtPropertyKey = false;\n function setPreviousNode(value, offset, length, type) {\n previousNodeInst.value = value;\n previousNodeInst.offset = offset;\n previousNodeInst.length = length;\n previousNodeInst.type = type;\n previousNodeInst.colonOffset = undefined;\n previousNode = previousNodeInst;\n }\n try {\n visit(text, {\n onObjectBegin: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n isAtPropertyKey = position > offset;\n segments.push(''); // push a placeholder (will be replaced)\n },\n onObjectProperty: function (name, offset, length) {\n if (position < offset) {\n throw earlyReturnException;\n }\n setPreviousNode(name, offset, length, 'property');\n segments[segments.length - 1] = name;\n if (position <= offset + length) {\n throw earlyReturnException;\n }\n },\n onObjectEnd: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.pop();\n },\n onArrayBegin: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.push(0);\n },\n onArrayEnd: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.pop();\n },\n onLiteralValue: function (value, offset, length) {\n if (position < offset) {\n throw earlyReturnException;\n }\n setPreviousNode(value, offset, length, getNodeType(value));\n if (position <= offset + length) {\n throw earlyReturnException;\n }\n },\n onSeparator: function (sep, offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n if (sep === ':' && previousNode && previousNode.type === 'property') {\n previousNode.colonOffset = offset;\n isAtPropertyKey = false;\n previousNode = undefined;\n }\n else if (sep === ',') {\n var last = segments[segments.length - 1];\n if (typeof last === 'number') {\n segments[segments.length - 1] = last + 1;\n }\n else {\n isAtPropertyKey = true;\n segments[segments.length - 1] = '';\n }\n previousNode = undefined;\n }\n }\n });\n }\n catch (e) {\n if (e !== earlyReturnException) {\n throw e;\n }\n }\n return {\n path: segments,\n previousNode: previousNode,\n isAtPropertyKey: isAtPropertyKey,\n matches: function (pattern) {\n var k = 0;\n for (var i = 0; k < pattern.length && i < segments.length; i++) {\n if (pattern[k] === segments[i] || pattern[k] === '*') {\n k++;\n }\n else if (pattern[k] !== '**') {\n return false;\n }\n }\n return k === pattern.length;\n }\n };\n}\n/**\n * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n * Therefore always check the errors list to find out if the input was valid.\n */\nfunction parse(text, errors, options) {\n if (errors === void 0) { errors = []; }\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var currentProperty = null;\n var currentParent = [];\n var previousParents = [];\n function onValue(value) {\n if (Array.isArray(currentParent)) {\n currentParent.push(value);\n }\n else if (currentProperty !== null) {\n currentParent[currentProperty] = value;\n }\n }\n var visitor = {\n onObjectBegin: function () {\n var object = {};\n onValue(object);\n previousParents.push(currentParent);\n currentParent = object;\n currentProperty = null;\n },\n onObjectProperty: function (name) {\n currentProperty = name;\n },\n onObjectEnd: function () {\n currentParent = previousParents.pop();\n },\n onArrayBegin: function () {\n var array = [];\n onValue(array);\n previousParents.push(currentParent);\n currentParent = array;\n currentProperty = null;\n },\n onArrayEnd: function () {\n currentParent = previousParents.pop();\n },\n onLiteralValue: onValue,\n onError: function (error, offset, length) {\n errors.push({ error: error, offset: offset, length: length });\n }\n };\n visit(text, visitor, options);\n return currentParent[0];\n}\n/**\n * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n */\nfunction parseTree(text, errors, options) {\n if (errors === void 0) { errors = []; }\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var currentParent = { type: 'array', offset: -1, length: -1, children: [], parent: undefined }; // artificial root\n function ensurePropertyComplete(endOffset) {\n if (currentParent.type === 'property') {\n currentParent.length = endOffset - currentParent.offset;\n currentParent = currentParent.parent;\n }\n }\n function onValue(valueNode) {\n currentParent.children.push(valueNode);\n return valueNode;\n }\n var visitor = {\n onObjectBegin: function (offset) {\n currentParent = onValue({ type: 'object', offset: offset, length: -1, parent: currentParent, children: [] });\n },\n onObjectProperty: function (name, offset, length) {\n currentParent = onValue({ type: 'property', offset: offset, length: -1, parent: currentParent, children: [] });\n currentParent.children.push({ type: 'string', value: name, offset: offset, length: length, parent: currentParent });\n },\n onObjectEnd: function (offset, length) {\n ensurePropertyComplete(offset + length); // in case of a missing value for a property: make sure property is complete\n currentParent.length = offset + length - currentParent.offset;\n currentParent = currentParent.parent;\n ensurePropertyComplete(offset + length);\n },\n onArrayBegin: function (offset, length) {\n currentParent = onValue({ type: 'array', offset: offset, length: -1, parent: currentParent, children: [] });\n },\n onArrayEnd: function (offset, length) {\n currentParent.length = offset + length - currentParent.offset;\n currentParent = currentParent.parent;\n ensurePropertyComplete(offset + length);\n },\n onLiteralValue: function (value, offset, length) {\n onValue({ type: getNodeType(value), offset: offset, length: length, parent: currentParent, value: value });\n ensurePropertyComplete(offset + length);\n },\n onSeparator: function (sep, offset, length) {\n if (currentParent.type === 'property') {\n if (sep === ':') {\n currentParent.colonOffset = offset;\n }\n else if (sep === ',') {\n ensurePropertyComplete(offset);\n }\n }\n },\n onError: function (error, offset, length) {\n errors.push({ error: error, offset: offset, length: length });\n }\n };\n visit(text, visitor, options);\n var result = currentParent.children[0];\n if (result) {\n delete result.parent;\n }\n return result;\n}\n/**\n * Finds the node at the given path in a JSON DOM.\n */\nfunction findNodeAtLocation(root, path) {\n if (!root) {\n return undefined;\n }\n var node = root;\n for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {\n var segment = path_1[_i];\n if (typeof segment === 'string') {\n if (node.type !== 'object' || !Array.isArray(node.children)) {\n return undefined;\n }\n var found = false;\n for (var _a = 0, _b = node.children; _a < _b.length; _a++) {\n var propertyNode = _b[_a];\n if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment) {\n node = propertyNode.children[1];\n found = true;\n break;\n }\n }\n if (!found) {\n return undefined;\n }\n }\n else {\n var index = segment;\n if (node.type !== 'array' || index < 0 || !Array.isArray(node.children) || index >= node.children.length) {\n return undefined;\n }\n node = node.children[index];\n }\n }\n return node;\n}\n/**\n * Gets the JSON path of the given JSON DOM node\n */\nfunction getNodePath(node) {\n if (!node.parent || !node.parent.children) {\n return [];\n }\n var path = getNodePath(node.parent);\n if (node.parent.type === 'property') {\n var key = node.parent.children[0].value;\n path.push(key);\n }\n else if (node.parent.type === 'array') {\n var index = node.parent.children.indexOf(node);\n if (index !== -1) {\n path.push(index);\n }\n }\n return path;\n}\n/**\n * Evaluates the JavaScript object of the given JSON DOM node\n */\nfunction getNodeValue(node) {\n switch (node.type) {\n case 'array':\n return node.children.map(getNodeValue);\n case 'object':\n var obj = Object.create(null);\n for (var _i = 0, _a = node.children; _i < _a.length; _i++) {\n var prop = _a[_i];\n var valueNode = prop.children[1];\n if (valueNode) {\n obj[prop.children[0].value] = getNodeValue(valueNode);\n }\n }\n return obj;\n case 'null':\n case 'string':\n case 'number':\n case 'boolean':\n return node.value;\n default:\n return undefined;\n }\n}\nfunction contains(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n return (offset >= node.offset && offset < (node.offset + node.length)) || includeRightBound && (offset === (node.offset + node.length));\n}\n/**\n * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.\n */\nfunction findNodeAtOffset(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n if (contains(node, offset, includeRightBound)) {\n var children = node.children;\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length && children[i].offset <= offset; i++) {\n var item = findNodeAtOffset(children[i], offset, includeRightBound);\n if (item) {\n return item;\n }\n }\n }\n return node;\n }\n return undefined;\n}\n/**\n * Parses the given text and invokes the visitor functions for each object, array and literal reached.\n */\nfunction visit(text, visitor, options) {\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var _scanner = (0,_scanner_js__WEBPACK_IMPORTED_MODULE_0__.createScanner)(text, false);\n function toNoArgVisit(visitFunction) {\n return visitFunction ? function () { return visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()); } : function () { return true; };\n }\n function toOneArgVisit(visitFunction) {\n return visitFunction ? function (arg) { return visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()); } : function () { return true; };\n }\n var onObjectBegin = toNoArgVisit(visitor.onObjectBegin), onObjectProperty = toOneArgVisit(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisit(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisit(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);\n var disallowComments = options && options.disallowComments;\n var allowTrailingComma = options && options.allowTrailingComma;\n function scanNext() {\n while (true) {\n var token = _scanner.scan();\n switch (_scanner.getTokenError()) {\n case 4 /* InvalidUnicode */:\n handleError(14 /* InvalidUnicode */);\n break;\n case 5 /* InvalidEscapeCharacter */:\n handleError(15 /* InvalidEscapeCharacter */);\n break;\n case 3 /* UnexpectedEndOfNumber */:\n handleError(13 /* UnexpectedEndOfNumber */);\n break;\n case 1 /* UnexpectedEndOfComment */:\n if (!disallowComments) {\n handleError(11 /* UnexpectedEndOfComment */);\n }\n break;\n case 2 /* UnexpectedEndOfString */:\n handleError(12 /* UnexpectedEndOfString */);\n break;\n case 6 /* InvalidCharacter */:\n handleError(16 /* InvalidCharacter */);\n break;\n }\n switch (token) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n if (disallowComments) {\n handleError(10 /* InvalidCommentToken */);\n }\n else {\n onComment();\n }\n break;\n case 16 /* Unknown */:\n handleError(1 /* InvalidSymbol */);\n break;\n case 15 /* Trivia */:\n case 14 /* LineBreakTrivia */:\n break;\n default:\n return token;\n }\n }\n }\n function handleError(error, skipUntilAfter, skipUntil) {\n if (skipUntilAfter === void 0) { skipUntilAfter = []; }\n if (skipUntil === void 0) { skipUntil = []; }\n onError(error);\n if (skipUntilAfter.length + skipUntil.length > 0) {\n var token = _scanner.getToken();\n while (token !== 17 /* EOF */) {\n if (skipUntilAfter.indexOf(token) !== -1) {\n scanNext();\n break;\n }\n else if (skipUntil.indexOf(token) !== -1) {\n break;\n }\n token = scanNext();\n }\n }\n }\n function parseString(isValue) {\n var value = _scanner.getTokenValue();\n if (isValue) {\n onLiteralValue(value);\n }\n else {\n onObjectProperty(value);\n }\n scanNext();\n return true;\n }\n function parseLiteral() {\n switch (_scanner.getToken()) {\n case 11 /* NumericLiteral */:\n var tokenValue = _scanner.getTokenValue();\n var value = Number(tokenValue);\n if (isNaN(value)) {\n handleError(2 /* InvalidNumberFormat */);\n value = 0;\n }\n onLiteralValue(value);\n break;\n case 7 /* NullKeyword */:\n onLiteralValue(null);\n break;\n case 8 /* TrueKeyword */:\n onLiteralValue(true);\n break;\n case 9 /* FalseKeyword */:\n onLiteralValue(false);\n break;\n default:\n return false;\n }\n scanNext();\n return true;\n }\n function parseProperty() {\n if (_scanner.getToken() !== 10 /* StringLiteral */) {\n handleError(3 /* PropertyNameExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n return false;\n }\n parseString(false);\n if (_scanner.getToken() === 6 /* ColonToken */) {\n onSeparator(':');\n scanNext(); // consume colon\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n }\n else {\n handleError(5 /* ColonExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n return true;\n }\n function parseObject() {\n onObjectBegin();\n scanNext(); // consume open brace\n var needsComma = false;\n while (_scanner.getToken() !== 2 /* CloseBraceToken */ && _scanner.getToken() !== 17 /* EOF */) {\n if (_scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n handleError(4 /* ValueExpected */, [], []);\n }\n onSeparator(',');\n scanNext(); // consume comma\n if (_scanner.getToken() === 2 /* CloseBraceToken */ && allowTrailingComma) {\n break;\n }\n }\n else if (needsComma) {\n handleError(6 /* CommaExpected */, [], []);\n }\n if (!parseProperty()) {\n handleError(4 /* ValueExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n needsComma = true;\n }\n onObjectEnd();\n if (_scanner.getToken() !== 2 /* CloseBraceToken */) {\n handleError(7 /* CloseBraceExpected */, [2 /* CloseBraceToken */], []);\n }\n else {\n scanNext(); // consume close brace\n }\n return true;\n }\n function parseArray() {\n onArrayBegin();\n scanNext(); // consume open bracket\n var needsComma = false;\n while (_scanner.getToken() !== 4 /* CloseBracketToken */ && _scanner.getToken() !== 17 /* EOF */) {\n if (_scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n handleError(4 /* ValueExpected */, [], []);\n }\n onSeparator(',');\n scanNext(); // consume comma\n if (_scanner.getToken() === 4 /* CloseBracketToken */ && allowTrailingComma) {\n break;\n }\n }\n else if (needsComma) {\n handleError(6 /* CommaExpected */, [], []);\n }\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], [4 /* CloseBracketToken */, 5 /* CommaToken */]);\n }\n needsComma = true;\n }\n onArrayEnd();\n if (_scanner.getToken() !== 4 /* CloseBracketToken */) {\n handleError(8 /* CloseBracketExpected */, [4 /* CloseBracketToken */], []);\n }\n else {\n scanNext(); // consume close bracket\n }\n return true;\n }\n function parseValue() {\n switch (_scanner.getToken()) {\n case 3 /* OpenBracketToken */:\n return parseArray();\n case 1 /* OpenBraceToken */:\n return parseObject();\n case 10 /* StringLiteral */:\n return parseString(true);\n default:\n return parseLiteral();\n }\n }\n scanNext();\n if (_scanner.getToken() === 17 /* EOF */) {\n if (options.allowEmptyContent) {\n return true;\n }\n handleError(4 /* ValueExpected */, [], []);\n return false;\n }\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], []);\n return false;\n }\n if (_scanner.getToken() !== 17 /* EOF */) {\n handleError(9 /* EndOfFileExpected */, [], []);\n }\n return true;\n}\n/**\n * Takes JSON with JavaScript-style comments and remove\n * them. Optionally replaces every none-newline character\n * of comments with a replaceCharacter\n */\nfunction stripComments(text, replaceCh) {\n var _scanner = (0,_scanner_js__WEBPACK_IMPORTED_MODULE_0__.createScanner)(text), parts = [], kind, offset = 0, pos;\n do {\n pos = _scanner.getPosition();\n kind = _scanner.scan();\n switch (kind) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n case 17 /* EOF */:\n if (offset !== pos) {\n parts.push(text.substring(offset, pos));\n }\n if (replaceCh !== undefined) {\n parts.push(_scanner.getTokenValue().replace(/[^\\r\\n]/g, replaceCh));\n }\n offset = _scanner.getPosition();\n break;\n }\n } while (kind !== 17 /* EOF */);\n return parts.join('');\n}\nfunction getNodeType(value) {\n switch (typeof value) {\n case 'boolean': return 'boolean';\n case 'number': return 'number';\n case 'string': return 'string';\n case 'object': {\n if (!value) {\n return 'null';\n }\n else if (Array.isArray(value)) {\n return 'array';\n }\n return 'object';\n }\n default: return 'null';\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/parser.js?");
38
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"contains\": () => (/* binding */ contains),\n/* harmony export */ \"findNodeAtLocation\": () => (/* binding */ findNodeAtLocation),\n/* harmony export */ \"findNodeAtOffset\": () => (/* binding */ findNodeAtOffset),\n/* harmony export */ \"getLocation\": () => (/* binding */ getLocation),\n/* harmony export */ \"getNodePath\": () => (/* binding */ getNodePath),\n/* harmony export */ \"getNodeType\": () => (/* binding */ getNodeType),\n/* harmony export */ \"getNodeValue\": () => (/* binding */ getNodeValue),\n/* harmony export */ \"parse\": () => (/* binding */ parse),\n/* harmony export */ \"parseTree\": () => (/* binding */ parseTree),\n/* harmony export */ \"stripComments\": () => (/* binding */ stripComments),\n/* harmony export */ \"visit\": () => (/* binding */ visit)\n/* harmony export */ });\n/* harmony import */ var _scanner_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./scanner.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/scanner.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\nvar ParseOptions;\n(function (ParseOptions) {\n ParseOptions.DEFAULT = {\n allowTrailingComma: false\n };\n})(ParseOptions || (ParseOptions = {}));\n/**\n * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.\n */\nfunction getLocation(text, position) {\n var segments = []; // strings or numbers\n var earlyReturnException = new Object();\n var previousNode = undefined;\n var previousNodeInst = {\n value: {},\n offset: 0,\n length: 0,\n type: 'object',\n parent: undefined\n };\n var isAtPropertyKey = false;\n function setPreviousNode(value, offset, length, type) {\n previousNodeInst.value = value;\n previousNodeInst.offset = offset;\n previousNodeInst.length = length;\n previousNodeInst.type = type;\n previousNodeInst.colonOffset = undefined;\n previousNode = previousNodeInst;\n }\n try {\n visit(text, {\n onObjectBegin: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n isAtPropertyKey = position > offset;\n segments.push(''); // push a placeholder (will be replaced)\n },\n onObjectProperty: function (name, offset, length) {\n if (position < offset) {\n throw earlyReturnException;\n }\n setPreviousNode(name, offset, length, 'property');\n segments[segments.length - 1] = name;\n if (position <= offset + length) {\n throw earlyReturnException;\n }\n },\n onObjectEnd: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.pop();\n },\n onArrayBegin: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.push(0);\n },\n onArrayEnd: function (offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n previousNode = undefined;\n segments.pop();\n },\n onLiteralValue: function (value, offset, length) {\n if (position < offset) {\n throw earlyReturnException;\n }\n setPreviousNode(value, offset, length, getNodeType(value));\n if (position <= offset + length) {\n throw earlyReturnException;\n }\n },\n onSeparator: function (sep, offset, length) {\n if (position <= offset) {\n throw earlyReturnException;\n }\n if (sep === ':' && previousNode && previousNode.type === 'property') {\n previousNode.colonOffset = offset;\n isAtPropertyKey = false;\n previousNode = undefined;\n }\n else if (sep === ',') {\n var last = segments[segments.length - 1];\n if (typeof last === 'number') {\n segments[segments.length - 1] = last + 1;\n }\n else {\n isAtPropertyKey = true;\n segments[segments.length - 1] = '';\n }\n previousNode = undefined;\n }\n }\n });\n }\n catch (e) {\n if (e !== earlyReturnException) {\n throw e;\n }\n }\n return {\n path: segments,\n previousNode: previousNode,\n isAtPropertyKey: isAtPropertyKey,\n matches: function (pattern) {\n var k = 0;\n for (var i = 0; k < pattern.length && i < segments.length; i++) {\n if (pattern[k] === segments[i] || pattern[k] === '*') {\n k++;\n }\n else if (pattern[k] !== '**') {\n return false;\n }\n }\n return k === pattern.length;\n }\n };\n}\n/**\n * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n * Therefore always check the errors list to find out if the input was valid.\n */\nfunction parse(text, errors, options) {\n if (errors === void 0) { errors = []; }\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var currentProperty = null;\n var currentParent = [];\n var previousParents = [];\n function onValue(value) {\n if (Array.isArray(currentParent)) {\n currentParent.push(value);\n }\n else if (currentProperty !== null) {\n currentParent[currentProperty] = value;\n }\n }\n var visitor = {\n onObjectBegin: function () {\n var object = {};\n onValue(object);\n previousParents.push(currentParent);\n currentParent = object;\n currentProperty = null;\n },\n onObjectProperty: function (name) {\n currentProperty = name;\n },\n onObjectEnd: function () {\n currentParent = previousParents.pop();\n },\n onArrayBegin: function () {\n var array = [];\n onValue(array);\n previousParents.push(currentParent);\n currentParent = array;\n currentProperty = null;\n },\n onArrayEnd: function () {\n currentParent = previousParents.pop();\n },\n onLiteralValue: onValue,\n onError: function (error, offset, length) {\n errors.push({ error: error, offset: offset, length: length });\n }\n };\n visit(text, visitor, options);\n return currentParent[0];\n}\n/**\n * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n */\nfunction parseTree(text, errors, options) {\n if (errors === void 0) { errors = []; }\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var currentParent = { type: 'array', offset: -1, length: -1, children: [], parent: undefined }; // artificial root\n function ensurePropertyComplete(endOffset) {\n if (currentParent.type === 'property') {\n currentParent.length = endOffset - currentParent.offset;\n currentParent = currentParent.parent;\n }\n }\n function onValue(valueNode) {\n currentParent.children.push(valueNode);\n return valueNode;\n }\n var visitor = {\n onObjectBegin: function (offset) {\n currentParent = onValue({ type: 'object', offset: offset, length: -1, parent: currentParent, children: [] });\n },\n onObjectProperty: function (name, offset, length) {\n currentParent = onValue({ type: 'property', offset: offset, length: -1, parent: currentParent, children: [] });\n currentParent.children.push({ type: 'string', value: name, offset: offset, length: length, parent: currentParent });\n },\n onObjectEnd: function (offset, length) {\n ensurePropertyComplete(offset + length); // in case of a missing value for a property: make sure property is complete\n currentParent.length = offset + length - currentParent.offset;\n currentParent = currentParent.parent;\n ensurePropertyComplete(offset + length);\n },\n onArrayBegin: function (offset, length) {\n currentParent = onValue({ type: 'array', offset: offset, length: -1, parent: currentParent, children: [] });\n },\n onArrayEnd: function (offset, length) {\n currentParent.length = offset + length - currentParent.offset;\n currentParent = currentParent.parent;\n ensurePropertyComplete(offset + length);\n },\n onLiteralValue: function (value, offset, length) {\n onValue({ type: getNodeType(value), offset: offset, length: length, parent: currentParent, value: value });\n ensurePropertyComplete(offset + length);\n },\n onSeparator: function (sep, offset, length) {\n if (currentParent.type === 'property') {\n if (sep === ':') {\n currentParent.colonOffset = offset;\n }\n else if (sep === ',') {\n ensurePropertyComplete(offset);\n }\n }\n },\n onError: function (error, offset, length) {\n errors.push({ error: error, offset: offset, length: length });\n }\n };\n visit(text, visitor, options);\n var result = currentParent.children[0];\n if (result) {\n delete result.parent;\n }\n return result;\n}\n/**\n * Finds the node at the given path in a JSON DOM.\n */\nfunction findNodeAtLocation(root, path) {\n if (!root) {\n return undefined;\n }\n var node = root;\n for (var _i = 0, path_1 = path; _i < path_1.length; _i++) {\n var segment = path_1[_i];\n if (typeof segment === 'string') {\n if (node.type !== 'object' || !Array.isArray(node.children)) {\n return undefined;\n }\n var found = false;\n for (var _a = 0, _b = node.children; _a < _b.length; _a++) {\n var propertyNode = _b[_a];\n if (Array.isArray(propertyNode.children) && propertyNode.children[0].value === segment) {\n node = propertyNode.children[1];\n found = true;\n break;\n }\n }\n if (!found) {\n return undefined;\n }\n }\n else {\n var index = segment;\n if (node.type !== 'array' || index < 0 || !Array.isArray(node.children) || index >= node.children.length) {\n return undefined;\n }\n node = node.children[index];\n }\n }\n return node;\n}\n/**\n * Gets the JSON path of the given JSON DOM node\n */\nfunction getNodePath(node) {\n if (!node.parent || !node.parent.children) {\n return [];\n }\n var path = getNodePath(node.parent);\n if (node.parent.type === 'property') {\n var key = node.parent.children[0].value;\n path.push(key);\n }\n else if (node.parent.type === 'array') {\n var index = node.parent.children.indexOf(node);\n if (index !== -1) {\n path.push(index);\n }\n }\n return path;\n}\n/**\n * Evaluates the JavaScript object of the given JSON DOM node\n */\nfunction getNodeValue(node) {\n switch (node.type) {\n case 'array':\n return node.children.map(getNodeValue);\n case 'object':\n var obj = Object.create(null);\n for (var _i = 0, _a = node.children; _i < _a.length; _i++) {\n var prop = _a[_i];\n var valueNode = prop.children[1];\n if (valueNode) {\n obj[prop.children[0].value] = getNodeValue(valueNode);\n }\n }\n return obj;\n case 'null':\n case 'string':\n case 'number':\n case 'boolean':\n return node.value;\n default:\n return undefined;\n }\n}\nfunction contains(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n return (offset >= node.offset && offset < (node.offset + node.length)) || includeRightBound && (offset === (node.offset + node.length));\n}\n/**\n * Finds the most inner node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.\n */\nfunction findNodeAtOffset(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n if (contains(node, offset, includeRightBound)) {\n var children = node.children;\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length && children[i].offset <= offset; i++) {\n var item = findNodeAtOffset(children[i], offset, includeRightBound);\n if (item) {\n return item;\n }\n }\n }\n return node;\n }\n return undefined;\n}\n/**\n * Parses the given text and invokes the visitor functions for each object, array and literal reached.\n */\nfunction visit(text, visitor, options) {\n if (options === void 0) { options = ParseOptions.DEFAULT; }\n var _scanner = (0,_scanner_js__WEBPACK_IMPORTED_MODULE_0__.createScanner)(text, false);\n function toNoArgVisit(visitFunction) {\n return visitFunction ? function () { return visitFunction(_scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()); } : function () { return true; };\n }\n function toOneArgVisit(visitFunction) {\n return visitFunction ? function (arg) { return visitFunction(arg, _scanner.getTokenOffset(), _scanner.getTokenLength(), _scanner.getTokenStartLine(), _scanner.getTokenStartCharacter()); } : function () { return true; };\n }\n var onObjectBegin = toNoArgVisit(visitor.onObjectBegin), onObjectProperty = toOneArgVisit(visitor.onObjectProperty), onObjectEnd = toNoArgVisit(visitor.onObjectEnd), onArrayBegin = toNoArgVisit(visitor.onArrayBegin), onArrayEnd = toNoArgVisit(visitor.onArrayEnd), onLiteralValue = toOneArgVisit(visitor.onLiteralValue), onSeparator = toOneArgVisit(visitor.onSeparator), onComment = toNoArgVisit(visitor.onComment), onError = toOneArgVisit(visitor.onError);\n var disallowComments = options && options.disallowComments;\n var allowTrailingComma = options && options.allowTrailingComma;\n function scanNext() {\n while (true) {\n var token = _scanner.scan();\n switch (_scanner.getTokenError()) {\n case 4 /* InvalidUnicode */:\n handleError(14 /* InvalidUnicode */);\n break;\n case 5 /* InvalidEscapeCharacter */:\n handleError(15 /* InvalidEscapeCharacter */);\n break;\n case 3 /* UnexpectedEndOfNumber */:\n handleError(13 /* UnexpectedEndOfNumber */);\n break;\n case 1 /* UnexpectedEndOfComment */:\n if (!disallowComments) {\n handleError(11 /* UnexpectedEndOfComment */);\n }\n break;\n case 2 /* UnexpectedEndOfString */:\n handleError(12 /* UnexpectedEndOfString */);\n break;\n case 6 /* InvalidCharacter */:\n handleError(16 /* InvalidCharacter */);\n break;\n }\n switch (token) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n if (disallowComments) {\n handleError(10 /* InvalidCommentToken */);\n }\n else {\n onComment();\n }\n break;\n case 16 /* Unknown */:\n handleError(1 /* InvalidSymbol */);\n break;\n case 15 /* Trivia */:\n case 14 /* LineBreakTrivia */:\n break;\n default:\n return token;\n }\n }\n }\n function handleError(error, skipUntilAfter, skipUntil) {\n if (skipUntilAfter === void 0) { skipUntilAfter = []; }\n if (skipUntil === void 0) { skipUntil = []; }\n onError(error);\n if (skipUntilAfter.length + skipUntil.length > 0) {\n var token = _scanner.getToken();\n while (token !== 17 /* EOF */) {\n if (skipUntilAfter.indexOf(token) !== -1) {\n scanNext();\n break;\n }\n else if (skipUntil.indexOf(token) !== -1) {\n break;\n }\n token = scanNext();\n }\n }\n }\n function parseString(isValue) {\n var value = _scanner.getTokenValue();\n if (isValue) {\n onLiteralValue(value);\n }\n else {\n onObjectProperty(value);\n }\n scanNext();\n return true;\n }\n function parseLiteral() {\n switch (_scanner.getToken()) {\n case 11 /* NumericLiteral */:\n var tokenValue = _scanner.getTokenValue();\n var value = Number(tokenValue);\n if (isNaN(value)) {\n handleError(2 /* InvalidNumberFormat */);\n value = 0;\n }\n onLiteralValue(value);\n break;\n case 7 /* NullKeyword */:\n onLiteralValue(null);\n break;\n case 8 /* TrueKeyword */:\n onLiteralValue(true);\n break;\n case 9 /* FalseKeyword */:\n onLiteralValue(false);\n break;\n default:\n return false;\n }\n scanNext();\n return true;\n }\n function parseProperty() {\n if (_scanner.getToken() !== 10 /* StringLiteral */) {\n handleError(3 /* PropertyNameExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n return false;\n }\n parseString(false);\n if (_scanner.getToken() === 6 /* ColonToken */) {\n onSeparator(':');\n scanNext(); // consume colon\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n }\n else {\n handleError(5 /* ColonExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n return true;\n }\n function parseObject() {\n onObjectBegin();\n scanNext(); // consume open brace\n var needsComma = false;\n while (_scanner.getToken() !== 2 /* CloseBraceToken */ && _scanner.getToken() !== 17 /* EOF */) {\n if (_scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n handleError(4 /* ValueExpected */, [], []);\n }\n onSeparator(',');\n scanNext(); // consume comma\n if (_scanner.getToken() === 2 /* CloseBraceToken */ && allowTrailingComma) {\n break;\n }\n }\n else if (needsComma) {\n handleError(6 /* CommaExpected */, [], []);\n }\n if (!parseProperty()) {\n handleError(4 /* ValueExpected */, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n needsComma = true;\n }\n onObjectEnd();\n if (_scanner.getToken() !== 2 /* CloseBraceToken */) {\n handleError(7 /* CloseBraceExpected */, [2 /* CloseBraceToken */], []);\n }\n else {\n scanNext(); // consume close brace\n }\n return true;\n }\n function parseArray() {\n onArrayBegin();\n scanNext(); // consume open bracket\n var needsComma = false;\n while (_scanner.getToken() !== 4 /* CloseBracketToken */ && _scanner.getToken() !== 17 /* EOF */) {\n if (_scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n handleError(4 /* ValueExpected */, [], []);\n }\n onSeparator(',');\n scanNext(); // consume comma\n if (_scanner.getToken() === 4 /* CloseBracketToken */ && allowTrailingComma) {\n break;\n }\n }\n else if (needsComma) {\n handleError(6 /* CommaExpected */, [], []);\n }\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], [4 /* CloseBracketToken */, 5 /* CommaToken */]);\n }\n needsComma = true;\n }\n onArrayEnd();\n if (_scanner.getToken() !== 4 /* CloseBracketToken */) {\n handleError(8 /* CloseBracketExpected */, [4 /* CloseBracketToken */], []);\n }\n else {\n scanNext(); // consume close bracket\n }\n return true;\n }\n function parseValue() {\n switch (_scanner.getToken()) {\n case 3 /* OpenBracketToken */:\n return parseArray();\n case 1 /* OpenBraceToken */:\n return parseObject();\n case 10 /* StringLiteral */:\n return parseString(true);\n default:\n return parseLiteral();\n }\n }\n scanNext();\n if (_scanner.getToken() === 17 /* EOF */) {\n if (options.allowEmptyContent) {\n return true;\n }\n handleError(4 /* ValueExpected */, [], []);\n return false;\n }\n if (!parseValue()) {\n handleError(4 /* ValueExpected */, [], []);\n return false;\n }\n if (_scanner.getToken() !== 17 /* EOF */) {\n handleError(9 /* EndOfFileExpected */, [], []);\n }\n return true;\n}\n/**\n * Takes JSON with JavaScript-style comments and remove\n * them. Optionally replaces every none-newline character\n * of comments with a replaceCharacter\n */\nfunction stripComments(text, replaceCh) {\n var _scanner = (0,_scanner_js__WEBPACK_IMPORTED_MODULE_0__.createScanner)(text), parts = [], kind, offset = 0, pos;\n do {\n pos = _scanner.getPosition();\n kind = _scanner.scan();\n switch (kind) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n case 17 /* EOF */:\n if (offset !== pos) {\n parts.push(text.substring(offset, pos));\n }\n if (replaceCh !== undefined) {\n parts.push(_scanner.getTokenValue().replace(/[^\\r\\n]/g, replaceCh));\n }\n offset = _scanner.getPosition();\n break;\n }\n } while (kind !== 17 /* EOF */);\n return parts.join('');\n}\nfunction getNodeType(value) {\n switch (typeof value) {\n case 'boolean': return 'boolean';\n case 'number': return 'number';\n case 'string': return 'string';\n case 'object': {\n if (!value) {\n return 'null';\n }\n else if (Array.isArray(value)) {\n return 'array';\n }\n return 'object';\n }\n default: return 'null';\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/parser.js?");
39
39
 
40
40
  /***/ }),
41
41
 
@@ -55,7 +55,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
55
55
  \************************************************************************************/
56
56
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
57
57
 
58
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createScanner\": () => (/* binding */ createScanner),\n/* harmony export */ \"getLocation\": () => (/* binding */ getLocation),\n/* harmony export */ \"parse\": () => (/* binding */ parse),\n/* harmony export */ \"parseTree\": () => (/* binding */ parseTree),\n/* harmony export */ \"findNodeAtLocation\": () => (/* binding */ findNodeAtLocation),\n/* harmony export */ \"findNodeAtOffset\": () => (/* binding */ findNodeAtOffset),\n/* harmony export */ \"getNodePath\": () => (/* binding */ getNodePath),\n/* harmony export */ \"getNodeValue\": () => (/* binding */ getNodeValue),\n/* harmony export */ \"visit\": () => (/* binding */ visit),\n/* harmony export */ \"stripComments\": () => (/* binding */ stripComments),\n/* harmony export */ \"printParseErrorCode\": () => (/* binding */ printParseErrorCode),\n/* harmony export */ \"format\": () => (/* binding */ format),\n/* harmony export */ \"modify\": () => (/* binding */ modify),\n/* harmony export */ \"applyEdits\": () => (/* binding */ applyEdits)\n/* harmony export */ });\n/* harmony import */ var _impl_format_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./impl/format.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/format.js\");\n/* harmony import */ var _impl_edit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./impl/edit.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/edit.js\");\n/* harmony import */ var _impl_scanner_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./impl/scanner.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/scanner.js\");\n/* harmony import */ var _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./impl/parser.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/parser.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n\n\n\n/**\n * Creates a JSON scanner on the given text.\n * If ignoreTrivia is set, whitespaces or comments are ignored.\n */\nvar createScanner = _impl_scanner_js__WEBPACK_IMPORTED_MODULE_2__.createScanner;\n/**\n * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.\n */\nvar getLocation = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.getLocation;\n/**\n * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n * Therefore, always check the errors list to find out if the input was valid.\n */\nvar parse = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.parse;\n/**\n * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n */\nvar parseTree = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.parseTree;\n/**\n * Finds the node at the given path in a JSON DOM.\n */\nvar findNodeAtLocation = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.findNodeAtLocation;\n/**\n * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.\n */\nvar findNodeAtOffset = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.findNodeAtOffset;\n/**\n * Gets the JSON path of the given JSON DOM node\n */\nvar getNodePath = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.getNodePath;\n/**\n * Evaluates the JavaScript object of the given JSON DOM node\n */\nvar getNodeValue = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.getNodeValue;\n/**\n * Parses the given text and invokes the visitor functions for each object, array and literal reached.\n */\nvar visit = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.visit;\n/**\n * Takes JSON with JavaScript-style comments and remove\n * them. Optionally replaces every none-newline character\n * of comments with a replaceCharacter\n */\nvar stripComments = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.stripComments;\nfunction printParseErrorCode(code) {\n switch (code) {\n case 1 /* InvalidSymbol */: return 'InvalidSymbol';\n case 2 /* InvalidNumberFormat */: return 'InvalidNumberFormat';\n case 3 /* PropertyNameExpected */: return 'PropertyNameExpected';\n case 4 /* ValueExpected */: return 'ValueExpected';\n case 5 /* ColonExpected */: return 'ColonExpected';\n case 6 /* CommaExpected */: return 'CommaExpected';\n case 7 /* CloseBraceExpected */: return 'CloseBraceExpected';\n case 8 /* CloseBracketExpected */: return 'CloseBracketExpected';\n case 9 /* EndOfFileExpected */: return 'EndOfFileExpected';\n case 10 /* InvalidCommentToken */: return 'InvalidCommentToken';\n case 11 /* UnexpectedEndOfComment */: return 'UnexpectedEndOfComment';\n case 12 /* UnexpectedEndOfString */: return 'UnexpectedEndOfString';\n case 13 /* UnexpectedEndOfNumber */: return 'UnexpectedEndOfNumber';\n case 14 /* InvalidUnicode */: return 'InvalidUnicode';\n case 15 /* InvalidEscapeCharacter */: return 'InvalidEscapeCharacter';\n case 16 /* InvalidCharacter */: return 'InvalidCharacter';\n }\n return '<unknown ParseErrorCode>';\n}\n/**\n * Computes the edits needed to format a JSON document.\n *\n * @param documentText The input text\n * @param range The range to format or `undefined` to format the full content\n * @param options The formatting options\n * @returns A list of edit operations describing the formatting changes to the original document. Edits can be either inserts, replacements or\n * removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of\n * text in the original document. However, multiple edits can have\n * the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.\n * To apply edits to an input, you can use `applyEdits`.\n */\nfunction format(documentText, range, options) {\n return _impl_format_js__WEBPACK_IMPORTED_MODULE_0__.format(documentText, range, options);\n}\n/**\n * Computes the edits needed to modify a value in the JSON document.\n *\n * @param documentText The input text\n * @param path The path of the value to change. The path represents either to the document root, a property or an array item.\n * If the path points to an non-existing property or item, it will be created.\n * @param value The new value for the specified property or item. If the value is undefined,\n * the property or item will be removed.\n * @param options Options\n * @returns A list of edit operations describing the formatting changes to the original document. Edits can be either inserts, replacements or\n * removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of\n * text in the original document. However, multiple edits can have\n * the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.\n * To apply edits to an input, you can use `applyEdits`.\n */\nfunction modify(text, path, value, options) {\n return _impl_edit_js__WEBPACK_IMPORTED_MODULE_1__.setProperty(text, path, value, options);\n}\n/**\n * Applies edits to a input string.\n */\nfunction applyEdits(text, edits) {\n for (var i = edits.length - 1; i >= 0; i--) {\n text = _impl_edit_js__WEBPACK_IMPORTED_MODULE_1__.applyEdit(text, edits[i]);\n }\n return text;\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/main.js?");
58
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"applyEdits\": () => (/* binding */ applyEdits),\n/* harmony export */ \"createScanner\": () => (/* binding */ createScanner),\n/* harmony export */ \"findNodeAtLocation\": () => (/* binding */ findNodeAtLocation),\n/* harmony export */ \"findNodeAtOffset\": () => (/* binding */ findNodeAtOffset),\n/* harmony export */ \"format\": () => (/* binding */ format),\n/* harmony export */ \"getLocation\": () => (/* binding */ getLocation),\n/* harmony export */ \"getNodePath\": () => (/* binding */ getNodePath),\n/* harmony export */ \"getNodeValue\": () => (/* binding */ getNodeValue),\n/* harmony export */ \"modify\": () => (/* binding */ modify),\n/* harmony export */ \"parse\": () => (/* binding */ parse),\n/* harmony export */ \"parseTree\": () => (/* binding */ parseTree),\n/* harmony export */ \"printParseErrorCode\": () => (/* binding */ printParseErrorCode),\n/* harmony export */ \"stripComments\": () => (/* binding */ stripComments),\n/* harmony export */ \"visit\": () => (/* binding */ visit)\n/* harmony export */ });\n/* harmony import */ var _impl_format_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./impl/format.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/format.js\");\n/* harmony import */ var _impl_edit_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./impl/edit.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/edit.js\");\n/* harmony import */ var _impl_scanner_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./impl/scanner.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/scanner.js\");\n/* harmony import */ var _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./impl/parser.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/impl/parser.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n\n\n\n/**\n * Creates a JSON scanner on the given text.\n * If ignoreTrivia is set, whitespaces or comments are ignored.\n */\nvar createScanner = _impl_scanner_js__WEBPACK_IMPORTED_MODULE_2__.createScanner;\n/**\n * For a given offset, evaluate the location in the JSON document. Each segment in the location path is either a property name or an array index.\n */\nvar getLocation = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.getLocation;\n/**\n * Parses the given text and returns the object the JSON content represents. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n * Therefore, always check the errors list to find out if the input was valid.\n */\nvar parse = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.parse;\n/**\n * Parses the given text and returns a tree representation the JSON content. On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.\n */\nvar parseTree = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.parseTree;\n/**\n * Finds the node at the given path in a JSON DOM.\n */\nvar findNodeAtLocation = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.findNodeAtLocation;\n/**\n * Finds the innermost node at the given offset. If includeRightBound is set, also finds nodes that end at the given offset.\n */\nvar findNodeAtOffset = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.findNodeAtOffset;\n/**\n * Gets the JSON path of the given JSON DOM node\n */\nvar getNodePath = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.getNodePath;\n/**\n * Evaluates the JavaScript object of the given JSON DOM node\n */\nvar getNodeValue = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.getNodeValue;\n/**\n * Parses the given text and invokes the visitor functions for each object, array and literal reached.\n */\nvar visit = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.visit;\n/**\n * Takes JSON with JavaScript-style comments and remove\n * them. Optionally replaces every none-newline character\n * of comments with a replaceCharacter\n */\nvar stripComments = _impl_parser_js__WEBPACK_IMPORTED_MODULE_3__.stripComments;\nfunction printParseErrorCode(code) {\n switch (code) {\n case 1 /* InvalidSymbol */: return 'InvalidSymbol';\n case 2 /* InvalidNumberFormat */: return 'InvalidNumberFormat';\n case 3 /* PropertyNameExpected */: return 'PropertyNameExpected';\n case 4 /* ValueExpected */: return 'ValueExpected';\n case 5 /* ColonExpected */: return 'ColonExpected';\n case 6 /* CommaExpected */: return 'CommaExpected';\n case 7 /* CloseBraceExpected */: return 'CloseBraceExpected';\n case 8 /* CloseBracketExpected */: return 'CloseBracketExpected';\n case 9 /* EndOfFileExpected */: return 'EndOfFileExpected';\n case 10 /* InvalidCommentToken */: return 'InvalidCommentToken';\n case 11 /* UnexpectedEndOfComment */: return 'UnexpectedEndOfComment';\n case 12 /* UnexpectedEndOfString */: return 'UnexpectedEndOfString';\n case 13 /* UnexpectedEndOfNumber */: return 'UnexpectedEndOfNumber';\n case 14 /* InvalidUnicode */: return 'InvalidUnicode';\n case 15 /* InvalidEscapeCharacter */: return 'InvalidEscapeCharacter';\n case 16 /* InvalidCharacter */: return 'InvalidCharacter';\n }\n return '<unknown ParseErrorCode>';\n}\n/**\n * Computes the edits needed to format a JSON document.\n *\n * @param documentText The input text\n * @param range The range to format or `undefined` to format the full content\n * @param options The formatting options\n * @returns A list of edit operations describing the formatting changes to the original document. Edits can be either inserts, replacements or\n * removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of\n * text in the original document. However, multiple edits can have\n * the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.\n * To apply edits to an input, you can use `applyEdits`.\n */\nfunction format(documentText, range, options) {\n return _impl_format_js__WEBPACK_IMPORTED_MODULE_0__.format(documentText, range, options);\n}\n/**\n * Computes the edits needed to modify a value in the JSON document.\n *\n * @param documentText The input text\n * @param path The path of the value to change. The path represents either to the document root, a property or an array item.\n * If the path points to an non-existing property or item, it will be created.\n * @param value The new value for the specified property or item. If the value is undefined,\n * the property or item will be removed.\n * @param options Options\n * @returns A list of edit operations describing the formatting changes to the original document. Edits can be either inserts, replacements or\n * removals of text segments. All offsets refer to the original state of the document. No two edits must change or remove the same range of\n * text in the original document. However, multiple edits can have\n * the same offset, for example multiple inserts, or an insert followed by a remove or replace. The order in the array defines which edit is applied first.\n * To apply edits to an input, you can use `applyEdits`.\n */\nfunction modify(text, path, value, options) {\n return _impl_edit_js__WEBPACK_IMPORTED_MODULE_1__.setProperty(text, path, value, options);\n}\n/**\n * Applies edits to a input string.\n */\nfunction applyEdits(text, edits) {\n for (var i = edits.length - 1; i >= 0; i--) {\n text = _impl_edit_js__WEBPACK_IMPORTED_MODULE_1__.applyEdit(text, edits[i]);\n }\n return text;\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/main.js?");
59
59
 
60
60
  /***/ }),
61
61
 
@@ -75,7 +75,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
75
75
  \****************************************************************************************************************/
76
76
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
77
77
 
78
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TextDocument\": () => (/* reexport safe */ _vscode_languageserver_textdocument_lib_esm_main_js__WEBPACK_IMPORTED_MODULE_1__.TextDocument),\n/* harmony export */ \"Range\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Range),\n/* harmony export */ \"Position\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Position),\n/* harmony export */ \"MarkupContent\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.MarkupContent),\n/* harmony export */ \"MarkupKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.MarkupKind),\n/* harmony export */ \"Color\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Color),\n/* harmony export */ \"ColorInformation\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.ColorInformation),\n/* harmony export */ \"ColorPresentation\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.ColorPresentation),\n/* harmony export */ \"FoldingRange\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.FoldingRange),\n/* harmony export */ \"FoldingRangeKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.FoldingRangeKind),\n/* harmony export */ \"SelectionRange\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.SelectionRange),\n/* harmony export */ \"Diagnostic\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Diagnostic),\n/* harmony export */ \"DiagnosticSeverity\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.DiagnosticSeverity),\n/* harmony export */ \"CompletionItem\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CompletionItem),\n/* harmony export */ \"CompletionItemKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CompletionItemKind),\n/* harmony export */ \"CompletionList\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CompletionList),\n/* harmony export */ \"CompletionItemTag\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CompletionItemTag),\n/* harmony export */ \"InsertTextFormat\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.InsertTextFormat),\n/* harmony export */ \"SymbolInformation\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.SymbolInformation),\n/* harmony export */ \"SymbolKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.SymbolKind),\n/* harmony export */ \"DocumentSymbol\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.DocumentSymbol),\n/* harmony export */ \"Location\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Location),\n/* harmony export */ \"Hover\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Hover),\n/* harmony export */ \"MarkedString\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.MarkedString),\n/* harmony export */ \"CodeActionContext\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CodeActionContext),\n/* harmony export */ \"Command\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Command),\n/* harmony export */ \"CodeAction\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CodeAction),\n/* harmony export */ \"DocumentHighlight\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlight),\n/* harmony export */ \"DocumentLink\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.DocumentLink),\n/* harmony export */ \"WorkspaceEdit\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.WorkspaceEdit),\n/* harmony export */ \"TextEdit\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.TextEdit),\n/* harmony export */ \"CodeActionKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CodeActionKind),\n/* harmony export */ \"TextDocumentEdit\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.TextDocumentEdit),\n/* harmony export */ \"VersionedTextDocumentIdentifier\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.VersionedTextDocumentIdentifier),\n/* harmony export */ \"DocumentHighlightKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind),\n/* harmony export */ \"ErrorCode\": () => (/* binding */ ErrorCode),\n/* harmony export */ \"ClientCapabilities\": () => (/* binding */ ClientCapabilities)\n/* harmony export */ });\n/* harmony import */ var _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../vscode-languageserver-types/main.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-languageserver-types/main.js\");\n/* harmony import */ var _vscode_languageserver_textdocument_lib_esm_main_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../vscode-languageserver-textdocument/lib/esm/main.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-languageserver-textdocument/lib/esm/main.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n\n/**\n * Error codes used by diagnostics\n */\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"Undefined\"] = 0] = \"Undefined\";\n ErrorCode[ErrorCode[\"EnumValueMismatch\"] = 1] = \"EnumValueMismatch\";\n ErrorCode[ErrorCode[\"Deprecated\"] = 2] = \"Deprecated\";\n ErrorCode[ErrorCode[\"UnexpectedEndOfComment\"] = 257] = \"UnexpectedEndOfComment\";\n ErrorCode[ErrorCode[\"UnexpectedEndOfString\"] = 258] = \"UnexpectedEndOfString\";\n ErrorCode[ErrorCode[\"UnexpectedEndOfNumber\"] = 259] = \"UnexpectedEndOfNumber\";\n ErrorCode[ErrorCode[\"InvalidUnicode\"] = 260] = \"InvalidUnicode\";\n ErrorCode[ErrorCode[\"InvalidEscapeCharacter\"] = 261] = \"InvalidEscapeCharacter\";\n ErrorCode[ErrorCode[\"InvalidCharacter\"] = 262] = \"InvalidCharacter\";\n ErrorCode[ErrorCode[\"PropertyExpected\"] = 513] = \"PropertyExpected\";\n ErrorCode[ErrorCode[\"CommaExpected\"] = 514] = \"CommaExpected\";\n ErrorCode[ErrorCode[\"ColonExpected\"] = 515] = \"ColonExpected\";\n ErrorCode[ErrorCode[\"ValueExpected\"] = 516] = \"ValueExpected\";\n ErrorCode[ErrorCode[\"CommaOrCloseBacketExpected\"] = 517] = \"CommaOrCloseBacketExpected\";\n ErrorCode[ErrorCode[\"CommaOrCloseBraceExpected\"] = 518] = \"CommaOrCloseBraceExpected\";\n ErrorCode[ErrorCode[\"TrailingComma\"] = 519] = \"TrailingComma\";\n ErrorCode[ErrorCode[\"DuplicateKey\"] = 520] = \"DuplicateKey\";\n ErrorCode[ErrorCode[\"CommentNotPermitted\"] = 521] = \"CommentNotPermitted\";\n ErrorCode[ErrorCode[\"SchemaResolveError\"] = 768] = \"SchemaResolveError\";\n})(ErrorCode || (ErrorCode = {}));\nvar ClientCapabilities;\n(function (ClientCapabilities) {\n ClientCapabilities.LATEST = {\n textDocument: {\n completion: {\n completionItem: {\n documentationFormat: [_vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.Markdown, _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.PlainText],\n commitCharactersSupport: true\n }\n }\n }\n };\n})(ClientCapabilities || (ClientCapabilities = {}));\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/jsonLanguageTypes.js?");
78
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ClientCapabilities\": () => (/* binding */ ClientCapabilities),\n/* harmony export */ \"CodeAction\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CodeAction),\n/* harmony export */ \"CodeActionContext\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CodeActionContext),\n/* harmony export */ \"CodeActionKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CodeActionKind),\n/* harmony export */ \"Color\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Color),\n/* harmony export */ \"ColorInformation\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.ColorInformation),\n/* harmony export */ \"ColorPresentation\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.ColorPresentation),\n/* harmony export */ \"Command\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Command),\n/* harmony export */ \"CompletionItem\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CompletionItem),\n/* harmony export */ \"CompletionItemKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CompletionItemKind),\n/* harmony export */ \"CompletionItemTag\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CompletionItemTag),\n/* harmony export */ \"CompletionList\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.CompletionList),\n/* harmony export */ \"Diagnostic\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Diagnostic),\n/* harmony export */ \"DiagnosticSeverity\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.DiagnosticSeverity),\n/* harmony export */ \"DocumentHighlight\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlight),\n/* harmony export */ \"DocumentHighlightKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.DocumentHighlightKind),\n/* harmony export */ \"DocumentLink\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.DocumentLink),\n/* harmony export */ \"DocumentSymbol\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.DocumentSymbol),\n/* harmony export */ \"ErrorCode\": () => (/* binding */ ErrorCode),\n/* harmony export */ \"FoldingRange\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.FoldingRange),\n/* harmony export */ \"FoldingRangeKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.FoldingRangeKind),\n/* harmony export */ \"Hover\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Hover),\n/* harmony export */ \"InsertTextFormat\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.InsertTextFormat),\n/* harmony export */ \"Location\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Location),\n/* harmony export */ \"MarkedString\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.MarkedString),\n/* harmony export */ \"MarkupContent\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.MarkupContent),\n/* harmony export */ \"MarkupKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.MarkupKind),\n/* harmony export */ \"Position\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Position),\n/* harmony export */ \"Range\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.Range),\n/* harmony export */ \"SelectionRange\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.SelectionRange),\n/* harmony export */ \"SymbolInformation\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.SymbolInformation),\n/* harmony export */ \"SymbolKind\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.SymbolKind),\n/* harmony export */ \"TextDocument\": () => (/* reexport safe */ _vscode_languageserver_textdocument_lib_esm_main_js__WEBPACK_IMPORTED_MODULE_1__.TextDocument),\n/* harmony export */ \"TextDocumentEdit\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.TextDocumentEdit),\n/* harmony export */ \"TextEdit\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.TextEdit),\n/* harmony export */ \"VersionedTextDocumentIdentifier\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.VersionedTextDocumentIdentifier),\n/* harmony export */ \"WorkspaceEdit\": () => (/* reexport safe */ _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.WorkspaceEdit)\n/* harmony export */ });\n/* harmony import */ var _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../vscode-languageserver-types/main.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-languageserver-types/main.js\");\n/* harmony import */ var _vscode_languageserver_textdocument_lib_esm_main_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../vscode-languageserver-textdocument/lib/esm/main.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-languageserver-textdocument/lib/esm/main.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n\n/**\n * Error codes used by diagnostics\n */\nvar ErrorCode;\n(function (ErrorCode) {\n ErrorCode[ErrorCode[\"Undefined\"] = 0] = \"Undefined\";\n ErrorCode[ErrorCode[\"EnumValueMismatch\"] = 1] = \"EnumValueMismatch\";\n ErrorCode[ErrorCode[\"Deprecated\"] = 2] = \"Deprecated\";\n ErrorCode[ErrorCode[\"UnexpectedEndOfComment\"] = 257] = \"UnexpectedEndOfComment\";\n ErrorCode[ErrorCode[\"UnexpectedEndOfString\"] = 258] = \"UnexpectedEndOfString\";\n ErrorCode[ErrorCode[\"UnexpectedEndOfNumber\"] = 259] = \"UnexpectedEndOfNumber\";\n ErrorCode[ErrorCode[\"InvalidUnicode\"] = 260] = \"InvalidUnicode\";\n ErrorCode[ErrorCode[\"InvalidEscapeCharacter\"] = 261] = \"InvalidEscapeCharacter\";\n ErrorCode[ErrorCode[\"InvalidCharacter\"] = 262] = \"InvalidCharacter\";\n ErrorCode[ErrorCode[\"PropertyExpected\"] = 513] = \"PropertyExpected\";\n ErrorCode[ErrorCode[\"CommaExpected\"] = 514] = \"CommaExpected\";\n ErrorCode[ErrorCode[\"ColonExpected\"] = 515] = \"ColonExpected\";\n ErrorCode[ErrorCode[\"ValueExpected\"] = 516] = \"ValueExpected\";\n ErrorCode[ErrorCode[\"CommaOrCloseBacketExpected\"] = 517] = \"CommaOrCloseBacketExpected\";\n ErrorCode[ErrorCode[\"CommaOrCloseBraceExpected\"] = 518] = \"CommaOrCloseBraceExpected\";\n ErrorCode[ErrorCode[\"TrailingComma\"] = 519] = \"TrailingComma\";\n ErrorCode[ErrorCode[\"DuplicateKey\"] = 520] = \"DuplicateKey\";\n ErrorCode[ErrorCode[\"CommentNotPermitted\"] = 521] = \"CommentNotPermitted\";\n ErrorCode[ErrorCode[\"SchemaResolveError\"] = 768] = \"SchemaResolveError\";\n})(ErrorCode || (ErrorCode = {}));\nvar ClientCapabilities;\n(function (ClientCapabilities) {\n ClientCapabilities.LATEST = {\n textDocument: {\n completion: {\n completionItem: {\n documentationFormat: [_vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.Markdown, _vscode_languageserver_types_main_js__WEBPACK_IMPORTED_MODULE_0__.MarkupKind.PlainText],\n commitCharactersSupport: true\n }\n }\n }\n };\n})(ClientCapabilities || (ClientCapabilities = {}));\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/jsonLanguageTypes.js?");
79
79
 
80
80
  /***/ }),
81
81
 
@@ -85,7 +85,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
85
85
  \****************************************************************************************************************/
86
86
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
87
87
 
88
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ASTNodeImpl\": () => (/* binding */ ASTNodeImpl),\n/* harmony export */ \"NullASTNodeImpl\": () => (/* binding */ NullASTNodeImpl),\n/* harmony export */ \"BooleanASTNodeImpl\": () => (/* binding */ BooleanASTNodeImpl),\n/* harmony export */ \"ArrayASTNodeImpl\": () => (/* binding */ ArrayASTNodeImpl),\n/* harmony export */ \"NumberASTNodeImpl\": () => (/* binding */ NumberASTNodeImpl),\n/* harmony export */ \"StringASTNodeImpl\": () => (/* binding */ StringASTNodeImpl),\n/* harmony export */ \"PropertyASTNodeImpl\": () => (/* binding */ PropertyASTNodeImpl),\n/* harmony export */ \"ObjectASTNodeImpl\": () => (/* binding */ ObjectASTNodeImpl),\n/* harmony export */ \"asSchema\": () => (/* binding */ asSchema),\n/* harmony export */ \"EnumMatch\": () => (/* binding */ EnumMatch),\n/* harmony export */ \"ValidationResult\": () => (/* binding */ ValidationResult),\n/* harmony export */ \"newJSONDocument\": () => (/* binding */ newJSONDocument),\n/* harmony export */ \"getNodeValue\": () => (/* binding */ getNodeValue),\n/* harmony export */ \"getNodePath\": () => (/* binding */ getNodePath),\n/* harmony export */ \"contains\": () => (/* binding */ contains),\n/* harmony export */ \"JSONDocument\": () => (/* binding */ JSONDocument),\n/* harmony export */ \"parse\": () => (/* binding */ parse)\n/* harmony export */ });\n/* harmony import */ var _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../jsonc-parser/main.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/main.js\");\n/* harmony import */ var _utils_objects_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/objects.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/objects.js\");\n/* harmony import */ var _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/strings.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/strings.js\");\n/* harmony import */ var _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../jsonLanguageTypes.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/jsonLanguageTypes.js\");\n/* harmony import */ var _fillers_vscode_nls_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../../fillers/vscode-nls.js */ \"./node_modules/monaco-editor/esm/vs/language/json/fillers/vscode-nls.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\nvar localize = _fillers_vscode_nls_js__WEBPACK_IMPORTED_MODULE_4__.loadMessageBundle();\nvar formats = {\n 'color-hex': { errorMessage: localize('colorHexFormatWarning', 'Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.'), pattern: /^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/ },\n 'date-time': { errorMessage: localize('dateTimeFormatWarning', 'String is not a RFC3339 date-time.'), pattern: /^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i },\n 'date': { errorMessage: localize('dateFormatWarning', 'String is not a RFC3339 date.'), pattern: /^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i },\n 'time': { errorMessage: localize('timeFormatWarning', 'String is not a RFC3339 time.'), pattern: /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i },\n 'email': { errorMessage: localize('emailFormatWarning', 'String is not an e-mail address.'), pattern: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/ }\n};\nvar ASTNodeImpl = /** @class */ (function () {\n function ASTNodeImpl(parent, offset, length) {\n if (length === void 0) { length = 0; }\n this.offset = offset;\n this.length = length;\n this.parent = parent;\n }\n Object.defineProperty(ASTNodeImpl.prototype, \"children\", {\n get: function () {\n return [];\n },\n enumerable: false,\n configurable: true\n });\n ASTNodeImpl.prototype.toString = function () {\n return 'type: ' + this.type + ' (' + this.offset + '/' + this.length + ')' + (this.parent ? ' parent: {' + this.parent.toString() + '}' : '');\n };\n return ASTNodeImpl;\n}());\n\nvar NullASTNodeImpl = /** @class */ (function (_super) {\n __extends(NullASTNodeImpl, _super);\n function NullASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'null';\n _this.value = null;\n return _this;\n }\n return NullASTNodeImpl;\n}(ASTNodeImpl));\n\nvar BooleanASTNodeImpl = /** @class */ (function (_super) {\n __extends(BooleanASTNodeImpl, _super);\n function BooleanASTNodeImpl(parent, boolValue, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'boolean';\n _this.value = boolValue;\n return _this;\n }\n return BooleanASTNodeImpl;\n}(ASTNodeImpl));\n\nvar ArrayASTNodeImpl = /** @class */ (function (_super) {\n __extends(ArrayASTNodeImpl, _super);\n function ArrayASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'array';\n _this.items = [];\n return _this;\n }\n Object.defineProperty(ArrayASTNodeImpl.prototype, \"children\", {\n get: function () {\n return this.items;\n },\n enumerable: false,\n configurable: true\n });\n return ArrayASTNodeImpl;\n}(ASTNodeImpl));\n\nvar NumberASTNodeImpl = /** @class */ (function (_super) {\n __extends(NumberASTNodeImpl, _super);\n function NumberASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'number';\n _this.isInteger = true;\n _this.value = Number.NaN;\n return _this;\n }\n return NumberASTNodeImpl;\n}(ASTNodeImpl));\n\nvar StringASTNodeImpl = /** @class */ (function (_super) {\n __extends(StringASTNodeImpl, _super);\n function StringASTNodeImpl(parent, offset, length) {\n var _this = _super.call(this, parent, offset, length) || this;\n _this.type = 'string';\n _this.value = '';\n return _this;\n }\n return StringASTNodeImpl;\n}(ASTNodeImpl));\n\nvar PropertyASTNodeImpl = /** @class */ (function (_super) {\n __extends(PropertyASTNodeImpl, _super);\n function PropertyASTNodeImpl(parent, offset, keyNode) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'property';\n _this.colonOffset = -1;\n _this.keyNode = keyNode;\n return _this;\n }\n Object.defineProperty(PropertyASTNodeImpl.prototype, \"children\", {\n get: function () {\n return this.valueNode ? [this.keyNode, this.valueNode] : [this.keyNode];\n },\n enumerable: false,\n configurable: true\n });\n return PropertyASTNodeImpl;\n}(ASTNodeImpl));\n\nvar ObjectASTNodeImpl = /** @class */ (function (_super) {\n __extends(ObjectASTNodeImpl, _super);\n function ObjectASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'object';\n _this.properties = [];\n return _this;\n }\n Object.defineProperty(ObjectASTNodeImpl.prototype, \"children\", {\n get: function () {\n return this.properties;\n },\n enumerable: false,\n configurable: true\n });\n return ObjectASTNodeImpl;\n}(ASTNodeImpl));\n\nfunction asSchema(schema) {\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isBoolean)(schema)) {\n return schema ? {} : { \"not\": {} };\n }\n return schema;\n}\nvar EnumMatch;\n(function (EnumMatch) {\n EnumMatch[EnumMatch[\"Key\"] = 0] = \"Key\";\n EnumMatch[EnumMatch[\"Enum\"] = 1] = \"Enum\";\n})(EnumMatch || (EnumMatch = {}));\nvar SchemaCollector = /** @class */ (function () {\n function SchemaCollector(focusOffset, exclude) {\n if (focusOffset === void 0) { focusOffset = -1; }\n this.focusOffset = focusOffset;\n this.exclude = exclude;\n this.schemas = [];\n }\n SchemaCollector.prototype.add = function (schema) {\n this.schemas.push(schema);\n };\n SchemaCollector.prototype.merge = function (other) {\n Array.prototype.push.apply(this.schemas, other.schemas);\n };\n SchemaCollector.prototype.include = function (node) {\n return (this.focusOffset === -1 || contains(node, this.focusOffset)) && (node !== this.exclude);\n };\n SchemaCollector.prototype.newSub = function () {\n return new SchemaCollector(-1, this.exclude);\n };\n return SchemaCollector;\n}());\nvar NoOpSchemaCollector = /** @class */ (function () {\n function NoOpSchemaCollector() {\n }\n Object.defineProperty(NoOpSchemaCollector.prototype, \"schemas\", {\n get: function () { return []; },\n enumerable: false,\n configurable: true\n });\n NoOpSchemaCollector.prototype.add = function (schema) { };\n NoOpSchemaCollector.prototype.merge = function (other) { };\n NoOpSchemaCollector.prototype.include = function (node) { return true; };\n NoOpSchemaCollector.prototype.newSub = function () { return this; };\n NoOpSchemaCollector.instance = new NoOpSchemaCollector();\n return NoOpSchemaCollector;\n}());\nvar ValidationResult = /** @class */ (function () {\n function ValidationResult() {\n this.problems = [];\n this.propertiesMatches = 0;\n this.propertiesValueMatches = 0;\n this.primaryValueMatches = 0;\n this.enumValueMatch = false;\n this.enumValues = undefined;\n }\n ValidationResult.prototype.hasProblems = function () {\n return !!this.problems.length;\n };\n ValidationResult.prototype.mergeAll = function (validationResults) {\n for (var _i = 0, validationResults_1 = validationResults; _i < validationResults_1.length; _i++) {\n var validationResult = validationResults_1[_i];\n this.merge(validationResult);\n }\n };\n ValidationResult.prototype.merge = function (validationResult) {\n this.problems = this.problems.concat(validationResult.problems);\n };\n ValidationResult.prototype.mergeEnumValues = function (validationResult) {\n if (!this.enumValueMatch && !validationResult.enumValueMatch && this.enumValues && validationResult.enumValues) {\n this.enumValues = this.enumValues.concat(validationResult.enumValues);\n for (var _i = 0, _a = this.problems; _i < _a.length; _i++) {\n var error = _a[_i];\n if (error.code === _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.EnumValueMismatch) {\n error.message = localize('enumWarning', 'Value is not accepted. Valid values: {0}.', this.enumValues.map(function (v) { return JSON.stringify(v); }).join(', '));\n }\n }\n }\n };\n ValidationResult.prototype.mergePropertyMatch = function (propertyValidationResult) {\n this.merge(propertyValidationResult);\n this.propertiesMatches++;\n if (propertyValidationResult.enumValueMatch || !propertyValidationResult.hasProblems() && propertyValidationResult.propertiesMatches) {\n this.propertiesValueMatches++;\n }\n if (propertyValidationResult.enumValueMatch && propertyValidationResult.enumValues && propertyValidationResult.enumValues.length === 1) {\n this.primaryValueMatches++;\n }\n };\n ValidationResult.prototype.compare = function (other) {\n var hasProblems = this.hasProblems();\n if (hasProblems !== other.hasProblems()) {\n return hasProblems ? -1 : 1;\n }\n if (this.enumValueMatch !== other.enumValueMatch) {\n return other.enumValueMatch ? -1 : 1;\n }\n if (this.primaryValueMatches !== other.primaryValueMatches) {\n return this.primaryValueMatches - other.primaryValueMatches;\n }\n if (this.propertiesValueMatches !== other.propertiesValueMatches) {\n return this.propertiesValueMatches - other.propertiesValueMatches;\n }\n return this.propertiesMatches - other.propertiesMatches;\n };\n return ValidationResult;\n}());\n\nfunction newJSONDocument(root, diagnostics) {\n if (diagnostics === void 0) { diagnostics = []; }\n return new JSONDocument(root, diagnostics, []);\n}\nfunction getNodeValue(node) {\n return _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.getNodeValue(node);\n}\nfunction getNodePath(node) {\n return _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.getNodePath(node);\n}\nfunction contains(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n return offset >= node.offset && offset < (node.offset + node.length) || includeRightBound && offset === (node.offset + node.length);\n}\nvar JSONDocument = /** @class */ (function () {\n function JSONDocument(root, syntaxErrors, comments) {\n if (syntaxErrors === void 0) { syntaxErrors = []; }\n if (comments === void 0) { comments = []; }\n this.root = root;\n this.syntaxErrors = syntaxErrors;\n this.comments = comments;\n }\n JSONDocument.prototype.getNodeFromOffset = function (offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n if (this.root) {\n return _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.findNodeAtOffset(this.root, offset, includeRightBound);\n }\n return undefined;\n };\n JSONDocument.prototype.visit = function (visitor) {\n if (this.root) {\n var doVisit_1 = function (node) {\n var ctn = visitor(node);\n var children = node.children;\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length && ctn; i++) {\n ctn = doVisit_1(children[i]);\n }\n }\n return ctn;\n };\n doVisit_1(this.root);\n }\n };\n JSONDocument.prototype.validate = function (textDocument, schema, severity) {\n if (severity === void 0) { severity = _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Warning; }\n if (this.root && schema) {\n var validationResult = new ValidationResult();\n validate(this.root, schema, validationResult, NoOpSchemaCollector.instance);\n return validationResult.problems.map(function (p) {\n var _a;\n var range = _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.Range.create(textDocument.positionAt(p.location.offset), textDocument.positionAt(p.location.offset + p.location.length));\n return _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.Diagnostic.create(range, p.message, (_a = p.severity) !== null && _a !== void 0 ? _a : severity, p.code);\n });\n }\n return undefined;\n };\n JSONDocument.prototype.getMatchingSchemas = function (schema, focusOffset, exclude) {\n if (focusOffset === void 0) { focusOffset = -1; }\n var matchingSchemas = new SchemaCollector(focusOffset, exclude);\n if (this.root && schema) {\n validate(this.root, schema, new ValidationResult(), matchingSchemas);\n }\n return matchingSchemas.schemas;\n };\n return JSONDocument;\n}());\n\nfunction validate(n, schema, validationResult, matchingSchemas) {\n if (!n || !matchingSchemas.include(n)) {\n return;\n }\n var node = n;\n switch (node.type) {\n case 'object':\n _validateObjectNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'array':\n _validateArrayNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'string':\n _validateStringNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'number':\n _validateNumberNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'property':\n return validate(node.valueNode, schema, validationResult, matchingSchemas);\n }\n _validateNode();\n matchingSchemas.add({ node: node, schema: schema });\n function _validateNode() {\n function matchesType(type) {\n return node.type === type || (type === 'integer' && node.type === 'number' && node.isInteger);\n }\n if (Array.isArray(schema.type)) {\n if (!schema.type.some(matchesType)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.errorMessage || localize('typeArrayMismatchWarning', 'Incorrect type. Expected one of {0}.', schema.type.join(', '))\n });\n }\n }\n else if (schema.type) {\n if (!matchesType(schema.type)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.errorMessage || localize('typeMismatchWarning', 'Incorrect type. Expected \"{0}\".', schema.type)\n });\n }\n }\n if (Array.isArray(schema.allOf)) {\n for (var _i = 0, _a = schema.allOf; _i < _a.length; _i++) {\n var subSchemaRef = _a[_i];\n validate(node, asSchema(subSchemaRef), validationResult, matchingSchemas);\n }\n }\n var notSchema = asSchema(schema.not);\n if (notSchema) {\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, notSchema, subValidationResult, subMatchingSchemas);\n if (!subValidationResult.hasProblems()) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('notSchemaWarning', \"Matches a schema that is not allowed.\")\n });\n }\n for (var _b = 0, _c = subMatchingSchemas.schemas; _b < _c.length; _b++) {\n var ms = _c[_b];\n ms.inverted = !ms.inverted;\n matchingSchemas.add(ms);\n }\n }\n var testAlternatives = function (alternatives, maxOneMatch) {\n var matches = [];\n // remember the best match that is used for error messages\n var bestMatch = undefined;\n for (var _i = 0, alternatives_1 = alternatives; _i < alternatives_1.length; _i++) {\n var subSchemaRef = alternatives_1[_i];\n var subSchema = asSchema(subSchemaRef);\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, subSchema, subValidationResult, subMatchingSchemas);\n if (!subValidationResult.hasProblems()) {\n matches.push(subSchema);\n }\n if (!bestMatch) {\n bestMatch = { schema: subSchema, validationResult: subValidationResult, matchingSchemas: subMatchingSchemas };\n }\n else {\n if (!maxOneMatch && !subValidationResult.hasProblems() && !bestMatch.validationResult.hasProblems()) {\n // no errors, both are equally good matches\n bestMatch.matchingSchemas.merge(subMatchingSchemas);\n bestMatch.validationResult.propertiesMatches += subValidationResult.propertiesMatches;\n bestMatch.validationResult.propertiesValueMatches += subValidationResult.propertiesValueMatches;\n }\n else {\n var compareResult = subValidationResult.compare(bestMatch.validationResult);\n if (compareResult > 0) {\n // our node is the best matching so far\n bestMatch = { schema: subSchema, validationResult: subValidationResult, matchingSchemas: subMatchingSchemas };\n }\n else if (compareResult === 0) {\n // there's already a best matching but we are as good\n bestMatch.matchingSchemas.merge(subMatchingSchemas);\n bestMatch.validationResult.mergeEnumValues(subValidationResult);\n }\n }\n }\n }\n if (matches.length > 1 && maxOneMatch) {\n validationResult.problems.push({\n location: { offset: node.offset, length: 1 },\n message: localize('oneOfWarning', \"Matches multiple schemas when only one must validate.\")\n });\n }\n if (bestMatch) {\n validationResult.merge(bestMatch.validationResult);\n validationResult.propertiesMatches += bestMatch.validationResult.propertiesMatches;\n validationResult.propertiesValueMatches += bestMatch.validationResult.propertiesValueMatches;\n matchingSchemas.merge(bestMatch.matchingSchemas);\n }\n return matches.length;\n };\n if (Array.isArray(schema.anyOf)) {\n testAlternatives(schema.anyOf, false);\n }\n if (Array.isArray(schema.oneOf)) {\n testAlternatives(schema.oneOf, true);\n }\n var testBranch = function (schema) {\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, asSchema(schema), subValidationResult, subMatchingSchemas);\n validationResult.merge(subValidationResult);\n validationResult.propertiesMatches += subValidationResult.propertiesMatches;\n validationResult.propertiesValueMatches += subValidationResult.propertiesValueMatches;\n matchingSchemas.merge(subMatchingSchemas);\n };\n var testCondition = function (ifSchema, thenSchema, elseSchema) {\n var subSchema = asSchema(ifSchema);\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, subSchema, subValidationResult, subMatchingSchemas);\n matchingSchemas.merge(subMatchingSchemas);\n if (!subValidationResult.hasProblems()) {\n if (thenSchema) {\n testBranch(thenSchema);\n }\n }\n else if (elseSchema) {\n testBranch(elseSchema);\n }\n };\n var ifSchema = asSchema(schema.if);\n if (ifSchema) {\n testCondition(ifSchema, asSchema(schema.then), asSchema(schema.else));\n }\n if (Array.isArray(schema.enum)) {\n var val = getNodeValue(node);\n var enumValueMatch = false;\n for (var _d = 0, _e = schema.enum; _d < _e.length; _d++) {\n var e = _e[_d];\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.equals)(val, e)) {\n enumValueMatch = true;\n break;\n }\n }\n validationResult.enumValues = schema.enum;\n validationResult.enumValueMatch = enumValueMatch;\n if (!enumValueMatch) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n code: _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.EnumValueMismatch,\n message: schema.errorMessage || localize('enumWarning', 'Value is not accepted. Valid values: {0}.', schema.enum.map(function (v) { return JSON.stringify(v); }).join(', '))\n });\n }\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isDefined)(schema.const)) {\n var val = getNodeValue(node);\n if (!(0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.equals)(val, schema.const)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n code: _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.EnumValueMismatch,\n message: schema.errorMessage || localize('constWarning', 'Value must be {0}.', JSON.stringify(schema.const))\n });\n validationResult.enumValueMatch = false;\n }\n else {\n validationResult.enumValueMatch = true;\n }\n validationResult.enumValues = [schema.const];\n }\n if (schema.deprecationMessage && node.parent) {\n validationResult.problems.push({\n location: { offset: node.parent.offset, length: node.parent.length },\n severity: _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Warning,\n message: schema.deprecationMessage,\n code: _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Deprecated\n });\n }\n }\n function _validateNumberNode(node, schema, validationResult, matchingSchemas) {\n var val = node.value;\n function normalizeFloats(float) {\n var _a;\n var parts = /^(-?\\d+)(?:\\.(\\d+))?(?:e([-+]\\d+))?$/.exec(float.toString());\n return parts && {\n value: Number(parts[1] + (parts[2] || '')),\n multiplier: (((_a = parts[2]) === null || _a === void 0 ? void 0 : _a.length) || 0) - (parseInt(parts[3]) || 0)\n };\n }\n ;\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.multipleOf)) {\n var remainder = -1;\n if (Number.isInteger(schema.multipleOf)) {\n remainder = val % schema.multipleOf;\n }\n else {\n var normMultipleOf = normalizeFloats(schema.multipleOf);\n var normValue = normalizeFloats(val);\n if (normMultipleOf && normValue) {\n var multiplier = Math.pow(10, Math.abs(normValue.multiplier - normMultipleOf.multiplier));\n if (normValue.multiplier < normMultipleOf.multiplier) {\n normValue.value *= multiplier;\n }\n else {\n normMultipleOf.value *= multiplier;\n }\n remainder = normValue.value % normMultipleOf.value;\n }\n }\n if (remainder !== 0) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('multipleOfWarning', 'Value is not divisible by {0}.', schema.multipleOf)\n });\n }\n }\n function getExclusiveLimit(limit, exclusive) {\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(exclusive)) {\n return exclusive;\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isBoolean)(exclusive) && exclusive) {\n return limit;\n }\n return undefined;\n }\n function getLimit(limit, exclusive) {\n if (!(0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isBoolean)(exclusive) || !exclusive) {\n return limit;\n }\n return undefined;\n }\n var exclusiveMinimum = getExclusiveLimit(schema.minimum, schema.exclusiveMinimum);\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(exclusiveMinimum) && val <= exclusiveMinimum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('exclusiveMinimumWarning', 'Value is below the exclusive minimum of {0}.', exclusiveMinimum)\n });\n }\n var exclusiveMaximum = getExclusiveLimit(schema.maximum, schema.exclusiveMaximum);\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(exclusiveMaximum) && val >= exclusiveMaximum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('exclusiveMaximumWarning', 'Value is above the exclusive maximum of {0}.', exclusiveMaximum)\n });\n }\n var minimum = getLimit(schema.minimum, schema.exclusiveMinimum);\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(minimum) && val < minimum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('minimumWarning', 'Value is below the minimum of {0}.', minimum)\n });\n }\n var maximum = getLimit(schema.maximum, schema.exclusiveMaximum);\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(maximum) && val > maximum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('maximumWarning', 'Value is above the maximum of {0}.', maximum)\n });\n }\n }\n function _validateStringNode(node, schema, validationResult, matchingSchemas) {\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.minLength) && node.value.length < schema.minLength) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('minLengthWarning', 'String is shorter than the minimum length of {0}.', schema.minLength)\n });\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.maxLength) && node.value.length > schema.maxLength) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('maxLengthWarning', 'String is longer than the maximum length of {0}.', schema.maxLength)\n });\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isString)(schema.pattern)) {\n var regex = (0,_utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.extendedRegExp)(schema.pattern);\n if (!regex.test(node.value)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.patternErrorMessage || schema.errorMessage || localize('patternWarning', 'String does not match the pattern of \"{0}\".', schema.pattern)\n });\n }\n }\n if (schema.format) {\n switch (schema.format) {\n case 'uri':\n case 'uri-reference':\n {\n var errorMessage = void 0;\n if (!node.value) {\n errorMessage = localize('uriEmpty', 'URI expected.');\n }\n else {\n var match = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/.exec(node.value);\n if (!match) {\n errorMessage = localize('uriMissing', 'URI is expected.');\n }\n else if (!match[2] && schema.format === 'uri') {\n errorMessage = localize('uriSchemeMissing', 'URI with a scheme is expected.');\n }\n }\n if (errorMessage) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.patternErrorMessage || schema.errorMessage || localize('uriFormatWarning', 'String is not a URI: {0}', errorMessage)\n });\n }\n }\n break;\n case 'color-hex':\n case 'date-time':\n case 'date':\n case 'time':\n case 'email':\n var format = formats[schema.format];\n if (!node.value || !format.pattern.exec(node.value)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.patternErrorMessage || schema.errorMessage || format.errorMessage\n });\n }\n default:\n }\n }\n }\n function _validateArrayNode(node, schema, validationResult, matchingSchemas) {\n if (Array.isArray(schema.items)) {\n var subSchemas = schema.items;\n for (var index = 0; index < subSchemas.length; index++) {\n var subSchemaRef = subSchemas[index];\n var subSchema = asSchema(subSchemaRef);\n var itemValidationResult = new ValidationResult();\n var item = node.items[index];\n if (item) {\n validate(item, subSchema, itemValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(itemValidationResult);\n }\n else if (node.items.length >= subSchemas.length) {\n validationResult.propertiesValueMatches++;\n }\n }\n if (node.items.length > subSchemas.length) {\n if (typeof schema.additionalItems === 'object') {\n for (var i = subSchemas.length; i < node.items.length; i++) {\n var itemValidationResult = new ValidationResult();\n validate(node.items[i], schema.additionalItems, itemValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(itemValidationResult);\n }\n }\n else if (schema.additionalItems === false) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('additionalItemsWarning', 'Array has too many items according to schema. Expected {0} or fewer.', subSchemas.length)\n });\n }\n }\n }\n else {\n var itemSchema = asSchema(schema.items);\n if (itemSchema) {\n for (var _i = 0, _a = node.items; _i < _a.length; _i++) {\n var item = _a[_i];\n var itemValidationResult = new ValidationResult();\n validate(item, itemSchema, itemValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(itemValidationResult);\n }\n }\n }\n var containsSchema = asSchema(schema.contains);\n if (containsSchema) {\n var doesContain = node.items.some(function (item) {\n var itemValidationResult = new ValidationResult();\n validate(item, containsSchema, itemValidationResult, NoOpSchemaCollector.instance);\n return !itemValidationResult.hasProblems();\n });\n if (!doesContain) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.errorMessage || localize('requiredItemMissingWarning', 'Array does not contain required item.')\n });\n }\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.minItems) && node.items.length < schema.minItems) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('minItemsWarning', 'Array has too few items. Expected {0} or more.', schema.minItems)\n });\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.maxItems) && node.items.length > schema.maxItems) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('maxItemsWarning', 'Array has too many items. Expected {0} or fewer.', schema.maxItems)\n });\n }\n if (schema.uniqueItems === true) {\n var values_1 = getNodeValue(node);\n var duplicates = values_1.some(function (value, index) {\n return index !== values_1.lastIndexOf(value);\n });\n if (duplicates) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('uniqueItemsWarning', 'Array has duplicate items.')\n });\n }\n }\n }\n function _validateObjectNode(node, schema, validationResult, matchingSchemas) {\n var seenKeys = Object.create(null);\n var unprocessedProperties = [];\n for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {\n var propertyNode = _a[_i];\n var key = propertyNode.keyNode.value;\n seenKeys[key] = propertyNode.valueNode;\n unprocessedProperties.push(key);\n }\n if (Array.isArray(schema.required)) {\n for (var _b = 0, _c = schema.required; _b < _c.length; _b++) {\n var propertyName = _c[_b];\n if (!seenKeys[propertyName]) {\n var keyNode = node.parent && node.parent.type === 'property' && node.parent.keyNode;\n var location = keyNode ? { offset: keyNode.offset, length: keyNode.length } : { offset: node.offset, length: 1 };\n validationResult.problems.push({\n location: location,\n message: localize('MissingRequiredPropWarning', 'Missing property \"{0}\".', propertyName)\n });\n }\n }\n }\n var propertyProcessed = function (prop) {\n var index = unprocessedProperties.indexOf(prop);\n while (index >= 0) {\n unprocessedProperties.splice(index, 1);\n index = unprocessedProperties.indexOf(prop);\n }\n };\n if (schema.properties) {\n for (var _d = 0, _e = Object.keys(schema.properties); _d < _e.length; _d++) {\n var propertyName = _e[_d];\n propertyProcessed(propertyName);\n var propertySchema = schema.properties[propertyName];\n var child = seenKeys[propertyName];\n if (child) {\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isBoolean)(propertySchema)) {\n if (!propertySchema) {\n var propertyNode = child.parent;\n validationResult.problems.push({\n location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },\n message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)\n });\n }\n else {\n validationResult.propertiesMatches++;\n validationResult.propertiesValueMatches++;\n }\n }\n else {\n var propertyValidationResult = new ValidationResult();\n validate(child, propertySchema, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n }\n if (schema.patternProperties) {\n for (var _f = 0, _g = Object.keys(schema.patternProperties); _f < _g.length; _f++) {\n var propertyPattern = _g[_f];\n var regex = (0,_utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.extendedRegExp)(propertyPattern);\n for (var _h = 0, _j = unprocessedProperties.slice(0); _h < _j.length; _h++) {\n var propertyName = _j[_h];\n if (regex.test(propertyName)) {\n propertyProcessed(propertyName);\n var child = seenKeys[propertyName];\n if (child) {\n var propertySchema = schema.patternProperties[propertyPattern];\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isBoolean)(propertySchema)) {\n if (!propertySchema) {\n var propertyNode = child.parent;\n validationResult.problems.push({\n location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },\n message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)\n });\n }\n else {\n validationResult.propertiesMatches++;\n validationResult.propertiesValueMatches++;\n }\n }\n else {\n var propertyValidationResult = new ValidationResult();\n validate(child, propertySchema, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n }\n }\n }\n if (typeof schema.additionalProperties === 'object') {\n for (var _k = 0, unprocessedProperties_1 = unprocessedProperties; _k < unprocessedProperties_1.length; _k++) {\n var propertyName = unprocessedProperties_1[_k];\n var child = seenKeys[propertyName];\n if (child) {\n var propertyValidationResult = new ValidationResult();\n validate(child, schema.additionalProperties, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n else if (schema.additionalProperties === false) {\n if (unprocessedProperties.length > 0) {\n for (var _l = 0, unprocessedProperties_2 = unprocessedProperties; _l < unprocessedProperties_2.length; _l++) {\n var propertyName = unprocessedProperties_2[_l];\n var child = seenKeys[propertyName];\n if (child) {\n var propertyNode = child.parent;\n validationResult.problems.push({\n location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },\n message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)\n });\n }\n }\n }\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.maxProperties)) {\n if (node.properties.length > schema.maxProperties) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('MaxPropWarning', 'Object has more properties than limit of {0}.', schema.maxProperties)\n });\n }\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.minProperties)) {\n if (node.properties.length < schema.minProperties) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('MinPropWarning', 'Object has fewer properties than the required number of {0}', schema.minProperties)\n });\n }\n }\n if (schema.dependencies) {\n for (var _m = 0, _o = Object.keys(schema.dependencies); _m < _o.length; _m++) {\n var key = _o[_m];\n var prop = seenKeys[key];\n if (prop) {\n var propertyDep = schema.dependencies[key];\n if (Array.isArray(propertyDep)) {\n for (var _p = 0, propertyDep_1 = propertyDep; _p < propertyDep_1.length; _p++) {\n var requiredProp = propertyDep_1[_p];\n if (!seenKeys[requiredProp]) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('RequiredDependentPropWarning', 'Object is missing property {0} required by property {1}.', requiredProp, key)\n });\n }\n else {\n validationResult.propertiesValueMatches++;\n }\n }\n }\n else {\n var propertySchema = asSchema(propertyDep);\n if (propertySchema) {\n var propertyValidationResult = new ValidationResult();\n validate(node, propertySchema, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n }\n }\n var propertyNames = asSchema(schema.propertyNames);\n if (propertyNames) {\n for (var _q = 0, _r = node.properties; _q < _r.length; _q++) {\n var f = _r[_q];\n var key = f.keyNode;\n if (key) {\n validate(key, propertyNames, validationResult, NoOpSchemaCollector.instance);\n }\n }\n }\n }\n}\nfunction parse(textDocument, config) {\n var problems = [];\n var lastProblemOffset = -1;\n var text = textDocument.getText();\n var scanner = _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.createScanner(text, false);\n var commentRanges = config && config.collectComments ? [] : undefined;\n function _scanNext() {\n while (true) {\n var token_1 = scanner.scan();\n _checkScanError();\n switch (token_1) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n if (Array.isArray(commentRanges)) {\n commentRanges.push(_jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.Range.create(textDocument.positionAt(scanner.getTokenOffset()), textDocument.positionAt(scanner.getTokenOffset() + scanner.getTokenLength())));\n }\n break;\n case 15 /* Trivia */:\n case 14 /* LineBreakTrivia */:\n break;\n default:\n return token_1;\n }\n }\n }\n function _accept(token) {\n if (scanner.getToken() === token) {\n _scanNext();\n return true;\n }\n return false;\n }\n function _errorAtRange(message, code, startOffset, endOffset, severity) {\n if (severity === void 0) { severity = _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Error; }\n if (problems.length === 0 || startOffset !== lastProblemOffset) {\n var range = _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.Range.create(textDocument.positionAt(startOffset), textDocument.positionAt(endOffset));\n problems.push(_jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.Diagnostic.create(range, message, severity, code, textDocument.languageId));\n lastProblemOffset = startOffset;\n }\n }\n function _error(message, code, node, skipUntilAfter, skipUntil) {\n if (node === void 0) { node = undefined; }\n if (skipUntilAfter === void 0) { skipUntilAfter = []; }\n if (skipUntil === void 0) { skipUntil = []; }\n var start = scanner.getTokenOffset();\n var end = scanner.getTokenOffset() + scanner.getTokenLength();\n if (start === end && start > 0) {\n start--;\n while (start > 0 && /\\s/.test(text.charAt(start))) {\n start--;\n }\n end = start + 1;\n }\n _errorAtRange(message, code, start, end);\n if (node) {\n _finalize(node, false);\n }\n if (skipUntilAfter.length + skipUntil.length > 0) {\n var token_2 = scanner.getToken();\n while (token_2 !== 17 /* EOF */) {\n if (skipUntilAfter.indexOf(token_2) !== -1) {\n _scanNext();\n break;\n }\n else if (skipUntil.indexOf(token_2) !== -1) {\n break;\n }\n token_2 = _scanNext();\n }\n }\n return node;\n }\n function _checkScanError() {\n switch (scanner.getTokenError()) {\n case 4 /* InvalidUnicode */:\n _error(localize('InvalidUnicode', 'Invalid unicode sequence in string.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.InvalidUnicode);\n return true;\n case 5 /* InvalidEscapeCharacter */:\n _error(localize('InvalidEscapeCharacter', 'Invalid escape character in string.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.InvalidEscapeCharacter);\n return true;\n case 3 /* UnexpectedEndOfNumber */:\n _error(localize('UnexpectedEndOfNumber', 'Unexpected end of number.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.UnexpectedEndOfNumber);\n return true;\n case 1 /* UnexpectedEndOfComment */:\n _error(localize('UnexpectedEndOfComment', 'Unexpected end of comment.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.UnexpectedEndOfComment);\n return true;\n case 2 /* UnexpectedEndOfString */:\n _error(localize('UnexpectedEndOfString', 'Unexpected end of string.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.UnexpectedEndOfString);\n return true;\n case 6 /* InvalidCharacter */:\n _error(localize('InvalidCharacter', 'Invalid characters in string. Control characters must be escaped.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.InvalidCharacter);\n return true;\n }\n return false;\n }\n function _finalize(node, scanNext) {\n node.length = scanner.getTokenOffset() + scanner.getTokenLength() - node.offset;\n if (scanNext) {\n _scanNext();\n }\n return node;\n }\n function _parseArray(parent) {\n if (scanner.getToken() !== 3 /* OpenBracketToken */) {\n return undefined;\n }\n var node = new ArrayASTNodeImpl(parent, scanner.getTokenOffset());\n _scanNext(); // consume OpenBracketToken\n var count = 0;\n var needsComma = false;\n while (scanner.getToken() !== 4 /* CloseBracketToken */ && scanner.getToken() !== 17 /* EOF */) {\n if (scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n _error(localize('ValueExpected', 'Value expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.ValueExpected);\n }\n var commaOffset = scanner.getTokenOffset();\n _scanNext(); // consume comma\n if (scanner.getToken() === 4 /* CloseBracketToken */) {\n if (needsComma) {\n _errorAtRange(localize('TrailingComma', 'Trailing comma'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.TrailingComma, commaOffset, commaOffset + 1);\n }\n continue;\n }\n }\n else if (needsComma) {\n _error(localize('ExpectedComma', 'Expected comma'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.CommaExpected);\n }\n var item = _parseValue(node);\n if (!item) {\n _error(localize('PropertyExpected', 'Value expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.ValueExpected, undefined, [], [4 /* CloseBracketToken */, 5 /* CommaToken */]);\n }\n else {\n node.items.push(item);\n }\n needsComma = true;\n }\n if (scanner.getToken() !== 4 /* CloseBracketToken */) {\n return _error(localize('ExpectedCloseBracket', 'Expected comma or closing bracket'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.CommaOrCloseBacketExpected, node);\n }\n return _finalize(node, true);\n }\n var keyPlaceholder = new StringASTNodeImpl(undefined, 0, 0);\n function _parseProperty(parent, keysSeen) {\n var node = new PropertyASTNodeImpl(parent, scanner.getTokenOffset(), keyPlaceholder);\n var key = _parseString(node);\n if (!key) {\n if (scanner.getToken() === 16 /* Unknown */) {\n // give a more helpful error message\n _error(localize('DoubleQuotesExpected', 'Property keys must be doublequoted'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Undefined);\n var keyNode = new StringASTNodeImpl(node, scanner.getTokenOffset(), scanner.getTokenLength());\n keyNode.value = scanner.getTokenValue();\n key = keyNode;\n _scanNext(); // consume Unknown\n }\n else {\n return undefined;\n }\n }\n node.keyNode = key;\n var seen = keysSeen[key.value];\n if (seen) {\n _errorAtRange(localize('DuplicateKeyWarning', \"Duplicate object key\"), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.DuplicateKey, node.keyNode.offset, node.keyNode.offset + node.keyNode.length, _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Warning);\n if (typeof seen === 'object') {\n _errorAtRange(localize('DuplicateKeyWarning', \"Duplicate object key\"), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.DuplicateKey, seen.keyNode.offset, seen.keyNode.offset + seen.keyNode.length, _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Warning);\n }\n keysSeen[key.value] = true; // if the same key is duplicate again, avoid duplicate error reporting\n }\n else {\n keysSeen[key.value] = node;\n }\n if (scanner.getToken() === 6 /* ColonToken */) {\n node.colonOffset = scanner.getTokenOffset();\n _scanNext(); // consume ColonToken\n }\n else {\n _error(localize('ColonExpected', 'Colon expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.ColonExpected);\n if (scanner.getToken() === 10 /* StringLiteral */ && textDocument.positionAt(key.offset + key.length).line < textDocument.positionAt(scanner.getTokenOffset()).line) {\n node.length = key.length;\n return node;\n }\n }\n var value = _parseValue(node);\n if (!value) {\n return _error(localize('ValueExpected', 'Value expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.ValueExpected, node, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n node.valueNode = value;\n node.length = value.offset + value.length - node.offset;\n return node;\n }\n function _parseObject(parent) {\n if (scanner.getToken() !== 1 /* OpenBraceToken */) {\n return undefined;\n }\n var node = new ObjectASTNodeImpl(parent, scanner.getTokenOffset());\n var keysSeen = Object.create(null);\n _scanNext(); // consume OpenBraceToken\n var needsComma = false;\n while (scanner.getToken() !== 2 /* CloseBraceToken */ && scanner.getToken() !== 17 /* EOF */) {\n if (scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n _error(localize('PropertyExpected', 'Property expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.PropertyExpected);\n }\n var commaOffset = scanner.getTokenOffset();\n _scanNext(); // consume comma\n if (scanner.getToken() === 2 /* CloseBraceToken */) {\n if (needsComma) {\n _errorAtRange(localize('TrailingComma', 'Trailing comma'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.TrailingComma, commaOffset, commaOffset + 1);\n }\n continue;\n }\n }\n else if (needsComma) {\n _error(localize('ExpectedComma', 'Expected comma'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.CommaExpected);\n }\n var property = _parseProperty(node, keysSeen);\n if (!property) {\n _error(localize('PropertyExpected', 'Property expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.PropertyExpected, undefined, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n else {\n node.properties.push(property);\n }\n needsComma = true;\n }\n if (scanner.getToken() !== 2 /* CloseBraceToken */) {\n return _error(localize('ExpectedCloseBrace', 'Expected comma or closing brace'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.CommaOrCloseBraceExpected, node);\n }\n return _finalize(node, true);\n }\n function _parseString(parent) {\n if (scanner.getToken() !== 10 /* StringLiteral */) {\n return undefined;\n }\n var node = new StringASTNodeImpl(parent, scanner.getTokenOffset());\n node.value = scanner.getTokenValue();\n return _finalize(node, true);\n }\n function _parseNumber(parent) {\n if (scanner.getToken() !== 11 /* NumericLiteral */) {\n return undefined;\n }\n var node = new NumberASTNodeImpl(parent, scanner.getTokenOffset());\n if (scanner.getTokenError() === 0 /* None */) {\n var tokenValue = scanner.getTokenValue();\n try {\n var numberValue = JSON.parse(tokenValue);\n if (!(0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(numberValue)) {\n return _error(localize('InvalidNumberFormat', 'Invalid number format.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Undefined, node);\n }\n node.value = numberValue;\n }\n catch (e) {\n return _error(localize('InvalidNumberFormat', 'Invalid number format.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Undefined, node);\n }\n node.isInteger = tokenValue.indexOf('.') === -1;\n }\n return _finalize(node, true);\n }\n function _parseLiteral(parent) {\n var node;\n switch (scanner.getToken()) {\n case 7 /* NullKeyword */:\n return _finalize(new NullASTNodeImpl(parent, scanner.getTokenOffset()), true);\n case 8 /* TrueKeyword */:\n return _finalize(new BooleanASTNodeImpl(parent, true, scanner.getTokenOffset()), true);\n case 9 /* FalseKeyword */:\n return _finalize(new BooleanASTNodeImpl(parent, false, scanner.getTokenOffset()), true);\n default:\n return undefined;\n }\n }\n function _parseValue(parent) {\n return _parseArray(parent) || _parseObject(parent) || _parseString(parent) || _parseNumber(parent) || _parseLiteral(parent);\n }\n var _root = undefined;\n var token = _scanNext();\n if (token !== 17 /* EOF */) {\n _root = _parseValue(_root);\n if (!_root) {\n _error(localize('Invalid symbol', 'Expected a JSON object, array or literal.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Undefined);\n }\n else if (scanner.getToken() !== 17 /* EOF */) {\n _error(localize('End of file expected', 'End of file expected.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Undefined);\n }\n }\n return new JSONDocument(_root, problems, commentRanges);\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/parser/jsonParser.js?");
88
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ASTNodeImpl\": () => (/* binding */ ASTNodeImpl),\n/* harmony export */ \"ArrayASTNodeImpl\": () => (/* binding */ ArrayASTNodeImpl),\n/* harmony export */ \"BooleanASTNodeImpl\": () => (/* binding */ BooleanASTNodeImpl),\n/* harmony export */ \"EnumMatch\": () => (/* binding */ EnumMatch),\n/* harmony export */ \"JSONDocument\": () => (/* binding */ JSONDocument),\n/* harmony export */ \"NullASTNodeImpl\": () => (/* binding */ NullASTNodeImpl),\n/* harmony export */ \"NumberASTNodeImpl\": () => (/* binding */ NumberASTNodeImpl),\n/* harmony export */ \"ObjectASTNodeImpl\": () => (/* binding */ ObjectASTNodeImpl),\n/* harmony export */ \"PropertyASTNodeImpl\": () => (/* binding */ PropertyASTNodeImpl),\n/* harmony export */ \"StringASTNodeImpl\": () => (/* binding */ StringASTNodeImpl),\n/* harmony export */ \"ValidationResult\": () => (/* binding */ ValidationResult),\n/* harmony export */ \"asSchema\": () => (/* binding */ asSchema),\n/* harmony export */ \"contains\": () => (/* binding */ contains),\n/* harmony export */ \"getNodePath\": () => (/* binding */ getNodePath),\n/* harmony export */ \"getNodeValue\": () => (/* binding */ getNodeValue),\n/* harmony export */ \"newJSONDocument\": () => (/* binding */ newJSONDocument),\n/* harmony export */ \"parse\": () => (/* binding */ parse)\n/* harmony export */ });\n/* harmony import */ var _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../jsonc-parser/main.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/main.js\");\n/* harmony import */ var _utils_objects_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/objects.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/objects.js\");\n/* harmony import */ var _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/strings.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/strings.js\");\n/* harmony import */ var _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../jsonLanguageTypes.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/jsonLanguageTypes.js\");\n/* harmony import */ var _fillers_vscode_nls_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../../fillers/vscode-nls.js */ \"./node_modules/monaco-editor/esm/vs/language/json/fillers/vscode-nls.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n\n\n\n\n\nvar localize = _fillers_vscode_nls_js__WEBPACK_IMPORTED_MODULE_4__.loadMessageBundle();\nvar formats = {\n 'color-hex': { errorMessage: localize('colorHexFormatWarning', 'Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.'), pattern: /^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/ },\n 'date-time': { errorMessage: localize('dateTimeFormatWarning', 'String is not a RFC3339 date-time.'), pattern: /^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i },\n 'date': { errorMessage: localize('dateFormatWarning', 'String is not a RFC3339 date.'), pattern: /^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i },\n 'time': { errorMessage: localize('timeFormatWarning', 'String is not a RFC3339 time.'), pattern: /^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\\.[0-9]+)?(Z|(\\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i },\n 'email': { errorMessage: localize('emailFormatWarning', 'String is not an e-mail address.'), pattern: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/ }\n};\nvar ASTNodeImpl = /** @class */ (function () {\n function ASTNodeImpl(parent, offset, length) {\n if (length === void 0) { length = 0; }\n this.offset = offset;\n this.length = length;\n this.parent = parent;\n }\n Object.defineProperty(ASTNodeImpl.prototype, \"children\", {\n get: function () {\n return [];\n },\n enumerable: false,\n configurable: true\n });\n ASTNodeImpl.prototype.toString = function () {\n return 'type: ' + this.type + ' (' + this.offset + '/' + this.length + ')' + (this.parent ? ' parent: {' + this.parent.toString() + '}' : '');\n };\n return ASTNodeImpl;\n}());\n\nvar NullASTNodeImpl = /** @class */ (function (_super) {\n __extends(NullASTNodeImpl, _super);\n function NullASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'null';\n _this.value = null;\n return _this;\n }\n return NullASTNodeImpl;\n}(ASTNodeImpl));\n\nvar BooleanASTNodeImpl = /** @class */ (function (_super) {\n __extends(BooleanASTNodeImpl, _super);\n function BooleanASTNodeImpl(parent, boolValue, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'boolean';\n _this.value = boolValue;\n return _this;\n }\n return BooleanASTNodeImpl;\n}(ASTNodeImpl));\n\nvar ArrayASTNodeImpl = /** @class */ (function (_super) {\n __extends(ArrayASTNodeImpl, _super);\n function ArrayASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'array';\n _this.items = [];\n return _this;\n }\n Object.defineProperty(ArrayASTNodeImpl.prototype, \"children\", {\n get: function () {\n return this.items;\n },\n enumerable: false,\n configurable: true\n });\n return ArrayASTNodeImpl;\n}(ASTNodeImpl));\n\nvar NumberASTNodeImpl = /** @class */ (function (_super) {\n __extends(NumberASTNodeImpl, _super);\n function NumberASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'number';\n _this.isInteger = true;\n _this.value = Number.NaN;\n return _this;\n }\n return NumberASTNodeImpl;\n}(ASTNodeImpl));\n\nvar StringASTNodeImpl = /** @class */ (function (_super) {\n __extends(StringASTNodeImpl, _super);\n function StringASTNodeImpl(parent, offset, length) {\n var _this = _super.call(this, parent, offset, length) || this;\n _this.type = 'string';\n _this.value = '';\n return _this;\n }\n return StringASTNodeImpl;\n}(ASTNodeImpl));\n\nvar PropertyASTNodeImpl = /** @class */ (function (_super) {\n __extends(PropertyASTNodeImpl, _super);\n function PropertyASTNodeImpl(parent, offset, keyNode) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'property';\n _this.colonOffset = -1;\n _this.keyNode = keyNode;\n return _this;\n }\n Object.defineProperty(PropertyASTNodeImpl.prototype, \"children\", {\n get: function () {\n return this.valueNode ? [this.keyNode, this.valueNode] : [this.keyNode];\n },\n enumerable: false,\n configurable: true\n });\n return PropertyASTNodeImpl;\n}(ASTNodeImpl));\n\nvar ObjectASTNodeImpl = /** @class */ (function (_super) {\n __extends(ObjectASTNodeImpl, _super);\n function ObjectASTNodeImpl(parent, offset) {\n var _this = _super.call(this, parent, offset) || this;\n _this.type = 'object';\n _this.properties = [];\n return _this;\n }\n Object.defineProperty(ObjectASTNodeImpl.prototype, \"children\", {\n get: function () {\n return this.properties;\n },\n enumerable: false,\n configurable: true\n });\n return ObjectASTNodeImpl;\n}(ASTNodeImpl));\n\nfunction asSchema(schema) {\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isBoolean)(schema)) {\n return schema ? {} : { \"not\": {} };\n }\n return schema;\n}\nvar EnumMatch;\n(function (EnumMatch) {\n EnumMatch[EnumMatch[\"Key\"] = 0] = \"Key\";\n EnumMatch[EnumMatch[\"Enum\"] = 1] = \"Enum\";\n})(EnumMatch || (EnumMatch = {}));\nvar SchemaCollector = /** @class */ (function () {\n function SchemaCollector(focusOffset, exclude) {\n if (focusOffset === void 0) { focusOffset = -1; }\n this.focusOffset = focusOffset;\n this.exclude = exclude;\n this.schemas = [];\n }\n SchemaCollector.prototype.add = function (schema) {\n this.schemas.push(schema);\n };\n SchemaCollector.prototype.merge = function (other) {\n Array.prototype.push.apply(this.schemas, other.schemas);\n };\n SchemaCollector.prototype.include = function (node) {\n return (this.focusOffset === -1 || contains(node, this.focusOffset)) && (node !== this.exclude);\n };\n SchemaCollector.prototype.newSub = function () {\n return new SchemaCollector(-1, this.exclude);\n };\n return SchemaCollector;\n}());\nvar NoOpSchemaCollector = /** @class */ (function () {\n function NoOpSchemaCollector() {\n }\n Object.defineProperty(NoOpSchemaCollector.prototype, \"schemas\", {\n get: function () { return []; },\n enumerable: false,\n configurable: true\n });\n NoOpSchemaCollector.prototype.add = function (schema) { };\n NoOpSchemaCollector.prototype.merge = function (other) { };\n NoOpSchemaCollector.prototype.include = function (node) { return true; };\n NoOpSchemaCollector.prototype.newSub = function () { return this; };\n NoOpSchemaCollector.instance = new NoOpSchemaCollector();\n return NoOpSchemaCollector;\n}());\nvar ValidationResult = /** @class */ (function () {\n function ValidationResult() {\n this.problems = [];\n this.propertiesMatches = 0;\n this.propertiesValueMatches = 0;\n this.primaryValueMatches = 0;\n this.enumValueMatch = false;\n this.enumValues = undefined;\n }\n ValidationResult.prototype.hasProblems = function () {\n return !!this.problems.length;\n };\n ValidationResult.prototype.mergeAll = function (validationResults) {\n for (var _i = 0, validationResults_1 = validationResults; _i < validationResults_1.length; _i++) {\n var validationResult = validationResults_1[_i];\n this.merge(validationResult);\n }\n };\n ValidationResult.prototype.merge = function (validationResult) {\n this.problems = this.problems.concat(validationResult.problems);\n };\n ValidationResult.prototype.mergeEnumValues = function (validationResult) {\n if (!this.enumValueMatch && !validationResult.enumValueMatch && this.enumValues && validationResult.enumValues) {\n this.enumValues = this.enumValues.concat(validationResult.enumValues);\n for (var _i = 0, _a = this.problems; _i < _a.length; _i++) {\n var error = _a[_i];\n if (error.code === _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.EnumValueMismatch) {\n error.message = localize('enumWarning', 'Value is not accepted. Valid values: {0}.', this.enumValues.map(function (v) { return JSON.stringify(v); }).join(', '));\n }\n }\n }\n };\n ValidationResult.prototype.mergePropertyMatch = function (propertyValidationResult) {\n this.merge(propertyValidationResult);\n this.propertiesMatches++;\n if (propertyValidationResult.enumValueMatch || !propertyValidationResult.hasProblems() && propertyValidationResult.propertiesMatches) {\n this.propertiesValueMatches++;\n }\n if (propertyValidationResult.enumValueMatch && propertyValidationResult.enumValues && propertyValidationResult.enumValues.length === 1) {\n this.primaryValueMatches++;\n }\n };\n ValidationResult.prototype.compare = function (other) {\n var hasProblems = this.hasProblems();\n if (hasProblems !== other.hasProblems()) {\n return hasProblems ? -1 : 1;\n }\n if (this.enumValueMatch !== other.enumValueMatch) {\n return other.enumValueMatch ? -1 : 1;\n }\n if (this.primaryValueMatches !== other.primaryValueMatches) {\n return this.primaryValueMatches - other.primaryValueMatches;\n }\n if (this.propertiesValueMatches !== other.propertiesValueMatches) {\n return this.propertiesValueMatches - other.propertiesValueMatches;\n }\n return this.propertiesMatches - other.propertiesMatches;\n };\n return ValidationResult;\n}());\n\nfunction newJSONDocument(root, diagnostics) {\n if (diagnostics === void 0) { diagnostics = []; }\n return new JSONDocument(root, diagnostics, []);\n}\nfunction getNodeValue(node) {\n return _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.getNodeValue(node);\n}\nfunction getNodePath(node) {\n return _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.getNodePath(node);\n}\nfunction contains(node, offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n return offset >= node.offset && offset < (node.offset + node.length) || includeRightBound && offset === (node.offset + node.length);\n}\nvar JSONDocument = /** @class */ (function () {\n function JSONDocument(root, syntaxErrors, comments) {\n if (syntaxErrors === void 0) { syntaxErrors = []; }\n if (comments === void 0) { comments = []; }\n this.root = root;\n this.syntaxErrors = syntaxErrors;\n this.comments = comments;\n }\n JSONDocument.prototype.getNodeFromOffset = function (offset, includeRightBound) {\n if (includeRightBound === void 0) { includeRightBound = false; }\n if (this.root) {\n return _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.findNodeAtOffset(this.root, offset, includeRightBound);\n }\n return undefined;\n };\n JSONDocument.prototype.visit = function (visitor) {\n if (this.root) {\n var doVisit_1 = function (node) {\n var ctn = visitor(node);\n var children = node.children;\n if (Array.isArray(children)) {\n for (var i = 0; i < children.length && ctn; i++) {\n ctn = doVisit_1(children[i]);\n }\n }\n return ctn;\n };\n doVisit_1(this.root);\n }\n };\n JSONDocument.prototype.validate = function (textDocument, schema, severity) {\n if (severity === void 0) { severity = _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Warning; }\n if (this.root && schema) {\n var validationResult = new ValidationResult();\n validate(this.root, schema, validationResult, NoOpSchemaCollector.instance);\n return validationResult.problems.map(function (p) {\n var _a;\n var range = _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.Range.create(textDocument.positionAt(p.location.offset), textDocument.positionAt(p.location.offset + p.location.length));\n return _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.Diagnostic.create(range, p.message, (_a = p.severity) !== null && _a !== void 0 ? _a : severity, p.code);\n });\n }\n return undefined;\n };\n JSONDocument.prototype.getMatchingSchemas = function (schema, focusOffset, exclude) {\n if (focusOffset === void 0) { focusOffset = -1; }\n var matchingSchemas = new SchemaCollector(focusOffset, exclude);\n if (this.root && schema) {\n validate(this.root, schema, new ValidationResult(), matchingSchemas);\n }\n return matchingSchemas.schemas;\n };\n return JSONDocument;\n}());\n\nfunction validate(n, schema, validationResult, matchingSchemas) {\n if (!n || !matchingSchemas.include(n)) {\n return;\n }\n var node = n;\n switch (node.type) {\n case 'object':\n _validateObjectNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'array':\n _validateArrayNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'string':\n _validateStringNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'number':\n _validateNumberNode(node, schema, validationResult, matchingSchemas);\n break;\n case 'property':\n return validate(node.valueNode, schema, validationResult, matchingSchemas);\n }\n _validateNode();\n matchingSchemas.add({ node: node, schema: schema });\n function _validateNode() {\n function matchesType(type) {\n return node.type === type || (type === 'integer' && node.type === 'number' && node.isInteger);\n }\n if (Array.isArray(schema.type)) {\n if (!schema.type.some(matchesType)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.errorMessage || localize('typeArrayMismatchWarning', 'Incorrect type. Expected one of {0}.', schema.type.join(', '))\n });\n }\n }\n else if (schema.type) {\n if (!matchesType(schema.type)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.errorMessage || localize('typeMismatchWarning', 'Incorrect type. Expected \"{0}\".', schema.type)\n });\n }\n }\n if (Array.isArray(schema.allOf)) {\n for (var _i = 0, _a = schema.allOf; _i < _a.length; _i++) {\n var subSchemaRef = _a[_i];\n validate(node, asSchema(subSchemaRef), validationResult, matchingSchemas);\n }\n }\n var notSchema = asSchema(schema.not);\n if (notSchema) {\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, notSchema, subValidationResult, subMatchingSchemas);\n if (!subValidationResult.hasProblems()) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('notSchemaWarning', \"Matches a schema that is not allowed.\")\n });\n }\n for (var _b = 0, _c = subMatchingSchemas.schemas; _b < _c.length; _b++) {\n var ms = _c[_b];\n ms.inverted = !ms.inverted;\n matchingSchemas.add(ms);\n }\n }\n var testAlternatives = function (alternatives, maxOneMatch) {\n var matches = [];\n // remember the best match that is used for error messages\n var bestMatch = undefined;\n for (var _i = 0, alternatives_1 = alternatives; _i < alternatives_1.length; _i++) {\n var subSchemaRef = alternatives_1[_i];\n var subSchema = asSchema(subSchemaRef);\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, subSchema, subValidationResult, subMatchingSchemas);\n if (!subValidationResult.hasProblems()) {\n matches.push(subSchema);\n }\n if (!bestMatch) {\n bestMatch = { schema: subSchema, validationResult: subValidationResult, matchingSchemas: subMatchingSchemas };\n }\n else {\n if (!maxOneMatch && !subValidationResult.hasProblems() && !bestMatch.validationResult.hasProblems()) {\n // no errors, both are equally good matches\n bestMatch.matchingSchemas.merge(subMatchingSchemas);\n bestMatch.validationResult.propertiesMatches += subValidationResult.propertiesMatches;\n bestMatch.validationResult.propertiesValueMatches += subValidationResult.propertiesValueMatches;\n }\n else {\n var compareResult = subValidationResult.compare(bestMatch.validationResult);\n if (compareResult > 0) {\n // our node is the best matching so far\n bestMatch = { schema: subSchema, validationResult: subValidationResult, matchingSchemas: subMatchingSchemas };\n }\n else if (compareResult === 0) {\n // there's already a best matching but we are as good\n bestMatch.matchingSchemas.merge(subMatchingSchemas);\n bestMatch.validationResult.mergeEnumValues(subValidationResult);\n }\n }\n }\n }\n if (matches.length > 1 && maxOneMatch) {\n validationResult.problems.push({\n location: { offset: node.offset, length: 1 },\n message: localize('oneOfWarning', \"Matches multiple schemas when only one must validate.\")\n });\n }\n if (bestMatch) {\n validationResult.merge(bestMatch.validationResult);\n validationResult.propertiesMatches += bestMatch.validationResult.propertiesMatches;\n validationResult.propertiesValueMatches += bestMatch.validationResult.propertiesValueMatches;\n matchingSchemas.merge(bestMatch.matchingSchemas);\n }\n return matches.length;\n };\n if (Array.isArray(schema.anyOf)) {\n testAlternatives(schema.anyOf, false);\n }\n if (Array.isArray(schema.oneOf)) {\n testAlternatives(schema.oneOf, true);\n }\n var testBranch = function (schema) {\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, asSchema(schema), subValidationResult, subMatchingSchemas);\n validationResult.merge(subValidationResult);\n validationResult.propertiesMatches += subValidationResult.propertiesMatches;\n validationResult.propertiesValueMatches += subValidationResult.propertiesValueMatches;\n matchingSchemas.merge(subMatchingSchemas);\n };\n var testCondition = function (ifSchema, thenSchema, elseSchema) {\n var subSchema = asSchema(ifSchema);\n var subValidationResult = new ValidationResult();\n var subMatchingSchemas = matchingSchemas.newSub();\n validate(node, subSchema, subValidationResult, subMatchingSchemas);\n matchingSchemas.merge(subMatchingSchemas);\n if (!subValidationResult.hasProblems()) {\n if (thenSchema) {\n testBranch(thenSchema);\n }\n }\n else if (elseSchema) {\n testBranch(elseSchema);\n }\n };\n var ifSchema = asSchema(schema.if);\n if (ifSchema) {\n testCondition(ifSchema, asSchema(schema.then), asSchema(schema.else));\n }\n if (Array.isArray(schema.enum)) {\n var val = getNodeValue(node);\n var enumValueMatch = false;\n for (var _d = 0, _e = schema.enum; _d < _e.length; _d++) {\n var e = _e[_d];\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.equals)(val, e)) {\n enumValueMatch = true;\n break;\n }\n }\n validationResult.enumValues = schema.enum;\n validationResult.enumValueMatch = enumValueMatch;\n if (!enumValueMatch) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n code: _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.EnumValueMismatch,\n message: schema.errorMessage || localize('enumWarning', 'Value is not accepted. Valid values: {0}.', schema.enum.map(function (v) { return JSON.stringify(v); }).join(', '))\n });\n }\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isDefined)(schema.const)) {\n var val = getNodeValue(node);\n if (!(0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.equals)(val, schema.const)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n code: _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.EnumValueMismatch,\n message: schema.errorMessage || localize('constWarning', 'Value must be {0}.', JSON.stringify(schema.const))\n });\n validationResult.enumValueMatch = false;\n }\n else {\n validationResult.enumValueMatch = true;\n }\n validationResult.enumValues = [schema.const];\n }\n if (schema.deprecationMessage && node.parent) {\n validationResult.problems.push({\n location: { offset: node.parent.offset, length: node.parent.length },\n severity: _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Warning,\n message: schema.deprecationMessage,\n code: _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Deprecated\n });\n }\n }\n function _validateNumberNode(node, schema, validationResult, matchingSchemas) {\n var val = node.value;\n function normalizeFloats(float) {\n var _a;\n var parts = /^(-?\\d+)(?:\\.(\\d+))?(?:e([-+]\\d+))?$/.exec(float.toString());\n return parts && {\n value: Number(parts[1] + (parts[2] || '')),\n multiplier: (((_a = parts[2]) === null || _a === void 0 ? void 0 : _a.length) || 0) - (parseInt(parts[3]) || 0)\n };\n }\n ;\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.multipleOf)) {\n var remainder = -1;\n if (Number.isInteger(schema.multipleOf)) {\n remainder = val % schema.multipleOf;\n }\n else {\n var normMultipleOf = normalizeFloats(schema.multipleOf);\n var normValue = normalizeFloats(val);\n if (normMultipleOf && normValue) {\n var multiplier = Math.pow(10, Math.abs(normValue.multiplier - normMultipleOf.multiplier));\n if (normValue.multiplier < normMultipleOf.multiplier) {\n normValue.value *= multiplier;\n }\n else {\n normMultipleOf.value *= multiplier;\n }\n remainder = normValue.value % normMultipleOf.value;\n }\n }\n if (remainder !== 0) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('multipleOfWarning', 'Value is not divisible by {0}.', schema.multipleOf)\n });\n }\n }\n function getExclusiveLimit(limit, exclusive) {\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(exclusive)) {\n return exclusive;\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isBoolean)(exclusive) && exclusive) {\n return limit;\n }\n return undefined;\n }\n function getLimit(limit, exclusive) {\n if (!(0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isBoolean)(exclusive) || !exclusive) {\n return limit;\n }\n return undefined;\n }\n var exclusiveMinimum = getExclusiveLimit(schema.minimum, schema.exclusiveMinimum);\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(exclusiveMinimum) && val <= exclusiveMinimum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('exclusiveMinimumWarning', 'Value is below the exclusive minimum of {0}.', exclusiveMinimum)\n });\n }\n var exclusiveMaximum = getExclusiveLimit(schema.maximum, schema.exclusiveMaximum);\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(exclusiveMaximum) && val >= exclusiveMaximum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('exclusiveMaximumWarning', 'Value is above the exclusive maximum of {0}.', exclusiveMaximum)\n });\n }\n var minimum = getLimit(schema.minimum, schema.exclusiveMinimum);\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(minimum) && val < minimum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('minimumWarning', 'Value is below the minimum of {0}.', minimum)\n });\n }\n var maximum = getLimit(schema.maximum, schema.exclusiveMaximum);\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(maximum) && val > maximum) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('maximumWarning', 'Value is above the maximum of {0}.', maximum)\n });\n }\n }\n function _validateStringNode(node, schema, validationResult, matchingSchemas) {\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.minLength) && node.value.length < schema.minLength) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('minLengthWarning', 'String is shorter than the minimum length of {0}.', schema.minLength)\n });\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.maxLength) && node.value.length > schema.maxLength) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('maxLengthWarning', 'String is longer than the maximum length of {0}.', schema.maxLength)\n });\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isString)(schema.pattern)) {\n var regex = (0,_utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.extendedRegExp)(schema.pattern);\n if (!regex.test(node.value)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.patternErrorMessage || schema.errorMessage || localize('patternWarning', 'String does not match the pattern of \"{0}\".', schema.pattern)\n });\n }\n }\n if (schema.format) {\n switch (schema.format) {\n case 'uri':\n case 'uri-reference':\n {\n var errorMessage = void 0;\n if (!node.value) {\n errorMessage = localize('uriEmpty', 'URI expected.');\n }\n else {\n var match = /^(([^:/?#]+?):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?/.exec(node.value);\n if (!match) {\n errorMessage = localize('uriMissing', 'URI is expected.');\n }\n else if (!match[2] && schema.format === 'uri') {\n errorMessage = localize('uriSchemeMissing', 'URI with a scheme is expected.');\n }\n }\n if (errorMessage) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.patternErrorMessage || schema.errorMessage || localize('uriFormatWarning', 'String is not a URI: {0}', errorMessage)\n });\n }\n }\n break;\n case 'color-hex':\n case 'date-time':\n case 'date':\n case 'time':\n case 'email':\n var format = formats[schema.format];\n if (!node.value || !format.pattern.exec(node.value)) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.patternErrorMessage || schema.errorMessage || format.errorMessage\n });\n }\n default:\n }\n }\n }\n function _validateArrayNode(node, schema, validationResult, matchingSchemas) {\n if (Array.isArray(schema.items)) {\n var subSchemas = schema.items;\n for (var index = 0; index < subSchemas.length; index++) {\n var subSchemaRef = subSchemas[index];\n var subSchema = asSchema(subSchemaRef);\n var itemValidationResult = new ValidationResult();\n var item = node.items[index];\n if (item) {\n validate(item, subSchema, itemValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(itemValidationResult);\n }\n else if (node.items.length >= subSchemas.length) {\n validationResult.propertiesValueMatches++;\n }\n }\n if (node.items.length > subSchemas.length) {\n if (typeof schema.additionalItems === 'object') {\n for (var i = subSchemas.length; i < node.items.length; i++) {\n var itemValidationResult = new ValidationResult();\n validate(node.items[i], schema.additionalItems, itemValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(itemValidationResult);\n }\n }\n else if (schema.additionalItems === false) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('additionalItemsWarning', 'Array has too many items according to schema. Expected {0} or fewer.', subSchemas.length)\n });\n }\n }\n }\n else {\n var itemSchema = asSchema(schema.items);\n if (itemSchema) {\n for (var _i = 0, _a = node.items; _i < _a.length; _i++) {\n var item = _a[_i];\n var itemValidationResult = new ValidationResult();\n validate(item, itemSchema, itemValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(itemValidationResult);\n }\n }\n }\n var containsSchema = asSchema(schema.contains);\n if (containsSchema) {\n var doesContain = node.items.some(function (item) {\n var itemValidationResult = new ValidationResult();\n validate(item, containsSchema, itemValidationResult, NoOpSchemaCollector.instance);\n return !itemValidationResult.hasProblems();\n });\n if (!doesContain) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: schema.errorMessage || localize('requiredItemMissingWarning', 'Array does not contain required item.')\n });\n }\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.minItems) && node.items.length < schema.minItems) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('minItemsWarning', 'Array has too few items. Expected {0} or more.', schema.minItems)\n });\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.maxItems) && node.items.length > schema.maxItems) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('maxItemsWarning', 'Array has too many items. Expected {0} or fewer.', schema.maxItems)\n });\n }\n if (schema.uniqueItems === true) {\n var values_1 = getNodeValue(node);\n var duplicates = values_1.some(function (value, index) {\n return index !== values_1.lastIndexOf(value);\n });\n if (duplicates) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('uniqueItemsWarning', 'Array has duplicate items.')\n });\n }\n }\n }\n function _validateObjectNode(node, schema, validationResult, matchingSchemas) {\n var seenKeys = Object.create(null);\n var unprocessedProperties = [];\n for (var _i = 0, _a = node.properties; _i < _a.length; _i++) {\n var propertyNode = _a[_i];\n var key = propertyNode.keyNode.value;\n seenKeys[key] = propertyNode.valueNode;\n unprocessedProperties.push(key);\n }\n if (Array.isArray(schema.required)) {\n for (var _b = 0, _c = schema.required; _b < _c.length; _b++) {\n var propertyName = _c[_b];\n if (!seenKeys[propertyName]) {\n var keyNode = node.parent && node.parent.type === 'property' && node.parent.keyNode;\n var location = keyNode ? { offset: keyNode.offset, length: keyNode.length } : { offset: node.offset, length: 1 };\n validationResult.problems.push({\n location: location,\n message: localize('MissingRequiredPropWarning', 'Missing property \"{0}\".', propertyName)\n });\n }\n }\n }\n var propertyProcessed = function (prop) {\n var index = unprocessedProperties.indexOf(prop);\n while (index >= 0) {\n unprocessedProperties.splice(index, 1);\n index = unprocessedProperties.indexOf(prop);\n }\n };\n if (schema.properties) {\n for (var _d = 0, _e = Object.keys(schema.properties); _d < _e.length; _d++) {\n var propertyName = _e[_d];\n propertyProcessed(propertyName);\n var propertySchema = schema.properties[propertyName];\n var child = seenKeys[propertyName];\n if (child) {\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isBoolean)(propertySchema)) {\n if (!propertySchema) {\n var propertyNode = child.parent;\n validationResult.problems.push({\n location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },\n message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)\n });\n }\n else {\n validationResult.propertiesMatches++;\n validationResult.propertiesValueMatches++;\n }\n }\n else {\n var propertyValidationResult = new ValidationResult();\n validate(child, propertySchema, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n }\n if (schema.patternProperties) {\n for (var _f = 0, _g = Object.keys(schema.patternProperties); _f < _g.length; _f++) {\n var propertyPattern = _g[_f];\n var regex = (0,_utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.extendedRegExp)(propertyPattern);\n for (var _h = 0, _j = unprocessedProperties.slice(0); _h < _j.length; _h++) {\n var propertyName = _j[_h];\n if (regex.test(propertyName)) {\n propertyProcessed(propertyName);\n var child = seenKeys[propertyName];\n if (child) {\n var propertySchema = schema.patternProperties[propertyPattern];\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isBoolean)(propertySchema)) {\n if (!propertySchema) {\n var propertyNode = child.parent;\n validationResult.problems.push({\n location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },\n message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)\n });\n }\n else {\n validationResult.propertiesMatches++;\n validationResult.propertiesValueMatches++;\n }\n }\n else {\n var propertyValidationResult = new ValidationResult();\n validate(child, propertySchema, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n }\n }\n }\n if (typeof schema.additionalProperties === 'object') {\n for (var _k = 0, unprocessedProperties_1 = unprocessedProperties; _k < unprocessedProperties_1.length; _k++) {\n var propertyName = unprocessedProperties_1[_k];\n var child = seenKeys[propertyName];\n if (child) {\n var propertyValidationResult = new ValidationResult();\n validate(child, schema.additionalProperties, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n else if (schema.additionalProperties === false) {\n if (unprocessedProperties.length > 0) {\n for (var _l = 0, unprocessedProperties_2 = unprocessedProperties; _l < unprocessedProperties_2.length; _l++) {\n var propertyName = unprocessedProperties_2[_l];\n var child = seenKeys[propertyName];\n if (child) {\n var propertyNode = child.parent;\n validationResult.problems.push({\n location: { offset: propertyNode.keyNode.offset, length: propertyNode.keyNode.length },\n message: schema.errorMessage || localize('DisallowedExtraPropWarning', 'Property {0} is not allowed.', propertyName)\n });\n }\n }\n }\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.maxProperties)) {\n if (node.properties.length > schema.maxProperties) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('MaxPropWarning', 'Object has more properties than limit of {0}.', schema.maxProperties)\n });\n }\n }\n if ((0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(schema.minProperties)) {\n if (node.properties.length < schema.minProperties) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('MinPropWarning', 'Object has fewer properties than the required number of {0}', schema.minProperties)\n });\n }\n }\n if (schema.dependencies) {\n for (var _m = 0, _o = Object.keys(schema.dependencies); _m < _o.length; _m++) {\n var key = _o[_m];\n var prop = seenKeys[key];\n if (prop) {\n var propertyDep = schema.dependencies[key];\n if (Array.isArray(propertyDep)) {\n for (var _p = 0, propertyDep_1 = propertyDep; _p < propertyDep_1.length; _p++) {\n var requiredProp = propertyDep_1[_p];\n if (!seenKeys[requiredProp]) {\n validationResult.problems.push({\n location: { offset: node.offset, length: node.length },\n message: localize('RequiredDependentPropWarning', 'Object is missing property {0} required by property {1}.', requiredProp, key)\n });\n }\n else {\n validationResult.propertiesValueMatches++;\n }\n }\n }\n else {\n var propertySchema = asSchema(propertyDep);\n if (propertySchema) {\n var propertyValidationResult = new ValidationResult();\n validate(node, propertySchema, propertyValidationResult, matchingSchemas);\n validationResult.mergePropertyMatch(propertyValidationResult);\n }\n }\n }\n }\n }\n var propertyNames = asSchema(schema.propertyNames);\n if (propertyNames) {\n for (var _q = 0, _r = node.properties; _q < _r.length; _q++) {\n var f = _r[_q];\n var key = f.keyNode;\n if (key) {\n validate(key, propertyNames, validationResult, NoOpSchemaCollector.instance);\n }\n }\n }\n }\n}\nfunction parse(textDocument, config) {\n var problems = [];\n var lastProblemOffset = -1;\n var text = textDocument.getText();\n var scanner = _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.createScanner(text, false);\n var commentRanges = config && config.collectComments ? [] : undefined;\n function _scanNext() {\n while (true) {\n var token_1 = scanner.scan();\n _checkScanError();\n switch (token_1) {\n case 12 /* LineCommentTrivia */:\n case 13 /* BlockCommentTrivia */:\n if (Array.isArray(commentRanges)) {\n commentRanges.push(_jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.Range.create(textDocument.positionAt(scanner.getTokenOffset()), textDocument.positionAt(scanner.getTokenOffset() + scanner.getTokenLength())));\n }\n break;\n case 15 /* Trivia */:\n case 14 /* LineBreakTrivia */:\n break;\n default:\n return token_1;\n }\n }\n }\n function _accept(token) {\n if (scanner.getToken() === token) {\n _scanNext();\n return true;\n }\n return false;\n }\n function _errorAtRange(message, code, startOffset, endOffset, severity) {\n if (severity === void 0) { severity = _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Error; }\n if (problems.length === 0 || startOffset !== lastProblemOffset) {\n var range = _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.Range.create(textDocument.positionAt(startOffset), textDocument.positionAt(endOffset));\n problems.push(_jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.Diagnostic.create(range, message, severity, code, textDocument.languageId));\n lastProblemOffset = startOffset;\n }\n }\n function _error(message, code, node, skipUntilAfter, skipUntil) {\n if (node === void 0) { node = undefined; }\n if (skipUntilAfter === void 0) { skipUntilAfter = []; }\n if (skipUntil === void 0) { skipUntil = []; }\n var start = scanner.getTokenOffset();\n var end = scanner.getTokenOffset() + scanner.getTokenLength();\n if (start === end && start > 0) {\n start--;\n while (start > 0 && /\\s/.test(text.charAt(start))) {\n start--;\n }\n end = start + 1;\n }\n _errorAtRange(message, code, start, end);\n if (node) {\n _finalize(node, false);\n }\n if (skipUntilAfter.length + skipUntil.length > 0) {\n var token_2 = scanner.getToken();\n while (token_2 !== 17 /* EOF */) {\n if (skipUntilAfter.indexOf(token_2) !== -1) {\n _scanNext();\n break;\n }\n else if (skipUntil.indexOf(token_2) !== -1) {\n break;\n }\n token_2 = _scanNext();\n }\n }\n return node;\n }\n function _checkScanError() {\n switch (scanner.getTokenError()) {\n case 4 /* InvalidUnicode */:\n _error(localize('InvalidUnicode', 'Invalid unicode sequence in string.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.InvalidUnicode);\n return true;\n case 5 /* InvalidEscapeCharacter */:\n _error(localize('InvalidEscapeCharacter', 'Invalid escape character in string.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.InvalidEscapeCharacter);\n return true;\n case 3 /* UnexpectedEndOfNumber */:\n _error(localize('UnexpectedEndOfNumber', 'Unexpected end of number.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.UnexpectedEndOfNumber);\n return true;\n case 1 /* UnexpectedEndOfComment */:\n _error(localize('UnexpectedEndOfComment', 'Unexpected end of comment.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.UnexpectedEndOfComment);\n return true;\n case 2 /* UnexpectedEndOfString */:\n _error(localize('UnexpectedEndOfString', 'Unexpected end of string.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.UnexpectedEndOfString);\n return true;\n case 6 /* InvalidCharacter */:\n _error(localize('InvalidCharacter', 'Invalid characters in string. Control characters must be escaped.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.InvalidCharacter);\n return true;\n }\n return false;\n }\n function _finalize(node, scanNext) {\n node.length = scanner.getTokenOffset() + scanner.getTokenLength() - node.offset;\n if (scanNext) {\n _scanNext();\n }\n return node;\n }\n function _parseArray(parent) {\n if (scanner.getToken() !== 3 /* OpenBracketToken */) {\n return undefined;\n }\n var node = new ArrayASTNodeImpl(parent, scanner.getTokenOffset());\n _scanNext(); // consume OpenBracketToken\n var count = 0;\n var needsComma = false;\n while (scanner.getToken() !== 4 /* CloseBracketToken */ && scanner.getToken() !== 17 /* EOF */) {\n if (scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n _error(localize('ValueExpected', 'Value expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.ValueExpected);\n }\n var commaOffset = scanner.getTokenOffset();\n _scanNext(); // consume comma\n if (scanner.getToken() === 4 /* CloseBracketToken */) {\n if (needsComma) {\n _errorAtRange(localize('TrailingComma', 'Trailing comma'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.TrailingComma, commaOffset, commaOffset + 1);\n }\n continue;\n }\n }\n else if (needsComma) {\n _error(localize('ExpectedComma', 'Expected comma'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.CommaExpected);\n }\n var item = _parseValue(node);\n if (!item) {\n _error(localize('PropertyExpected', 'Value expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.ValueExpected, undefined, [], [4 /* CloseBracketToken */, 5 /* CommaToken */]);\n }\n else {\n node.items.push(item);\n }\n needsComma = true;\n }\n if (scanner.getToken() !== 4 /* CloseBracketToken */) {\n return _error(localize('ExpectedCloseBracket', 'Expected comma or closing bracket'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.CommaOrCloseBacketExpected, node);\n }\n return _finalize(node, true);\n }\n var keyPlaceholder = new StringASTNodeImpl(undefined, 0, 0);\n function _parseProperty(parent, keysSeen) {\n var node = new PropertyASTNodeImpl(parent, scanner.getTokenOffset(), keyPlaceholder);\n var key = _parseString(node);\n if (!key) {\n if (scanner.getToken() === 16 /* Unknown */) {\n // give a more helpful error message\n _error(localize('DoubleQuotesExpected', 'Property keys must be doublequoted'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Undefined);\n var keyNode = new StringASTNodeImpl(node, scanner.getTokenOffset(), scanner.getTokenLength());\n keyNode.value = scanner.getTokenValue();\n key = keyNode;\n _scanNext(); // consume Unknown\n }\n else {\n return undefined;\n }\n }\n node.keyNode = key;\n var seen = keysSeen[key.value];\n if (seen) {\n _errorAtRange(localize('DuplicateKeyWarning', \"Duplicate object key\"), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.DuplicateKey, node.keyNode.offset, node.keyNode.offset + node.keyNode.length, _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Warning);\n if (typeof seen === 'object') {\n _errorAtRange(localize('DuplicateKeyWarning', \"Duplicate object key\"), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.DuplicateKey, seen.keyNode.offset, seen.keyNode.offset + seen.keyNode.length, _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.DiagnosticSeverity.Warning);\n }\n keysSeen[key.value] = true; // if the same key is duplicate again, avoid duplicate error reporting\n }\n else {\n keysSeen[key.value] = node;\n }\n if (scanner.getToken() === 6 /* ColonToken */) {\n node.colonOffset = scanner.getTokenOffset();\n _scanNext(); // consume ColonToken\n }\n else {\n _error(localize('ColonExpected', 'Colon expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.ColonExpected);\n if (scanner.getToken() === 10 /* StringLiteral */ && textDocument.positionAt(key.offset + key.length).line < textDocument.positionAt(scanner.getTokenOffset()).line) {\n node.length = key.length;\n return node;\n }\n }\n var value = _parseValue(node);\n if (!value) {\n return _error(localize('ValueExpected', 'Value expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.ValueExpected, node, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n node.valueNode = value;\n node.length = value.offset + value.length - node.offset;\n return node;\n }\n function _parseObject(parent) {\n if (scanner.getToken() !== 1 /* OpenBraceToken */) {\n return undefined;\n }\n var node = new ObjectASTNodeImpl(parent, scanner.getTokenOffset());\n var keysSeen = Object.create(null);\n _scanNext(); // consume OpenBraceToken\n var needsComma = false;\n while (scanner.getToken() !== 2 /* CloseBraceToken */ && scanner.getToken() !== 17 /* EOF */) {\n if (scanner.getToken() === 5 /* CommaToken */) {\n if (!needsComma) {\n _error(localize('PropertyExpected', 'Property expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.PropertyExpected);\n }\n var commaOffset = scanner.getTokenOffset();\n _scanNext(); // consume comma\n if (scanner.getToken() === 2 /* CloseBraceToken */) {\n if (needsComma) {\n _errorAtRange(localize('TrailingComma', 'Trailing comma'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.TrailingComma, commaOffset, commaOffset + 1);\n }\n continue;\n }\n }\n else if (needsComma) {\n _error(localize('ExpectedComma', 'Expected comma'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.CommaExpected);\n }\n var property = _parseProperty(node, keysSeen);\n if (!property) {\n _error(localize('PropertyExpected', 'Property expected'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.PropertyExpected, undefined, [], [2 /* CloseBraceToken */, 5 /* CommaToken */]);\n }\n else {\n node.properties.push(property);\n }\n needsComma = true;\n }\n if (scanner.getToken() !== 2 /* CloseBraceToken */) {\n return _error(localize('ExpectedCloseBrace', 'Expected comma or closing brace'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.CommaOrCloseBraceExpected, node);\n }\n return _finalize(node, true);\n }\n function _parseString(parent) {\n if (scanner.getToken() !== 10 /* StringLiteral */) {\n return undefined;\n }\n var node = new StringASTNodeImpl(parent, scanner.getTokenOffset());\n node.value = scanner.getTokenValue();\n return _finalize(node, true);\n }\n function _parseNumber(parent) {\n if (scanner.getToken() !== 11 /* NumericLiteral */) {\n return undefined;\n }\n var node = new NumberASTNodeImpl(parent, scanner.getTokenOffset());\n if (scanner.getTokenError() === 0 /* None */) {\n var tokenValue = scanner.getTokenValue();\n try {\n var numberValue = JSON.parse(tokenValue);\n if (!(0,_utils_objects_js__WEBPACK_IMPORTED_MODULE_1__.isNumber)(numberValue)) {\n return _error(localize('InvalidNumberFormat', 'Invalid number format.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Undefined, node);\n }\n node.value = numberValue;\n }\n catch (e) {\n return _error(localize('InvalidNumberFormat', 'Invalid number format.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Undefined, node);\n }\n node.isInteger = tokenValue.indexOf('.') === -1;\n }\n return _finalize(node, true);\n }\n function _parseLiteral(parent) {\n var node;\n switch (scanner.getToken()) {\n case 7 /* NullKeyword */:\n return _finalize(new NullASTNodeImpl(parent, scanner.getTokenOffset()), true);\n case 8 /* TrueKeyword */:\n return _finalize(new BooleanASTNodeImpl(parent, true, scanner.getTokenOffset()), true);\n case 9 /* FalseKeyword */:\n return _finalize(new BooleanASTNodeImpl(parent, false, scanner.getTokenOffset()), true);\n default:\n return undefined;\n }\n }\n function _parseValue(parent) {\n return _parseArray(parent) || _parseObject(parent) || _parseString(parent) || _parseNumber(parent) || _parseLiteral(parent);\n }\n var _root = undefined;\n var token = _scanNext();\n if (token !== 17 /* EOF */) {\n _root = _parseValue(_root);\n if (!_root) {\n _error(localize('Invalid symbol', 'Expected a JSON object, array or literal.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Undefined);\n }\n else if (scanner.getToken() !== 17 /* EOF */) {\n _error(localize('End of file expected', 'End of file expected.'), _jsonLanguageTypes_js__WEBPACK_IMPORTED_MODULE_3__.ErrorCode.Undefined);\n }\n }\n return new JSONDocument(_root, problems, commentRanges);\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/parser/jsonParser.js?");
89
89
 
90
90
  /***/ }),
91
91
 
@@ -155,7 +155,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
155
155
  \*************************************************************************************************************************/
156
156
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
157
157
 
158
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"UnresolvedSchema\": () => (/* binding */ UnresolvedSchema),\n/* harmony export */ \"ResolvedSchema\": () => (/* binding */ ResolvedSchema),\n/* harmony export */ \"JSONSchemaService\": () => (/* binding */ JSONSchemaService)\n/* harmony export */ });\n/* harmony import */ var _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../jsonc-parser/main.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/main.js\");\n/* harmony import */ var _vscode_uri_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../vscode-uri/index.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-uri/index.js\");\n/* harmony import */ var _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/strings.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/strings.js\");\n/* harmony import */ var _parser_jsonParser_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../parser/jsonParser.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/parser/jsonParser.js\");\n/* harmony import */ var _fillers_vscode_nls_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../../fillers/vscode-nls.js */ \"./node_modules/monaco-editor/esm/vs/language/json/fillers/vscode-nls.js\");\n/* harmony import */ var _utils_glob_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/glob.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/glob.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n\n\n\n\nvar localize = _fillers_vscode_nls_js__WEBPACK_IMPORTED_MODULE_4__.loadMessageBundle();\nvar BANG = '!';\nvar PATH_SEP = '/';\nvar FilePatternAssociation = /** @class */ (function () {\n function FilePatternAssociation(pattern, uris) {\n this.globWrappers = [];\n try {\n for (var _i = 0, pattern_1 = pattern; _i < pattern_1.length; _i++) {\n var patternString = pattern_1[_i];\n var include = patternString[0] !== BANG;\n if (!include) {\n patternString = patternString.substring(1);\n }\n if (patternString.length > 0) {\n if (patternString[0] === PATH_SEP) {\n patternString = patternString.substring(1);\n }\n this.globWrappers.push({\n regexp: (0,_utils_glob_js__WEBPACK_IMPORTED_MODULE_5__.createRegex)('**/' + patternString, { extended: true, globstar: true }),\n include: include,\n });\n }\n }\n ;\n this.uris = uris;\n }\n catch (e) {\n this.globWrappers.length = 0;\n this.uris = [];\n }\n }\n FilePatternAssociation.prototype.matchesPattern = function (fileName) {\n var match = false;\n for (var _i = 0, _a = this.globWrappers; _i < _a.length; _i++) {\n var _b = _a[_i], regexp = _b.regexp, include = _b.include;\n if (regexp.test(fileName)) {\n match = include;\n }\n }\n return match;\n };\n FilePatternAssociation.prototype.getURIs = function () {\n return this.uris;\n };\n return FilePatternAssociation;\n}());\nvar SchemaHandle = /** @class */ (function () {\n function SchemaHandle(service, url, unresolvedSchemaContent) {\n this.service = service;\n this.url = url;\n this.dependencies = {};\n if (unresolvedSchemaContent) {\n this.unresolvedSchema = this.service.promise.resolve(new UnresolvedSchema(unresolvedSchemaContent));\n }\n }\n SchemaHandle.prototype.getUnresolvedSchema = function () {\n if (!this.unresolvedSchema) {\n this.unresolvedSchema = this.service.loadSchema(this.url);\n }\n return this.unresolvedSchema;\n };\n SchemaHandle.prototype.getResolvedSchema = function () {\n var _this = this;\n if (!this.resolvedSchema) {\n this.resolvedSchema = this.getUnresolvedSchema().then(function (unresolved) {\n return _this.service.resolveSchemaContent(unresolved, _this.url, _this.dependencies);\n });\n }\n return this.resolvedSchema;\n };\n SchemaHandle.prototype.clearSchema = function () {\n this.resolvedSchema = undefined;\n this.unresolvedSchema = undefined;\n this.dependencies = {};\n };\n return SchemaHandle;\n}());\nvar UnresolvedSchema = /** @class */ (function () {\n function UnresolvedSchema(schema, errors) {\n if (errors === void 0) { errors = []; }\n this.schema = schema;\n this.errors = errors;\n }\n return UnresolvedSchema;\n}());\n\nvar ResolvedSchema = /** @class */ (function () {\n function ResolvedSchema(schema, errors) {\n if (errors === void 0) { errors = []; }\n this.schema = schema;\n this.errors = errors;\n }\n ResolvedSchema.prototype.getSection = function (path) {\n var schemaRef = this.getSectionRecursive(path, this.schema);\n if (schemaRef) {\n return _parser_jsonParser_js__WEBPACK_IMPORTED_MODULE_3__.asSchema(schemaRef);\n }\n return undefined;\n };\n ResolvedSchema.prototype.getSectionRecursive = function (path, schema) {\n if (!schema || typeof schema === 'boolean' || path.length === 0) {\n return schema;\n }\n var next = path.shift();\n if (schema.properties && typeof schema.properties[next]) {\n return this.getSectionRecursive(path, schema.properties[next]);\n }\n else if (schema.patternProperties) {\n for (var _i = 0, _a = Object.keys(schema.patternProperties); _i < _a.length; _i++) {\n var pattern = _a[_i];\n var regex = _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.extendedRegExp(pattern);\n if (regex.test(next)) {\n return this.getSectionRecursive(path, schema.patternProperties[pattern]);\n }\n }\n }\n else if (typeof schema.additionalProperties === 'object') {\n return this.getSectionRecursive(path, schema.additionalProperties);\n }\n else if (next.match('[0-9]+')) {\n if (Array.isArray(schema.items)) {\n var index = parseInt(next, 10);\n if (!isNaN(index) && schema.items[index]) {\n return this.getSectionRecursive(path, schema.items[index]);\n }\n }\n else if (schema.items) {\n return this.getSectionRecursive(path, schema.items);\n }\n }\n return undefined;\n };\n return ResolvedSchema;\n}());\n\nvar JSONSchemaService = /** @class */ (function () {\n function JSONSchemaService(requestService, contextService, promiseConstructor) {\n this.contextService = contextService;\n this.requestService = requestService;\n this.promiseConstructor = promiseConstructor || Promise;\n this.callOnDispose = [];\n this.contributionSchemas = {};\n this.contributionAssociations = [];\n this.schemasById = {};\n this.filePatternAssociations = [];\n this.registeredSchemasIds = {};\n }\n JSONSchemaService.prototype.getRegisteredSchemaIds = function (filter) {\n return Object.keys(this.registeredSchemasIds).filter(function (id) {\n var scheme = _vscode_uri_index_js__WEBPACK_IMPORTED_MODULE_1__.URI.parse(id).scheme;\n return scheme !== 'schemaservice' && (!filter || filter(scheme));\n });\n };\n Object.defineProperty(JSONSchemaService.prototype, \"promise\", {\n get: function () {\n return this.promiseConstructor;\n },\n enumerable: false,\n configurable: true\n });\n JSONSchemaService.prototype.dispose = function () {\n while (this.callOnDispose.length > 0) {\n this.callOnDispose.pop()();\n }\n };\n JSONSchemaService.prototype.onResourceChange = function (uri) {\n var _this = this;\n var hasChanges = false;\n uri = normalizeId(uri);\n var toWalk = [uri];\n var all = Object.keys(this.schemasById).map(function (key) { return _this.schemasById[key]; });\n while (toWalk.length) {\n var curr = toWalk.pop();\n for (var i = 0; i < all.length; i++) {\n var handle = all[i];\n if (handle && (handle.url === curr || handle.dependencies[curr])) {\n if (handle.url !== curr) {\n toWalk.push(handle.url);\n }\n handle.clearSchema();\n all[i] = undefined;\n hasChanges = true;\n }\n }\n }\n return hasChanges;\n };\n JSONSchemaService.prototype.setSchemaContributions = function (schemaContributions) {\n if (schemaContributions.schemas) {\n var schemas = schemaContributions.schemas;\n for (var id in schemas) {\n var normalizedId = normalizeId(id);\n this.contributionSchemas[normalizedId] = this.addSchemaHandle(normalizedId, schemas[id]);\n }\n }\n if (Array.isArray(schemaContributions.schemaAssociations)) {\n var schemaAssociations = schemaContributions.schemaAssociations;\n for (var _i = 0, schemaAssociations_1 = schemaAssociations; _i < schemaAssociations_1.length; _i++) {\n var schemaAssociation = schemaAssociations_1[_i];\n var uris = schemaAssociation.uris.map(normalizeId);\n var association = this.addFilePatternAssociation(schemaAssociation.pattern, uris);\n this.contributionAssociations.push(association);\n }\n }\n };\n JSONSchemaService.prototype.addSchemaHandle = function (id, unresolvedSchemaContent) {\n var schemaHandle = new SchemaHandle(this, id, unresolvedSchemaContent);\n this.schemasById[id] = schemaHandle;\n return schemaHandle;\n };\n JSONSchemaService.prototype.getOrAddSchemaHandle = function (id, unresolvedSchemaContent) {\n return this.schemasById[id] || this.addSchemaHandle(id, unresolvedSchemaContent);\n };\n JSONSchemaService.prototype.addFilePatternAssociation = function (pattern, uris) {\n var fpa = new FilePatternAssociation(pattern, uris);\n this.filePatternAssociations.push(fpa);\n return fpa;\n };\n JSONSchemaService.prototype.registerExternalSchema = function (uri, filePatterns, unresolvedSchemaContent) {\n var id = normalizeId(uri);\n this.registeredSchemasIds[id] = true;\n this.cachedSchemaForResource = undefined;\n if (filePatterns) {\n this.addFilePatternAssociation(filePatterns, [uri]);\n }\n return unresolvedSchemaContent ? this.addSchemaHandle(id, unresolvedSchemaContent) : this.getOrAddSchemaHandle(id);\n };\n JSONSchemaService.prototype.clearExternalSchemas = function () {\n this.schemasById = {};\n this.filePatternAssociations = [];\n this.registeredSchemasIds = {};\n this.cachedSchemaForResource = undefined;\n for (var id in this.contributionSchemas) {\n this.schemasById[id] = this.contributionSchemas[id];\n this.registeredSchemasIds[id] = true;\n }\n for (var _i = 0, _a = this.contributionAssociations; _i < _a.length; _i++) {\n var contributionAssociation = _a[_i];\n this.filePatternAssociations.push(contributionAssociation);\n }\n };\n JSONSchemaService.prototype.getResolvedSchema = function (schemaId) {\n var id = normalizeId(schemaId);\n var schemaHandle = this.schemasById[id];\n if (schemaHandle) {\n return schemaHandle.getResolvedSchema();\n }\n return this.promise.resolve(undefined);\n };\n JSONSchemaService.prototype.loadSchema = function (url) {\n if (!this.requestService) {\n var errorMessage = localize('json.schema.norequestservice', 'Unable to load schema from \\'{0}\\'. No schema request service available', toDisplayString(url));\n return this.promise.resolve(new UnresolvedSchema({}, [errorMessage]));\n }\n return this.requestService(url).then(function (content) {\n if (!content) {\n var errorMessage = localize('json.schema.nocontent', 'Unable to load schema from \\'{0}\\': No content.', toDisplayString(url));\n return new UnresolvedSchema({}, [errorMessage]);\n }\n var schemaContent = {};\n var jsonErrors = [];\n schemaContent = _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.parse(content, jsonErrors);\n var errors = jsonErrors.length ? [localize('json.schema.invalidFormat', 'Unable to parse content from \\'{0}\\': Parse error at offset {1}.', toDisplayString(url), jsonErrors[0].offset)] : [];\n return new UnresolvedSchema(schemaContent, errors);\n }, function (error) {\n var errorMessage = error.toString();\n var errorSplit = error.toString().split('Error: ');\n if (errorSplit.length > 1) {\n // more concise error message, URL and context are attached by caller anyways\n errorMessage = errorSplit[1];\n }\n if (_utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.endsWith(errorMessage, '.')) {\n errorMessage = errorMessage.substr(0, errorMessage.length - 1);\n }\n return new UnresolvedSchema({}, [localize('json.schema.nocontent', 'Unable to load schema from \\'{0}\\': {1}.', toDisplayString(url), errorMessage)]);\n });\n };\n JSONSchemaService.prototype.resolveSchemaContent = function (schemaToResolve, schemaURL, dependencies) {\n var _this = this;\n var resolveErrors = schemaToResolve.errors.slice(0);\n var schema = schemaToResolve.schema;\n if (schema.$schema) {\n var id = normalizeId(schema.$schema);\n if (id === 'http://json-schema.org/draft-03/schema') {\n return this.promise.resolve(new ResolvedSchema({}, [localize('json.schema.draft03.notsupported', \"Draft-03 schemas are not supported.\")]));\n }\n else if (id === 'https://json-schema.org/draft/2019-09/schema') {\n resolveErrors.push(localize('json.schema.draft201909.notsupported', \"Draft 2019-09 schemas are not yet fully supported.\"));\n }\n }\n var contextService = this.contextService;\n var findSection = function (schema, path) {\n if (!path) {\n return schema;\n }\n var current = schema;\n if (path[0] === '/') {\n path = path.substr(1);\n }\n path.split('/').some(function (part) {\n part = part.replace(/~1/g, '/').replace(/~0/g, '~');\n current = current[part];\n return !current;\n });\n return current;\n };\n var merge = function (target, sourceRoot, sourceURI, refSegment) {\n var path = refSegment ? decodeURIComponent(refSegment) : undefined;\n var section = findSection(sourceRoot, path);\n if (section) {\n for (var key in section) {\n if (section.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = section[key];\n }\n }\n }\n else {\n resolveErrors.push(localize('json.schema.invalidref', '$ref \\'{0}\\' in \\'{1}\\' can not be resolved.', path, sourceURI));\n }\n };\n var resolveExternalLink = function (node, uri, refSegment, parentSchemaURL, parentSchemaDependencies) {\n if (contextService && !/^[A-Za-z][A-Za-z0-9+\\-.+]*:\\/\\/.*/.test(uri)) {\n uri = contextService.resolveRelativePath(uri, parentSchemaURL);\n }\n uri = normalizeId(uri);\n var referencedHandle = _this.getOrAddSchemaHandle(uri);\n return referencedHandle.getUnresolvedSchema().then(function (unresolvedSchema) {\n parentSchemaDependencies[uri] = true;\n if (unresolvedSchema.errors.length) {\n var loc = refSegment ? uri + '#' + refSegment : uri;\n resolveErrors.push(localize('json.schema.problemloadingref', 'Problems loading reference \\'{0}\\': {1}', loc, unresolvedSchema.errors[0]));\n }\n merge(node, unresolvedSchema.schema, uri, refSegment);\n return resolveRefs(node, unresolvedSchema.schema, uri, referencedHandle.dependencies);\n });\n };\n var resolveRefs = function (node, parentSchema, parentSchemaURL, parentSchemaDependencies) {\n if (!node || typeof node !== 'object') {\n return Promise.resolve(null);\n }\n var toWalk = [node];\n var seen = [];\n var openPromises = [];\n var collectEntries = function () {\n var entries = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n entries[_i] = arguments[_i];\n }\n for (var _a = 0, entries_1 = entries; _a < entries_1.length; _a++) {\n var entry = entries_1[_a];\n if (typeof entry === 'object') {\n toWalk.push(entry);\n }\n }\n };\n var collectMapEntries = function () {\n var maps = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n maps[_i] = arguments[_i];\n }\n for (var _a = 0, maps_1 = maps; _a < maps_1.length; _a++) {\n var map = maps_1[_a];\n if (typeof map === 'object') {\n for (var k in map) {\n var key = k;\n var entry = map[key];\n if (typeof entry === 'object') {\n toWalk.push(entry);\n }\n }\n }\n }\n };\n var collectArrayEntries = function () {\n var arrays = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n arrays[_i] = arguments[_i];\n }\n for (var _a = 0, arrays_1 = arrays; _a < arrays_1.length; _a++) {\n var array = arrays_1[_a];\n if (Array.isArray(array)) {\n for (var _b = 0, array_1 = array; _b < array_1.length; _b++) {\n var entry = array_1[_b];\n if (typeof entry === 'object') {\n toWalk.push(entry);\n }\n }\n }\n }\n };\n var handleRef = function (next) {\n var seenRefs = [];\n while (next.$ref) {\n var ref = next.$ref;\n var segments = ref.split('#', 2);\n delete next.$ref;\n if (segments[0].length > 0) {\n openPromises.push(resolveExternalLink(next, segments[0], segments[1], parentSchemaURL, parentSchemaDependencies));\n return;\n }\n else {\n if (seenRefs.indexOf(ref) === -1) {\n merge(next, parentSchema, parentSchemaURL, segments[1]); // can set next.$ref again, use seenRefs to avoid circle\n seenRefs.push(ref);\n }\n }\n }\n collectEntries(next.items, next.additionalItems, next.additionalProperties, next.not, next.contains, next.propertyNames, next.if, next.then, next.else);\n collectMapEntries(next.definitions, next.properties, next.patternProperties, next.dependencies);\n collectArrayEntries(next.anyOf, next.allOf, next.oneOf, next.items);\n };\n while (toWalk.length) {\n var next = toWalk.pop();\n if (seen.indexOf(next) >= 0) {\n continue;\n }\n seen.push(next);\n handleRef(next);\n }\n return _this.promise.all(openPromises);\n };\n return resolveRefs(schema, schema, schemaURL, dependencies).then(function (_) { return new ResolvedSchema(schema, resolveErrors); });\n };\n JSONSchemaService.prototype.getSchemaForResource = function (resource, document) {\n // first use $schema if present\n if (document && document.root && document.root.type === 'object') {\n var schemaProperties = document.root.properties.filter(function (p) { return (p.keyNode.value === '$schema') && p.valueNode && p.valueNode.type === 'string'; });\n if (schemaProperties.length > 0) {\n var valueNode = schemaProperties[0].valueNode;\n if (valueNode && valueNode.type === 'string') {\n var schemeId = _parser_jsonParser_js__WEBPACK_IMPORTED_MODULE_3__.getNodeValue(valueNode);\n if (schemeId && _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.startsWith(schemeId, '.') && this.contextService) {\n schemeId = this.contextService.resolveRelativePath(schemeId, resource);\n }\n if (schemeId) {\n var id = normalizeId(schemeId);\n return this.getOrAddSchemaHandle(id).getResolvedSchema();\n }\n }\n }\n }\n if (this.cachedSchemaForResource && this.cachedSchemaForResource.resource === resource) {\n return this.cachedSchemaForResource.resolvedSchema;\n }\n var seen = Object.create(null);\n var schemas = [];\n var normalizedResource = normalizeResourceForMatching(resource);\n for (var _i = 0, _a = this.filePatternAssociations; _i < _a.length; _i++) {\n var entry = _a[_i];\n if (entry.matchesPattern(normalizedResource)) {\n for (var _b = 0, _c = entry.getURIs(); _b < _c.length; _b++) {\n var schemaId = _c[_b];\n if (!seen[schemaId]) {\n schemas.push(schemaId);\n seen[schemaId] = true;\n }\n }\n }\n }\n var resolvedSchema = schemas.length > 0 ? this.createCombinedSchema(resource, schemas).getResolvedSchema() : this.promise.resolve(undefined);\n this.cachedSchemaForResource = { resource: resource, resolvedSchema: resolvedSchema };\n return resolvedSchema;\n };\n JSONSchemaService.prototype.createCombinedSchema = function (resource, schemaIds) {\n if (schemaIds.length === 1) {\n return this.getOrAddSchemaHandle(schemaIds[0]);\n }\n else {\n var combinedSchemaId = 'schemaservice://combinedSchema/' + encodeURIComponent(resource);\n var combinedSchema = {\n allOf: schemaIds.map(function (schemaId) { return ({ $ref: schemaId }); })\n };\n return this.addSchemaHandle(combinedSchemaId, combinedSchema);\n }\n };\n JSONSchemaService.prototype.getMatchingSchemas = function (document, jsonDocument, schema) {\n if (schema) {\n var id = schema.id || ('schemaservice://untitled/matchingSchemas/' + idCounter++);\n return this.resolveSchemaContent(new UnresolvedSchema(schema), id, {}).then(function (resolvedSchema) {\n return jsonDocument.getMatchingSchemas(resolvedSchema.schema).filter(function (s) { return !s.inverted; });\n });\n }\n return this.getSchemaForResource(document.uri, jsonDocument).then(function (schema) {\n if (schema) {\n return jsonDocument.getMatchingSchemas(schema.schema).filter(function (s) { return !s.inverted; });\n }\n return [];\n });\n };\n return JSONSchemaService;\n}());\n\nvar idCounter = 0;\nfunction normalizeId(id) {\n // remove trailing '#', normalize drive capitalization\n try {\n return _vscode_uri_index_js__WEBPACK_IMPORTED_MODULE_1__.URI.parse(id).toString();\n }\n catch (e) {\n return id;\n }\n}\nfunction normalizeResourceForMatching(resource) {\n // remove queries and fragments, normalize drive capitalization\n try {\n return _vscode_uri_index_js__WEBPACK_IMPORTED_MODULE_1__.URI.parse(resource).with({ fragment: null, query: null }).toString();\n }\n catch (e) {\n return resource;\n }\n}\nfunction toDisplayString(url) {\n try {\n var uri = _vscode_uri_index_js__WEBPACK_IMPORTED_MODULE_1__.URI.parse(url);\n if (uri.scheme === 'file') {\n return uri.fsPath;\n }\n }\n catch (e) {\n // ignore\n }\n return url;\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/services/jsonSchemaService.js?");
158
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"JSONSchemaService\": () => (/* binding */ JSONSchemaService),\n/* harmony export */ \"ResolvedSchema\": () => (/* binding */ ResolvedSchema),\n/* harmony export */ \"UnresolvedSchema\": () => (/* binding */ UnresolvedSchema)\n/* harmony export */ });\n/* harmony import */ var _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../../jsonc-parser/main.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/main.js\");\n/* harmony import */ var _vscode_uri_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../../vscode-uri/index.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-uri/index.js\");\n/* harmony import */ var _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/strings.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/strings.js\");\n/* harmony import */ var _parser_jsonParser_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../parser/jsonParser.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/parser/jsonParser.js\");\n/* harmony import */ var _fillers_vscode_nls_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./../../../fillers/vscode-nls.js */ \"./node_modules/monaco-editor/esm/vs/language/json/fillers/vscode-nls.js\");\n/* harmony import */ var _utils_glob_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/glob.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/glob.js\");\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\n\n\n\n\n\nvar localize = _fillers_vscode_nls_js__WEBPACK_IMPORTED_MODULE_4__.loadMessageBundle();\nvar BANG = '!';\nvar PATH_SEP = '/';\nvar FilePatternAssociation = /** @class */ (function () {\n function FilePatternAssociation(pattern, uris) {\n this.globWrappers = [];\n try {\n for (var _i = 0, pattern_1 = pattern; _i < pattern_1.length; _i++) {\n var patternString = pattern_1[_i];\n var include = patternString[0] !== BANG;\n if (!include) {\n patternString = patternString.substring(1);\n }\n if (patternString.length > 0) {\n if (patternString[0] === PATH_SEP) {\n patternString = patternString.substring(1);\n }\n this.globWrappers.push({\n regexp: (0,_utils_glob_js__WEBPACK_IMPORTED_MODULE_5__.createRegex)('**/' + patternString, { extended: true, globstar: true }),\n include: include,\n });\n }\n }\n ;\n this.uris = uris;\n }\n catch (e) {\n this.globWrappers.length = 0;\n this.uris = [];\n }\n }\n FilePatternAssociation.prototype.matchesPattern = function (fileName) {\n var match = false;\n for (var _i = 0, _a = this.globWrappers; _i < _a.length; _i++) {\n var _b = _a[_i], regexp = _b.regexp, include = _b.include;\n if (regexp.test(fileName)) {\n match = include;\n }\n }\n return match;\n };\n FilePatternAssociation.prototype.getURIs = function () {\n return this.uris;\n };\n return FilePatternAssociation;\n}());\nvar SchemaHandle = /** @class */ (function () {\n function SchemaHandle(service, url, unresolvedSchemaContent) {\n this.service = service;\n this.url = url;\n this.dependencies = {};\n if (unresolvedSchemaContent) {\n this.unresolvedSchema = this.service.promise.resolve(new UnresolvedSchema(unresolvedSchemaContent));\n }\n }\n SchemaHandle.prototype.getUnresolvedSchema = function () {\n if (!this.unresolvedSchema) {\n this.unresolvedSchema = this.service.loadSchema(this.url);\n }\n return this.unresolvedSchema;\n };\n SchemaHandle.prototype.getResolvedSchema = function () {\n var _this = this;\n if (!this.resolvedSchema) {\n this.resolvedSchema = this.getUnresolvedSchema().then(function (unresolved) {\n return _this.service.resolveSchemaContent(unresolved, _this.url, _this.dependencies);\n });\n }\n return this.resolvedSchema;\n };\n SchemaHandle.prototype.clearSchema = function () {\n this.resolvedSchema = undefined;\n this.unresolvedSchema = undefined;\n this.dependencies = {};\n };\n return SchemaHandle;\n}());\nvar UnresolvedSchema = /** @class */ (function () {\n function UnresolvedSchema(schema, errors) {\n if (errors === void 0) { errors = []; }\n this.schema = schema;\n this.errors = errors;\n }\n return UnresolvedSchema;\n}());\n\nvar ResolvedSchema = /** @class */ (function () {\n function ResolvedSchema(schema, errors) {\n if (errors === void 0) { errors = []; }\n this.schema = schema;\n this.errors = errors;\n }\n ResolvedSchema.prototype.getSection = function (path) {\n var schemaRef = this.getSectionRecursive(path, this.schema);\n if (schemaRef) {\n return _parser_jsonParser_js__WEBPACK_IMPORTED_MODULE_3__.asSchema(schemaRef);\n }\n return undefined;\n };\n ResolvedSchema.prototype.getSectionRecursive = function (path, schema) {\n if (!schema || typeof schema === 'boolean' || path.length === 0) {\n return schema;\n }\n var next = path.shift();\n if (schema.properties && typeof schema.properties[next]) {\n return this.getSectionRecursive(path, schema.properties[next]);\n }\n else if (schema.patternProperties) {\n for (var _i = 0, _a = Object.keys(schema.patternProperties); _i < _a.length; _i++) {\n var pattern = _a[_i];\n var regex = _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.extendedRegExp(pattern);\n if (regex.test(next)) {\n return this.getSectionRecursive(path, schema.patternProperties[pattern]);\n }\n }\n }\n else if (typeof schema.additionalProperties === 'object') {\n return this.getSectionRecursive(path, schema.additionalProperties);\n }\n else if (next.match('[0-9]+')) {\n if (Array.isArray(schema.items)) {\n var index = parseInt(next, 10);\n if (!isNaN(index) && schema.items[index]) {\n return this.getSectionRecursive(path, schema.items[index]);\n }\n }\n else if (schema.items) {\n return this.getSectionRecursive(path, schema.items);\n }\n }\n return undefined;\n };\n return ResolvedSchema;\n}());\n\nvar JSONSchemaService = /** @class */ (function () {\n function JSONSchemaService(requestService, contextService, promiseConstructor) {\n this.contextService = contextService;\n this.requestService = requestService;\n this.promiseConstructor = promiseConstructor || Promise;\n this.callOnDispose = [];\n this.contributionSchemas = {};\n this.contributionAssociations = [];\n this.schemasById = {};\n this.filePatternAssociations = [];\n this.registeredSchemasIds = {};\n }\n JSONSchemaService.prototype.getRegisteredSchemaIds = function (filter) {\n return Object.keys(this.registeredSchemasIds).filter(function (id) {\n var scheme = _vscode_uri_index_js__WEBPACK_IMPORTED_MODULE_1__.URI.parse(id).scheme;\n return scheme !== 'schemaservice' && (!filter || filter(scheme));\n });\n };\n Object.defineProperty(JSONSchemaService.prototype, \"promise\", {\n get: function () {\n return this.promiseConstructor;\n },\n enumerable: false,\n configurable: true\n });\n JSONSchemaService.prototype.dispose = function () {\n while (this.callOnDispose.length > 0) {\n this.callOnDispose.pop()();\n }\n };\n JSONSchemaService.prototype.onResourceChange = function (uri) {\n var _this = this;\n var hasChanges = false;\n uri = normalizeId(uri);\n var toWalk = [uri];\n var all = Object.keys(this.schemasById).map(function (key) { return _this.schemasById[key]; });\n while (toWalk.length) {\n var curr = toWalk.pop();\n for (var i = 0; i < all.length; i++) {\n var handle = all[i];\n if (handle && (handle.url === curr || handle.dependencies[curr])) {\n if (handle.url !== curr) {\n toWalk.push(handle.url);\n }\n handle.clearSchema();\n all[i] = undefined;\n hasChanges = true;\n }\n }\n }\n return hasChanges;\n };\n JSONSchemaService.prototype.setSchemaContributions = function (schemaContributions) {\n if (schemaContributions.schemas) {\n var schemas = schemaContributions.schemas;\n for (var id in schemas) {\n var normalizedId = normalizeId(id);\n this.contributionSchemas[normalizedId] = this.addSchemaHandle(normalizedId, schemas[id]);\n }\n }\n if (Array.isArray(schemaContributions.schemaAssociations)) {\n var schemaAssociations = schemaContributions.schemaAssociations;\n for (var _i = 0, schemaAssociations_1 = schemaAssociations; _i < schemaAssociations_1.length; _i++) {\n var schemaAssociation = schemaAssociations_1[_i];\n var uris = schemaAssociation.uris.map(normalizeId);\n var association = this.addFilePatternAssociation(schemaAssociation.pattern, uris);\n this.contributionAssociations.push(association);\n }\n }\n };\n JSONSchemaService.prototype.addSchemaHandle = function (id, unresolvedSchemaContent) {\n var schemaHandle = new SchemaHandle(this, id, unresolvedSchemaContent);\n this.schemasById[id] = schemaHandle;\n return schemaHandle;\n };\n JSONSchemaService.prototype.getOrAddSchemaHandle = function (id, unresolvedSchemaContent) {\n return this.schemasById[id] || this.addSchemaHandle(id, unresolvedSchemaContent);\n };\n JSONSchemaService.prototype.addFilePatternAssociation = function (pattern, uris) {\n var fpa = new FilePatternAssociation(pattern, uris);\n this.filePatternAssociations.push(fpa);\n return fpa;\n };\n JSONSchemaService.prototype.registerExternalSchema = function (uri, filePatterns, unresolvedSchemaContent) {\n var id = normalizeId(uri);\n this.registeredSchemasIds[id] = true;\n this.cachedSchemaForResource = undefined;\n if (filePatterns) {\n this.addFilePatternAssociation(filePatterns, [uri]);\n }\n return unresolvedSchemaContent ? this.addSchemaHandle(id, unresolvedSchemaContent) : this.getOrAddSchemaHandle(id);\n };\n JSONSchemaService.prototype.clearExternalSchemas = function () {\n this.schemasById = {};\n this.filePatternAssociations = [];\n this.registeredSchemasIds = {};\n this.cachedSchemaForResource = undefined;\n for (var id in this.contributionSchemas) {\n this.schemasById[id] = this.contributionSchemas[id];\n this.registeredSchemasIds[id] = true;\n }\n for (var _i = 0, _a = this.contributionAssociations; _i < _a.length; _i++) {\n var contributionAssociation = _a[_i];\n this.filePatternAssociations.push(contributionAssociation);\n }\n };\n JSONSchemaService.prototype.getResolvedSchema = function (schemaId) {\n var id = normalizeId(schemaId);\n var schemaHandle = this.schemasById[id];\n if (schemaHandle) {\n return schemaHandle.getResolvedSchema();\n }\n return this.promise.resolve(undefined);\n };\n JSONSchemaService.prototype.loadSchema = function (url) {\n if (!this.requestService) {\n var errorMessage = localize('json.schema.norequestservice', 'Unable to load schema from \\'{0}\\'. No schema request service available', toDisplayString(url));\n return this.promise.resolve(new UnresolvedSchema({}, [errorMessage]));\n }\n return this.requestService(url).then(function (content) {\n if (!content) {\n var errorMessage = localize('json.schema.nocontent', 'Unable to load schema from \\'{0}\\': No content.', toDisplayString(url));\n return new UnresolvedSchema({}, [errorMessage]);\n }\n var schemaContent = {};\n var jsonErrors = [];\n schemaContent = _jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.parse(content, jsonErrors);\n var errors = jsonErrors.length ? [localize('json.schema.invalidFormat', 'Unable to parse content from \\'{0}\\': Parse error at offset {1}.', toDisplayString(url), jsonErrors[0].offset)] : [];\n return new UnresolvedSchema(schemaContent, errors);\n }, function (error) {\n var errorMessage = error.toString();\n var errorSplit = error.toString().split('Error: ');\n if (errorSplit.length > 1) {\n // more concise error message, URL and context are attached by caller anyways\n errorMessage = errorSplit[1];\n }\n if (_utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.endsWith(errorMessage, '.')) {\n errorMessage = errorMessage.substr(0, errorMessage.length - 1);\n }\n return new UnresolvedSchema({}, [localize('json.schema.nocontent', 'Unable to load schema from \\'{0}\\': {1}.', toDisplayString(url), errorMessage)]);\n });\n };\n JSONSchemaService.prototype.resolveSchemaContent = function (schemaToResolve, schemaURL, dependencies) {\n var _this = this;\n var resolveErrors = schemaToResolve.errors.slice(0);\n var schema = schemaToResolve.schema;\n if (schema.$schema) {\n var id = normalizeId(schema.$schema);\n if (id === 'http://json-schema.org/draft-03/schema') {\n return this.promise.resolve(new ResolvedSchema({}, [localize('json.schema.draft03.notsupported', \"Draft-03 schemas are not supported.\")]));\n }\n else if (id === 'https://json-schema.org/draft/2019-09/schema') {\n resolveErrors.push(localize('json.schema.draft201909.notsupported', \"Draft 2019-09 schemas are not yet fully supported.\"));\n }\n }\n var contextService = this.contextService;\n var findSection = function (schema, path) {\n if (!path) {\n return schema;\n }\n var current = schema;\n if (path[0] === '/') {\n path = path.substr(1);\n }\n path.split('/').some(function (part) {\n part = part.replace(/~1/g, '/').replace(/~0/g, '~');\n current = current[part];\n return !current;\n });\n return current;\n };\n var merge = function (target, sourceRoot, sourceURI, refSegment) {\n var path = refSegment ? decodeURIComponent(refSegment) : undefined;\n var section = findSection(sourceRoot, path);\n if (section) {\n for (var key in section) {\n if (section.hasOwnProperty(key) && !target.hasOwnProperty(key)) {\n target[key] = section[key];\n }\n }\n }\n else {\n resolveErrors.push(localize('json.schema.invalidref', '$ref \\'{0}\\' in \\'{1}\\' can not be resolved.', path, sourceURI));\n }\n };\n var resolveExternalLink = function (node, uri, refSegment, parentSchemaURL, parentSchemaDependencies) {\n if (contextService && !/^[A-Za-z][A-Za-z0-9+\\-.+]*:\\/\\/.*/.test(uri)) {\n uri = contextService.resolveRelativePath(uri, parentSchemaURL);\n }\n uri = normalizeId(uri);\n var referencedHandle = _this.getOrAddSchemaHandle(uri);\n return referencedHandle.getUnresolvedSchema().then(function (unresolvedSchema) {\n parentSchemaDependencies[uri] = true;\n if (unresolvedSchema.errors.length) {\n var loc = refSegment ? uri + '#' + refSegment : uri;\n resolveErrors.push(localize('json.schema.problemloadingref', 'Problems loading reference \\'{0}\\': {1}', loc, unresolvedSchema.errors[0]));\n }\n merge(node, unresolvedSchema.schema, uri, refSegment);\n return resolveRefs(node, unresolvedSchema.schema, uri, referencedHandle.dependencies);\n });\n };\n var resolveRefs = function (node, parentSchema, parentSchemaURL, parentSchemaDependencies) {\n if (!node || typeof node !== 'object') {\n return Promise.resolve(null);\n }\n var toWalk = [node];\n var seen = [];\n var openPromises = [];\n var collectEntries = function () {\n var entries = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n entries[_i] = arguments[_i];\n }\n for (var _a = 0, entries_1 = entries; _a < entries_1.length; _a++) {\n var entry = entries_1[_a];\n if (typeof entry === 'object') {\n toWalk.push(entry);\n }\n }\n };\n var collectMapEntries = function () {\n var maps = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n maps[_i] = arguments[_i];\n }\n for (var _a = 0, maps_1 = maps; _a < maps_1.length; _a++) {\n var map = maps_1[_a];\n if (typeof map === 'object') {\n for (var k in map) {\n var key = k;\n var entry = map[key];\n if (typeof entry === 'object') {\n toWalk.push(entry);\n }\n }\n }\n }\n };\n var collectArrayEntries = function () {\n var arrays = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n arrays[_i] = arguments[_i];\n }\n for (var _a = 0, arrays_1 = arrays; _a < arrays_1.length; _a++) {\n var array = arrays_1[_a];\n if (Array.isArray(array)) {\n for (var _b = 0, array_1 = array; _b < array_1.length; _b++) {\n var entry = array_1[_b];\n if (typeof entry === 'object') {\n toWalk.push(entry);\n }\n }\n }\n }\n };\n var handleRef = function (next) {\n var seenRefs = [];\n while (next.$ref) {\n var ref = next.$ref;\n var segments = ref.split('#', 2);\n delete next.$ref;\n if (segments[0].length > 0) {\n openPromises.push(resolveExternalLink(next, segments[0], segments[1], parentSchemaURL, parentSchemaDependencies));\n return;\n }\n else {\n if (seenRefs.indexOf(ref) === -1) {\n merge(next, parentSchema, parentSchemaURL, segments[1]); // can set next.$ref again, use seenRefs to avoid circle\n seenRefs.push(ref);\n }\n }\n }\n collectEntries(next.items, next.additionalItems, next.additionalProperties, next.not, next.contains, next.propertyNames, next.if, next.then, next.else);\n collectMapEntries(next.definitions, next.properties, next.patternProperties, next.dependencies);\n collectArrayEntries(next.anyOf, next.allOf, next.oneOf, next.items);\n };\n while (toWalk.length) {\n var next = toWalk.pop();\n if (seen.indexOf(next) >= 0) {\n continue;\n }\n seen.push(next);\n handleRef(next);\n }\n return _this.promise.all(openPromises);\n };\n return resolveRefs(schema, schema, schemaURL, dependencies).then(function (_) { return new ResolvedSchema(schema, resolveErrors); });\n };\n JSONSchemaService.prototype.getSchemaForResource = function (resource, document) {\n // first use $schema if present\n if (document && document.root && document.root.type === 'object') {\n var schemaProperties = document.root.properties.filter(function (p) { return (p.keyNode.value === '$schema') && p.valueNode && p.valueNode.type === 'string'; });\n if (schemaProperties.length > 0) {\n var valueNode = schemaProperties[0].valueNode;\n if (valueNode && valueNode.type === 'string') {\n var schemeId = _parser_jsonParser_js__WEBPACK_IMPORTED_MODULE_3__.getNodeValue(valueNode);\n if (schemeId && _utils_strings_js__WEBPACK_IMPORTED_MODULE_2__.startsWith(schemeId, '.') && this.contextService) {\n schemeId = this.contextService.resolveRelativePath(schemeId, resource);\n }\n if (schemeId) {\n var id = normalizeId(schemeId);\n return this.getOrAddSchemaHandle(id).getResolvedSchema();\n }\n }\n }\n }\n if (this.cachedSchemaForResource && this.cachedSchemaForResource.resource === resource) {\n return this.cachedSchemaForResource.resolvedSchema;\n }\n var seen = Object.create(null);\n var schemas = [];\n var normalizedResource = normalizeResourceForMatching(resource);\n for (var _i = 0, _a = this.filePatternAssociations; _i < _a.length; _i++) {\n var entry = _a[_i];\n if (entry.matchesPattern(normalizedResource)) {\n for (var _b = 0, _c = entry.getURIs(); _b < _c.length; _b++) {\n var schemaId = _c[_b];\n if (!seen[schemaId]) {\n schemas.push(schemaId);\n seen[schemaId] = true;\n }\n }\n }\n }\n var resolvedSchema = schemas.length > 0 ? this.createCombinedSchema(resource, schemas).getResolvedSchema() : this.promise.resolve(undefined);\n this.cachedSchemaForResource = { resource: resource, resolvedSchema: resolvedSchema };\n return resolvedSchema;\n };\n JSONSchemaService.prototype.createCombinedSchema = function (resource, schemaIds) {\n if (schemaIds.length === 1) {\n return this.getOrAddSchemaHandle(schemaIds[0]);\n }\n else {\n var combinedSchemaId = 'schemaservice://combinedSchema/' + encodeURIComponent(resource);\n var combinedSchema = {\n allOf: schemaIds.map(function (schemaId) { return ({ $ref: schemaId }); })\n };\n return this.addSchemaHandle(combinedSchemaId, combinedSchema);\n }\n };\n JSONSchemaService.prototype.getMatchingSchemas = function (document, jsonDocument, schema) {\n if (schema) {\n var id = schema.id || ('schemaservice://untitled/matchingSchemas/' + idCounter++);\n return this.resolveSchemaContent(new UnresolvedSchema(schema), id, {}).then(function (resolvedSchema) {\n return jsonDocument.getMatchingSchemas(resolvedSchema.schema).filter(function (s) { return !s.inverted; });\n });\n }\n return this.getSchemaForResource(document.uri, jsonDocument).then(function (schema) {\n if (schema) {\n return jsonDocument.getMatchingSchemas(schema.schema).filter(function (s) { return !s.inverted; });\n }\n return [];\n });\n };\n return JSONSchemaService;\n}());\n\nvar idCounter = 0;\nfunction normalizeId(id) {\n // remove trailing '#', normalize drive capitalization\n try {\n return _vscode_uri_index_js__WEBPACK_IMPORTED_MODULE_1__.URI.parse(id).toString();\n }\n catch (e) {\n return id;\n }\n}\nfunction normalizeResourceForMatching(resource) {\n // remove queries and fragments, normalize drive capitalization\n try {\n return _vscode_uri_index_js__WEBPACK_IMPORTED_MODULE_1__.URI.parse(resource).with({ fragment: null, query: null }).toString();\n }\n catch (e) {\n return resource;\n }\n}\nfunction toDisplayString(url) {\n try {\n var uri = _vscode_uri_index_js__WEBPACK_IMPORTED_MODULE_1__.URI.parse(url);\n if (uri.scheme === 'file') {\n return uri.fsPath;\n }\n }\n catch (e) {\n // ignore\n }\n return url;\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/services/jsonSchemaService.js?");
159
159
 
160
160
  /***/ }),
161
161
 
@@ -185,7 +185,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
185
185
  \***********************************************************************************************************/
186
186
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
187
187
 
188
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"hexDigit\": () => (/* binding */ hexDigit),\n/* harmony export */ \"colorFromHex\": () => (/* binding */ colorFromHex),\n/* harmony export */ \"colorFrom256RGB\": () => (/* binding */ colorFrom256RGB)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar Digit0 = 48;\nvar Digit9 = 57;\nvar A = 65;\nvar a = 97;\nvar f = 102;\nfunction hexDigit(charCode) {\n if (charCode < Digit0) {\n return 0;\n }\n if (charCode <= Digit9) {\n return charCode - Digit0;\n }\n if (charCode < a) {\n charCode += (a - A);\n }\n if (charCode >= a && charCode <= f) {\n return charCode - a + 10;\n }\n return 0;\n}\nfunction colorFromHex(text) {\n if (text[0] !== '#') {\n return undefined;\n }\n switch (text.length) {\n case 4:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,\n green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,\n blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,\n alpha: 1\n };\n case 5:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,\n green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,\n blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,\n alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0,\n };\n case 7:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,\n green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,\n blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,\n alpha: 1\n };\n case 9:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,\n green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,\n blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,\n alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0\n };\n }\n return undefined;\n}\nfunction colorFrom256RGB(red, green, blue, alpha) {\n if (alpha === void 0) { alpha = 1.0; }\n return {\n red: red / 255.0,\n green: green / 255.0,\n blue: blue / 255.0,\n alpha: alpha\n };\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/colors.js?");
188
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"colorFrom256RGB\": () => (/* binding */ colorFrom256RGB),\n/* harmony export */ \"colorFromHex\": () => (/* binding */ colorFromHex),\n/* harmony export */ \"hexDigit\": () => (/* binding */ hexDigit)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\nvar Digit0 = 48;\nvar Digit9 = 57;\nvar A = 65;\nvar a = 97;\nvar f = 102;\nfunction hexDigit(charCode) {\n if (charCode < Digit0) {\n return 0;\n }\n if (charCode <= Digit9) {\n return charCode - Digit0;\n }\n if (charCode < a) {\n charCode += (a - A);\n }\n if (charCode >= a && charCode <= f) {\n return charCode - a + 10;\n }\n return 0;\n}\nfunction colorFromHex(text) {\n if (text[0] !== '#') {\n return undefined;\n }\n switch (text.length) {\n case 4:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,\n green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,\n blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,\n alpha: 1\n };\n case 5:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x11) / 255.0,\n green: (hexDigit(text.charCodeAt(2)) * 0x11) / 255.0,\n blue: (hexDigit(text.charCodeAt(3)) * 0x11) / 255.0,\n alpha: (hexDigit(text.charCodeAt(4)) * 0x11) / 255.0,\n };\n case 7:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,\n green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,\n blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,\n alpha: 1\n };\n case 9:\n return {\n red: (hexDigit(text.charCodeAt(1)) * 0x10 + hexDigit(text.charCodeAt(2))) / 255.0,\n green: (hexDigit(text.charCodeAt(3)) * 0x10 + hexDigit(text.charCodeAt(4))) / 255.0,\n blue: (hexDigit(text.charCodeAt(5)) * 0x10 + hexDigit(text.charCodeAt(6))) / 255.0,\n alpha: (hexDigit(text.charCodeAt(7)) * 0x10 + hexDigit(text.charCodeAt(8))) / 255.0\n };\n }\n return undefined;\n}\nfunction colorFrom256RGB(red, green, blue, alpha) {\n if (alpha === void 0) { alpha = 1.0; }\n return {\n red: red / 255.0,\n green: green / 255.0,\n blue: blue / 255.0,\n alpha: alpha\n };\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/colors.js?");
189
189
 
190
190
  /***/ }),
191
191
 
@@ -215,7 +215,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
215
215
  \************************************************************************************************************/
216
216
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
217
217
 
218
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"equals\": () => (/* binding */ equals),\n/* harmony export */ \"isNumber\": () => (/* binding */ isNumber),\n/* harmony export */ \"isDefined\": () => (/* binding */ isDefined),\n/* harmony export */ \"isBoolean\": () => (/* binding */ isBoolean),\n/* harmony export */ \"isString\": () => (/* binding */ isString)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\n* Copyright (c) Microsoft Corporation. All rights reserved.\n* Licensed under the MIT License. See License.txt in the project root for license information.\n*--------------------------------------------------------------------------------------------*/\nfunction equals(one, other) {\n if (one === other) {\n return true;\n }\n if (one === null || one === undefined || other === null || other === undefined) {\n return false;\n }\n if (typeof one !== typeof other) {\n return false;\n }\n if (typeof one !== 'object') {\n return false;\n }\n if ((Array.isArray(one)) !== (Array.isArray(other))) {\n return false;\n }\n var i, key;\n if (Array.isArray(one)) {\n if (one.length !== other.length) {\n return false;\n }\n for (i = 0; i < one.length; i++) {\n if (!equals(one[i], other[i])) {\n return false;\n }\n }\n }\n else {\n var oneKeys = [];\n for (key in one) {\n oneKeys.push(key);\n }\n oneKeys.sort();\n var otherKeys = [];\n for (key in other) {\n otherKeys.push(key);\n }\n otherKeys.sort();\n if (!equals(oneKeys, otherKeys)) {\n return false;\n }\n for (i = 0; i < oneKeys.length; i++) {\n if (!equals(one[oneKeys[i]], other[oneKeys[i]])) {\n return false;\n }\n }\n }\n return true;\n}\nfunction isNumber(val) {\n return typeof val === 'number';\n}\nfunction isDefined(val) {\n return typeof val !== 'undefined';\n}\nfunction isBoolean(val) {\n return typeof val === 'boolean';\n}\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/objects.js?");
218
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"equals\": () => (/* binding */ equals),\n/* harmony export */ \"isBoolean\": () => (/* binding */ isBoolean),\n/* harmony export */ \"isDefined\": () => (/* binding */ isDefined),\n/* harmony export */ \"isNumber\": () => (/* binding */ isNumber),\n/* harmony export */ \"isString\": () => (/* binding */ isString)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\n* Copyright (c) Microsoft Corporation. All rights reserved.\n* Licensed under the MIT License. See License.txt in the project root for license information.\n*--------------------------------------------------------------------------------------------*/\nfunction equals(one, other) {\n if (one === other) {\n return true;\n }\n if (one === null || one === undefined || other === null || other === undefined) {\n return false;\n }\n if (typeof one !== typeof other) {\n return false;\n }\n if (typeof one !== 'object') {\n return false;\n }\n if ((Array.isArray(one)) !== (Array.isArray(other))) {\n return false;\n }\n var i, key;\n if (Array.isArray(one)) {\n if (one.length !== other.length) {\n return false;\n }\n for (i = 0; i < one.length; i++) {\n if (!equals(one[i], other[i])) {\n return false;\n }\n }\n }\n else {\n var oneKeys = [];\n for (key in one) {\n oneKeys.push(key);\n }\n oneKeys.sort();\n var otherKeys = [];\n for (key in other) {\n otherKeys.push(key);\n }\n otherKeys.sort();\n if (!equals(oneKeys, otherKeys)) {\n return false;\n }\n for (i = 0; i < oneKeys.length; i++) {\n if (!equals(one[oneKeys[i]], other[oneKeys[i]])) {\n return false;\n }\n }\n }\n return true;\n}\nfunction isNumber(val) {\n return typeof val === 'number';\n}\nfunction isDefined(val) {\n return typeof val !== 'undefined';\n}\nfunction isBoolean(val) {\n return typeof val === 'boolean';\n}\nfunction isString(val) {\n return typeof val === 'string';\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/objects.js?");
219
219
 
220
220
  /***/ }),
221
221
 
@@ -225,7 +225,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
225
225
  \************************************************************************************************************/
226
226
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
227
227
 
228
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"startsWith\": () => (/* binding */ startsWith),\n/* harmony export */ \"endsWith\": () => (/* binding */ endsWith),\n/* harmony export */ \"convertSimple2RegExpPattern\": () => (/* binding */ convertSimple2RegExpPattern),\n/* harmony export */ \"repeat\": () => (/* binding */ repeat),\n/* harmony export */ \"extendedRegExp\": () => (/* binding */ extendedRegExp)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\n* Copyright (c) Microsoft Corporation. All rights reserved.\n* Licensed under the MIT License. See License.txt in the project root for license information.\n*--------------------------------------------------------------------------------------------*/\nfunction startsWith(haystack, needle) {\n if (haystack.length < needle.length) {\n return false;\n }\n for (var i = 0; i < needle.length; i++) {\n if (haystack[i] !== needle[i]) {\n return false;\n }\n }\n return true;\n}\n/**\n * Determines if haystack ends with needle.\n */\nfunction endsWith(haystack, needle) {\n var diff = haystack.length - needle.length;\n if (diff > 0) {\n return haystack.lastIndexOf(needle) === diff;\n }\n else if (diff === 0) {\n return haystack === needle;\n }\n else {\n return false;\n }\n}\nfunction convertSimple2RegExpPattern(pattern) {\n return pattern.replace(/[\\-\\\\\\{\\}\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, '\\\\$&').replace(/[\\*]/g, '.*');\n}\nfunction repeat(value, count) {\n var s = '';\n while (count > 0) {\n if ((count & 1) === 1) {\n s += value;\n }\n value += value;\n count = count >>> 1;\n }\n return s;\n}\nfunction extendedRegExp(pattern) {\n if (startsWith(pattern, '(?i)')) {\n return new RegExp(pattern.substring(4), 'i');\n }\n else {\n return new RegExp(pattern);\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/strings.js?");
228
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"convertSimple2RegExpPattern\": () => (/* binding */ convertSimple2RegExpPattern),\n/* harmony export */ \"endsWith\": () => (/* binding */ endsWith),\n/* harmony export */ \"extendedRegExp\": () => (/* binding */ extendedRegExp),\n/* harmony export */ \"repeat\": () => (/* binding */ repeat),\n/* harmony export */ \"startsWith\": () => (/* binding */ startsWith)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\n* Copyright (c) Microsoft Corporation. All rights reserved.\n* Licensed under the MIT License. See License.txt in the project root for license information.\n*--------------------------------------------------------------------------------------------*/\nfunction startsWith(haystack, needle) {\n if (haystack.length < needle.length) {\n return false;\n }\n for (var i = 0; i < needle.length; i++) {\n if (haystack[i] !== needle[i]) {\n return false;\n }\n }\n return true;\n}\n/**\n * Determines if haystack ends with needle.\n */\nfunction endsWith(haystack, needle) {\n var diff = haystack.length - needle.length;\n if (diff > 0) {\n return haystack.lastIndexOf(needle) === diff;\n }\n else if (diff === 0) {\n return haystack === needle;\n }\n else {\n return false;\n }\n}\nfunction convertSimple2RegExpPattern(pattern) {\n return pattern.replace(/[\\-\\\\\\{\\}\\+\\?\\|\\^\\$\\.\\,\\[\\]\\(\\)\\#\\s]/g, '\\\\$&').replace(/[\\*]/g, '.*');\n}\nfunction repeat(value, count) {\n var s = '';\n while (count > 0) {\n if ((count & 1) === 1) {\n s += value;\n }\n value += value;\n count = count >>> 1;\n }\n return s;\n}\nfunction extendedRegExp(pattern) {\n if (startsWith(pattern, '(?i)')) {\n return new RegExp(pattern.substring(4), 'i');\n }\n else {\n return new RegExp(pattern);\n }\n}\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/strings.js?");
229
229
 
230
230
  /***/ }),
231
231
 
@@ -245,7 +245,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
245
245
  \***************************************************************************************************/
246
246
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
247
247
 
248
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"integer\": () => (/* binding */ integer),\n/* harmony export */ \"uinteger\": () => (/* binding */ uinteger),\n/* harmony export */ \"Position\": () => (/* binding */ Position),\n/* harmony export */ \"Range\": () => (/* binding */ Range),\n/* harmony export */ \"Location\": () => (/* binding */ Location),\n/* harmony export */ \"LocationLink\": () => (/* binding */ LocationLink),\n/* harmony export */ \"Color\": () => (/* binding */ Color),\n/* harmony export */ \"ColorInformation\": () => (/* binding */ ColorInformation),\n/* harmony export */ \"ColorPresentation\": () => (/* binding */ ColorPresentation),\n/* harmony export */ \"FoldingRangeKind\": () => (/* binding */ FoldingRangeKind),\n/* harmony export */ \"FoldingRange\": () => (/* binding */ FoldingRange),\n/* harmony export */ \"DiagnosticRelatedInformation\": () => (/* binding */ DiagnosticRelatedInformation),\n/* harmony export */ \"DiagnosticSeverity\": () => (/* binding */ DiagnosticSeverity),\n/* harmony export */ \"DiagnosticTag\": () => (/* binding */ DiagnosticTag),\n/* harmony export */ \"CodeDescription\": () => (/* binding */ CodeDescription),\n/* harmony export */ \"Diagnostic\": () => (/* binding */ Diagnostic),\n/* harmony export */ \"Command\": () => (/* binding */ Command),\n/* harmony export */ \"TextEdit\": () => (/* binding */ TextEdit),\n/* harmony export */ \"ChangeAnnotation\": () => (/* binding */ ChangeAnnotation),\n/* harmony export */ \"ChangeAnnotationIdentifier\": () => (/* binding */ ChangeAnnotationIdentifier),\n/* harmony export */ \"AnnotatedTextEdit\": () => (/* binding */ AnnotatedTextEdit),\n/* harmony export */ \"TextDocumentEdit\": () => (/* binding */ TextDocumentEdit),\n/* harmony export */ \"CreateFile\": () => (/* binding */ CreateFile),\n/* harmony export */ \"RenameFile\": () => (/* binding */ RenameFile),\n/* harmony export */ \"DeleteFile\": () => (/* binding */ DeleteFile),\n/* harmony export */ \"WorkspaceEdit\": () => (/* binding */ WorkspaceEdit),\n/* harmony export */ \"WorkspaceChange\": () => (/* binding */ WorkspaceChange),\n/* harmony export */ \"TextDocumentIdentifier\": () => (/* binding */ TextDocumentIdentifier),\n/* harmony export */ \"VersionedTextDocumentIdentifier\": () => (/* binding */ VersionedTextDocumentIdentifier),\n/* harmony export */ \"OptionalVersionedTextDocumentIdentifier\": () => (/* binding */ OptionalVersionedTextDocumentIdentifier),\n/* harmony export */ \"TextDocumentItem\": () => (/* binding */ TextDocumentItem),\n/* harmony export */ \"MarkupKind\": () => (/* binding */ MarkupKind),\n/* harmony export */ \"MarkupContent\": () => (/* binding */ MarkupContent),\n/* harmony export */ \"CompletionItemKind\": () => (/* binding */ CompletionItemKind),\n/* harmony export */ \"InsertTextFormat\": () => (/* binding */ InsertTextFormat),\n/* harmony export */ \"CompletionItemTag\": () => (/* binding */ CompletionItemTag),\n/* harmony export */ \"InsertReplaceEdit\": () => (/* binding */ InsertReplaceEdit),\n/* harmony export */ \"InsertTextMode\": () => (/* binding */ InsertTextMode),\n/* harmony export */ \"CompletionItem\": () => (/* binding */ CompletionItem),\n/* harmony export */ \"CompletionList\": () => (/* binding */ CompletionList),\n/* harmony export */ \"MarkedString\": () => (/* binding */ MarkedString),\n/* harmony export */ \"Hover\": () => (/* binding */ Hover),\n/* harmony export */ \"ParameterInformation\": () => (/* binding */ ParameterInformation),\n/* harmony export */ \"SignatureInformation\": () => (/* binding */ SignatureInformation),\n/* harmony export */ \"DocumentHighlightKind\": () => (/* binding */ DocumentHighlightKind),\n/* harmony export */ \"DocumentHighlight\": () => (/* binding */ DocumentHighlight),\n/* harmony export */ \"SymbolKind\": () => (/* binding */ SymbolKind),\n/* harmony export */ \"SymbolTag\": () => (/* binding */ SymbolTag),\n/* harmony export */ \"SymbolInformation\": () => (/* binding */ SymbolInformation),\n/* harmony export */ \"DocumentSymbol\": () => (/* binding */ DocumentSymbol),\n/* harmony export */ \"CodeActionKind\": () => (/* binding */ CodeActionKind),\n/* harmony export */ \"CodeActionContext\": () => (/* binding */ CodeActionContext),\n/* harmony export */ \"CodeAction\": () => (/* binding */ CodeAction),\n/* harmony export */ \"CodeLens\": () => (/* binding */ CodeLens),\n/* harmony export */ \"FormattingOptions\": () => (/* binding */ FormattingOptions),\n/* harmony export */ \"DocumentLink\": () => (/* binding */ DocumentLink),\n/* harmony export */ \"SelectionRange\": () => (/* binding */ SelectionRange),\n/* harmony export */ \"EOL\": () => (/* binding */ EOL),\n/* harmony export */ \"TextDocument\": () => (/* binding */ TextDocument)\n/* harmony export */ });\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n\nvar integer;\n(function (integer) {\n integer.MIN_VALUE = -2147483648;\n integer.MAX_VALUE = 2147483647;\n})(integer || (integer = {}));\nvar uinteger;\n(function (uinteger) {\n uinteger.MIN_VALUE = 0;\n uinteger.MAX_VALUE = 2147483647;\n})(uinteger || (uinteger = {}));\n/**\n * The Position namespace provides helper functions to work with\n * [Position](#Position) literals.\n */\nvar Position;\n(function (Position) {\n /**\n * Creates a new Position literal from the given line and character.\n * @param line The position's line.\n * @param character The position's character.\n */\n function create(line, character) {\n if (line === Number.MAX_VALUE) {\n line = uinteger.MAX_VALUE;\n }\n if (character === Number.MAX_VALUE) {\n character = uinteger.MAX_VALUE;\n }\n return { line: line, character: character };\n }\n Position.create = create;\n /**\n * Checks whether the given literal conforms to the [Position](#Position) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);\n }\n Position.is = is;\n})(Position || (Position = {}));\n/**\n * The Range namespace provides helper functions to work with\n * [Range](#Range) literals.\n */\nvar Range;\n(function (Range) {\n function create(one, two, three, four) {\n if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {\n return { start: Position.create(one, two), end: Position.create(three, four) };\n }\n else if (Position.is(one) && Position.is(two)) {\n return { start: one, end: two };\n }\n else {\n throw new Error(\"Range#create called with invalid arguments[\" + one + \", \" + two + \", \" + three + \", \" + four + \"]\");\n }\n }\n Range.create = create;\n /**\n * Checks whether the given literal conforms to the [Range](#Range) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\n }\n Range.is = is;\n})(Range || (Range = {}));\n/**\n * The Location namespace provides helper functions to work with\n * [Location](#Location) literals.\n */\nvar Location;\n(function (Location) {\n /**\n * Creates a Location literal.\n * @param uri The location's uri.\n * @param range The location's range.\n */\n function create(uri, range) {\n return { uri: uri, range: range };\n }\n Location.create = create;\n /**\n * Checks whether the given literal conforms to the [Location](#Location) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));\n }\n Location.is = is;\n})(Location || (Location = {}));\n/**\n * The LocationLink namespace provides helper functions to work with\n * [LocationLink](#LocationLink) literals.\n */\nvar LocationLink;\n(function (LocationLink) {\n /**\n * Creates a LocationLink literal.\n * @param targetUri The definition's uri.\n * @param targetRange The full range of the definition.\n * @param targetSelectionRange The span of the symbol definition at the target.\n * @param originSelectionRange The span of the symbol being defined in the originating source file.\n */\n function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {\n return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };\n }\n LocationLink.create = create;\n /**\n * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)\n && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))\n && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));\n }\n LocationLink.is = is;\n})(LocationLink || (LocationLink = {}));\n/**\n * The Color namespace provides helper functions to work with\n * [Color](#Color) literals.\n */\nvar Color;\n(function (Color) {\n /**\n * Creates a new Color literal.\n */\n function create(red, green, blue, alpha) {\n return {\n red: red,\n green: green,\n blue: blue,\n alpha: alpha,\n };\n }\n Color.create = create;\n /**\n * Checks whether the given literal conforms to the [Color](#Color) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.numberRange(candidate.red, 0, 1)\n && Is.numberRange(candidate.green, 0, 1)\n && Is.numberRange(candidate.blue, 0, 1)\n && Is.numberRange(candidate.alpha, 0, 1);\n }\n Color.is = is;\n})(Color || (Color = {}));\n/**\n * The ColorInformation namespace provides helper functions to work with\n * [ColorInformation](#ColorInformation) literals.\n */\nvar ColorInformation;\n(function (ColorInformation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(range, color) {\n return {\n range: range,\n color: color,\n };\n }\n ColorInformation.create = create;\n /**\n * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Range.is(candidate.range) && Color.is(candidate.color);\n }\n ColorInformation.is = is;\n})(ColorInformation || (ColorInformation = {}));\n/**\n * The Color namespace provides helper functions to work with\n * [ColorPresentation](#ColorPresentation) literals.\n */\nvar ColorPresentation;\n(function (ColorPresentation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(label, textEdit, additionalTextEdits) {\n return {\n label: label,\n textEdit: textEdit,\n additionalTextEdits: additionalTextEdits,\n };\n }\n ColorPresentation.create = create;\n /**\n * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.string(candidate.label)\n && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))\n && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));\n }\n ColorPresentation.is = is;\n})(ColorPresentation || (ColorPresentation = {}));\n/**\n * Enum of known range kinds\n */\nvar FoldingRangeKind;\n(function (FoldingRangeKind) {\n /**\n * Folding range for a comment\n */\n FoldingRangeKind[\"Comment\"] = \"comment\";\n /**\n * Folding range for a imports or includes\n */\n FoldingRangeKind[\"Imports\"] = \"imports\";\n /**\n * Folding range for a region (e.g. `#region`)\n */\n FoldingRangeKind[\"Region\"] = \"region\";\n})(FoldingRangeKind || (FoldingRangeKind = {}));\n/**\n * The folding range namespace provides helper functions to work with\n * [FoldingRange](#FoldingRange) literals.\n */\nvar FoldingRange;\n(function (FoldingRange) {\n /**\n * Creates a new FoldingRange literal.\n */\n function create(startLine, endLine, startCharacter, endCharacter, kind) {\n var result = {\n startLine: startLine,\n endLine: endLine\n };\n if (Is.defined(startCharacter)) {\n result.startCharacter = startCharacter;\n }\n if (Is.defined(endCharacter)) {\n result.endCharacter = endCharacter;\n }\n if (Is.defined(kind)) {\n result.kind = kind;\n }\n return result;\n }\n FoldingRange.create = create;\n /**\n * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)\n && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))\n && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))\n && (Is.undefined(candidate.kind) || Is.string(candidate.kind));\n }\n FoldingRange.is = is;\n})(FoldingRange || (FoldingRange = {}));\n/**\n * The DiagnosticRelatedInformation namespace provides helper functions to work with\n * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.\n */\nvar DiagnosticRelatedInformation;\n(function (DiagnosticRelatedInformation) {\n /**\n * Creates a new DiagnosticRelatedInformation literal.\n */\n function create(location, message) {\n return {\n location: location,\n message: message\n };\n }\n DiagnosticRelatedInformation.create = create;\n /**\n * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);\n }\n DiagnosticRelatedInformation.is = is;\n})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));\n/**\n * The diagnostic's severity.\n */\nvar DiagnosticSeverity;\n(function (DiagnosticSeverity) {\n /**\n * Reports an error.\n */\n DiagnosticSeverity.Error = 1;\n /**\n * Reports a warning.\n */\n DiagnosticSeverity.Warning = 2;\n /**\n * Reports an information.\n */\n DiagnosticSeverity.Information = 3;\n /**\n * Reports a hint.\n */\n DiagnosticSeverity.Hint = 4;\n})(DiagnosticSeverity || (DiagnosticSeverity = {}));\n/**\n * The diagnostic tags.\n *\n * @since 3.15.0\n */\nvar DiagnosticTag;\n(function (DiagnosticTag) {\n /**\n * Unused or unnecessary code.\n *\n * Clients are allowed to render diagnostics with this tag faded out instead of having\n * an error squiggle.\n */\n DiagnosticTag.Unnecessary = 1;\n /**\n * Deprecated or obsolete code.\n *\n * Clients are allowed to rendered diagnostics with this tag strike through.\n */\n DiagnosticTag.Deprecated = 2;\n})(DiagnosticTag || (DiagnosticTag = {}));\n/**\n * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.\n *\n * @since 3.16.0\n */\nvar CodeDescription;\n(function (CodeDescription) {\n function is(value) {\n var candidate = value;\n return candidate !== undefined && candidate !== null && Is.string(candidate.href);\n }\n CodeDescription.is = is;\n})(CodeDescription || (CodeDescription = {}));\n/**\n * The Diagnostic namespace provides helper functions to work with\n * [Diagnostic](#Diagnostic) literals.\n */\nvar Diagnostic;\n(function (Diagnostic) {\n /**\n * Creates a new Diagnostic literal.\n */\n function create(range, message, severity, code, source, relatedInformation) {\n var result = { range: range, message: message };\n if (Is.defined(severity)) {\n result.severity = severity;\n }\n if (Is.defined(code)) {\n result.code = code;\n }\n if (Is.defined(source)) {\n result.source = source;\n }\n if (Is.defined(relatedInformation)) {\n result.relatedInformation = relatedInformation;\n }\n return result;\n }\n Diagnostic.create = create;\n /**\n * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.\n */\n function is(value) {\n var _a;\n var candidate = value;\n return Is.defined(candidate)\n && Range.is(candidate.range)\n && Is.string(candidate.message)\n && (Is.number(candidate.severity) || Is.undefined(candidate.severity))\n && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))\n && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))\n && (Is.string(candidate.source) || Is.undefined(candidate.source))\n && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));\n }\n Diagnostic.is = is;\n})(Diagnostic || (Diagnostic = {}));\n/**\n * The Command namespace provides helper functions to work with\n * [Command](#Command) literals.\n */\nvar Command;\n(function (Command) {\n /**\n * Creates a new Command literal.\n */\n function create(title, command) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var result = { title: title, command: command };\n if (Is.defined(args) && args.length > 0) {\n result.arguments = args;\n }\n return result;\n }\n Command.create = create;\n /**\n * Checks whether the given literal conforms to the [Command](#Command) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);\n }\n Command.is = is;\n})(Command || (Command = {}));\n/**\n * The TextEdit namespace provides helper function to create replace,\n * insert and delete edits more easily.\n */\nvar TextEdit;\n(function (TextEdit) {\n /**\n * Creates a replace text edit.\n * @param range The range of text to be replaced.\n * @param newText The new text.\n */\n function replace(range, newText) {\n return { range: range, newText: newText };\n }\n TextEdit.replace = replace;\n /**\n * Creates a insert text edit.\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n */\n function insert(position, newText) {\n return { range: { start: position, end: position }, newText: newText };\n }\n TextEdit.insert = insert;\n /**\n * Creates a delete text edit.\n * @param range The range of text to be deleted.\n */\n function del(range) {\n return { range: range, newText: '' };\n }\n TextEdit.del = del;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate)\n && Is.string(candidate.newText)\n && Range.is(candidate.range);\n }\n TextEdit.is = is;\n})(TextEdit || (TextEdit = {}));\nvar ChangeAnnotation;\n(function (ChangeAnnotation) {\n function create(label, needsConfirmation, description) {\n var result = { label: label };\n if (needsConfirmation !== undefined) {\n result.needsConfirmation = needsConfirmation;\n }\n if (description !== undefined) {\n result.description = description;\n }\n return result;\n }\n ChangeAnnotation.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && Is.objectLiteral(candidate) && Is.string(candidate.label) &&\n (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&\n (Is.string(candidate.description) || candidate.description === undefined);\n }\n ChangeAnnotation.is = is;\n})(ChangeAnnotation || (ChangeAnnotation = {}));\nvar ChangeAnnotationIdentifier;\n(function (ChangeAnnotationIdentifier) {\n function is(value) {\n var candidate = value;\n return typeof candidate === 'string';\n }\n ChangeAnnotationIdentifier.is = is;\n})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));\nvar AnnotatedTextEdit;\n(function (AnnotatedTextEdit) {\n /**\n * Creates an annotated replace text edit.\n *\n * @param range The range of text to be replaced.\n * @param newText The new text.\n * @param annotation The annotation.\n */\n function replace(range, newText, annotation) {\n return { range: range, newText: newText, annotationId: annotation };\n }\n AnnotatedTextEdit.replace = replace;\n /**\n * Creates an annotated insert text edit.\n *\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n * @param annotation The annotation.\n */\n function insert(position, newText, annotation) {\n return { range: { start: position, end: position }, newText: newText, annotationId: annotation };\n }\n AnnotatedTextEdit.insert = insert;\n /**\n * Creates an annotated delete text edit.\n *\n * @param range The range of text to be deleted.\n * @param annotation The annotation.\n */\n function del(range, annotation) {\n return { range: range, newText: '', annotationId: annotation };\n }\n AnnotatedTextEdit.del = del;\n function is(value) {\n var candidate = value;\n return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n AnnotatedTextEdit.is = is;\n})(AnnotatedTextEdit || (AnnotatedTextEdit = {}));\n/**\n * The TextDocumentEdit namespace provides helper function to create\n * an edit that manipulates a text document.\n */\nvar TextDocumentEdit;\n(function (TextDocumentEdit) {\n /**\n * Creates a new `TextDocumentEdit`\n */\n function create(textDocument, edits) {\n return { textDocument: textDocument, edits: edits };\n }\n TextDocumentEdit.create = create;\n function is(value) {\n var candidate = value;\n return Is.defined(candidate)\n && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)\n && Array.isArray(candidate.edits);\n }\n TextDocumentEdit.is = is;\n})(TextDocumentEdit || (TextDocumentEdit = {}));\nvar CreateFile;\n(function (CreateFile) {\n function create(uri, options, annotation) {\n var result = {\n kind: 'create',\n uri: uri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n CreateFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n CreateFile.is = is;\n})(CreateFile || (CreateFile = {}));\nvar RenameFile;\n(function (RenameFile) {\n function create(oldUri, newUri, options, annotation) {\n var result = {\n kind: 'rename',\n oldUri: oldUri,\n newUri: newUri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n RenameFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n RenameFile.is = is;\n})(RenameFile || (RenameFile = {}));\nvar DeleteFile;\n(function (DeleteFile) {\n function create(uri, options, annotation) {\n var result = {\n kind: 'delete',\n uri: uri\n };\n if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n DeleteFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n DeleteFile.is = is;\n})(DeleteFile || (DeleteFile = {}));\nvar WorkspaceEdit;\n(function (WorkspaceEdit) {\n function is(value) {\n var candidate = value;\n return candidate &&\n (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&\n (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {\n if (Is.string(change.kind)) {\n return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);\n }\n else {\n return TextDocumentEdit.is(change);\n }\n }));\n }\n WorkspaceEdit.is = is;\n})(WorkspaceEdit || (WorkspaceEdit = {}));\nvar TextEditChangeImpl = /** @class */ (function () {\n function TextEditChangeImpl(edits, changeAnnotations) {\n this.edits = edits;\n this.changeAnnotations = changeAnnotations;\n }\n TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.insert(position, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.insert(position, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.insert(position, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.replace(range, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.replace(range, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.replace(range, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.delete = function (range, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.del(range);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.del(range, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.del(range, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.add = function (edit) {\n this.edits.push(edit);\n };\n TextEditChangeImpl.prototype.all = function () {\n return this.edits;\n };\n TextEditChangeImpl.prototype.clear = function () {\n this.edits.splice(0, this.edits.length);\n };\n TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {\n if (value === undefined) {\n throw new Error(\"Text edit change is not configured to manage change annotations.\");\n }\n };\n return TextEditChangeImpl;\n}());\n/**\n * A helper class\n */\nvar ChangeAnnotations = /** @class */ (function () {\n function ChangeAnnotations(annotations) {\n this._annotations = annotations === undefined ? Object.create(null) : annotations;\n this._counter = 0;\n this._size = 0;\n }\n ChangeAnnotations.prototype.all = function () {\n return this._annotations;\n };\n Object.defineProperty(ChangeAnnotations.prototype, \"size\", {\n get: function () {\n return this._size;\n },\n enumerable: false,\n configurable: true\n });\n ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {\n var id;\n if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {\n id = idOrAnnotation;\n }\n else {\n id = this.nextId();\n annotation = idOrAnnotation;\n }\n if (this._annotations[id] !== undefined) {\n throw new Error(\"Id \" + id + \" is already in use.\");\n }\n if (annotation === undefined) {\n throw new Error(\"No annotation provided for id \" + id);\n }\n this._annotations[id] = annotation;\n this._size++;\n return id;\n };\n ChangeAnnotations.prototype.nextId = function () {\n this._counter++;\n return this._counter.toString();\n };\n return ChangeAnnotations;\n}());\n/**\n * A workspace change helps constructing changes to a workspace.\n */\nvar WorkspaceChange = /** @class */ (function () {\n function WorkspaceChange(workspaceEdit) {\n var _this = this;\n this._textEditChanges = Object.create(null);\n if (workspaceEdit !== undefined) {\n this._workspaceEdit = workspaceEdit;\n if (workspaceEdit.documentChanges) {\n this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);\n workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n workspaceEdit.documentChanges.forEach(function (change) {\n if (TextDocumentEdit.is(change)) {\n var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);\n _this._textEditChanges[change.textDocument.uri] = textEditChange;\n }\n });\n }\n else if (workspaceEdit.changes) {\n Object.keys(workspaceEdit.changes).forEach(function (key) {\n var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);\n _this._textEditChanges[key] = textEditChange;\n });\n }\n }\n else {\n this._workspaceEdit = {};\n }\n }\n Object.defineProperty(WorkspaceChange.prototype, \"edit\", {\n /**\n * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal\n * use to be returned from a workspace edit operation like rename.\n */\n get: function () {\n this.initDocumentChanges();\n if (this._changeAnnotations !== undefined) {\n if (this._changeAnnotations.size === 0) {\n this._workspaceEdit.changeAnnotations = undefined;\n }\n else {\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n }\n return this._workspaceEdit;\n },\n enumerable: false,\n configurable: true\n });\n WorkspaceChange.prototype.getTextEditChange = function (key) {\n if (OptionalVersionedTextDocumentIdentifier.is(key)) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var textDocument = { uri: key.uri, version: key.version };\n var result = this._textEditChanges[textDocument.uri];\n if (!result) {\n var edits = [];\n var textDocumentEdit = {\n textDocument: textDocument,\n edits: edits\n };\n this._workspaceEdit.documentChanges.push(textDocumentEdit);\n result = new TextEditChangeImpl(edits, this._changeAnnotations);\n this._textEditChanges[textDocument.uri] = result;\n }\n return result;\n }\n else {\n this.initChanges();\n if (this._workspaceEdit.changes === undefined) {\n throw new Error('Workspace edit is not configured for normal text edit changes.');\n }\n var result = this._textEditChanges[key];\n if (!result) {\n var edits = [];\n this._workspaceEdit.changes[key] = edits;\n result = new TextEditChangeImpl(edits);\n this._textEditChanges[key] = result;\n }\n return result;\n }\n };\n WorkspaceChange.prototype.initDocumentChanges = function () {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._changeAnnotations = new ChangeAnnotations();\n this._workspaceEdit.documentChanges = [];\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n };\n WorkspaceChange.prototype.initChanges = function () {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._workspaceEdit.changes = Object.create(null);\n }\n };\n WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = CreateFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = CreateFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = RenameFile.create(oldUri, newUri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = RenameFile.create(oldUri, newUri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = DeleteFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = DeleteFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n return WorkspaceChange;\n}());\n\n/**\n * The TextDocumentIdentifier namespace provides helper functions to work with\n * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.\n */\nvar TextDocumentIdentifier;\n(function (TextDocumentIdentifier) {\n /**\n * Creates a new TextDocumentIdentifier literal.\n * @param uri The document's uri.\n */\n function create(uri) {\n return { uri: uri };\n }\n TextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri);\n }\n TextDocumentIdentifier.is = is;\n})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));\n/**\n * The VersionedTextDocumentIdentifier namespace provides helper functions to work with\n * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.\n */\nvar VersionedTextDocumentIdentifier;\n(function (VersionedTextDocumentIdentifier) {\n /**\n * Creates a new VersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param uri The document's text.\n */\n function create(uri, version) {\n return { uri: uri, version: version };\n }\n VersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);\n }\n VersionedTextDocumentIdentifier.is = is;\n})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));\n/**\n * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with\n * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals.\n */\nvar OptionalVersionedTextDocumentIdentifier;\n(function (OptionalVersionedTextDocumentIdentifier) {\n /**\n * Creates a new OptionalVersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param uri The document's text.\n */\n function create(uri, version) {\n return { uri: uri, version: version };\n }\n OptionalVersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));\n }\n OptionalVersionedTextDocumentIdentifier.is = is;\n})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));\n/**\n * The TextDocumentItem namespace provides helper functions to work with\n * [TextDocumentItem](#TextDocumentItem) literals.\n */\nvar TextDocumentItem;\n(function (TextDocumentItem) {\n /**\n * Creates a new TextDocumentItem literal.\n * @param uri The document's uri.\n * @param languageId The document's language identifier.\n * @param version The document's version number.\n * @param text The document's text.\n */\n function create(uri, languageId, version, text) {\n return { uri: uri, languageId: languageId, version: version, text: text };\n }\n TextDocumentItem.create = create;\n /**\n * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);\n }\n TextDocumentItem.is = is;\n})(TextDocumentItem || (TextDocumentItem = {}));\n/**\n * Describes the content type that a client supports in various\n * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.\n *\n * Please note that `MarkupKinds` must not start with a `$`. This kinds\n * are reserved for internal usage.\n */\nvar MarkupKind;\n(function (MarkupKind) {\n /**\n * Plain text is supported as a content format\n */\n MarkupKind.PlainText = 'plaintext';\n /**\n * Markdown is supported as a content format\n */\n MarkupKind.Markdown = 'markdown';\n})(MarkupKind || (MarkupKind = {}));\n(function (MarkupKind) {\n /**\n * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.\n */\n function is(value) {\n var candidate = value;\n return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;\n }\n MarkupKind.is = is;\n})(MarkupKind || (MarkupKind = {}));\nvar MarkupContent;\n(function (MarkupContent) {\n /**\n * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\n }\n MarkupContent.is = is;\n})(MarkupContent || (MarkupContent = {}));\n/**\n * The kind of a completion entry.\n */\nvar CompletionItemKind;\n(function (CompletionItemKind) {\n CompletionItemKind.Text = 1;\n CompletionItemKind.Method = 2;\n CompletionItemKind.Function = 3;\n CompletionItemKind.Constructor = 4;\n CompletionItemKind.Field = 5;\n CompletionItemKind.Variable = 6;\n CompletionItemKind.Class = 7;\n CompletionItemKind.Interface = 8;\n CompletionItemKind.Module = 9;\n CompletionItemKind.Property = 10;\n CompletionItemKind.Unit = 11;\n CompletionItemKind.Value = 12;\n CompletionItemKind.Enum = 13;\n CompletionItemKind.Keyword = 14;\n CompletionItemKind.Snippet = 15;\n CompletionItemKind.Color = 16;\n CompletionItemKind.File = 17;\n CompletionItemKind.Reference = 18;\n CompletionItemKind.Folder = 19;\n CompletionItemKind.EnumMember = 20;\n CompletionItemKind.Constant = 21;\n CompletionItemKind.Struct = 22;\n CompletionItemKind.Event = 23;\n CompletionItemKind.Operator = 24;\n CompletionItemKind.TypeParameter = 25;\n})(CompletionItemKind || (CompletionItemKind = {}));\n/**\n * Defines whether the insert text in a completion item should be interpreted as\n * plain text or a snippet.\n */\nvar InsertTextFormat;\n(function (InsertTextFormat) {\n /**\n * The primary text to be inserted is treated as a plain string.\n */\n InsertTextFormat.PlainText = 1;\n /**\n * The primary text to be inserted is treated as a snippet.\n *\n * A snippet can define tab stops and placeholders with `$1`, `$2`\n * and `${3:foo}`. `$0` defines the final tab stop, it defaults to\n * the end of the snippet. Placeholders with equal identifiers are linked,\n * that is typing in one will update others too.\n *\n * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax\n */\n InsertTextFormat.Snippet = 2;\n})(InsertTextFormat || (InsertTextFormat = {}));\n/**\n * Completion item tags are extra annotations that tweak the rendering of a completion\n * item.\n *\n * @since 3.15.0\n */\nvar CompletionItemTag;\n(function (CompletionItemTag) {\n /**\n * Render a completion as obsolete, usually using a strike-out.\n */\n CompletionItemTag.Deprecated = 1;\n})(CompletionItemTag || (CompletionItemTag = {}));\n/**\n * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.\n *\n * @since 3.16.0\n */\nvar InsertReplaceEdit;\n(function (InsertReplaceEdit) {\n /**\n * Creates a new insert / replace edit\n */\n function create(newText, insert, replace) {\n return { newText: newText, insert: insert, replace: replace };\n }\n InsertReplaceEdit.create = create;\n /**\n * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.\n */\n function is(value) {\n var candidate = value;\n return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);\n }\n InsertReplaceEdit.is = is;\n})(InsertReplaceEdit || (InsertReplaceEdit = {}));\n/**\n * How whitespace and indentation is handled during completion\n * item insertion.\n *\n * @since 3.16.0\n */\nvar InsertTextMode;\n(function (InsertTextMode) {\n /**\n * The insertion or replace strings is taken as it is. If the\n * value is multi line the lines below the cursor will be\n * inserted using the indentation defined in the string value.\n * The client will not apply any kind of adjustments to the\n * string.\n */\n InsertTextMode.asIs = 1;\n /**\n * The editor adjusts leading whitespace of new lines so that\n * they match the indentation up to the cursor of the line for\n * which the item is accepted.\n *\n * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a\n * multi line completion item is indented using 2 tabs and all\n * following lines inserted will be indented using 2 tabs as well.\n */\n InsertTextMode.adjustIndentation = 2;\n})(InsertTextMode || (InsertTextMode = {}));\n/**\n * The CompletionItem namespace provides functions to deal with\n * completion items.\n */\nvar CompletionItem;\n(function (CompletionItem) {\n /**\n * Create a completion item and seed it with a label.\n * @param label The completion item's label\n */\n function create(label) {\n return { label: label };\n }\n CompletionItem.create = create;\n})(CompletionItem || (CompletionItem = {}));\n/**\n * The CompletionList namespace provides functions to deal with\n * completion lists.\n */\nvar CompletionList;\n(function (CompletionList) {\n /**\n * Creates a new completion list.\n *\n * @param items The completion items.\n * @param isIncomplete The list is not complete.\n */\n function create(items, isIncomplete) {\n return { items: items ? items : [], isIncomplete: !!isIncomplete };\n }\n CompletionList.create = create;\n})(CompletionList || (CompletionList = {}));\nvar MarkedString;\n(function (MarkedString) {\n /**\n * Creates a marked string from plain text.\n *\n * @param plainText The plain text.\n */\n function fromPlainText(plainText) {\n return plainText.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\n }\n MarkedString.fromPlainText = fromPlainText;\n /**\n * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.\n */\n function is(value) {\n var candidate = value;\n return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));\n }\n MarkedString.is = is;\n})(MarkedString || (MarkedString = {}));\nvar Hover;\n(function (Hover) {\n /**\n * Checks whether the given value conforms to the [Hover](#Hover) interface.\n */\n function is(value) {\n var candidate = value;\n return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||\n MarkedString.is(candidate.contents) ||\n Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));\n }\n Hover.is = is;\n})(Hover || (Hover = {}));\n/**\n * The ParameterInformation namespace provides helper functions to work with\n * [ParameterInformation](#ParameterInformation) literals.\n */\nvar ParameterInformation;\n(function (ParameterInformation) {\n /**\n * Creates a new parameter information literal.\n *\n * @param label A label string.\n * @param documentation A doc string.\n */\n function create(label, documentation) {\n return documentation ? { label: label, documentation: documentation } : { label: label };\n }\n ParameterInformation.create = create;\n})(ParameterInformation || (ParameterInformation = {}));\n/**\n * The SignatureInformation namespace provides helper functions to work with\n * [SignatureInformation](#SignatureInformation) literals.\n */\nvar SignatureInformation;\n(function (SignatureInformation) {\n function create(label, documentation) {\n var parameters = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n parameters[_i - 2] = arguments[_i];\n }\n var result = { label: label };\n if (Is.defined(documentation)) {\n result.documentation = documentation;\n }\n if (Is.defined(parameters)) {\n result.parameters = parameters;\n }\n else {\n result.parameters = [];\n }\n return result;\n }\n SignatureInformation.create = create;\n})(SignatureInformation || (SignatureInformation = {}));\n/**\n * A document highlight kind.\n */\nvar DocumentHighlightKind;\n(function (DocumentHighlightKind) {\n /**\n * A textual occurrence.\n */\n DocumentHighlightKind.Text = 1;\n /**\n * Read-access of a symbol, like reading a variable.\n */\n DocumentHighlightKind.Read = 2;\n /**\n * Write-access of a symbol, like writing to a variable.\n */\n DocumentHighlightKind.Write = 3;\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\n/**\n * DocumentHighlight namespace to provide helper functions to work with\n * [DocumentHighlight](#DocumentHighlight) literals.\n */\nvar DocumentHighlight;\n(function (DocumentHighlight) {\n /**\n * Create a DocumentHighlight object.\n * @param range The range the highlight applies to.\n */\n function create(range, kind) {\n var result = { range: range };\n if (Is.number(kind)) {\n result.kind = kind;\n }\n return result;\n }\n DocumentHighlight.create = create;\n})(DocumentHighlight || (DocumentHighlight = {}));\n/**\n * A symbol kind.\n */\nvar SymbolKind;\n(function (SymbolKind) {\n SymbolKind.File = 1;\n SymbolKind.Module = 2;\n SymbolKind.Namespace = 3;\n SymbolKind.Package = 4;\n SymbolKind.Class = 5;\n SymbolKind.Method = 6;\n SymbolKind.Property = 7;\n SymbolKind.Field = 8;\n SymbolKind.Constructor = 9;\n SymbolKind.Enum = 10;\n SymbolKind.Interface = 11;\n SymbolKind.Function = 12;\n SymbolKind.Variable = 13;\n SymbolKind.Constant = 14;\n SymbolKind.String = 15;\n SymbolKind.Number = 16;\n SymbolKind.Boolean = 17;\n SymbolKind.Array = 18;\n SymbolKind.Object = 19;\n SymbolKind.Key = 20;\n SymbolKind.Null = 21;\n SymbolKind.EnumMember = 22;\n SymbolKind.Struct = 23;\n SymbolKind.Event = 24;\n SymbolKind.Operator = 25;\n SymbolKind.TypeParameter = 26;\n})(SymbolKind || (SymbolKind = {}));\n/**\n * Symbol tags are extra annotations that tweak the rendering of a symbol.\n * @since 3.16\n */\nvar SymbolTag;\n(function (SymbolTag) {\n /**\n * Render a symbol as obsolete, usually using a strike-out.\n */\n SymbolTag.Deprecated = 1;\n})(SymbolTag || (SymbolTag = {}));\nvar SymbolInformation;\n(function (SymbolInformation) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the location of the symbol.\n * @param uri The resource of the location of symbol, defaults to the current document.\n * @param containerName The name of the symbol containing the symbol.\n */\n function create(name, kind, range, uri, containerName) {\n var result = {\n name: name,\n kind: kind,\n location: { uri: uri, range: range }\n };\n if (containerName) {\n result.containerName = containerName;\n }\n return result;\n }\n SymbolInformation.create = create;\n})(SymbolInformation || (SymbolInformation = {}));\nvar DocumentSymbol;\n(function (DocumentSymbol) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param detail The detail of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the symbol.\n * @param selectionRange The selectionRange of the symbol.\n * @param children Children of the symbol.\n */\n function create(name, detail, kind, range, selectionRange, children) {\n var result = {\n name: name,\n detail: detail,\n kind: kind,\n range: range,\n selectionRange: selectionRange\n };\n if (children !== undefined) {\n result.children = children;\n }\n return result;\n }\n DocumentSymbol.create = create;\n /**\n * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.\n */\n function is(value) {\n var candidate = value;\n return candidate &&\n Is.string(candidate.name) && Is.number(candidate.kind) &&\n Range.is(candidate.range) && Range.is(candidate.selectionRange) &&\n (candidate.detail === undefined || Is.string(candidate.detail)) &&\n (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&\n (candidate.children === undefined || Array.isArray(candidate.children)) &&\n (candidate.tags === undefined || Array.isArray(candidate.tags));\n }\n DocumentSymbol.is = is;\n})(DocumentSymbol || (DocumentSymbol = {}));\n/**\n * A set of predefined code action kinds\n */\nvar CodeActionKind;\n(function (CodeActionKind) {\n /**\n * Empty kind.\n */\n CodeActionKind.Empty = '';\n /**\n * Base kind for quickfix actions: 'quickfix'\n */\n CodeActionKind.QuickFix = 'quickfix';\n /**\n * Base kind for refactoring actions: 'refactor'\n */\n CodeActionKind.Refactor = 'refactor';\n /**\n * Base kind for refactoring extraction actions: 'refactor.extract'\n *\n * Example extract actions:\n *\n * - Extract method\n * - Extract function\n * - Extract variable\n * - Extract interface from class\n * - ...\n */\n CodeActionKind.RefactorExtract = 'refactor.extract';\n /**\n * Base kind for refactoring inline actions: 'refactor.inline'\n *\n * Example inline actions:\n *\n * - Inline function\n * - Inline variable\n * - Inline constant\n * - ...\n */\n CodeActionKind.RefactorInline = 'refactor.inline';\n /**\n * Base kind for refactoring rewrite actions: 'refactor.rewrite'\n *\n * Example rewrite actions:\n *\n * - Convert JavaScript function to class\n * - Add or remove parameter\n * - Encapsulate field\n * - Make method static\n * - Move method to base class\n * - ...\n */\n CodeActionKind.RefactorRewrite = 'refactor.rewrite';\n /**\n * Base kind for source actions: `source`\n *\n * Source code actions apply to the entire file.\n */\n CodeActionKind.Source = 'source';\n /**\n * Base kind for an organize imports source action: `source.organizeImports`\n */\n CodeActionKind.SourceOrganizeImports = 'source.organizeImports';\n /**\n * Base kind for auto-fix source actions: `source.fixAll`.\n *\n * Fix all actions automatically fix errors that have a clear fix that do not require user input.\n * They should not suppress errors or perform unsafe fixes such as generating new types or classes.\n *\n * @since 3.15.0\n */\n CodeActionKind.SourceFixAll = 'source.fixAll';\n})(CodeActionKind || (CodeActionKind = {}));\n/**\n * The CodeActionContext namespace provides helper functions to work with\n * [CodeActionContext](#CodeActionContext) literals.\n */\nvar CodeActionContext;\n(function (CodeActionContext) {\n /**\n * Creates a new CodeActionContext literal.\n */\n function create(diagnostics, only) {\n var result = { diagnostics: diagnostics };\n if (only !== undefined && only !== null) {\n result.only = only;\n }\n return result;\n }\n CodeActionContext.create = create;\n /**\n * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string));\n }\n CodeActionContext.is = is;\n})(CodeActionContext || (CodeActionContext = {}));\nvar CodeAction;\n(function (CodeAction) {\n function create(title, kindOrCommandOrEdit, kind) {\n var result = { title: title };\n var checkKind = true;\n if (typeof kindOrCommandOrEdit === 'string') {\n checkKind = false;\n result.kind = kindOrCommandOrEdit;\n }\n else if (Command.is(kindOrCommandOrEdit)) {\n result.command = kindOrCommandOrEdit;\n }\n else {\n result.edit = kindOrCommandOrEdit;\n }\n if (checkKind && kind !== undefined) {\n result.kind = kind;\n }\n return result;\n }\n CodeAction.create = create;\n function is(value) {\n var candidate = value;\n return candidate && Is.string(candidate.title) &&\n (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&\n (candidate.kind === undefined || Is.string(candidate.kind)) &&\n (candidate.edit !== undefined || candidate.command !== undefined) &&\n (candidate.command === undefined || Command.is(candidate.command)) &&\n (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&\n (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));\n }\n CodeAction.is = is;\n})(CodeAction || (CodeAction = {}));\n/**\n * The CodeLens namespace provides helper functions to work with\n * [CodeLens](#CodeLens) literals.\n */\nvar CodeLens;\n(function (CodeLens) {\n /**\n * Creates a new CodeLens literal.\n */\n function create(range, data) {\n var result = { range: range };\n if (Is.defined(data)) {\n result.data = data;\n }\n return result;\n }\n CodeLens.create = create;\n /**\n * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));\n }\n CodeLens.is = is;\n})(CodeLens || (CodeLens = {}));\n/**\n * The FormattingOptions namespace provides helper functions to work with\n * [FormattingOptions](#FormattingOptions) literals.\n */\nvar FormattingOptions;\n(function (FormattingOptions) {\n /**\n * Creates a new FormattingOptions literal.\n */\n function create(tabSize, insertSpaces) {\n return { tabSize: tabSize, insertSpaces: insertSpaces };\n }\n FormattingOptions.create = create;\n /**\n * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);\n }\n FormattingOptions.is = is;\n})(FormattingOptions || (FormattingOptions = {}));\n/**\n * The DocumentLink namespace provides helper functions to work with\n * [DocumentLink](#DocumentLink) literals.\n */\nvar DocumentLink;\n(function (DocumentLink) {\n /**\n * Creates a new DocumentLink literal.\n */\n function create(range, target, data) {\n return { range: range, target: target, data: data };\n }\n DocumentLink.create = create;\n /**\n * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));\n }\n DocumentLink.is = is;\n})(DocumentLink || (DocumentLink = {}));\n/**\n * The SelectionRange namespace provides helper function to work with\n * SelectionRange literals.\n */\nvar SelectionRange;\n(function (SelectionRange) {\n /**\n * Creates a new SelectionRange\n * @param range the range.\n * @param parent an optional parent.\n */\n function create(range, parent) {\n return { range: range, parent: parent };\n }\n SelectionRange.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));\n }\n SelectionRange.is = is;\n})(SelectionRange || (SelectionRange = {}));\nvar EOL = ['\\n', '\\r\\n', '\\r'];\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nvar TextDocument;\n(function (TextDocument) {\n /**\n * Creates a new ITextDocument literal from the given uri and content.\n * @param uri The document's uri.\n * @param languageId The document's language Id.\n * @param content The document's content.\n */\n function create(uri, languageId, version, content) {\n return new FullTextDocument(uri, languageId, version, content);\n }\n TextDocument.create = create;\n /**\n * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)\n && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;\n }\n TextDocument.is = is;\n function applyEdits(document, edits) {\n var text = document.getText();\n var sortedEdits = mergeSort(edits, function (a, b) {\n var diff = a.range.start.line - b.range.start.line;\n if (diff === 0) {\n return a.range.start.character - b.range.start.character;\n }\n return diff;\n });\n var lastModifiedOffset = text.length;\n for (var i = sortedEdits.length - 1; i >= 0; i--) {\n var e = sortedEdits[i];\n var startOffset = document.offsetAt(e.range.start);\n var endOffset = document.offsetAt(e.range.end);\n if (endOffset <= lastModifiedOffset) {\n text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);\n }\n else {\n throw new Error('Overlapping edit');\n }\n lastModifiedOffset = startOffset;\n }\n return text;\n }\n TextDocument.applyEdits = applyEdits;\n function mergeSort(data, compare) {\n if (data.length <= 1) {\n // sorted\n return data;\n }\n var p = (data.length / 2) | 0;\n var left = data.slice(0, p);\n var right = data.slice(p);\n mergeSort(left, compare);\n mergeSort(right, compare);\n var leftIdx = 0;\n var rightIdx = 0;\n var i = 0;\n while (leftIdx < left.length && rightIdx < right.length) {\n var ret = compare(left[leftIdx], right[rightIdx]);\n if (ret <= 0) {\n // smaller_equal -> take left to preserve order\n data[i++] = left[leftIdx++];\n }\n else {\n // greater -> take right\n data[i++] = right[rightIdx++];\n }\n }\n while (leftIdx < left.length) {\n data[i++] = left[leftIdx++];\n }\n while (rightIdx < right.length) {\n data[i++] = right[rightIdx++];\n }\n return data;\n }\n})(TextDocument || (TextDocument = {}));\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nvar FullTextDocument = /** @class */ (function () {\n function FullTextDocument(uri, languageId, version, content) {\n this._uri = uri;\n this._languageId = languageId;\n this._version = version;\n this._content = content;\n this._lineOffsets = undefined;\n }\n Object.defineProperty(FullTextDocument.prototype, \"uri\", {\n get: function () {\n return this._uri;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"languageId\", {\n get: function () {\n return this._languageId;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"version\", {\n get: function () {\n return this._version;\n },\n enumerable: false,\n configurable: true\n });\n FullTextDocument.prototype.getText = function (range) {\n if (range) {\n var start = this.offsetAt(range.start);\n var end = this.offsetAt(range.end);\n return this._content.substring(start, end);\n }\n return this._content;\n };\n FullTextDocument.prototype.update = function (event, version) {\n this._content = event.text;\n this._version = version;\n this._lineOffsets = undefined;\n };\n FullTextDocument.prototype.getLineOffsets = function () {\n if (this._lineOffsets === undefined) {\n var lineOffsets = [];\n var text = this._content;\n var isLineStart = true;\n for (var i = 0; i < text.length; i++) {\n if (isLineStart) {\n lineOffsets.push(i);\n isLineStart = false;\n }\n var ch = text.charAt(i);\n isLineStart = (ch === '\\r' || ch === '\\n');\n if (ch === '\\r' && i + 1 < text.length && text.charAt(i + 1) === '\\n') {\n i++;\n }\n }\n if (isLineStart && text.length > 0) {\n lineOffsets.push(text.length);\n }\n this._lineOffsets = lineOffsets;\n }\n return this._lineOffsets;\n };\n FullTextDocument.prototype.positionAt = function (offset) {\n offset = Math.max(Math.min(offset, this._content.length), 0);\n var lineOffsets = this.getLineOffsets();\n var low = 0, high = lineOffsets.length;\n if (high === 0) {\n return Position.create(0, offset);\n }\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (lineOffsets[mid] > offset) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n // low is the least x for which the line offset is larger than the current offset\n // or array.length if no line offset is larger than the current offset\n var line = low - 1;\n return Position.create(line, offset - lineOffsets[line]);\n };\n FullTextDocument.prototype.offsetAt = function (position) {\n var lineOffsets = this.getLineOffsets();\n if (position.line >= lineOffsets.length) {\n return this._content.length;\n }\n else if (position.line < 0) {\n return 0;\n }\n var lineOffset = lineOffsets[position.line];\n var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\n return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\n };\n Object.defineProperty(FullTextDocument.prototype, \"lineCount\", {\n get: function () {\n return this.getLineOffsets().length;\n },\n enumerable: false,\n configurable: true\n });\n return FullTextDocument;\n}());\nvar Is;\n(function (Is) {\n var toString = Object.prototype.toString;\n function defined(value) {\n return typeof value !== 'undefined';\n }\n Is.defined = defined;\n function undefined(value) {\n return typeof value === 'undefined';\n }\n Is.undefined = undefined;\n function boolean(value) {\n return value === true || value === false;\n }\n Is.boolean = boolean;\n function string(value) {\n return toString.call(value) === '[object String]';\n }\n Is.string = string;\n function number(value) {\n return toString.call(value) === '[object Number]';\n }\n Is.number = number;\n function numberRange(value, min, max) {\n return toString.call(value) === '[object Number]' && min <= value && value <= max;\n }\n Is.numberRange = numberRange;\n function integer(value) {\n return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;\n }\n Is.integer = integer;\n function uinteger(value) {\n return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;\n }\n Is.uinteger = uinteger;\n function func(value) {\n return toString.call(value) === '[object Function]';\n }\n Is.func = func;\n function objectLiteral(value) {\n // Strictly speaking class instances pass this check as well. Since the LSP\n // doesn't use classes we ignore this for now. If we do we need to add something\n // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`\n return value !== null && typeof value === 'object';\n }\n Is.objectLiteral = objectLiteral;\n function typedArray(value, check) {\n return Array.isArray(value) && value.every(check);\n }\n Is.typedArray = typedArray;\n})(Is || (Is = {}));\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-languageserver-types/main.js?");
248
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AnnotatedTextEdit\": () => (/* binding */ AnnotatedTextEdit),\n/* harmony export */ \"ChangeAnnotation\": () => (/* binding */ ChangeAnnotation),\n/* harmony export */ \"ChangeAnnotationIdentifier\": () => (/* binding */ ChangeAnnotationIdentifier),\n/* harmony export */ \"CodeAction\": () => (/* binding */ CodeAction),\n/* harmony export */ \"CodeActionContext\": () => (/* binding */ CodeActionContext),\n/* harmony export */ \"CodeActionKind\": () => (/* binding */ CodeActionKind),\n/* harmony export */ \"CodeDescription\": () => (/* binding */ CodeDescription),\n/* harmony export */ \"CodeLens\": () => (/* binding */ CodeLens),\n/* harmony export */ \"Color\": () => (/* binding */ Color),\n/* harmony export */ \"ColorInformation\": () => (/* binding */ ColorInformation),\n/* harmony export */ \"ColorPresentation\": () => (/* binding */ ColorPresentation),\n/* harmony export */ \"Command\": () => (/* binding */ Command),\n/* harmony export */ \"CompletionItem\": () => (/* binding */ CompletionItem),\n/* harmony export */ \"CompletionItemKind\": () => (/* binding */ CompletionItemKind),\n/* harmony export */ \"CompletionItemTag\": () => (/* binding */ CompletionItemTag),\n/* harmony export */ \"CompletionList\": () => (/* binding */ CompletionList),\n/* harmony export */ \"CreateFile\": () => (/* binding */ CreateFile),\n/* harmony export */ \"DeleteFile\": () => (/* binding */ DeleteFile),\n/* harmony export */ \"Diagnostic\": () => (/* binding */ Diagnostic),\n/* harmony export */ \"DiagnosticRelatedInformation\": () => (/* binding */ DiagnosticRelatedInformation),\n/* harmony export */ \"DiagnosticSeverity\": () => (/* binding */ DiagnosticSeverity),\n/* harmony export */ \"DiagnosticTag\": () => (/* binding */ DiagnosticTag),\n/* harmony export */ \"DocumentHighlight\": () => (/* binding */ DocumentHighlight),\n/* harmony export */ \"DocumentHighlightKind\": () => (/* binding */ DocumentHighlightKind),\n/* harmony export */ \"DocumentLink\": () => (/* binding */ DocumentLink),\n/* harmony export */ \"DocumentSymbol\": () => (/* binding */ DocumentSymbol),\n/* harmony export */ \"EOL\": () => (/* binding */ EOL),\n/* harmony export */ \"FoldingRange\": () => (/* binding */ FoldingRange),\n/* harmony export */ \"FoldingRangeKind\": () => (/* binding */ FoldingRangeKind),\n/* harmony export */ \"FormattingOptions\": () => (/* binding */ FormattingOptions),\n/* harmony export */ \"Hover\": () => (/* binding */ Hover),\n/* harmony export */ \"InsertReplaceEdit\": () => (/* binding */ InsertReplaceEdit),\n/* harmony export */ \"InsertTextFormat\": () => (/* binding */ InsertTextFormat),\n/* harmony export */ \"InsertTextMode\": () => (/* binding */ InsertTextMode),\n/* harmony export */ \"Location\": () => (/* binding */ Location),\n/* harmony export */ \"LocationLink\": () => (/* binding */ LocationLink),\n/* harmony export */ \"MarkedString\": () => (/* binding */ MarkedString),\n/* harmony export */ \"MarkupContent\": () => (/* binding */ MarkupContent),\n/* harmony export */ \"MarkupKind\": () => (/* binding */ MarkupKind),\n/* harmony export */ \"OptionalVersionedTextDocumentIdentifier\": () => (/* binding */ OptionalVersionedTextDocumentIdentifier),\n/* harmony export */ \"ParameterInformation\": () => (/* binding */ ParameterInformation),\n/* harmony export */ \"Position\": () => (/* binding */ Position),\n/* harmony export */ \"Range\": () => (/* binding */ Range),\n/* harmony export */ \"RenameFile\": () => (/* binding */ RenameFile),\n/* harmony export */ \"SelectionRange\": () => (/* binding */ SelectionRange),\n/* harmony export */ \"SignatureInformation\": () => (/* binding */ SignatureInformation),\n/* harmony export */ \"SymbolInformation\": () => (/* binding */ SymbolInformation),\n/* harmony export */ \"SymbolKind\": () => (/* binding */ SymbolKind),\n/* harmony export */ \"SymbolTag\": () => (/* binding */ SymbolTag),\n/* harmony export */ \"TextDocument\": () => (/* binding */ TextDocument),\n/* harmony export */ \"TextDocumentEdit\": () => (/* binding */ TextDocumentEdit),\n/* harmony export */ \"TextDocumentIdentifier\": () => (/* binding */ TextDocumentIdentifier),\n/* harmony export */ \"TextDocumentItem\": () => (/* binding */ TextDocumentItem),\n/* harmony export */ \"TextEdit\": () => (/* binding */ TextEdit),\n/* harmony export */ \"VersionedTextDocumentIdentifier\": () => (/* binding */ VersionedTextDocumentIdentifier),\n/* harmony export */ \"WorkspaceChange\": () => (/* binding */ WorkspaceChange),\n/* harmony export */ \"WorkspaceEdit\": () => (/* binding */ WorkspaceEdit),\n/* harmony export */ \"integer\": () => (/* binding */ integer),\n/* harmony export */ \"uinteger\": () => (/* binding */ uinteger)\n/* harmony export */ });\n/* --------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n * ------------------------------------------------------------------------------------------ */\n\nvar integer;\n(function (integer) {\n integer.MIN_VALUE = -2147483648;\n integer.MAX_VALUE = 2147483647;\n})(integer || (integer = {}));\nvar uinteger;\n(function (uinteger) {\n uinteger.MIN_VALUE = 0;\n uinteger.MAX_VALUE = 2147483647;\n})(uinteger || (uinteger = {}));\n/**\n * The Position namespace provides helper functions to work with\n * [Position](#Position) literals.\n */\nvar Position;\n(function (Position) {\n /**\n * Creates a new Position literal from the given line and character.\n * @param line The position's line.\n * @param character The position's character.\n */\n function create(line, character) {\n if (line === Number.MAX_VALUE) {\n line = uinteger.MAX_VALUE;\n }\n if (character === Number.MAX_VALUE) {\n character = uinteger.MAX_VALUE;\n }\n return { line: line, character: character };\n }\n Position.create = create;\n /**\n * Checks whether the given literal conforms to the [Position](#Position) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Is.uinteger(candidate.line) && Is.uinteger(candidate.character);\n }\n Position.is = is;\n})(Position || (Position = {}));\n/**\n * The Range namespace provides helper functions to work with\n * [Range](#Range) literals.\n */\nvar Range;\n(function (Range) {\n function create(one, two, three, four) {\n if (Is.uinteger(one) && Is.uinteger(two) && Is.uinteger(three) && Is.uinteger(four)) {\n return { start: Position.create(one, two), end: Position.create(three, four) };\n }\n else if (Position.is(one) && Position.is(two)) {\n return { start: one, end: two };\n }\n else {\n throw new Error(\"Range#create called with invalid arguments[\" + one + \", \" + two + \", \" + three + \", \" + four + \"]\");\n }\n }\n Range.create = create;\n /**\n * Checks whether the given literal conforms to the [Range](#Range) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate) && Position.is(candidate.start) && Position.is(candidate.end);\n }\n Range.is = is;\n})(Range || (Range = {}));\n/**\n * The Location namespace provides helper functions to work with\n * [Location](#Location) literals.\n */\nvar Location;\n(function (Location) {\n /**\n * Creates a Location literal.\n * @param uri The location's uri.\n * @param range The location's range.\n */\n function create(uri, range) {\n return { uri: uri, range: range };\n }\n Location.create = create;\n /**\n * Checks whether the given literal conforms to the [Location](#Location) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));\n }\n Location.is = is;\n})(Location || (Location = {}));\n/**\n * The LocationLink namespace provides helper functions to work with\n * [LocationLink](#LocationLink) literals.\n */\nvar LocationLink;\n(function (LocationLink) {\n /**\n * Creates a LocationLink literal.\n * @param targetUri The definition's uri.\n * @param targetRange The full range of the definition.\n * @param targetSelectionRange The span of the symbol definition at the target.\n * @param originSelectionRange The span of the symbol being defined in the originating source file.\n */\n function create(targetUri, targetRange, targetSelectionRange, originSelectionRange) {\n return { targetUri: targetUri, targetRange: targetRange, targetSelectionRange: targetSelectionRange, originSelectionRange: originSelectionRange };\n }\n LocationLink.create = create;\n /**\n * Checks whether the given literal conforms to the [LocationLink](#LocationLink) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.targetRange) && Is.string(candidate.targetUri)\n && (Range.is(candidate.targetSelectionRange) || Is.undefined(candidate.targetSelectionRange))\n && (Range.is(candidate.originSelectionRange) || Is.undefined(candidate.originSelectionRange));\n }\n LocationLink.is = is;\n})(LocationLink || (LocationLink = {}));\n/**\n * The Color namespace provides helper functions to work with\n * [Color](#Color) literals.\n */\nvar Color;\n(function (Color) {\n /**\n * Creates a new Color literal.\n */\n function create(red, green, blue, alpha) {\n return {\n red: red,\n green: green,\n blue: blue,\n alpha: alpha,\n };\n }\n Color.create = create;\n /**\n * Checks whether the given literal conforms to the [Color](#Color) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.numberRange(candidate.red, 0, 1)\n && Is.numberRange(candidate.green, 0, 1)\n && Is.numberRange(candidate.blue, 0, 1)\n && Is.numberRange(candidate.alpha, 0, 1);\n }\n Color.is = is;\n})(Color || (Color = {}));\n/**\n * The ColorInformation namespace provides helper functions to work with\n * [ColorInformation](#ColorInformation) literals.\n */\nvar ColorInformation;\n(function (ColorInformation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(range, color) {\n return {\n range: range,\n color: color,\n };\n }\n ColorInformation.create = create;\n /**\n * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Range.is(candidate.range) && Color.is(candidate.color);\n }\n ColorInformation.is = is;\n})(ColorInformation || (ColorInformation = {}));\n/**\n * The Color namespace provides helper functions to work with\n * [ColorPresentation](#ColorPresentation) literals.\n */\nvar ColorPresentation;\n(function (ColorPresentation) {\n /**\n * Creates a new ColorInformation literal.\n */\n function create(label, textEdit, additionalTextEdits) {\n return {\n label: label,\n textEdit: textEdit,\n additionalTextEdits: additionalTextEdits,\n };\n }\n ColorPresentation.create = create;\n /**\n * Checks whether the given literal conforms to the [ColorInformation](#ColorInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.string(candidate.label)\n && (Is.undefined(candidate.textEdit) || TextEdit.is(candidate))\n && (Is.undefined(candidate.additionalTextEdits) || Is.typedArray(candidate.additionalTextEdits, TextEdit.is));\n }\n ColorPresentation.is = is;\n})(ColorPresentation || (ColorPresentation = {}));\n/**\n * Enum of known range kinds\n */\nvar FoldingRangeKind;\n(function (FoldingRangeKind) {\n /**\n * Folding range for a comment\n */\n FoldingRangeKind[\"Comment\"] = \"comment\";\n /**\n * Folding range for a imports or includes\n */\n FoldingRangeKind[\"Imports\"] = \"imports\";\n /**\n * Folding range for a region (e.g. `#region`)\n */\n FoldingRangeKind[\"Region\"] = \"region\";\n})(FoldingRangeKind || (FoldingRangeKind = {}));\n/**\n * The folding range namespace provides helper functions to work with\n * [FoldingRange](#FoldingRange) literals.\n */\nvar FoldingRange;\n(function (FoldingRange) {\n /**\n * Creates a new FoldingRange literal.\n */\n function create(startLine, endLine, startCharacter, endCharacter, kind) {\n var result = {\n startLine: startLine,\n endLine: endLine\n };\n if (Is.defined(startCharacter)) {\n result.startCharacter = startCharacter;\n }\n if (Is.defined(endCharacter)) {\n result.endCharacter = endCharacter;\n }\n if (Is.defined(kind)) {\n result.kind = kind;\n }\n return result;\n }\n FoldingRange.create = create;\n /**\n * Checks whether the given literal conforms to the [FoldingRange](#FoldingRange) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.uinteger(candidate.startLine) && Is.uinteger(candidate.startLine)\n && (Is.undefined(candidate.startCharacter) || Is.uinteger(candidate.startCharacter))\n && (Is.undefined(candidate.endCharacter) || Is.uinteger(candidate.endCharacter))\n && (Is.undefined(candidate.kind) || Is.string(candidate.kind));\n }\n FoldingRange.is = is;\n})(FoldingRange || (FoldingRange = {}));\n/**\n * The DiagnosticRelatedInformation namespace provides helper functions to work with\n * [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) literals.\n */\nvar DiagnosticRelatedInformation;\n(function (DiagnosticRelatedInformation) {\n /**\n * Creates a new DiagnosticRelatedInformation literal.\n */\n function create(location, message) {\n return {\n location: location,\n message: message\n };\n }\n DiagnosticRelatedInformation.create = create;\n /**\n * Checks whether the given literal conforms to the [DiagnosticRelatedInformation](#DiagnosticRelatedInformation) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Location.is(candidate.location) && Is.string(candidate.message);\n }\n DiagnosticRelatedInformation.is = is;\n})(DiagnosticRelatedInformation || (DiagnosticRelatedInformation = {}));\n/**\n * The diagnostic's severity.\n */\nvar DiagnosticSeverity;\n(function (DiagnosticSeverity) {\n /**\n * Reports an error.\n */\n DiagnosticSeverity.Error = 1;\n /**\n * Reports a warning.\n */\n DiagnosticSeverity.Warning = 2;\n /**\n * Reports an information.\n */\n DiagnosticSeverity.Information = 3;\n /**\n * Reports a hint.\n */\n DiagnosticSeverity.Hint = 4;\n})(DiagnosticSeverity || (DiagnosticSeverity = {}));\n/**\n * The diagnostic tags.\n *\n * @since 3.15.0\n */\nvar DiagnosticTag;\n(function (DiagnosticTag) {\n /**\n * Unused or unnecessary code.\n *\n * Clients are allowed to render diagnostics with this tag faded out instead of having\n * an error squiggle.\n */\n DiagnosticTag.Unnecessary = 1;\n /**\n * Deprecated or obsolete code.\n *\n * Clients are allowed to rendered diagnostics with this tag strike through.\n */\n DiagnosticTag.Deprecated = 2;\n})(DiagnosticTag || (DiagnosticTag = {}));\n/**\n * The CodeDescription namespace provides functions to deal with descriptions for diagnostic codes.\n *\n * @since 3.16.0\n */\nvar CodeDescription;\n(function (CodeDescription) {\n function is(value) {\n var candidate = value;\n return candidate !== undefined && candidate !== null && Is.string(candidate.href);\n }\n CodeDescription.is = is;\n})(CodeDescription || (CodeDescription = {}));\n/**\n * The Diagnostic namespace provides helper functions to work with\n * [Diagnostic](#Diagnostic) literals.\n */\nvar Diagnostic;\n(function (Diagnostic) {\n /**\n * Creates a new Diagnostic literal.\n */\n function create(range, message, severity, code, source, relatedInformation) {\n var result = { range: range, message: message };\n if (Is.defined(severity)) {\n result.severity = severity;\n }\n if (Is.defined(code)) {\n result.code = code;\n }\n if (Is.defined(source)) {\n result.source = source;\n }\n if (Is.defined(relatedInformation)) {\n result.relatedInformation = relatedInformation;\n }\n return result;\n }\n Diagnostic.create = create;\n /**\n * Checks whether the given literal conforms to the [Diagnostic](#Diagnostic) interface.\n */\n function is(value) {\n var _a;\n var candidate = value;\n return Is.defined(candidate)\n && Range.is(candidate.range)\n && Is.string(candidate.message)\n && (Is.number(candidate.severity) || Is.undefined(candidate.severity))\n && (Is.integer(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))\n && (Is.undefined(candidate.codeDescription) || (Is.string((_a = candidate.codeDescription) === null || _a === void 0 ? void 0 : _a.href)))\n && (Is.string(candidate.source) || Is.undefined(candidate.source))\n && (Is.undefined(candidate.relatedInformation) || Is.typedArray(candidate.relatedInformation, DiagnosticRelatedInformation.is));\n }\n Diagnostic.is = is;\n})(Diagnostic || (Diagnostic = {}));\n/**\n * The Command namespace provides helper functions to work with\n * [Command](#Command) literals.\n */\nvar Command;\n(function (Command) {\n /**\n * Creates a new Command literal.\n */\n function create(title, command) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var result = { title: title, command: command };\n if (Is.defined(args) && args.length > 0) {\n result.arguments = args;\n }\n return result;\n }\n Command.create = create;\n /**\n * Checks whether the given literal conforms to the [Command](#Command) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.command);\n }\n Command.is = is;\n})(Command || (Command = {}));\n/**\n * The TextEdit namespace provides helper function to create replace,\n * insert and delete edits more easily.\n */\nvar TextEdit;\n(function (TextEdit) {\n /**\n * Creates a replace text edit.\n * @param range The range of text to be replaced.\n * @param newText The new text.\n */\n function replace(range, newText) {\n return { range: range, newText: newText };\n }\n TextEdit.replace = replace;\n /**\n * Creates a insert text edit.\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n */\n function insert(position, newText) {\n return { range: { start: position, end: position }, newText: newText };\n }\n TextEdit.insert = insert;\n /**\n * Creates a delete text edit.\n * @param range The range of text to be deleted.\n */\n function del(range) {\n return { range: range, newText: '' };\n }\n TextEdit.del = del;\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(candidate)\n && Is.string(candidate.newText)\n && Range.is(candidate.range);\n }\n TextEdit.is = is;\n})(TextEdit || (TextEdit = {}));\nvar ChangeAnnotation;\n(function (ChangeAnnotation) {\n function create(label, needsConfirmation, description) {\n var result = { label: label };\n if (needsConfirmation !== undefined) {\n result.needsConfirmation = needsConfirmation;\n }\n if (description !== undefined) {\n result.description = description;\n }\n return result;\n }\n ChangeAnnotation.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && Is.objectLiteral(candidate) && Is.string(candidate.label) &&\n (Is.boolean(candidate.needsConfirmation) || candidate.needsConfirmation === undefined) &&\n (Is.string(candidate.description) || candidate.description === undefined);\n }\n ChangeAnnotation.is = is;\n})(ChangeAnnotation || (ChangeAnnotation = {}));\nvar ChangeAnnotationIdentifier;\n(function (ChangeAnnotationIdentifier) {\n function is(value) {\n var candidate = value;\n return typeof candidate === 'string';\n }\n ChangeAnnotationIdentifier.is = is;\n})(ChangeAnnotationIdentifier || (ChangeAnnotationIdentifier = {}));\nvar AnnotatedTextEdit;\n(function (AnnotatedTextEdit) {\n /**\n * Creates an annotated replace text edit.\n *\n * @param range The range of text to be replaced.\n * @param newText The new text.\n * @param annotation The annotation.\n */\n function replace(range, newText, annotation) {\n return { range: range, newText: newText, annotationId: annotation };\n }\n AnnotatedTextEdit.replace = replace;\n /**\n * Creates an annotated insert text edit.\n *\n * @param position The position to insert the text at.\n * @param newText The text to be inserted.\n * @param annotation The annotation.\n */\n function insert(position, newText, annotation) {\n return { range: { start: position, end: position }, newText: newText, annotationId: annotation };\n }\n AnnotatedTextEdit.insert = insert;\n /**\n * Creates an annotated delete text edit.\n *\n * @param range The range of text to be deleted.\n * @param annotation The annotation.\n */\n function del(range, annotation) {\n return { range: range, newText: '', annotationId: annotation };\n }\n AnnotatedTextEdit.del = del;\n function is(value) {\n var candidate = value;\n return TextEdit.is(candidate) && (ChangeAnnotation.is(candidate.annotationId) || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n AnnotatedTextEdit.is = is;\n})(AnnotatedTextEdit || (AnnotatedTextEdit = {}));\n/**\n * The TextDocumentEdit namespace provides helper function to create\n * an edit that manipulates a text document.\n */\nvar TextDocumentEdit;\n(function (TextDocumentEdit) {\n /**\n * Creates a new `TextDocumentEdit`\n */\n function create(textDocument, edits) {\n return { textDocument: textDocument, edits: edits };\n }\n TextDocumentEdit.create = create;\n function is(value) {\n var candidate = value;\n return Is.defined(candidate)\n && OptionalVersionedTextDocumentIdentifier.is(candidate.textDocument)\n && Array.isArray(candidate.edits);\n }\n TextDocumentEdit.is = is;\n})(TextDocumentEdit || (TextDocumentEdit = {}));\nvar CreateFile;\n(function (CreateFile) {\n function create(uri, options, annotation) {\n var result = {\n kind: 'create',\n uri: uri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n CreateFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'create' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n CreateFile.is = is;\n})(CreateFile || (CreateFile = {}));\nvar RenameFile;\n(function (RenameFile) {\n function create(oldUri, newUri, options, annotation) {\n var result = {\n kind: 'rename',\n oldUri: oldUri,\n newUri: newUri\n };\n if (options !== undefined && (options.overwrite !== undefined || options.ignoreIfExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n RenameFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'rename' && Is.string(candidate.oldUri) && Is.string(candidate.newUri) && (candidate.options === undefined ||\n ((candidate.options.overwrite === undefined || Is.boolean(candidate.options.overwrite)) && (candidate.options.ignoreIfExists === undefined || Is.boolean(candidate.options.ignoreIfExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n RenameFile.is = is;\n})(RenameFile || (RenameFile = {}));\nvar DeleteFile;\n(function (DeleteFile) {\n function create(uri, options, annotation) {\n var result = {\n kind: 'delete',\n uri: uri\n };\n if (options !== undefined && (options.recursive !== undefined || options.ignoreIfNotExists !== undefined)) {\n result.options = options;\n }\n if (annotation !== undefined) {\n result.annotationId = annotation;\n }\n return result;\n }\n DeleteFile.create = create;\n function is(value) {\n var candidate = value;\n return candidate && candidate.kind === 'delete' && Is.string(candidate.uri) && (candidate.options === undefined ||\n ((candidate.options.recursive === undefined || Is.boolean(candidate.options.recursive)) && (candidate.options.ignoreIfNotExists === undefined || Is.boolean(candidate.options.ignoreIfNotExists)))) && (candidate.annotationId === undefined || ChangeAnnotationIdentifier.is(candidate.annotationId));\n }\n DeleteFile.is = is;\n})(DeleteFile || (DeleteFile = {}));\nvar WorkspaceEdit;\n(function (WorkspaceEdit) {\n function is(value) {\n var candidate = value;\n return candidate &&\n (candidate.changes !== undefined || candidate.documentChanges !== undefined) &&\n (candidate.documentChanges === undefined || candidate.documentChanges.every(function (change) {\n if (Is.string(change.kind)) {\n return CreateFile.is(change) || RenameFile.is(change) || DeleteFile.is(change);\n }\n else {\n return TextDocumentEdit.is(change);\n }\n }));\n }\n WorkspaceEdit.is = is;\n})(WorkspaceEdit || (WorkspaceEdit = {}));\nvar TextEditChangeImpl = /** @class */ (function () {\n function TextEditChangeImpl(edits, changeAnnotations) {\n this.edits = edits;\n this.changeAnnotations = changeAnnotations;\n }\n TextEditChangeImpl.prototype.insert = function (position, newText, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.insert(position, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.insert(position, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.insert(position, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.replace = function (range, newText, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.replace(range, newText);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.replace(range, newText, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.replace(range, newText, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.delete = function (range, annotation) {\n var edit;\n var id;\n if (annotation === undefined) {\n edit = TextEdit.del(range);\n }\n else if (ChangeAnnotationIdentifier.is(annotation)) {\n id = annotation;\n edit = AnnotatedTextEdit.del(range, annotation);\n }\n else {\n this.assertChangeAnnotations(this.changeAnnotations);\n id = this.changeAnnotations.manage(annotation);\n edit = AnnotatedTextEdit.del(range, id);\n }\n this.edits.push(edit);\n if (id !== undefined) {\n return id;\n }\n };\n TextEditChangeImpl.prototype.add = function (edit) {\n this.edits.push(edit);\n };\n TextEditChangeImpl.prototype.all = function () {\n return this.edits;\n };\n TextEditChangeImpl.prototype.clear = function () {\n this.edits.splice(0, this.edits.length);\n };\n TextEditChangeImpl.prototype.assertChangeAnnotations = function (value) {\n if (value === undefined) {\n throw new Error(\"Text edit change is not configured to manage change annotations.\");\n }\n };\n return TextEditChangeImpl;\n}());\n/**\n * A helper class\n */\nvar ChangeAnnotations = /** @class */ (function () {\n function ChangeAnnotations(annotations) {\n this._annotations = annotations === undefined ? Object.create(null) : annotations;\n this._counter = 0;\n this._size = 0;\n }\n ChangeAnnotations.prototype.all = function () {\n return this._annotations;\n };\n Object.defineProperty(ChangeAnnotations.prototype, \"size\", {\n get: function () {\n return this._size;\n },\n enumerable: false,\n configurable: true\n });\n ChangeAnnotations.prototype.manage = function (idOrAnnotation, annotation) {\n var id;\n if (ChangeAnnotationIdentifier.is(idOrAnnotation)) {\n id = idOrAnnotation;\n }\n else {\n id = this.nextId();\n annotation = idOrAnnotation;\n }\n if (this._annotations[id] !== undefined) {\n throw new Error(\"Id \" + id + \" is already in use.\");\n }\n if (annotation === undefined) {\n throw new Error(\"No annotation provided for id \" + id);\n }\n this._annotations[id] = annotation;\n this._size++;\n return id;\n };\n ChangeAnnotations.prototype.nextId = function () {\n this._counter++;\n return this._counter.toString();\n };\n return ChangeAnnotations;\n}());\n/**\n * A workspace change helps constructing changes to a workspace.\n */\nvar WorkspaceChange = /** @class */ (function () {\n function WorkspaceChange(workspaceEdit) {\n var _this = this;\n this._textEditChanges = Object.create(null);\n if (workspaceEdit !== undefined) {\n this._workspaceEdit = workspaceEdit;\n if (workspaceEdit.documentChanges) {\n this._changeAnnotations = new ChangeAnnotations(workspaceEdit.changeAnnotations);\n workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n workspaceEdit.documentChanges.forEach(function (change) {\n if (TextDocumentEdit.is(change)) {\n var textEditChange = new TextEditChangeImpl(change.edits, _this._changeAnnotations);\n _this._textEditChanges[change.textDocument.uri] = textEditChange;\n }\n });\n }\n else if (workspaceEdit.changes) {\n Object.keys(workspaceEdit.changes).forEach(function (key) {\n var textEditChange = new TextEditChangeImpl(workspaceEdit.changes[key]);\n _this._textEditChanges[key] = textEditChange;\n });\n }\n }\n else {\n this._workspaceEdit = {};\n }\n }\n Object.defineProperty(WorkspaceChange.prototype, \"edit\", {\n /**\n * Returns the underlying [WorkspaceEdit](#WorkspaceEdit) literal\n * use to be returned from a workspace edit operation like rename.\n */\n get: function () {\n this.initDocumentChanges();\n if (this._changeAnnotations !== undefined) {\n if (this._changeAnnotations.size === 0) {\n this._workspaceEdit.changeAnnotations = undefined;\n }\n else {\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n }\n return this._workspaceEdit;\n },\n enumerable: false,\n configurable: true\n });\n WorkspaceChange.prototype.getTextEditChange = function (key) {\n if (OptionalVersionedTextDocumentIdentifier.is(key)) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var textDocument = { uri: key.uri, version: key.version };\n var result = this._textEditChanges[textDocument.uri];\n if (!result) {\n var edits = [];\n var textDocumentEdit = {\n textDocument: textDocument,\n edits: edits\n };\n this._workspaceEdit.documentChanges.push(textDocumentEdit);\n result = new TextEditChangeImpl(edits, this._changeAnnotations);\n this._textEditChanges[textDocument.uri] = result;\n }\n return result;\n }\n else {\n this.initChanges();\n if (this._workspaceEdit.changes === undefined) {\n throw new Error('Workspace edit is not configured for normal text edit changes.');\n }\n var result = this._textEditChanges[key];\n if (!result) {\n var edits = [];\n this._workspaceEdit.changes[key] = edits;\n result = new TextEditChangeImpl(edits);\n this._textEditChanges[key] = result;\n }\n return result;\n }\n };\n WorkspaceChange.prototype.initDocumentChanges = function () {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._changeAnnotations = new ChangeAnnotations();\n this._workspaceEdit.documentChanges = [];\n this._workspaceEdit.changeAnnotations = this._changeAnnotations.all();\n }\n };\n WorkspaceChange.prototype.initChanges = function () {\n if (this._workspaceEdit.documentChanges === undefined && this._workspaceEdit.changes === undefined) {\n this._workspaceEdit.changes = Object.create(null);\n }\n };\n WorkspaceChange.prototype.createFile = function (uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = CreateFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = CreateFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n WorkspaceChange.prototype.renameFile = function (oldUri, newUri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = RenameFile.create(oldUri, newUri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = RenameFile.create(oldUri, newUri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n WorkspaceChange.prototype.deleteFile = function (uri, optionsOrAnnotation, options) {\n this.initDocumentChanges();\n if (this._workspaceEdit.documentChanges === undefined) {\n throw new Error('Workspace edit is not configured for document changes.');\n }\n var annotation;\n if (ChangeAnnotation.is(optionsOrAnnotation) || ChangeAnnotationIdentifier.is(optionsOrAnnotation)) {\n annotation = optionsOrAnnotation;\n }\n else {\n options = optionsOrAnnotation;\n }\n var operation;\n var id;\n if (annotation === undefined) {\n operation = DeleteFile.create(uri, options);\n }\n else {\n id = ChangeAnnotationIdentifier.is(annotation) ? annotation : this._changeAnnotations.manage(annotation);\n operation = DeleteFile.create(uri, options, id);\n }\n this._workspaceEdit.documentChanges.push(operation);\n if (id !== undefined) {\n return id;\n }\n };\n return WorkspaceChange;\n}());\n\n/**\n * The TextDocumentIdentifier namespace provides helper functions to work with\n * [TextDocumentIdentifier](#TextDocumentIdentifier) literals.\n */\nvar TextDocumentIdentifier;\n(function (TextDocumentIdentifier) {\n /**\n * Creates a new TextDocumentIdentifier literal.\n * @param uri The document's uri.\n */\n function create(uri) {\n return { uri: uri };\n }\n TextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri);\n }\n TextDocumentIdentifier.is = is;\n})(TextDocumentIdentifier || (TextDocumentIdentifier = {}));\n/**\n * The VersionedTextDocumentIdentifier namespace provides helper functions to work with\n * [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) literals.\n */\nvar VersionedTextDocumentIdentifier;\n(function (VersionedTextDocumentIdentifier) {\n /**\n * Creates a new VersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param uri The document's text.\n */\n function create(uri, version) {\n return { uri: uri, version: version };\n }\n VersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [VersionedTextDocumentIdentifier](#VersionedTextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.integer(candidate.version);\n }\n VersionedTextDocumentIdentifier.is = is;\n})(VersionedTextDocumentIdentifier || (VersionedTextDocumentIdentifier = {}));\n/**\n * The OptionalVersionedTextDocumentIdentifier namespace provides helper functions to work with\n * [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) literals.\n */\nvar OptionalVersionedTextDocumentIdentifier;\n(function (OptionalVersionedTextDocumentIdentifier) {\n /**\n * Creates a new OptionalVersionedTextDocumentIdentifier literal.\n * @param uri The document's uri.\n * @param uri The document's text.\n */\n function create(uri, version) {\n return { uri: uri, version: version };\n }\n OptionalVersionedTextDocumentIdentifier.create = create;\n /**\n * Checks whether the given literal conforms to the [OptionalVersionedTextDocumentIdentifier](#OptionalVersionedTextDocumentIdentifier) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (candidate.version === null || Is.integer(candidate.version));\n }\n OptionalVersionedTextDocumentIdentifier.is = is;\n})(OptionalVersionedTextDocumentIdentifier || (OptionalVersionedTextDocumentIdentifier = {}));\n/**\n * The TextDocumentItem namespace provides helper functions to work with\n * [TextDocumentItem](#TextDocumentItem) literals.\n */\nvar TextDocumentItem;\n(function (TextDocumentItem) {\n /**\n * Creates a new TextDocumentItem literal.\n * @param uri The document's uri.\n * @param languageId The document's language identifier.\n * @param version The document's version number.\n * @param text The document's text.\n */\n function create(uri, languageId, version, text) {\n return { uri: uri, languageId: languageId, version: version, text: text };\n }\n TextDocumentItem.create = create;\n /**\n * Checks whether the given literal conforms to the [TextDocumentItem](#TextDocumentItem) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && Is.string(candidate.languageId) && Is.integer(candidate.version) && Is.string(candidate.text);\n }\n TextDocumentItem.is = is;\n})(TextDocumentItem || (TextDocumentItem = {}));\n/**\n * Describes the content type that a client supports in various\n * result literals like `Hover`, `ParameterInfo` or `CompletionItem`.\n *\n * Please note that `MarkupKinds` must not start with a `$`. This kinds\n * are reserved for internal usage.\n */\nvar MarkupKind;\n(function (MarkupKind) {\n /**\n * Plain text is supported as a content format\n */\n MarkupKind.PlainText = 'plaintext';\n /**\n * Markdown is supported as a content format\n */\n MarkupKind.Markdown = 'markdown';\n})(MarkupKind || (MarkupKind = {}));\n(function (MarkupKind) {\n /**\n * Checks whether the given value is a value of the [MarkupKind](#MarkupKind) type.\n */\n function is(value) {\n var candidate = value;\n return candidate === MarkupKind.PlainText || candidate === MarkupKind.Markdown;\n }\n MarkupKind.is = is;\n})(MarkupKind || (MarkupKind = {}));\nvar MarkupContent;\n(function (MarkupContent) {\n /**\n * Checks whether the given value conforms to the [MarkupContent](#MarkupContent) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.objectLiteral(value) && MarkupKind.is(candidate.kind) && Is.string(candidate.value);\n }\n MarkupContent.is = is;\n})(MarkupContent || (MarkupContent = {}));\n/**\n * The kind of a completion entry.\n */\nvar CompletionItemKind;\n(function (CompletionItemKind) {\n CompletionItemKind.Text = 1;\n CompletionItemKind.Method = 2;\n CompletionItemKind.Function = 3;\n CompletionItemKind.Constructor = 4;\n CompletionItemKind.Field = 5;\n CompletionItemKind.Variable = 6;\n CompletionItemKind.Class = 7;\n CompletionItemKind.Interface = 8;\n CompletionItemKind.Module = 9;\n CompletionItemKind.Property = 10;\n CompletionItemKind.Unit = 11;\n CompletionItemKind.Value = 12;\n CompletionItemKind.Enum = 13;\n CompletionItemKind.Keyword = 14;\n CompletionItemKind.Snippet = 15;\n CompletionItemKind.Color = 16;\n CompletionItemKind.File = 17;\n CompletionItemKind.Reference = 18;\n CompletionItemKind.Folder = 19;\n CompletionItemKind.EnumMember = 20;\n CompletionItemKind.Constant = 21;\n CompletionItemKind.Struct = 22;\n CompletionItemKind.Event = 23;\n CompletionItemKind.Operator = 24;\n CompletionItemKind.TypeParameter = 25;\n})(CompletionItemKind || (CompletionItemKind = {}));\n/**\n * Defines whether the insert text in a completion item should be interpreted as\n * plain text or a snippet.\n */\nvar InsertTextFormat;\n(function (InsertTextFormat) {\n /**\n * The primary text to be inserted is treated as a plain string.\n */\n InsertTextFormat.PlainText = 1;\n /**\n * The primary text to be inserted is treated as a snippet.\n *\n * A snippet can define tab stops and placeholders with `$1`, `$2`\n * and `${3:foo}`. `$0` defines the final tab stop, it defaults to\n * the end of the snippet. Placeholders with equal identifiers are linked,\n * that is typing in one will update others too.\n *\n * See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax\n */\n InsertTextFormat.Snippet = 2;\n})(InsertTextFormat || (InsertTextFormat = {}));\n/**\n * Completion item tags are extra annotations that tweak the rendering of a completion\n * item.\n *\n * @since 3.15.0\n */\nvar CompletionItemTag;\n(function (CompletionItemTag) {\n /**\n * Render a completion as obsolete, usually using a strike-out.\n */\n CompletionItemTag.Deprecated = 1;\n})(CompletionItemTag || (CompletionItemTag = {}));\n/**\n * The InsertReplaceEdit namespace provides functions to deal with insert / replace edits.\n *\n * @since 3.16.0\n */\nvar InsertReplaceEdit;\n(function (InsertReplaceEdit) {\n /**\n * Creates a new insert / replace edit\n */\n function create(newText, insert, replace) {\n return { newText: newText, insert: insert, replace: replace };\n }\n InsertReplaceEdit.create = create;\n /**\n * Checks whether the given literal conforms to the [InsertReplaceEdit](#InsertReplaceEdit) interface.\n */\n function is(value) {\n var candidate = value;\n return candidate && Is.string(candidate.newText) && Range.is(candidate.insert) && Range.is(candidate.replace);\n }\n InsertReplaceEdit.is = is;\n})(InsertReplaceEdit || (InsertReplaceEdit = {}));\n/**\n * How whitespace and indentation is handled during completion\n * item insertion.\n *\n * @since 3.16.0\n */\nvar InsertTextMode;\n(function (InsertTextMode) {\n /**\n * The insertion or replace strings is taken as it is. If the\n * value is multi line the lines below the cursor will be\n * inserted using the indentation defined in the string value.\n * The client will not apply any kind of adjustments to the\n * string.\n */\n InsertTextMode.asIs = 1;\n /**\n * The editor adjusts leading whitespace of new lines so that\n * they match the indentation up to the cursor of the line for\n * which the item is accepted.\n *\n * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a\n * multi line completion item is indented using 2 tabs and all\n * following lines inserted will be indented using 2 tabs as well.\n */\n InsertTextMode.adjustIndentation = 2;\n})(InsertTextMode || (InsertTextMode = {}));\n/**\n * The CompletionItem namespace provides functions to deal with\n * completion items.\n */\nvar CompletionItem;\n(function (CompletionItem) {\n /**\n * Create a completion item and seed it with a label.\n * @param label The completion item's label\n */\n function create(label) {\n return { label: label };\n }\n CompletionItem.create = create;\n})(CompletionItem || (CompletionItem = {}));\n/**\n * The CompletionList namespace provides functions to deal with\n * completion lists.\n */\nvar CompletionList;\n(function (CompletionList) {\n /**\n * Creates a new completion list.\n *\n * @param items The completion items.\n * @param isIncomplete The list is not complete.\n */\n function create(items, isIncomplete) {\n return { items: items ? items : [], isIncomplete: !!isIncomplete };\n }\n CompletionList.create = create;\n})(CompletionList || (CompletionList = {}));\nvar MarkedString;\n(function (MarkedString) {\n /**\n * Creates a marked string from plain text.\n *\n * @param plainText The plain text.\n */\n function fromPlainText(plainText) {\n return plainText.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&'); // escape markdown syntax tokens: http://daringfireball.net/projects/markdown/syntax#backslash\n }\n MarkedString.fromPlainText = fromPlainText;\n /**\n * Checks whether the given value conforms to the [MarkedString](#MarkedString) type.\n */\n function is(value) {\n var candidate = value;\n return Is.string(candidate) || (Is.objectLiteral(candidate) && Is.string(candidate.language) && Is.string(candidate.value));\n }\n MarkedString.is = is;\n})(MarkedString || (MarkedString = {}));\nvar Hover;\n(function (Hover) {\n /**\n * Checks whether the given value conforms to the [Hover](#Hover) interface.\n */\n function is(value) {\n var candidate = value;\n return !!candidate && Is.objectLiteral(candidate) && (MarkupContent.is(candidate.contents) ||\n MarkedString.is(candidate.contents) ||\n Is.typedArray(candidate.contents, MarkedString.is)) && (value.range === undefined || Range.is(value.range));\n }\n Hover.is = is;\n})(Hover || (Hover = {}));\n/**\n * The ParameterInformation namespace provides helper functions to work with\n * [ParameterInformation](#ParameterInformation) literals.\n */\nvar ParameterInformation;\n(function (ParameterInformation) {\n /**\n * Creates a new parameter information literal.\n *\n * @param label A label string.\n * @param documentation A doc string.\n */\n function create(label, documentation) {\n return documentation ? { label: label, documentation: documentation } : { label: label };\n }\n ParameterInformation.create = create;\n})(ParameterInformation || (ParameterInformation = {}));\n/**\n * The SignatureInformation namespace provides helper functions to work with\n * [SignatureInformation](#SignatureInformation) literals.\n */\nvar SignatureInformation;\n(function (SignatureInformation) {\n function create(label, documentation) {\n var parameters = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n parameters[_i - 2] = arguments[_i];\n }\n var result = { label: label };\n if (Is.defined(documentation)) {\n result.documentation = documentation;\n }\n if (Is.defined(parameters)) {\n result.parameters = parameters;\n }\n else {\n result.parameters = [];\n }\n return result;\n }\n SignatureInformation.create = create;\n})(SignatureInformation || (SignatureInformation = {}));\n/**\n * A document highlight kind.\n */\nvar DocumentHighlightKind;\n(function (DocumentHighlightKind) {\n /**\n * A textual occurrence.\n */\n DocumentHighlightKind.Text = 1;\n /**\n * Read-access of a symbol, like reading a variable.\n */\n DocumentHighlightKind.Read = 2;\n /**\n * Write-access of a symbol, like writing to a variable.\n */\n DocumentHighlightKind.Write = 3;\n})(DocumentHighlightKind || (DocumentHighlightKind = {}));\n/**\n * DocumentHighlight namespace to provide helper functions to work with\n * [DocumentHighlight](#DocumentHighlight) literals.\n */\nvar DocumentHighlight;\n(function (DocumentHighlight) {\n /**\n * Create a DocumentHighlight object.\n * @param range The range the highlight applies to.\n */\n function create(range, kind) {\n var result = { range: range };\n if (Is.number(kind)) {\n result.kind = kind;\n }\n return result;\n }\n DocumentHighlight.create = create;\n})(DocumentHighlight || (DocumentHighlight = {}));\n/**\n * A symbol kind.\n */\nvar SymbolKind;\n(function (SymbolKind) {\n SymbolKind.File = 1;\n SymbolKind.Module = 2;\n SymbolKind.Namespace = 3;\n SymbolKind.Package = 4;\n SymbolKind.Class = 5;\n SymbolKind.Method = 6;\n SymbolKind.Property = 7;\n SymbolKind.Field = 8;\n SymbolKind.Constructor = 9;\n SymbolKind.Enum = 10;\n SymbolKind.Interface = 11;\n SymbolKind.Function = 12;\n SymbolKind.Variable = 13;\n SymbolKind.Constant = 14;\n SymbolKind.String = 15;\n SymbolKind.Number = 16;\n SymbolKind.Boolean = 17;\n SymbolKind.Array = 18;\n SymbolKind.Object = 19;\n SymbolKind.Key = 20;\n SymbolKind.Null = 21;\n SymbolKind.EnumMember = 22;\n SymbolKind.Struct = 23;\n SymbolKind.Event = 24;\n SymbolKind.Operator = 25;\n SymbolKind.TypeParameter = 26;\n})(SymbolKind || (SymbolKind = {}));\n/**\n * Symbol tags are extra annotations that tweak the rendering of a symbol.\n * @since 3.16\n */\nvar SymbolTag;\n(function (SymbolTag) {\n /**\n * Render a symbol as obsolete, usually using a strike-out.\n */\n SymbolTag.Deprecated = 1;\n})(SymbolTag || (SymbolTag = {}));\nvar SymbolInformation;\n(function (SymbolInformation) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the location of the symbol.\n * @param uri The resource of the location of symbol, defaults to the current document.\n * @param containerName The name of the symbol containing the symbol.\n */\n function create(name, kind, range, uri, containerName) {\n var result = {\n name: name,\n kind: kind,\n location: { uri: uri, range: range }\n };\n if (containerName) {\n result.containerName = containerName;\n }\n return result;\n }\n SymbolInformation.create = create;\n})(SymbolInformation || (SymbolInformation = {}));\nvar DocumentSymbol;\n(function (DocumentSymbol) {\n /**\n * Creates a new symbol information literal.\n *\n * @param name The name of the symbol.\n * @param detail The detail of the symbol.\n * @param kind The kind of the symbol.\n * @param range The range of the symbol.\n * @param selectionRange The selectionRange of the symbol.\n * @param children Children of the symbol.\n */\n function create(name, detail, kind, range, selectionRange, children) {\n var result = {\n name: name,\n detail: detail,\n kind: kind,\n range: range,\n selectionRange: selectionRange\n };\n if (children !== undefined) {\n result.children = children;\n }\n return result;\n }\n DocumentSymbol.create = create;\n /**\n * Checks whether the given literal conforms to the [DocumentSymbol](#DocumentSymbol) interface.\n */\n function is(value) {\n var candidate = value;\n return candidate &&\n Is.string(candidate.name) && Is.number(candidate.kind) &&\n Range.is(candidate.range) && Range.is(candidate.selectionRange) &&\n (candidate.detail === undefined || Is.string(candidate.detail)) &&\n (candidate.deprecated === undefined || Is.boolean(candidate.deprecated)) &&\n (candidate.children === undefined || Array.isArray(candidate.children)) &&\n (candidate.tags === undefined || Array.isArray(candidate.tags));\n }\n DocumentSymbol.is = is;\n})(DocumentSymbol || (DocumentSymbol = {}));\n/**\n * A set of predefined code action kinds\n */\nvar CodeActionKind;\n(function (CodeActionKind) {\n /**\n * Empty kind.\n */\n CodeActionKind.Empty = '';\n /**\n * Base kind for quickfix actions: 'quickfix'\n */\n CodeActionKind.QuickFix = 'quickfix';\n /**\n * Base kind for refactoring actions: 'refactor'\n */\n CodeActionKind.Refactor = 'refactor';\n /**\n * Base kind for refactoring extraction actions: 'refactor.extract'\n *\n * Example extract actions:\n *\n * - Extract method\n * - Extract function\n * - Extract variable\n * - Extract interface from class\n * - ...\n */\n CodeActionKind.RefactorExtract = 'refactor.extract';\n /**\n * Base kind for refactoring inline actions: 'refactor.inline'\n *\n * Example inline actions:\n *\n * - Inline function\n * - Inline variable\n * - Inline constant\n * - ...\n */\n CodeActionKind.RefactorInline = 'refactor.inline';\n /**\n * Base kind for refactoring rewrite actions: 'refactor.rewrite'\n *\n * Example rewrite actions:\n *\n * - Convert JavaScript function to class\n * - Add or remove parameter\n * - Encapsulate field\n * - Make method static\n * - Move method to base class\n * - ...\n */\n CodeActionKind.RefactorRewrite = 'refactor.rewrite';\n /**\n * Base kind for source actions: `source`\n *\n * Source code actions apply to the entire file.\n */\n CodeActionKind.Source = 'source';\n /**\n * Base kind for an organize imports source action: `source.organizeImports`\n */\n CodeActionKind.SourceOrganizeImports = 'source.organizeImports';\n /**\n * Base kind for auto-fix source actions: `source.fixAll`.\n *\n * Fix all actions automatically fix errors that have a clear fix that do not require user input.\n * They should not suppress errors or perform unsafe fixes such as generating new types or classes.\n *\n * @since 3.15.0\n */\n CodeActionKind.SourceFixAll = 'source.fixAll';\n})(CodeActionKind || (CodeActionKind = {}));\n/**\n * The CodeActionContext namespace provides helper functions to work with\n * [CodeActionContext](#CodeActionContext) literals.\n */\nvar CodeActionContext;\n(function (CodeActionContext) {\n /**\n * Creates a new CodeActionContext literal.\n */\n function create(diagnostics, only) {\n var result = { diagnostics: diagnostics };\n if (only !== undefined && only !== null) {\n result.only = only;\n }\n return result;\n }\n CodeActionContext.create = create;\n /**\n * Checks whether the given literal conforms to the [CodeActionContext](#CodeActionContext) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) && (candidate.only === undefined || Is.typedArray(candidate.only, Is.string));\n }\n CodeActionContext.is = is;\n})(CodeActionContext || (CodeActionContext = {}));\nvar CodeAction;\n(function (CodeAction) {\n function create(title, kindOrCommandOrEdit, kind) {\n var result = { title: title };\n var checkKind = true;\n if (typeof kindOrCommandOrEdit === 'string') {\n checkKind = false;\n result.kind = kindOrCommandOrEdit;\n }\n else if (Command.is(kindOrCommandOrEdit)) {\n result.command = kindOrCommandOrEdit;\n }\n else {\n result.edit = kindOrCommandOrEdit;\n }\n if (checkKind && kind !== undefined) {\n result.kind = kind;\n }\n return result;\n }\n CodeAction.create = create;\n function is(value) {\n var candidate = value;\n return candidate && Is.string(candidate.title) &&\n (candidate.diagnostics === undefined || Is.typedArray(candidate.diagnostics, Diagnostic.is)) &&\n (candidate.kind === undefined || Is.string(candidate.kind)) &&\n (candidate.edit !== undefined || candidate.command !== undefined) &&\n (candidate.command === undefined || Command.is(candidate.command)) &&\n (candidate.isPreferred === undefined || Is.boolean(candidate.isPreferred)) &&\n (candidate.edit === undefined || WorkspaceEdit.is(candidate.edit));\n }\n CodeAction.is = is;\n})(CodeAction || (CodeAction = {}));\n/**\n * The CodeLens namespace provides helper functions to work with\n * [CodeLens](#CodeLens) literals.\n */\nvar CodeLens;\n(function (CodeLens) {\n /**\n * Creates a new CodeLens literal.\n */\n function create(range, data) {\n var result = { range: range };\n if (Is.defined(data)) {\n result.data = data;\n }\n return result;\n }\n CodeLens.create = create;\n /**\n * Checks whether the given literal conforms to the [CodeLens](#CodeLens) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.command) || Command.is(candidate.command));\n }\n CodeLens.is = is;\n})(CodeLens || (CodeLens = {}));\n/**\n * The FormattingOptions namespace provides helper functions to work with\n * [FormattingOptions](#FormattingOptions) literals.\n */\nvar FormattingOptions;\n(function (FormattingOptions) {\n /**\n * Creates a new FormattingOptions literal.\n */\n function create(tabSize, insertSpaces) {\n return { tabSize: tabSize, insertSpaces: insertSpaces };\n }\n FormattingOptions.create = create;\n /**\n * Checks whether the given literal conforms to the [FormattingOptions](#FormattingOptions) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.uinteger(candidate.tabSize) && Is.boolean(candidate.insertSpaces);\n }\n FormattingOptions.is = is;\n})(FormattingOptions || (FormattingOptions = {}));\n/**\n * The DocumentLink namespace provides helper functions to work with\n * [DocumentLink](#DocumentLink) literals.\n */\nvar DocumentLink;\n(function (DocumentLink) {\n /**\n * Creates a new DocumentLink literal.\n */\n function create(range, target, data) {\n return { range: range, target: target, data: data };\n }\n DocumentLink.create = create;\n /**\n * Checks whether the given literal conforms to the [DocumentLink](#DocumentLink) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Range.is(candidate.range) && (Is.undefined(candidate.target) || Is.string(candidate.target));\n }\n DocumentLink.is = is;\n})(DocumentLink || (DocumentLink = {}));\n/**\n * The SelectionRange namespace provides helper function to work with\n * SelectionRange literals.\n */\nvar SelectionRange;\n(function (SelectionRange) {\n /**\n * Creates a new SelectionRange\n * @param range the range.\n * @param parent an optional parent.\n */\n function create(range, parent) {\n return { range: range, parent: parent };\n }\n SelectionRange.create = create;\n function is(value) {\n var candidate = value;\n return candidate !== undefined && Range.is(candidate.range) && (candidate.parent === undefined || SelectionRange.is(candidate.parent));\n }\n SelectionRange.is = is;\n})(SelectionRange || (SelectionRange = {}));\nvar EOL = ['\\n', '\\r\\n', '\\r'];\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nvar TextDocument;\n(function (TextDocument) {\n /**\n * Creates a new ITextDocument literal from the given uri and content.\n * @param uri The document's uri.\n * @param languageId The document's language Id.\n * @param content The document's content.\n */\n function create(uri, languageId, version, content) {\n return new FullTextDocument(uri, languageId, version, content);\n }\n TextDocument.create = create;\n /**\n * Checks whether the given literal conforms to the [ITextDocument](#ITextDocument) interface.\n */\n function is(value) {\n var candidate = value;\n return Is.defined(candidate) && Is.string(candidate.uri) && (Is.undefined(candidate.languageId) || Is.string(candidate.languageId)) && Is.uinteger(candidate.lineCount)\n && Is.func(candidate.getText) && Is.func(candidate.positionAt) && Is.func(candidate.offsetAt) ? true : false;\n }\n TextDocument.is = is;\n function applyEdits(document, edits) {\n var text = document.getText();\n var sortedEdits = mergeSort(edits, function (a, b) {\n var diff = a.range.start.line - b.range.start.line;\n if (diff === 0) {\n return a.range.start.character - b.range.start.character;\n }\n return diff;\n });\n var lastModifiedOffset = text.length;\n for (var i = sortedEdits.length - 1; i >= 0; i--) {\n var e = sortedEdits[i];\n var startOffset = document.offsetAt(e.range.start);\n var endOffset = document.offsetAt(e.range.end);\n if (endOffset <= lastModifiedOffset) {\n text = text.substring(0, startOffset) + e.newText + text.substring(endOffset, text.length);\n }\n else {\n throw new Error('Overlapping edit');\n }\n lastModifiedOffset = startOffset;\n }\n return text;\n }\n TextDocument.applyEdits = applyEdits;\n function mergeSort(data, compare) {\n if (data.length <= 1) {\n // sorted\n return data;\n }\n var p = (data.length / 2) | 0;\n var left = data.slice(0, p);\n var right = data.slice(p);\n mergeSort(left, compare);\n mergeSort(right, compare);\n var leftIdx = 0;\n var rightIdx = 0;\n var i = 0;\n while (leftIdx < left.length && rightIdx < right.length) {\n var ret = compare(left[leftIdx], right[rightIdx]);\n if (ret <= 0) {\n // smaller_equal -> take left to preserve order\n data[i++] = left[leftIdx++];\n }\n else {\n // greater -> take right\n data[i++] = right[rightIdx++];\n }\n }\n while (leftIdx < left.length) {\n data[i++] = left[leftIdx++];\n }\n while (rightIdx < right.length) {\n data[i++] = right[rightIdx++];\n }\n return data;\n }\n})(TextDocument || (TextDocument = {}));\n/**\n * @deprecated Use the text document from the new vscode-languageserver-textdocument package.\n */\nvar FullTextDocument = /** @class */ (function () {\n function FullTextDocument(uri, languageId, version, content) {\n this._uri = uri;\n this._languageId = languageId;\n this._version = version;\n this._content = content;\n this._lineOffsets = undefined;\n }\n Object.defineProperty(FullTextDocument.prototype, \"uri\", {\n get: function () {\n return this._uri;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"languageId\", {\n get: function () {\n return this._languageId;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(FullTextDocument.prototype, \"version\", {\n get: function () {\n return this._version;\n },\n enumerable: false,\n configurable: true\n });\n FullTextDocument.prototype.getText = function (range) {\n if (range) {\n var start = this.offsetAt(range.start);\n var end = this.offsetAt(range.end);\n return this._content.substring(start, end);\n }\n return this._content;\n };\n FullTextDocument.prototype.update = function (event, version) {\n this._content = event.text;\n this._version = version;\n this._lineOffsets = undefined;\n };\n FullTextDocument.prototype.getLineOffsets = function () {\n if (this._lineOffsets === undefined) {\n var lineOffsets = [];\n var text = this._content;\n var isLineStart = true;\n for (var i = 0; i < text.length; i++) {\n if (isLineStart) {\n lineOffsets.push(i);\n isLineStart = false;\n }\n var ch = text.charAt(i);\n isLineStart = (ch === '\\r' || ch === '\\n');\n if (ch === '\\r' && i + 1 < text.length && text.charAt(i + 1) === '\\n') {\n i++;\n }\n }\n if (isLineStart && text.length > 0) {\n lineOffsets.push(text.length);\n }\n this._lineOffsets = lineOffsets;\n }\n return this._lineOffsets;\n };\n FullTextDocument.prototype.positionAt = function (offset) {\n offset = Math.max(Math.min(offset, this._content.length), 0);\n var lineOffsets = this.getLineOffsets();\n var low = 0, high = lineOffsets.length;\n if (high === 0) {\n return Position.create(0, offset);\n }\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (lineOffsets[mid] > offset) {\n high = mid;\n }\n else {\n low = mid + 1;\n }\n }\n // low is the least x for which the line offset is larger than the current offset\n // or array.length if no line offset is larger than the current offset\n var line = low - 1;\n return Position.create(line, offset - lineOffsets[line]);\n };\n FullTextDocument.prototype.offsetAt = function (position) {\n var lineOffsets = this.getLineOffsets();\n if (position.line >= lineOffsets.length) {\n return this._content.length;\n }\n else if (position.line < 0) {\n return 0;\n }\n var lineOffset = lineOffsets[position.line];\n var nextLineOffset = (position.line + 1 < lineOffsets.length) ? lineOffsets[position.line + 1] : this._content.length;\n return Math.max(Math.min(lineOffset + position.character, nextLineOffset), lineOffset);\n };\n Object.defineProperty(FullTextDocument.prototype, \"lineCount\", {\n get: function () {\n return this.getLineOffsets().length;\n },\n enumerable: false,\n configurable: true\n });\n return FullTextDocument;\n}());\nvar Is;\n(function (Is) {\n var toString = Object.prototype.toString;\n function defined(value) {\n return typeof value !== 'undefined';\n }\n Is.defined = defined;\n function undefined(value) {\n return typeof value === 'undefined';\n }\n Is.undefined = undefined;\n function boolean(value) {\n return value === true || value === false;\n }\n Is.boolean = boolean;\n function string(value) {\n return toString.call(value) === '[object String]';\n }\n Is.string = string;\n function number(value) {\n return toString.call(value) === '[object Number]';\n }\n Is.number = number;\n function numberRange(value, min, max) {\n return toString.call(value) === '[object Number]' && min <= value && value <= max;\n }\n Is.numberRange = numberRange;\n function integer(value) {\n return toString.call(value) === '[object Number]' && -2147483648 <= value && value <= 2147483647;\n }\n Is.integer = integer;\n function uinteger(value) {\n return toString.call(value) === '[object Number]' && 0 <= value && value <= 2147483647;\n }\n Is.uinteger = uinteger;\n function func(value) {\n return toString.call(value) === '[object Function]';\n }\n Is.func = func;\n function objectLiteral(value) {\n // Strictly speaking class instances pass this check as well. Since the LSP\n // doesn't use classes we ignore this for now. If we do we need to add something\n // like this: `Object.getPrototypeOf(Object.getPrototypeOf(x)) === null`\n return value !== null && typeof value === 'object';\n }\n Is.objectLiteral = objectLiteral;\n function typedArray(value, check) {\n return Array.isArray(value) && value.every(check);\n }\n Is.typedArray = typedArray;\n})(Is || (Is = {}));\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-languageserver-types/main.js?");
249
249
 
250
250
  /***/ }),
251
251
 
@@ -265,7 +265,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
265
265
  \*******************************************************************************/
266
266
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
267
267
 
268
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"loadMessageBundle\": () => (/* binding */ loadMessageBundle),\n/* harmony export */ \"config\": () => (/* binding */ config)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction format(message, args) {\r\n var result;\r\n if (args.length === 0) {\r\n result = message;\r\n }\r\n else {\r\n result = message.replace(/\\{(\\d+)\\}/g, function (match, rest) {\r\n var index = rest[0];\r\n return typeof args[index] !== 'undefined' ? args[index] : match;\r\n });\r\n }\r\n return result;\r\n}\r\nfunction localize(key, message) {\r\n var args = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n args[_i - 2] = arguments[_i];\r\n }\r\n return format(message, args);\r\n}\r\nfunction loadMessageBundle(file) {\r\n return localize;\r\n}\r\nfunction config(opt) {\r\n return loadMessageBundle;\r\n}\r\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/fillers/vscode-nls.js?");
268
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"config\": () => (/* binding */ config),\n/* harmony export */ \"loadMessageBundle\": () => (/* binding */ loadMessageBundle)\n/* harmony export */ });\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\nfunction format(message, args) {\r\n var result;\r\n if (args.length === 0) {\r\n result = message;\r\n }\r\n else {\r\n result = message.replace(/\\{(\\d+)\\}/g, function (match, rest) {\r\n var index = rest[0];\r\n return typeof args[index] !== 'undefined' ? args[index] : match;\r\n });\r\n }\r\n return result;\r\n}\r\nfunction localize(key, message) {\r\n var args = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n args[_i - 2] = arguments[_i];\r\n }\r\n return format(message, args);\r\n}\r\nfunction loadMessageBundle(file) {\r\n return localize;\r\n}\r\nfunction config(opt) {\r\n return loadMessageBundle;\r\n}\r\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/fillers/vscode-nls.js?");
269
269
 
270
270
  /***/ }),
271
271
 
@@ -285,7 +285,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
285
285
  \*****************************************************************************/
286
286
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
287
287
 
288
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DiagnosticsAdapter\": () => (/* binding */ DiagnosticsAdapter),\n/* harmony export */ \"CompletionAdapter\": () => (/* binding */ CompletionAdapter),\n/* harmony export */ \"HoverAdapter\": () => (/* binding */ HoverAdapter),\n/* harmony export */ \"DocumentSymbolAdapter\": () => (/* binding */ DocumentSymbolAdapter),\n/* harmony export */ \"DocumentFormattingEditProvider\": () => (/* binding */ DocumentFormattingEditProvider),\n/* harmony export */ \"DocumentRangeFormattingEditProvider\": () => (/* binding */ DocumentRangeFormattingEditProvider),\n/* harmony export */ \"DocumentColorAdapter\": () => (/* binding */ DocumentColorAdapter),\n/* harmony export */ \"FoldingRangeAdapter\": () => (/* binding */ FoldingRangeAdapter),\n/* harmony export */ \"SelectionRangeAdapter\": () => (/* binding */ SelectionRangeAdapter)\n/* harmony export */ });\n/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ \"./node_modules/monaco-editor/esm/vs/language/json/fillers/monaco-editor-core.js\");\n/* harmony import */ var _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_deps/vscode-json-languageservice/jsonLanguageService.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/jsonLanguageService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n// --- diagnostics --- ---\r\nvar DiagnosticsAdapter = /** @class */ (function () {\r\n function DiagnosticsAdapter(_languageId, _worker, defaults) {\r\n var _this = this;\r\n this._languageId = _languageId;\r\n this._worker = _worker;\r\n this._disposables = [];\r\n this._listener = Object.create(null);\r\n var onModelAdd = function (model) {\r\n var modeId = model.getModeId();\r\n if (modeId !== _this._languageId) {\r\n return;\r\n }\r\n var handle;\r\n _this._listener[model.uri.toString()] = model.onDidChangeContent(function () {\r\n clearTimeout(handle);\r\n handle = setTimeout(function () { return _this._doValidate(model.uri, modeId); }, 500);\r\n });\r\n _this._doValidate(model.uri, modeId);\r\n };\r\n var onModelRemoved = function (model) {\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.setModelMarkers(model, _this._languageId, []);\r\n var uriStr = model.uri.toString();\r\n var listener = _this._listener[uriStr];\r\n if (listener) {\r\n listener.dispose();\r\n delete _this._listener[uriStr];\r\n }\r\n };\r\n this._disposables.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.onDidCreateModel(onModelAdd));\r\n this._disposables.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.onWillDisposeModel(function (model) {\r\n onModelRemoved(model);\r\n _this._resetSchema(model.uri);\r\n }));\r\n this._disposables.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.onDidChangeModelLanguage(function (event) {\r\n onModelRemoved(event.model);\r\n onModelAdd(event.model);\r\n _this._resetSchema(event.model.uri);\r\n }));\r\n this._disposables.push(defaults.onDidChange(function (_) {\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.getModels().forEach(function (model) {\r\n if (model.getModeId() === _this._languageId) {\r\n onModelRemoved(model);\r\n onModelAdd(model);\r\n }\r\n });\r\n }));\r\n this._disposables.push({\r\n dispose: function () {\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.getModels().forEach(onModelRemoved);\r\n for (var key in _this._listener) {\r\n _this._listener[key].dispose();\r\n }\r\n }\r\n });\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.getModels().forEach(onModelAdd);\r\n }\r\n DiagnosticsAdapter.prototype.dispose = function () {\r\n this._disposables.forEach(function (d) { return d && d.dispose(); });\r\n this._disposables = [];\r\n };\r\n DiagnosticsAdapter.prototype._resetSchema = function (resource) {\r\n this._worker().then(function (worker) {\r\n worker.resetSchema(resource.toString());\r\n });\r\n };\r\n DiagnosticsAdapter.prototype._doValidate = function (resource, languageId) {\r\n this._worker(resource)\r\n .then(function (worker) {\r\n return worker.doValidation(resource.toString()).then(function (diagnostics) {\r\n var markers = diagnostics.map(function (d) { return toDiagnostics(resource, d); });\r\n var model = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.getModel(resource);\r\n if (model && model.getModeId() === languageId) {\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.setModelMarkers(model, languageId, markers);\r\n }\r\n });\r\n })\r\n .then(undefined, function (err) {\r\n console.error(err);\r\n });\r\n };\r\n return DiagnosticsAdapter;\r\n}());\r\n\r\nfunction toSeverity(lsSeverity) {\r\n switch (lsSeverity) {\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.DiagnosticSeverity.Error:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Error;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.DiagnosticSeverity.Warning:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Warning;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.DiagnosticSeverity.Information:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Info;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.DiagnosticSeverity.Hint:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Hint;\r\n default:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Info;\r\n }\r\n}\r\nfunction toDiagnostics(resource, diag) {\r\n var code = typeof diag.code === 'number' ? String(diag.code) : diag.code;\r\n return {\r\n severity: toSeverity(diag.severity),\r\n startLineNumber: diag.range.start.line + 1,\r\n startColumn: diag.range.start.character + 1,\r\n endLineNumber: diag.range.end.line + 1,\r\n endColumn: diag.range.end.character + 1,\r\n message: diag.message,\r\n code: code,\r\n source: diag.source\r\n };\r\n}\r\n// --- completion ------\r\nfunction fromPosition(position) {\r\n if (!position) {\r\n return void 0;\r\n }\r\n return { character: position.column - 1, line: position.lineNumber - 1 };\r\n}\r\nfunction fromRange(range) {\r\n if (!range) {\r\n return void 0;\r\n }\r\n return {\r\n start: {\r\n line: range.startLineNumber - 1,\r\n character: range.startColumn - 1\r\n },\r\n end: { line: range.endLineNumber - 1, character: range.endColumn - 1 }\r\n };\r\n}\r\nfunction toRange(range) {\r\n if (!range) {\r\n return void 0;\r\n }\r\n return new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.Range(range.start.line + 1, range.start.character + 1, range.end.line + 1, range.end.character + 1);\r\n}\r\nfunction isInsertReplaceEdit(edit) {\r\n return (typeof edit.insert !== 'undefined' &&\r\n typeof edit.replace !== 'undefined');\r\n}\r\nfunction toCompletionItemKind(kind) {\r\n var mItemKind = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind;\r\n switch (kind) {\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Text:\r\n return mItemKind.Text;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Method:\r\n return mItemKind.Method;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Function:\r\n return mItemKind.Function;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Constructor:\r\n return mItemKind.Constructor;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Field:\r\n return mItemKind.Field;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Variable:\r\n return mItemKind.Variable;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Class:\r\n return mItemKind.Class;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Interface:\r\n return mItemKind.Interface;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Module:\r\n return mItemKind.Module;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Property:\r\n return mItemKind.Property;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Unit:\r\n return mItemKind.Unit;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Value:\r\n return mItemKind.Value;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Enum:\r\n return mItemKind.Enum;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Keyword:\r\n return mItemKind.Keyword;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Snippet:\r\n return mItemKind.Snippet;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Color:\r\n return mItemKind.Color;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.File:\r\n return mItemKind.File;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Reference:\r\n return mItemKind.Reference;\r\n }\r\n return mItemKind.Property;\r\n}\r\nfunction fromCompletionItemKind(kind) {\r\n var mItemKind = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind;\r\n switch (kind) {\r\n case mItemKind.Text:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Text;\r\n case mItemKind.Method:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Method;\r\n case mItemKind.Function:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Function;\r\n case mItemKind.Constructor:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Constructor;\r\n case mItemKind.Field:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Field;\r\n case mItemKind.Variable:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Variable;\r\n case mItemKind.Class:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Class;\r\n case mItemKind.Interface:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Interface;\r\n case mItemKind.Module:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Module;\r\n case mItemKind.Property:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Property;\r\n case mItemKind.Unit:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Unit;\r\n case mItemKind.Value:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Value;\r\n case mItemKind.Enum:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Enum;\r\n case mItemKind.Keyword:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Keyword;\r\n case mItemKind.Snippet:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Snippet;\r\n case mItemKind.Color:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Color;\r\n case mItemKind.File:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.File;\r\n case mItemKind.Reference:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Reference;\r\n }\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Property;\r\n}\r\nfunction toTextEdit(textEdit) {\r\n if (!textEdit) {\r\n return void 0;\r\n }\r\n return {\r\n range: toRange(textEdit.range),\r\n text: textEdit.newText\r\n };\r\n}\r\nfunction toCommand(c) {\r\n return c && c.command === 'editor.action.triggerSuggest' ? { id: c.command, title: c.title, arguments: c.arguments } : undefined;\r\n}\r\nvar CompletionAdapter = /** @class */ (function () {\r\n function CompletionAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n Object.defineProperty(CompletionAdapter.prototype, \"triggerCharacters\", {\r\n get: function () {\r\n return [' ', ':', '\"'];\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CompletionAdapter.prototype.provideCompletionItems = function (model, position, context, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) {\r\n return worker.doComplete(resource.toString(), fromPosition(position));\r\n })\r\n .then(function (info) {\r\n if (!info) {\r\n return;\r\n }\r\n var wordInfo = model.getWordUntilPosition(position);\r\n var wordRange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.Range(position.lineNumber, wordInfo.startColumn, position.lineNumber, wordInfo.endColumn);\r\n var items = info.items.map(function (entry) {\r\n var item = {\r\n label: entry.label,\r\n insertText: entry.insertText || entry.label,\r\n sortText: entry.sortText,\r\n filterText: entry.filterText,\r\n documentation: entry.documentation,\r\n detail: entry.detail,\r\n command: toCommand(entry.command),\r\n range: wordRange,\r\n kind: toCompletionItemKind(entry.kind)\r\n };\r\n if (entry.textEdit) {\r\n if (isInsertReplaceEdit(entry.textEdit)) {\r\n item.range = {\r\n insert: toRange(entry.textEdit.insert),\r\n replace: toRange(entry.textEdit.replace)\r\n };\r\n }\r\n else {\r\n item.range = toRange(entry.textEdit.range);\r\n }\r\n item.insertText = entry.textEdit.newText;\r\n }\r\n if (entry.additionalTextEdits) {\r\n item.additionalTextEdits = entry.additionalTextEdits.map(toTextEdit);\r\n }\r\n if (entry.insertTextFormat === _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.Snippet) {\r\n item.insertTextRules = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemInsertTextRule.InsertAsSnippet;\r\n }\r\n return item;\r\n });\r\n return {\r\n isIncomplete: info.isIncomplete,\r\n suggestions: items\r\n };\r\n });\r\n };\r\n return CompletionAdapter;\r\n}());\r\n\r\nfunction isMarkupContent(thing) {\r\n return (thing &&\r\n typeof thing === 'object' &&\r\n typeof thing.kind === 'string');\r\n}\r\nfunction toMarkdownString(entry) {\r\n if (typeof entry === 'string') {\r\n return {\r\n value: entry\r\n };\r\n }\r\n if (isMarkupContent(entry)) {\r\n if (entry.kind === 'plaintext') {\r\n return {\r\n value: entry.value.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&')\r\n };\r\n }\r\n return {\r\n value: entry.value\r\n };\r\n }\r\n return { value: '```' + entry.language + '\\n' + entry.value + '\\n```\\n' };\r\n}\r\nfunction toMarkedStringArray(contents) {\r\n if (!contents) {\r\n return void 0;\r\n }\r\n if (Array.isArray(contents)) {\r\n return contents.map(toMarkdownString);\r\n }\r\n return [toMarkdownString(contents)];\r\n}\r\n// --- hover ------\r\nvar HoverAdapter = /** @class */ (function () {\r\n function HoverAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n HoverAdapter.prototype.provideHover = function (model, position, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) {\r\n return worker.doHover(resource.toString(), fromPosition(position));\r\n })\r\n .then(function (info) {\r\n if (!info) {\r\n return;\r\n }\r\n return {\r\n range: toRange(info.range),\r\n contents: toMarkedStringArray(info.contents)\r\n };\r\n });\r\n };\r\n return HoverAdapter;\r\n}());\r\n\r\n// --- definition ------\r\nfunction toLocation(location) {\r\n return {\r\n uri: _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.Uri.parse(location.uri),\r\n range: toRange(location.range)\r\n };\r\n}\r\n// --- document symbols ------\r\nfunction toSymbolKind(kind) {\r\n var mKind = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.SymbolKind;\r\n switch (kind) {\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.File:\r\n return mKind.Array;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Module:\r\n return mKind.Module;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Namespace:\r\n return mKind.Namespace;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Package:\r\n return mKind.Package;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Class:\r\n return mKind.Class;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Method:\r\n return mKind.Method;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Property:\r\n return mKind.Property;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Field:\r\n return mKind.Field;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Constructor:\r\n return mKind.Constructor;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Enum:\r\n return mKind.Enum;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Interface:\r\n return mKind.Interface;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Function:\r\n return mKind.Function;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Variable:\r\n return mKind.Variable;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Constant:\r\n return mKind.Constant;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.String:\r\n return mKind.String;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Number:\r\n return mKind.Number;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Boolean:\r\n return mKind.Boolean;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Array:\r\n return mKind.Array;\r\n }\r\n return mKind.Function;\r\n}\r\nvar DocumentSymbolAdapter = /** @class */ (function () {\r\n function DocumentSymbolAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentSymbolAdapter.prototype.provideDocumentSymbols = function (model, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.findDocumentSymbols(resource.toString()); })\r\n .then(function (items) {\r\n if (!items) {\r\n return;\r\n }\r\n return items.map(function (item) { return ({\r\n name: item.name,\r\n detail: '',\r\n containerName: item.containerName,\r\n kind: toSymbolKind(item.kind),\r\n range: toRange(item.location.range),\r\n selectionRange: toRange(item.location.range),\r\n tags: []\r\n }); });\r\n });\r\n };\r\n return DocumentSymbolAdapter;\r\n}());\r\n\r\nfunction fromFormattingOptions(options) {\r\n return {\r\n tabSize: options.tabSize,\r\n insertSpaces: options.insertSpaces\r\n };\r\n}\r\nvar DocumentFormattingEditProvider = /** @class */ (function () {\r\n function DocumentFormattingEditProvider(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentFormattingEditProvider.prototype.provideDocumentFormattingEdits = function (model, options, token) {\r\n var resource = model.uri;\r\n return this._worker(resource).then(function (worker) {\r\n return worker\r\n .format(resource.toString(), null, fromFormattingOptions(options))\r\n .then(function (edits) {\r\n if (!edits || edits.length === 0) {\r\n return;\r\n }\r\n return edits.map(toTextEdit);\r\n });\r\n });\r\n };\r\n return DocumentFormattingEditProvider;\r\n}());\r\n\r\nvar DocumentRangeFormattingEditProvider = /** @class */ (function () {\r\n function DocumentRangeFormattingEditProvider(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentRangeFormattingEditProvider.prototype.provideDocumentRangeFormattingEdits = function (model, range, options, token) {\r\n var resource = model.uri;\r\n return this._worker(resource).then(function (worker) {\r\n return worker\r\n .format(resource.toString(), fromRange(range), fromFormattingOptions(options))\r\n .then(function (edits) {\r\n if (!edits || edits.length === 0) {\r\n return;\r\n }\r\n return edits.map(toTextEdit);\r\n });\r\n });\r\n };\r\n return DocumentRangeFormattingEditProvider;\r\n}());\r\n\r\nvar DocumentColorAdapter = /** @class */ (function () {\r\n function DocumentColorAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentColorAdapter.prototype.provideDocumentColors = function (model, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.findDocumentColors(resource.toString()); })\r\n .then(function (infos) {\r\n if (!infos) {\r\n return;\r\n }\r\n return infos.map(function (item) { return ({\r\n color: item.color,\r\n range: toRange(item.range)\r\n }); });\r\n });\r\n };\r\n DocumentColorAdapter.prototype.provideColorPresentations = function (model, info, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) {\r\n return worker.getColorPresentations(resource.toString(), info.color, fromRange(info.range));\r\n })\r\n .then(function (presentations) {\r\n if (!presentations) {\r\n return;\r\n }\r\n return presentations.map(function (presentation) {\r\n var item = {\r\n label: presentation.label\r\n };\r\n if (presentation.textEdit) {\r\n item.textEdit = toTextEdit(presentation.textEdit);\r\n }\r\n if (presentation.additionalTextEdits) {\r\n item.additionalTextEdits = presentation.additionalTextEdits.map(toTextEdit);\r\n }\r\n return item;\r\n });\r\n });\r\n };\r\n return DocumentColorAdapter;\r\n}());\r\n\r\nvar FoldingRangeAdapter = /** @class */ (function () {\r\n function FoldingRangeAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n FoldingRangeAdapter.prototype.provideFoldingRanges = function (model, context, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.getFoldingRanges(resource.toString(), context); })\r\n .then(function (ranges) {\r\n if (!ranges) {\r\n return;\r\n }\r\n return ranges.map(function (range) {\r\n var result = {\r\n start: range.startLine + 1,\r\n end: range.endLine + 1\r\n };\r\n if (typeof range.kind !== 'undefined') {\r\n result.kind = toFoldingRangeKind(range.kind);\r\n }\r\n return result;\r\n });\r\n });\r\n };\r\n return FoldingRangeAdapter;\r\n}());\r\n\r\nfunction toFoldingRangeKind(kind) {\r\n switch (kind) {\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.FoldingRangeKind.Comment:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.FoldingRangeKind.Comment;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.FoldingRangeKind.Imports:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.FoldingRangeKind.Imports;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.FoldingRangeKind.Region:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.FoldingRangeKind.Region;\r\n }\r\n return void 0;\r\n}\r\nvar SelectionRangeAdapter = /** @class */ (function () {\r\n function SelectionRangeAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n SelectionRangeAdapter.prototype.provideSelectionRanges = function (model, positions, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.getSelectionRanges(resource.toString(), positions.map(fromPosition)); })\r\n .then(function (selectionRanges) {\r\n if (!selectionRanges) {\r\n return;\r\n }\r\n return selectionRanges.map(function (selectionRange) {\r\n var result = [];\r\n while (selectionRange) {\r\n result.push({ range: toRange(selectionRange.range) });\r\n selectionRange = selectionRange.parent;\r\n }\r\n return result;\r\n });\r\n });\r\n };\r\n return SelectionRangeAdapter;\r\n}());\r\n\r\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/languageFeatures.js?");
288
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"CompletionAdapter\": () => (/* binding */ CompletionAdapter),\n/* harmony export */ \"DiagnosticsAdapter\": () => (/* binding */ DiagnosticsAdapter),\n/* harmony export */ \"DocumentColorAdapter\": () => (/* binding */ DocumentColorAdapter),\n/* harmony export */ \"DocumentFormattingEditProvider\": () => (/* binding */ DocumentFormattingEditProvider),\n/* harmony export */ \"DocumentRangeFormattingEditProvider\": () => (/* binding */ DocumentRangeFormattingEditProvider),\n/* harmony export */ \"DocumentSymbolAdapter\": () => (/* binding */ DocumentSymbolAdapter),\n/* harmony export */ \"FoldingRangeAdapter\": () => (/* binding */ FoldingRangeAdapter),\n/* harmony export */ \"HoverAdapter\": () => (/* binding */ HoverAdapter),\n/* harmony export */ \"SelectionRangeAdapter\": () => (/* binding */ SelectionRangeAdapter)\n/* harmony export */ });\n/* harmony import */ var _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fillers/monaco-editor-core.js */ \"./node_modules/monaco-editor/esm/vs/language/json/fillers/monaco-editor-core.js\");\n/* harmony import */ var _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./_deps/vscode-json-languageservice/jsonLanguageService.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/vscode-json-languageservice/jsonLanguageService.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\n\r\n// --- diagnostics --- ---\r\nvar DiagnosticsAdapter = /** @class */ (function () {\r\n function DiagnosticsAdapter(_languageId, _worker, defaults) {\r\n var _this = this;\r\n this._languageId = _languageId;\r\n this._worker = _worker;\r\n this._disposables = [];\r\n this._listener = Object.create(null);\r\n var onModelAdd = function (model) {\r\n var modeId = model.getModeId();\r\n if (modeId !== _this._languageId) {\r\n return;\r\n }\r\n var handle;\r\n _this._listener[model.uri.toString()] = model.onDidChangeContent(function () {\r\n clearTimeout(handle);\r\n handle = setTimeout(function () { return _this._doValidate(model.uri, modeId); }, 500);\r\n });\r\n _this._doValidate(model.uri, modeId);\r\n };\r\n var onModelRemoved = function (model) {\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.setModelMarkers(model, _this._languageId, []);\r\n var uriStr = model.uri.toString();\r\n var listener = _this._listener[uriStr];\r\n if (listener) {\r\n listener.dispose();\r\n delete _this._listener[uriStr];\r\n }\r\n };\r\n this._disposables.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.onDidCreateModel(onModelAdd));\r\n this._disposables.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.onWillDisposeModel(function (model) {\r\n onModelRemoved(model);\r\n _this._resetSchema(model.uri);\r\n }));\r\n this._disposables.push(_fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.onDidChangeModelLanguage(function (event) {\r\n onModelRemoved(event.model);\r\n onModelAdd(event.model);\r\n _this._resetSchema(event.model.uri);\r\n }));\r\n this._disposables.push(defaults.onDidChange(function (_) {\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.getModels().forEach(function (model) {\r\n if (model.getModeId() === _this._languageId) {\r\n onModelRemoved(model);\r\n onModelAdd(model);\r\n }\r\n });\r\n }));\r\n this._disposables.push({\r\n dispose: function () {\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.getModels().forEach(onModelRemoved);\r\n for (var key in _this._listener) {\r\n _this._listener[key].dispose();\r\n }\r\n }\r\n });\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.getModels().forEach(onModelAdd);\r\n }\r\n DiagnosticsAdapter.prototype.dispose = function () {\r\n this._disposables.forEach(function (d) { return d && d.dispose(); });\r\n this._disposables = [];\r\n };\r\n DiagnosticsAdapter.prototype._resetSchema = function (resource) {\r\n this._worker().then(function (worker) {\r\n worker.resetSchema(resource.toString());\r\n });\r\n };\r\n DiagnosticsAdapter.prototype._doValidate = function (resource, languageId) {\r\n this._worker(resource)\r\n .then(function (worker) {\r\n return worker.doValidation(resource.toString()).then(function (diagnostics) {\r\n var markers = diagnostics.map(function (d) { return toDiagnostics(resource, d); });\r\n var model = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.getModel(resource);\r\n if (model && model.getModeId() === languageId) {\r\n _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.editor.setModelMarkers(model, languageId, markers);\r\n }\r\n });\r\n })\r\n .then(undefined, function (err) {\r\n console.error(err);\r\n });\r\n };\r\n return DiagnosticsAdapter;\r\n}());\r\n\r\nfunction toSeverity(lsSeverity) {\r\n switch (lsSeverity) {\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.DiagnosticSeverity.Error:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Error;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.DiagnosticSeverity.Warning:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Warning;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.DiagnosticSeverity.Information:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Info;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.DiagnosticSeverity.Hint:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Hint;\r\n default:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.MarkerSeverity.Info;\r\n }\r\n}\r\nfunction toDiagnostics(resource, diag) {\r\n var code = typeof diag.code === 'number' ? String(diag.code) : diag.code;\r\n return {\r\n severity: toSeverity(diag.severity),\r\n startLineNumber: diag.range.start.line + 1,\r\n startColumn: diag.range.start.character + 1,\r\n endLineNumber: diag.range.end.line + 1,\r\n endColumn: diag.range.end.character + 1,\r\n message: diag.message,\r\n code: code,\r\n source: diag.source\r\n };\r\n}\r\n// --- completion ------\r\nfunction fromPosition(position) {\r\n if (!position) {\r\n return void 0;\r\n }\r\n return { character: position.column - 1, line: position.lineNumber - 1 };\r\n}\r\nfunction fromRange(range) {\r\n if (!range) {\r\n return void 0;\r\n }\r\n return {\r\n start: {\r\n line: range.startLineNumber - 1,\r\n character: range.startColumn - 1\r\n },\r\n end: { line: range.endLineNumber - 1, character: range.endColumn - 1 }\r\n };\r\n}\r\nfunction toRange(range) {\r\n if (!range) {\r\n return void 0;\r\n }\r\n return new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.Range(range.start.line + 1, range.start.character + 1, range.end.line + 1, range.end.character + 1);\r\n}\r\nfunction isInsertReplaceEdit(edit) {\r\n return (typeof edit.insert !== 'undefined' &&\r\n typeof edit.replace !== 'undefined');\r\n}\r\nfunction toCompletionItemKind(kind) {\r\n var mItemKind = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind;\r\n switch (kind) {\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Text:\r\n return mItemKind.Text;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Method:\r\n return mItemKind.Method;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Function:\r\n return mItemKind.Function;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Constructor:\r\n return mItemKind.Constructor;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Field:\r\n return mItemKind.Field;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Variable:\r\n return mItemKind.Variable;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Class:\r\n return mItemKind.Class;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Interface:\r\n return mItemKind.Interface;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Module:\r\n return mItemKind.Module;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Property:\r\n return mItemKind.Property;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Unit:\r\n return mItemKind.Unit;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Value:\r\n return mItemKind.Value;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Enum:\r\n return mItemKind.Enum;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Keyword:\r\n return mItemKind.Keyword;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Snippet:\r\n return mItemKind.Snippet;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Color:\r\n return mItemKind.Color;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.File:\r\n return mItemKind.File;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Reference:\r\n return mItemKind.Reference;\r\n }\r\n return mItemKind.Property;\r\n}\r\nfunction fromCompletionItemKind(kind) {\r\n var mItemKind = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemKind;\r\n switch (kind) {\r\n case mItemKind.Text:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Text;\r\n case mItemKind.Method:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Method;\r\n case mItemKind.Function:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Function;\r\n case mItemKind.Constructor:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Constructor;\r\n case mItemKind.Field:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Field;\r\n case mItemKind.Variable:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Variable;\r\n case mItemKind.Class:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Class;\r\n case mItemKind.Interface:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Interface;\r\n case mItemKind.Module:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Module;\r\n case mItemKind.Property:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Property;\r\n case mItemKind.Unit:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Unit;\r\n case mItemKind.Value:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Value;\r\n case mItemKind.Enum:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Enum;\r\n case mItemKind.Keyword:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Keyword;\r\n case mItemKind.Snippet:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Snippet;\r\n case mItemKind.Color:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Color;\r\n case mItemKind.File:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.File;\r\n case mItemKind.Reference:\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Reference;\r\n }\r\n return _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.CompletionItemKind.Property;\r\n}\r\nfunction toTextEdit(textEdit) {\r\n if (!textEdit) {\r\n return void 0;\r\n }\r\n return {\r\n range: toRange(textEdit.range),\r\n text: textEdit.newText\r\n };\r\n}\r\nfunction toCommand(c) {\r\n return c && c.command === 'editor.action.triggerSuggest' ? { id: c.command, title: c.title, arguments: c.arguments } : undefined;\r\n}\r\nvar CompletionAdapter = /** @class */ (function () {\r\n function CompletionAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n Object.defineProperty(CompletionAdapter.prototype, \"triggerCharacters\", {\r\n get: function () {\r\n return [' ', ':', '\"'];\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n CompletionAdapter.prototype.provideCompletionItems = function (model, position, context, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) {\r\n return worker.doComplete(resource.toString(), fromPosition(position));\r\n })\r\n .then(function (info) {\r\n if (!info) {\r\n return;\r\n }\r\n var wordInfo = model.getWordUntilPosition(position);\r\n var wordRange = new _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.Range(position.lineNumber, wordInfo.startColumn, position.lineNumber, wordInfo.endColumn);\r\n var items = info.items.map(function (entry) {\r\n var item = {\r\n label: entry.label,\r\n insertText: entry.insertText || entry.label,\r\n sortText: entry.sortText,\r\n filterText: entry.filterText,\r\n documentation: entry.documentation,\r\n detail: entry.detail,\r\n command: toCommand(entry.command),\r\n range: wordRange,\r\n kind: toCompletionItemKind(entry.kind)\r\n };\r\n if (entry.textEdit) {\r\n if (isInsertReplaceEdit(entry.textEdit)) {\r\n item.range = {\r\n insert: toRange(entry.textEdit.insert),\r\n replace: toRange(entry.textEdit.replace)\r\n };\r\n }\r\n else {\r\n item.range = toRange(entry.textEdit.range);\r\n }\r\n item.insertText = entry.textEdit.newText;\r\n }\r\n if (entry.additionalTextEdits) {\r\n item.additionalTextEdits = entry.additionalTextEdits.map(toTextEdit);\r\n }\r\n if (entry.insertTextFormat === _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.InsertTextFormat.Snippet) {\r\n item.insertTextRules = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.CompletionItemInsertTextRule.InsertAsSnippet;\r\n }\r\n return item;\r\n });\r\n return {\r\n isIncomplete: info.isIncomplete,\r\n suggestions: items\r\n };\r\n });\r\n };\r\n return CompletionAdapter;\r\n}());\r\n\r\nfunction isMarkupContent(thing) {\r\n return (thing &&\r\n typeof thing === 'object' &&\r\n typeof thing.kind === 'string');\r\n}\r\nfunction toMarkdownString(entry) {\r\n if (typeof entry === 'string') {\r\n return {\r\n value: entry\r\n };\r\n }\r\n if (isMarkupContent(entry)) {\r\n if (entry.kind === 'plaintext') {\r\n return {\r\n value: entry.value.replace(/[\\\\`*_{}[\\]()#+\\-.!]/g, '\\\\$&')\r\n };\r\n }\r\n return {\r\n value: entry.value\r\n };\r\n }\r\n return { value: '```' + entry.language + '\\n' + entry.value + '\\n```\\n' };\r\n}\r\nfunction toMarkedStringArray(contents) {\r\n if (!contents) {\r\n return void 0;\r\n }\r\n if (Array.isArray(contents)) {\r\n return contents.map(toMarkdownString);\r\n }\r\n return [toMarkdownString(contents)];\r\n}\r\n// --- hover ------\r\nvar HoverAdapter = /** @class */ (function () {\r\n function HoverAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n HoverAdapter.prototype.provideHover = function (model, position, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) {\r\n return worker.doHover(resource.toString(), fromPosition(position));\r\n })\r\n .then(function (info) {\r\n if (!info) {\r\n return;\r\n }\r\n return {\r\n range: toRange(info.range),\r\n contents: toMarkedStringArray(info.contents)\r\n };\r\n });\r\n };\r\n return HoverAdapter;\r\n}());\r\n\r\n// --- definition ------\r\nfunction toLocation(location) {\r\n return {\r\n uri: _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.Uri.parse(location.uri),\r\n range: toRange(location.range)\r\n };\r\n}\r\n// --- document symbols ------\r\nfunction toSymbolKind(kind) {\r\n var mKind = _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.SymbolKind;\r\n switch (kind) {\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.File:\r\n return mKind.Array;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Module:\r\n return mKind.Module;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Namespace:\r\n return mKind.Namespace;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Package:\r\n return mKind.Package;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Class:\r\n return mKind.Class;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Method:\r\n return mKind.Method;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Property:\r\n return mKind.Property;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Field:\r\n return mKind.Field;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Constructor:\r\n return mKind.Constructor;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Enum:\r\n return mKind.Enum;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Interface:\r\n return mKind.Interface;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Function:\r\n return mKind.Function;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Variable:\r\n return mKind.Variable;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Constant:\r\n return mKind.Constant;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.String:\r\n return mKind.String;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Number:\r\n return mKind.Number;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Boolean:\r\n return mKind.Boolean;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.SymbolKind.Array:\r\n return mKind.Array;\r\n }\r\n return mKind.Function;\r\n}\r\nvar DocumentSymbolAdapter = /** @class */ (function () {\r\n function DocumentSymbolAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentSymbolAdapter.prototype.provideDocumentSymbols = function (model, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.findDocumentSymbols(resource.toString()); })\r\n .then(function (items) {\r\n if (!items) {\r\n return;\r\n }\r\n return items.map(function (item) { return ({\r\n name: item.name,\r\n detail: '',\r\n containerName: item.containerName,\r\n kind: toSymbolKind(item.kind),\r\n range: toRange(item.location.range),\r\n selectionRange: toRange(item.location.range),\r\n tags: []\r\n }); });\r\n });\r\n };\r\n return DocumentSymbolAdapter;\r\n}());\r\n\r\nfunction fromFormattingOptions(options) {\r\n return {\r\n tabSize: options.tabSize,\r\n insertSpaces: options.insertSpaces\r\n };\r\n}\r\nvar DocumentFormattingEditProvider = /** @class */ (function () {\r\n function DocumentFormattingEditProvider(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentFormattingEditProvider.prototype.provideDocumentFormattingEdits = function (model, options, token) {\r\n var resource = model.uri;\r\n return this._worker(resource).then(function (worker) {\r\n return worker\r\n .format(resource.toString(), null, fromFormattingOptions(options))\r\n .then(function (edits) {\r\n if (!edits || edits.length === 0) {\r\n return;\r\n }\r\n return edits.map(toTextEdit);\r\n });\r\n });\r\n };\r\n return DocumentFormattingEditProvider;\r\n}());\r\n\r\nvar DocumentRangeFormattingEditProvider = /** @class */ (function () {\r\n function DocumentRangeFormattingEditProvider(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentRangeFormattingEditProvider.prototype.provideDocumentRangeFormattingEdits = function (model, range, options, token) {\r\n var resource = model.uri;\r\n return this._worker(resource).then(function (worker) {\r\n return worker\r\n .format(resource.toString(), fromRange(range), fromFormattingOptions(options))\r\n .then(function (edits) {\r\n if (!edits || edits.length === 0) {\r\n return;\r\n }\r\n return edits.map(toTextEdit);\r\n });\r\n });\r\n };\r\n return DocumentRangeFormattingEditProvider;\r\n}());\r\n\r\nvar DocumentColorAdapter = /** @class */ (function () {\r\n function DocumentColorAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n DocumentColorAdapter.prototype.provideDocumentColors = function (model, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.findDocumentColors(resource.toString()); })\r\n .then(function (infos) {\r\n if (!infos) {\r\n return;\r\n }\r\n return infos.map(function (item) { return ({\r\n color: item.color,\r\n range: toRange(item.range)\r\n }); });\r\n });\r\n };\r\n DocumentColorAdapter.prototype.provideColorPresentations = function (model, info, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) {\r\n return worker.getColorPresentations(resource.toString(), info.color, fromRange(info.range));\r\n })\r\n .then(function (presentations) {\r\n if (!presentations) {\r\n return;\r\n }\r\n return presentations.map(function (presentation) {\r\n var item = {\r\n label: presentation.label\r\n };\r\n if (presentation.textEdit) {\r\n item.textEdit = toTextEdit(presentation.textEdit);\r\n }\r\n if (presentation.additionalTextEdits) {\r\n item.additionalTextEdits = presentation.additionalTextEdits.map(toTextEdit);\r\n }\r\n return item;\r\n });\r\n });\r\n };\r\n return DocumentColorAdapter;\r\n}());\r\n\r\nvar FoldingRangeAdapter = /** @class */ (function () {\r\n function FoldingRangeAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n FoldingRangeAdapter.prototype.provideFoldingRanges = function (model, context, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.getFoldingRanges(resource.toString(), context); })\r\n .then(function (ranges) {\r\n if (!ranges) {\r\n return;\r\n }\r\n return ranges.map(function (range) {\r\n var result = {\r\n start: range.startLine + 1,\r\n end: range.endLine + 1\r\n };\r\n if (typeof range.kind !== 'undefined') {\r\n result.kind = toFoldingRangeKind(range.kind);\r\n }\r\n return result;\r\n });\r\n });\r\n };\r\n return FoldingRangeAdapter;\r\n}());\r\n\r\nfunction toFoldingRangeKind(kind) {\r\n switch (kind) {\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.FoldingRangeKind.Comment:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.FoldingRangeKind.Comment;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.FoldingRangeKind.Imports:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.FoldingRangeKind.Imports;\r\n case _deps_vscode_json_languageservice_jsonLanguageService_js__WEBPACK_IMPORTED_MODULE_1__.FoldingRangeKind.Region:\r\n return _fillers_monaco_editor_core_js__WEBPACK_IMPORTED_MODULE_0__.languages.FoldingRangeKind.Region;\r\n }\r\n return void 0;\r\n}\r\nvar SelectionRangeAdapter = /** @class */ (function () {\r\n function SelectionRangeAdapter(_worker) {\r\n this._worker = _worker;\r\n }\r\n SelectionRangeAdapter.prototype.provideSelectionRanges = function (model, positions, token) {\r\n var resource = model.uri;\r\n return this._worker(resource)\r\n .then(function (worker) { return worker.getSelectionRanges(resource.toString(), positions.map(fromPosition)); })\r\n .then(function (selectionRanges) {\r\n if (!selectionRanges) {\r\n return;\r\n }\r\n return selectionRanges.map(function (selectionRange) {\r\n var result = [];\r\n while (selectionRange) {\r\n result.push({ range: toRange(selectionRange.range) });\r\n selectionRange = selectionRange.parent;\r\n }\r\n return result;\r\n });\r\n });\r\n };\r\n return SelectionRangeAdapter;\r\n}());\r\n\r\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/languageFeatures.js?");
289
289
 
290
290
  /***/ }),
291
291
 
@@ -295,7 +295,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
295
295
  \*************************************************************************/
296
296
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
297
297
 
298
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"createTokenizationSupport\": () => (/* binding */ createTokenizationSupport),\n/* harmony export */ \"TOKEN_DELIM_OBJECT\": () => (/* binding */ TOKEN_DELIM_OBJECT),\n/* harmony export */ \"TOKEN_DELIM_ARRAY\": () => (/* binding */ TOKEN_DELIM_ARRAY),\n/* harmony export */ \"TOKEN_DELIM_COLON\": () => (/* binding */ TOKEN_DELIM_COLON),\n/* harmony export */ \"TOKEN_DELIM_COMMA\": () => (/* binding */ TOKEN_DELIM_COMMA),\n/* harmony export */ \"TOKEN_VALUE_BOOLEAN\": () => (/* binding */ TOKEN_VALUE_BOOLEAN),\n/* harmony export */ \"TOKEN_VALUE_NULL\": () => (/* binding */ TOKEN_VALUE_NULL),\n/* harmony export */ \"TOKEN_VALUE_STRING\": () => (/* binding */ TOKEN_VALUE_STRING),\n/* harmony export */ \"TOKEN_VALUE_NUMBER\": () => (/* binding */ TOKEN_VALUE_NUMBER),\n/* harmony export */ \"TOKEN_PROPERTY_NAME\": () => (/* binding */ TOKEN_PROPERTY_NAME),\n/* harmony export */ \"TOKEN_COMMENT_BLOCK\": () => (/* binding */ TOKEN_COMMENT_BLOCK),\n/* harmony export */ \"TOKEN_COMMENT_LINE\": () => (/* binding */ TOKEN_COMMENT_LINE)\n/* harmony export */ });\n/* harmony import */ var _deps_jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_deps/jsonc-parser/main.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/main.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nfunction createTokenizationSupport(supportComments) {\r\n return {\r\n getInitialState: function () { return new JSONState(null, null, false, null); },\r\n tokenize: function (line, state, offsetDelta, stopAtOffset) {\r\n return tokenize(supportComments, line, state, offsetDelta, stopAtOffset);\r\n }\r\n };\r\n}\r\nvar TOKEN_DELIM_OBJECT = 'delimiter.bracket.json';\r\nvar TOKEN_DELIM_ARRAY = 'delimiter.array.json';\r\nvar TOKEN_DELIM_COLON = 'delimiter.colon.json';\r\nvar TOKEN_DELIM_COMMA = 'delimiter.comma.json';\r\nvar TOKEN_VALUE_BOOLEAN = 'keyword.json';\r\nvar TOKEN_VALUE_NULL = 'keyword.json';\r\nvar TOKEN_VALUE_STRING = 'string.value.json';\r\nvar TOKEN_VALUE_NUMBER = 'number.json';\r\nvar TOKEN_PROPERTY_NAME = 'string.key.json';\r\nvar TOKEN_COMMENT_BLOCK = 'comment.block.json';\r\nvar TOKEN_COMMENT_LINE = 'comment.line.json';\r\nvar ParentsStack = /** @class */ (function () {\r\n function ParentsStack(parent, type) {\r\n this.parent = parent;\r\n this.type = type;\r\n }\r\n ParentsStack.pop = function (parents) {\r\n if (parents) {\r\n return parents.parent;\r\n }\r\n return null;\r\n };\r\n ParentsStack.push = function (parents, type) {\r\n return new ParentsStack(parents, type);\r\n };\r\n ParentsStack.equals = function (a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n if (!a || !b) {\r\n return false;\r\n }\r\n while (a && b) {\r\n if (a === b) {\r\n return true;\r\n }\r\n if (a.type !== b.type) {\r\n return false;\r\n }\r\n a = a.parent;\r\n b = b.parent;\r\n }\r\n return true;\r\n };\r\n return ParentsStack;\r\n}());\r\nvar JSONState = /** @class */ (function () {\r\n function JSONState(state, scanError, lastWasColon, parents) {\r\n this._state = state;\r\n this.scanError = scanError;\r\n this.lastWasColon = lastWasColon;\r\n this.parents = parents;\r\n }\r\n JSONState.prototype.clone = function () {\r\n return new JSONState(this._state, this.scanError, this.lastWasColon, this.parents);\r\n };\r\n JSONState.prototype.equals = function (other) {\r\n if (other === this) {\r\n return true;\r\n }\r\n if (!other || !(other instanceof JSONState)) {\r\n return false;\r\n }\r\n return (this.scanError === other.scanError &&\r\n this.lastWasColon === other.lastWasColon &&\r\n ParentsStack.equals(this.parents, other.parents));\r\n };\r\n JSONState.prototype.getStateData = function () {\r\n return this._state;\r\n };\r\n JSONState.prototype.setStateData = function (state) {\r\n this._state = state;\r\n };\r\n return JSONState;\r\n}());\r\nfunction tokenize(comments, line, state, offsetDelta, stopAtOffset) {\r\n if (offsetDelta === void 0) { offsetDelta = 0; }\r\n // handle multiline strings and block comments\r\n var numberOfInsertedCharacters = 0;\r\n var adjustOffset = false;\r\n switch (state.scanError) {\r\n case 2 /* UnexpectedEndOfString */:\r\n line = '\"' + line;\r\n numberOfInsertedCharacters = 1;\r\n break;\r\n case 1 /* UnexpectedEndOfComment */:\r\n line = '/*' + line;\r\n numberOfInsertedCharacters = 2;\r\n break;\r\n }\r\n var scanner = _deps_jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.createScanner(line);\r\n var lastWasColon = state.lastWasColon;\r\n var parents = state.parents;\r\n var ret = {\r\n tokens: [],\r\n endState: state.clone()\r\n };\r\n while (true) {\r\n var offset = offsetDelta + scanner.getPosition();\r\n var type = '';\r\n var kind = scanner.scan();\r\n if (kind === 17 /* EOF */) {\r\n break;\r\n }\r\n // Check that the scanner has advanced\r\n if (offset === offsetDelta + scanner.getPosition()) {\r\n throw new Error('Scanner did not advance, next 3 characters are: ' + line.substr(scanner.getPosition(), 3));\r\n }\r\n // In case we inserted /* or \" character, we need to\r\n // adjust the offset of all tokens (except the first)\r\n if (adjustOffset) {\r\n offset -= numberOfInsertedCharacters;\r\n }\r\n adjustOffset = numberOfInsertedCharacters > 0;\r\n // brackets and type\r\n switch (kind) {\r\n case 1 /* OpenBraceToken */:\r\n parents = ParentsStack.push(parents, 0 /* Object */);\r\n type = TOKEN_DELIM_OBJECT;\r\n lastWasColon = false;\r\n break;\r\n case 2 /* CloseBraceToken */:\r\n parents = ParentsStack.pop(parents);\r\n type = TOKEN_DELIM_OBJECT;\r\n lastWasColon = false;\r\n break;\r\n case 3 /* OpenBracketToken */:\r\n parents = ParentsStack.push(parents, 1 /* Array */);\r\n type = TOKEN_DELIM_ARRAY;\r\n lastWasColon = false;\r\n break;\r\n case 4 /* CloseBracketToken */:\r\n parents = ParentsStack.pop(parents);\r\n type = TOKEN_DELIM_ARRAY;\r\n lastWasColon = false;\r\n break;\r\n case 6 /* ColonToken */:\r\n type = TOKEN_DELIM_COLON;\r\n lastWasColon = true;\r\n break;\r\n case 5 /* CommaToken */:\r\n type = TOKEN_DELIM_COMMA;\r\n lastWasColon = false;\r\n break;\r\n case 8 /* TrueKeyword */:\r\n case 9 /* FalseKeyword */:\r\n type = TOKEN_VALUE_BOOLEAN;\r\n lastWasColon = false;\r\n break;\r\n case 7 /* NullKeyword */:\r\n type = TOKEN_VALUE_NULL;\r\n lastWasColon = false;\r\n break;\r\n case 10 /* StringLiteral */:\r\n var currentParent = parents ? parents.type : 0 /* Object */;\r\n var inArray = currentParent === 1 /* Array */;\r\n type =\r\n lastWasColon || inArray ? TOKEN_VALUE_STRING : TOKEN_PROPERTY_NAME;\r\n lastWasColon = false;\r\n break;\r\n case 11 /* NumericLiteral */:\r\n type = TOKEN_VALUE_NUMBER;\r\n lastWasColon = false;\r\n break;\r\n }\r\n // comments, iff enabled\r\n if (comments) {\r\n switch (kind) {\r\n case 12 /* LineCommentTrivia */:\r\n type = TOKEN_COMMENT_LINE;\r\n break;\r\n case 13 /* BlockCommentTrivia */:\r\n type = TOKEN_COMMENT_BLOCK;\r\n break;\r\n }\r\n }\r\n ret.endState = new JSONState(state.getStateData(), scanner.getTokenError(), lastWasColon, parents);\r\n ret.tokens.push({\r\n startIndex: offset,\r\n scopes: type\r\n });\r\n }\r\n return ret;\r\n}\r\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/tokenization.js?");
298
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"TOKEN_COMMENT_BLOCK\": () => (/* binding */ TOKEN_COMMENT_BLOCK),\n/* harmony export */ \"TOKEN_COMMENT_LINE\": () => (/* binding */ TOKEN_COMMENT_LINE),\n/* harmony export */ \"TOKEN_DELIM_ARRAY\": () => (/* binding */ TOKEN_DELIM_ARRAY),\n/* harmony export */ \"TOKEN_DELIM_COLON\": () => (/* binding */ TOKEN_DELIM_COLON),\n/* harmony export */ \"TOKEN_DELIM_COMMA\": () => (/* binding */ TOKEN_DELIM_COMMA),\n/* harmony export */ \"TOKEN_DELIM_OBJECT\": () => (/* binding */ TOKEN_DELIM_OBJECT),\n/* harmony export */ \"TOKEN_PROPERTY_NAME\": () => (/* binding */ TOKEN_PROPERTY_NAME),\n/* harmony export */ \"TOKEN_VALUE_BOOLEAN\": () => (/* binding */ TOKEN_VALUE_BOOLEAN),\n/* harmony export */ \"TOKEN_VALUE_NULL\": () => (/* binding */ TOKEN_VALUE_NULL),\n/* harmony export */ \"TOKEN_VALUE_NUMBER\": () => (/* binding */ TOKEN_VALUE_NUMBER),\n/* harmony export */ \"TOKEN_VALUE_STRING\": () => (/* binding */ TOKEN_VALUE_STRING),\n/* harmony export */ \"createTokenizationSupport\": () => (/* binding */ createTokenizationSupport)\n/* harmony export */ });\n/* harmony import */ var _deps_jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_deps/jsonc-parser/main.js */ \"./node_modules/monaco-editor/esm/vs/language/json/_deps/jsonc-parser/main.js\");\n/*---------------------------------------------------------------------------------------------\r\n * Copyright (c) Microsoft Corporation. All rights reserved.\r\n * Licensed under the MIT License. See License.txt in the project root for license information.\r\n *--------------------------------------------------------------------------------------------*/\r\n\r\nfunction createTokenizationSupport(supportComments) {\r\n return {\r\n getInitialState: function () { return new JSONState(null, null, false, null); },\r\n tokenize: function (line, state, offsetDelta, stopAtOffset) {\r\n return tokenize(supportComments, line, state, offsetDelta, stopAtOffset);\r\n }\r\n };\r\n}\r\nvar TOKEN_DELIM_OBJECT = 'delimiter.bracket.json';\r\nvar TOKEN_DELIM_ARRAY = 'delimiter.array.json';\r\nvar TOKEN_DELIM_COLON = 'delimiter.colon.json';\r\nvar TOKEN_DELIM_COMMA = 'delimiter.comma.json';\r\nvar TOKEN_VALUE_BOOLEAN = 'keyword.json';\r\nvar TOKEN_VALUE_NULL = 'keyword.json';\r\nvar TOKEN_VALUE_STRING = 'string.value.json';\r\nvar TOKEN_VALUE_NUMBER = 'number.json';\r\nvar TOKEN_PROPERTY_NAME = 'string.key.json';\r\nvar TOKEN_COMMENT_BLOCK = 'comment.block.json';\r\nvar TOKEN_COMMENT_LINE = 'comment.line.json';\r\nvar ParentsStack = /** @class */ (function () {\r\n function ParentsStack(parent, type) {\r\n this.parent = parent;\r\n this.type = type;\r\n }\r\n ParentsStack.pop = function (parents) {\r\n if (parents) {\r\n return parents.parent;\r\n }\r\n return null;\r\n };\r\n ParentsStack.push = function (parents, type) {\r\n return new ParentsStack(parents, type);\r\n };\r\n ParentsStack.equals = function (a, b) {\r\n if (!a && !b) {\r\n return true;\r\n }\r\n if (!a || !b) {\r\n return false;\r\n }\r\n while (a && b) {\r\n if (a === b) {\r\n return true;\r\n }\r\n if (a.type !== b.type) {\r\n return false;\r\n }\r\n a = a.parent;\r\n b = b.parent;\r\n }\r\n return true;\r\n };\r\n return ParentsStack;\r\n}());\r\nvar JSONState = /** @class */ (function () {\r\n function JSONState(state, scanError, lastWasColon, parents) {\r\n this._state = state;\r\n this.scanError = scanError;\r\n this.lastWasColon = lastWasColon;\r\n this.parents = parents;\r\n }\r\n JSONState.prototype.clone = function () {\r\n return new JSONState(this._state, this.scanError, this.lastWasColon, this.parents);\r\n };\r\n JSONState.prototype.equals = function (other) {\r\n if (other === this) {\r\n return true;\r\n }\r\n if (!other || !(other instanceof JSONState)) {\r\n return false;\r\n }\r\n return (this.scanError === other.scanError &&\r\n this.lastWasColon === other.lastWasColon &&\r\n ParentsStack.equals(this.parents, other.parents));\r\n };\r\n JSONState.prototype.getStateData = function () {\r\n return this._state;\r\n };\r\n JSONState.prototype.setStateData = function (state) {\r\n this._state = state;\r\n };\r\n return JSONState;\r\n}());\r\nfunction tokenize(comments, line, state, offsetDelta, stopAtOffset) {\r\n if (offsetDelta === void 0) { offsetDelta = 0; }\r\n // handle multiline strings and block comments\r\n var numberOfInsertedCharacters = 0;\r\n var adjustOffset = false;\r\n switch (state.scanError) {\r\n case 2 /* UnexpectedEndOfString */:\r\n line = '\"' + line;\r\n numberOfInsertedCharacters = 1;\r\n break;\r\n case 1 /* UnexpectedEndOfComment */:\r\n line = '/*' + line;\r\n numberOfInsertedCharacters = 2;\r\n break;\r\n }\r\n var scanner = _deps_jsonc_parser_main_js__WEBPACK_IMPORTED_MODULE_0__.createScanner(line);\r\n var lastWasColon = state.lastWasColon;\r\n var parents = state.parents;\r\n var ret = {\r\n tokens: [],\r\n endState: state.clone()\r\n };\r\n while (true) {\r\n var offset = offsetDelta + scanner.getPosition();\r\n var type = '';\r\n var kind = scanner.scan();\r\n if (kind === 17 /* EOF */) {\r\n break;\r\n }\r\n // Check that the scanner has advanced\r\n if (offset === offsetDelta + scanner.getPosition()) {\r\n throw new Error('Scanner did not advance, next 3 characters are: ' + line.substr(scanner.getPosition(), 3));\r\n }\r\n // In case we inserted /* or \" character, we need to\r\n // adjust the offset of all tokens (except the first)\r\n if (adjustOffset) {\r\n offset -= numberOfInsertedCharacters;\r\n }\r\n adjustOffset = numberOfInsertedCharacters > 0;\r\n // brackets and type\r\n switch (kind) {\r\n case 1 /* OpenBraceToken */:\r\n parents = ParentsStack.push(parents, 0 /* Object */);\r\n type = TOKEN_DELIM_OBJECT;\r\n lastWasColon = false;\r\n break;\r\n case 2 /* CloseBraceToken */:\r\n parents = ParentsStack.pop(parents);\r\n type = TOKEN_DELIM_OBJECT;\r\n lastWasColon = false;\r\n break;\r\n case 3 /* OpenBracketToken */:\r\n parents = ParentsStack.push(parents, 1 /* Array */);\r\n type = TOKEN_DELIM_ARRAY;\r\n lastWasColon = false;\r\n break;\r\n case 4 /* CloseBracketToken */:\r\n parents = ParentsStack.pop(parents);\r\n type = TOKEN_DELIM_ARRAY;\r\n lastWasColon = false;\r\n break;\r\n case 6 /* ColonToken */:\r\n type = TOKEN_DELIM_COLON;\r\n lastWasColon = true;\r\n break;\r\n case 5 /* CommaToken */:\r\n type = TOKEN_DELIM_COMMA;\r\n lastWasColon = false;\r\n break;\r\n case 8 /* TrueKeyword */:\r\n case 9 /* FalseKeyword */:\r\n type = TOKEN_VALUE_BOOLEAN;\r\n lastWasColon = false;\r\n break;\r\n case 7 /* NullKeyword */:\r\n type = TOKEN_VALUE_NULL;\r\n lastWasColon = false;\r\n break;\r\n case 10 /* StringLiteral */:\r\n var currentParent = parents ? parents.type : 0 /* Object */;\r\n var inArray = currentParent === 1 /* Array */;\r\n type =\r\n lastWasColon || inArray ? TOKEN_VALUE_STRING : TOKEN_PROPERTY_NAME;\r\n lastWasColon = false;\r\n break;\r\n case 11 /* NumericLiteral */:\r\n type = TOKEN_VALUE_NUMBER;\r\n lastWasColon = false;\r\n break;\r\n }\r\n // comments, iff enabled\r\n if (comments) {\r\n switch (kind) {\r\n case 12 /* LineCommentTrivia */:\r\n type = TOKEN_COMMENT_LINE;\r\n break;\r\n case 13 /* BlockCommentTrivia */:\r\n type = TOKEN_COMMENT_BLOCK;\r\n break;\r\n }\r\n }\r\n ret.endState = new JSONState(state.getStateData(), scanner.getTokenError(), lastWasColon, parents);\r\n ret.tokens.push({\r\n startIndex: offset,\r\n scopes: type\r\n });\r\n }\r\n return ret;\r\n}\r\n\n\n//# sourceURL=webpack://open-lens/./node_modules/monaco-editor/esm/vs/language/json/tokenization.js?");
299
299
 
300
300
  /***/ }),
301
301