comfyui-frontend-package 1.10.16__py3-none-any.whl → 1.11.6__py3-none-any.whl
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.
- comfyui_frontend_package/static/assets/BaseViewTemplate--LOH-rtG.js +51 -0
- comfyui_frontend_package/static/assets/BaseViewTemplate--LOH-rtG.js.map +1 -0
- comfyui_frontend_package/static/assets/CREDIT.txt +1 -0
- comfyui_frontend_package/static/assets/DesktopStartView-DhFg_-WV.js +19 -0
- comfyui_frontend_package/static/assets/DesktopStartView-DhFg_-WV.js.map +1 -0
- comfyui_frontend_package/static/assets/DesktopUpdateView-B2ahA--K.js +59 -0
- comfyui_frontend_package/static/assets/DesktopUpdateView-B2ahA--K.js.map +1 -0
- comfyui_frontend_package/static/assets/DesktopUpdateView-CoZUcBzh.css +20 -0
- comfyui_frontend_package/static/assets/DownloadGitView-C11P67fb.js +58 -0
- comfyui_frontend_package/static/assets/DownloadGitView-C11P67fb.js.map +1 -0
- comfyui_frontend_package/static/assets/ExtensionPanel-CXFlxUSQ.js +182 -0
- comfyui_frontend_package/static/assets/ExtensionPanel-CXFlxUSQ.js.map +1 -0
- comfyui_frontend_package/static/assets/GraphView-BK1pQvbk.js +5362 -0
- comfyui_frontend_package/static/assets/GraphView-BK1pQvbk.js.map +1 -0
- comfyui_frontend_package/static/assets/GraphView-D3oOJ76s.css +404 -0
- comfyui_frontend_package/static/assets/InstallView-1bbt62og.js +971 -0
- comfyui_frontend_package/static/assets/InstallView-1bbt62og.js.map +1 -0
- comfyui_frontend_package/static/assets/InstallView-B5n3tAa3.css +81 -0
- comfyui_frontend_package/static/assets/KeybindingPanel-BxEJxxOC.js +292 -0
- comfyui_frontend_package/static/assets/KeybindingPanel-BxEJxxOC.js.map +1 -0
- comfyui_frontend_package/static/assets/KeybindingPanel-CwPLIgAf.css +8 -0
- comfyui_frontend_package/static/assets/MaintenanceView-Cu_e206A.css +87 -0
- comfyui_frontend_package/static/assets/MaintenanceView-D4JI2WFp.js +770 -0
- comfyui_frontend_package/static/assets/MaintenanceView-D4JI2WFp.js.map +1 -0
- comfyui_frontend_package/static/assets/ManualConfigurationView-Cq3hPfap.css +7 -0
- comfyui_frontend_package/static/assets/ManualConfigurationView-DK79zT46.js +74 -0
- comfyui_frontend_package/static/assets/ManualConfigurationView-DK79zT46.js.map +1 -0
- comfyui_frontend_package/static/assets/MetricsConsentView-BiHGP4XO.js +86 -0
- comfyui_frontend_package/static/assets/MetricsConsentView-BiHGP4XO.js.map +1 -0
- comfyui_frontend_package/static/assets/NotSupportedView-BiyVuLfX.css +19 -0
- comfyui_frontend_package/static/assets/NotSupportedView-CaASlgg3.js +86 -0
- comfyui_frontend_package/static/assets/NotSupportedView-CaASlgg3.js.map +1 -0
- comfyui_frontend_package/static/assets/ServerConfigPanel-DvcXNRqp.js +156 -0
- comfyui_frontend_package/static/assets/ServerConfigPanel-DvcXNRqp.js.map +1 -0
- comfyui_frontend_package/static/assets/ServerStartView-BLlSvhJ0.css +5 -0
- comfyui_frontend_package/static/assets/ServerStartView-Cnfs01qI.js +100 -0
- comfyui_frontend_package/static/assets/ServerStartView-Cnfs01qI.js.map +1 -0
- comfyui_frontend_package/static/assets/TerminalOutputDrawer-BIo0jnWo.js +676 -0
- comfyui_frontend_package/static/assets/TerminalOutputDrawer-BIo0jnWo.js.map +1 -0
- comfyui_frontend_package/static/assets/UserSelectView-BTlXdLHz.js +101 -0
- comfyui_frontend_package/static/assets/UserSelectView-BTlXdLHz.js.map +1 -0
- comfyui_frontend_package/static/assets/WelcomeView-CmbTXsg3.js +39 -0
- comfyui_frontend_package/static/assets/WelcomeView-CmbTXsg3.js.map +1 -0
- comfyui_frontend_package/static/assets/WelcomeView-aCH40CSK.css +36 -0
- comfyui_frontend_package/static/assets/images/Git-Logo-White.svg +1 -0
- comfyui_frontend_package/static/assets/images/apple-mps-logo.png +0 -0
- comfyui_frontend_package/static/assets/images/manual-configuration.svg +5 -0
- comfyui_frontend_package/static/assets/images/nvidia-logo.svg +6 -0
- comfyui_frontend_package/static/assets/images/sad_girl.png +0 -0
- comfyui_frontend_package/static/assets/index-AvZodD-Y.js +618 -0
- comfyui_frontend_package/static/assets/index-AvZodD-Y.js.map +1 -0
- comfyui_frontend_package/static/assets/index-B3IfdwoO.css +166 -0
- comfyui_frontend_package/static/assets/index-BbmkkEvb.js +27 -0
- comfyui_frontend_package/static/assets/index-BbmkkEvb.js.map +1 -0
- comfyui_frontend_package/static/assets/index-Bdy4Ebj5.js +539 -0
- comfyui_frontend_package/static/assets/index-Bdy4Ebj5.js.map +1 -0
- comfyui_frontend_package/static/assets/index-BsBSowr8.js +55812 -0
- comfyui_frontend_package/static/assets/index-BsBSowr8.js.map +1 -0
- comfyui_frontend_package/static/assets/index-C4MmAha5.js +225173 -0
- comfyui_frontend_package/static/assets/index-C4MmAha5.js.map +1 -0
- comfyui_frontend_package/static/assets/index-CDFcdZLR.js +4993 -0
- comfyui_frontend_package/static/assets/index-CDFcdZLR.js.map +1 -0
- comfyui_frontend_package/static/assets/index-CfhNTyds.js +8790 -0
- comfyui_frontend_package/static/assets/index-CfhNTyds.js.map +1 -0
- comfyui_frontend_package/static/assets/index-DIKvkpu7.js +24875 -0
- comfyui_frontend_package/static/assets/index-DIKvkpu7.js.map +1 -0
- comfyui_frontend_package/static/assets/index-memhI4xy.js +392 -0
- comfyui_frontend_package/static/assets/index-memhI4xy.js.map +1 -0
- comfyui_frontend_package/static/assets/index-vE6pZhFv.css +4989 -0
- comfyui_frontend_package/static/assets/keybindingService-CjdvrYgE.js +250 -0
- comfyui_frontend_package/static/assets/keybindingService-CjdvrYgE.js.map +1 -0
- comfyui_frontend_package/static/assets/primeicons-C6QP2o4f.woff2 +0 -0
- comfyui_frontend_package/static/assets/primeicons-DMOk5skT.eot +0 -0
- comfyui_frontend_package/static/assets/primeicons-Dr5RGzOO.svg +345 -0
- comfyui_frontend_package/static/assets/primeicons-MpK4pl85.ttf +0 -0
- comfyui_frontend_package/static/assets/primeicons-WjwUDZjB.woff +0 -0
- comfyui_frontend_package/static/assets/serverConfigStore-YaL-KzUL.js +90 -0
- comfyui_frontend_package/static/assets/serverConfigStore-YaL-KzUL.js.map +1 -0
- comfyui_frontend_package/static/assets/sorted-custom-node-map.json +2602 -0
- comfyui_frontend_package/static/assets/uvMirrors-B-HKMf6X.js +16 -0
- comfyui_frontend_package/static/assets/uvMirrors-B-HKMf6X.js.map +1 -0
- comfyui_frontend_package/static/cursor/colorSelect.png +0 -0
- comfyui_frontend_package/static/cursor/paintBucket.png +0 -0
- comfyui_frontend_package/static/extensions/core/clipspace.js +2 -0
- comfyui_frontend_package/static/extensions/core/groupNode.js +3 -0
- comfyui_frontend_package/static/extensions/core/groupNodeManage.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/AnimationManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/CameraManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/ControlsManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/EventManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/LightingManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/LoaderManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/ModelManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/NodeStorage.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/PreviewManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/SceneManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/load3d/ViewHelperManager.js +2 -0
- comfyui_frontend_package/static/extensions/core/maskEditorOld.js +2 -0
- comfyui_frontend_package/static/extensions/core/widgetInputs.js +6 -0
- comfyui_frontend_package/static/fonts/materialdesignicons-webfont.woff2 +0 -0
- comfyui_frontend_package/static/index.html +15 -0
- comfyui_frontend_package/static/materialdesignicons.min.css +3 -0
- comfyui_frontend_package/static/scripts/api.js +3 -0
- comfyui_frontend_package/static/scripts/app.js +4 -0
- comfyui_frontend_package/static/scripts/changeTracker.js +2 -0
- comfyui_frontend_package/static/scripts/defaultGraph.js +4 -0
- comfyui_frontend_package/static/scripts/domWidget.js +2 -0
- comfyui_frontend_package/static/scripts/metadata/ebml.js +2 -0
- comfyui_frontend_package/static/scripts/metadata/flac.js +3 -0
- comfyui_frontend_package/static/scripts/metadata/png.js +3 -0
- comfyui_frontend_package/static/scripts/pnginfo.js +6 -0
- comfyui_frontend_package/static/scripts/ui/components/asyncDialog.js +2 -0
- comfyui_frontend_package/static/scripts/ui/components/button.js +2 -0
- comfyui_frontend_package/static/scripts/ui/components/buttonGroup.js +2 -0
- comfyui_frontend_package/static/scripts/ui/components/popup.js +2 -0
- comfyui_frontend_package/static/scripts/ui/components/splitButton.js +2 -0
- comfyui_frontend_package/static/scripts/ui/dialog.js +2 -0
- comfyui_frontend_package/static/scripts/ui/draggableList.js +2 -0
- comfyui_frontend_package/static/scripts/ui/imagePreview.js +3 -0
- comfyui_frontend_package/static/scripts/ui/menu/index.js +2 -0
- comfyui_frontend_package/static/scripts/ui/settings.js +2 -0
- comfyui_frontend_package/static/scripts/ui/toggleSwitch.js +2 -0
- comfyui_frontend_package/static/scripts/ui/utils.js +3 -0
- comfyui_frontend_package/static/scripts/ui.js +4 -0
- comfyui_frontend_package/static/scripts/utils.js +9 -0
- comfyui_frontend_package/static/scripts/widgets.js +6 -0
- comfyui_frontend_package/static/templates/2_pass_pose_worship-1.webp +0 -0
- comfyui_frontend_package/static/templates/2_pass_pose_worship-2.webp +0 -0
- comfyui_frontend_package/static/templates/2_pass_pose_worship.json +673 -0
- comfyui_frontend_package/static/templates/area_composition-1.webp +0 -0
- comfyui_frontend_package/static/templates/area_composition.json +966 -0
- comfyui_frontend_package/static/templates/area_composition_reversed-1.webp +0 -0
- comfyui_frontend_package/static/templates/area_composition_reversed.json +967 -0
- comfyui_frontend_package/static/templates/area_composition_square_area_for_subject-1.webp +0 -0
- comfyui_frontend_package/static/templates/area_composition_square_area_for_subject.json +620 -0
- comfyui_frontend_package/static/templates/controlnet_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/controlnet_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/controlnet_example.json +385 -0
- comfyui_frontend_package/static/templates/default-1.webp +0 -0
- comfyui_frontend_package/static/templates/default.json +373 -0
- comfyui_frontend_package/static/templates/depth_controlnet-1.webp +0 -0
- comfyui_frontend_package/static/templates/depth_controlnet-2.webp +0 -0
- comfyui_frontend_package/static/templates/depth_controlnet.json +378 -0
- comfyui_frontend_package/static/templates/depth_t2i_adapter-1.webp +0 -0
- comfyui_frontend_package/static/templates/depth_t2i_adapter-2.webp +0 -0
- comfyui_frontend_package/static/templates/depth_t2i_adapter.json +371 -0
- comfyui_frontend_package/static/templates/embedding_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/embedding_example.json +267 -0
- comfyui_frontend_package/static/templates/esrgan_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/esrgan_example.json +329 -0
- comfyui_frontend_package/static/templates/flux_canny_model_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_canny_model_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/flux_canny_model_example.json +474 -0
- comfyui_frontend_package/static/templates/flux_depth_lora_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_depth_lora_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/flux_depth_lora_example.json +454 -0
- comfyui_frontend_package/static/templates/flux_dev_checkpoint_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_dev_checkpoint_example.json +332 -0
- comfyui_frontend_package/static/templates/flux_dev_example.json +771 -0
- comfyui_frontend_package/static/templates/flux_fill_inpaint_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_fill_inpaint_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/flux_fill_inpaint_example.json +458 -0
- comfyui_frontend_package/static/templates/flux_fill_outpaint_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_fill_outpaint_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/flux_fill_outpaint_example.json +491 -0
- comfyui_frontend_package/static/templates/flux_redux_model_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_redux_model_example.json +951 -0
- comfyui_frontend_package/static/templates/flux_schnell-1.webp +0 -0
- comfyui_frontend_package/static/templates/flux_schnell.json +302 -0
- comfyui_frontend_package/static/templates/gligen_textbox_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/gligen_textbox_example.json +376 -0
- comfyui_frontend_package/static/templates/hiresfix_esrgan_workflow-1.webp +0 -0
- comfyui_frontend_package/static/templates/hiresfix_esrgan_workflow.json +607 -0
- comfyui_frontend_package/static/templates/hiresfix_latent_workflow-1.webp +0 -0
- comfyui_frontend_package/static/templates/hiresfix_latent_workflow.json +442 -0
- comfyui_frontend_package/static/templates/hunyuan_video_text_to_video-1.webp +0 -0
- comfyui_frontend_package/static/templates/hunyuan_video_text_to_video.json +553 -0
- comfyui_frontend_package/static/templates/image2image-1.webp +0 -0
- comfyui_frontend_package/static/templates/image2image.json +447 -0
- comfyui_frontend_package/static/templates/image_to_video-1.webp +0 -0
- comfyui_frontend_package/static/templates/image_to_video.json +314 -0
- comfyui_frontend_package/static/templates/inpain_model_outpainting-1.webp +0 -0
- comfyui_frontend_package/static/templates/inpain_model_outpainting-2.webp +0 -0
- comfyui_frontend_package/static/templates/inpain_model_outpainting.json +360 -0
- comfyui_frontend_package/static/templates/inpaint_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/inpaint_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/inpaint_example.json +323 -0
- comfyui_frontend_package/static/templates/latent_upscale_different_prompt_model-1.webp +0 -0
- comfyui_frontend_package/static/templates/latent_upscale_different_prompt_model.json +528 -0
- comfyui_frontend_package/static/templates/lora-1.webp +0 -0
- comfyui_frontend_package/static/templates/lora.json +311 -0
- comfyui_frontend_package/static/templates/lora_multiple-1.webp +0 -0
- comfyui_frontend_package/static/templates/lora_multiple.json +357 -0
- comfyui_frontend_package/static/templates/ltxv_image_to_video-1.webp +0 -0
- comfyui_frontend_package/static/templates/ltxv_image_to_video.json +482 -0
- comfyui_frontend_package/static/templates/ltxv_text_to_video-1.webp +0 -0
- comfyui_frontend_package/static/templates/ltxv_text_to_video.json +419 -0
- comfyui_frontend_package/static/templates/mixing_controlnets-1.webp +0 -0
- comfyui_frontend_package/static/templates/mixing_controlnets-2.webp +0 -0
- comfyui_frontend_package/static/templates/mixing_controlnets.json +492 -0
- comfyui_frontend_package/static/templates/mochi_text_to_video_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/mochi_text_to_video_example.json +308 -0
- comfyui_frontend_package/static/templates/sd3.5_large_blur-1.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_blur-2.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_blur.json +582 -0
- comfyui_frontend_package/static/templates/sd3.5_large_canny_controlnet_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_canny_controlnet_example-2.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_canny_controlnet_example.json +470 -0
- comfyui_frontend_package/static/templates/sd3.5_large_depth-1.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_depth-2.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_large_depth.json +713 -0
- comfyui_frontend_package/static/templates/sd3.5_simple_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/sd3.5_simple_example.json +278 -0
- comfyui_frontend_package/static/templates/sdxl_refiner_prompt_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/sdxl_refiner_prompt_example.json +728 -0
- comfyui_frontend_package/static/templates/sdxl_revision_text_prompts-1.webp +0 -0
- comfyui_frontend_package/static/templates/sdxl_revision_text_prompts.json +490 -0
- comfyui_frontend_package/static/templates/sdxl_revision_zero_positive-1.webp +0 -0
- comfyui_frontend_package/static/templates/sdxl_revision_zero_positive.json +494 -0
- comfyui_frontend_package/static/templates/sdxl_simple_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/sdxl_simple_example.json +896 -0
- comfyui_frontend_package/static/templates/sdxlturbo_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/sdxlturbo_example.json +372 -0
- comfyui_frontend_package/static/templates/stable_audio_example-1.flac +0 -0
- comfyui_frontend_package/static/templates/stable_audio_example.json +302 -0
- comfyui_frontend_package/static/templates/stable_zero123_example-1.webp +0 -0
- comfyui_frontend_package/static/templates/stable_zero123_example.json +273 -0
- comfyui_frontend_package/static/templates/txt_to_image_to_video-1.webp +0 -0
- comfyui_frontend_package/static/templates/txt_to_image_to_video.json +535 -0
- comfyui_frontend_package/static/user.css +1 -0
- {comfyui_frontend_package-1.10.16.dist-info → comfyui_frontend_package-1.11.6.dist-info}/METADATA +1 -1
- comfyui_frontend_package-1.11.6.dist-info/RECORD +235 -0
- comfyui_frontend_package-1.11.6.dist-info/top_level.txt +1 -0
- comfyui_frontend_package-1.10.16.dist-info/RECORD +0 -5
- comfyui_frontend_package-1.10.16.dist-info/top_level.txt +0 -1
- {comfyui_frontend → comfyui_frontend_package}/__init__.py +0 -0
- {comfyui_frontend_package-1.10.16.dist-info → comfyui_frontend_package-1.11.6.dist-info}/WHEEL +0 -0
@@ -0,0 +1,676 @@
|
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
3
|
+
import { bV as commonjsGlobal, bW as getDefaultExportFromCjs, H as markRaw, bX as xtermExports, p as onMounted, bU as onUnmounted, d as defineComponent, bF as mergeModels, bz as useModel, o as openBlock, y as createBlock, z as withCtx, k as createVNode, by as BaseTerminal, j as unref, bi as electronAPI } from "./index-C4MmAha5.js";
|
4
|
+
import { s as script } from "./index-memhI4xy.js";
|
5
|
+
var addonSerialize$2 = { exports: {} };
|
6
|
+
var addonSerialize = addonSerialize$2.exports;
|
7
|
+
(function(module, exports) {
|
8
|
+
!function(e, t) {
|
9
|
+
true ? module.exports = t() : false ? (void 0)([], t) : true ? exports.SerializeAddon = t() : e.SerializeAddon = t();
|
10
|
+
}(commonjsGlobal, () => (() => {
|
11
|
+
"use strict";
|
12
|
+
var e = { 930: (e2, t2, s2) => {
|
13
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.ColorContrastCache = void 0;
|
14
|
+
const r2 = s2(485);
|
15
|
+
t2.ColorContrastCache = class {
|
16
|
+
constructor() {
|
17
|
+
this._color = new r2.TwoKeyMap(), this._css = new r2.TwoKeyMap();
|
18
|
+
}
|
19
|
+
setCss(e3, t3, s3) {
|
20
|
+
this._css.set(e3, t3, s3);
|
21
|
+
}
|
22
|
+
getCss(e3, t3) {
|
23
|
+
return this._css.get(e3, t3);
|
24
|
+
}
|
25
|
+
setColor(e3, t3, s3) {
|
26
|
+
this._color.set(e3, t3, s3);
|
27
|
+
}
|
28
|
+
getColor(e3, t3) {
|
29
|
+
return this._color.get(e3, t3);
|
30
|
+
}
|
31
|
+
clear() {
|
32
|
+
this._color.clear(), this._css.clear();
|
33
|
+
}
|
34
|
+
};
|
35
|
+
}, 997: function(e2, t2, s2) {
|
36
|
+
var r2 = this && this.__decorate || function(e3, t3, s3, r3) {
|
37
|
+
var o2, i2 = arguments.length, n2 = i2 < 3 ? t3 : null === r3 ? r3 = Object.getOwnPropertyDescriptor(t3, s3) : r3;
|
38
|
+
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) n2 = Reflect.decorate(e3, t3, s3, r3);
|
39
|
+
else for (var l2 = e3.length - 1; l2 >= 0; l2--) (o2 = e3[l2]) && (n2 = (i2 < 3 ? o2(n2) : i2 > 3 ? o2(t3, s3, n2) : o2(t3, s3)) || n2);
|
40
|
+
return i2 > 3 && n2 && Object.defineProperty(t3, s3, n2), n2;
|
41
|
+
}, o = this && this.__param || function(e3, t3) {
|
42
|
+
return function(s3, r3) {
|
43
|
+
t3(s3, r3, e3);
|
44
|
+
};
|
45
|
+
};
|
46
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.ThemeService = t2.DEFAULT_ANSI_COLORS = void 0;
|
47
|
+
const i = s2(930), n = s2(160), l = s2(345), a = s2(859), c = s2(97), h = n.css.toColor("#ffffff"), u = n.css.toColor("#000000"), _ = n.css.toColor("#ffffff"), d = n.css.toColor("#000000"), C = { css: "rgba(255, 255, 255, 0.3)", rgba: 4294967117 };
|
48
|
+
t2.DEFAULT_ANSI_COLORS = Object.freeze((() => {
|
49
|
+
const e3 = [n.css.toColor("#2e3436"), n.css.toColor("#cc0000"), n.css.toColor("#4e9a06"), n.css.toColor("#c4a000"), n.css.toColor("#3465a4"), n.css.toColor("#75507b"), n.css.toColor("#06989a"), n.css.toColor("#d3d7cf"), n.css.toColor("#555753"), n.css.toColor("#ef2929"), n.css.toColor("#8ae234"), n.css.toColor("#fce94f"), n.css.toColor("#729fcf"), n.css.toColor("#ad7fa8"), n.css.toColor("#34e2e2"), n.css.toColor("#eeeeec")], t3 = [0, 95, 135, 175, 215, 255];
|
50
|
+
for (let s3 = 0; s3 < 216; s3++) {
|
51
|
+
const r3 = t3[s3 / 36 % 6 | 0], o2 = t3[s3 / 6 % 6 | 0], i2 = t3[s3 % 6];
|
52
|
+
e3.push({ css: n.channels.toCss(r3, o2, i2), rgba: n.channels.toRgba(r3, o2, i2) });
|
53
|
+
}
|
54
|
+
for (let t4 = 0; t4 < 24; t4++) {
|
55
|
+
const s3 = 8 + 10 * t4;
|
56
|
+
e3.push({ css: n.channels.toCss(s3, s3, s3), rgba: n.channels.toRgba(s3, s3, s3) });
|
57
|
+
}
|
58
|
+
return e3;
|
59
|
+
})());
|
60
|
+
let f = t2.ThemeService = class extends a.Disposable {
|
61
|
+
get colors() {
|
62
|
+
return this._colors;
|
63
|
+
}
|
64
|
+
constructor(e3) {
|
65
|
+
super(), this._optionsService = e3, this._contrastCache = new i.ColorContrastCache(), this._halfContrastCache = new i.ColorContrastCache(), this._onChangeColors = this.register(new l.EventEmitter()), this.onChangeColors = this._onChangeColors.event, this._colors = { foreground: h, background: u, cursor: _, cursorAccent: d, selectionForeground: void 0, selectionBackgroundTransparent: C, selectionBackgroundOpaque: n.color.blend(u, C), selectionInactiveBackgroundTransparent: C, selectionInactiveBackgroundOpaque: n.color.blend(u, C), ansi: t2.DEFAULT_ANSI_COLORS.slice(), contrastCache: this._contrastCache, halfContrastCache: this._halfContrastCache }, this._updateRestoreColors(), this._setTheme(this._optionsService.rawOptions.theme), this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio", () => this._contrastCache.clear())), this.register(this._optionsService.onSpecificOptionChange("theme", () => this._setTheme(this._optionsService.rawOptions.theme)));
|
66
|
+
}
|
67
|
+
_setTheme(e3 = {}) {
|
68
|
+
const s3 = this._colors;
|
69
|
+
if (s3.foreground = g(e3.foreground, h), s3.background = g(e3.background, u), s3.cursor = g(e3.cursor, _), s3.cursorAccent = g(e3.cursorAccent, d), s3.selectionBackgroundTransparent = g(e3.selectionBackground, C), s3.selectionBackgroundOpaque = n.color.blend(s3.background, s3.selectionBackgroundTransparent), s3.selectionInactiveBackgroundTransparent = g(e3.selectionInactiveBackground, s3.selectionBackgroundTransparent), s3.selectionInactiveBackgroundOpaque = n.color.blend(s3.background, s3.selectionInactiveBackgroundTransparent), s3.selectionForeground = e3.selectionForeground ? g(e3.selectionForeground, n.NULL_COLOR) : void 0, s3.selectionForeground === n.NULL_COLOR && (s3.selectionForeground = void 0), n.color.isOpaque(s3.selectionBackgroundTransparent)) {
|
70
|
+
const e4 = 0.3;
|
71
|
+
s3.selectionBackgroundTransparent = n.color.opacity(s3.selectionBackgroundTransparent, e4);
|
72
|
+
}
|
73
|
+
if (n.color.isOpaque(s3.selectionInactiveBackgroundTransparent)) {
|
74
|
+
const e4 = 0.3;
|
75
|
+
s3.selectionInactiveBackgroundTransparent = n.color.opacity(s3.selectionInactiveBackgroundTransparent, e4);
|
76
|
+
}
|
77
|
+
if (s3.ansi = t2.DEFAULT_ANSI_COLORS.slice(), s3.ansi[0] = g(e3.black, t2.DEFAULT_ANSI_COLORS[0]), s3.ansi[1] = g(e3.red, t2.DEFAULT_ANSI_COLORS[1]), s3.ansi[2] = g(e3.green, t2.DEFAULT_ANSI_COLORS[2]), s3.ansi[3] = g(e3.yellow, t2.DEFAULT_ANSI_COLORS[3]), s3.ansi[4] = g(e3.blue, t2.DEFAULT_ANSI_COLORS[4]), s3.ansi[5] = g(e3.magenta, t2.DEFAULT_ANSI_COLORS[5]), s3.ansi[6] = g(e3.cyan, t2.DEFAULT_ANSI_COLORS[6]), s3.ansi[7] = g(e3.white, t2.DEFAULT_ANSI_COLORS[7]), s3.ansi[8] = g(e3.brightBlack, t2.DEFAULT_ANSI_COLORS[8]), s3.ansi[9] = g(e3.brightRed, t2.DEFAULT_ANSI_COLORS[9]), s3.ansi[10] = g(e3.brightGreen, t2.DEFAULT_ANSI_COLORS[10]), s3.ansi[11] = g(e3.brightYellow, t2.DEFAULT_ANSI_COLORS[11]), s3.ansi[12] = g(e3.brightBlue, t2.DEFAULT_ANSI_COLORS[12]), s3.ansi[13] = g(e3.brightMagenta, t2.DEFAULT_ANSI_COLORS[13]), s3.ansi[14] = g(e3.brightCyan, t2.DEFAULT_ANSI_COLORS[14]), s3.ansi[15] = g(e3.brightWhite, t2.DEFAULT_ANSI_COLORS[15]), e3.extendedAnsi) {
|
78
|
+
const r3 = Math.min(s3.ansi.length - 16, e3.extendedAnsi.length);
|
79
|
+
for (let o2 = 0; o2 < r3; o2++) s3.ansi[o2 + 16] = g(e3.extendedAnsi[o2], t2.DEFAULT_ANSI_COLORS[o2 + 16]);
|
80
|
+
}
|
81
|
+
this._contrastCache.clear(), this._halfContrastCache.clear(), this._updateRestoreColors(), this._onChangeColors.fire(this.colors);
|
82
|
+
}
|
83
|
+
restoreColor(e3) {
|
84
|
+
this._restoreColor(e3), this._onChangeColors.fire(this.colors);
|
85
|
+
}
|
86
|
+
_restoreColor(e3) {
|
87
|
+
if (void 0 !== e3) switch (e3) {
|
88
|
+
case 256:
|
89
|
+
this._colors.foreground = this._restoreColors.foreground;
|
90
|
+
break;
|
91
|
+
case 257:
|
92
|
+
this._colors.background = this._restoreColors.background;
|
93
|
+
break;
|
94
|
+
case 258:
|
95
|
+
this._colors.cursor = this._restoreColors.cursor;
|
96
|
+
break;
|
97
|
+
default:
|
98
|
+
this._colors.ansi[e3] = this._restoreColors.ansi[e3];
|
99
|
+
}
|
100
|
+
else for (let e4 = 0; e4 < this._restoreColors.ansi.length; ++e4) this._colors.ansi[e4] = this._restoreColors.ansi[e4];
|
101
|
+
}
|
102
|
+
modifyColors(e3) {
|
103
|
+
e3(this._colors), this._onChangeColors.fire(this.colors);
|
104
|
+
}
|
105
|
+
_updateRestoreColors() {
|
106
|
+
this._restoreColors = { foreground: this._colors.foreground, background: this._colors.background, cursor: this._colors.cursor, ansi: this._colors.ansi.slice() };
|
107
|
+
}
|
108
|
+
};
|
109
|
+
function g(e3, t3) {
|
110
|
+
if (void 0 !== e3) try {
|
111
|
+
return n.css.toColor(e3);
|
112
|
+
} catch {
|
113
|
+
}
|
114
|
+
return t3;
|
115
|
+
}
|
116
|
+
__name(g, "g");
|
117
|
+
t2.ThemeService = f = r2([o(0, c.IOptionsService)], f);
|
118
|
+
}, 160: (e2, t2) => {
|
119
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.contrastRatio = t2.toPaddedHex = t2.rgba = t2.rgb = t2.css = t2.color = t2.channels = t2.NULL_COLOR = void 0;
|
120
|
+
let s2 = 0, r2 = 0, o = 0, i = 0;
|
121
|
+
var n, l, a, c, h;
|
122
|
+
function u(e3) {
|
123
|
+
const t3 = e3.toString(16);
|
124
|
+
return t3.length < 2 ? "0" + t3 : t3;
|
125
|
+
}
|
126
|
+
__name(u, "u");
|
127
|
+
function _(e3, t3) {
|
128
|
+
return e3 < t3 ? (t3 + 0.05) / (e3 + 0.05) : (e3 + 0.05) / (t3 + 0.05);
|
129
|
+
}
|
130
|
+
__name(_, "_");
|
131
|
+
t2.NULL_COLOR = { css: "#00000000", rgba: 0 }, function(e3) {
|
132
|
+
e3.toCss = function(e4, t3, s3, r3) {
|
133
|
+
return void 0 !== r3 ? `#${u(e4)}${u(t3)}${u(s3)}${u(r3)}` : `#${u(e4)}${u(t3)}${u(s3)}`;
|
134
|
+
}, e3.toRgba = function(e4, t3, s3, r3 = 255) {
|
135
|
+
return (e4 << 24 | t3 << 16 | s3 << 8 | r3) >>> 0;
|
136
|
+
}, e3.toColor = function(t3, s3, r3, o2) {
|
137
|
+
return { css: e3.toCss(t3, s3, r3, o2), rgba: e3.toRgba(t3, s3, r3, o2) };
|
138
|
+
};
|
139
|
+
}(n || (t2.channels = n = {})), function(e3) {
|
140
|
+
function t3(e4, t4) {
|
141
|
+
return i = Math.round(255 * t4), [s2, r2, o] = h.toChannels(e4.rgba), { css: n.toCss(s2, r2, o, i), rgba: n.toRgba(s2, r2, o, i) };
|
142
|
+
}
|
143
|
+
__name(t3, "t");
|
144
|
+
e3.blend = function(e4, t4) {
|
145
|
+
if (i = (255 & t4.rgba) / 255, 1 === i) return { css: t4.css, rgba: t4.rgba };
|
146
|
+
const l2 = t4.rgba >> 24 & 255, a2 = t4.rgba >> 16 & 255, c2 = t4.rgba >> 8 & 255, h2 = e4.rgba >> 24 & 255, u2 = e4.rgba >> 16 & 255, _2 = e4.rgba >> 8 & 255;
|
147
|
+
return s2 = h2 + Math.round((l2 - h2) * i), r2 = u2 + Math.round((a2 - u2) * i), o = _2 + Math.round((c2 - _2) * i), { css: n.toCss(s2, r2, o), rgba: n.toRgba(s2, r2, o) };
|
148
|
+
}, e3.isOpaque = function(e4) {
|
149
|
+
return 255 == (255 & e4.rgba);
|
150
|
+
}, e3.ensureContrastRatio = function(e4, t4, s3) {
|
151
|
+
const r3 = h.ensureContrastRatio(e4.rgba, t4.rgba, s3);
|
152
|
+
if (r3) return n.toColor(r3 >> 24 & 255, r3 >> 16 & 255, r3 >> 8 & 255);
|
153
|
+
}, e3.opaque = function(e4) {
|
154
|
+
const t4 = (255 | e4.rgba) >>> 0;
|
155
|
+
return [s2, r2, o] = h.toChannels(t4), { css: n.toCss(s2, r2, o), rgba: t4 };
|
156
|
+
}, e3.opacity = t3, e3.multiplyOpacity = function(e4, s3) {
|
157
|
+
return i = 255 & e4.rgba, t3(e4, i * s3 / 255);
|
158
|
+
}, e3.toColorRGB = function(e4) {
|
159
|
+
return [e4.rgba >> 24 & 255, e4.rgba >> 16 & 255, e4.rgba >> 8 & 255];
|
160
|
+
};
|
161
|
+
}(l || (t2.color = l = {})), function(e3) {
|
162
|
+
let t3, l2;
|
163
|
+
try {
|
164
|
+
const e4 = document.createElement("canvas");
|
165
|
+
e4.width = 1, e4.height = 1;
|
166
|
+
const s3 = e4.getContext("2d", { willReadFrequently: true });
|
167
|
+
s3 && (t3 = s3, t3.globalCompositeOperation = "copy", l2 = t3.createLinearGradient(0, 0, 1, 1));
|
168
|
+
} catch {
|
169
|
+
}
|
170
|
+
e3.toColor = function(e4) {
|
171
|
+
if (e4.match(/#[\da-f]{3,8}/i)) switch (e4.length) {
|
172
|
+
case 4:
|
173
|
+
return s2 = parseInt(e4.slice(1, 2).repeat(2), 16), r2 = parseInt(e4.slice(2, 3).repeat(2), 16), o = parseInt(e4.slice(3, 4).repeat(2), 16), n.toColor(s2, r2, o);
|
174
|
+
case 5:
|
175
|
+
return s2 = parseInt(e4.slice(1, 2).repeat(2), 16), r2 = parseInt(e4.slice(2, 3).repeat(2), 16), o = parseInt(e4.slice(3, 4).repeat(2), 16), i = parseInt(e4.slice(4, 5).repeat(2), 16), n.toColor(s2, r2, o, i);
|
176
|
+
case 7:
|
177
|
+
return { css: e4, rgba: (parseInt(e4.slice(1), 16) << 8 | 255) >>> 0 };
|
178
|
+
case 9:
|
179
|
+
return { css: e4, rgba: parseInt(e4.slice(1), 16) >>> 0 };
|
180
|
+
}
|
181
|
+
const a2 = e4.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
|
182
|
+
if (a2) return s2 = parseInt(a2[1]), r2 = parseInt(a2[2]), o = parseInt(a2[3]), i = Math.round(255 * (void 0 === a2[5] ? 1 : parseFloat(a2[5]))), n.toColor(s2, r2, o, i);
|
183
|
+
if (!t3 || !l2) throw new Error("css.toColor: Unsupported css format");
|
184
|
+
if (t3.fillStyle = l2, t3.fillStyle = e4, "string" != typeof t3.fillStyle) throw new Error("css.toColor: Unsupported css format");
|
185
|
+
if (t3.fillRect(0, 0, 1, 1), [s2, r2, o, i] = t3.getImageData(0, 0, 1, 1).data, 255 !== i) throw new Error("css.toColor: Unsupported css format");
|
186
|
+
return { rgba: n.toRgba(s2, r2, o, i), css: e4 };
|
187
|
+
};
|
188
|
+
}(a || (t2.css = a = {})), function(e3) {
|
189
|
+
function t3(e4, t4, s3) {
|
190
|
+
const r3 = e4 / 255, o2 = t4 / 255, i2 = s3 / 255;
|
191
|
+
return 0.2126 * (r3 <= 0.03928 ? r3 / 12.92 : Math.pow((r3 + 0.055) / 1.055, 2.4)) + 0.7152 * (o2 <= 0.03928 ? o2 / 12.92 : Math.pow((o2 + 0.055) / 1.055, 2.4)) + 0.0722 * (i2 <= 0.03928 ? i2 / 12.92 : Math.pow((i2 + 0.055) / 1.055, 2.4));
|
192
|
+
}
|
193
|
+
__name(t3, "t");
|
194
|
+
e3.relativeLuminance = function(e4) {
|
195
|
+
return t3(e4 >> 16 & 255, e4 >> 8 & 255, 255 & e4);
|
196
|
+
}, e3.relativeLuminance2 = t3;
|
197
|
+
}(c || (t2.rgb = c = {})), function(e3) {
|
198
|
+
function t3(e4, t4, s3) {
|
199
|
+
const r3 = e4 >> 24 & 255, o2 = e4 >> 16 & 255, i2 = e4 >> 8 & 255;
|
200
|
+
let n2 = t4 >> 24 & 255, l3 = t4 >> 16 & 255, a2 = t4 >> 8 & 255, h2 = _(c.relativeLuminance2(n2, l3, a2), c.relativeLuminance2(r3, o2, i2));
|
201
|
+
for (; h2 < s3 && (n2 > 0 || l3 > 0 || a2 > 0); ) n2 -= Math.max(0, Math.ceil(0.1 * n2)), l3 -= Math.max(0, Math.ceil(0.1 * l3)), a2 -= Math.max(0, Math.ceil(0.1 * a2)), h2 = _(c.relativeLuminance2(n2, l3, a2), c.relativeLuminance2(r3, o2, i2));
|
202
|
+
return (n2 << 24 | l3 << 16 | a2 << 8 | 255) >>> 0;
|
203
|
+
}
|
204
|
+
__name(t3, "t");
|
205
|
+
function l2(e4, t4, s3) {
|
206
|
+
const r3 = e4 >> 24 & 255, o2 = e4 >> 16 & 255, i2 = e4 >> 8 & 255;
|
207
|
+
let n2 = t4 >> 24 & 255, l3 = t4 >> 16 & 255, a2 = t4 >> 8 & 255, h2 = _(c.relativeLuminance2(n2, l3, a2), c.relativeLuminance2(r3, o2, i2));
|
208
|
+
for (; h2 < s3 && (n2 < 255 || l3 < 255 || a2 < 255); ) n2 = Math.min(255, n2 + Math.ceil(0.1 * (255 - n2))), l3 = Math.min(255, l3 + Math.ceil(0.1 * (255 - l3))), a2 = Math.min(255, a2 + Math.ceil(0.1 * (255 - a2))), h2 = _(c.relativeLuminance2(n2, l3, a2), c.relativeLuminance2(r3, o2, i2));
|
209
|
+
return (n2 << 24 | l3 << 16 | a2 << 8 | 255) >>> 0;
|
210
|
+
}
|
211
|
+
__name(l2, "l");
|
212
|
+
e3.blend = function(e4, t4) {
|
213
|
+
if (i = (255 & t4) / 255, 1 === i) return t4;
|
214
|
+
const l3 = t4 >> 24 & 255, a2 = t4 >> 16 & 255, c2 = t4 >> 8 & 255, h2 = e4 >> 24 & 255, u2 = e4 >> 16 & 255, _2 = e4 >> 8 & 255;
|
215
|
+
return s2 = h2 + Math.round((l3 - h2) * i), r2 = u2 + Math.round((a2 - u2) * i), o = _2 + Math.round((c2 - _2) * i), n.toRgba(s2, r2, o);
|
216
|
+
}, e3.ensureContrastRatio = function(e4, s3, r3) {
|
217
|
+
const o2 = c.relativeLuminance(e4 >> 8), i2 = c.relativeLuminance(s3 >> 8);
|
218
|
+
if (_(o2, i2) < r3) {
|
219
|
+
if (i2 < o2) {
|
220
|
+
const i3 = t3(e4, s3, r3), n3 = _(o2, c.relativeLuminance(i3 >> 8));
|
221
|
+
if (n3 < r3) {
|
222
|
+
const t4 = l2(e4, s3, r3);
|
223
|
+
return n3 > _(o2, c.relativeLuminance(t4 >> 8)) ? i3 : t4;
|
224
|
+
}
|
225
|
+
return i3;
|
226
|
+
}
|
227
|
+
const n2 = l2(e4, s3, r3), a2 = _(o2, c.relativeLuminance(n2 >> 8));
|
228
|
+
if (a2 < r3) {
|
229
|
+
const i3 = t3(e4, s3, r3);
|
230
|
+
return a2 > _(o2, c.relativeLuminance(i3 >> 8)) ? n2 : i3;
|
231
|
+
}
|
232
|
+
return n2;
|
233
|
+
}
|
234
|
+
}, e3.reduceLuminance = t3, e3.increaseLuminance = l2, e3.toChannels = function(e4) {
|
235
|
+
return [e4 >> 24 & 255, e4 >> 16 & 255, e4 >> 8 & 255, 255 & e4];
|
236
|
+
};
|
237
|
+
}(h || (t2.rgba = h = {})), t2.toPaddedHex = u, t2.contrastRatio = _;
|
238
|
+
}, 345: (e2, t2) => {
|
239
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.runAndSubscribe = t2.forwardEvent = t2.EventEmitter = void 0, t2.EventEmitter = class {
|
240
|
+
constructor() {
|
241
|
+
this._listeners = [], this._disposed = false;
|
242
|
+
}
|
243
|
+
get event() {
|
244
|
+
return this._event || (this._event = (e3) => (this._listeners.push(e3), { dispose: /* @__PURE__ */ __name(() => {
|
245
|
+
if (!this._disposed) {
|
246
|
+
for (let t3 = 0; t3 < this._listeners.length; t3++) if (this._listeners[t3] === e3) return void this._listeners.splice(t3, 1);
|
247
|
+
}
|
248
|
+
}, "dispose") })), this._event;
|
249
|
+
}
|
250
|
+
fire(e3, t3) {
|
251
|
+
const s2 = [];
|
252
|
+
for (let e4 = 0; e4 < this._listeners.length; e4++) s2.push(this._listeners[e4]);
|
253
|
+
for (let r2 = 0; r2 < s2.length; r2++) s2[r2].call(void 0, e3, t3);
|
254
|
+
}
|
255
|
+
dispose() {
|
256
|
+
this.clearListeners(), this._disposed = true;
|
257
|
+
}
|
258
|
+
clearListeners() {
|
259
|
+
this._listeners && (this._listeners.length = 0);
|
260
|
+
}
|
261
|
+
}, t2.forwardEvent = function(e3, t3) {
|
262
|
+
return e3((e4) => t3.fire(e4));
|
263
|
+
}, t2.runAndSubscribe = function(e3, t3) {
|
264
|
+
return t3(void 0), e3((e4) => t3(e4));
|
265
|
+
};
|
266
|
+
}, 859: (e2, t2) => {
|
267
|
+
function s2(e3) {
|
268
|
+
for (const t3 of e3) t3.dispose();
|
269
|
+
e3.length = 0;
|
270
|
+
}
|
271
|
+
__name(s2, "s");
|
272
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.getDisposeArrayDisposable = t2.disposeArray = t2.toDisposable = t2.MutableDisposable = t2.Disposable = void 0, t2.Disposable = class {
|
273
|
+
constructor() {
|
274
|
+
this._disposables = [], this._isDisposed = false;
|
275
|
+
}
|
276
|
+
dispose() {
|
277
|
+
this._isDisposed = true;
|
278
|
+
for (const e3 of this._disposables) e3.dispose();
|
279
|
+
this._disposables.length = 0;
|
280
|
+
}
|
281
|
+
register(e3) {
|
282
|
+
return this._disposables.push(e3), e3;
|
283
|
+
}
|
284
|
+
unregister(e3) {
|
285
|
+
const t3 = this._disposables.indexOf(e3);
|
286
|
+
-1 !== t3 && this._disposables.splice(t3, 1);
|
287
|
+
}
|
288
|
+
}, t2.MutableDisposable = class {
|
289
|
+
constructor() {
|
290
|
+
this._isDisposed = false;
|
291
|
+
}
|
292
|
+
get value() {
|
293
|
+
return this._isDisposed ? void 0 : this._value;
|
294
|
+
}
|
295
|
+
set value(e3) {
|
296
|
+
this._isDisposed || e3 === this._value || (this._value?.dispose(), this._value = e3);
|
297
|
+
}
|
298
|
+
clear() {
|
299
|
+
this.value = void 0;
|
300
|
+
}
|
301
|
+
dispose() {
|
302
|
+
this._isDisposed = true, this._value?.dispose(), this._value = void 0;
|
303
|
+
}
|
304
|
+
}, t2.toDisposable = function(e3) {
|
305
|
+
return { dispose: e3 };
|
306
|
+
}, t2.disposeArray = s2, t2.getDisposeArrayDisposable = function(e3) {
|
307
|
+
return { dispose: /* @__PURE__ */ __name(() => s2(e3), "dispose") };
|
308
|
+
};
|
309
|
+
}, 485: (e2, t2) => {
|
310
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.FourKeyMap = t2.TwoKeyMap = void 0;
|
311
|
+
class s2 {
|
312
|
+
static {
|
313
|
+
__name(this, "s");
|
314
|
+
}
|
315
|
+
constructor() {
|
316
|
+
this._data = {};
|
317
|
+
}
|
318
|
+
set(e3, t3, s3) {
|
319
|
+
this._data[e3] || (this._data[e3] = {}), this._data[e3][t3] = s3;
|
320
|
+
}
|
321
|
+
get(e3, t3) {
|
322
|
+
return this._data[e3] ? this._data[e3][t3] : void 0;
|
323
|
+
}
|
324
|
+
clear() {
|
325
|
+
this._data = {};
|
326
|
+
}
|
327
|
+
}
|
328
|
+
t2.TwoKeyMap = s2, t2.FourKeyMap = class {
|
329
|
+
constructor() {
|
330
|
+
this._data = new s2();
|
331
|
+
}
|
332
|
+
set(e3, t3, r2, o, i) {
|
333
|
+
this._data.get(e3, t3) || this._data.set(e3, t3, new s2()), this._data.get(e3, t3).set(r2, o, i);
|
334
|
+
}
|
335
|
+
get(e3, t3, s3, r2) {
|
336
|
+
return this._data.get(e3, t3)?.get(s3, r2);
|
337
|
+
}
|
338
|
+
clear() {
|
339
|
+
this._data.clear();
|
340
|
+
}
|
341
|
+
};
|
342
|
+
}, 726: (e2, t2) => {
|
343
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.createDecorator = t2.getServiceDependencies = t2.serviceRegistry = void 0;
|
344
|
+
const s2 = "di$target", r2 = "di$dependencies";
|
345
|
+
t2.serviceRegistry = /* @__PURE__ */ new Map(), t2.getServiceDependencies = function(e3) {
|
346
|
+
return e3[r2] || [];
|
347
|
+
}, t2.createDecorator = function(e3) {
|
348
|
+
if (t2.serviceRegistry.has(e3)) return t2.serviceRegistry.get(e3);
|
349
|
+
const o = /* @__PURE__ */ __name(function(e4, t3, i) {
|
350
|
+
if (3 !== arguments.length) throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
|
351
|
+
!function(e5, t4, o2) {
|
352
|
+
t4[s2] === t4 ? t4[r2].push({ id: e5, index: o2 }) : (t4[r2] = [{ id: e5, index: o2 }], t4[s2] = t4);
|
353
|
+
}(o, e4, i);
|
354
|
+
}, "o");
|
355
|
+
return o.toString = () => e3, t2.serviceRegistry.set(e3, o), o;
|
356
|
+
};
|
357
|
+
}, 97: (e2, t2, s2) => {
|
358
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.IDecorationService = t2.IUnicodeService = t2.IOscLinkService = t2.IOptionsService = t2.ILogService = t2.LogLevelEnum = t2.IInstantiationService = t2.ICharsetService = t2.ICoreService = t2.ICoreMouseService = t2.IBufferService = void 0;
|
359
|
+
const r2 = s2(726);
|
360
|
+
var o;
|
361
|
+
t2.IBufferService = (0, r2.createDecorator)("BufferService"), t2.ICoreMouseService = (0, r2.createDecorator)("CoreMouseService"), t2.ICoreService = (0, r2.createDecorator)("CoreService"), t2.ICharsetService = (0, r2.createDecorator)("CharsetService"), t2.IInstantiationService = (0, r2.createDecorator)("InstantiationService"), function(e3) {
|
362
|
+
e3[e3.TRACE = 0] = "TRACE", e3[e3.DEBUG = 1] = "DEBUG", e3[e3.INFO = 2] = "INFO", e3[e3.WARN = 3] = "WARN", e3[e3.ERROR = 4] = "ERROR", e3[e3.OFF = 5] = "OFF";
|
363
|
+
}(o || (t2.LogLevelEnum = o = {})), t2.ILogService = (0, r2.createDecorator)("LogService"), t2.IOptionsService = (0, r2.createDecorator)("OptionsService"), t2.IOscLinkService = (0, r2.createDecorator)("OscLinkService"), t2.IUnicodeService = (0, r2.createDecorator)("UnicodeService"), t2.IDecorationService = (0, r2.createDecorator)("DecorationService");
|
364
|
+
} }, t = {};
|
365
|
+
function s(r2) {
|
366
|
+
var o = t[r2];
|
367
|
+
if (void 0 !== o) return o.exports;
|
368
|
+
var i = t[r2] = { exports: {} };
|
369
|
+
return e[r2].call(i.exports, i, i.exports, s), i.exports;
|
370
|
+
}
|
371
|
+
__name(s, "s");
|
372
|
+
var r = {};
|
373
|
+
return (() => {
|
374
|
+
var e2 = r;
|
375
|
+
Object.defineProperty(e2, "__esModule", { value: true }), e2.HTMLSerializeHandler = e2.SerializeAddon = void 0;
|
376
|
+
const t2 = s(997);
|
377
|
+
function o(e3, t3, s2) {
|
378
|
+
return Math.max(t3, Math.min(e3, s2));
|
379
|
+
}
|
380
|
+
__name(o, "o");
|
381
|
+
class i {
|
382
|
+
static {
|
383
|
+
__name(this, "i");
|
384
|
+
}
|
385
|
+
constructor(e3) {
|
386
|
+
this._buffer = e3;
|
387
|
+
}
|
388
|
+
serialize(e3, t3) {
|
389
|
+
const s2 = this._buffer.getNullCell(), r2 = this._buffer.getNullCell();
|
390
|
+
let o2 = s2;
|
391
|
+
const i2 = e3.start.y, n2 = e3.end.y, l2 = e3.start.x, a2 = e3.end.x;
|
392
|
+
this._beforeSerialize(n2 - i2, i2, n2);
|
393
|
+
for (let t4 = i2; t4 <= n2; t4++) {
|
394
|
+
const i3 = this._buffer.getLine(t4);
|
395
|
+
if (i3) {
|
396
|
+
const n3 = t4 === e3.start.y ? l2 : 0, c2 = t4 === e3.end.y ? a2 : i3.length;
|
397
|
+
for (let e4 = n3; e4 < c2; e4++) {
|
398
|
+
const n4 = i3.getCell(e4, o2 === s2 ? r2 : s2);
|
399
|
+
n4 ? (this._nextCell(n4, o2, t4, e4), o2 = n4) : console.warn(`Can't get cell at row=${t4}, col=${e4}`);
|
400
|
+
}
|
401
|
+
}
|
402
|
+
this._rowEnd(t4, t4 === n2);
|
403
|
+
}
|
404
|
+
return this._afterSerialize(), this._serializeString(t3);
|
405
|
+
}
|
406
|
+
_nextCell(e3, t3, s2, r2) {
|
407
|
+
}
|
408
|
+
_rowEnd(e3, t3) {
|
409
|
+
}
|
410
|
+
_beforeSerialize(e3, t3, s2) {
|
411
|
+
}
|
412
|
+
_afterSerialize() {
|
413
|
+
}
|
414
|
+
_serializeString(e3) {
|
415
|
+
return "";
|
416
|
+
}
|
417
|
+
}
|
418
|
+
function n(e3, t3) {
|
419
|
+
return e3.getFgColorMode() === t3.getFgColorMode() && e3.getFgColor() === t3.getFgColor();
|
420
|
+
}
|
421
|
+
__name(n, "n");
|
422
|
+
function l(e3, t3) {
|
423
|
+
return e3.getBgColorMode() === t3.getBgColorMode() && e3.getBgColor() === t3.getBgColor();
|
424
|
+
}
|
425
|
+
__name(l, "l");
|
426
|
+
function a(e3, t3) {
|
427
|
+
return e3.isInverse() === t3.isInverse() && e3.isBold() === t3.isBold() && e3.isUnderline() === t3.isUnderline() && e3.isOverline() === t3.isOverline() && e3.isBlink() === t3.isBlink() && e3.isInvisible() === t3.isInvisible() && e3.isItalic() === t3.isItalic() && e3.isDim() === t3.isDim() && e3.isStrikethrough() === t3.isStrikethrough();
|
428
|
+
}
|
429
|
+
__name(a, "a");
|
430
|
+
class c extends i {
|
431
|
+
static {
|
432
|
+
__name(this, "c");
|
433
|
+
}
|
434
|
+
constructor(e3, t3) {
|
435
|
+
super(e3), this._terminal = t3, this._rowIndex = 0, this._allRows = new Array(), this._allRowSeparators = new Array(), this._currentRow = "", this._nullCellCount = 0, this._cursorStyle = this._buffer.getNullCell(), this._cursorStyleRow = 0, this._cursorStyleCol = 0, this._backgroundCell = this._buffer.getNullCell(), this._firstRow = 0, this._lastCursorRow = 0, this._lastCursorCol = 0, this._lastContentCursorRow = 0, this._lastContentCursorCol = 0, this._thisRowLastChar = this._buffer.getNullCell(), this._thisRowLastSecondChar = this._buffer.getNullCell(), this._nextRowFirstChar = this._buffer.getNullCell();
|
436
|
+
}
|
437
|
+
_beforeSerialize(e3, t3, s2) {
|
438
|
+
this._allRows = new Array(e3), this._lastContentCursorRow = t3, this._lastCursorRow = t3, this._firstRow = t3;
|
439
|
+
}
|
440
|
+
_rowEnd(e3, t3) {
|
441
|
+
this._nullCellCount > 0 && !l(this._cursorStyle, this._backgroundCell) && (this._currentRow += `\x1B[${this._nullCellCount}X`);
|
442
|
+
let s2 = "";
|
443
|
+
if (!t3) {
|
444
|
+
e3 - this._firstRow >= this._terminal.rows && this._buffer.getLine(this._cursorStyleRow)?.getCell(this._cursorStyleCol, this._backgroundCell);
|
445
|
+
const t4 = this._buffer.getLine(e3), r2 = this._buffer.getLine(e3 + 1);
|
446
|
+
if (r2.isWrapped) {
|
447
|
+
s2 = "";
|
448
|
+
const o2 = t4.getCell(t4.length - 1, this._thisRowLastChar), i2 = t4.getCell(t4.length - 2, this._thisRowLastSecondChar), n2 = r2.getCell(0, this._nextRowFirstChar), a2 = n2.getWidth() > 1;
|
449
|
+
let c2 = false;
|
450
|
+
(n2.getChars() && a2 ? this._nullCellCount <= 1 : this._nullCellCount <= 0) && ((o2.getChars() || 0 === o2.getWidth()) && l(o2, n2) && (c2 = true), a2 && (i2.getChars() || 0 === i2.getWidth()) && l(o2, n2) && l(i2, n2) && (c2 = true)), c2 || (s2 = "-".repeat(this._nullCellCount + 1), s2 += "\x1B[1D\x1B[1X", this._nullCellCount > 0 && (s2 += "\x1B[A", s2 += `\x1B[${t4.length - this._nullCellCount}C`, s2 += `\x1B[${this._nullCellCount}X`, s2 += `\x1B[${t4.length - this._nullCellCount}D`, s2 += "\x1B[B"), this._lastContentCursorRow = e3 + 1, this._lastContentCursorCol = 0, this._lastCursorRow = e3 + 1, this._lastCursorCol = 0);
|
451
|
+
} else s2 = "\r\n", this._lastCursorRow = e3 + 1, this._lastCursorCol = 0;
|
452
|
+
}
|
453
|
+
this._allRows[this._rowIndex] = this._currentRow, this._allRowSeparators[this._rowIndex++] = s2, this._currentRow = "", this._nullCellCount = 0;
|
454
|
+
}
|
455
|
+
_diffStyle(e3, t3) {
|
456
|
+
const s2 = [], r2 = !n(e3, t3), o2 = !l(e3, t3), i2 = !a(e3, t3);
|
457
|
+
if (r2 || o2 || i2) if (e3.isAttributeDefault()) t3.isAttributeDefault() || s2.push(0);
|
458
|
+
else {
|
459
|
+
if (r2) {
|
460
|
+
const t4 = e3.getFgColor();
|
461
|
+
e3.isFgRGB() ? s2.push(38, 2, t4 >>> 16 & 255, t4 >>> 8 & 255, 255 & t4) : e3.isFgPalette() ? t4 >= 16 ? s2.push(38, 5, t4) : s2.push(8 & t4 ? 90 + (7 & t4) : 30 + (7 & t4)) : s2.push(39);
|
462
|
+
}
|
463
|
+
if (o2) {
|
464
|
+
const t4 = e3.getBgColor();
|
465
|
+
e3.isBgRGB() ? s2.push(48, 2, t4 >>> 16 & 255, t4 >>> 8 & 255, 255 & t4) : e3.isBgPalette() ? t4 >= 16 ? s2.push(48, 5, t4) : s2.push(8 & t4 ? 100 + (7 & t4) : 40 + (7 & t4)) : s2.push(49);
|
466
|
+
}
|
467
|
+
i2 && (e3.isInverse() !== t3.isInverse() && s2.push(e3.isInverse() ? 7 : 27), e3.isBold() !== t3.isBold() && s2.push(e3.isBold() ? 1 : 22), e3.isUnderline() !== t3.isUnderline() && s2.push(e3.isUnderline() ? 4 : 24), e3.isOverline() !== t3.isOverline() && s2.push(e3.isOverline() ? 53 : 55), e3.isBlink() !== t3.isBlink() && s2.push(e3.isBlink() ? 5 : 25), e3.isInvisible() !== t3.isInvisible() && s2.push(e3.isInvisible() ? 8 : 28), e3.isItalic() !== t3.isItalic() && s2.push(e3.isItalic() ? 3 : 23), e3.isDim() !== t3.isDim() && s2.push(e3.isDim() ? 2 : 22), e3.isStrikethrough() !== t3.isStrikethrough() && s2.push(e3.isStrikethrough() ? 9 : 29));
|
468
|
+
}
|
469
|
+
return s2;
|
470
|
+
}
|
471
|
+
_nextCell(e3, t3, s2, r2) {
|
472
|
+
if (0 === e3.getWidth()) return;
|
473
|
+
const o2 = "" === e3.getChars(), i2 = this._diffStyle(e3, this._cursorStyle);
|
474
|
+
if (o2 ? !l(this._cursorStyle, e3) : i2.length > 0) {
|
475
|
+
this._nullCellCount > 0 && (l(this._cursorStyle, this._backgroundCell) || (this._currentRow += `\x1B[${this._nullCellCount}X`), this._currentRow += `\x1B[${this._nullCellCount}C`, this._nullCellCount = 0), this._lastContentCursorRow = this._lastCursorRow = s2, this._lastContentCursorCol = this._lastCursorCol = r2, this._currentRow += `\x1B[${i2.join(";")}m`;
|
476
|
+
const e4 = this._buffer.getLine(s2);
|
477
|
+
void 0 !== e4 && (e4.getCell(r2, this._cursorStyle), this._cursorStyleRow = s2, this._cursorStyleCol = r2);
|
478
|
+
}
|
479
|
+
o2 ? this._nullCellCount += e3.getWidth() : (this._nullCellCount > 0 && (l(this._cursorStyle, this._backgroundCell) || (this._currentRow += `\x1B[${this._nullCellCount}X`), this._currentRow += `\x1B[${this._nullCellCount}C`, this._nullCellCount = 0), this._currentRow += e3.getChars(), this._lastContentCursorRow = this._lastCursorRow = s2, this._lastContentCursorCol = this._lastCursorCol = r2 + e3.getWidth());
|
480
|
+
}
|
481
|
+
_serializeString(e3) {
|
482
|
+
let t3 = this._allRows.length;
|
483
|
+
this._buffer.length - this._firstRow <= this._terminal.rows && (t3 = this._lastContentCursorRow + 1 - this._firstRow, this._lastCursorCol = this._lastContentCursorCol, this._lastCursorRow = this._lastContentCursorRow);
|
484
|
+
let s2 = "";
|
485
|
+
for (let e4 = 0; e4 < t3; e4++) s2 += this._allRows[e4], e4 + 1 < t3 && (s2 += this._allRowSeparators[e4]);
|
486
|
+
if (!e3) {
|
487
|
+
const e4 = this._buffer.baseY + this._buffer.cursorY, t4 = this._buffer.cursorX, o3 = /* @__PURE__ */ __name((e5) => {
|
488
|
+
e5 > 0 ? s2 += `\x1B[${e5}C` : e5 < 0 && (s2 += `\x1B[${-e5}D`);
|
489
|
+
}, "o");
|
490
|
+
(e4 !== this._lastCursorRow || t4 !== this._lastCursorCol) && ((r2 = e4 - this._lastCursorRow) > 0 ? s2 += `\x1B[${r2}B` : r2 < 0 && (s2 += `\x1B[${-r2}A`), o3(t4 - this._lastCursorCol));
|
491
|
+
}
|
492
|
+
var r2;
|
493
|
+
const o2 = this._terminal._core._inputHandler._curAttrData, i2 = this._diffStyle(o2, this._cursorStyle);
|
494
|
+
return i2.length > 0 && (s2 += `\x1B[${i2.join(";")}m`), s2;
|
495
|
+
}
|
496
|
+
}
|
497
|
+
e2.SerializeAddon = class {
|
498
|
+
activate(e3) {
|
499
|
+
this._terminal = e3;
|
500
|
+
}
|
501
|
+
_serializeBufferByScrollback(e3, t3, s2) {
|
502
|
+
const r2 = t3.length, i2 = void 0 === s2 ? r2 : o(s2 + e3.rows, 0, r2);
|
503
|
+
return this._serializeBufferByRange(e3, t3, { start: r2 - i2, end: r2 - 1 }, false);
|
504
|
+
}
|
505
|
+
_serializeBufferByRange(e3, t3, s2, r2) {
|
506
|
+
return new c(t3, e3).serialize({ start: { x: 0, y: "number" == typeof s2.start ? s2.start : s2.start.line }, end: { x: e3.cols, y: "number" == typeof s2.end ? s2.end : s2.end.line } }, r2);
|
507
|
+
}
|
508
|
+
_serializeBufferAsHTML(e3, t3) {
|
509
|
+
const s2 = e3.buffer.active, r2 = new h(s2, e3, t3);
|
510
|
+
if (!t3.onlySelection) {
|
511
|
+
const i3 = s2.length, n2 = t3.scrollback, l2 = void 0 === n2 ? i3 : o(n2 + e3.rows, 0, i3);
|
512
|
+
return r2.serialize({ start: { x: 0, y: i3 - l2 }, end: { x: e3.cols, y: i3 - 1 } });
|
513
|
+
}
|
514
|
+
const i2 = this._terminal?.getSelectionPosition();
|
515
|
+
return void 0 !== i2 ? r2.serialize({ start: { x: i2.start.x, y: i2.start.y }, end: { x: i2.end.x, y: i2.end.y } }) : "";
|
516
|
+
}
|
517
|
+
_serializeModes(e3) {
|
518
|
+
let t3 = "";
|
519
|
+
const s2 = e3.modes;
|
520
|
+
if (s2.applicationCursorKeysMode && (t3 += "\x1B[?1h"), s2.applicationKeypadMode && (t3 += "\x1B[?66h"), s2.bracketedPasteMode && (t3 += "\x1B[?2004h"), s2.insertMode && (t3 += "\x1B[4h"), s2.originMode && (t3 += "\x1B[?6h"), s2.reverseWraparoundMode && (t3 += "\x1B[?45h"), s2.sendFocusMode && (t3 += "\x1B[?1004h"), false === s2.wraparoundMode && (t3 += "\x1B[?7l"), "none" !== s2.mouseTrackingMode) switch (s2.mouseTrackingMode) {
|
521
|
+
case "x10":
|
522
|
+
t3 += "\x1B[?9h";
|
523
|
+
break;
|
524
|
+
case "vt200":
|
525
|
+
t3 += "\x1B[?1000h";
|
526
|
+
break;
|
527
|
+
case "drag":
|
528
|
+
t3 += "\x1B[?1002h";
|
529
|
+
break;
|
530
|
+
case "any":
|
531
|
+
t3 += "\x1B[?1003h";
|
532
|
+
}
|
533
|
+
return t3;
|
534
|
+
}
|
535
|
+
serialize(e3) {
|
536
|
+
if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
|
537
|
+
let t3 = e3?.range ? this._serializeBufferByRange(this._terminal, this._terminal.buffer.normal, e3.range, true) : this._serializeBufferByScrollback(this._terminal, this._terminal.buffer.normal, e3?.scrollback);
|
538
|
+
return e3?.excludeAltBuffer || "alternate" !== this._terminal.buffer.active.type || (t3 += `\x1B[?1049h\x1B[H${this._serializeBufferByScrollback(this._terminal, this._terminal.buffer.alternate, void 0)}`), e3?.excludeModes || (t3 += this._serializeModes(this._terminal)), t3;
|
539
|
+
}
|
540
|
+
serializeAsHTML(e3) {
|
541
|
+
if (!this._terminal) throw new Error("Cannot use addon until it has been loaded");
|
542
|
+
return this._serializeBufferAsHTML(this._terminal, e3 || {});
|
543
|
+
}
|
544
|
+
dispose() {
|
545
|
+
}
|
546
|
+
};
|
547
|
+
class h extends i {
|
548
|
+
static {
|
549
|
+
__name(this, "h");
|
550
|
+
}
|
551
|
+
constructor(e3, s2, r2) {
|
552
|
+
super(e3), this._terminal = s2, this._options = r2, this._currentRow = "", this._htmlContent = "", s2._core._themeService ? this._ansiColors = s2._core._themeService.colors.ansi : this._ansiColors = t2.DEFAULT_ANSI_COLORS;
|
553
|
+
}
|
554
|
+
_padStart(e3, t3, s2) {
|
555
|
+
return t3 >>= 0, s2 = s2 ?? " ", e3.length > t3 ? e3 : ((t3 -= e3.length) > s2.length && (s2 += s2.repeat(t3 / s2.length)), s2.slice(0, t3) + e3);
|
556
|
+
}
|
557
|
+
_beforeSerialize(e3, t3, s2) {
|
558
|
+
this._htmlContent += "<html><body><!--StartFragment--><pre>";
|
559
|
+
let r2 = "#000000", o2 = "#ffffff";
|
560
|
+
this._options.includeGlobalBackground && (r2 = this._terminal.options.theme?.foreground ?? "#ffffff", o2 = this._terminal.options.theme?.background ?? "#000000");
|
561
|
+
const i2 = [];
|
562
|
+
i2.push("color: " + r2 + ";"), i2.push("background-color: " + o2 + ";"), i2.push("font-family: " + this._terminal.options.fontFamily + ";"), i2.push("font-size: " + this._terminal.options.fontSize + "px;"), this._htmlContent += "<div style='" + i2.join(" ") + "'>";
|
563
|
+
}
|
564
|
+
_afterSerialize() {
|
565
|
+
this._htmlContent += "</div>", this._htmlContent += "</pre><!--EndFragment--></body></html>";
|
566
|
+
}
|
567
|
+
_rowEnd(e3, t3) {
|
568
|
+
this._htmlContent += "<div><span>" + this._currentRow + "</span></div>", this._currentRow = "";
|
569
|
+
}
|
570
|
+
_getHexColor(e3, t3) {
|
571
|
+
const s2 = t3 ? e3.getFgColor() : e3.getBgColor();
|
572
|
+
return (t3 ? e3.isFgRGB() : e3.isBgRGB()) ? "#" + [s2 >> 16 & 255, s2 >> 8 & 255, 255 & s2].map((e4) => this._padStart(e4.toString(16), 2, "0")).join("") : (t3 ? e3.isFgPalette() : e3.isBgPalette()) ? this._ansiColors[s2].css : void 0;
|
573
|
+
}
|
574
|
+
_diffStyle(e3, t3) {
|
575
|
+
const s2 = [], r2 = !n(e3, t3), o2 = !l(e3, t3), i2 = !a(e3, t3);
|
576
|
+
if (r2 || o2 || i2) {
|
577
|
+
const t4 = this._getHexColor(e3, true);
|
578
|
+
t4 && s2.push("color: " + t4 + ";");
|
579
|
+
const r3 = this._getHexColor(e3, false);
|
580
|
+
return r3 && s2.push("background-color: " + r3 + ";"), e3.isInverse() && s2.push("color: #000000; background-color: #BFBFBF;"), e3.isBold() && s2.push("font-weight: bold;"), e3.isUnderline() && e3.isOverline() ? s2.push("text-decoration: overline underline;") : e3.isUnderline() ? s2.push("text-decoration: underline;") : e3.isOverline() && s2.push("text-decoration: overline;"), e3.isBlink() && s2.push("text-decoration: blink;"), e3.isInvisible() && s2.push("visibility: hidden;"), e3.isItalic() && s2.push("font-style: italic;"), e3.isDim() && s2.push("opacity: 0.5;"), e3.isStrikethrough() && s2.push("text-decoration: line-through;"), s2;
|
581
|
+
}
|
582
|
+
}
|
583
|
+
_nextCell(e3, t3, s2, r2) {
|
584
|
+
if (0 === e3.getWidth()) return;
|
585
|
+
const o2 = "" === e3.getChars(), i2 = this._diffStyle(e3, t3);
|
586
|
+
i2 && (this._currentRow += 0 === i2.length ? "</span><span>" : "</span><span style='" + i2.join(" ") + "'>"), this._currentRow += o2 ? " " : e3.getChars();
|
587
|
+
}
|
588
|
+
_serializeString() {
|
589
|
+
return this._htmlContent;
|
590
|
+
}
|
591
|
+
}
|
592
|
+
e2.HTMLSerializeHandler = h;
|
593
|
+
})(), r;
|
594
|
+
})());
|
595
|
+
})(addonSerialize$2, addonSerialize$2.exports);
|
596
|
+
var addonSerializeExports = addonSerialize$2.exports;
|
597
|
+
const addonSerialize$1 = /* @__PURE__ */ getDefaultExportFromCjs(addonSerializeExports);
|
598
|
+
function useTerminalBuffer() {
|
599
|
+
const serializeAddon = new addonSerializeExports.SerializeAddon();
|
600
|
+
const terminal = markRaw(new xtermExports.Terminal({ convertEol: true }));
|
601
|
+
const copyTo = /* @__PURE__ */ __name((destinationTerminal) => {
|
602
|
+
destinationTerminal.write(serializeAddon.serialize());
|
603
|
+
}, "copyTo");
|
604
|
+
const write = /* @__PURE__ */ __name((message) => terminal.write(message), "write");
|
605
|
+
const serialize = /* @__PURE__ */ __name(() => serializeAddon.serialize(), "serialize");
|
606
|
+
onMounted(() => {
|
607
|
+
terminal.loadAddon(serializeAddon);
|
608
|
+
});
|
609
|
+
onUnmounted(() => {
|
610
|
+
terminal.dispose();
|
611
|
+
});
|
612
|
+
return {
|
613
|
+
copyTo,
|
614
|
+
serialize,
|
615
|
+
write
|
616
|
+
};
|
617
|
+
}
|
618
|
+
__name(useTerminalBuffer, "useTerminalBuffer");
|
619
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
620
|
+
__name: "TerminalOutputDrawer",
|
621
|
+
props: /* @__PURE__ */ mergeModels({
|
622
|
+
header: {},
|
623
|
+
defaultMessage: {}
|
624
|
+
}, {
|
625
|
+
"modelValue": { type: Boolean, ...{ required: true } },
|
626
|
+
"modelModifiers": {}
|
627
|
+
}),
|
628
|
+
emits: ["update:modelValue"],
|
629
|
+
setup(__props) {
|
630
|
+
const terminalVisible = useModel(__props, "modelValue");
|
631
|
+
const props = __props;
|
632
|
+
const electron = electronAPI();
|
633
|
+
const buffer = useTerminalBuffer();
|
634
|
+
let xterm = null;
|
635
|
+
const terminalCreated = /* @__PURE__ */ __name(({ terminal, useAutoSize }, root) => {
|
636
|
+
xterm = terminal;
|
637
|
+
useAutoSize({ root, autoRows: true, autoCols: true });
|
638
|
+
terminal.write(props.defaultMessage);
|
639
|
+
buffer.copyTo(terminal);
|
640
|
+
terminal.options.cursorBlink = false;
|
641
|
+
terminal.options.cursorStyle = "bar";
|
642
|
+
terminal.options.cursorInactiveStyle = "bar";
|
643
|
+
terminal.options.disableStdin = true;
|
644
|
+
}, "terminalCreated");
|
645
|
+
const terminalUnmounted = /* @__PURE__ */ __name(() => {
|
646
|
+
xterm = null;
|
647
|
+
}, "terminalUnmounted");
|
648
|
+
onMounted(async () => {
|
649
|
+
electron.onLogMessage((message) => {
|
650
|
+
buffer.write(message);
|
651
|
+
xterm?.write(message);
|
652
|
+
});
|
653
|
+
});
|
654
|
+
return (_ctx, _cache) => {
|
655
|
+
return openBlock(), createBlock(unref(script), {
|
656
|
+
visible: terminalVisible.value,
|
657
|
+
"onUpdate:visible": _cache[0] || (_cache[0] = ($event) => terminalVisible.value = $event),
|
658
|
+
header: _ctx.header,
|
659
|
+
position: "bottom",
|
660
|
+
style: { "height": "max(50vh, 34rem)" }
|
661
|
+
}, {
|
662
|
+
default: withCtx(() => [
|
663
|
+
createVNode(BaseTerminal, {
|
664
|
+
onCreated: terminalCreated,
|
665
|
+
onUnmounted: terminalUnmounted
|
666
|
+
})
|
667
|
+
]),
|
668
|
+
_: 1
|
669
|
+
}, 8, ["visible", "header"]);
|
670
|
+
};
|
671
|
+
}
|
672
|
+
});
|
673
|
+
export {
|
674
|
+
_sfc_main as _
|
675
|
+
};
|
676
|
+
//# sourceMappingURL=TerminalOutputDrawer-BIo0jnWo.js.map
|